From 903d654962c714f660b67d54470d170c54851560 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sat, 13 Apr 2024 13:31:06 -0700 Subject: [PATCH 01/44] Extracts OpenapApiProcessor interface out of Generator --- .../codegen/generators/DefaultGenerator.java | 2 - .../codegen/generators/Generator.java | 57 +------------------ .../codegen/generators/OpenApiProcessor.java | 53 +++++++++++++++++ 3 files changed, 54 insertions(+), 58 deletions(-) create mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/OpenApiProcessor.java diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 49a96eca428..654843bbfbc 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -128,8 +128,6 @@ import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.servers.ServerVariable; -import javax.validation.constraints.NotNull; - import static org.openapijsonschematools.codegen.common.StringUtils.camelize; @SuppressWarnings("rawtypes") diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index d22b0d65fc8..db682d54d63 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -19,57 +19,31 @@ import com.samskivert.mustache.Mustache.Compiler; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.PathItem; -import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.headers.Header; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.parameters.Parameter; -import io.swagger.v3.oas.models.parameters.RequestBody; -import io.swagger.v3.oas.models.responses.ApiResponse; -import io.swagger.v3.oas.models.security.SecurityRequirement; -import io.swagger.v3.oas.models.security.SecurityScheme; -import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.oas.models.servers.ServerVariable; -import org.apache.commons.lang3.tuple.Pair; import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType; import org.openapijsonschematools.codegen.generators.models.VendorExtension; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRefInfo; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityRequirementObject; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenList; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenServer; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.models.CliOption; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenOperation; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenParameter; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPathItem; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPatternInfo; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRequestBody; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenResponse; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSchema; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityRequirementValue; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityScheme; import org.openapijsonschematools.codegen.templating.TemplatingEngineAdapter; import org.openapijsonschematools.codegen.generators.generatormetadata.FeatureSet; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; -import org.openapijsonschematools.codegen.generators.openapimodels.CodegenTag; import javax.validation.constraints.NotNull; import java.io.File; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.function.Function; -public interface Generator { +public interface Generator extends OpenApiProcessor { String getFilesMetadataFilename(); String getVersionMetadataFilename(); @@ -152,28 +126,8 @@ default String toContentTypeFilename(String name) { void setOutputDir(String dir); - CodegenSchema fromSchema(Schema schema, String sourceJsonPath, String currentJsonPath); - - CodegenTag fromTag(String name, String description); - - CodegenList fromSecurity(List security, String jsonPath); - - CodegenOperation fromOperation(Operation operation, String jsonPath, LinkedHashMap, CodegenParameter> pathItemParameters, CodegenList rootOrPathServers, CodegenList rootSecurity); - CodegenKey getKey(String key, String keyType); - CodegenSecurityScheme fromSecurityScheme(SecurityScheme securityScheme, String jsonPath); - - HashMap fromSecurityRequirement(SecurityRequirement securityScheme, String jsonPath); - - TreeMap fromPaths(Paths paths, CodegenList rootServers, CodegenList rootSecurity); - - CodegenPathItem fromPathItem(PathItem pathItem, String jsonPath, CodegenList rootServers, CodegenList rootSecurity); - - CodegenList fromServers(List servers, String jsonPath); - - CodegenSchema fromServerVariables(Map variables, String jsonPath); - Map instantiationTypes(); HashMap> jsonPathTemplateFiles(); @@ -329,15 +283,6 @@ default String getPascalCaseServer(String basename, String jsonPath) { List getSupportedVendorExtensions(); String toRefClass(String ref, String sourceJsonPath, String expectedComponentType); - - CodegenRequestBody fromRequestBody(RequestBody body, String sourceJsonPath); - - CodegenResponse fromResponse(ApiResponse response, String sourceJsonPath); - - CodegenHeader fromHeader(Header parameter, String sourceJsonPath); - - CodegenParameter fromParameter(Parameter parameter, String sourceJsonPath); - Function> getSchemasFn(); boolean generateSeparateServerSchemas(); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/OpenApiProcessor.java b/src/main/java/org/openapijsonschematools/codegen/generators/OpenApiProcessor.java new file mode 100644 index 00000000000..e91afedee7c --- /dev/null +++ b/src/main/java/org/openapijsonschematools/codegen/generators/OpenApiProcessor.java @@ -0,0 +1,53 @@ +package org.openapijsonschematools.codegen.generators; + +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.oas.models.headers.Header; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import io.swagger.v3.oas.models.servers.Server; +import io.swagger.v3.oas.models.servers.ServerVariable; +import org.apache.commons.lang3.tuple.Pair; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenList; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenOperation; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenParameter; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPathItem; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRequestBody; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenResponse; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSchema; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityRequirementObject; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityRequirementValue; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityScheme; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenServer; +import org.openapijsonschematools.codegen.generators.openapimodels.CodegenTag; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +public interface OpenApiProcessor { + CodegenSchema fromSchema(Schema schema, String sourceJsonPath, String currentJsonPath); + CodegenTag fromTag(String name, String description); + CodegenList fromSecurity(List security, String jsonPath); + CodegenOperation fromOperation(Operation operation, String jsonPath, LinkedHashMap, CodegenParameter> pathItemParameters, CodegenList rootOrPathServers, CodegenList rootSecurity); + CodegenSecurityScheme fromSecurityScheme(SecurityScheme securityScheme, String jsonPath); + HashMap fromSecurityRequirement(SecurityRequirement securityScheme, String jsonPath); + TreeMap fromPaths(Paths paths, CodegenList rootServers, CodegenList rootSecurity); + CodegenPathItem fromPathItem(PathItem pathItem, String jsonPath, CodegenList rootServers, CodegenList rootSecurity); + CodegenList fromServers(List servers, String jsonPath); + CodegenSchema fromServerVariables(Map variables, String jsonPath); + CodegenRequestBody fromRequestBody(RequestBody body, String sourceJsonPath); + CodegenResponse fromResponse(ApiResponse response, String sourceJsonPath); + CodegenHeader fromHeader(Header parameter, String sourceJsonPath); + CodegenParameter fromParameter(Parameter parameter, String sourceJsonPath); + +} From 780edf161b9c92a8c78b28a094205e18a159bef7 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sat, 13 Apr 2024 15:19:33 -0700 Subject: [PATCH 02/44] Deprecates more generator methods --- .../codegen/MyclientcodegenGenerator.java | 10 - .../codegen/clicommands/ConfigHelp.java | 16 +- .../codegen/clicommands/ListGenerators.java | 4 +- .../DefaultGeneratorRunner.java | 7 +- .../codegen/generators/DefaultGenerator.java | 61 +++--- .../codegen/generators/Generator.java | 174 ++++++++++-------- .../generators/JavaClientGenerator.java | 28 ++- .../generators/PythonClientGenerator.java | 19 +- .../generatormetadata/GeneratorMetadata.java | 44 +++++ .../openapimodels/ReportFileType.java | 6 + 10 files changed, 209 insertions(+), 160 deletions(-) create mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index 63095788e46..e44328f799e 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -12,16 +12,6 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC protected String sourceFolder = "src"; protected String apiVersion = "1.0.0"; - /** - * Configures the type of generator. - * - * @return the CodegenType for this generator - * @see org.openapijsonschematools.codegen.CodegenType - */ - public CodegenType getTag() { - return CodegenType.DOCUMENTATION; - } - /** * Configures a friendly name for the generator. This will be used by the generator * to select the library with the -g flag. diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 51d77725ec5..7aba9878b1c 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -20,6 +20,7 @@ import io.airlift.airline.Command; import io.airlift.airline.Option; import org.apache.commons.lang3.StringUtils; +import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.generators.Generator; import org.openapijsonschematools.codegen.generators.generatorloader.GeneratorLoader; @@ -295,18 +296,19 @@ private void generateMdConfigOptionsHeader(StringBuilder sb, Generator config) { } private void generateMdMetadata(StringBuilder sb, Generator config) { + GeneratorMetadata meta = config.getGeneratorMetadata(); sb.append("## METADATA").append(newline).append(newline); sb.append("| Property | Value | Notes |").append(newline); sb.append("| -------- | ----- | ----- |").append(newline); - sb.append("| generator name | "+config.getName()+" | pass this to the generate command after -g |").append(newline); - sb.append("| generator stability | "+config.getGeneratorMetadata().getStability()+" | |").append(newline); - sb.append("| generator type | "+config.getTag()+" | |").append(newline); - if (config.generatorLanguage() != null) { - sb.append("| generator language | "+config.generatorLanguage().toString()+" | |").append(newline); + sb.append("| generator name | "+meta.getName()+" | pass this to the generate command after -g |").append(newline); + sb.append("| generator stability | "+meta.getStability()+" | |").append(newline); + sb.append("| generator type | "+meta.getType()+" | |").append(newline); + if (meta.getLanguage() != null) { + sb.append("| generator language | "+meta.getLanguage().toString()+" | |").append(newline); } - if (config.generatorLanguageVersion() != null) { - sb.append("| generator language version | "+config.generatorLanguageVersion()+" | |").append(newline); + if (meta.getLanguageVersion() != null) { + sb.append("| generator language version | "+meta.getLanguageVersion()+" | |").append(newline); } sb.append("| generator default templating engine | "+config.defaultTemplatingEngine()+" | |").append(newline); sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ListGenerators.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ListGenerators.java index ec7fb412d53..db410fc35fa 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ListGenerators.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ListGenerators.java @@ -84,8 +84,8 @@ public void execute() { private void appendForType(StringBuilder sb, GeneratorType type, String typeName, List generators) { List list = generators.stream() - .filter(g -> Objects.equal(type, g.getTag())) - .sorted(Comparator.comparing(Generator::getName)) + .filter(g -> Objects.equal(type, g.getGeneratorMetadata().getType())) + .sorted() .collect(Collectors.toList()); if(!list.isEmpty()) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index a3646916cc5..140b9fd50d4 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -54,6 +54,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenList; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenTag; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenText; +import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; import org.openapijsonschematools.codegen.templating.DryRunTemplateManager; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.common.SerializerUtils; @@ -1438,7 +1439,7 @@ Map buildSupportFileBundle( } } } - bundle.put("generatorLanguageVersion", generator.generatorLanguageVersion()); + bundle.put("generatorLanguageVersion", generator.getGeneratorMetadata().getLanguageVersion()); // todo verify support and operation bundles have access to the common variables if (openAPI.getExternalDocs() != null) { @@ -1774,7 +1775,7 @@ private static String generateParameterId(Parameter parameter) { * @param files The list tracking generated files */ private void generateVersionMetadata(List files) { - String versionMetadata = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getVersionMetadataFilename(); + String versionMetadata = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.VERSION); if (generateMetadata) { File versionMetadataFile = new File(versionMetadata); try { @@ -1842,7 +1843,7 @@ private void generateFilesMetadata(List files) { } }); - String targetFile = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getFilesMetadataFilename(); + String targetFile = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.FILES); File filesFile = this.templateProcessor.writeToFile(targetFile, sb.toString().getBytes(StandardCharsets.UTF_8)); if (filesFile != null) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 654843bbfbc..1ba09e7759e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -82,6 +82,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.MapBuilder; import org.openapijsonschematools.codegen.generators.openapimodels.PairCacheKey; import org.openapijsonschematools.codegen.generators.openapimodels.ParameterCollection; +import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; import org.openapijsonschematools.codegen.generators.openapimodels.SchemaTestCase; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.common.SerializerUtils; @@ -781,16 +782,6 @@ public void setInputSpec(String inputSpec) { this.inputSpec = inputSpec; } - @Override - public String getFilesMetadataFilename() { - return filesMetadataFilename; - } - - @Override - public String getVersionMetadataFilename() { - return versionMetadataFilename; - } - public void setTemplateDir(String templateDir) { this.templateDir = templateDir; } @@ -923,6 +914,18 @@ public String getPascalCaseParameter(String basename, String jsonPath) { return getPascalCase(CodegenKeyType.PARAMETER, basename, null); } + @Override + public String getReportFilename(ReportFileType type) { + switch (type) { + case FILES: + return filesMetadataFilename; + case VERSION: + return versionMetadataFilename; + default: + return null; + } + } + /** * Returns metadata about the generator. * @@ -1009,16 +1012,16 @@ protected Stability getStability() { * returns string presentation of the example path (it's a constructor) */ public DefaultGenerator() { - GeneratorType generatorType = getTag(); - if (generatorType == null) { - generatorType = GeneratorType.OTHER; - } - + GeneratorType generatorType = GeneratorType.CLIENT; generatorMetadata = GeneratorMetadata.newBuilder() - .stability(getStability()) - .featureSet(DefaultFeatureSet) - .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", getName(), generatorType.toValue())) - .build(); + .name("DefaultGenerator") + .language(GeneratorLanguage.JAVA) + .languageVersion("17") + .type(generatorType) + .stability(getStability()) + .featureSet(DefaultFeatureSet) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", getName(), generatorType.toValue())) + .build(); defaultIncludes = new HashSet<>( Arrays.asList("double", @@ -4618,16 +4621,6 @@ public static Set getProducesInfo(final OpenAPI openAPI, final Operation return produces; } - @Override - public GeneratorType getTag() { - return null; - } - - @Override - public String getName() { - return null; - } - @Override public String getHelp() { return null; @@ -5474,16 +5467,6 @@ public String defaultTemplatingEngine() { return "mustache"; } - @Override - public GeneratorLanguage generatorLanguage() { - return GeneratorLanguage.JAVA; - } - - @Override - public String generatorLanguageVersion() { - return null; - } - /** * Used to ensure that null or Schema is returned given an input Boolean/Schema/null * This will be used in openapi 3.1.0 spec processing to ensure that Booleans become Schemas diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index db682d54d63..6cfcdfb2873 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -25,6 +25,7 @@ import org.openapijsonschematools.codegen.generators.models.VendorExtension; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRefInfo; +import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; @@ -43,17 +44,11 @@ import java.util.TreeMap; import java.util.function.Function; -public interface Generator extends OpenApiProcessor { - String getFilesMetadataFilename(); - - String getVersionMetadataFilename(); +public interface Generator extends OpenApiProcessor, Comparable { + String getReportFilename(ReportFileType type); GeneratorMetadata getGeneratorMetadata(); - GeneratorType getTag(); - - String getName(); - String getHelp(); Map additionalProperties(); @@ -80,22 +75,6 @@ public interface Generator extends OpenApiProcessor { String toModelName(String name, String jsonPath); - @Deprecated - default String getSchemaFilename(String jsonPath) { - String[] pathPieces = jsonPath.split("/"); - return getFilename(CodegenKeyType.SCHEMA, pathPieces[pathPieces.length-1], jsonPath); - } - - @Deprecated - default String getSchemaPascalCaseName(String name, @NotNull String sourceJsonPath) { - return getPascalCase(CodegenKeyType.SCHEMA, name, sourceJsonPath); - } - Set getImports(String sourceJsonPath, CodegenSchema schema, FeatureSet featureSet); - @Deprecated - default String toContentTypeFilename(String name) { - return getFilename(CodegenKeyType.CONTENT_TYPE, name, null); - } - String toParamName(String name); String escapeText(String text); @@ -150,50 +129,6 @@ default String toContentTypeFilename(String name) { String toModuleFilename(String name, String jsonPath); - @Deprecated - default String toRequestBodyFilename(String componentName, String jsonPath) { - return getFilename(CodegenKeyType.REQUEST_BODY, componentName, jsonPath); - } - - @Deprecated - default String toHeaderFilename(String componentName, String jsonPath) { - return getFilename(CodegenKeyType.HEADER, componentName, jsonPath); - } - - @Deprecated - default String toPathFilename(String path, String jsonPath) { - return getFilename(CodegenKeyType.PATH, path, jsonPath); - } - - @Deprecated - default String toParameterFilename(String baseName, String jsonPath) { - return getFilename(CodegenKeyType.PARAMETER, baseName, jsonPath); - } - - @Deprecated - default String toOperationFilename(String name, String jsonPath) { - return getFilename(CodegenKeyType.OPERATION, name, jsonPath); - } - - @Deprecated - default String toSecuritySchemeFilename(String baseName, String jsonPath) { - return getFilename(CodegenKeyType.SECURITY_SCHEME, baseName, jsonPath); - } - - @Deprecated - default String toServerFilename(String baseName, String jsonPath) { - return getFilename(CodegenKeyType.SERVER, baseName, jsonPath); - } - - @Deprecated - default String toSecurityFilename(String baseName, String jsonPath) { - return getFilename(CodegenKeyType.SECURITY, baseName, jsonPath); - } - - @Deprecated - default String getPascalCaseServer(String basename, String jsonPath) { - return getPascalCase(CodegenKeyType.SERVER, basename, jsonPath); - } String toModelImport(String refClass); TreeMap updateAllModels(TreeMap models); @@ -272,14 +207,6 @@ default String getPascalCaseServer(String basename, String jsonPath) { String defaultTemplatingEngine(); - GeneratorLanguage generatorLanguage(); - - /* - the version of the language that the generator implements - For python 3.9.0, generatorLanguageVersion would be "3.9.0" - */ - String generatorLanguageVersion(); - List getSupportedVendorExtensions(); String toRefClass(String ref, String sourceJsonPath, String expectedComponentType); @@ -290,4 +217,99 @@ default String getPascalCaseServer(String basename, String jsonPath) { String getPascalCase(CodegenKeyType type, String lastJsonPathFragment, String jsonPath); String getFilename(CodegenKeyType type, String lastJsonPathFragment, String jsonPath); + Set getImports(String sourceJsonPath, CodegenSchema schema, FeatureSet featureSet); + + default int compareTo(Generator o) { + return getGeneratorMetadata().getName().compareTo(o.getGeneratorMetadata().getName()); + } + + @Deprecated + default String getSchemaFilename(String jsonPath) { + String[] pathPieces = jsonPath.split("/"); + return getFilename(CodegenKeyType.SCHEMA, pathPieces[pathPieces.length-1], jsonPath); + } + + @Deprecated + default String getSchemaPascalCaseName(String name, @NotNull String sourceJsonPath) { + return getPascalCase(CodegenKeyType.SCHEMA, name, sourceJsonPath); + } + @Deprecated + default String toContentTypeFilename(String name) { + return getFilename(CodegenKeyType.CONTENT_TYPE, name, null); + } + + @Deprecated + default String toRequestBodyFilename(String componentName, String jsonPath) { + return getFilename(CodegenKeyType.REQUEST_BODY, componentName, jsonPath); + } + + @Deprecated + default String toHeaderFilename(String componentName, String jsonPath) { + return getFilename(CodegenKeyType.HEADER, componentName, jsonPath); + } + + @Deprecated + default String toPathFilename(String path, String jsonPath) { + return getFilename(CodegenKeyType.PATH, path, jsonPath); + } + + @Deprecated + default String toParameterFilename(String baseName, String jsonPath) { + return getFilename(CodegenKeyType.PARAMETER, baseName, jsonPath); + } + + @Deprecated + default String toOperationFilename(String name, String jsonPath) { + return getFilename(CodegenKeyType.OPERATION, name, jsonPath); + } + + @Deprecated + default String toSecuritySchemeFilename(String baseName, String jsonPath) { + return getFilename(CodegenKeyType.SECURITY_SCHEME, baseName, jsonPath); + } + + @Deprecated + default String toServerFilename(String baseName, String jsonPath) { + return getFilename(CodegenKeyType.SERVER, baseName, jsonPath); + } + + @Deprecated + default String toSecurityFilename(String baseName, String jsonPath) { + return getFilename(CodegenKeyType.SECURITY, baseName, jsonPath); + } + + @Deprecated + default String getPascalCaseServer(String basename, String jsonPath) { + return getPascalCase(CodegenKeyType.SERVER, basename, jsonPath); + } + + @Deprecated + default String getFilesMetadataFilename() { + return getReportFilename(ReportFileType.FILES); + } + + @Deprecated + default String getVersionMetadataFilename() { + return getReportFilename(ReportFileType.VERSION); + } + + @Deprecated + default String getName() { + return getGeneratorMetadata().getName(); + } + + @Deprecated + default GeneratorType getTag() { + return getGeneratorMetadata().getType(); + } + + @Deprecated + default GeneratorLanguage generatorLanguage() { + return getGeneratorMetadata().getLanguage(); + } + + @Deprecated + default String generatorLanguageVersion() { + return getGeneratorMetadata().getLanguageVersion(); + } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 05f7fd7e5e5..5798eb0cb74 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -30,6 +30,8 @@ import org.apache.commons.lang3.StringUtils; import org.openapijsonschematools.codegen.common.ModelUtils; import org.openapijsonschematools.codegen.generators.generatormetadata.FeatureSet; +import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; +import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; import org.openapijsonschematools.codegen.generators.generatormetadata.Stability; import org.openapijsonschematools.codegen.generators.generatormetadata.features.ComponentsFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.GlobalFeature; @@ -149,11 +151,6 @@ protected void updateServersFilepath(String[] pathPieces) { } } - @Override - public String generatorLanguageVersion() { - return "17"; - } - public JavaClientGenerator() { super(); headersSchemaFragment = "HeadersSchema"; @@ -332,6 +329,17 @@ public JavaClientGenerator() { SchemaFeature.UniqueItems ) ); + String generatorName = "java"; + GeneratorType generatorType = GeneratorType.CLIENT; + generatorMetadata = GeneratorMetadata.newBuilder() + .name(generatorName) + .language(GeneratorLanguage.JAVA) + .languageVersion("17") + .type(generatorType) + .stability(getStability()) + .featureSet(getFeatureSet()) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) + .build(); outputFolder = "generated-code" + File.separator + "java"; embeddedTemplateDir = templateDir = "java"; @@ -353,16 +361,6 @@ public JavaClientGenerator() { ); } - @Override - public GeneratorType getTag() { - return GeneratorType.CLIENT; - } - - @Override - public String getName() { - return "java"; - } - @Override public String getHelp() { return String.join("
", diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index d6a70222a17..f5ea92d1938 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -294,6 +294,17 @@ public PythonClientGenerator() { OperationFeature.Servers ) ); + String generatorName = "python"; + GeneratorType generatorType = GeneratorType.CLIENT; + generatorMetadata = GeneratorMetadata.newBuilder() + .name(generatorName) + .language(GeneratorLanguage.PYTHON) + .languageVersion(">=3.8") + .type(generatorType) + .stability(getStability()) + .featureSet(getFeatureSet()) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) + .build(); modelPackage = "components.schema"; apiPackage = "apis"; @@ -1752,11 +1763,6 @@ protected Map getModelNameToSchemaCache() { return modelNameToSchemaCache; } - @Override - public GeneratorType getTag() { - return GeneratorType.CLIENT; - } - @Override public String toResponseModuleName(String componentName, String jsonPath) { String[] pathPieces = jsonPath.split("/"); @@ -1803,9 +1809,6 @@ public String defaultTemplatingEngine() { return "handlebars"; } - @Override - public String generatorLanguageVersion() { return ">=3.8"; } - @Override public void preprocessOpenAPI(OpenAPI openAPI) { String originalSpecVersion; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java index 2741975c181..f45fe4c191a 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java @@ -24,6 +24,10 @@ */ @SuppressWarnings("WeakerAccess") public class GeneratorMetadata { + private String name; + private GeneratorLanguage language; + private String languageVersion; + private GeneratorType type; private Stability stability; private Map libraryFeatures; private FeatureSet featureSet; @@ -31,6 +35,10 @@ public class GeneratorMetadata { private GeneratorMetadata(Builder builder) { if (builder != null) { + name = builder.name; + language = builder.language; + languageVersion = builder.languageVersion; + type = builder.type; stability = builder.stability; generationMessage = builder.generationMessage; libraryFeatures = builder.libraryFeatures; @@ -50,6 +58,10 @@ public static Builder newBuilder() { public static Builder newBuilder(GeneratorMetadata copy) { Builder builder = new Builder(); if (copy != null) { + builder.name = copy.getName(); + builder.language = copy.getLanguage(); + builder.languageVersion = copy.getLanguageVersion(); + builder.type = copy.getType(); builder.stability = copy.getStability(); builder.generationMessage = copy.getGenerationMessage(); builder.libraryFeatures = copy.getLibraryFeatures(); @@ -58,6 +70,14 @@ public static Builder newBuilder(GeneratorMetadata copy) { return builder; } + public String getName() { return name; } + + public GeneratorType getType() { return type; } + + public GeneratorLanguage getLanguage() { return language; } + + public String getLanguageVersion() { return languageVersion; } + /** * Returns a message which can be displayed during generation. * @@ -98,6 +118,10 @@ public Map getLibraryFeatures() { * {@code GeneratorMetadata} builder static inner class. */ public static final class Builder { + private String name; + private GeneratorLanguage language; + private String languageVersion; + private GeneratorType type; private Stability stability; private String generationMessage; private FeatureSet featureSet = FeatureSet.UNSPECIFIED; @@ -106,6 +130,26 @@ public static final class Builder { private Builder() { } + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder type(GeneratorType type) { + this.type = type; + return this; + } + + public Builder language(GeneratorLanguage language) { + this.language = language; + return this; + } + + public Builder languageVersion(String languageVersion) { + this.languageVersion = languageVersion; + return this; + } + /** * Sets the {@code stability} and returns a reference to this Builder so that the methods can be chained together. * diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java new file mode 100644 index 00000000000..174326a4f66 --- /dev/null +++ b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java @@ -0,0 +1,6 @@ +package org.openapijsonschematools.codegen.generators.openapimodels; + +public enum ReportFileType { + FILES, + VERSION +} From 41916de548f3967b97a0e272548f68fc118033db Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sat, 13 Apr 2024 15:42:44 -0700 Subject: [PATCH 03/44] Deprecates toResponseModuleName --- .../codegen/clicommands/ConfigHelp.java | 2 +- .../codegen/generators/DefaultGenerator.java | 20 ++- .../codegen/generators/Generator.java | 7 +- .../generators/JavaClientGenerator.java | 114 +++++++++--------- .../generators/PythonClientGenerator.java | 93 +++++++------- .../generatormetadata/GeneratorMetadata.java | 11 ++ 6 files changed, 123 insertions(+), 124 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 7aba9878b1c..0bd117cbd95 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -311,7 +311,7 @@ private void generateMdMetadata(StringBuilder sb, Generator config) { sb.append("| generator language version | "+meta.getLanguageVersion()+" | |").append(newline); } sb.append("| generator default templating engine | "+config.defaultTemplatingEngine()+" | |").append(newline); - sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline); + sb.append("| helpTxt | "+meta.getHelpTxt()+" | |").append(newline); sb.append(newline); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 1ba09e7759e..da18c7bc4c6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -737,7 +737,8 @@ public HashMap return jsonPathTestTemplateFiles; } - public String toResponseModuleName(String componentName, String jsonPath) { return toModuleFilename(componentName, jsonPath); } + @Deprecated + public String toResponseModuleName(String componentName, String jsonPath) { return getFilename(CodegenKeyType.RESPONSE, componentName, jsonPath); } @Deprecated public String getPascalCaseResponse(String componentName, String jsonPath) { return getPascalCase(CodegenKeyType.RESPONSE, componentName, jsonPath); } @@ -1021,6 +1022,7 @@ public DefaultGenerator() { .stability(getStability()) .featureSet(DefaultFeatureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", getName(), generatorType.toValue())) + .helpTxt("todo replace help text") .build(); defaultIncludes = new HashSet<>( @@ -3398,6 +3400,7 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri case SECURITY: case SECURITY_SCHEME: case REQUEST_BODY: + case RESPONSE: return toModuleFilename(lastJsonPathFragment, jsonPath); default: return null; @@ -3872,7 +3875,7 @@ protected void updateComponentsFilepath(String[] pathPieces) { } } else if (pathPieces[2].equals("responses")) { // #/components/responses/SuccessWithJsonApiResponse/headers - pathPieces[3] = toResponseModuleName(pathPieces[3], jsonPath); + pathPieces[3] = getFilename(CodegenKeyType.RESPONSE, pathPieces[3], jsonPath); if (pathPieces.length == 4) { // #/components/responses/SuccessWithJsonApiResponse return; @@ -4000,11 +4003,11 @@ private void updatePathsFilepath(String[] pathPieces) { } else if (pathPieces[4].equals("responses")) { if (pathPieces.length == 5) { // #/paths/user_login/get/responses -> length 5 - pathPieces[4] = toResponseModuleName(pathPieces[4], jsonPath); + pathPieces[4] = getFilename(CodegenKeyType.RESPONSE, pathPieces[4], jsonPath); return; } // #/paths/user_login/get/responses/200 -> 200 -> response_200 -> length 6 - pathPieces[5] = toResponseModuleName(pathPieces[5], jsonPath); + pathPieces[5] = getFilename(CodegenKeyType.RESPONSE, pathPieces[5], jsonPath); if (pathPieces.length == 6) { // #/paths/user_login/get/responses/200 return; @@ -4621,11 +4624,6 @@ public static Set getProducesInfo(final OpenAPI openAPI, final Operation return produces; } - @Override - public String getHelp() { - return null; - } - protected LinkedHashMap getContent(Content content, String sourceJsonPath) { if (content == null) { return null; @@ -4711,7 +4709,7 @@ protected String toRefModule(String ref, String sourceJsonPath, String expectedC case "requestBodies": return getFilename(CodegenKeyType.REQUEST_BODY, refPieces[3], ref); case "responses": - return toResponseModuleName(refPieces[3], ref); + return getFilename(CodegenKeyType.RESPONSE, refPieces[3], ref); case "headers": return getFilename(CodegenKeyType.HEADER, refPieces[3], ref); case "parameters": @@ -4971,7 +4969,7 @@ public CodegenKey getKey(String key, String keyType, String sourceJsonPath) { case "responses": usedKey = escapeUnsafeCharacters(key); isValid = isValid(usedKey); - snakeCaseName = toResponseModuleName(usedKey, sourceJsonPath); + snakeCaseName = getFilename(CodegenKeyType.RESPONSE, usedKey, sourceJsonPath); pascalCaseName = getPascalCase(CodegenKeyType.RESPONSE, usedKey, sourceJsonPath); break; case "securitySchemes": diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 6cfcdfb2873..8d413a814df 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -49,8 +49,6 @@ public interface Generator extends OpenApiProcessor, Comparable { GeneratorMetadata getGeneratorMetadata(); - String getHelp(); - Map additionalProperties(); Map vendorExtensions(); @@ -312,4 +310,9 @@ default GeneratorLanguage generatorLanguage() { default String generatorLanguageVersion() { return getGeneratorMetadata().getLanguageVersion(); } + + @Deprecated + default String getHelp() { + return getGeneratorMetadata().getHelpTxt(); + } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 5798eb0cb74..bbd886e584a 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -339,6 +339,41 @@ public JavaClientGenerator() { .stability(getStability()) .featureSet(getFeatureSet()) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) + .helpTxt( + String.join("
", + "Generates a Java client library", + "", + "Features in this generator:", + "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", + "- Very thorough documentation generated in the style of javadocs", + "- Input types constrained for a Schema in SomeSchema.validate", + " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", + "- Immutable List output classes generated and returned by validate for List<?> input", + "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", + "- Strictly typed list input can be instantiated in client code using generated ListBuilders", + "- Strictly typed map input can be instantiated in client code using generated MapBuilders", + " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", + "- Run time type checking and validation when", + " - validating schema payloads", + " - instantiating List output class (validation run)", + " - instantiating Map output class (validation run)", + " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", + "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", + "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", + " - ensuring that null pointer exceptions will not happen", + "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", + " - component schema names", + " - schema property names (a fallback setter is written in the MapBuilder)", + "- Generated interfaces are largely consistent with the python code", + "- Openapi spec inline schemas supported at any depth in any location", + "- Format support for: int32, int64, float, double, date, datetime, uuid", + "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", + "- enum types are generated for enums of type string/integer/number/boolean/null", + "- String transmission of numbers supported with type: string, format: number" + ) + ) .build(); outputFolder = "generated-code" + File.separator + "java"; @@ -361,43 +396,6 @@ public JavaClientGenerator() { ); } - @Override - public String getHelp() { - return String.join("
", - "Generates a Java client library", - "", - "Features in this generator:", - "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", - "- Very thorough documentation generated in the style of javadocs", - "- Input types constrained for a Schema in SomeSchema.validate", - " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", - "- Immutable List output classes generated and returned by validate for List<?> input", - "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", - "- Strictly typed list input can be instantiated in client code using generated ListBuilders", - "- Strictly typed map input can be instantiated in client code using generated MapBuilders", - " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", - "- Run time type checking and validation when", - " - validating schema payloads", - " - instantiating List output class (validation run)", - " - instantiating Map output class (validation run)", - " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", - "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", - "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", - " - ensuring that null pointer exceptions will not happen", - "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", - " - component schema names", - " - schema property names (a fallback setter is written in the MapBuilder)", - "- Generated interfaces are largely consistent with the python code", - "- Openapi spec inline schemas supported at any depth in any location", - "- Format support for: int32, int64, float, double, date, datetime, uuid", - "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", - "- enum types are generated for enums of type string/integer/number/boolean/null", - "- String transmission of numbers supported with type: string, format: number" - ); - } - public String packagePath() { return "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar + packageName.replace('.', File.separatorChar); } @@ -1085,29 +1083,6 @@ public String toModelFilename(String name, String jsonPath) { return toModelName(name, jsonPath); } - @Override - public String toResponseModuleName(String componentName, String jsonPath) { - String[] pathPieces = jsonPath.split("/"); - if (jsonPath.startsWith("#/components/responses/")) { - if (pathPieces.length == 4) { - // #/components/responses/SomeResponse - return toModelName(componentName, null); - } - return toModuleFilename(componentName, jsonPath); - } - String prefix = getPathClassNamePrefix(jsonPath); - switch (pathPieces.length) { - case 5: - // #/paths/somePath/verb/responses - return prefix + "Responses"; - case 6: - // #/paths/somePath/verb/responses/200 - return prefix + "Code"+ componentName + "Response"; - default: - return toModuleFilename("code"+componentName+"response", null); - } - } - @Override @SuppressWarnings("static-method") public String sanitizeName(String name, String filterOutRegex) { @@ -2666,6 +2641,25 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri // #/paths/somePath/verb/security/0 String prefix = getPathClassNamePrefix(jsonPath); return prefix + "SecurityRequirementObject"+pathPieces[pathPieces.length-1]; + case RESPONSE: + if (jsonPath.startsWith("#/components/responses/")) { + if (pathPieces.length == 4) { + // #/components/responses/SomeResponse + return toModelName(lastJsonPathFragment, null); + } + return toModuleFilename(lastJsonPathFragment, jsonPath); + } + String clsNamePrefix = getPathClassNamePrefix(jsonPath); + switch (pathPieces.length) { + case 5: + // #/paths/somePath/verb/responses + return clsNamePrefix + "Responses"; + case 6: + // #/paths/somePath/verb/responses/200 + return clsNamePrefix + "Code"+ lastJsonPathFragment + "Response"; + default: + return toModuleFilename("code"+lastJsonPathFragment+"response", null); + } default: return null; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index f5ea92d1938..fd9d2763512 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -304,6 +304,28 @@ public PythonClientGenerator() { .stability(getStability()) .featureSet(getFeatureSet()) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) + .helpTxt( + String.join("
", + "Generates a Python client library", + "", + "Features in this generator:", + "- type hints on endpoints and model creation", + "- model parameter names use the spec defined keys and cases", + "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", + "- endpoint parameter names use the spec defined keys and cases", + "- inline schemas are supported at any location including composition", + "- multiple content types supported in request body and response bodies", + "- run time type checking + json schema validation", + "- json schema keyword validation may be selectively disabled with SchemaConfiguration", + "- enums of type string/integer/boolean typed using typing.Literal", + "- mypy static type checking run on generated sample", + "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", + "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", + "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", + "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", + "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" + ) + ) .build(); modelPackage = "components.schema"; @@ -920,29 +942,6 @@ public String getName() { return "python"; } - @Override - public String getHelp() { - return String.join("
", - "Generates a Python client library", - "", - "Features in this generator:", - "- type hints on endpoints and model creation", - "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", - "- endpoint parameter names use the spec defined keys and cases", - "- inline schemas are supported at any location including composition", - "- multiple content types supported in request body and response bodies", - "- run time type checking + json schema validation", - "- json schema keyword validation may be selectively disabled with SchemaConfiguration", - "- enums of type string/integer/boolean typed using typing.Literal", - "- mypy static type checking run on generated sample", - "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", - "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", - "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", - "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", - "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor"); - } - public String pythonDate(Object dateValue) { String strValue; if (dateValue instanceof OffsetDateTime) { @@ -1763,28 +1762,6 @@ protected Map getModelNameToSchemaCache() { return modelNameToSchemaCache; } - @Override - public String toResponseModuleName(String componentName, String jsonPath) { - String[] pathPieces = jsonPath.split("/"); - if (jsonPath.startsWith("#/components/responses")) { - if (pathPieces.length == 3) { - return "responses"; - }// #/components/responses/SomeResponse - // #/components/responses/SomeResponse/content/schema - String suffix = toModuleFilename(componentName, jsonPath); - String spacer = ""; - if (!suffix.startsWith("_")) { - spacer = "_"; - } - return "response" + spacer + suffix; - } - if (pathPieces.length == 5) {// #/paths/somePath/verb/responses - return "responses"; - }// #/paths/somePath/verb/responses/200 - // #/paths/somePath/verb/responses/200/content/schema - return "response_" + componentName.toLowerCase(Locale.ROOT); - } - public void setUseNose(String val) { this.useNose = Boolean.parseBoolean(val); } @@ -1841,10 +1818,10 @@ protected String getRefClassWithModule(String ref, String sourceJsonPath) { @Override public String getFilename(CodegenKeyType type, String lastJsonPathFragment, String jsonPath) { + String[] pathPieces = jsonPath.split("/"); switch(type) { case SCHEMA: - String[] pieces = jsonPath.split("/"); - String name = pieces[pieces.length - 1]; + String name = pathPieces[pathPieces.length - 1]; if (name.equals("Headers") && jsonPath.contains("/responses/")) { // synthetic response headers jsonPath return "header_parameters"; @@ -1860,8 +1837,7 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri case OPERATION: return lastJsonPathFragment; case PARAMETER: - String[] paramPathPieces = jsonPath.split("/"); - if (operationVerbs.contains(paramPathPieces[3]) && paramPathPieces.length == 5) { + if (operationVerbs.contains(pathPieces[3]) && pathPieces.length == 5) { // #/paths/somePath/verb/parameters return "parameters"; } @@ -1877,7 +1853,6 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri case PATH: return toModuleFilename(lastJsonPathFragment, jsonPath); case HEADER: - String[] pathPieces = jsonPath.split("/"); if ((pathPieces.length == 5 || pathPieces.length == 7) && lastJsonPathFragment.equals("headers")) { // #/components/responses/SomeResponse/headers // #/paths/somePath/verb/responses/200/headers @@ -1896,6 +1871,24 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri return "security"; } return "security_requirement_object_" + lastJsonPathFragment; + case RESPONSE: + if (jsonPath.startsWith("#/components/responses")) { + if (pathPieces.length == 3) { + return "responses"; + }// #/components/responses/SomeResponse + // #/components/responses/SomeResponse/content/schema + String suffix = toModuleFilename(lastJsonPathFragment, jsonPath); + String spacer = ""; + if (!suffix.startsWith("_")) { + spacer = "_"; + } + return "response" + spacer + suffix; + } + if (pathPieces.length == 5) {// #/paths/somePath/verb/responses + return "responses"; + }// #/paths/somePath/verb/responses/200 + // #/paths/somePath/verb/responses/200/content/schema + return "response_" + lastJsonPathFragment.toLowerCase(Locale.ROOT); default: return null; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java index f45fe4c191a..fa5a1e27f5e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java @@ -32,6 +32,7 @@ public class GeneratorMetadata { private Map libraryFeatures; private FeatureSet featureSet; private String generationMessage; + private String helpTxt; private GeneratorMetadata(Builder builder) { if (builder != null) { @@ -43,6 +44,7 @@ private GeneratorMetadata(Builder builder) { generationMessage = builder.generationMessage; libraryFeatures = builder.libraryFeatures; featureSet = builder.featureSet; + helpTxt = builder.helpTxt; } } @@ -66,6 +68,7 @@ public static Builder newBuilder(GeneratorMetadata copy) { builder.generationMessage = copy.getGenerationMessage(); builder.libraryFeatures = copy.getLibraryFeatures(); builder.featureSet = copy.getFeatureSet(); + builder.helpTxt = copy.getHelpTxt(); } return builder; } @@ -114,6 +117,8 @@ public Map getLibraryFeatures() { return libraryFeatures; } + public String getHelpTxt() { return helpTxt; } + /** * {@code GeneratorMetadata} builder static inner class. */ @@ -126,6 +131,7 @@ public static final class Builder { private String generationMessage; private FeatureSet featureSet = FeatureSet.UNSPECIFIED; private Map libraryFeatures = new HashMap<>(); + private String helpTxt; private Builder() { } @@ -198,6 +204,11 @@ public Builder generationMessage(String generationMessage) { return this; } + public Builder helpTxt(String helpTxt) { + this.helpTxt = helpTxt; + return this; + } + /** * Returns a {@code GeneratorMetadata} built from the parameters previously set. * From 7aa734c33b3d53a732a036181f090e9280cae936 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sat, 13 Apr 2024 16:01:26 -0700 Subject: [PATCH 04/44] Deprecates toParamName --- .../codegen/generators/DefaultGenerator.java | 58 +++---------- .../codegen/generators/Generator.java | 12 ++- .../generators/JavaClientGenerator.java | 16 +--- .../generators/PythonClientGenerator.java | 11 +-- .../templating/mustache/CamelCaseLambda.java | 81 ------------------- .../mustache/CamelCaseLambdaTest.java | 72 ----------------- .../mustache/PascalCaseLambdaTest.java | 75 ----------------- 7 files changed, 28 insertions(+), 297 deletions(-) delete mode 100644 src/main/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambda.java delete mode 100644 src/test/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambdaTest.java delete mode 100644 src/test/java/org/openapijsonschematools/codegen/templating/mustache/PascalCaseLambdaTest.java diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index da18c7bc4c6..52af95ec426 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -87,7 +87,6 @@ import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.common.SerializerUtils; import org.openapijsonschematools.codegen.templating.TemplatingEngineLoader; -import org.openapijsonschematools.codegen.templating.mustache.CamelCaseLambda; import org.openapijsonschematools.codegen.templating.mustache.IndentedLambda; import org.openapijsonschematools.codegen.templating.mustache.LowercaseLambda; import org.openapijsonschematools.codegen.templating.mustache.SnakecaseLambda; @@ -412,8 +411,6 @@ protected ImmutableMap.Builder addMustacheLambdas() { .put("uppercase", new UppercaseLambda()) .put("snakecase", new SnakecaseLambda()) .put("titlecase", new TitlecaseLambda()) - .put("camelcase", new CamelCaseLambda(true).generator(this)) - .put("pascalcase", new CamelCaseLambda(false).generator(this)) .put("indented", new IndentedLambda()) .put("indented_8", new IndentedLambda(8, " ")) .put("indented_12", new IndentedLambda(12, " ")) @@ -953,6 +950,7 @@ public String toVarName(final String name) { return name; } + @Deprecated /** * Return the parameter name by removing invalid characters and proper escaping if * it's a reserved word. @@ -962,7 +960,13 @@ public String toVarName(final String name) { */ @Override public String toParamName(String name) { - name = removeNonNameElementToCamelCase(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. + String result = Arrays.stream(name.split("[-_:;#" + removeOperationIdPrefixDelimiter + "]")) + .map(StringUtils::capitalize) + .collect(Collectors.joining("")); + if (!result.isEmpty()) { + result = result.substring(0, 1).toLowerCase(Locale.ROOT) + result.substring(1); + } + name = result; // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. if (reservedWords.contains(name)) { return escapeReservedWord(name); } else if (name.chars().anyMatch(character -> specialCharReplacements.containsKey(String.valueOf((char) character)))) { @@ -1001,10 +1005,6 @@ public String toModelImport(String refClass) { } } - protected Stability getStability() { - return Stability.STABLE; - } - /** * Default constructor. * This method will map between OAS type and language-specified type, as well as mapping @@ -1014,14 +1014,15 @@ protected Stability getStability() { */ public DefaultGenerator() { GeneratorType generatorType = GeneratorType.CLIENT; + String name = "DefaultGenerator"; generatorMetadata = GeneratorMetadata.newBuilder() - .name("DefaultGenerator") + .name(name) .language(GeneratorLanguage.JAVA) .languageVersion("17") .type(generatorType) - .stability(getStability()) + .stability(Stability.EXPERIMENTAL) .featureSet(DefaultFeatureSet) - .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", getName(), generatorType.toValue())) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", name, generatorType.toValue())) .helpTxt("todo replace help text") .build(); @@ -3773,34 +3774,6 @@ protected LinkedHashMapWithContext getOptionalProperties(LinkedHa return optionalProperties; } - /** - * Remove characters not suitable for variable or method name from the input and camel case it - * - * @param name string to be camel case - * @return camel case string - */ - @SuppressWarnings("static-method") - public String removeNonNameElementToCamelCase(String name) { - return removeNonNameElementToCamelCase(name, "[-_:;#" + removeOperationIdPrefixDelimiter + "]"); - } - - /** - * Remove characters that is not good to be included in method name from the input and camel case it - * - * @param name string to be camel case - * @param nonNameElementPattern a regex pattern of the characters that is not good to be included in name - * @return camel case string - */ - protected String removeNonNameElementToCamelCase(final String name, final String nonNameElementPattern) { - String result = Arrays.stream(name.split(nonNameElementPattern)) - .map(StringUtils::capitalize) - .collect(Collectors.joining("")); - if (!result.isEmpty()) { - result = result.substring(0, 1).toLowerCase(Locale.ROOT) + result.substring(1); - } - return result; - } - @Override public String modelPackagePathFragment() { return modelPackage.replace('.', File.separatorChar); @@ -5363,11 +5336,6 @@ public void setStrictSpecBehavior(final boolean strictSpecBehavior) { this.strictSpecBehavior = strictSpecBehavior; } - @Override - public FeatureSet getFeatureSet() { - return this.generatorMetadata.getFeatureSet(); - } - /** * Get the boolean value indicating whether to remove enum value prefixes */ @@ -5387,7 +5355,7 @@ public void setRemoveEnumValuePrefix(final boolean removeEnumValuePrefix) { } protected void modifyFeatureSet(Consumer processor) { - FeatureSet.Builder builder = getFeatureSet().modify(); + FeatureSet.Builder builder = getGeneratorMetadata().getFeatureSet().modify(); processor.accept(builder); this.generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .featureSet(builder.build()).build(); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 8d413a814df..e57f24f6e2f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -73,8 +73,6 @@ public interface Generator extends OpenApiProcessor, Comparable { String toModelName(String name, String jsonPath); - String toParamName(String name); - String escapeText(String text); String escapeTextWhileAllowingNewLines(String text); @@ -195,8 +193,6 @@ public interface Generator extends OpenApiProcessor, Comparable { void setStrictSpecBehavior(boolean strictSpecBehavior); - FeatureSet getFeatureSet(); - CodegenPatternInfo getPatternInfo(String pattern); boolean isRemoveEnumValuePrefix(); @@ -315,4 +311,12 @@ default String generatorLanguageVersion() { default String getHelp() { return getGeneratorMetadata().getHelpTxt(); } + + @Deprecated + String toParamName(String name); + + @Deprecated + default FeatureSet getFeatureSet() { + return getGeneratorMetadata().getFeatureSet(); + } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index bbd886e584a..296c8d1b2d2 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -329,6 +329,7 @@ public JavaClientGenerator() { SchemaFeature.UniqueItems ) ); + FeatureSet featureSet = getGeneratorMetadata().getFeatureSet(); String generatorName = "java"; GeneratorType generatorType = GeneratorType.CLIENT; generatorMetadata = GeneratorMetadata.newBuilder() @@ -336,8 +337,8 @@ public JavaClientGenerator() { .language(GeneratorLanguage.JAVA) .languageVersion("17") .type(generatorType) - .stability(getStability()) - .featureSet(getFeatureSet()) + .stability(Stability.STABLE) + .featureSet(featureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) .helpTxt( String.join("
", @@ -2830,17 +2831,6 @@ private boolean startsWithTwoUppercaseLetters(String name) { return startsWithTwoUppercaseLetters; } - @Override - public String toParamName(String name) { - // to avoid conflicts with 'callback' parameter for async call - if ("callback".equals(name)) { - return "paramCallback"; - } - - // should be the same as variable name - return toVarName(name); - } - @Override public String toModelName(final String name, String jsonPath) { // We need to check if schema-mapping has a different model for this class, so we use it diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index fd9d2763512..8b5730919f5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -25,6 +25,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; +import org.openapijsonschematools.codegen.generators.generatormetadata.FeatureSet; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.common.CodegenConstants; @@ -294,6 +295,7 @@ public PythonClientGenerator() { OperationFeature.Servers ) ); + FeatureSet featureSet = getGeneratorMetadata().getFeatureSet(); String generatorName = "python"; GeneratorType generatorType = GeneratorType.CLIENT; generatorMetadata = GeneratorMetadata.newBuilder() @@ -301,8 +303,8 @@ public PythonClientGenerator() { .language(GeneratorLanguage.PYTHON) .languageVersion(">=3.8") .type(generatorType) - .stability(getStability()) - .featureSet(getFeatureSet()) + .stability(Stability.STABLE) + .featureSet(featureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) .helpTxt( String.join("
", @@ -1894,11 +1896,6 @@ public String getFilename(CodegenKeyType type, String lastJsonPathFragment, Stri } } - @Override - public String toParamName(String basename) { - return getFilename(CodegenKeyType.PARAMETER, basename, null); - } - private String toSchemaRefClass(String ref, String sourceJsonPath) { String[] refPieces = ref.split("/"); if (ref.equals(sourceJsonPath)) { diff --git a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambda.java b/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambda.java deleted file mode 100644 index 16df641220b..00000000000 --- a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambda.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapijsonschematools.codegen.templating.mustache; - -import com.samskivert.mustache.Mustache; -import com.samskivert.mustache.Template; -import org.openapijsonschematools.codegen.generators.Generator; - -import java.io.IOException; -import java.io.Writer; - -import static org.openapijsonschematools.codegen.common.StringUtils.camelize; - -/** - * Converts text in a fragment to camelCase. - * - * Register: - *
- * additionalProperties.put("camelcase", new CamelCaseLambda());
- * 
- * - * Use: - *
- * {{#camelcase}}{{name}}{{/camelcase}}
- * 
- */ -public class CamelCaseLambda implements Mustache.Lambda { - private Generator generator = null; - private Boolean escapeParam = false; - private Boolean lowercaseFirstLetter = true; - - public CamelCaseLambda(boolean lowercaseFirstLetter) { - this.lowercaseFirstLetter = lowercaseFirstLetter; - } - - public CamelCaseLambda() {} - - public CamelCaseLambda generator(final Generator generator) { - this.generator = generator; - return this; - } - - public CamelCaseLambda escapeAsParamName(final Boolean escape) { - this.escapeParam = escape; - return this; - } - - @Override - public void execute(Template.Fragment fragment, Writer writer) throws IOException { - String text = camelize(fragment.execute().replace(" ", "_"), lowercaseFirstLetter); - if (generator != null) { - text = generator.sanitizeName(text); - if (generator.reservedWords().contains(text)) { - // Escaping must be done *after* camelize, because generators may escape using characters removed by camelize function. - text = generator.escapeReservedWord(text); - } - - if (escapeParam) { - // NOTE: many generators call escapeReservedWord in toParamName, but we can't assume that's always the case. - // Here, we'll have to accept that we may be duplicating some work. - text = generator.toParamName(text); - } - } - writer.write(text); - } -} diff --git a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambdaTest.java b/src/test/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambdaTest.java deleted file mode 100644 index b545e9733cc..00000000000 --- a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/CamelCaseLambdaTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.openapijsonschematools.codegen.templating.mustache; - -import static org.mockito.AdditionalAnswers.returnsFirstArg; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.openapijsonschematools.codegen.generators.Generator; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -public class CamelCaseLambdaTest extends LambdaTest { - - @Mock - Generator generator; - - @BeforeMethod - public void setup() { - MockitoAnnotations.initMocks(this); - } - - @Test - public void camelCaseTest() { - // Given - Map ctx = context("camelcase", new CamelCaseLambda()); - - // When & Then - test("inputText", "{{#camelcase}}Input-text{{/camelcase}}", ctx); - } - - @Test - public void camelCaseSpaceTest() { - // Given - Map ctx = context("camelcase", new CamelCaseLambda()); - - // When & Then - test("inputTextApi", "{{#camelcase}}Input text api{{/camelcase}}", ctx); - } - - @Test - public void camelCaseReservedWordTest() { - // Given - Map ctx = context("camelcase", new CamelCaseLambda().generator(generator)); - - when(generator.sanitizeName(anyString())).then(returnsFirstArg()); - when(generator.reservedWords()).thenReturn(new HashSet(Arrays.asList("reservedWord"))); - when(generator.escapeReservedWord("reservedWord")).thenReturn("escapedReservedWord"); - - // When & Then - test("escapedReservedWord", "{{#camelcase}}reserved-word{{/camelcase}}", ctx); - } - - @Test - public void camelCaseEscapeParamTest() { - // Given - Map ctx = context("camelcase", new CamelCaseLambda() - .generator(generator).escapeAsParamName(true)); - - when(generator.sanitizeName(anyString())).then(returnsFirstArg()); - when(generator.reservedWords()).thenReturn(new HashSet()); - when(generator.toParamName("inputText")).thenReturn("inputTextAsParam"); - - // When & Then - test("inputTextAsParam", "{{#camelcase}}Input_text{{/camelcase}}", ctx); - } - -} diff --git a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/PascalCaseLambdaTest.java b/src/test/java/org/openapijsonschematools/codegen/templating/mustache/PascalCaseLambdaTest.java deleted file mode 100644 index 0e2db6b100a..00000000000 --- a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/PascalCaseLambdaTest.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.openapijsonschematools.codegen.templating.mustache; - -import static org.mockito.AdditionalAnswers.returnsFirstArg; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; - -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.openapijsonschematools.codegen.generators.Generator; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -public class PascalCaseLambdaTest extends LambdaTest { - - @Mock - Generator generator; - - @BeforeMethod - public void setup() { - MockitoAnnotations.initMocks(this); - } - - @Test - public void pascalCaseTest() { - // Given - Map ctx = context("pascalcase", new CamelCaseLambda(false)); - - // When & Then - test("InputText", "{{#pascalcase}}Input-text{{/pascalcase}}", ctx); - test("InputText", "{{#pascalcase}}Input_text{{/pascalcase}}", ctx); - test("", "{{#pascalcase}}{{/pascalcase}}", ctx); - - } - - @Test - public void pascalCaseSpaceTest() { - // Given - Map ctx = context("pascalcase", new CamelCaseLambda(false)); - - // When & Then - test("InputTextApi", "{{#pascalcase}}Input text api{{/pascalcase}}", ctx); - } - - @Test - public void pascalCaseReservedWordTest() { - // Given - Map ctx = context("pascalcase", new CamelCaseLambda(false).generator(generator)); - - when(generator.sanitizeName(anyString())).then(returnsFirstArg()); - when(generator.reservedWords()).thenReturn(new HashSet(Arrays.asList("ReservedWord"))); - when(generator.escapeReservedWord("ReservedWord")).thenReturn("escapedReservedWord"); - - // When & Then - test("escapedReservedWord", "{{#pascalcase}}reserved-word{{/pascalcase}}", ctx); - } - - @Test - public void pascalCaseEscapeParamTest() { - // Given - Map ctx = context("pascalcase", new CamelCaseLambda(false) - .generator(generator).escapeAsParamName(true)); - - when(generator.sanitizeName(anyString())).then(returnsFirstArg()); - when(generator.reservedWords()).thenReturn(new HashSet()); - when(generator.toParamName("InputText")).thenReturn("inputTextAsParam"); - - // When & Then - test("inputTextAsParam", "{{#pascalcase}}Input_text{{/pascalcase}}", ctx); - } - -} From 84d06f657aa31e1982955a36cf6f9e36d0c4fb89 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 12:21:22 -0700 Subject: [PATCH 05/44] Deprecates more methods, removes packagePath from generator interface --- .../codegen/MyclientcodegenGenerator.kt | 4 +- .../codegen/MyclientcodegenGenerator.java | 4 +- .../DefaultGeneratorRunner.java | 78 ++++----- .../codegen/generators/DefaultGenerator.java | 160 ++++++++---------- .../codegen/generators/Generator.java | 78 ++++++--- .../generators/JavaClientGenerator.java | 16 +- .../generators/PythonClientGenerator.java | 5 +- .../openapimodels/GeneratedFileType.java | 7 + .../resources/codegen/generatorClass.mustache | 4 +- .../codegen/kotlin/generatorClass.mustache | 4 +- .../generators/DefaultGeneratorTest.java | 2 - .../generators/PythonClientGeneratorTest.java | 9 - 12 files changed, 192 insertions(+), 179 deletions(-) create mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java diff --git a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt index 09732c854f1..362d738aa3e 100644 --- a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt +++ b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt @@ -144,11 +144,11 @@ open class MyclientcodegenGenerator() : DefaultCodegen(), CodegenConfig { } /** - * Location to write model files. You can use the modelPackage() as defined when the class is + * Location to write model files. You can use the modelPackage as defined when the class is * instantiated */ override fun modelFileFolder(): String { - return """$outputFolder/$sourceFolder/${modelPackage().replace('.', File.separatorChar)}""" + return """$outputFolder/$sourceFolder/${modelPackage.replace('.', File.separatorChar)}""" } /** diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index e44328f799e..f992b78f147 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -145,11 +145,11 @@ public String escapeReservedWord(String name) { } /** - * Location to write model files. You can use the modelPackage() as defined when the class is + * Location to write model files. You can use the modelPackage as defined when the class is * instantiated */ public String modelFileFolder() { - return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar); + return outputFolder + "/" + sourceFolder + "/" + modelPackage.replace('.', File.separatorChar); } /** diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 140b9fd50d4..3867ee6aa81 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -54,6 +54,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenList; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenTag; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenText; +import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; import org.openapijsonschematools.codegen.templating.DryRunTemplateManager; import org.openapijsonschematools.codegen.templating.SupportingFile; @@ -367,23 +368,6 @@ private void generateSchema(List files, CodegenSchema schema, String jsonP generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, CodegenConstants.MODELS, schemaData, generateModels); } - @Override - public String requestBodyFileFolder() { - return ""; - } - - private String packageFilename(List pathSegments) { - String prefix = generator.getOutputDir() + File.separatorChar + generator.packagePath() + File.separatorChar; - String suffix = pathSegments.stream().collect(Collectors.joining(File.separator)); - return prefix + suffix; - } - - private String filenameFromRoot(List pathSegments) { - String prefix = generator.getOutputDir() + File.separatorChar; - String suffix = pathSegments.stream().collect(Collectors.joining(File.separator)); - return prefix + suffix; - } - private void generateFile(Map templateData, String templateName, String outputFilename, List files, boolean shouldGenerate, String skippedByOption) { templateData.putAll(generator.additionalProperties()); try { @@ -609,7 +593,7 @@ private void generateContent(List files, LinkedHashMap contentTypeTemplateInfo = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.CONTENT_TYPE); + Map contentTypeTemplateInfo = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.CONTENT_TYPE); if (contentTypeTemplateInfo == null || contentTypeTemplateInfo.isEmpty()) { continue; } @@ -617,7 +601,7 @@ private void generateContent(List files, LinkedHashMap contentTypeEntry: contentTypeTemplateInfo.entrySet()) { String templateFile = contentTypeEntry.getKey(); String outputFile = contentTypeEntry.getValue(); - String outputFilepath = generator.getFilepath(contentTypeJsonPath) + File.separatorChar + outputFile; + String outputFilepath = generator.getFilePath(GeneratedFileType.CODE, contentTypeJsonPath) + File.separatorChar + outputFile; HashMap contentTypeTemplateData = new HashMap<>(); contentTypeTemplateData.put("schema", schema); try { @@ -635,12 +619,12 @@ private void generateContent(List files, LinkedHashMap contentTemplateInfo = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.CONTENT); + Map contentTemplateInfo = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.CONTENT); if (schemaExists && contentTemplateInfo != null && !contentTemplateInfo.isEmpty()) { for (Map.Entry contentEntry: contentTemplateInfo.entrySet()) { String contentTemplateFile = contentEntry.getKey(); String outputFile = contentEntry.getValue(); - String outputFilepath = generator.getFilepath(contentJsonPath) + File.separatorChar + outputFile; + String outputFilepath = generator.getFilePath(GeneratedFileType.CODE, contentJsonPath) + File.separatorChar + outputFile; HashMap contentTemplateData = new HashMap<>(); contentTemplateData.put("content", content); try { @@ -892,14 +876,14 @@ private void generateHeader(List files, CodegenHeader header, String jsonP } private void generateXDocs(List files, String jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE type, String skippedByOption, Map templateInfo, boolean shouldGenerate) { - Map templateFileToOutputFile = generator.jsonPathDocTemplateFiles().get(type); + Map templateFileToOutputFile = generator.getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION).get(type); if (templateFileToOutputFile == null || templateFileToOutputFile.isEmpty()) { return; } for (Map.Entry entry : templateFileToOutputFile.entrySet()) { String templateFile = entry.getKey(); String suffix = entry.getValue(); - String filename = generator.getDocsFilepath(jsonPath) + suffix; + String filename = generator.getFilePath(GeneratedFileType.DOCUMENTATION, jsonPath) + suffix; HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); @@ -923,14 +907,14 @@ private void generateXDocs(List files, String jsonPath, CodegenConstants.J } private void generateXTests(List files, String jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE type, String skippedByOption, Map templateInfo, boolean shouldGenerate) { - Map templateFileToOutputFile = generator.jsonPathTestTemplateFiles().get(type); + Map templateFileToOutputFile = generator.getJsonPathTemplateFiles(GeneratedFileType.TEST).get(type); if (templateFileToOutputFile == null || templateFileToOutputFile.isEmpty()) { return; } for (Map.Entry entry : templateFileToOutputFile.entrySet()) { String templateFile = entry.getKey(); String suffix = entry.getValue(); - String filename = generator.getTestFilepath(jsonPath) + suffix; + String filename = generator.getFilePath(GeneratedFileType.TEST, jsonPath) + suffix; HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); @@ -959,14 +943,14 @@ private void generateXTests(List files, String jsonPath, CodegenConstants. } private void generateXs(List files, String jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE type, String skippedByOption, Map templateInfo, boolean shouldGenerate) { - Map templateFileToOutputFile = generator.jsonPathTemplateFiles().get(type); + Map templateFileToOutputFile = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(type); if (templateFileToOutputFile == null || templateFileToOutputFile.isEmpty()) { return; } for (Map.Entry entry : templateFileToOutputFile.entrySet()) { String templateFile = entry.getKey(); String suffix = entry.getValue(); - String filename = generator.getFilepath(jsonPath) + suffix; + String filename = generator.getFilePath(GeneratedFileType.CODE, jsonPath) + suffix; HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); @@ -1125,7 +1109,7 @@ void generateApis(List files, TreeMap paths) allowListedTags = new HashSet<>(Arrays.asList(apiNames.split(","))); } String jsonPath = "#/apis"; - Map apiPathsTemplates = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATHS); + Map apiPathsTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATHS); // paths api file(s) if (apiPathsTemplates != null) { for (Map.Entry apiPathEntry: apiPathsTemplates.entrySet()) { @@ -1135,15 +1119,15 @@ void generateApis(List files, TreeMap paths) Map apiData = new HashMap<>(); String packageName = generator.packageName(); apiData.put("packageName", packageName); - String outputFile = generator.getFilepath(thisJsonPath) + apiFileName; + String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + apiFileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } LinkedHashMap>> tagToPathToOperations = new LinkedHashMap<>(); HashMap>> tagToOperationIdToPathToOperation = new HashMap<>(); - Map apiPathTemplates = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATH); - Map apiDocPathTemplates = generator.jsonPathDocTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATH); + Map apiPathTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATH); + Map apiDocPathTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_PATH); // path apis for(Map.Entry entry: paths.entrySet()) { CodegenKey path = entry.getKey(); @@ -1159,7 +1143,7 @@ void generateApis(List files, TreeMap paths) apiData.put("path", path); apiData.put("pathItem", pathItem); String thisJsonPath = jsonPath + "/paths/" + ModelUtils.encodeSlashes(path.original); - String outputFile = generator.getFilepath(thisJsonPath) + suffix; + String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + suffix; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } @@ -1170,7 +1154,7 @@ void generateApis(List files, TreeMap paths) String templateFile = apiPathEntry.getKey(); String fileName = apiPathEntry.getValue(); String thisJsonPath = jsonPath + "/paths/" + ModelUtils.encodeSlashes(path.original); - String outputFile = generator.getDocsFilepath(thisJsonPath) + fileName; + String outputFile = generator.getFilePath(GeneratedFileType.DOCUMENTATION, thisJsonPath) + fileName; Map apiData = new HashMap<>(); String packageName = generator.packageName(); apiData.put("packageName", packageName); @@ -1210,7 +1194,7 @@ void generateApis(List files, TreeMap paths) } // files in the apiPackage root folder - Map apiRootTemplates = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER); + Map apiRootTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER); if (apiRootTemplates != null) { for (Map.Entry entry: apiRootTemplates.entrySet()) { String templateFile = entry.getKey(); @@ -1221,13 +1205,13 @@ void generateApis(List files, TreeMap paths) apiData.put("apiClassname", "Api"); apiData.put("tagToPathToOperations", tagToPathToOperations); apiData.put("paths", paths); - String outputFile = generator.getFilepath(jsonPath) + fileName; + String outputFile = generator.getFilePath(GeneratedFileType.CODE, jsonPath) + fileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } // tags file(s) - Map apiTagsTemplates = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAGS); + Map apiTagsTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAGS); if (apiTagsTemplates != null) { for (Map.Entry apiPathEntry: apiTagsTemplates.entrySet()) { String templateFile = apiPathEntry.getKey(); @@ -1236,13 +1220,13 @@ void generateApis(List files, TreeMap paths) String packageName = generator.packageName(); apiData.put("packageName", packageName); String thisJsonPath = jsonPath + "/tags"; - String outputFile = generator.getFilepath(thisJsonPath) + fileName; + String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + fileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } - Map apiTagTemplates = generator.jsonPathTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAG); - Map apiDocTagTemplates = generator.jsonPathDocTemplateFiles().get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAG); + Map apiTagTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAG); + Map apiDocTagTemplates = generator.getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION).get(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_TAG); for(Map.Entry>> entry: tagToPathToOperations.entrySet()) { CodegenTag tag = entry.getKey(); HashMap> pathToOperations = entry.getValue(); @@ -1278,7 +1262,7 @@ public int compare(CodegenKey e1, CodegenKey e2) { String templateFile = apiPathEntry.getKey(); String fileName = apiPathEntry.getValue(); String thisJsonPath = jsonPath + "/tags/" + tag.name; - String outputFile = generator.getFilepath(thisJsonPath) + fileName; + String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + fileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } @@ -1288,7 +1272,7 @@ public int compare(CodegenKey e1, CodegenKey e2) { String templateFile = apiPathEntry.getKey(); String fileName = apiPathEntry.getValue(); String thisJsonPath = jsonPath + "/tags/" + tag.name; - String outputFile = generator.getDocsFilepath(thisJsonPath) + fileName; + String outputFile = generator.getFilePath(GeneratedFileType.DOCUMENTATION, thisJsonPath) + fileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } } @@ -1709,27 +1693,27 @@ private void processUserDefinedTemplates() { switch (userDefinedTemplate.getTemplateType()) { case API: - Map apiTemplateFiles = generator.jsonPathTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER, new HashMap<>()); + Map apiTemplateFiles = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER, new HashMap<>()); apiTemplateFiles.put(templateFile, templateExt); break; case Model: - Map schemaTemplateToSuffix = generator.jsonPathTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); + Map schemaTemplateToSuffix = generator.getJsonPathTemplateFiles(GeneratedFileType.CODE).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); schemaTemplateToSuffix.put(templateFile, templateExt); break; case APIDocs: - Map apiDocTemplateToSuffix = generator.jsonPathDocTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER, new HashMap<>()); + Map apiDocTemplateToSuffix = generator.getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.API_ROOT_FOLDER, new HashMap<>()); apiDocTemplateToSuffix.put(templateFile, templateExt); break; case ModelDocs: - Map schemaDocTemplateToSuffix = generator.jsonPathDocTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); + Map schemaDocTemplateToSuffix = generator.getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); schemaDocTemplateToSuffix.put(templateFile, templateExt); break; case APITests: - Map apiTestTemplateToSuffix = generator.jsonPathTestTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.OPERATION, new HashMap<>()); + Map apiTestTemplateToSuffix = generator.getJsonPathTemplateFiles(GeneratedFileType.TEST).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.OPERATION, new HashMap<>()); apiTestTemplateToSuffix.put(templateFile, templateExt); break; case ModelTests: - Map modelTestTemplateToSuffix = generator.jsonPathTestTemplateFiles().getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); + Map modelTestTemplateToSuffix = generator.getJsonPathTemplateFiles(GeneratedFileType.TEST).getOrDefault(CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, new HashMap<>()); modelTestTemplateToSuffix.put(templateFile, templateExt); break; case SupportingFiles: diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 52af95ec426..30fb7ef0ea2 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -78,6 +78,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenXml; import org.openapijsonschematools.codegen.generators.openapimodels.EnumInfo; import org.openapijsonschematools.codegen.generators.openapimodels.EnumValue; +import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.LinkedHashMapWithContext; import org.openapijsonschematools.codegen.generators.openapimodels.MapBuilder; import org.openapijsonschematools.codegen.generators.openapimodels.PairCacheKey; @@ -686,6 +687,20 @@ public Map instantiationTypes() { return instantiationTypes; } + @Override + public HashMap> getJsonPathTemplateFiles(GeneratedFileType type) { + switch (type) { + case CODE: + return jsonPathTemplateFiles; + case DOCUMENTATION: + return jsonPathDocTemplateFiles; + case TEST: + return jsonPathTestTemplateFiles; + default: + return null; + } + } + @Override public Set reservedWords() { return reservedWords; @@ -696,7 +711,7 @@ public Set languageSpecificPrimitives() { return languageSpecificPrimitives; } - @Override + @Deprecated public String modelPackage() { return modelPackage; } @@ -719,20 +734,6 @@ public String embeddedTemplateDir() { return templateDir; } } - @Override - public HashMap> jsonPathTemplateFiles() { - return jsonPathTemplateFiles; - } - - @Override - public HashMap> jsonPathDocTemplateFiles() { - return jsonPathDocTemplateFiles; - } - - @Override - public HashMap> jsonPathTestTemplateFiles() { - return jsonPathTestTemplateFiles; - } @Deprecated public String toResponseModuleName(String componentName, String jsonPath) { return getFilename(CodegenKeyType.RESPONSE, componentName, jsonPath); } @@ -1001,7 +1002,7 @@ public String toModelImport(String refClass) { if ("".equals(modelPackage())) { return refClass; } else { - return modelPackage() + "." + refClass; + return modelPackage + "." + refClass; } } @@ -3790,10 +3791,9 @@ protected void updateComponentsFilepath(String[] pathPieces) { // rename schemas + requestBodies switch (pathPieces[2]) { case "schemas": + // #/components/schemas/SomeSchema // modelPackage replaces pathPieces[1] + pathPieces[2] - String fragment = modelPackagePathFragment(); - String[] fragments = fragment.split("/"); - pathPieces[1] = fragments[0]; + String[] fragments = modelPackage.split("\\."); pathPieces[2] = fragments[1]; if (pathPieces.length == 4) { // #/components/schemas/SomeSchema @@ -4110,29 +4110,7 @@ private void updateApisFilepath(String[] pathPieces) { pathPieces[3] = getFilename(CodegenKeyType.PATH, ModelUtils.decodeSlashes(pathPieces[3]), jsonPath); } } - - @Override - public String getFilepath(String jsonPath) { - String[] pathPieces = jsonPath.split("/"); - pathPieces[0] = outputFolder + File.separatorChar + packagePath(); - if (jsonPath.startsWith("#/components")) { - updateComponentsFilepath(pathPieces); - } else if (jsonPath.startsWith("#/paths")) { - updatePathsFilepath(pathPieces); - } else if (jsonPath.startsWith("#/servers")) { - updateServersFilepath(pathPieces); - } else if (jsonPath.startsWith("#/security")) { - updateSecurityFilepath(pathPieces); - } else if (jsonPath.startsWith("#/apis")) { - // this is a fake json path that the code generates and uses to generate apis - updateApisFilepath(pathPieces); - } - List finalPathPieces = Arrays.stream(pathPieces) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - return String.join(File.separator, finalPathPieces); - } - + @Override public String getSubpackage(String jsonPath) { String[] pathPieces = jsonPath.split("/"); @@ -4159,52 +4137,64 @@ public String getSubpackage(String jsonPath) { } return subpackage.substring(1,lastPeriodIndex); } - @Override - public String getTestFilepath(String jsonPath) { - String[] pathPieces = jsonPath.split("/"); - pathPieces[0] = outputFolder + File.separatorChar + "test"; - if (jsonPath.startsWith("#/components")) { - // #/components/schemas/someSchema - updateComponentsFilepath(pathPieces); - if (pathPieces.length == 4) { - int lastIndex = pathPieces.length - 1; - pathPieces[lastIndex] = "test_" + pathPieces[lastIndex]; - } - } else if (jsonPath.startsWith("#/paths")) { - updatePathsFilepath(pathPieces); - // #/paths/somePath/get - if (pathPieces.length == 4) { - int lastIndex = pathPieces.length - 1; - pathPieces[lastIndex] = "test_" + pathPieces[lastIndex]; - } - } - List finalPathPieces = Arrays.stream(pathPieces) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - return String.join(File.separator, finalPathPieces); - } - @Override - public String getDocsFilepath(String jsonPath) { + public String getFilePath(GeneratedFileType type, String jsonPath) { String[] pathPieces = jsonPath.split("/"); - pathPieces[0] = outputFolder + File.separatorChar + docsFolder; - if (jsonPath.startsWith("#/components")) { - updateComponentsFilepath(pathPieces); - } else if (jsonPath.startsWith("#/paths")) { - updatePathsFilepath(pathPieces); - } else if (jsonPath.startsWith("#/servers")) { - updateServersFilepath(pathPieces); - } else if (jsonPath.startsWith("#/apis")) { - // this is a fake json path that the code generates and uses to generate apis - updateApisFilepath(pathPieces); + switch (type) { + case CODE: + pathPieces[0] = outputFolder + File.separatorChar + packagePath(); + if (jsonPath.startsWith("#/components")) { + updateComponentsFilepath(pathPieces); + } else if (jsonPath.startsWith("#/paths")) { + updatePathsFilepath(pathPieces); + } else if (jsonPath.startsWith("#/servers")) { + updateServersFilepath(pathPieces); + } else if (jsonPath.startsWith("#/security")) { + updateSecurityFilepath(pathPieces); + } else if (jsonPath.startsWith("#/apis")) { + // this is a fake json path that the code generates and uses to generate apis + updateApisFilepath(pathPieces); + } + break; + case DOCUMENTATION: + pathPieces[0] = outputFolder + File.separatorChar + docsFolder; + if (jsonPath.startsWith("#/components")) { + updateComponentsFilepath(pathPieces); + } else if (jsonPath.startsWith("#/paths")) { + updatePathsFilepath(pathPieces); + } else if (jsonPath.startsWith("#/servers")) { + updateServersFilepath(pathPieces); + } else if (jsonPath.startsWith("#/apis")) { + // this is a fake json path that the code generates and uses to generate apis + updateApisFilepath(pathPieces); + } + break; + case TEST: + pathPieces[0] = outputFolder + File.separatorChar + "test"; + if (jsonPath.startsWith("#/components")) { + // #/components/schemas/someSchema + updateComponentsFilepath(pathPieces); + if (pathPieces.length == 4) { + int lastIndex = pathPieces.length - 1; + pathPieces[lastIndex] = "test_" + pathPieces[lastIndex]; + } + } else if (jsonPath.startsWith("#/paths")) { + updatePathsFilepath(pathPieces); + // #/paths/somePath/get + if (pathPieces.length == 4) { + int lastIndex = pathPieces.length - 1; + pathPieces[lastIndex] = "test_" + pathPieces[lastIndex]; + } + } } - List finalPathPieces = Arrays.stream(pathPieces) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - return String.join(File.separator, finalPathPieces); + List codePieces = Arrays.stream(pathPieces) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + return String.join(File.separator, codePieces); } - + + @Override public boolean isSkipOverwrite() { return skipOverwrite; @@ -4750,7 +4740,7 @@ private void setSchemaLocationInfo(String ref, String sourceJsonPath, String cur } protected String getModuleLocation(String ref) { - String filePath = getFilepath(ref); + String filePath = getFilePath(GeneratedFileType.CODE, ref); String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar; String localFilepath = filePath.substring(prefix.length()); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); @@ -4758,7 +4748,7 @@ protected String getModuleLocation(String ref) { @Override public String getRefModuleLocation(String ref) { - String filePath = getFilepath(ref); + String filePath = getFilePath(GeneratedFileType.CODE, ref); String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar; int endIndex = filePath.lastIndexOf(File.separatorChar); String localFilepath = filePath.substring(prefix.length(), endIndex); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index e57f24f6e2f..3bb9d8140f6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -25,6 +25,7 @@ import org.openapijsonschematools.codegen.generators.models.VendorExtension; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRefInfo; +import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.models.CliOption; @@ -53,28 +54,33 @@ public interface Generator extends OpenApiProcessor, Comparable { Map vendorExtensions(); + // todo move to generatorsettings String apiPackage(); + // todo move to generatorsettings String outputFolder(); + // todo move to generatorsettings String templateDir(); + // todo move to generatorsettings String embeddedTemplateDir(); - String modelPackage(); - - String modelPackagePathFragment(); - + // todo move to generatorsettings String packageName(); + // todo deprecate this and make a key of api String toApiName(String name); + // todo remove this because it is unused String toApiVarName(String name); + // todo deprecate this and change it to getClassName String toModelName(String name, String jsonPath); String escapeText(String text); + // todo remove because unused String escapeTextWhileAllowingNewLines(String text); String escapeUnsafeCharacters(String input); @@ -97,19 +103,14 @@ public interface Generator extends OpenApiProcessor, Comparable { String getOutputDir(); - String packagePath(); - void setOutputDir(String dir); + // todo deprecate this CodegenKey getKey(String key, String keyType); Map instantiationTypes(); - HashMap> jsonPathTemplateFiles(); - - HashMap> jsonPathDocTemplateFiles(); - - HashMap> jsonPathTestTemplateFiles(); + HashMap> getJsonPathTemplateFiles(GeneratedFileType type); Set languageSpecificPrimitives(); @@ -117,16 +118,18 @@ public interface Generator extends OpenApiProcessor, Comparable { void processOpenAPI(OpenAPI openAPI); + // todo remove this because it is unused Compiler processCompiler(Compiler compiler); + // todo deprecate this, use getKey with api type String toApiFilename(String name); + // todo deprecate and change to getSnakeCase String toModelFilename(String name, String jsonPath); + // todo can this be eliminated? getPascalCase/getSnakeCase and getFileName should do everything String toModuleFilename(String name, String jsonPath); - String toModelImport(String refClass); - TreeMap updateAllModels(TreeMap models); void postProcess(); @@ -138,17 +141,12 @@ public interface Generator extends OpenApiProcessor, Comparable { Map postProcessSupportingFileData(Map data); void postProcessModelProperty(CodegenSchema model, CodegenSchema property); - - // handles almost all files to be written - String getFilepath(String jsonPath); - + String getImport(CodegenRefInfo refInfo); String getRefModuleLocation(String ref); String getSubpackage(String jsonPath); - String getDocsFilepath(String jsonPath); - - String getTestFilepath(String jsonPath); + String getFilePath(GeneratedFileType type, String jsonPath); boolean isSkipOverwrite(); @@ -319,4 +317,44 @@ default String getHelp() { default FeatureSet getFeatureSet() { return getGeneratorMetadata().getFeatureSet(); } + + @Deprecated + default HashMap> jsonPathTemplateFiles() { + return getJsonPathTemplateFiles(GeneratedFileType.CODE); + } + + @Deprecated + default HashMap> jsonPathDocTemplateFiles() { + return getJsonPathTemplateFiles(GeneratedFileType.DOCUMENTATION); + } + + @Deprecated + default HashMap> jsonPathTestTemplateFiles() { + return getJsonPathTemplateFiles(GeneratedFileType.TEST); + } + + @Deprecated + default String getFilepath(String jsonPath) { + return getFilePath(GeneratedFileType.CODE, jsonPath); + } + + @Deprecated + default String getDocsFilepath(String jsonPath) { + return getFilePath(GeneratedFileType.DOCUMENTATION, jsonPath); + } + + @Deprecated + default String getTestFilePath(String jsonPath) { + return getFilePath(GeneratedFileType.TEST, jsonPath); + } + + @Deprecated + String toModelImport(String refClass); + + @Deprecated + String modelPackage(); + + @Deprecated + String modelPackagePathFragment(); + // 108 - 30 -> 78 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 296c8d1b2d2..a38507b02b9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -56,6 +56,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenServer; import org.openapijsonschematools.codegen.generators.openapimodels.EnumInfo; import org.openapijsonschematools.codegen.generators.openapimodels.EnumValue; +import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.MapBuilder; import org.openapijsonschematools.codegen.generators.openapimodels.OperationInput; import org.openapijsonschematools.codegen.generators.openapimodels.OperationInputProvider; @@ -1322,7 +1323,7 @@ private String toSchemaRefClass(String ref, String sourceJsonPath) { if (sourceJsonPath != null && ref.startsWith(sourceJsonPath + "/")) { // internal in-schema reference, no import needed // TODO handle this in the future - if (getFilepath(sourceJsonPath).equals(getFilepath(ref))) { + if (getFilePath(GeneratedFileType.CODE, sourceJsonPath).equals(getFilePath(GeneratedFileType.CODE, ref))) { // TODO ensure that getFilepath returns the same file for somePath/get/QueryParameters // TODO ensure that getFilepath returns the same file for schemas/SomeSchema... return null; @@ -1395,7 +1396,7 @@ public String toRefClass(String ref, String sourceJsonPath, String expectedCompo @Override public String getRefModuleLocation(String ref) { - String filePath = getFilepath(ref); + String filePath = getFilePath(GeneratedFileType.CODE, ref); String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; // modules are always in a package one above them, so strip off the last jsonPath fragment String localFilepath = filePath.substring(prefix.length(), filePath.lastIndexOf(File.separatorChar)); @@ -2032,14 +2033,17 @@ public String getImport(CodegenRefInfo refInfo) { } protected String getModuleLocation(String ref) { - String filePath = getFilepath(ref); + String filePath = getFilePath(GeneratedFileType.CODE, ref); String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; String localFilepath = filePath.substring(prefix.length()); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); } @Override - public String getTestFilepath(String jsonPath) { + public String getFilePath(GeneratedFileType type, String jsonPath) { + if (type != GeneratedFileType.TEST) { + return super.getFilePath(type, jsonPath); + } String[] pathPieces = jsonPath.split("/"); pathPieces[0] = outputFolder + File.separatorChar + testPackagePath(); if (jsonPath.startsWith("#/components")) { @@ -2051,8 +2055,8 @@ public String getTestFilepath(String jsonPath) { } } List finalPathPieces = Arrays.stream(pathPieces) - .filter(Objects::nonNull) - .collect(Collectors.toList()); + .filter(Objects::nonNull) + .collect(Collectors.toList()); return String.join(File.separator, finalPathPieces); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 8b5730919f5..dca017999ec 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -37,6 +37,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPatternInfo; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSchema; +import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.generatormetadata.features.DataTypeFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.DocumentationFeature; @@ -986,7 +987,7 @@ public String toModelImport(String refClass) { return null; } String modelModule = refClassPieces[0]; - return "from " + packageName + "." + modelPackage() + " import " + modelModule; + return "from " + packageName + "." + modelPackage + " import " + modelModule; } /*** @@ -1922,7 +1923,7 @@ private String toSchemaRefClass(String ref, String sourceJsonPath) { if (sourceJsonPath != null && ref.startsWith(sourceJsonPath + "/")) { // internal in-schema reference, no import needed // TODO handle this in the future - if (getFilepath(sourceJsonPath).equals(getFilepath(ref))) { + if (getFilePath(GeneratedFileType.CODE, sourceJsonPath).equals(getFilePath(GeneratedFileType.CODE, ref))) { // TODO ensure that getFilepath returns the same file for somePath/get/QueryParameters // TODO ensure that getFilepath returns the same file for schemas/SomeSchema... return null; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java new file mode 100644 index 00000000000..d1fde781212 --- /dev/null +++ b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java @@ -0,0 +1,7 @@ +package org.openapijsonschematools.codegen.generators.openapimodels; + +public enum GeneratedFileType { + CODE, + DOCUMENTATION, + TEST +} diff --git a/src/main/resources/codegen/generatorClass.mustache b/src/main/resources/codegen/generatorClass.mustache index c45cb78d8fc..03b73fb420e 100644 --- a/src/main/resources/codegen/generatorClass.mustache +++ b/src/main/resources/codegen/generatorClass.mustache @@ -156,11 +156,11 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig } /** - * Location to write model files. You can use the modelPackage() as defined when the class is + * Location to write model files. You can use the modelPackage as defined when the class is * instantiated */ public String modelFileFolder() { - return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar); + return outputFolder + "/" + sourceFolder + "/" + modelPackage.replace('.', File.separatorChar); } /** diff --git a/src/main/resources/codegen/kotlin/generatorClass.mustache b/src/main/resources/codegen/kotlin/generatorClass.mustache index e19144f3288..dc4610337e2 100644 --- a/src/main/resources/codegen/kotlin/generatorClass.mustache +++ b/src/main/resources/codegen/kotlin/generatorClass.mustache @@ -144,11 +144,11 @@ open class {{generatorClass}}() : DefaultCodegen(), CodegenConfig { } /** - * Location to write model files. You can use the modelPackage() as defined when the class is + * Location to write model files. You can use the modelPackage as defined when the class is * instantiated */ override fun modelFileFolder(): String { - return """$outputFolder/$sourceFolder/${modelPackage().replace('.', File.separatorChar)}""" + return """$outputFolder/$sourceFolder/${modelPackage.replace('.', File.separatorChar)}""" } /** diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java index a89b487bbec..d4661f8330e 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java @@ -52,7 +52,6 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSchema; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSecurityScheme; import org.openapijsonschematools.codegen.generators.openapimodels.EnumValue; -import org.openapijsonschematools.codegen.templating.mustache.CamelCaseLambda; import org.openapijsonschematools.codegen.templating.mustache.IndentedLambda; import org.openapijsonschematools.codegen.templating.mustache.LowercaseLambda; import org.openapijsonschematools.codegen.templating.mustache.TitlecaseLambda; @@ -1710,7 +1709,6 @@ public void commonLambdasRegistrationTest() { assertTrue(lambdas.get("lowercase") instanceof LowercaseLambda, "Expecting LowercaseLambda class"); assertTrue(lambdas.get("uppercase") instanceof UppercaseLambda, "Expecting UppercaseLambda class"); assertTrue(lambdas.get("titlecase") instanceof TitlecaseLambda, "Expecting TitlecaseLambda class"); - assertTrue(lambdas.get("camelcase") instanceof CamelCaseLambda, "Expecting CamelCaseLambda class"); assertTrue(lambdas.get("indented") instanceof IndentedLambda, "Expecting IndentedLambda class"); assertTrue(lambdas.get("indented_8") instanceof IndentedLambda, "Expecting IndentedLambda class"); assertTrue(lambdas.get("indented_12") instanceof IndentedLambda, "Expecting IndentedLambda class"); diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java index 5fffba76b33..bde869eb453 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java @@ -230,13 +230,4 @@ public void testEnumNames() { Assert.assertEquals(enumVars.get(new EnumValue("#FFA5A4", "string", null)), "NUMBER_SIGN_FFA5A4"); Assert.assertEquals(enumVars.get(new EnumValue("2D_Object", "string", null)), "DIGIT_TWO_D_OBJECT"); } - - @Test(description = "format imports of models using a package containing dots") - public void testImportWithQualifiedPackageName() throws Exception { - final PythonClientGenerator codegen = new PythonClientGenerator(); - codegen.setPackageName("openapi.client"); - - String importValue = codegen.toModelImport("model_name.ModelName"); - Assert.assertEquals(importValue, "from openapi.client.components.schema import model_name"); - } } From 51c1786b51699a594c8cac797eae339fc5e2786e Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 14:36:28 -0700 Subject: [PATCH 06/44] Adjusts generator instantiation --- .../codegen/MyclientcodegenGenerator.kt | 4 +- .../codegen/MyclientcodegenGenerator.java | 4 +- .../codegen/config/CodegenConfigurator.java | 2 +- .../DefaultGeneratorRunner.java | 12 +- .../generatorrunner/GeneratorRunner.java | 3 - .../codegen/generators/DefaultGenerator.java | 73 ++-- .../codegen/generators/Generator.java | 23 +- .../generators/JavaClientGenerator.java | 292 ++++++++------- .../generators/PythonClientGenerator.java | 354 +++++++++--------- .../generatorloader/GeneratorLoader.java | 27 ++ .../models/CodeGeneratorSettings.java | 16 + .../GeneratedFileType.java | 2 +- .../generators/models/ReportFileType.java | 6 + .../openapimodels/ReportFileType.java | 6 - .../resources/codegen/generatorClass.mustache | 4 +- .../codegen/kotlin/generatorClass.mustache | 4 +- 16 files changed, 446 insertions(+), 386 deletions(-) create mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java rename src/main/java/org/openapijsonschematools/codegen/generators/{openapimodels => models}/GeneratedFileType.java (51%) create mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/models/ReportFileType.java delete mode 100644 src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java diff --git a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt index 362d738aa3e..89be26f4eea 100644 --- a/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt +++ b/samples/meta-codegen-kotlin/lib/src/main/kotlin/com/my/company/codegen/MyclientcodegenGenerator.kt @@ -152,11 +152,11 @@ open class MyclientcodegenGenerator() : DefaultCodegen(), CodegenConfig { } /** - * Location to write api files. You can use the apiPackage() as defined when the class is + * Location to write api files. You can use the apiPackage as defined when the class is * instantiated */ override fun apiFileFolder(): String { - return """$outputFolder/$sourceFolder/${apiPackage().replace('.', File.separatorChar)}""" + return """$outputFolder/$sourceFolder/${generatorSettings().apiPackage.replace('.', File.separatorChar)}""" } /** diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index f992b78f147..b34e62a38bc 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -153,12 +153,12 @@ public String modelFileFolder() { } /** - * Location to write api files. You can use the apiPackage() as defined when the class is + * Location to write api files. You can use the apiPackage as defined when the class is * instantiated */ @Override public String apiFileFolder() { - return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar); + return outputFolder + "/" + sourceFolder + "/" + generatorSettings().apiPackage.replace('.', File.separatorChar); } /** diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index d97802172d4..0c3cf10cb15 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -470,7 +470,7 @@ public ClientOptInput toClientOptInput() { // We load the config via generatorSettings.getGeneratorName() because this is guaranteed to be set // regardless of entrypoint (CLI sets properties on this type, config deserialization sets on generatorSettings). - Generator config = GeneratorLoader.forName(generatorSettings.getGeneratorName()); + Generator config = GeneratorLoader.getGenerator(generatorSettings.getGeneratorName(), generatorSettings, workflowSettings); // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 3867ee6aa81..137f7786035 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -54,8 +54,8 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenList; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenTag; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenText; -import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; -import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; +import org.openapijsonschematools.codegen.generators.models.GeneratedFileType; +import org.openapijsonschematools.codegen.generators.models.ReportFileType; import org.openapijsonschematools.codegen.templating.DryRunTemplateManager; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.common.SerializerUtils; @@ -473,7 +473,7 @@ private void generatePathItem(List files, CodegenKey pathKey, CodegenPathI endpointInfo.put("servers", servers); endpointInfo.put("security", security); endpointInfo.put("packageName", generator.packageName()); - endpointInfo.put("apiPackage", generator.apiPackage()); + endpointInfo.put("apiPackage", generator.generatorSettings().apiPackage); endpointInfo.put("headerSize", "#"); endpointInfo.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); endpointInfo.put("docRoot", "../../"); @@ -1241,7 +1241,7 @@ void generateApis(List files, TreeMap paths) apiData.put("tag", tag); apiData.put("pathToOperations", pathToOperations); apiData.put("operations", operations); - apiData.put("apiPackage", generator.apiPackage()); + apiData.put("apiPackage", generator.generatorSettings().apiPackage); apiData.put("docRoot", "../../"); apiData.put("headerSize", "#"); @@ -1364,7 +1364,7 @@ Map buildSupportFileBundle( CodegenList security) { Map bundle = new HashMap<>(generator.additionalProperties()); - bundle.put("apiPackage", generator.apiPackage()); + bundle.put("apiPackage", generator.generatorSettings().apiPackage); URL url = URLPathUtils.getServerURL(openAPI, null); TreeSet> allServers = new TreeSet<>(); @@ -1412,7 +1412,7 @@ Map buildSupportFileBundle( bundle.put("hasServers", hasServers); // also true if there are no root servers but there are pathItem/operation servers bundle.put("paths", paths); bundle.put("security", security); - bundle.put("apiFolder", generator.apiPackage().replace('.', File.separatorChar)); + bundle.put("apiFolder", generator.generatorSettings().apiPackage.replace('.', File.separatorChar)); bundle.put("modelPackage", generator.modelPackage()); if (securitySchemes == null) { bundle.put("hasHttpSignatureSecurityScheme", false); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/GeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/GeneratorRunner.java index 9878ba39183..72f8af8a07c 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/GeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/GeneratorRunner.java @@ -24,8 +24,5 @@ public interface GeneratorRunner { GeneratorRunner opts(ClientOptInput opts); - - String requestBodyFileFolder(); - List generate(); } \ No newline at end of file diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 30fb7ef0ea2..a3aa5c4752d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -38,6 +38,8 @@ import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.config.GlobalSettings; @@ -47,6 +49,7 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.features.GlobalFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SchemaFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.WireFormatFeature; +import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.models.VendorExtension; import org.openapijsonschematools.codegen.generators.openapimodels.ArrayListWithContext; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenCallback; @@ -78,12 +81,12 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenXml; import org.openapijsonschematools.codegen.generators.openapimodels.EnumInfo; import org.openapijsonschematools.codegen.generators.openapimodels.EnumValue; -import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; +import org.openapijsonschematools.codegen.generators.models.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.LinkedHashMapWithContext; import org.openapijsonschematools.codegen.generators.openapimodels.MapBuilder; import org.openapijsonschematools.codegen.generators.openapimodels.PairCacheKey; import org.openapijsonschematools.codegen.generators.openapimodels.ParameterCollection; -import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; +import org.openapijsonschematools.codegen.generators.models.ReportFileType; import org.openapijsonschematools.codegen.generators.openapimodels.SchemaTestCase; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.common.SerializerUtils; @@ -133,6 +136,20 @@ @SuppressWarnings("rawtypes") public class DefaultGenerator implements Generator { + protected CodeGeneratorSettings generatorSettings; + public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { + String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); + String embeddedTemplateDir = "java"; + String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "openapiclient"); + this.generatorSettings = new CodeGeneratorSettings( + apiPackage, + workflowSettings.getOutputDir(), + workflowSettings.getTemplateDir(), + embeddedTemplateDir, + packageName + ); + } + private final Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class); public static FeatureSet DefaultFeatureSet; @@ -200,7 +217,16 @@ public class DefaultGenerator implements Generator { falseSchema.setNot(new Schema()); } - protected GeneratorMetadata generatorMetadata; + public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder() + .name("java") + .language(GeneratorLanguage.JAVA) + .languageVersion("17") + .type(GeneratorType.CLIENT) + .stability(Stability.EXPERIMENTAL) + .featureSet(DefaultFeatureSet) + .generationMessage("OpenAPI JSON Schema Generator: java "+GeneratorType.CLIENT.toValue()) + .helpTxt("todo replace help text") + .build(); protected String inputSpec; protected String outputFolder = ""; protected Set defaultIncludes; @@ -211,7 +237,7 @@ public class DefaultGenerator implements Generator { protected Set languageSpecificPrimitives = new HashSet<>(); // a map to store the mapping between a schema and the new one // a map to store the mapping between inline schema and the name provided by the user - protected String modelPackage = "components.schema", apiPackage = ""; + protected String modelPackage = "components.schema"; protected String modelNamePrefix = "", modelNameSuffix = ""; protected String apiNamePrefix = "", apiNameSuffix = "Api"; protected String filesMetadataFilename = "FILES"; @@ -319,12 +345,10 @@ public void processOpts() { setTemplateEngineName((String) additionalProperties.get(CodegenConstants.TEMPLATING_ENGINE)); } + String usedTemplateDir = templateDir; if (additionalProperties.containsKey(CodegenConstants.TEMPLATE_DIR)) { this.setTemplateDir((String) additionalProperties.get(CodegenConstants.TEMPLATE_DIR)); - } - - if (additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) { - this.setApiPackage((String) additionalProperties.get(CodegenConstants.API_PACKAGE)); + usedTemplateDir = (String) additionalProperties.get(CodegenConstants.TEMPLATE_DIR); } if (additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) { @@ -716,11 +740,6 @@ public String modelPackage() { return modelPackage; } - @Override - public String apiPackage() { - return apiPackage; - } - @Override public String templateDir() { return templateDir; @@ -751,6 +770,11 @@ public Map vendorExtensions() { return vendorExtensions; } + @Override + public CodeGeneratorSettings generatorSettings() { + return generatorSettings; + } + @Override public List supportingFiles() { return supportingFiles; @@ -805,10 +829,6 @@ public void setApiNamePrefix(String apiNamePrefix) { this.apiNamePrefix = apiNamePrefix; } - public void setApiPackage(String apiPackage) { - this.apiPackage = apiPackage; - } - public void setAllowUnicodeIdentifiers(Boolean allowUnicodeIdentifiers) { this.allowUnicodeIdentifiers = allowUnicodeIdentifiers; } @@ -1016,16 +1036,6 @@ public String toModelImport(String refClass) { public DefaultGenerator() { GeneratorType generatorType = GeneratorType.CLIENT; String name = "DefaultGenerator"; - generatorMetadata = GeneratorMetadata.newBuilder() - .name(name) - .language(GeneratorLanguage.JAVA) - .languageVersion("17") - .type(generatorType) - .stability(Stability.EXPERIMENTAL) - .featureSet(DefaultFeatureSet) - .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", name, generatorType.toValue())) - .helpTxt("todo replace help text") - .build(); defaultIncludes = new HashSet<>( Arrays.asList("double", @@ -4100,7 +4110,7 @@ private void updateApisFilepath(String[] pathPieces) { originalPieces[0] = "#"; String jsonPath = String.join("/", originalPieces); - pathPieces[1] = apiPackage.replace('.', File.separatorChar); + pathPieces[1] = generatorSettings.apiPackage.replace('.', File.separatorChar); if (pathPieces.length < 4) { return; } @@ -5344,13 +5354,6 @@ public void setRemoveEnumValuePrefix(final boolean removeEnumValuePrefix) { this.removeEnumValuePrefix = removeEnumValuePrefix; } - protected void modifyFeatureSet(Consumer processor) { - FeatureSet.Builder builder = getGeneratorMetadata().getFeatureSet().modify(); - processor.accept(builder); - this.generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .featureSet(builder.build()).build(); - } - /** * A map entry for cached sanitized names. */ diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 3bb9d8140f6..5bc8abb79c9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -22,11 +22,12 @@ import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType; +import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.models.VendorExtension; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenRefInfo; -import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; -import org.openapijsonschematools.codegen.generators.openapimodels.ReportFileType; +import org.openapijsonschematools.codegen.generators.models.GeneratedFileType; +import org.openapijsonschematools.codegen.generators.models.ReportFileType; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; @@ -54,8 +55,7 @@ public interface Generator extends OpenApiProcessor, Comparable { Map vendorExtensions(); - // todo move to generatorsettings - String apiPackage(); + CodeGeneratorSettings generatorSettings(); // todo move to generatorsettings String outputFolder(); @@ -69,6 +69,12 @@ public interface Generator extends OpenApiProcessor, Comparable { // todo move to generatorsettings String packageName(); + // todo move to generator settings + String getOutputDir(); + + // todo move to generator settings + void setOutputDir(String dir); + // todo deprecate this and make a key of api String toApiName(String name); @@ -101,10 +107,6 @@ public interface Generator extends OpenApiProcessor, Comparable { void setInputSpec(String inputSpec); - String getOutputDir(); - - void setOutputDir(String dir); - // todo deprecate this CodegenKey getKey(String key, String keyType); @@ -357,4 +359,9 @@ default String getTestFilePath(String jsonPath) { @Deprecated String modelPackagePathFragment(); // 108 - 30 -> 78 + + @Deprecated + default String apiPackage() { + return generatorSettings().apiPackage; + } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index a38507b02b9..442e7c22d82 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -29,6 +29,8 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapijsonschematools.codegen.common.ModelUtils; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.generatormetadata.FeatureSet; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; @@ -41,6 +43,7 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SecurityFeature; import org.openapijsonschematools.codegen.generators.models.CliOption; +import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; @@ -56,7 +59,7 @@ import org.openapijsonschematools.codegen.generators.openapimodels.CodegenServer; import org.openapijsonschematools.codegen.generators.openapimodels.EnumInfo; import org.openapijsonschematools.codegen.generators.openapimodels.EnumValue; -import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; +import org.openapijsonschematools.codegen.generators.models.GeneratedFileType; import org.openapijsonschematools.codegen.generators.openapimodels.MapBuilder; import org.openapijsonschematools.codegen.generators.openapimodels.OperationInput; import org.openapijsonschematools.codegen.generators.openapimodels.OperationInputProvider; @@ -82,6 +85,18 @@ import static org.openapijsonschematools.codegen.common.StringUtils.escape; public class JavaClientGenerator extends DefaultGenerator implements Generator { + public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { + String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); + String embeddedTemplateDir = "java"; + String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "org.openapijsonschematools.client"); + this.generatorSettings = new CodeGeneratorSettings( + apiPackage, + workflowSettings.getOutputDir(), + workflowSettings.getTemplateDir(), + embeddedTemplateDir, + packageName + ); + } private final Logger LOGGER = LoggerFactory.getLogger(JavaClientGenerator.class); @@ -119,9 +134,135 @@ public class JavaClientGenerator extends DefaultGenerator implements Generator { protected String outputTestFolder = ""; private final Map schemaKeyToModelNameCache = new HashMap<>(); - protected Stability getStability() { - return Stability.STABLE; - } + private static final FeatureSet featureSet = FeatureSet.newBuilder() + .includeDocumentationFeatures( + DocumentationFeature.Readme, + DocumentationFeature.Servers, + DocumentationFeature.Security, + DocumentationFeature.ComponentSchemas, + DocumentationFeature.ComponentSecuritySchemes, + DocumentationFeature.ComponentRequestBodies, + DocumentationFeature.ComponentResponses, + DocumentationFeature.ComponentHeaders, + DocumentationFeature.ComponentParameters, + DocumentationFeature.Api + ) + .includeGlobalFeatures( + GlobalFeature.Components, + GlobalFeature.Servers, + GlobalFeature.Security, + GlobalFeature.Paths + ) + .includeComponentsFeatures( + ComponentsFeature.schemas, + ComponentsFeature.securitySchemes, + ComponentsFeature.requestBodies, + ComponentsFeature.responses, + ComponentsFeature.headers, + ComponentsFeature.parameters + ) + .includeSecurityFeatures( + SecurityFeature.ApiKey, + SecurityFeature.HTTP_Basic, + SecurityFeature.HTTP_Bearer + ) + .includeOperationFeatures( + OperationFeature.Security, + OperationFeature.Servers, + OperationFeature.Responses_Default, + OperationFeature.Responses_HttpStatusCode, + OperationFeature.Responses_RangedResponseCodes, + OperationFeature.Responses_RedirectionResponse + ) + .includeSchemaFeatures( + SchemaFeature.AdditionalProperties, + SchemaFeature.AllOf, + SchemaFeature.AnyOf, + SchemaFeature.Const, + SchemaFeature.Contains, + SchemaFeature.Default, + SchemaFeature.DependentRequired, + SchemaFeature.DependentSchemas, + // SchemaFeature.Discriminator, + SchemaFeature.Else, + SchemaFeature.Enum, + SchemaFeature.ExclusiveMaximum, + SchemaFeature.ExclusiveMinimum, + SchemaFeature.Format, + SchemaFeature.If, + SchemaFeature.Items, + SchemaFeature.MaxContains, + SchemaFeature.MaxItems, + SchemaFeature.MaxLength, + SchemaFeature.MaxProperties, + SchemaFeature.Maximum, + SchemaFeature.MinContains, + SchemaFeature.MinItems, + SchemaFeature.MinLength, + SchemaFeature.MinProperties, + SchemaFeature.Minimum, + SchemaFeature.MultipleOf, + SchemaFeature.Not, + SchemaFeature.Nullable, + SchemaFeature.OneOf, + SchemaFeature.Pattern, + SchemaFeature.PatternProperties, + SchemaFeature.PrefixItems, + SchemaFeature.Properties, + SchemaFeature.PropertyNames, + SchemaFeature.Ref, + SchemaFeature.Required, + SchemaFeature.Then, + SchemaFeature.Type, + SchemaFeature.UnevaluatedItems, + SchemaFeature.UnevaluatedProperties, + SchemaFeature.UniqueItems + ) + .build(); + public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder() + .name("java") + .language(GeneratorLanguage.JAVA) + .languageVersion("17") + .type(GeneratorType.CLIENT) + .stability(Stability.STABLE) + .featureSet(featureSet) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", "java", GeneratorType.CLIENT)) + .helpTxt( + String.join("
", + "Generates a Java client library", + "", + "Features in this generator:", + "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", + "- Very thorough documentation generated in the style of javadocs", + "- Input types constrained for a Schema in SomeSchema.validate", + " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", + "- Immutable List output classes generated and returned by validate for List<?> input", + "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", + "- Strictly typed list input can be instantiated in client code using generated ListBuilders", + "- Strictly typed map input can be instantiated in client code using generated MapBuilders", + " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", + "- Run time type checking and validation when", + " - validating schema payloads", + " - instantiating List output class (validation run)", + " - instantiating Map output class (validation run)", + " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", + "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", + "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", + " - ensuring that null pointer exceptions will not happen", + "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", + " - component schema names", + " - schema property names (a fallback setter is written in the MapBuilder)", + "- Generated interfaces are largely consistent with the python code", + "- Openapi spec inline schemas supported at any depth in any location", + "- Format support for: int32, int64, float, double, date, datetime, uuid", + "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", + "- enum types are generated for enums of type string/integer/number/boolean/null", + "- String transmission of numbers supported with type: string, format: number" + ) + ) + .build(); @Override public String toModuleFilename(String name, String jsonPath) { @@ -245,150 +386,16 @@ public JavaClientGenerator() { instantiationTypes.put("boolean", "boolean"); instantiationTypes.put("null", "Void (null)"); - modifyFeatureSet(features -> features - .includeDocumentationFeatures( - DocumentationFeature.Readme, - DocumentationFeature.Servers, - DocumentationFeature.Security, - DocumentationFeature.ComponentSchemas, - DocumentationFeature.ComponentSecuritySchemes, - DocumentationFeature.ComponentRequestBodies, - DocumentationFeature.ComponentResponses, - DocumentationFeature.ComponentHeaders, - DocumentationFeature.ComponentParameters, - DocumentationFeature.Api - ) - .includeGlobalFeatures( - GlobalFeature.Components, - GlobalFeature.Servers, - GlobalFeature.Security, - GlobalFeature.Paths - ) - .includeComponentsFeatures( - ComponentsFeature.schemas, - ComponentsFeature.securitySchemes, - ComponentsFeature.requestBodies, - ComponentsFeature.responses, - ComponentsFeature.headers, - ComponentsFeature.parameters - ) - .includeSecurityFeatures( - SecurityFeature.ApiKey, - SecurityFeature.HTTP_Basic, - SecurityFeature.HTTP_Bearer - ) - .includeOperationFeatures( - OperationFeature.Security, - OperationFeature.Servers, - OperationFeature.Responses_Default, - OperationFeature.Responses_HttpStatusCode, - OperationFeature.Responses_RangedResponseCodes, - OperationFeature.Responses_RedirectionResponse - ) - .includeSchemaFeatures( - SchemaFeature.AdditionalProperties, - SchemaFeature.AllOf, - SchemaFeature.AnyOf, - SchemaFeature.Const, - SchemaFeature.Contains, - SchemaFeature.Default, - SchemaFeature.DependentRequired, - SchemaFeature.DependentSchemas, - // SchemaFeature.Discriminator, - SchemaFeature.Else, - SchemaFeature.Enum, - SchemaFeature.ExclusiveMaximum, - SchemaFeature.ExclusiveMinimum, - SchemaFeature.Format, - SchemaFeature.If, - SchemaFeature.Items, - SchemaFeature.MaxContains, - SchemaFeature.MaxItems, - SchemaFeature.MaxLength, - SchemaFeature.MaxProperties, - SchemaFeature.Maximum, - SchemaFeature.MinContains, - SchemaFeature.MinItems, - SchemaFeature.MinLength, - SchemaFeature.MinProperties, - SchemaFeature.Minimum, - SchemaFeature.MultipleOf, - SchemaFeature.Not, - SchemaFeature.Nullable, - SchemaFeature.OneOf, - SchemaFeature.Pattern, - SchemaFeature.PatternProperties, - SchemaFeature.PrefixItems, - SchemaFeature.Properties, - SchemaFeature.PropertyNames, - SchemaFeature.Ref, - SchemaFeature.Required, - SchemaFeature.Then, - SchemaFeature.Type, - SchemaFeature.UnevaluatedItems, - SchemaFeature.UnevaluatedProperties, - SchemaFeature.UniqueItems - ) - ); - FeatureSet featureSet = getGeneratorMetadata().getFeatureSet(); - String generatorName = "java"; - GeneratorType generatorType = GeneratorType.CLIENT; - generatorMetadata = GeneratorMetadata.newBuilder() - .name(generatorName) - .language(GeneratorLanguage.JAVA) - .languageVersion("17") - .type(generatorType) - .stability(Stability.STABLE) - .featureSet(featureSet) - .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) - .helpTxt( - String.join("
", - "Generates a Java client library", - "", - "Features in this generator:", - "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", - "- Very thorough documentation generated in the style of javadocs", - "- Input types constrained for a Schema in SomeSchema.validate", - " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", - "- Immutable List output classes generated and returned by validate for List<?> input", - "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", - "- Strictly typed list input can be instantiated in client code using generated ListBuilders", - "- Strictly typed map input can be instantiated in client code using generated MapBuilders", - " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", - "- Run time type checking and validation when", - " - validating schema payloads", - " - instantiating List output class (validation run)", - " - instantiating Map output class (validation run)", - " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", - "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", - "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", - " - ensuring that null pointer exceptions will not happen", - "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", - " - component schema names", - " - schema property names (a fallback setter is written in the MapBuilder)", - "- Generated interfaces are largely consistent with the python code", - "- Openapi spec inline schemas supported at any depth in any location", - "- Format support for: int32, int64, float, double, date, datetime, uuid", - "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", - "- enum types are generated for enums of type string/integer/number/boolean/null", - "- String transmission of numbers supported with type: string, format: number" - ) - ) - .build(); - outputFolder = "generated-code" + File.separator + "java"; embeddedTemplateDir = templateDir = "java"; invokerPackage = "org.openapijsonschematools.client"; artifactId = "openapi-java-client"; - apiPackage = "apis"; modelPackage = "components.schemas"; // cliOptions default redefinition need to be updated updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); - updateOption(CodegenConstants.API_PACKAGE, apiPackage); +// updateOption(CodegenConstants.API_PACKAGE, apiPackage); jsonPathTestTemplateFiles.put( CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, @@ -427,7 +434,7 @@ public void processOpts() { } if (!additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) { - additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + additionalProperties.put(CodegenConstants.API_PACKAGE, generatorSettings().apiPackage); } if (additionalProperties.containsKey(CodegenConstants.GROUP_ID)) { @@ -2762,11 +2769,6 @@ private void sanitizeConfig() { // Sanitize any config options here. We also have to update the additionalProperties because // the whole additionalProperties object is injected into the main object passed to the mustache layer - this.setApiPackage(sanitizePackageName(apiPackage)); - if (additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) { - this.additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); - } - this.setModelPackage(sanitizePackageName(modelPackage)); this.setInvokerPackage(sanitizePackageName(invokerPackage)); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index dca017999ec..365b2209035 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -25,6 +25,8 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.generatormetadata.FeatureSet; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; import org.openapijsonschematools.codegen.generators.models.CliOption; @@ -33,11 +35,12 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.features.ComponentsFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.OperationFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SchemaFeature; +import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenDiscriminator; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPatternInfo; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenSchema; -import org.openapijsonschematools.codegen.generators.openapimodels.GeneratedFileType; +import org.openapijsonschematools.codegen.generators.models.GeneratedFileType; import org.openapijsonschematools.codegen.templating.SupportingFile; import org.openapijsonschematools.codegen.generators.generatormetadata.features.DataTypeFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.DocumentationFeature; @@ -59,7 +62,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.validation.constraints.NotNull; import java.io.File; import java.io.IOException; import java.time.OffsetDateTime; @@ -90,8 +92,6 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator protected Map regexModifiers; - private final String testFolder; - // A cache to efficiently look up a Schema instance based on the return value of `toModelName()`. private Map modelNameToSchemaCache; private final DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE; @@ -100,16 +100,191 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator private final HashMap modelNameCache = new HashMap<>(); protected String packageVersion = "1.0.0"; protected String projectName; // for setup.py, e.g. petstore-api + private final String testFolder; + + private static final FeatureSet featureSet = FeatureSet.newBuilder() + .includeDataTypeFeatures( + DataTypeFeature.Int32, + DataTypeFeature.Int64, + DataTypeFeature.Integer, + DataTypeFeature.Float, + DataTypeFeature.Double, + DataTypeFeature.Number, + DataTypeFeature.String, + DataTypeFeature.Binary, + DataTypeFeature.Boolean, + DataTypeFeature.Date, + DataTypeFeature.DateTime, + DataTypeFeature.Uuid, + DataTypeFeature.File, + DataTypeFeature.Array, + DataTypeFeature.Object, + DataTypeFeature.Null, + DataTypeFeature.AnyType, + DataTypeFeature.Enum + ) + .excludeDataTypeFeatures( + DataTypeFeature.Byte, + DataTypeFeature.Password + ) + .includeSchemaFeatures( + SchemaFeature.AdditionalProperties, + SchemaFeature.AllOf, + SchemaFeature.AnyOf, + SchemaFeature.Const, + SchemaFeature.Contains, + SchemaFeature.Default, + SchemaFeature.DependentRequired, + SchemaFeature.DependentSchemas, + SchemaFeature.Discriminator, + SchemaFeature.Else, + SchemaFeature.Enum, + SchemaFeature.ExclusiveMaximum, + SchemaFeature.ExclusiveMinimum, + SchemaFeature.Format, + SchemaFeature.If, + SchemaFeature.Items, + SchemaFeature.MaxContains, + SchemaFeature.MaxItems, + SchemaFeature.MaxLength, + SchemaFeature.MaxProperties, + SchemaFeature.Maximum, + SchemaFeature.MinContains, + SchemaFeature.MinItems, + SchemaFeature.MinLength, + SchemaFeature.MinProperties, + SchemaFeature.Minimum, + SchemaFeature.MultipleOf, + SchemaFeature.Not, + SchemaFeature.Nullable, + SchemaFeature.OneOf, + SchemaFeature.Pattern, + SchemaFeature.PatternProperties, + SchemaFeature.PrefixItems, + SchemaFeature.Properties, + SchemaFeature.PropertyNames, + SchemaFeature.Ref, + SchemaFeature.Required, + SchemaFeature.Then, + SchemaFeature.Type, + SchemaFeature.UnevaluatedItems, + SchemaFeature.UnevaluatedProperties, + SchemaFeature.UniqueItems + ) + .includeDocumentationFeatures( + DocumentationFeature.Readme, + DocumentationFeature.Servers, + DocumentationFeature.Security, + DocumentationFeature.ComponentSchemas, + DocumentationFeature.ComponentResponses, + DocumentationFeature.ComponentParameters, + DocumentationFeature.ComponentRequestBodies, + DocumentationFeature.ComponentHeaders, + DocumentationFeature.ComponentSecuritySchemes, + DocumentationFeature.Api + ) + .includeWireFormatFeatures(WireFormatFeature.JSON, WireFormatFeature.Custom) + .includeSecurityFeatures( + SecurityFeature.ApiKey, + SecurityFeature.HTTP_Basic, + SecurityFeature.HTTP_Bearer + ) + .includeGlobalFeatures( + GlobalFeature.Info, + GlobalFeature.Servers, + GlobalFeature.Paths, + GlobalFeature.Components, + GlobalFeature.Security, + GlobalFeature.Tags + ) + .includeComponentsFeatures( + ComponentsFeature.schemas, + ComponentsFeature.responses, + ComponentsFeature.parameters, + ComponentsFeature.requestBodies, + ComponentsFeature.headers, + ComponentsFeature.securitySchemes + ) + .includeParameterFeatures( + ParameterFeature.Name, + ParameterFeature.Required, + ParameterFeature.In_Path, + ParameterFeature.In_Query, + ParameterFeature.In_Header, + ParameterFeature.Style_Matrix, + ParameterFeature.Style_Label, + ParameterFeature.Style_Form, + ParameterFeature.Style_Simple, + ParameterFeature.Style_PipeDelimited, + ParameterFeature.Style_SpaceDelimited, + ParameterFeature.Explode, + ParameterFeature.Schema, + ParameterFeature.Content + ) + .includeOperationFeatures( + OperationFeature.Responses_Default, + OperationFeature.Responses_HttpStatusCode, + OperationFeature.Responses_RangedResponseCodes, + OperationFeature.Responses_RedirectionResponse, + OperationFeature.Security, + OperationFeature.Servers + ) + .build(); + public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder() + .name("python") + .language(GeneratorLanguage.PYTHON) + .languageVersion(">=3.8") + .type(GeneratorType.CLIENT) + .stability(Stability.STABLE) + .featureSet(featureSet) + .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", "python", GeneratorType.CLIENT)) + .helpTxt( + String.join("
", + "Generates a Python client library", + "", + "Features in this generator:", + "- type hints on endpoints and model creation", + "- model parameter names use the spec defined keys and cases", + "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", + "- endpoint parameter names use the spec defined keys and cases", + "- inline schemas are supported at any location including composition", + "- multiple content types supported in request body and response bodies", + "- run time type checking + json schema validation", + "- json schema keyword validation may be selectively disabled with SchemaConfiguration", + "- enums of type string/integer/boolean typed using typing.Literal", + "- mypy static type checking run on generated sample", + "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", + "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", + "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", + "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", + "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" + ) + ) + .build(); + + + public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { + String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); + String embeddedTemplateDir = "python"; + String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "openapi_client"); + this.generatorSettings = new CodeGeneratorSettings( + apiPackage, + workflowSettings.getOutputDir(), + workflowSettings.getTemplateDir(), + embeddedTemplateDir, + packageName + ); + testFolder = "test"; + } public PythonClientGenerator() { super(); + testFolder = "test"; loadDeepObjectIntoItems = false; importBaseType = false; addSchemaImportsFromV3SpecLocations = true; removeEnumValuePrefix = false; - packageName = "openapi_client"; - // from https://docs.python.org/3/reference/lexical_analysis.html#keywords setReservedWordsLowerCase( Arrays.asList( @@ -168,177 +343,14 @@ public PythonClientGenerator() { typeMapping.put("URI", "str"); typeMapping.put("null", "none_type"); - modifyFeatureSet(features -> features - .includeDataTypeFeatures( - DataTypeFeature.Int32, - DataTypeFeature.Int64, - DataTypeFeature.Integer, - DataTypeFeature.Float, - DataTypeFeature.Double, - DataTypeFeature.Number, - DataTypeFeature.String, - DataTypeFeature.Binary, - DataTypeFeature.Boolean, - DataTypeFeature.Date, - DataTypeFeature.DateTime, - DataTypeFeature.Uuid, - DataTypeFeature.File, - DataTypeFeature.Array, - DataTypeFeature.Object, - DataTypeFeature.Null, - DataTypeFeature.AnyType, - DataTypeFeature.Enum - ) - .excludeDataTypeFeatures( - DataTypeFeature.Byte, - DataTypeFeature.Password - ) - .includeSchemaFeatures( - SchemaFeature.AdditionalProperties, - SchemaFeature.AllOf, - SchemaFeature.AnyOf, - SchemaFeature.Const, - SchemaFeature.Contains, - SchemaFeature.Default, - SchemaFeature.DependentRequired, - SchemaFeature.DependentSchemas, - SchemaFeature.Discriminator, - SchemaFeature.Else, - SchemaFeature.Enum, - SchemaFeature.ExclusiveMaximum, - SchemaFeature.ExclusiveMinimum, - SchemaFeature.Format, - SchemaFeature.If, - SchemaFeature.Items, - SchemaFeature.MaxContains, - SchemaFeature.MaxItems, - SchemaFeature.MaxLength, - SchemaFeature.MaxProperties, - SchemaFeature.Maximum, - SchemaFeature.MinContains, - SchemaFeature.MinItems, - SchemaFeature.MinLength, - SchemaFeature.MinProperties, - SchemaFeature.Minimum, - SchemaFeature.MultipleOf, - SchemaFeature.Not, - SchemaFeature.Nullable, - SchemaFeature.OneOf, - SchemaFeature.Pattern, - SchemaFeature.PatternProperties, - SchemaFeature.PrefixItems, - SchemaFeature.Properties, - SchemaFeature.PropertyNames, - SchemaFeature.Ref, - SchemaFeature.Required, - SchemaFeature.Then, - SchemaFeature.Type, - SchemaFeature.UnevaluatedItems, - SchemaFeature.UnevaluatedProperties, - SchemaFeature.UniqueItems - ) - .includeDocumentationFeatures( - DocumentationFeature.Readme, - DocumentationFeature.Servers, - DocumentationFeature.Security, - DocumentationFeature.ComponentSchemas, - DocumentationFeature.ComponentResponses, - DocumentationFeature.ComponentParameters, - DocumentationFeature.ComponentRequestBodies, - DocumentationFeature.ComponentHeaders, - DocumentationFeature.ComponentSecuritySchemes, - DocumentationFeature.Api - ) - .includeWireFormatFeatures(WireFormatFeature.JSON, WireFormatFeature.Custom) - .includeSecurityFeatures( - SecurityFeature.ApiKey, - SecurityFeature.HTTP_Basic, - SecurityFeature.HTTP_Bearer - ) - .includeGlobalFeatures( - GlobalFeature.Info, - GlobalFeature.Servers, - GlobalFeature.Paths, - GlobalFeature.Components, - GlobalFeature.Security, - GlobalFeature.Tags - ) - .includeComponentsFeatures( - ComponentsFeature.schemas, - ComponentsFeature.responses, - ComponentsFeature.parameters, - ComponentsFeature.requestBodies, - ComponentsFeature.headers, - ComponentsFeature.securitySchemes - ) - .includeParameterFeatures( - ParameterFeature.Name, - ParameterFeature.Required, - ParameterFeature.In_Path, - ParameterFeature.In_Query, - ParameterFeature.In_Header, - ParameterFeature.Style_Matrix, - ParameterFeature.Style_Label, - ParameterFeature.Style_Form, - ParameterFeature.Style_Simple, - ParameterFeature.Style_PipeDelimited, - ParameterFeature.Style_SpaceDelimited, - ParameterFeature.Explode, - ParameterFeature.Schema, - ParameterFeature.Content - ) - .includeOperationFeatures( - OperationFeature.Responses_Default, - OperationFeature.Responses_HttpStatusCode, - OperationFeature.Responses_RangedResponseCodes, - OperationFeature.Responses_RedirectionResponse, - OperationFeature.Security, - OperationFeature.Servers - ) - ); - FeatureSet featureSet = getGeneratorMetadata().getFeatureSet(); String generatorName = "python"; GeneratorType generatorType = GeneratorType.CLIENT; - generatorMetadata = GeneratorMetadata.newBuilder() - .name(generatorName) - .language(GeneratorLanguage.PYTHON) - .languageVersion(">=3.8") - .type(generatorType) - .stability(Stability.STABLE) - .featureSet(featureSet) - .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", generatorName, generatorType)) - .helpTxt( - String.join("
", - "Generates a Python client library", - "", - "Features in this generator:", - "- type hints on endpoints and model creation", - "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", - "- endpoint parameter names use the spec defined keys and cases", - "- inline schemas are supported at any location including composition", - "- multiple content types supported in request body and response bodies", - "- run time type checking + json schema validation", - "- json schema keyword validation may be selectively disabled with SchemaConfiguration", - "- enums of type string/integer/boolean typed using typing.Literal", - "- mypy static type checking run on generated sample", - "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", - "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", - "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", - "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", - "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" - ) - ) - .build(); modelPackage = "components.schema"; - apiPackage = "apis"; outputFolder = "generated-code" + File.separatorChar + "python"; embeddedTemplateDir = templateDir = "python"; - testFolder = "test"; - // default HIDE_GENERATION_TIMESTAMP to true hideGenerationTimestamp = Boolean.TRUE; @@ -412,10 +424,6 @@ public PythonClientGenerator() { languageSpecificPrimitives.add("file_type"); languageSpecificPrimitives.add("none_type"); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.STABLE) - .build(); } @Override diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java index fd0c72d4864..1e347956ff6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java @@ -17,13 +17,40 @@ package org.openapijsonschematools.codegen.generators.generatorloader; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.Generator; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; public class GeneratorLoader { + public static Generator getGenerator(String name, GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { + ServiceLoader loader = ServiceLoader.load(Generator.class, Generator.class.getClassLoader()); + + StringBuilder availableConfigs = new StringBuilder(); + for (Generator config : loader) { + availableConfigs.append(config.getName()).append("\n"); + } + + GeneratorNotFoundException exc = new GeneratorNotFoundException("Can't load config class with name '".concat(name) + "'\nAvailable:\n" + availableConfigs); + for (Generator config : loader) { + if (config.getGeneratorMetadata().getName().equals(name)) { + try { + Constructor constructor = config.getClass().getDeclaredConstructor(GeneratorSettings.class, WorkflowSettings.class); + return (Generator) constructor.newInstance(generatorSettings, workflowSettings); + } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | + IllegalAccessException e) { + throw exc; + } + } + } + throw exc; + } + /** * Tries to load config class with SPI first, then with class name directly from classpath * diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java new file mode 100644 index 00000000000..51fa3f99704 --- /dev/null +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -0,0 +1,16 @@ +package org.openapijsonschematools.codegen.generators.models; + +public class CodeGeneratorSettings { + public final String apiPackage; + public final String outputFolder; + public final String templateDir; + public final String embeddedTemplateDir; + public final String packageName; + public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName) { + this.apiPackage = apiPackage; + this.outputFolder = outputFolder; + this.templateDir = templateDir; + this.embeddedTemplateDir = embeddedTemplateDir; + this.packageName = packageName; + } +} diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/GeneratedFileType.java similarity index 51% rename from src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java rename to src/main/java/org/openapijsonschematools/codegen/generators/models/GeneratedFileType.java index d1fde781212..1d47055c798 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/GeneratedFileType.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/GeneratedFileType.java @@ -1,4 +1,4 @@ -package org.openapijsonschematools.codegen.generators.openapimodels; +package org.openapijsonschematools.codegen.generators.models; public enum GeneratedFileType { CODE, diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/ReportFileType.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/ReportFileType.java new file mode 100644 index 00000000000..1bc59a51d01 --- /dev/null +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/ReportFileType.java @@ -0,0 +1,6 @@ +package org.openapijsonschematools.codegen.generators.models; + +public enum ReportFileType { + FILES, + VERSION +} diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java b/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java deleted file mode 100644 index 174326a4f66..00000000000 --- a/src/main/java/org/openapijsonschematools/codegen/generators/openapimodels/ReportFileType.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.openapijsonschematools.codegen.generators.openapimodels; - -public enum ReportFileType { - FILES, - VERSION -} diff --git a/src/main/resources/codegen/generatorClass.mustache b/src/main/resources/codegen/generatorClass.mustache index 03b73fb420e..e92dfcd5e08 100644 --- a/src/main/resources/codegen/generatorClass.mustache +++ b/src/main/resources/codegen/generatorClass.mustache @@ -164,12 +164,12 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig } /** - * Location to write api files. You can use the apiPackage() as defined when the class is + * Location to write api files. You can use the apiPackage as defined when the class is * instantiated */ @Override public String apiFileFolder() { - return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar); + return outputFolder + "/" + sourceFolder + "/" + generatorSettings().apiPackage.replace('.', File.separatorChar); } /** diff --git a/src/main/resources/codegen/kotlin/generatorClass.mustache b/src/main/resources/codegen/kotlin/generatorClass.mustache index dc4610337e2..97f008276ad 100644 --- a/src/main/resources/codegen/kotlin/generatorClass.mustache +++ b/src/main/resources/codegen/kotlin/generatorClass.mustache @@ -152,11 +152,11 @@ open class {{generatorClass}}() : DefaultCodegen(), CodegenConfig { } /** - * Location to write api files. You can use the apiPackage() as defined when the class is + * Location to write api files. You can use the apiPackage as defined when the class is * instantiated */ override fun apiFileFolder(): String { - return """$outputFolder/$sourceFolder/${apiPackage().replace('.', File.separatorChar)}""" + return """$outputFolder/$sourceFolder/${generatorSettings().apiPackage.replace('.', File.separatorChar)}""" } /** From 334c97e51938b6370feedf983336d937b23f4ee2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 14:51:55 -0700 Subject: [PATCH 07/44] Deprecates getOutputDir --- .../codegen/clicommands/AuthorTemplate.java | 2 +- .../codegen/clicommands/ConfigHelp.java | 2 +- .../codegen/clicommands/GenerateBatch.java | 3 +-- .../codegen/config/CodegenConfigurator.java | 3 +-- .../generatorrunner/DefaultGeneratorRunner.java | 6 +++--- .../codegen/generators/DefaultGenerator.java | 10 ---------- .../codegen/generators/Generator.java | 11 +++++------ .../codegen/generators/JavaClientGenerator.java | 14 +++++--------- .../generatorloader/GeneratorLoader.java | 1 + 9 files changed, 18 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java index 4ad3d07ac15..43977ff0940 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java @@ -40,7 +40,7 @@ public class AuthorTemplate extends AbstractCommand { @Override void execute() { - Generator config = GeneratorLoader.forName(generatorName); + Generator config = GeneratorLoader.getGenerator(generatorName, null, null); String templateDirectory = config.templateDir(); log("Requesting '{}' from embedded resource directory '{}'", generatorName, templateDirectory); diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 0bd117cbd95..46d8dc54696 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -107,7 +107,7 @@ public void execute() { try { StringBuilder sb = new StringBuilder(); - Generator config = GeneratorLoader.forName(generatorName); + Generator config = GeneratorLoader.getGenerator(generatorName, null, null); String desiredFormat = StringUtils.defaultIfBlank(format, FORMAT_TEXT); diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java index 27b1408366c..f146fc4d565 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java @@ -211,9 +211,8 @@ public void run() { Generator config = opts.config; name = config.getName(); - Path target = Paths.get(config.getOutputDir()); + Path target = Paths.get(config.outputFolder()); Path updated = rootDir.resolve(target); - config.setOutputDir(updated.toString()); if (this.clean) { cleanPreviousFiles(name, updated); diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 0c3cf10cb15..d650580efc9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -367,7 +367,7 @@ public Context toContext() { Validate.notEmpty(inputSpec, "input spec must be specified"); GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); - Generator config = GeneratorLoader.forName(generatorSettings.getGeneratorName()); + Generator config = GeneratorLoader.getGenerator(generatorSettings.getGeneratorName(), generatorSettings, null); if (isEmpty(templatingEngineName)) { // if templatingEngineName is empty check the config for a default String defaultTemplatingEngine = config.defaultTemplatingEngine(); @@ -474,7 +474,6 @@ public ClientOptInput toClientOptInput() { // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); - config.setOutputDir(workflowSettings.getOutputDir()); config.setSkipOverwrite(workflowSettings.isSkipOverwrite()); config.setIgnoreFilePathOverride(workflowSettings.getIgnoreFileOverride()); config.setRemoveOperationIdPrefix(workflowSettings.isRemoveOperationIdPrefix()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 137f7786035..bda83c1f0d9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -166,7 +166,7 @@ public GeneratorRunner opts(ClientOptInput opts) { } if (this.ignoreProcessor == null) { - this.ignoreProcessor = new CodegenIgnoreProcessor(generator.getOutputDir()); + this.ignoreProcessor = new CodegenIgnoreProcessor(generator.outputFolder()); } return this; } @@ -1725,7 +1725,7 @@ private void processUserDefinedTemplates() { } protected File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException { - return processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption, this.generator.getOutputDir()); + return processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption, this.generator.outputFolder()); } private File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption, String intendedOutputDir) throws IOException { @@ -1794,7 +1794,7 @@ private void generateFilesMetadata(List files) { if (generateMetadata) { try { StringBuilder sb = new StringBuilder(); - Path outDir = absPath(new File(this.generator.getOutputDir())); + Path outDir = absPath(new File(this.generator.outputFolder())); List filesToSort = new ArrayList<>(); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index a3aa5c4752d..ecad6babcf5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -785,16 +785,6 @@ public String outputFolder() { return outputFolder; } - @Override - public void setOutputDir(String dir) { - this.outputFolder = dir; - } - - @Override - public String getOutputDir() { - return outputFolder(); - } - @Override public String getInputSpec() { return inputSpec; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 5bc8abb79c9..ede2f0b63c1 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -69,12 +69,6 @@ public interface Generator extends OpenApiProcessor, Comparable { // todo move to generatorsettings String packageName(); - // todo move to generator settings - String getOutputDir(); - - // todo move to generator settings - void setOutputDir(String dir); - // todo deprecate this and make a key of api String toApiName(String name); @@ -364,4 +358,9 @@ default String getTestFilePath(String jsonPath) { default String apiPackage() { return generatorSettings().apiPackage; } + + @Deprecated + default String getOutputDir() { + return outputFolder(); + } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 442e7c22d82..143570f7e25 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -89,13 +89,17 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); String embeddedTemplateDir = "java"; String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "org.openapijsonschematools.client"); + String outputDir = workflowSettings.getOutputDir(); this.generatorSettings = new CodeGeneratorSettings( apiPackage, - workflowSettings.getOutputDir(), + outputDir, workflowSettings.getTemplateDir(), embeddedTemplateDir, packageName ); + if (this.outputTestFolder.isEmpty()) { + setOutputTestFolder(outputDir); + } } private final Logger LOGGER = LoggerFactory.getLogger(JavaClientGenerator.class); @@ -3352,14 +3356,6 @@ public void setSourceFolder(String sourceFolder) { this.sourceFolder = sourceFolder; } - @Override - public void setOutputDir(String dir) { - super.setOutputDir(dir); - if (this.outputTestFolder.isEmpty()) { - setOutputTestFolder(dir); - } - } - public void setOutputTestFolder(String outputTestFolder) { this.outputTestFolder = outputTestFolder; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java index 1e347956ff6..7971b28d254 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java @@ -57,6 +57,7 @@ public static Generator getGenerator(String name, GeneratorSettings generatorSet * @param name name of config, or full qualified class name in classpath * @return config class */ + @Deprecated public static Generator forName(String name) { ServiceLoader loader = ServiceLoader.load(Generator.class, Generator.class.getClassLoader()); From a0cc297df1df272078c549fe7b4127a599da7916 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 14:56:39 -0700 Subject: [PATCH 08/44] Deprecates outputFolder --- .../codegen/clicommands/GenerateBatch.java | 2 +- .../generatorrunner/DefaultGeneratorRunner.java | 14 +++++++------- .../codegen/generators/DefaultGenerator.java | 5 ----- .../codegen/generators/Generator.java | 8 +++++--- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java index f146fc4d565..3a7e250fd46 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/GenerateBatch.java @@ -211,7 +211,7 @@ public void run() { Generator config = opts.config; name = config.getName(); - Path target = Paths.get(config.outputFolder()); + Path target = Paths.get(config.generatorSettings().outputFolder); Path updated = rootDir.resolve(target); if (this.clean) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index bda83c1f0d9..f219025fe54 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -166,7 +166,7 @@ public GeneratorRunner opts(ClientOptInput opts) { } if (this.ignoreProcessor == null) { - this.ignoreProcessor = new CodegenIgnoreProcessor(generator.outputFolder()); + this.ignoreProcessor = new CodegenIgnoreProcessor(generator.generatorSettings().outputFolder); } return this; } @@ -1293,7 +1293,7 @@ private void generateSupportingFiles(List files, Map bundl for (SupportingFile support : generator.supportingFiles()) { try { - String outputFolder = generator.outputFolder(); + String outputFolder = generator.generatorSettings().outputFolder; if (StringUtils.isNotEmpty(support.getFolder())) { outputFolder += File.separator + support.getFolder(); } @@ -1327,7 +1327,7 @@ private void generateSupportingFiles(List files, Map bundl // Consider .openapi-generator-ignore a supporting file // Output .openapi-generator-ignore if it doesn't exist and wasn't explicitly created by a generator final String openapiGeneratorIgnore = ".openapi-generator-ignore"; - String ignoreFileNameTarget = generator.outputFolder() + File.separator + openapiGeneratorIgnore; + String ignoreFileNameTarget = generator.generatorSettings().outputFolder + File.separator + openapiGeneratorIgnore; File ignoreFile = new File(ignoreFileNameTarget); if (generateMetadata) { try { @@ -1725,7 +1725,7 @@ private void processUserDefinedTemplates() { } protected File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException { - return processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption, this.generator.outputFolder()); + return processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption, this.generator.generatorSettings().outputFolder); } private File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption, String intendedOutputDir) throws IOException { @@ -1759,7 +1759,7 @@ private static String generateParameterId(Parameter parameter) { * @param files The list tracking generated files */ private void generateVersionMetadata(List files) { - String versionMetadata = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.VERSION); + String versionMetadata = generator.generatorSettings().outputFolder + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.VERSION); if (generateMetadata) { File versionMetadataFile = new File(versionMetadata); try { @@ -1794,7 +1794,7 @@ private void generateFilesMetadata(List files) { if (generateMetadata) { try { StringBuilder sb = new StringBuilder(); - Path outDir = absPath(new File(this.generator.outputFolder())); + Path outDir = absPath(new File(this.generator.generatorSettings().outputFolder)); List filesToSort = new ArrayList<>(); @@ -1827,7 +1827,7 @@ private void generateFilesMetadata(List files) { } }); - String targetFile = generator.outputFolder() + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.FILES); + String targetFile = generator.generatorSettings().outputFolder + File.separator + METADATA_DIR + File.separator + generator.getReportFilename(ReportFileType.FILES); File filesFile = this.templateProcessor.writeToFile(targetFile, sb.toString().getBytes(StandardCharsets.UTF_8)); if (filesFile != null) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index ecad6babcf5..4e94393ec10 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -780,11 +780,6 @@ public List supportingFiles() { return supportingFiles; } - @Override - public String outputFolder() { - return outputFolder; - } - @Override public String getInputSpec() { return inputSpec; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index ede2f0b63c1..4f52bd9109a 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -57,9 +57,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodeGeneratorSettings generatorSettings(); - // todo move to generatorsettings - String outputFolder(); - // todo move to generatorsettings String templateDir(); @@ -359,6 +356,11 @@ default String apiPackage() { return generatorSettings().apiPackage; } + @Deprecated + default String outputFolder() { + return generatorSettings().outputFolder; + } + @Deprecated default String getOutputDir() { return outputFolder(); From bb78fffd87285eabfbb1289fb381ff52289da4b8 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 15:02:12 -0700 Subject: [PATCH 09/44] Deprecates templateDir --- .../codegen/clicommands/AuthorTemplate.java | 2 +- .../codegen/generators/DefaultGenerator.java | 15 --------------- .../codegen/generators/Generator.java | 10 ++++++---- .../GeneratorTemplateContentLocator.java | 2 +- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java index 43977ff0940..f4ef572eeb9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java @@ -41,7 +41,7 @@ public class AuthorTemplate extends AbstractCommand { @Override void execute() { Generator config = GeneratorLoader.getGenerator(generatorName, null, null); - String templateDirectory = config.templateDir(); + String templateDirectory = config.generatorSettings().templateDir; log("Requesting '{}' from embedded resource directory '{}'", generatorName, templateDirectory); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 4e94393ec10..8bc04db26b4 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -345,12 +345,6 @@ public void processOpts() { setTemplateEngineName((String) additionalProperties.get(CodegenConstants.TEMPLATING_ENGINE)); } - String usedTemplateDir = templateDir; - if (additionalProperties.containsKey(CodegenConstants.TEMPLATE_DIR)) { - this.setTemplateDir((String) additionalProperties.get(CodegenConstants.TEMPLATE_DIR)); - usedTemplateDir = (String) additionalProperties.get(CodegenConstants.TEMPLATE_DIR); - } - if (additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) { setHideGenerationTimestamp(convertPropertyToBooleanAndWriteBack(CodegenConstants.HIDE_GENERATION_TIMESTAMP)); } else { @@ -740,11 +734,6 @@ public String modelPackage() { return modelPackage; } - @Override - public String templateDir() { - return templateDir; - } - @Override public String embeddedTemplateDir() { if (embeddedTemplateDir != null) { @@ -790,10 +779,6 @@ public void setInputSpec(String inputSpec) { this.inputSpec = inputSpec; } - public void setTemplateDir(String templateDir) { - this.templateDir = templateDir; - } - public void setModelPackage(String modelPackage) { this.modelPackage = modelPackage; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 4f52bd9109a..54b16ff7ffe 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -57,9 +57,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodeGeneratorSettings generatorSettings(); - // todo move to generatorsettings - String templateDir(); - // todo move to generatorsettings String embeddedTemplateDir(); @@ -349,7 +346,6 @@ default String getTestFilePath(String jsonPath) { @Deprecated String modelPackagePathFragment(); - // 108 - 30 -> 78 @Deprecated default String apiPackage() { @@ -365,4 +361,10 @@ default String outputFolder() { default String getOutputDir() { return outputFolder(); } + + @Deprecated + default String templateDir() { + return generatorSettings().templateDir; + } + // 107 - 33 -> 74 } diff --git a/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java b/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java index 0bf9473266e..65030f70958 100644 --- a/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java +++ b/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java @@ -54,7 +54,7 @@ public String getFullTemplatePath(String relativeTemplateFile) { // check the supplied template main folder for the file // File.separator is necessary here as the file load is OS-specific - final String template = config.templateDir() + File.separator + relativeTemplateFile; + final String template = config.generatorSettings().templateDir + File.separator + relativeTemplateFile; // looks for user-defined file or classpath // supports template dir which refers to local file system or custom path in classpath as defined by templateDir if (new File(template).exists() || classpathTemplateExists(template)) { From da1eac18cce3f1a056e693c615b7fd342ef67fee Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 15:04:02 -0700 Subject: [PATCH 10/44] Deprecates embeddedTemplateDir --- .../codegen/generators/DefaultGenerator.java | 9 --------- .../codegen/generators/Generator.java | 10 ++++++---- .../templating/GeneratorTemplateContentLocator.java | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 8bc04db26b4..771a9b08fc2 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -734,15 +734,6 @@ public String modelPackage() { return modelPackage; } - @Override - public String embeddedTemplateDir() { - if (embeddedTemplateDir != null) { - return embeddedTemplateDir; - } else { - return templateDir; - } - } - @Deprecated public String toResponseModuleName(String componentName, String jsonPath) { return getFilename(CodegenKeyType.RESPONSE, componentName, jsonPath); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 54b16ff7ffe..edfcc891f5f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -57,9 +57,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodeGeneratorSettings generatorSettings(); - // todo move to generatorsettings - String embeddedTemplateDir(); - // todo move to generatorsettings String packageName(); @@ -366,5 +363,10 @@ default String getOutputDir() { default String templateDir() { return generatorSettings().templateDir; } - // 107 - 33 -> 74 + + @Deprecated + default String embeddedTemplateDir() { + return generatorSettings().templateDir; + } + // 107 - 34 -> 73 } diff --git a/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java b/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java index 65030f70958..d69b8da3578 100644 --- a/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java +++ b/src/main/java/org/openapijsonschematools/codegen/templating/GeneratorTemplateContentLocator.java @@ -62,7 +62,7 @@ public String getFullTemplatePath(String relativeTemplateFile) { } // Fall back to the template file for generator root directory embedded/packaged in the JAR file... - String loc = config.embeddedTemplateDir() + File.separator + relativeTemplateFile; + String loc = config.generatorSettings().embeddedTemplateDir + File.separator + relativeTemplateFile; // *only* looks for those files in classpath as defined by embeddedTemplateDir if (embeddedTemplateExists(loc)) { return loc; From 3e1b394c2482407e7be7a05f90ebbb9a0fb9c896 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 15:14:02 -0700 Subject: [PATCH 11/44] Deprecates packageName --- .../DefaultGeneratorRunner.java | 37 +++---------------- .../codegen/generators/DefaultGenerator.java | 8 +--- .../codegen/generators/Generator.java | 8 ++-- 3 files changed, 11 insertions(+), 42 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index f219025fe54..39f67ebc0e6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -352,7 +352,6 @@ private void configureOpenAPIInfo() { private void generateSchemaDocumentation(List files, CodegenSchema schema, String jsonPath, String docRoot, boolean shouldGenerate) { Map schemaData = new HashMap<>(); - schemaData.put("packageName", generator.packageName()); schemaData.put("schema", schema); schemaData.put("docRoot", docRoot); schemaData.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); @@ -362,7 +361,6 @@ private void generateSchemaDocumentation(List files, CodegenSchema schema, private void generateSchema(List files, CodegenSchema schema, String jsonPath) { Map schemaData = new HashMap<>(); - schemaData.put("packageName", generator.packageName()); schemaData.put("schema", schema); schemaData.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, CodegenConstants.MODELS, schemaData, generateModels); @@ -370,6 +368,8 @@ private void generateSchema(List files, CodegenSchema schema, String jsonP private void generateFile(Map templateData, String templateName, String outputFilename, List files, boolean shouldGenerate, String skippedByOption) { templateData.putAll(generator.additionalProperties()); + String packageName = generator.generatorSettings().packageName; + templateData.put("packageName", packageName); try { File written = processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption); if (written != null) { @@ -472,7 +472,6 @@ private void generatePathItem(List files, CodegenKey pathKey, CodegenPathI endpointInfo.put("pathItem", pathItem); endpointInfo.put("servers", servers); endpointInfo.put("security", security); - endpointInfo.put("packageName", generator.packageName()); endpointInfo.put("apiPackage", generator.generatorSettings().apiPackage); endpointInfo.put("headerSize", "#"); endpointInfo.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); @@ -644,7 +643,6 @@ private void generateContent(List files, LinkedHashMap files, CodegenResponse response, String jsonPath, String docRoot) { Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("response", response); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.RESPONSE, CodegenConstants.RESPONSES, templateData, true); templateData.put("headerSize", "#"); @@ -703,7 +701,6 @@ private TreeMap generateResponses(List files) { private void generateRequestBody(List files, CodegenRequestBody requestBody, String jsonPath, String docRoot) { Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("requestBody", requestBody); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.REQUEST_BODY, CodegenConstants.REQUEST_BODIES, templateData, true); @@ -716,7 +713,6 @@ private void generateRequestBody(List files, CodegenRequestBody requestBod private void generateSecurityScheme(List files, CodegenSecurityScheme securityScheme, String jsonPath) { Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("securityScheme", securityScheme); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SECURITY_SCHEME, CodegenConstants.SECURITY_SCHEMES, templateData, true); } @@ -747,7 +743,6 @@ private TreeMap generateSecuritySchemes(List templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("securityScheme", securityScheme); templateData.put("headerSize", "#"); templateData.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); @@ -762,7 +757,6 @@ private TreeMap generateSecuritySchemes(List files, CodegenRequestBody requestBody, String sourceJsonPath, String docRoot, boolean shouldGenerate) { // doc generation Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("requestBody", requestBody); templateData.put("headerSize", "#"); templateData.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); @@ -802,7 +796,6 @@ private TreeMap generateRequestBodies(List fil private void generateParameter(List files, CodegenParameter parameter, String jsonPath) { Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("parameter", parameter); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.PARAMETER, CodegenConstants.PARAMETERS, templateData, true); @@ -843,7 +836,6 @@ private TreeMap generateParameters(List files) { generateParameter(files, parameter, parameterJsonPath); Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("parameter", parameter); templateData.put("headerSize", "#"); templateData.put("identifierPieces", Collections.unmodifiableList(new ArrayList<>())); @@ -856,7 +848,6 @@ private TreeMap generateParameters(List files) { private void generateHeader(List files, CodegenHeader header, String jsonPath, String docRoot) { Map headertTemplateData = new HashMap<>(); - headertTemplateData.put("packageName", generator.packageName()); headertTemplateData.put("header", header); // header @@ -887,7 +878,7 @@ private void generateXDocs(List files, String jsonPath, CodegenConstants.J HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); - templateData.put("packageName", generator.packageName()); + templateData.put("packageName", generator.generatorSettings().packageName); templateData.put("modelPackage", generator.modelPackage()); if (templateInfo != null && !templateInfo.isEmpty()) { templateData.putAll(templateInfo); @@ -918,7 +909,7 @@ private void generateXTests(List files, String jsonPath, CodegenConstants. HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); - templateData.put("packageName", generator.packageName()); + templateData.put("packageName", generator.generatorSettings().packageName); templateData.put("modelPackage", generator.modelPackage()); if (templateInfo != null && !templateInfo.isEmpty()) { templateData.putAll(templateInfo); @@ -954,7 +945,7 @@ private void generateXs(List files, String jsonPath, CodegenConstants.JSON HashMap templateData = new HashMap<>(); templateData.putAll(generator.additionalProperties()); - templateData.put("packageName", generator.packageName()); + templateData.put("packageName", generator.generatorSettings().packageName); templateData.put("modelPackage", generator.modelPackage()); if (templateInfo != null && !templateInfo.isEmpty()) { templateData.putAll(templateInfo); @@ -999,7 +990,6 @@ private TreeMap generateHeaders(List files) { // documentation Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("header", header); templateData.put("headerSize", "#"); templateData.put("docRoot", "../../"); @@ -1072,7 +1062,6 @@ protected TreeMap generateSchemas(List files) { // to generate model test files Map schemaData = new HashMap<>(); - schemaData.put("packageName", generator.packageName()); schemaData.put("schema", schema); if (generateModelTests) { generateXTests(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, CodegenConstants.MODELS, schemaData, true); @@ -1117,8 +1106,6 @@ void generateApis(List files, TreeMap paths) String apiFileName = apiPathEntry.getValue(); String thisJsonPath = jsonPath + "/paths"; Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + apiFileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); } @@ -1138,8 +1125,6 @@ void generateApis(List files, TreeMap paths) String templateFile = apiPathEntry.getKey(); String suffix = apiPathEntry.getValue(); Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); apiData.put("path", path); apiData.put("pathItem", pathItem); String thisJsonPath = jsonPath + "/paths/" + ModelUtils.encodeSlashes(path.original); @@ -1156,8 +1141,6 @@ void generateApis(List files, TreeMap paths) String thisJsonPath = jsonPath + "/paths/" + ModelUtils.encodeSlashes(path.original); String outputFile = generator.getFilePath(GeneratedFileType.DOCUMENTATION, thisJsonPath) + fileName; Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); apiData.put("path", path); apiData.put("pathItem", pathItem); apiData.put("docRoot", "../../"); @@ -1200,8 +1183,6 @@ void generateApis(List files, TreeMap paths) String templateFile = entry.getKey(); String fileName = entry.getValue(); Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); apiData.put("apiClassname", "Api"); apiData.put("tagToPathToOperations", tagToPathToOperations); apiData.put("paths", paths); @@ -1217,8 +1198,6 @@ void generateApis(List files, TreeMap paths) String templateFile = apiPathEntry.getKey(); String fileName = apiPathEntry.getValue(); Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); String thisJsonPath = jsonPath + "/tags"; String outputFile = generator.getFilePath(GeneratedFileType.CODE, thisJsonPath) + fileName; generateFile(apiData, templateFile, outputFile, files, true, CodegenConstants.APIS); @@ -1236,8 +1215,6 @@ void generateApis(List files, TreeMap paths) } Map apiData = new HashMap<>(); - String packageName = generator.packageName(); - apiData.put("packageName", packageName); apiData.put("tag", tag); apiData.put("pathToOperations", pathToOperations); apiData.put("operations", operations); @@ -1444,7 +1421,6 @@ private void generateServers(List files, CodegenList server return; } Map serversTemplateData = new HashMap<>(); - serversTemplateData.put("packageName", generator.packageName()); serversTemplateData.put("servers", servers); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SERVERS, CodegenConstants.SERVERS, serversTemplateData, true); serversTemplateData.put("headerSize", "#"); @@ -1454,7 +1430,6 @@ private void generateServers(List files, CodegenList server int i = 0; for (CodegenServer server: servers) { Map templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("server", server); String serverJsonPath = jsonPath + "/" + i; generateXs(files, serverJsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SERVER, CodegenConstants.SERVERS, templateData, true); @@ -1498,7 +1473,6 @@ private void generateSecurity(List files, CodegenList securityTemplateData = new HashMap<>(); - securityTemplateData.put("packageName", generator.packageName()); securityTemplateData.put("security", security); generateXs(files, jsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SECURITIES, CodegenConstants.SECURITY, securityTemplateData, true); securityTemplateData.put("headerSize", "#"); @@ -1508,7 +1482,6 @@ private void generateSecurity(List files, CodegenList templateData = new HashMap<>(); - templateData.put("packageName", generator.packageName()); templateData.put("securityRequirementObject", securityRequirementObject); String securityJsonPath = jsonPath + "/" + i; generateXs(files, securityJsonPath, CodegenConstants.JSON_PATH_LOCATION_TYPE.SECURITY, CodegenConstants.SECURITY, templateData, true); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 771a9b08fc2..3c6dd88cbee 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -472,12 +472,6 @@ protected Map getModelNameToSchemaCache() { return modelNameToSchemaCache; } - @Override - public String packageName() { - // used to generate imports - return packageName; - } - public String packagePath() { return packageName.replace('.', File.separatorChar); } @@ -1806,7 +1800,7 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu String complexType = mm.modelName; if (shouldAddImport(complexType)) { String refModule = complexType.split("\\.")[0]; - String refModuleLocation = packageName() + ".components.schema"; + String refModuleLocation = generatorSettings.packageName + ".components.schema"; CodegenRefInfo refInfo = new CodegenRefInfo<>(new CodegenSchema(), null, refModule, refModuleLocation, null); imports.add(getImport(refInfo)); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index edfcc891f5f..daac9d3351e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -57,9 +57,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodeGeneratorSettings generatorSettings(); - // todo move to generatorsettings - String packageName(); - // todo deprecate this and make a key of api String toApiName(String name); @@ -368,5 +365,10 @@ default String templateDir() { default String embeddedTemplateDir() { return generatorSettings().templateDir; } + + @Deprecated + default String packageName() { + return generatorSettings().packageName; + } // 107 - 34 -> 73 } From b6a68ea455ed9b8e8632ab4bee8785f12d857a07 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 15:47:33 -0700 Subject: [PATCH 12/44] Passes strict spec behaviort in generator new --- .../codegen/config/CodegenConfigurator.java | 1 - .../DefaultGeneratorRunner.java | 5 --- .../codegen/generators/DefaultGenerator.java | 32 ++----------------- .../codegen/generators/Generator.java | 23 ++++++++----- .../generators/JavaClientGenerator.java | 3 +- .../generators/PythonClientGenerator.java | 3 +- .../models/CodeGeneratorSettings.java | 4 ++- .../DefaultGeneratorRunnerTest.java | 22 +++++++------ 8 files changed, 36 insertions(+), 57 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index d650580efc9..c423056ee1e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -480,7 +480,6 @@ public ClientOptInput toClientOptInput() { config.setSkipOperationExample(workflowSettings.isSkipOperationExample()); config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); config.setEnableMinimalUpdate(workflowSettings.isEnableMinimalUpdate()); - config.setStrictSpecBehavior(workflowSettings.isStrictSpecBehavior()); config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 39f67ebc0e6..bbbbc4f3a92 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -130,11 +130,6 @@ private void setTemplateProcessor() { } else { TemplatingEngineAdapter templatingEngine = this.generator.getTemplatingEngine(); - if (templatingEngine instanceof MustacheEngineAdapter) { - MustacheEngineAdapter mustacheEngineAdapter = (MustacheEngineAdapter) templatingEngine; - mustacheEngineAdapter.setCompiler(this.generator.processCompiler(mustacheEngineAdapter.getCompiler())); - } - TemplatePathLocator commonTemplateLocator = new CommonTemplateContentLocator(); TemplatePathLocator generatorTemplateLocator = new GeneratorTemplateContentLocator(this.generator); this.templateProcessor = new TemplateManager( diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 3c6dd88cbee..ef9f186d255 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -25,7 +25,6 @@ import com.github.curiousoddman.rgxgen.config.RgxGenProperties; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; -import com.samskivert.mustache.Mustache.Compiler; import com.samskivert.mustache.Mustache.Lambda; import io.swagger.v3.oas.models.Components; @@ -112,7 +111,6 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; import java.util.function.Function; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -146,7 +144,8 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.getOutputDir(), workflowSettings.getTemplateDir(), embeddedTemplateDir, - packageName + packageName, + workflowSettings.isStrictSpecBehavior() ); } @@ -307,8 +306,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo // flag to indicate whether to only update files whose contents have changed protected boolean enableMinimalUpdate = false; - // acts strictly upon a spec, potentially modifying it to have consistent behavior across generators. - protected boolean strictSpecBehavior = true; // flag to indicate whether enum value prefixes are removed protected boolean removeEnumValuePrefix = true; @@ -487,13 +484,6 @@ public TreeMap updateAllModels(TreeMap postProcessModels(TreeMap models) { - return models; - } - /** * Returns the common prefix of variables for enum naming if * two or more variables are present @@ -608,13 +598,6 @@ public void preprocessOpenAPI(OpenAPI openAPI) { public void processOpenAPI(OpenAPI openAPI) { } - // override with any special handling of the JMustache compiler - @Override - @SuppressWarnings("unused") - public Compiler processCompiler(Compiler compiler) { - return compiler; - } - // override with any special text escaping logic @Override @SuppressWarnings("static-method") @@ -5280,17 +5263,6 @@ public void setEnableMinimalUpdate(boolean enableMinimalUpdate) { this.enableMinimalUpdate = enableMinimalUpdate; } - /** - * Sets the boolean valid indicating whether generation will work strictly against the specification, potentially making - * minor changes to the input document. - * - * @param strictSpecBehavior true if we will behave strictly, false to allow specification documents which pass validation to be loosely interpreted against the spec. - */ - @Override - public void setStrictSpecBehavior(final boolean strictSpecBehavior) { - this.strictSpecBehavior = strictSpecBehavior; - } - /** * Get the boolean value indicating whether to remove enum value prefixes */ diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index daac9d3351e..30262e18828 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -77,6 +77,7 @@ public interface Generator extends OpenApiProcessor, Comparable { String escapeQuotationMark(String input); + // todo deprecate this and move it into new void processOpts(); List cliOptions(); @@ -85,8 +86,10 @@ public interface Generator extends OpenApiProcessor, Comparable { List supportingFiles(); + // todo deprecate this String getInputSpec(); + // todo remove this, pass in new void setInputSpec(String inputSpec); // todo deprecate this @@ -98,13 +101,12 @@ public interface Generator extends OpenApiProcessor, Comparable { Set languageSpecificPrimitives(); + // todo remove + move this into the new constructor void preprocessOpenAPI(OpenAPI openAPI); + // todo remove and move this into the new constructor void processOpenAPI(OpenAPI openAPI); - // todo remove this because it is unused - Compiler processCompiler(Compiler compiler); - // todo deprecate this, use getKey with api type String toApiFilename(String name); @@ -116,12 +118,11 @@ public interface Generator extends OpenApiProcessor, Comparable { TreeMap updateAllModels(TreeMap models); + // todo remove and use postGenerationMsg in generationMetadata void postProcess(); TreeMap postProcessAllModels(TreeMap schemas); - TreeMap postProcessModels(TreeMap models); - Map postProcessSupportingFileData(Map data); void postProcessModelProperty(CodegenSchema model, CodegenSchema property); @@ -134,10 +135,13 @@ public interface Generator extends OpenApiProcessor, Comparable { boolean isSkipOverwrite(); + // todo remove this, set in new void setSkipOverwrite(boolean skipOverwrite); + // todo remove this, set in new void setRemoveOperationIdPrefix(boolean removeOperationIdPrefix); + // todo remove this set in new void setSkipOperationExample(boolean skipOperationExample); boolean isHideGenerationTimestamp(); @@ -146,8 +150,10 @@ public interface Generator extends OpenApiProcessor, Comparable { void setDocExtension(String docExtension); + // todo remove this set in new void setIgnoreFilePathOverride(String ignoreFileOverride); + // todo deprecate and use settings String getIgnoreFilePathOverride(); String sanitizeName(String name); @@ -156,6 +162,7 @@ public interface Generator extends OpenApiProcessor, Comparable { boolean isEnablePostProcessFile(); + // todo remove this, set in new void setEnablePostProcessFile(boolean isEnablePostProcessFile); /** @@ -165,16 +172,16 @@ public interface Generator extends OpenApiProcessor, Comparable { */ void setOpenAPI(OpenAPI openAPI); + // todo remove this set in new void setTemplateEngineName(String name); TemplatingEngineAdapter getTemplatingEngine(); boolean isEnableMinimalUpdate(); + // todo remove this set in new void setEnableMinimalUpdate(boolean isEnableMinimalUpdate); - void setStrictSpecBehavior(boolean strictSpecBehavior); - CodegenPatternInfo getPatternInfo(String pattern); boolean isRemoveEnumValuePrefix(); @@ -370,5 +377,5 @@ default String embeddedTemplateDir() { default String packageName() { return generatorSettings().packageName; } - // 107 - 34 -> 73 + // 107 - 36 -> 71 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 143570f7e25..ae9e75516e0 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -95,7 +95,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings outputDir, workflowSettings.getTemplateDir(), embeddedTemplateDir, - packageName + packageName, + workflowSettings.isStrictSpecBehavior() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 365b2209035..c3848102a96 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -272,7 +272,8 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.getOutputDir(), workflowSettings.getTemplateDir(), embeddedTemplateDir, - packageName + packageName, + workflowSettings.isStrictSpecBehavior() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 51fa3f99704..0134fe9c403 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -6,11 +6,13 @@ public class CodeGeneratorSettings { public final String templateDir; public final String embeddedTemplateDir; public final String packageName; - public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName) { + public final boolean strictSpecBehavior; + public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; this.templateDir = templateDir; this.embeddedTemplateDir = embeddedTemplateDir; this.packageName = packageName; + this.strictSpecBehavior = strictSpecBehavior; } } diff --git a/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java b/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java index 62029d77118..d93bcea4b50 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java @@ -13,6 +13,8 @@ import io.swagger.v3.oas.models.responses.ApiResponses; import org.openapijsonschematools.codegen.TestUtils; import org.openapijsonschematools.codegen.config.ClientOptInput; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.DefaultGenerator; import org.openapijsonschematools.codegen.generators.Generator; import org.openapijsonschematools.codegen.common.CodegenConstants; @@ -279,8 +281,8 @@ public void testNonStrictFromPaths() throws Exception { openAPI.getPaths().addPathItem("path1/", new PathItem().get(new Operation().operationId("op1").responses(new ApiResponses().addApiResponse("201", new ApiResponse().description("OK"))))); openAPI.getPaths().addPathItem("path2/", new PathItem().get(new Operation().operationId("op2").addParametersItem(new QueryParameter().name("p1").schema(new StringSchema())).responses(new ApiResponses().addApiResponse("201", new ApiResponse().description("OK"))))); - Generator config = new DefaultGenerator(); - config.setStrictSpecBehavior(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withStrictSpecBehavior(false).build(); + Generator config = new DefaultGenerator(null, ws); ClientOptInput opts = new ClientOptInput( openAPI, config, @@ -335,9 +337,9 @@ public void testFromPaths() throws Exception { @Test public void testRefModelValidationProperties() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/refAliasedPrimitiveWithValidation.yml"); - DefaultGenerator config = new DefaultGenerator(); + WorkflowSettings ws = WorkflowSettings.newBuilder().withStrictSpecBehavior(false).build(); + DefaultGenerator config = new DefaultGenerator(null, ws); config.setModelPackage("components.schema"); - config.setStrictSpecBehavior(false); ClientOptInput opts = new ClientOptInput( openAPI, config, @@ -598,8 +600,8 @@ public void testCustomNonLibraryTemplates() throws IOException { @Test public void testHandlesTrailingSlashInServers() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_7533.yaml"); - DefaultGenerator config = new DefaultGenerator(); - config.setStrictSpecBehavior(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withStrictSpecBehavior(false).build(); + DefaultGenerator config = new DefaultGenerator(null, ws); ClientOptInput opts = new ClientOptInput( openAPI, config, @@ -622,8 +624,8 @@ public void testHandlesTrailingSlashInServers() { @Test public void testHandlesRelativeUrlsInServers() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10056.yaml"); - DefaultGenerator config = new DefaultGenerator(); - config.setStrictSpecBehavior(true); + WorkflowSettings ws = WorkflowSettings.newBuilder().withStrictSpecBehavior(true).build(); + DefaultGenerator config = new DefaultGenerator(null, ws); ClientOptInput opts = new ClientOptInput( openAPI, config, @@ -704,8 +706,8 @@ public void testProcessUserDefinedTemplatesWithConfig() throws IOException { @Test public void testRecursionBug4650() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/bugs/recursion-bug-4650.yaml"); - DefaultGenerator config = new DefaultGenerator(); - config.setStrictSpecBehavior(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withStrictSpecBehavior(false).build(); + DefaultGenerator config = new DefaultGenerator(null, ws); ClientOptInput opts = new ClientOptInput( openAPI, config, From e403f1c2325fd8122336e5650a2c668f05df6a08 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 15:54:19 -0700 Subject: [PATCH 13/44] Deprecates isEnableMinimalUpdate --- .../codegen/config/CodegenConfigurator.java | 1 - .../DefaultGeneratorRunner.java | 5 ++++- .../codegen/generators/DefaultGenerator.java | 22 ++----------------- .../codegen/generators/Generator.java | 10 ++++----- .../generators/JavaClientGenerator.java | 3 ++- .../generators/PythonClientGenerator.java | 3 ++- .../models/CodeGeneratorSettings.java | 4 +++- 7 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index c423056ee1e..05389e55f03 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -479,7 +479,6 @@ public ClientOptInput toClientOptInput() { config.setRemoveOperationIdPrefix(workflowSettings.isRemoveOperationIdPrefix()); config.setSkipOperationExample(workflowSettings.isSkipOperationExample()); config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); - config.setEnableMinimalUpdate(workflowSettings.isEnableMinimalUpdate()); config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index bbbbc4f3a92..f8fbc88126e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -123,7 +123,10 @@ public DefaultGeneratorRunner(Boolean dryRun) { private void setTemplateProcessor() { // must be called after processOptions - TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions(this.generator.isEnableMinimalUpdate(), this.generator.isSkipOverwrite()); + TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions( + this.generator.generatorSettings().enableMinimalUpdate, + this.generator.isSkipOverwrite() + ); if (this.dryRun) { this.templateProcessor = new DryRunTemplateManager(templateManagerOptions); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index ef9f186d255..bb49b148b88 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -145,7 +145,8 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.getTemplateDir(), embeddedTemplateDir, packageName, - workflowSettings.isStrictSpecBehavior() + workflowSettings.isStrictSpecBehavior(), + workflowSettings.isEnableMinimalUpdate() ); } @@ -303,7 +304,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo // flag to indicate whether to use environment variable to post process file protected boolean enablePostProcessFile = false; - // flag to indicate whether to only update files whose contents have changed protected boolean enableMinimalUpdate = false; // flag to indicate whether enum value prefixes are removed @@ -5245,24 +5245,6 @@ public void setEnablePostProcessFile(boolean enablePostProcessFile) { this.enablePostProcessFile = enablePostProcessFile; } - /** - * Get the boolean value indicating the state of the option for updating only changed files - */ - @Override - public boolean isEnableMinimalUpdate() { - return enableMinimalUpdate; - } - - /** - * Set the boolean value indicating the state of the option for updating only changed files - * - * @param enableMinimalUpdate true to enable minimal update - */ - @Override - public void setEnableMinimalUpdate(boolean enableMinimalUpdate) { - this.enableMinimalUpdate = enableMinimalUpdate; - } - /** * Get the boolean value indicating whether to remove enum value prefixes */ diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 30262e18828..436fd0bafd4 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -177,11 +177,6 @@ public interface Generator extends OpenApiProcessor, Comparable { TemplatingEngineAdapter getTemplatingEngine(); - boolean isEnableMinimalUpdate(); - - // todo remove this set in new - void setEnableMinimalUpdate(boolean isEnableMinimalUpdate); - CodegenPatternInfo getPatternInfo(String pattern); boolean isRemoveEnumValuePrefix(); @@ -377,5 +372,10 @@ default String embeddedTemplateDir() { default String packageName() { return generatorSettings().packageName; } + + @Deprecated + default boolean isEnableMinimalUpdate() { + return generatorSettings().enableMinimalUpdate; + } // 107 - 36 -> 71 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index ae9e75516e0..8c62f9abfc7 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -96,7 +96,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings.getTemplateDir(), embeddedTemplateDir, packageName, - workflowSettings.isStrictSpecBehavior() + workflowSettings.isStrictSpecBehavior(), + workflowSettings.isEnableMinimalUpdate() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index c3848102a96..5b3cc19b111 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -273,7 +273,8 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.getTemplateDir(), embeddedTemplateDir, packageName, - workflowSettings.isStrictSpecBehavior() + workflowSettings.isStrictSpecBehavior(), + workflowSettings.isEnableMinimalUpdate() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 0134fe9c403..ec120716f95 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -7,12 +7,14 @@ public class CodeGeneratorSettings { public final String embeddedTemplateDir; public final String packageName; public final boolean strictSpecBehavior; - public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior) { + public final boolean enableMinimalUpdate; // flag to indicate whether to only update files whose contents have changed + public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; this.templateDir = templateDir; this.embeddedTemplateDir = embeddedTemplateDir; this.packageName = packageName; this.strictSpecBehavior = strictSpecBehavior; + this.enableMinimalUpdate = enableMinimalUpdate; } } From 536b16abb4dba328f0f167019f3d750482f4761d Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 16:04:34 -0700 Subject: [PATCH 14/44] Removes setRemoveOperationIdPrefix --- .../codegen/config/CodegenConfigurator.java | 2 -- .../DefaultGeneratorRunner.java | 2 +- .../codegen/generators/DefaultGenerator.java | 29 +++---------------- .../codegen/generators/Generator.java | 15 ++++------ .../generators/JavaClientGenerator.java | 4 ++- .../generators/PythonClientGenerator.java | 4 ++- .../models/CodeGeneratorSettings.java | 6 +++- 7 files changed, 22 insertions(+), 40 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 05389e55f03..76a666ce7fe 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -474,9 +474,7 @@ public ClientOptInput toClientOptInput() { // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); - config.setSkipOverwrite(workflowSettings.isSkipOverwrite()); config.setIgnoreFilePathOverride(workflowSettings.getIgnoreFileOverride()); - config.setRemoveOperationIdPrefix(workflowSettings.isRemoveOperationIdPrefix()); config.setSkipOperationExample(workflowSettings.isSkipOperationExample()); config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index f8fbc88126e..0322eacba42 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -125,7 +125,7 @@ private void setTemplateProcessor() { // must be called after processOptions TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions( this.generator.generatorSettings().enableMinimalUpdate, - this.generator.isSkipOverwrite() + this.generator.generatorSettings().skipOverwrite ); if (this.dryRun) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index bb49b148b88..e2d5393c8c3 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -146,7 +146,9 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo embeddedTemplateDir, packageName, workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate() + workflowSettings.isEnableMinimalUpdate(), + workflowSettings.isSkipOverwrite(), + workflowSettings.isRemoveOperationIdPrefix() ); } @@ -263,8 +265,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo */ protected List supportingFiles = new ArrayList<>(); protected List cliOptions = new ArrayList<>(); - protected boolean skipOverwrite; - protected boolean removeOperationIdPrefix; protected String removeOperationIdPrefixDelimiter = "_"; protected int removeOperationIdPrefixCount = 1; protected boolean skipOperationExample; @@ -369,11 +369,6 @@ public void processOpts() { this.setModelNameSuffix((String) additionalProperties.get(CodegenConstants.MODEL_NAME_SUFFIX)); } - if (additionalProperties.containsKey(CodegenConstants.REMOVE_OPERATION_ID_PREFIX)) { - this.setRemoveOperationIdPrefix(Boolean.parseBoolean(additionalProperties - .get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX).toString())); - } - if (additionalProperties.containsKey(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER)) { this.setRemoveOperationIdPrefixDelimiter(additionalProperties .get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER).toString()); @@ -2522,7 +2517,7 @@ protected CodegenKey getOperationId(Operation operation, String path, String htt String operationId = getOrGenerateOperationId(operation, path, httpMethod); // remove prefix in operationId - if (removeOperationIdPrefix) { + if (generatorSettings.removeOperationIdPrefix) { // The prefix is everything before the removeOperationIdPrefixCount occurrence of removeOperationIdPrefixDelimiter String[] components = operationId.split("[" + removeOperationIdPrefixDelimiter + "]"); if (components.length > 1) { @@ -4141,22 +4136,6 @@ public String getFilePath(GeneratedFileType type, String jsonPath) { .collect(Collectors.toList()); return String.join(File.separator, codePieces); } - - - @Override - public boolean isSkipOverwrite() { - return skipOverwrite; - } - - @Override - public void setSkipOverwrite(boolean skipOverwrite) { - this.skipOverwrite = skipOverwrite; - } - - @Override - public void setRemoveOperationIdPrefix(boolean removeOperationIdPrefix) { - this.removeOperationIdPrefix = removeOperationIdPrefix; - } public void setRemoveOperationIdPrefixDelimiter(String removeOperationIdPrefixDelimiter) { this.removeOperationIdPrefixDelimiter = removeOperationIdPrefixDelimiter; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 436fd0bafd4..ce6ec51ad9f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -133,14 +133,6 @@ public interface Generator extends OpenApiProcessor, Comparable { String getFilePath(GeneratedFileType type, String jsonPath); - boolean isSkipOverwrite(); - - // todo remove this, set in new - void setSkipOverwrite(boolean skipOverwrite); - - // todo remove this, set in new - void setRemoveOperationIdPrefix(boolean removeOperationIdPrefix); - // todo remove this set in new void setSkipOperationExample(boolean skipOperationExample); @@ -377,5 +369,10 @@ default String packageName() { default boolean isEnableMinimalUpdate() { return generatorSettings().enableMinimalUpdate; } - // 107 - 36 -> 71 + + @Deprecated + default boolean isSkipOverwrite() { + return generatorSettings().skipOverwrite; + } + // 102 - 38 -> 64 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 8c62f9abfc7..b7c6c672ae1 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -97,7 +97,9 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings embeddedTemplateDir, packageName, workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate() + workflowSettings.isEnableMinimalUpdate(), + workflowSettings.isSkipOverwrite(), + workflowSettings.isRemoveOperationIdPrefix() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 5b3cc19b111..cf45ce16b80 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -274,7 +274,9 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin embeddedTemplateDir, packageName, workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate() + workflowSettings.isEnableMinimalUpdate(), + workflowSettings.isSkipOverwrite(), + workflowSettings.isRemoveOperationIdPrefix() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index ec120716f95..78f9b297d49 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -8,7 +8,9 @@ public class CodeGeneratorSettings { public final String packageName; public final boolean strictSpecBehavior; public final boolean enableMinimalUpdate; // flag to indicate whether to only update files whose contents have changed - public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate) { + public final boolean skipOverwrite; + public final boolean removeOperationIdPrefix; + public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate, boolean skipOverwrite, boolean removeOperationIdPrefix) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; this.templateDir = templateDir; @@ -16,5 +18,7 @@ public CodeGeneratorSettings(String apiPackage, String outputFolder, String temp this.packageName = packageName; this.strictSpecBehavior = strictSpecBehavior; this.enableMinimalUpdate = enableMinimalUpdate; + this.skipOverwrite = skipOverwrite; + this.removeOperationIdPrefix = removeOperationIdPrefix; } } From 8c1aa590271008d1e87392491c77d3858cc12449 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 16:10:35 -0700 Subject: [PATCH 15/44] Updates IgnoreFilePathOverride --- .../codegen/config/CodegenConfigurator.java | 1 - .../generatorrunner/DefaultGeneratorRunner.java | 2 +- .../codegen/generators/DefaultGenerator.java | 13 ++----------- .../codegen/generators/Generator.java | 12 +++++------- .../codegen/generators/JavaClientGenerator.java | 3 ++- .../codegen/generators/PythonClientGenerator.java | 3 ++- .../generators/models/CodeGeneratorSettings.java | 4 +++- 7 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 76a666ce7fe..35941d70cbe 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -474,7 +474,6 @@ public ClientOptInput toClientOptInput() { // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); - config.setIgnoreFilePathOverride(workflowSettings.getIgnoreFileOverride()); config.setSkipOperationExample(workflowSettings.isSkipOperationExample()); config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 0322eacba42..5c668f9c783 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -153,7 +153,7 @@ public GeneratorRunner opts(ClientOptInput opts) { this.userDefinedTemplates = Collections.unmodifiableList(userFiles); } - String ignoreFileLocation = generator.getIgnoreFilePathOverride(); + String ignoreFileLocation = generator.generatorSettings().ignoreFilePathOverride; if (ignoreFileLocation != null) { final File ignoreFile = new File(ignoreFileLocation); if (ignoreFile.exists() && ignoreFile.canRead()) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index e2d5393c8c3..5abf3398509 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -148,7 +148,8 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.isStrictSpecBehavior(), workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix() + workflowSettings.isRemoveOperationIdPrefix(), + workflowSettings.getIgnoreFileOverride() ); } @@ -4411,16 +4412,6 @@ public String getIgnoreFilePathOverride() { return ignoreFilePathOverride; } - /** - * Sets an override location for the '.openapi-generator-ignore' location for the first code generation. - * - * @param ignoreFileOverride The full path to an ignore file - */ - @Override - public void setIgnoreFilePathOverride(final String ignoreFileOverride) { - this.ignoreFilePathOverride = ignoreFileOverride; - } - public boolean convertPropertyToBoolean(String propertyKey) { final Object booleanValue = additionalProperties.get(propertyKey); boolean result = Boolean.FALSE; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index ce6ec51ad9f..f735de217d5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -17,7 +17,6 @@ package org.openapijsonschematools.codegen.generators; -import com.samskivert.mustache.Mustache.Compiler; import io.swagger.v3.oas.models.OpenAPI; import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorLanguage; @@ -142,12 +141,6 @@ public interface Generator extends OpenApiProcessor, Comparable { void setDocExtension(String docExtension); - // todo remove this set in new - void setIgnoreFilePathOverride(String ignoreFileOverride); - - // todo deprecate and use settings - String getIgnoreFilePathOverride(); - String sanitizeName(String name); void postProcessFile(File file, String fileType); @@ -374,5 +367,10 @@ default boolean isEnableMinimalUpdate() { default boolean isSkipOverwrite() { return generatorSettings().skipOverwrite; } + + @Deprecated + default String getIgnoreFilePathOverride() { + return generatorSettings().ignoreFilePathOverride; + } // 102 - 38 -> 64 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index b7c6c672ae1..308ba7b4042 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -99,7 +99,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings.isStrictSpecBehavior(), workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix() + workflowSettings.isRemoveOperationIdPrefix(), + workflowSettings.getIgnoreFileOverride() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index cf45ce16b80..de7f08ea9f9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -276,7 +276,8 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.isStrictSpecBehavior(), workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix() + workflowSettings.isRemoveOperationIdPrefix(), + workflowSettings.getIgnoreFileOverride() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 78f9b297d49..44813399678 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -10,7 +10,8 @@ public class CodeGeneratorSettings { public final boolean enableMinimalUpdate; // flag to indicate whether to only update files whose contents have changed public final boolean skipOverwrite; public final boolean removeOperationIdPrefix; - public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate, boolean skipOverwrite, boolean removeOperationIdPrefix) { + public final String ignoreFilePathOverride; + public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate, boolean skipOverwrite, boolean removeOperationIdPrefix, String ignoreFilePathOverride) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; this.templateDir = templateDir; @@ -20,5 +21,6 @@ public CodeGeneratorSettings(String apiPackage, String outputFolder, String temp this.enableMinimalUpdate = enableMinimalUpdate; this.skipOverwrite = skipOverwrite; this.removeOperationIdPrefix = removeOperationIdPrefix; + this.ignoreFilePathOverride = ignoreFilePathOverride; } } From 1ca47e6dc0e19ebe539592ae7eefab54fb1db826 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 16:15:11 -0700 Subject: [PATCH 16/44] Handles isSkipOperationExample --- .../codegen/config/CodegenConfigurator.java | 1 - .../codegen/generators/DefaultGenerator.java | 14 ++------------ .../codegen/generators/Generator.java | 3 --- .../codegen/generators/JavaClientGenerator.java | 3 ++- .../generators/PythonClientGenerator.java | 3 ++- .../generators/models/CodeGeneratorSettings.java | 16 +++++++++++++++- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 35941d70cbe..a6685122136 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -474,7 +474,6 @@ public ClientOptInput toClientOptInput() { // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); - config.setSkipOperationExample(workflowSettings.isSkipOperationExample()); config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 5abf3398509..46afc3e6181 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -149,7 +149,8 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride() + workflowSettings.getIgnoreFileOverride(), + workflowSettings.isSkipOperationExample() ); } @@ -268,7 +269,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo protected List cliOptions = new ArrayList<>(); protected String removeOperationIdPrefixDelimiter = "_"; protected int removeOperationIdPrefixCount = 1; - protected boolean skipOperationExample; private static final Pattern COMMON_PREFIX_ENUM_NAME = Pattern.compile("[a-zA-Z\\d]+\\z"); @@ -380,11 +380,6 @@ public void processOpts() { .get(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT).toString())); } - if (additionalProperties.containsKey(CodegenConstants.SKIP_OPERATION_EXAMPLE)) { - this.setSkipOperationExample(Boolean.parseBoolean(additionalProperties - .get(CodegenConstants.SKIP_OPERATION_EXAMPLE).toString())); - } - if (additionalProperties.containsKey(CodegenConstants.DOCEXTENSION)) { this.setDocExtension(String.valueOf(additionalProperties .get(CodegenConstants.DOCEXTENSION).toString())); @@ -4146,11 +4141,6 @@ public void setRemoveOperationIdPrefixCount(int removeOperationIdPrefixCount) { this.removeOperationIdPrefixCount = removeOperationIdPrefixCount; } - @Override - public void setSkipOperationExample(boolean skipOperationExample) { - this.skipOperationExample = skipOperationExample; - } - @Override public boolean isHideGenerationTimestamp() { return hideGenerationTimestamp; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index f735de217d5..56f298bbebb 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -132,9 +132,6 @@ public interface Generator extends OpenApiProcessor, Comparable { String getFilePath(GeneratedFileType type, String jsonPath); - // todo remove this set in new - void setSkipOperationExample(boolean skipOperationExample); - boolean isHideGenerationTimestamp(); void setHideGenerationTimestamp(boolean hideGenerationTimestamp); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 308ba7b4042..14ab21910ca 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -100,7 +100,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride() + workflowSettings.getIgnoreFileOverride(), + workflowSettings.isSkipOperationExample() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index de7f08ea9f9..c427cb4b704 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -277,7 +277,8 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.isEnableMinimalUpdate(), workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride() + workflowSettings.getIgnoreFileOverride(), + workflowSettings.isSkipOperationExample() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 44813399678..9d7b4723dec 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -11,7 +11,20 @@ public class CodeGeneratorSettings { public final boolean skipOverwrite; public final boolean removeOperationIdPrefix; public final String ignoreFilePathOverride; - public CodeGeneratorSettings(String apiPackage, String outputFolder, String templateDir, String embeddedTemplateDir, String packageName, boolean strictSpecBehavior, boolean enableMinimalUpdate, boolean skipOverwrite, boolean removeOperationIdPrefix, String ignoreFilePathOverride) { + public final boolean skipOperationExample; + public CodeGeneratorSettings( + String apiPackage, + String outputFolder, + String templateDir, + String embeddedTemplateDir, + String packageName, + boolean strictSpecBehavior, + boolean enableMinimalUpdate, + boolean skipOverwrite, + boolean removeOperationIdPrefix, + String ignoreFilePathOverride, + boolean skipOperationExample + ) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; this.templateDir = templateDir; @@ -22,5 +35,6 @@ public CodeGeneratorSettings(String apiPackage, String outputFolder, String temp this.skipOverwrite = skipOverwrite; this.removeOperationIdPrefix = removeOperationIdPrefix; this.ignoreFilePathOverride = ignoreFilePathOverride; + this.skipOperationExample = skipOperationExample; } } From 98e4d5ae818bc0ab47003af392ff5117ff761065 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 16:30:14 -0700 Subject: [PATCH 17/44] Updates 2 more generator settings --- .../codegen/config/CodegenConfigurator.java | 2 - .../DefaultGeneratorRunner.java | 20 ++++----- .../codegen/generators/DefaultGenerator.java | 41 ++----------------- .../codegen/generators/Generator.java | 13 +++--- .../generators/JavaClientGenerator.java | 4 +- .../generators/PythonClientGenerator.java | 6 ++- .../models/CodeGeneratorSettings.java | 8 +++- 7 files changed, 33 insertions(+), 61 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index a6685122136..65e1bdbc82e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -474,8 +474,6 @@ public ClientOptInput toClientOptInput() { // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. config.setInputSpec(workflowSettings.getInputSpec()); - config.setEnablePostProcessFile(workflowSettings.isEnablePostProcessFile()); - config.setTemplateEngineName(workflowSettings.getTemplatingEngineName()); config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); // TODO: Work toward Generator having a "GeneratorSettings" property. diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 5c668f9c783..082a519b0ab 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -372,7 +372,7 @@ private void generateFile(Map templateData, String templateName, File written = processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, skippedByOption); } } @@ -390,7 +390,7 @@ private void generateFiles(List> processTemplateToFileInfos, boolea File written = processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, skippedByOption); } } @@ -605,7 +605,7 @@ private void generateContent(List files, LinkedHashMap files, LinkedHashMap files, String jsonPath, CodegenConstants.J File written = processTemplateToFile(templateData, templateFile, filename, shouldGenerate, skippedByOption); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, skippedByOption); } } @@ -920,7 +920,7 @@ private void generateXTests(List files, String jsonPath, CodegenConstants. File written = processTemplateToFile(templateData, templateFile, filename, shouldGenerate, skippedByOption); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, skippedByOption); } } @@ -952,7 +952,7 @@ private void generateXs(List files, String jsonPath, CodegenConstants.JSON File written = processTemplateToFile(templateData, templateFile, filename, shouldGenerate, skippedByOption); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, skippedByOption); } } @@ -1290,7 +1290,7 @@ private void generateSupportingFiles(List files, Map bundl File written = processTemplateToFile(bundle, support.getTemplateFile(), outputFilename, shouldGenerate, CodegenConstants.SUPPORTING_FILES); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, "supporting-file"); } } @@ -1313,7 +1313,7 @@ private void generateSupportingFiles(List files, Map bundl File written = processTemplateToFile(bundle, openapiGeneratorIgnore, ignoreFileNameTarget, shouldGenerate, CodegenConstants.SUPPORTING_FILES); if (written != null) { files.add(written); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, "openapi-generator-ignore"); } } @@ -1737,7 +1737,7 @@ private void generateVersionMetadata(List files) { File written = this.templateProcessor.writeToFile(versionMetadata, ImplementationVersion.read().getBytes(StandardCharsets.UTF_8)); if (written != null) { files.add(versionMetadataFile); - if (generator.isEnablePostProcessFile() && !dryRun) { + if (generator.generatorSettings().enablePostProcessFile && !dryRun) { generator.postProcessFile(written, "openapi-generator-version"); } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 46afc3e6181..5f0d6483227 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -150,7 +150,9 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample() + workflowSettings.isSkipOperationExample(), + workflowSettings.isEnablePostProcessFile(), + workflowSettings.getTemplatingEngineName() ); } @@ -174,7 +176,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo - protected String templateEngineName; protected String headersSchemaFragment = "Headers"; protected static final Set operationVerbs = Set.of("get", "put", "post", "delete", "options", "head", "patch", "trace"); protected Set xParameters = Set.of("PathParameters", "QueryParameters", "HeaderParameters", "CookieParameters"); @@ -339,10 +340,6 @@ public List cliOptions() { @Override public void processOpts() { - if (this.templateEngineName == null && additionalProperties.containsKey(CodegenConstants.TEMPLATING_ENGINE)) { - setTemplateEngineName((String) additionalProperties.get(CodegenConstants.TEMPLATING_ENGINE)); - } - if (additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) { setHideGenerationTimestamp(convertPropertyToBooleanAndWriteBack(CodegenConstants.HIDE_GENERATION_TIMESTAMP)); } else { @@ -385,11 +382,6 @@ public void processOpts() { .get(CodegenConstants.DOCEXTENSION).toString())); } - if (additionalProperties.containsKey(CodegenConstants.ENABLE_POST_PROCESS_FILE)) { - this.setEnablePostProcessFile(Boolean.parseBoolean(additionalProperties - .get(CodegenConstants.ENABLE_POST_PROCESS_FILE).toString())); - } - if (additionalProperties.containsKey(CodegenConstants.REMOVE_ENUM_VALUE_PREFIX)) { this.setRemoveEnumValuePrefix(Boolean.parseBoolean(additionalProperties .get(CodegenConstants.REMOVE_ENUM_VALUE_PREFIX).toString())); @@ -4173,14 +4165,9 @@ public String sanitizeName(String name) { return sanitizeName(name, "\\W"); } - @Override - public void setTemplateEngineName(String templateEngineName) { - this.templateEngineName = templateEngineName; - } - @Override public TemplatingEngineAdapter getTemplatingEngine() { - String loadedTemplateEngineName = templateEngineName; + String loadedTemplateEngineName = generatorSettings.templateEngineName; if (loadedTemplateEngineName == null) { loadedTemplateEngineName = defaultTemplatingEngine(); } @@ -5185,26 +5172,6 @@ public void postProcessFile(File file, String fileType) { LOGGER.debug("Post processing file {} ({})", file, fileType); } - /** - * Boolean value indicating the state of the option for post-processing file using environment variables. - * - * @return true if the option is enabled - */ - @Override - public boolean isEnablePostProcessFile() { - return enablePostProcessFile; - } - - /** - * Set the boolean value indicating the state of the option for post-processing file using environment variables. - * - * @param enablePostProcessFile true to enable post-processing file - */ - @Override - public void setEnablePostProcessFile(boolean enablePostProcessFile) { - this.enablePostProcessFile = enablePostProcessFile; - } - /** * Get the boolean value indicating whether to remove enum value prefixes */ diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 56f298bbebb..8557946e320 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -142,11 +142,6 @@ public interface Generator extends OpenApiProcessor, Comparable { void postProcessFile(File file, String fileType); - boolean isEnablePostProcessFile(); - - // todo remove this, set in new - void setEnablePostProcessFile(boolean isEnablePostProcessFile); - /** * Set the OpenAPI instance. This method needs to be called right after the instantiation of the Codegen class. * @@ -154,9 +149,6 @@ public interface Generator extends OpenApiProcessor, Comparable { */ void setOpenAPI(OpenAPI openAPI); - // todo remove this set in new - void setTemplateEngineName(String name); - TemplatingEngineAdapter getTemplatingEngine(); CodegenPatternInfo getPatternInfo(String pattern); @@ -369,5 +361,10 @@ default boolean isSkipOverwrite() { default String getIgnoreFilePathOverride() { return generatorSettings().ignoreFilePathOverride; } + + @Deprecated + default boolean isEnablePostProcessFile() { + return generatorSettings().enablePostProcessFile; + } // 102 - 38 -> 64 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 14ab21910ca..ad8bd7425bc 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -101,7 +101,9 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample() + workflowSettings.isSkipOperationExample(), + workflowSettings.isEnablePostProcessFile(), + workflowSettings.getTemplatingEngineName() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index c427cb4b704..a207f85b005 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -278,7 +278,9 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.isSkipOverwrite(), workflowSettings.isRemoveOperationIdPrefix(), workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample() + workflowSettings.isSkipOperationExample(), + workflowSettings.isEnablePostProcessFile(), + workflowSettings.getTemplatingEngineName() ); testFolder = "test"; } @@ -446,7 +448,7 @@ public void processOpts() { super.processOpts(); - if (!"handlebars".equals(this.templateEngineName)) { + if (!"handlebars".equals(generatorSettings.templateEngineName)) { throw new RuntimeException("Only the HandlebarsEngineAdapter is supported for this generator"); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 9d7b4723dec..67dfc4e2156 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -12,6 +12,8 @@ public class CodeGeneratorSettings { public final boolean removeOperationIdPrefix; public final String ignoreFilePathOverride; public final boolean skipOperationExample; + public final boolean enablePostProcessFile; // boolean value indicating the state of the option for post-processing file using environment variables. + public final String templateEngineName; public CodeGeneratorSettings( String apiPackage, String outputFolder, @@ -23,7 +25,9 @@ public CodeGeneratorSettings( boolean skipOverwrite, boolean removeOperationIdPrefix, String ignoreFilePathOverride, - boolean skipOperationExample + boolean skipOperationExample, + boolean enablePostProcessFile, + String templateEngineName ) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; @@ -36,5 +40,7 @@ public CodeGeneratorSettings( this.removeOperationIdPrefix = removeOperationIdPrefix; this.ignoreFilePathOverride = ignoreFilePathOverride; this.skipOperationExample = skipOperationExample; + this.enablePostProcessFile = enablePostProcessFile; + this.templateEngineName = templateEngineName; } } From 62d251e0f010062e090a79f15637251e3b123820 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 16:40:10 -0700 Subject: [PATCH 18/44] Saves input spec location in new --- .../codegen/config/CodegenConfigurator.java | 1 - .../generatorrunner/DefaultGeneratorRunner.java | 2 +- .../codegen/generators/DefaultGenerator.java | 13 ++----------- .../codegen/generators/Generator.java | 13 ++++++------- .../codegen/generators/JavaClientGenerator.java | 3 ++- .../codegen/generators/PythonClientGenerator.java | 3 ++- .../generators/models/CodeGeneratorSettings.java | 5 ++++- 7 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 65e1bdbc82e..972f7e607e8 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -473,7 +473,6 @@ public ClientOptInput toClientOptInput() { Generator config = GeneratorLoader.getGenerator(generatorSettings.getGeneratorName(), generatorSettings, workflowSettings); // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. - config.setInputSpec(workflowSettings.getInputSpec()); config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); // TODO: Work toward Generator having a "GeneratorSettings" property. diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index 082a519b0ab..a1a4de7ca83 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -275,7 +275,7 @@ public void configureGeneratorProperties() { generator.additionalProperties().put("generatedDate", ZonedDateTime.now().toString()); generator.additionalProperties().put("generatedYear", String.valueOf(ZonedDateTime.now().getYear())); generator.additionalProperties().put("generatorClass", generator.getClass().getSimpleName()); - generator.additionalProperties().put("inputSpec", generator.getInputSpec()); + generator.additionalProperties().put("inputSpec", generator.generatorSettings().inputSpecLocation); if (openAPI.getExtensions() != null) { generator.vendorExtensions().putAll(openAPI.getExtensions()); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 5f0d6483227..3156f47df9e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -152,7 +152,8 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings.getIgnoreFileOverride(), workflowSettings.isSkipOperationExample(), workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName() + workflowSettings.getTemplatingEngineName(), + workflowSettings.getInputSpec() ); } @@ -720,16 +721,6 @@ public List supportingFiles() { return supportingFiles; } - @Override - public String getInputSpec() { - return inputSpec; - } - - @Override - public void setInputSpec(String inputSpec) { - this.inputSpec = inputSpec; - } - public void setModelPackage(String modelPackage) { this.modelPackage = modelPackage; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 8557946e320..a28ba1ce1e8 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -85,12 +85,6 @@ public interface Generator extends OpenApiProcessor, Comparable { List supportingFiles(); - // todo deprecate this - String getInputSpec(); - - // todo remove this, pass in new - void setInputSpec(String inputSpec); - // todo deprecate this CodegenKey getKey(String key, String keyType); @@ -366,5 +360,10 @@ default String getIgnoreFilePathOverride() { default boolean isEnablePostProcessFile() { return generatorSettings().enablePostProcessFile; } - // 102 - 38 -> 64 + + @Deprecated + default String getInputSpec() { + return generatorSettings().inputSpecLocation; + } + // 96 - 41 -> 55 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index ad8bd7425bc..d0d2503339c 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -103,7 +103,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings.getIgnoreFileOverride(), workflowSettings.isSkipOperationExample(), workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName() + workflowSettings.getTemplatingEngineName(), + workflowSettings.getInputSpec() ); if (this.outputTestFolder.isEmpty()) { setOutputTestFolder(outputDir); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index a207f85b005..c0a60d94969 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -280,7 +280,8 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings.getIgnoreFileOverride(), workflowSettings.isSkipOperationExample(), workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName() + workflowSettings.getTemplatingEngineName(), + workflowSettings.getInputSpec() ); testFolder = "test"; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 67dfc4e2156..8f3392b8351 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -14,6 +14,7 @@ public class CodeGeneratorSettings { public final boolean skipOperationExample; public final boolean enablePostProcessFile; // boolean value indicating the state of the option for post-processing file using environment variables. public final String templateEngineName; + public final String inputSpecLocation; // input spec's location, as URL or file public CodeGeneratorSettings( String apiPackage, String outputFolder, @@ -27,7 +28,8 @@ public CodeGeneratorSettings( String ignoreFilePathOverride, boolean skipOperationExample, boolean enablePostProcessFile, - String templateEngineName + String templateEngineName, + String inputSpecLocation ) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; @@ -42,5 +44,6 @@ public CodeGeneratorSettings( this.skipOperationExample = skipOperationExample; this.enablePostProcessFile = enablePostProcessFile; this.templateEngineName = templateEngineName; + this.inputSpecLocation = inputSpecLocation; } } From 4df081060ea4b07c13999749cce09f7d8ff889f2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Sun, 14 Apr 2024 21:45:35 -0700 Subject: [PATCH 19/44] Stops using serviceloader for generators --- .../codegen/generators/DefaultGenerator.java | 163 +++++------ .../generators/JavaClientGenerator.java | 258 +++++++++--------- .../generators/PythonClientGenerator.java | 147 +++++----- .../generatorloader/GeneratorLoader.java | 22 +- .../models/CodeGeneratorSettings.java | 38 +++ .../DefaultGeneratorRunnerTest.java | 2 +- .../generators/DefaultGeneratorTest.java | 7 +- .../generators/JavaClientGeneratorTest.java | 4 +- .../generators/PythonClientGeneratorTest.java | 16 +- .../options/PythonClientOptionsTest.java | 12 +- 10 files changed, 335 insertions(+), 334 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 3156f47df9e..84f81131528 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -135,25 +135,73 @@ @SuppressWarnings("rawtypes") public class DefaultGenerator implements Generator { protected CodeGeneratorSettings generatorSettings; + + protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { + this.generatorSettings = CodeGeneratorSettings.of(generatorSettings, workflowSettings, embeddedTemplateDir, packageNameDefault, outputFolderDefault); + defaultIncludes = new HashSet<>( + Arrays.asList("double", + "int", + "long", + "short", + "char", + "float", + "String", + "boolean", + "Boolean", + "Double", + "Void", + "Integer", + "Long", + "Float") + ); + + typeMapping = new HashMap<>(); + typeMapping.put("array", "List"); + typeMapping.put("set", "Set"); + typeMapping.put("map", "Map"); + typeMapping.put("boolean", "Boolean"); + typeMapping.put("string", "String"); + typeMapping.put("int", "Integer"); + typeMapping.put("float", "Float"); + typeMapping.put("double", "Double"); + typeMapping.put("number", "BigDecimal"); + typeMapping.put("decimal", "BigDecimal"); + typeMapping.put("DateTime", "Date"); + typeMapping.put("long", "Long"); + typeMapping.put("short", "Short"); + typeMapping.put("char", "String"); + typeMapping.put("object", "Object"); + typeMapping.put("integer", "Integer"); + // FIXME: java specific type should be in Java Based Abstract Implementations + typeMapping.put("ByteArray", "byte[]"); + typeMapping.put("binary", "File"); + typeMapping.put("file", "File"); + typeMapping.put("UUID", "UUID"); + typeMapping.put("URI", "URI"); + typeMapping.put("AnyType", "oas_any_type_not_mapped"); + + instantiationTypes = new HashMap<>(); + + reservedWords = new HashSet<>(); + + // name formatting options + cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants + .ALLOW_UNICODE_IDENTIFIERS_DESC).defaultValue(Boolean.FALSE.toString())); + + // initialize special character mapping + initializeSpecialCharacterMapping(); + + // Register common Mustache lambdas. + registerMustacheLambdas(); + } + public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { - String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); - String embeddedTemplateDir = "java"; - String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "openapiclient"); - this.generatorSettings = new CodeGeneratorSettings( - apiPackage, - workflowSettings.getOutputDir(), - workflowSettings.getTemplateDir(), - embeddedTemplateDir, - packageName, - workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate(), - workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample(), - workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName(), - workflowSettings.getInputSpec() + this( + generatorSettings, + workflowSettings, + "java", + "openapiclient", + "generated-code" + File.separator + "java" ); } @@ -234,7 +282,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo .helpTxt("todo replace help text") .build(); protected String inputSpec; - protected String outputFolder = ""; protected Set defaultIncludes; protected Map typeMapping; // instantiationTypes map from container types only: set, map, and array to the in language-type @@ -938,74 +985,6 @@ public String toModelImport(String refClass) { } } - /** - * Default constructor. - * This method will map between OAS type and language-specified type, as well as mapping - * between OAS type and the corresponding import statement for the language. This will - * also add some language specified CLI options, if any. - * returns string presentation of the example path (it's a constructor) - */ - public DefaultGenerator() { - GeneratorType generatorType = GeneratorType.CLIENT; - String name = "DefaultGenerator"; - - defaultIncludes = new HashSet<>( - Arrays.asList("double", - "int", - "long", - "short", - "char", - "float", - "String", - "boolean", - "Boolean", - "Double", - "Void", - "Integer", - "Long", - "Float") - ); - - typeMapping = new HashMap<>(); - typeMapping.put("array", "List"); - typeMapping.put("set", "Set"); - typeMapping.put("map", "Map"); - typeMapping.put("boolean", "Boolean"); - typeMapping.put("string", "String"); - typeMapping.put("int", "Integer"); - typeMapping.put("float", "Float"); - typeMapping.put("double", "Double"); - typeMapping.put("number", "BigDecimal"); - typeMapping.put("decimal", "BigDecimal"); - typeMapping.put("DateTime", "Date"); - typeMapping.put("long", "Long"); - typeMapping.put("short", "Short"); - typeMapping.put("char", "String"); - typeMapping.put("object", "Object"); - typeMapping.put("integer", "Integer"); - // FIXME: java specific type should be in Java Based Abstract Implementations - typeMapping.put("ByteArray", "byte[]"); - typeMapping.put("binary", "File"); - typeMapping.put("file", "File"); - typeMapping.put("UUID", "UUID"); - typeMapping.put("URI", "URI"); - typeMapping.put("AnyType", "oas_any_type_not_mapped"); - - instantiationTypes = new HashMap<>(); - - reservedWords = new HashSet<>(); - - // name formatting options - cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants - .ALLOW_UNICODE_IDENTIFIERS_DESC).defaultValue(Boolean.FALSE.toString())); - - // initialize special character mapping - initializeSpecialCharacterMapping(); - - // Register common Mustache lambdas. - registerMustacheLambdas(); - } - /** * Initialize special character mapping */ @@ -4065,7 +4044,7 @@ public String getFilePath(GeneratedFileType type, String jsonPath) { String[] pathPieces = jsonPath.split("/"); switch (type) { case CODE: - pathPieces[0] = outputFolder + File.separatorChar + packagePath(); + pathPieces[0] = generatorSettings.outputFolder + File.separatorChar + packagePath(); if (jsonPath.startsWith("#/components")) { updateComponentsFilepath(pathPieces); } else if (jsonPath.startsWith("#/paths")) { @@ -4080,7 +4059,7 @@ public String getFilePath(GeneratedFileType type, String jsonPath) { } break; case DOCUMENTATION: - pathPieces[0] = outputFolder + File.separatorChar + docsFolder; + pathPieces[0] = generatorSettings.outputFolder + File.separatorChar + docsFolder; if (jsonPath.startsWith("#/components")) { updateComponentsFilepath(pathPieces); } else if (jsonPath.startsWith("#/paths")) { @@ -4093,7 +4072,7 @@ public String getFilePath(GeneratedFileType type, String jsonPath) { } break; case TEST: - pathPieces[0] = outputFolder + File.separatorChar + "test"; + pathPieces[0] = generatorSettings.outputFolder + File.separatorChar + "test"; if (jsonPath.startsWith("#/components")) { // #/components/schemas/someSchema updateComponentsFilepath(pathPieces); @@ -4627,7 +4606,7 @@ private void setSchemaLocationInfo(String ref, String sourceJsonPath, String cur protected String getModuleLocation(String ref) { String filePath = getFilePath(GeneratedFileType.CODE, ref); - String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar; + String prefix = generatorSettings.outputFolder + File.separatorChar + "src" + File.separatorChar; String localFilepath = filePath.substring(prefix.length()); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); } @@ -4635,7 +4614,7 @@ protected String getModuleLocation(String ref) { @Override public String getRefModuleLocation(String ref) { String filePath = getFilePath(GeneratedFileType.CODE, ref); - String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar; + String prefix = generatorSettings.outputFolder + File.separatorChar + "src" + File.separatorChar; int endIndex = filePath.lastIndexOf(File.separatorChar); String localFilepath = filePath.substring(prefix.length(), endIndex); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index d0d2503339c..fb854dd2a97 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -43,7 +43,6 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SecurityFeature; import org.openapijsonschematools.codegen.generators.models.CliOption; -import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; @@ -86,29 +85,123 @@ public class JavaClientGenerator extends DefaultGenerator implements Generator { public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { - String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); - String embeddedTemplateDir = "java"; - String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "org.openapijsonschematools.client"); - String outputDir = workflowSettings.getOutputDir(); - this.generatorSettings = new CodeGeneratorSettings( - apiPackage, - outputDir, - workflowSettings.getTemplateDir(), - embeddedTemplateDir, - packageName, - workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate(), - workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample(), - workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName(), - workflowSettings.getInputSpec() + super( + generatorSettings, + workflowSettings, + "java", + "org.openapijsonschematools.client", + "generated-code" + File.separator + "java" ); if (this.outputTestFolder.isEmpty()) { - setOutputTestFolder(outputDir); + setOutputTestFolder(this.generatorSettings.outputFolder); } + headersSchemaFragment = "HeadersSchema"; + + supportsInheritance = true; + + hideGenerationTimestamp = false; + + setReservedWordsLowerCase( + Arrays.asList( + // used as internal variables, can collide with parameter names + "localVarPath", "localVarQueryParams", "localVarCollectionQueryParams", + "localVarHeaderParams", "localVarCookieParams", "localVarFormParams", "localVarPostBody", + "localVarAccepts", "localVarAccept", "localVarContentTypes", + "localVarContentType", "localVarAuthNames", "localReturnType", + "ApiClient", "ApiException", "ApiResponse", "Configuration", "StringUtil", + + // language reserved words + "abstract", "continue", "for", "new", "switch", "assert", + "default", "if", "package", "synchronized", "boolean", "do", "goto", "private", + "this", "break", "double", "implements", "protected", "throw", "byte", "else", + "import", "public", "throws", "case", "enum", "instanceof", "return", "transient", + "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", + "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", + "native", "super", "while", "null", + // additional types + "localdate", "zoneddatetime", "list", "map", "linkedhashset", "void", "string", "uuid", "number", "integer", "toString" + ) + ); + + languageSpecificPrimitives = Sets.newHashSet("String", + "boolean", + "Boolean", + "Double", + "Integer", + "Long", + "Float", + "Object", + "byte[]" + ); + typeMapping.put("date", "Date"); + typeMapping.put("file", "File"); + typeMapping.put("AnyType", "Object"); + + cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); + cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage())); + cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC).defaultValue(this.getGroupId())); + cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC).defaultValue(this.getArtifactId())); + cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC).defaultValue(ARTIFACT_VERSION_DEFAULT_VALUE)); + cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC).defaultValue(this.getArtifactUrl())); + cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC).defaultValue(this.getArtifactDescription())); + cliOptions.add(new CliOption(CodegenConstants.SCM_CONNECTION, CodegenConstants.SCM_CONNECTION_DESC).defaultValue(this.getScmConnection())); + cliOptions.add(new CliOption(CodegenConstants.SCM_DEVELOPER_CONNECTION, CodegenConstants.SCM_DEVELOPER_CONNECTION_DESC).defaultValue(this.getScmDeveloperConnection())); + cliOptions.add(new CliOption(CodegenConstants.SCM_URL, CodegenConstants.SCM_URL_DESC).defaultValue(this.getScmUrl())); + cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_NAME, CodegenConstants.DEVELOPER_NAME_DESC).defaultValue(this.getDeveloperName())); + cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_EMAIL, CodegenConstants.DEVELOPER_EMAIL_DESC).defaultValue(this.getDeveloperEmail())); + cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION, CodegenConstants.DEVELOPER_ORGANIZATION_DESC).defaultValue(this.getDeveloperOrganization())); + cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION_URL, CodegenConstants.DEVELOPER_ORGANIZATION_URL_DESC).defaultValue(this.getDeveloperOrganizationUrl())); + cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC).defaultValue(this.getLicenseName())); + cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC).defaultValue(this.getLicenseUrl())); + cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC).defaultValue(this.getSourceFolder())); + cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp())); + + cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC)); + cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC)); + cliOptions.add(CliOption.newString(CodegenConstants.PARENT_VERSION, CodegenConstants.PARENT_VERSION_DESC)); + CliOption snapShotVersion = CliOption.newString(CodegenConstants.SNAPSHOT_VERSION, CodegenConstants.SNAPSHOT_VERSION_DESC); + Map snapShotVersionOptions = new HashMap<>(); + snapShotVersionOptions.put("true", "Use a SnapShot Version"); + snapShotVersionOptions.put("false", "Use a Release Version"); + snapShotVersion.setEnum(snapShotVersionOptions); + cliOptions.add(snapShotVersion); + cliOptions.add(CliOption.newString(TEST_OUTPUT, "Set output folder for models and APIs tests").defaultValue(DEFAULT_TEST_FOLDER)); + + requestBodiesIdentifier = "requestbodies"; + securitySchemesIdentifier = "securityschemes"; + requestBodyIdentifier = "requestbody"; + packageName = "org.openapijsonschematools.client"; + addSchemaImportsFromV3SpecLocations = true; + deepestRefSchemaImportNeeded = true; + objectIOClassNamePiece = "Map"; + arrayIOClassNamePiece = "List"; + arrayObjectInputClassNameSuffix = "Builder"; + + // this tells users what openapi types turn in to + instantiationTypes.put("object", "FrozenMap"); + instantiationTypes.put("array", "FrozenList"); + instantiationTypes.put("string", "String"); + instantiationTypes.put("number", "Number (int, long, float, double)"); + instantiationTypes.put("integer", "Number (int, long, float with integer values, double with integer values)"); + instantiationTypes.put("boolean", "boolean"); + instantiationTypes.put("null", "Void (null)"); + + embeddedTemplateDir = templateDir = "java"; + invokerPackage = "org.openapijsonschematools.client"; + artifactId = "openapi-java-client"; + modelPackage = "components.schemas"; + + // cliOptions default redefinition need to be updated + updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); + updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); +// updateOption(CodegenConstants.API_PACKAGE, apiPackage); + + jsonPathTestTemplateFiles.put( + CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, + new HashMap<>() {{ + put("src/test/java/packagename/components/schemas/Schema_test.hbs", ".java"); + }} + ); } private final Logger LOGGER = LoggerFactory.getLogger(JavaClientGenerator.class); @@ -277,6 +370,11 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings ) .build(); + @Override + public GeneratorMetadata getGeneratorMetadata() { + return generatorMetadata; + } + @Override public String toModuleFilename(String name, String jsonPath) { String usedName = sanitizeName(name, "[^a-zA-Z0-9]+"); @@ -306,118 +404,6 @@ protected void updateServersFilepath(String[] pathPieces) { } } - public JavaClientGenerator() { - super(); - headersSchemaFragment = "HeadersSchema"; - - supportsInheritance = true; - - hideGenerationTimestamp = false; - - setReservedWordsLowerCase( - Arrays.asList( - // used as internal variables, can collide with parameter names - "localVarPath", "localVarQueryParams", "localVarCollectionQueryParams", - "localVarHeaderParams", "localVarCookieParams", "localVarFormParams", "localVarPostBody", - "localVarAccepts", "localVarAccept", "localVarContentTypes", - "localVarContentType", "localVarAuthNames", "localReturnType", - "ApiClient", "ApiException", "ApiResponse", "Configuration", "StringUtil", - - // language reserved words - "abstract", "continue", "for", "new", "switch", "assert", - "default", "if", "package", "synchronized", "boolean", "do", "goto", "private", - "this", "break", "double", "implements", "protected", "throw", "byte", "else", - "import", "public", "throws", "case", "enum", "instanceof", "return", "transient", - "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", - "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", - "native", "super", "while", "null", - // additional types - "localdate", "zoneddatetime", "list", "map", "linkedhashset", "void", "string", "uuid", "number", "integer", "toString" - ) - ); - - languageSpecificPrimitives = Sets.newHashSet("String", - "boolean", - "Boolean", - "Double", - "Integer", - "Long", - "Float", - "Object", - "byte[]" - ); - typeMapping.put("date", "Date"); - typeMapping.put("file", "File"); - typeMapping.put("AnyType", "Object"); - - cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); - cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage())); - cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC).defaultValue(this.getGroupId())); - cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC).defaultValue(this.getArtifactId())); - cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC).defaultValue(ARTIFACT_VERSION_DEFAULT_VALUE)); - cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC).defaultValue(this.getArtifactUrl())); - cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC).defaultValue(this.getArtifactDescription())); - cliOptions.add(new CliOption(CodegenConstants.SCM_CONNECTION, CodegenConstants.SCM_CONNECTION_DESC).defaultValue(this.getScmConnection())); - cliOptions.add(new CliOption(CodegenConstants.SCM_DEVELOPER_CONNECTION, CodegenConstants.SCM_DEVELOPER_CONNECTION_DESC).defaultValue(this.getScmDeveloperConnection())); - cliOptions.add(new CliOption(CodegenConstants.SCM_URL, CodegenConstants.SCM_URL_DESC).defaultValue(this.getScmUrl())); - cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_NAME, CodegenConstants.DEVELOPER_NAME_DESC).defaultValue(this.getDeveloperName())); - cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_EMAIL, CodegenConstants.DEVELOPER_EMAIL_DESC).defaultValue(this.getDeveloperEmail())); - cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION, CodegenConstants.DEVELOPER_ORGANIZATION_DESC).defaultValue(this.getDeveloperOrganization())); - cliOptions.add(new CliOption(CodegenConstants.DEVELOPER_ORGANIZATION_URL, CodegenConstants.DEVELOPER_ORGANIZATION_URL_DESC).defaultValue(this.getDeveloperOrganizationUrl())); - cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC).defaultValue(this.getLicenseName())); - cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC).defaultValue(this.getLicenseUrl())); - cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC).defaultValue(this.getSourceFolder())); - cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp())); - - cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC)); - cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC)); - cliOptions.add(CliOption.newString(CodegenConstants.PARENT_VERSION, CodegenConstants.PARENT_VERSION_DESC)); - CliOption snapShotVersion = CliOption.newString(CodegenConstants.SNAPSHOT_VERSION, CodegenConstants.SNAPSHOT_VERSION_DESC); - Map snapShotVersionOptions = new HashMap<>(); - snapShotVersionOptions.put("true", "Use a SnapShot Version"); - snapShotVersionOptions.put("false", "Use a Release Version"); - snapShotVersion.setEnum(snapShotVersionOptions); - cliOptions.add(snapShotVersion); - cliOptions.add(CliOption.newString(TEST_OUTPUT, "Set output folder for models and APIs tests").defaultValue(DEFAULT_TEST_FOLDER)); - - requestBodiesIdentifier = "requestbodies"; - securitySchemesIdentifier = "securityschemes"; - requestBodyIdentifier = "requestbody"; - packageName = "org.openapijsonschematools.client"; - addSchemaImportsFromV3SpecLocations = true; - deepestRefSchemaImportNeeded = true; - objectIOClassNamePiece = "Map"; - arrayIOClassNamePiece = "List"; - arrayObjectInputClassNameSuffix = "Builder"; - - // this tells users what openapi types turn in to - instantiationTypes.put("object", "FrozenMap"); - instantiationTypes.put("array", "FrozenList"); - instantiationTypes.put("string", "String"); - instantiationTypes.put("number", "Number (int, long, float, double)"); - instantiationTypes.put("integer", "Number (int, long, float with integer values, double with integer values)"); - instantiationTypes.put("boolean", "boolean"); - instantiationTypes.put("null", "Void (null)"); - - outputFolder = "generated-code" + File.separator + "java"; - embeddedTemplateDir = templateDir = "java"; - invokerPackage = "org.openapijsonschematools.client"; - artifactId = "openapi-java-client"; - modelPackage = "components.schemas"; - - // cliOptions default redefinition need to be updated - updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); - updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); -// updateOption(CodegenConstants.API_PACKAGE, apiPackage); - - jsonPathTestTemplateFiles.put( - CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, - new HashMap<>() {{ - put("src/test/java/packagename/components/schemas/Schema_test.hbs", ".java"); - }} - ); - } - public String packagePath() { return "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar + packageName.replace('.', File.separatorChar); } @@ -1417,7 +1403,7 @@ public String toRefClass(String ref, String sourceJsonPath, String expectedCompo @Override public String getRefModuleLocation(String ref) { String filePath = getFilePath(GeneratedFileType.CODE, ref); - String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; + String prefix = generatorSettings.outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; // modules are always in a package one above them, so strip off the last jsonPath fragment String localFilepath = filePath.substring(prefix.length(), filePath.lastIndexOf(File.separatorChar)); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); @@ -2054,7 +2040,7 @@ public String getImport(CodegenRefInfo refInfo) { protected String getModuleLocation(String ref) { String filePath = getFilePath(GeneratedFileType.CODE, ref); - String prefix = outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; + String prefix = generatorSettings.outputFolder + File.separatorChar + "src" + File.separatorChar + "main" + File.separatorChar + "java" + File.separatorChar; String localFilepath = filePath.substring(prefix.length()); return localFilepath.replaceAll(String.valueOf(File.separatorChar), "."); } @@ -2065,7 +2051,7 @@ public String getFilePath(GeneratedFileType type, String jsonPath) { return super.getFilePath(type, jsonPath); } String[] pathPieces = jsonPath.split("/"); - pathPieces[0] = outputFolder + File.separatorChar + testPackagePath(); + pathPieces[0] = generatorSettings.outputFolder + File.separatorChar + testPackagePath(); if (jsonPath.startsWith("#/components")) { // #/components/schemas/someSchema updateComponentsFilepath(pathPieces); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index c0a60d94969..90e1cac8ef7 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -229,7 +229,7 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator OperationFeature.Security, OperationFeature.Servers ) - .build(); + .build(); public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder() .name("python") .language(GeneratorLanguage.PYTHON) @@ -239,56 +239,39 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator .featureSet(featureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", "python", GeneratorType.CLIENT)) .helpTxt( - String.join("
", - "Generates a Python client library", - "", - "Features in this generator:", - "- type hints on endpoints and model creation", - "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", - "- endpoint parameter names use the spec defined keys and cases", - "- inline schemas are supported at any location including composition", - "- multiple content types supported in request body and response bodies", - "- run time type checking + json schema validation", - "- json schema keyword validation may be selectively disabled with SchemaConfiguration", - "- enums of type string/integer/boolean typed using typing.Literal", - "- mypy static type checking run on generated sample", - "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", - "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", - "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", - "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", - "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" - ) + String.join( + "
", + "Generates a Python client library", + "", + "Features in this generator:", + "- type hints on endpoints and model creation", + "- model parameter names use the spec defined keys and cases", + "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", + "- endpoint parameter names use the spec defined keys and cases", + "- inline schemas are supported at any location including composition", + "- multiple content types supported in request body and response bodies", + "- run time type checking + json schema validation", + "- json schema keyword validation may be selectively disabled with SchemaConfiguration", + "- enums of type string/integer/boolean typed using typing.Literal", + "- mypy static type checking run on generated sample", + "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", + "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", + "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", + "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", + "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" ) - .build(); - + ) + .build(); public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { - String apiPackage = Objects.requireNonNullElse(generatorSettings.getApiPackage(), "apis"); - String embeddedTemplateDir = "python"; - String packageName = Objects.requireNonNullElse(generatorSettings.getPackageName(), "openapi_client"); - this.generatorSettings = new CodeGeneratorSettings( - apiPackage, - workflowSettings.getOutputDir(), - workflowSettings.getTemplateDir(), - embeddedTemplateDir, - packageName, - workflowSettings.isStrictSpecBehavior(), - workflowSettings.isEnableMinimalUpdate(), - workflowSettings.isSkipOverwrite(), - workflowSettings.isRemoveOperationIdPrefix(), - workflowSettings.getIgnoreFileOverride(), - workflowSettings.isSkipOperationExample(), - workflowSettings.isEnablePostProcessFile(), - workflowSettings.getTemplatingEngineName(), - workflowSettings.getInputSpec() + super( + generatorSettings, + workflowSettings, + "python", + "openapi_client", + "generated_code" + File.separator + "python" ); testFolder = "test"; - } - - public PythonClientGenerator() { - super(); - testFolder = "test"; loadDeepObjectIntoItems = false; importBaseType = false; addSchemaImportsFromV3SpecLocations = true; @@ -296,22 +279,22 @@ public PythonClientGenerator() { // from https://docs.python.org/3/reference/lexical_analysis.html#keywords setReservedWordsLowerCase( - Arrays.asList( - // local variable name used in API methods (endpoints) - "all_params", "resource_path", "path_params", "query_params", - "header_params", "form_params", "local_var_files", "body_params", "auth_settings", - // @property - "property", - // python reserved words - "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", - "assert", "else", "if", "pass", "yield", "break", "except", "import", - "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", - "False", "async", "await", - // imports, imports_schema_types.handlebars, include these to prevent name collision - "datetime", "decimal", "functools", "io", "re", - "typing", "typing_extensions", "uuid", "immutabledict", "schemas" - )); + Arrays.asList( + // local variable name used in API methods (endpoints) + "all_params", "resource_path", "path_params", "query_params", + "header_params", "form_params", "local_var_files", "body_params", "auth_settings", + // @property + "property", + // python reserved words + "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", + "assert", "else", "if", "pass", "yield", "break", "except", "import", + "print", "class", "exec", "in", "raise", "continue", "finally", "is", + "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", + "False", "async", "await", + // imports, imports_schema_types.handlebars, include these to prevent name collision + "datetime", "decimal", "functools", "io", "re", + "typing", "typing_extensions", "uuid", "immutabledict", "schemas" + )); languageSpecificPrimitives.clear(); languageSpecificPrimitives.add("int"); @@ -356,7 +339,6 @@ public PythonClientGenerator() { GeneratorType generatorType = GeneratorType.CLIENT; modelPackage = "components.schema"; - outputFolder = "generated-code" + File.separatorChar + "python"; embeddedTemplateDir = templateDir = "python"; @@ -365,17 +347,17 @@ public PythonClientGenerator() { // from https://docs.python.org/3/reference/lexical_analysis.html#keywords setReservedWordsLowerCase( - Arrays.asList( - // @property - "property", - // python reserved words - "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", - "assert", "else", "if", "pass", "yield", "break", "except", "import", - "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", - "False", "async", "await", - // types - "float", "int", "str", "bool", "dict", "immutabledict", "list", "tuple")); + Arrays.asList( + // @property + "property", + // python reserved words + "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", + "assert", "else", "if", "pass", "yield", "break", "except", "import", + "print", "class", "exec", "in", "raise", "continue", "finally", "is", + "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", + "False", "async", "await", + // types + "float", "int", "str", "bool", "dict", "immutabledict", "list", "tuple")); regexModifiers = new HashMap<>(); regexModifiers.put('i', "IGNORECASE"); @@ -386,10 +368,10 @@ public PythonClientGenerator() { cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).") - .defaultValue("openapi_client")); + .defaultValue("openapi_client")); cliOptions.add(new CliOption(CodegenConstants.PROJECT_NAME, "python project name in setup.py (e.g. petstore-api).")); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "python package version.") - .defaultValue("1.0.0")); + .defaultValue("1.0.0")); cliOptions.add(new CliOption(PACKAGE_URL, "python package URL.")); // this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG // this generator uses the following order for endpoint parameters and model properties @@ -397,11 +379,11 @@ public PythonClientGenerator() { // optional params which are set to unset as their default for method signatures only // optional params as **kwargs cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) - .defaultValue(Boolean.TRUE.toString())); + .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.SOURCECODEONLY_GENERATION, CodegenConstants.SOURCECODEONLY_GENERATION_DESC) - .defaultValue(Boolean.FALSE.toString())); + .defaultValue(Boolean.FALSE.toString())); cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). - defaultValue(Boolean.FALSE.toString())); + defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); CliOption templateEngineOption = new CliOption(CodegenConstants.TEMPLATING_ENGINE, "template engine"); templateEngineOption.setDefault("handlebars"); @@ -435,6 +417,11 @@ public PythonClientGenerator() { languageSpecificPrimitives.add("none_type"); } + @Override + public GeneratorMetadata getGeneratorMetadata() { + return generatorMetadata; + } + @Override public TemplatingEngineAdapter getTemplatingEngine() { TemplatingEngineAdapter te = super.getTemplatingEngine(); @@ -1034,7 +1021,7 @@ public TreeMap postProcessAllModels(TreeMap loader = ServiceLoader.load(Generator.class, Generator.class.getClassLoader()); - + Map> generatorNameToGenerator = Map.ofEntries( + new AbstractMap.SimpleEntry<>(JavaClientGenerator.generatorMetadata.getName(), JavaClientGenerator.class), + new AbstractMap.SimpleEntry<>(PythonClientGenerator.generatorMetadata.getName(), PythonClientGenerator.class) + ); StringBuilder availableConfigs = new StringBuilder(); - for (Generator config : loader) { - availableConfigs.append(config.getName()).append("\n"); + for (String generatorName : generatorNameToGenerator.keySet()) { + availableConfigs.append(generatorName).append("\n"); } GeneratorNotFoundException exc = new GeneratorNotFoundException("Can't load config class with name '".concat(name) + "'\nAvailable:\n" + availableConfigs); - for (Generator config : loader) { - if (config.getGeneratorMetadata().getName().equals(name)) { + for (Map.Entry> entry : generatorNameToGenerator.entrySet()) { + if (entry.getKey().equals(name)) { try { - Constructor constructor = config.getClass().getDeclaredConstructor(GeneratorSettings.class, WorkflowSettings.class); + Constructor constructor = entry.getValue().getDeclaredConstructor(GeneratorSettings.class, WorkflowSettings.class); return (Generator) constructor.newInstance(generatorSettings, workflowSettings); } catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 8f3392b8351..d9c1ebb452c 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -1,5 +1,10 @@ package org.openapijsonschematools.codegen.generators.models; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; + +import java.util.Objects; + public class CodeGeneratorSettings { public final String apiPackage; public final String outputFolder; @@ -46,4 +51,37 @@ public CodeGeneratorSettings( this.templateEngineName = templateEngineName; this.inputSpecLocation = inputSpecLocation; } + + public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { + String defaultApiPackage = "apis"; + String apiPackage = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getApiPackage(), defaultApiPackage) : defaultApiPackage; + String packageName = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getPackageName(), packageNameDefault) : packageNameDefault; + String outputDir = workflowSettings != null ? workflowSettings.getOutputDir() : outputFolderDefault; + String templateDir = workflowSettings != null ? workflowSettings.getTemplateDir() : null; + boolean strictSpecBehavior = workflowSettings != null ? workflowSettings.isStrictSpecBehavior() : WorkflowSettings.DEFAULT_STRICT_SPEC_BEHAVIOR; + boolean enableMinimalUpdate = workflowSettings != null ? workflowSettings.isEnableMinimalUpdate() : WorkflowSettings.DEFAULT_ENABLE_MINIMAL_UPDATE; + boolean skipOverwrite = workflowSettings != null ? workflowSettings.isSkipOverwrite() : WorkflowSettings.DEFAULT_SKIP_OVERWRITE; + boolean removeOperationIdPrefix = workflowSettings != null ? workflowSettings.isRemoveOperationIdPrefix() : WorkflowSettings.DEFAULT_REMOVE_OPERATION_ID_PREFIX; + String ignoreFileOverride = workflowSettings != null ? workflowSettings.getIgnoreFileOverride() : null; + boolean skipOperationExample = workflowSettings != null ? workflowSettings.isSkipOperationExample() : WorkflowSettings.DEFAULT_SKIP_OPERATION_EXAMPLE; + boolean enablePostProcessingFile = workflowSettings != null ? workflowSettings.isSkipOperationExample() : WorkflowSettings.DEFAULT_ENABLE_POST_PROCESS_FILE; + String templateEnginName = workflowSettings != null ? workflowSettings.getTemplatingEngineName() : WorkflowSettings.DEFAULT_TEMPLATING_ENGINE_NAME; + String inputSpecLocation = workflowSettings != null ? workflowSettings.getInputSpec() : null; + return new CodeGeneratorSettings( + apiPackage, + outputDir, + templateDir, + embeddedTemplateDir, + packageName, + strictSpecBehavior, + enableMinimalUpdate, + skipOverwrite, + removeOperationIdPrefix, + ignoreFileOverride, + skipOperationExample, + enablePostProcessingFile, + templateEnginName, + inputSpecLocation + ); + } } diff --git a/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java b/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java index d93bcea4b50..d25dd54d343 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunnerTest.java @@ -311,7 +311,7 @@ public void testFromPaths() throws Exception { openAPI.getPaths().addPathItem("/path3", new PathItem().addParametersItem(new QueryParameter().name("p1").schema(new StringSchema())).get(new Operation().operationId("op3").addParametersItem(new QueryParameter().name("p2").schema(new IntegerSchema())).responses(new ApiResponses().addApiResponse("201", new ApiResponse().description("OK"))))); openAPI.getPaths().addPathItem("/path4", new PathItem().addParametersItem(new QueryParameter().name("p1").schema(new StringSchema())).get(new Operation().operationId("op4").responses(new ApiResponses().addApiResponse("201", new ApiResponse().description("OK"))))); - Generator config = new DefaultGenerator(); + Generator config = new DefaultGenerator(null, null); ClientOptInput opts = new ClientOptInput( openAPI, config, diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java index d4661f8330e..548c91c1065 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java @@ -39,6 +39,8 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.openapijsonschematools.codegen.TestUtils; import org.openapijsonschematools.codegen.common.CodegenConstants; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenDiscriminator; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenEncoding; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; @@ -85,6 +87,9 @@ public class DefaultGeneratorTest { public static class ThisDefaultGenerator extends DefaultGenerator { + public ThisDefaultGenerator() { + super(null, null); + } @Override public String escapeUnsafeCharacters(String input) { return input; @@ -4007,7 +4012,7 @@ public void setShouldExplode() { class GeneratorWithMultipleInheritance extends DefaultGenerator { public GeneratorWithMultipleInheritance() { - super(); + super(null, null); supportsInheritance = true; supportsMultipleInheritance = true; } diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/JavaClientGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/JavaClientGeneratorTest.java index 2094eab129e..95ca289ecd1 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/JavaClientGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/JavaClientGeneratorTest.java @@ -33,7 +33,7 @@ public class JavaClientGeneratorTest { - private final JavaClientGenerator generator = new JavaClientGenerator(); + private final JavaClientGenerator generator = new JavaClientGenerator(null, null); @Test void inlineEnum() { @@ -135,7 +135,7 @@ void uuidGivenExample() { @Test public void testEnumNames() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/70_schema_enum_names.yaml"); - var javaGenerator = new JavaClientGenerator(); + var javaGenerator = new JavaClientGenerator(null, null); javaGenerator.setOpenAPI(openAPI); String modelName = "StringEnum"; diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java index bde869eb453..f34da0107b8 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/PythonClientGeneratorTest.java @@ -49,7 +49,7 @@ public class PythonClientGeneratorTest { public void testRecursiveExampleValueWithCycle() throws Exception { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue_7532.yaml"); - final PythonClientGenerator codegen = new PythonClientGenerator(); + final PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.setOpenAPI(openAPI); Schema schemaWithCycleInTreesProperty = openAPI.getComponents().getSchemas().get("Forest"); String exampleValue = codegen.toExampleValue(schemaWithCycleInTreesProperty, null); @@ -64,14 +64,14 @@ public void testRecursiveExampleValueWithCycle() throws Exception { @Test(expectedExceptions = RuntimeException.class) public void testSpecWithTooLowVersionThrowsException() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/sample_spec.yml"); - final PythonClientGenerator codegen = new PythonClientGenerator(); + final PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.preprocessOpenAPI(openAPI); } @Test public void testSpecWithAcceptableVersion() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); - final PythonClientGenerator codegen = new PythonClientGenerator(); + final PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.preprocessOpenAPI(openAPI); Assert.assertEquals(openAPI.getOpenapi() , "3.0.0"); Assert.assertTrue(openAPI.getExtensions() == null); @@ -80,7 +80,7 @@ public void testSpecWithAcceptableVersion() { @Test public void testSpecWithAcceptableVersionAndExtension() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue_12196.yaml"); - final PythonClientGenerator codegen = new PythonClientGenerator(); + final PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.preprocessOpenAPI(openAPI); Assert.assertEquals(openAPI.getOpenapi() , "3.0.0"); Assert.assertFalse(openAPI.getExtensions().isEmpty()); @@ -108,7 +108,7 @@ public void testRecursiveGeoJsonExampleWhenTypeIsGeometryCollection() throws IOE private void testEndpointExampleValue(String endpoint, String specFilePath, String expectedAnswerPath) throws IOException { final OpenAPI openAPI = TestUtils.parseFlattenSpec(specFilePath); - final PythonClientGenerator codegen = new PythonClientGenerator(); + final PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.setOpenAPI(openAPI); final Operation operation = openAPI.getPaths().get(endpoint).getPost(); @@ -174,7 +174,7 @@ public void testApisNotGenerated() throws Exception { @Test public void testRegexWithoutTrailingSlashWorks() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); - PythonClientGenerator codegen = new PythonClientGenerator(); + PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.setOpenAPI(openAPI); String modelName = "UUID"; @@ -193,7 +193,7 @@ public void testRegexWithoutTrailingSlashWorks() { @Test public void testRegexWithMultipleFlagsWorks() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); - PythonClientGenerator codegen = new PythonClientGenerator(); + PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.setOpenAPI(openAPI); String modelName = "StringWithRegexWithThreeFlags"; @@ -212,7 +212,7 @@ public void testRegexWithMultipleFlagsWorks() { @Test public void testEnumNames() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/70_schema_enum_names.yaml"); - PythonClientGenerator codegen = new PythonClientGenerator(); + PythonClientGenerator codegen = new PythonClientGenerator(null, null); codegen.setOpenAPI(openAPI); String modelName = "StringEnum"; diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java index 9fc346e56ad..500280d73ab 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java @@ -25,23 +25,21 @@ public class PythonClientOptionsTest extends AbstractOptionsTest { - - private PythonClientGenerator clientCodegen = mock(PythonClientGenerator.class, mockSettings); - public PythonClientOptionsTest() { super(new PythonClientOptionsProvider()); } @Override - protected Generator getCodegenConfig() { - return clientCodegen; + protected PythonClientGenerator getCodegenConfig() { + return new PythonClientGenerator(null, null); } @SuppressWarnings("unused") @Override protected void verifyOptions() { - verify(clientCodegen).setPackageVersion(PythonClientOptionsProvider.PACKAGE_VERSION_VALUE); - verify(clientCodegen).setPackageName(PythonClientOptionsProvider.PACKAGE_NAME_VALUE); + PythonClientGenerator gen = getCodegenConfig(); + verify(gen).setPackageVersion(PythonClientOptionsProvider.PACKAGE_VERSION_VALUE); + verify(gen).setPackageName(PythonClientOptionsProvider.PACKAGE_NAME_VALUE); } } From 86314cd77fd3402c33613bf4039ee44c6a98c2e6 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 15 Apr 2024 10:04:07 -0700 Subject: [PATCH 20/44] Fixes java test testRemoveOperationIdPrefix --- .../codegen/generators/DefaultGenerator.java | 3 --- .../codegen/generators/DefaultGeneratorTest.java | 12 +++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 84f81131528..375c4f810e6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -222,9 +222,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo protected String requestBodyIdentifier = "request_body"; private final Pattern patternRegex = Pattern.compile("^/?(.+?)/?([simu]{0,4})$"); private final CodegenKey additionalPropertySampleKey = new CodegenKey("someAdditionalProperty", true, "additional_property", "AdditionalProperty", "additional-property", "additionalProperty"); - - - protected String headersSchemaFragment = "Headers"; protected static final Set operationVerbs = Set.of("get", "put", "post", "delete", "options", "head", "patch", "trace"); protected Set xParameters = Set.of("PathParameters", "QueryParameters", "HeaderParameters", "CookieParameters"); diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java index 548c91c1065..7674b578827 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java @@ -90,6 +90,9 @@ public static class ThisDefaultGenerator extends DefaultGenerator { public ThisDefaultGenerator() { super(null, null); } + public ThisDefaultGenerator(WorkflowSettings ws) { + super(null, ws); + } @Override public String escapeUnsafeCharacters(String input) { return input; @@ -3116,14 +3119,14 @@ public void testBooleansSetForIntSchemas() { @Test public void testRemoveOperationIdPrefix() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/bugs/issue_9719.yaml"); - final DefaultGenerator codegen = new ThisDefaultGenerator(); + WorkflowSettings ws = WorkflowSettings.newBuilder().withRemoveOperationIdPrefix(true).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); codegen.setOpenAPI(openAPI); String path; Operation operation; CodegenOperation co; - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "."); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, 2); codegen.processOpts(); @@ -3132,7 +3135,6 @@ public void testRemoveOperationIdPrefix() { co = codegen.fromOperation(operation, getOperationPath(path, "get"), null, null, null); assertEquals(co.operationId.pascalCase, "UsersGetAll"); - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "."); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, -1); codegen.processOpts(); @@ -3141,7 +3143,6 @@ public void testRemoveOperationIdPrefix() { co = codegen.fromOperation(operation, getOperationPath(path, "get"), null, null, null); assertEquals(co.operationId.pascalCase, "GetAll"); - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "."); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, 10); codegen.processOpts(); @@ -3150,7 +3151,6 @@ public void testRemoveOperationIdPrefix() { co = codegen.fromOperation(operation, getOperationPath(path, "get"), null, null, null); assertEquals(co.operationId.pascalCase, "GetAll"); - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "_"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, 2); codegen.processOpts(); @@ -3159,7 +3159,6 @@ public void testRemoveOperationIdPrefix() { co = codegen.fromOperation(operation, getOperationPath(path, "get"), null, null, null); assertEquals(co.operationId.pascalCase, "UsersGetAll"); - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "_"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, -1); codegen.processOpts(); @@ -3168,7 +3167,6 @@ public void testRemoveOperationIdPrefix() { co = codegen.fromOperation(operation, getOperationPath(path, "get"), null, null, null); assertEquals(co.operationId.pascalCase, "GetAll"); - codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX, "True"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DELIMITER, "_"); codegen.additionalProperties().put(CodegenConstants.REMOVE_OPERATION_ID_PREFIX_COUNT, 10); codegen.processOpts(); From e6c15d4f0b172ab56dbbcc2a671d6d39914694b5 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 15 Apr 2024 10:12:06 -0700 Subject: [PATCH 21/44] Fixes smokeTestAuthorTemplateCommand --- .../codegen/clicommands/AuthorTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java index f4ef572eeb9..679087d254c 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/AuthorTemplate.java @@ -41,7 +41,7 @@ public class AuthorTemplate extends AbstractCommand { @Override void execute() { Generator config = GeneratorLoader.getGenerator(generatorName, null, null); - String templateDirectory = config.generatorSettings().templateDir; + String templateDirectory = config.generatorSettings().embeddedTemplateDir; log("Requesting '{}' from embedded resource directory '{}'", generatorName, templateDirectory); From fd43dc4bd260f1208907f83a75d5c2f842ea8805 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 15 Apr 2024 14:40:13 -0700 Subject: [PATCH 22/44] Fixes java tests --- .../codegen/generators/DefaultGenerator.java | 15 +- .../generators/JavaClientGenerator.java | 195 +++++++++--------- .../generators/PythonClientGenerator.java | 33 +-- .../options/AbstractOptionsTest.java | 22 +- .../generators/options/OptionsProvider.java | 6 + .../options/PythonClientOptionsProvider.java | 14 +- .../options/PythonClientOptionsTest.java | 12 +- 7 files changed, 148 insertions(+), 149 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 375c4f810e6..fc0bf08e9f6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -292,9 +292,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo protected String apiNamePrefix = "", apiNameSuffix = "Api"; protected String filesMetadataFilename = "FILES"; protected String versionMetadataFilename = "VERSION"; - - protected String packageName = "src.main.java"; - protected String docsFolder = "docs"; // for writing api files protected HashMap> jsonPathTemplateFiles = new HashMap<>(); @@ -498,7 +495,7 @@ protected Map getModelNameToSchemaCache() { } public String packagePath() { - return packageName.replace('.', File.separatorChar); + return generatorSettings.packageName.replace('.', File.separatorChar); } /** @@ -1696,7 +1693,7 @@ protected boolean isValid(String name) { @Override public String getImport(CodegenRefInfo refInfo) { - String prefix = "from " + packageName + ".components."; + String prefix = "from " + generatorSettings.packageName + ".components."; if (refInfo.ref instanceof CodegenSchema) { if (refInfo.refModuleAlias == null) { return "from " + refInfo.refModuleLocation + " import " + refInfo.refModule; @@ -1836,7 +1833,7 @@ protected LinkedHashSet getTypes(Schema schema) { } private String schemaPathFromDocRoot(String moduleLocation) { - return moduleLocation.replace('.', File.separatorChar).substring(packageName.length()+1); + return moduleLocation.replace('.', File.separatorChar).substring(generatorSettings.packageName.length()+1); } private LinkedHashMap getPatternProperties(Map schemaPatternProperties, String jsonPath, String sourceJsonPath) { @@ -2921,20 +2918,20 @@ public CodegenList fromSecurity(List schemaSupportingFiles = new ArrayList<>(); schemaSupportingFiles.add("AnyTypeJsonSchema"); schemaSupportingFiles.add("BooleanJsonSchema"); @@ -1441,14 +1440,14 @@ private Set getDeeperImports(String sourceJsonPath, CodegenSchema schema if (schema.types != null) { if (schema.types.contains("array")) { imports.add("import java.util.List;"); - imports.add("import "+packageName + ".schemas.validation.FrozenList;"); + imports.add("import "+ generatorSettings.packageName + ".schemas.validation.FrozenList;"); if (schema.items != null) { imports.addAll(getDeeperImports(sourceJsonPath, schema.items)); } } if (schema.types.contains("object")) { imports.add("import java.util.Map;"); - imports.add("import "+packageName + ".schemas.validation.FrozenMap;"); + imports.add("import "+ generatorSettings.packageName + ".schemas.validation.FrozenMap;"); if (schema.mapValueSchema != null) { imports.addAll(getDeeperImports(sourceJsonPath, schema.mapValueSchema)); } @@ -1559,7 +1558,7 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu if (schema.types.size() == 1) { if (schema.types.contains("boolean")) { if (schema.isSimpleBoolean()) { - imports.add("import "+packageName + ".schemas.BooleanJsonSchema;"); + imports.add("import "+ generatorSettings.packageName + ".schemas.BooleanJsonSchema;"); imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); } else { addCustomSchemaImports(imports, schema); @@ -1568,7 +1567,7 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } } else if (schema.types.contains("null")) { if (schema.isSimpleNull()) { - imports.add("import "+packageName + ".schemas.NullJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.NullJsonSchema;"); imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); } else { addCustomSchemaImports(imports, schema); @@ -1579,11 +1578,11 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu if (schema.isSimpleInteger()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); if (schema.format == null || schema.format.equals("int")) { - imports.add("import "+packageName + ".schemas.IntJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.IntJsonSchema;"); } else if (schema.format.equals("int32")) { - imports.add("import "+packageName + ".schemas.Int32JsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.Int32JsonSchema;"); } else if (schema.format.equals("int64")) { - imports.add("import "+packageName + ".schemas.Int64JsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.Int64JsonSchema;"); } } else { addCustomSchemaImports(imports, schema); @@ -1594,15 +1593,15 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu if (schema.isSimpleNumber()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); if (schema.format == null) { - imports.add("import "+packageName + ".schemas.NumberJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.NumberJsonSchema;"); } else if (schema.format.equals("int32")) { - imports.add("import "+packageName + ".schemas.Int32JsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.Int32JsonSchema;"); } else if (schema.format.equals("int64")) { - imports.add("import "+packageName + ".schemas.Int64JsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.Int64JsonSchema;"); } else if (schema.format.equals("float")) { - imports.add("import "+packageName + ".schemas.FloatJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.FloatJsonSchema;"); } else if (schema.format.equals("double")) { - imports.add("import "+packageName + ".schemas.DoubleJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.DoubleJsonSchema;"); } } else { addCustomSchemaImports(imports, schema); @@ -1613,21 +1612,21 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu if (schema.isSimpleString()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); if (schema.format == null) { - imports.add("import "+packageName + ".schemas.StringJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.StringJsonSchema;"); } else if (schema.format.equals("date")) { - imports.add("import "+packageName + ".schemas.DateJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.DateJsonSchema;"); } else if (schema.format.equals("date-time")) { - imports.add("import "+packageName + ".schemas.DateTimeJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.DateTimeJsonSchema;"); } else if (schema.format.equals("number")) { - imports.add("import "+packageName + ".schemas.DecimalJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.DecimalJsonSchema;"); } else if (schema.format.equals("uuid")) { - imports.add("import "+packageName + ".schemas.UuidJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.UuidJsonSchema;"); } else if (schema.format.equals("byte")) { // todo implement this - imports.add("import "+packageName + ".schemas.StringJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.StringJsonSchema;"); } else if (schema.format.equals("binary")) { // todo implement this - imports.add("import "+packageName + ".schemas.StringJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.StringJsonSchema;"); } } else { addCustomSchemaImports(imports, schema); @@ -1637,9 +1636,9 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } else if (schema.types.contains("object")) { if (schema.isSimpleObject()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); - imports.add("import "+packageName + ".schemas.MapJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.MapJsonSchema;"); // add this in case the 1 higher schema is an array of FrozenMap - imports.add("import "+packageName + ".schemas.validation.FrozenMap;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenMap;"); } else { addCustomSchemaImports(imports, schema); imports.add("import java.util.Set;"); @@ -1651,9 +1650,9 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu } else if (schema.types.contains("array")) { if (schema.isSimpleArray()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); - imports.add("import "+packageName + ".schemas.ListJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.ListJsonSchema;"); // add this in case the 1 higher schema is a map of FrozenList - imports.add("import "+packageName + ".schemas.validation.FrozenList;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenList;"); } else { addCustomSchemaImports(imports, schema); imports.add("import java.util.Set;"); @@ -1695,29 +1694,29 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu // no types if (schema.isBooleanSchemaTrue) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); - imports.add("import "+packageName + ".schemas.AnyTypeJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.AnyTypeJsonSchema;"); } else if (schema.isBooleanSchemaFalse) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); - imports.add("import "+packageName + ".schemas.NotAnyTypeJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.NotAnyTypeJsonSchema;"); } else if (schema.isSimpleAnyType()) { imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); - imports.add("import "+packageName + ".schemas.AnyTypeJsonSchema;"); + imports.add("import "+generatorSettings.packageName + ".schemas.AnyTypeJsonSchema;"); // in case higher schema is ListBuilder add List + Map } else { addCustomSchemaImports(imports, schema); imports.add("import java.time.LocalDate;"); imports.add("import java.time.ZonedDateTime;"); imports.add("import java.util.UUID;"); - imports.add("import "+packageName + ".schemas.validation.FrozenList;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenList;"); imports.add("import java.util.List;"); - imports.add("import "+packageName + ".schemas.validation.FrozenMap;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenMap;"); imports.add("import java.util.Map;"); - imports.add("import "+packageName + ".schemas.validation.NullSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.BooleanSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.NumberSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.StringSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.ListSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.MapSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NullSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.BooleanSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NumberSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.StringSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.ListSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.MapSchemaValidator;"); imports.add("import java.util.LinkedHashMap;"); imports.add("import java.util.ArrayList;"); // for validate addPropertiesImports(schema, imports); @@ -1741,8 +1740,8 @@ public Set getImports(String sourceJsonPath, CodegenSchema schema, Featu imports.addAll(getDeeperImports(sourceJsonPath, schema.items)); } if (schema.additionalProperties == null || !schema.additionalProperties.isBooleanSchemaFalse) { - imports.add("import "+packageName + ".exceptions.UnsetPropertyException;"); - imports.add("import "+packageName + ".exceptions.InvalidAdditionalPropertyException;"); + imports.add("import "+generatorSettings.packageName + ".exceptions.UnsetPropertyException;"); + imports.add("import "+generatorSettings.packageName + ".exceptions.InvalidAdditionalPropertyException;"); } } } @@ -1757,45 +1756,45 @@ private void addPatternValidator(CodegenSchema schema, Set imports) { private void addDefaultValueImport(CodegenSchema schema, Set imports) { if (schema.defaultValue != null) { - imports.add("import "+packageName + ".schemas.validation.DefaultValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.DefaultValueMethod;"); } } private void addEnumValidator(CodegenSchema schema, Set imports) { if (schema.enumInfo != null) { - imports.add("import "+packageName + ".schemas.SetMaker;"); + imports.add("import "+generatorSettings.packageName + ".schemas.SetMaker;"); if (schema.enumInfo.typeToValues.containsKey("null")) { - imports.add("import "+packageName + ".schemas.validation.NullEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.NullValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NullEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NullValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("boolean")) { - imports.add("import "+packageName + ".schemas.validation.BooleanEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.BooleanValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.BooleanEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.BooleanValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("string")) { - imports.add("import "+packageName + ".schemas.validation.StringEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.StringValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.StringEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.StringValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("Integer")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.IntegerEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.IntegerValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.IntegerEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.IntegerValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("Long")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.LongEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.LongValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.LongEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.LongValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("Float")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.FloatEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.FloatValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FloatEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FloatValueMethod;"); } if (schema.enumInfo.typeToValues.containsKey("Double")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.DoubleEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.DoubleValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.DoubleEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.DoubleValueMethod;"); } } } @@ -1803,47 +1802,47 @@ private void addEnumValidator(CodegenSchema schema, Set imports) { private void addConstImports(CodegenSchema schema, Set imports) { if (schema.constInfo != null) { if (schema.constInfo.typeToValues.containsKey("null")) { - imports.add("import "+packageName + ".schemas.validation.NullEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.NullValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NullEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.NullValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("boolean")) { - imports.add("import "+packageName + ".schemas.validation.BooleanEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.BooleanValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.BooleanEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.BooleanValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("string")) { - imports.add("import "+packageName + ".schemas.validation.StringEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.StringValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.StringEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.StringValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("Integer")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.IntegerEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.IntegerValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.IntegerEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.IntegerValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("Long")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.LongEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.LongValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.LongEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.LongValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("Float")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.FloatEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.FloatValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FloatEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FloatValueMethod;"); } if (schema.constInfo.typeToValues.containsKey("Double")) { imports.add("import java.math.BigDecimal;"); - imports.add("import "+packageName + ".schemas.validation.DoubleEnumValidator;"); - imports.add("import "+packageName + ".schemas.validation.DoubleValueMethod;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.DoubleEnumValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.DoubleValueMethod;"); } } } private void addPropertiesImports(CodegenSchema schema, Set imports) { if (schema.properties != null) { - imports.add("import " + packageName + ".schemas.validation.PropertyEntry;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.PropertyEntry;"); imports.add("import java.util.Map;"); imports.add("import java.util.Set;"); - imports.add("import " + packageName + ".exceptions.UnsetPropertyException;"); - imports.add("import " + packageName + ".schemas.GenericBuilder;"); + imports.add("import " + generatorSettings.packageName + ".exceptions.UnsetPropertyException;"); + imports.add("import " + generatorSettings.packageName + ".schemas.GenericBuilder;"); } } @@ -1857,16 +1856,16 @@ private void addPatternPropertiesImports(CodegenSchema schema, Set impor private void addDependentSchemasImports(CodegenSchema schema, Set imports) { if (schema.dependentSchemas != null) { - imports.add("import " + packageName + ".schemas.validation.PropertyEntry;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.PropertyEntry;"); imports.add("import java.util.Map;"); } } private void addDependentRequiredImports(CodegenSchema schema, Set imports) { if (schema.dependentRequired != null) { - imports.add("import "+packageName + ".schemas.validation.MapUtils;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.MapUtils;"); imports.add("import java.util.AbstractMap;"); - imports.add("import "+packageName + ".schemas.SetMaker;"); + imports.add("import "+generatorSettings.packageName + ".schemas.SetMaker;"); } } @@ -1890,14 +1889,14 @@ private void addOneOfValidator(CodegenSchema schema, Set imports) { private void addAdditionalPropertiesImports(CodegenSchema schema, Set imports) { if (schema.additionalProperties == null || !schema.additionalProperties.isBooleanSchemaFalse) { - imports.add("import "+packageName + ".exceptions.UnsetPropertyException;"); - imports.add("import "+packageName + ".exceptions.InvalidAdditionalPropertyException;"); + imports.add("import "+generatorSettings.packageName + ".exceptions.UnsetPropertyException;"); + imports.add("import "+generatorSettings.packageName + ".exceptions.InvalidAdditionalPropertyException;"); } if (schema.additionalProperties != null) { - imports.add("import "+packageName + ".schemas.GenericBuilder;"); - imports.add("import "+packageName + ".schemas.validation.MapUtils;"); + imports.add("import "+generatorSettings.packageName + ".schemas.GenericBuilder;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.MapUtils;"); } else { - imports.add("import "+packageName + ".schemas.UnsetAddPropsSetter;"); + imports.add("import "+generatorSettings.packageName + ".schemas.UnsetAddPropsSetter;"); } } @@ -1905,7 +1904,7 @@ private void addAdditionalPropertiesImports(CodegenSchema schema, Set im private void addRequiredValidator(CodegenSchema schema, Set imports) { if (schema.requiredProperties != null) { imports.add("import java.util.Set;"); - imports.add("import "+packageName + ".schemas.GenericBuilder;"); + imports.add("import "+generatorSettings.packageName + ".schemas.GenericBuilder;"); } } @@ -1916,23 +1915,23 @@ private void addMultipleOfValidator(CodegenSchema schema, Set imports) { } private void addCustomSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.JsonSchema;"); - imports.add("import " + packageName + ".schemas.validation.JsonSchemaInfo;"); - imports.add("import "+packageName + ".configurations.SchemaConfiguration;"); - imports.add("import "+packageName + ".exceptions.ValidationException;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.JsonSchema;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.JsonSchemaInfo;"); + imports.add("import "+generatorSettings.packageName + ".configurations.SchemaConfiguration;"); + imports.add("import "+generatorSettings.packageName + ".exceptions.ValidationException;"); imports.add("import java.util.Set;"); // for validate imports.add("import java.util.HashSet;"); // for validate imports.add("import java.util.Objects;"); // for validate imports.add("import java.util.LinkedHashSet;"); // for validate imports.add("import java.util.List;"); // for castToAllowedTypes - imports.add("import "+packageName + ".schemas.validation.PathToSchemasMap;"); // for getNewInstance - imports.add("import "+packageName + ".schemas.validation.ValidationMetadata;"); // for getNewInstance - imports.add("import "+packageName + ".configurations.JsonSchemaKeywordFlags;"); // for getNewInstance + imports.add("import "+generatorSettings.packageName + ".schemas.validation.PathToSchemasMap;"); // for getNewInstance + imports.add("import "+generatorSettings.packageName + ".schemas.validation.ValidationMetadata;"); // for getNewInstance + imports.add("import "+generatorSettings.packageName + ".configurations.JsonSchemaKeywordFlags;"); // for getNewInstance imports.add("import org.checkerframework.checker.nullness.qual.Nullable;"); } private void addBooleanSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.BooleanSchemaValidator;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.BooleanSchemaValidator;"); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); @@ -1942,7 +1941,7 @@ private void addBooleanSchemaImports(Set imports, CodegenSchema schema) } private void addNullSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.NullSchemaValidator;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.NullSchemaValidator;"); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); @@ -1952,8 +1951,8 @@ private void addNullSchemaImports(Set imports, CodegenSchema schema) { } private void addMapSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.MapSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.FrozenMap;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.MapSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenMap;"); imports.add("import java.util.Map;"); imports.add("import java.util.ArrayList;"); // for castToAllowedTypes imports.add("import java.util.LinkedHashMap;"); @@ -1969,8 +1968,8 @@ private void addMapSchemaImports(Set imports, CodegenSchema schema) { } private void addListSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.ListSchemaValidator;"); - imports.add("import "+packageName + ".schemas.validation.FrozenList;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.ListSchemaValidator;"); + imports.add("import "+generatorSettings.packageName + ".schemas.validation.FrozenList;"); imports.add("import java.util.List;"); imports.add("import java.util.ArrayList;"); // for castToAllowedTypes imports.add("import java.util.LinkedHashMap;"); @@ -1980,7 +1979,7 @@ private void addListSchemaImports(Set imports, CodegenSchema schema) { } private void addNumberSchemaImports(Set imports, CodegenSchema schema) { - imports.add("import " + packageName + ".schemas.validation.NumberSchemaValidator;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.NumberSchemaValidator;"); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); @@ -2004,7 +2003,7 @@ private void addStringSchemaImports(Set imports, CodegenSchema schema) { break; } } - imports.add("import " + packageName + ".schemas.validation.StringSchemaValidator;"); + imports.add("import " + generatorSettings.packageName + ".schemas.validation.StringSchemaValidator;"); addAllOfValidator(schema, imports); addAnyOfValidator(schema, imports); addOneOfValidator(schema, imports); @@ -2017,7 +2016,7 @@ private void addStringSchemaImports(Set imports, CodegenSchema schema) { @Override public String getImport(CodegenRefInfo refInfo) { - String prefix = "import " + packageName + ".components."; + String prefix = "import " + generatorSettings.packageName + ".components."; if (refInfo.ref instanceof CodegenSchema) { if (refInfo.refModuleAlias == null) { return "import " + refInfo.refModuleLocation + "." + refInfo.refModule + ";"; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 90e1cac8ef7..2a1fe70d4e1 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -367,8 +367,7 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin regexModifiers.put('u', "UNICODE"); cliOptions.clear(); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).") - .defaultValue("openapi_client")); + // TODO ensure that PACKAGE_NAME + TEMPLATING_ENGINE is documented in help cliOptions.add(new CliOption(CodegenConstants.PROJECT_NAME, "python project name in setup.py (e.g. petstore-api).")); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "python package version.") .defaultValue("1.0.0")); @@ -385,12 +384,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); - CliOption templateEngineOption = new CliOption(CodegenConstants.TEMPLATING_ENGINE, "template engine"); - templateEngineOption.setDefault("handlebars"); - Map templateEngineEnumValueToDesc = new HashMap<>(); - templateEngineEnumValueToDesc.put("handlebars", "handlebars templating engine"); - templateEngineOption.setEnum(templateEngineEnumValueToDesc); - cliOptions.add(templateEngineOption); 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"); @@ -721,24 +714,19 @@ public void processOpts() { boolean excludeTests = false; - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { - setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); - } + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { + setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); + } if (additionalProperties.containsKey(CodegenConstants.PROJECT_NAME)) { setProjectName((String) additionalProperties.get(CodegenConstants.PROJECT_NAME)); } else { // default: set project based on package name // e.g. petstore_api (package name) => petstore-api (project name) - setProjectName(packageName.replaceAll("_", "-")); - } - - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { - setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); + setProjectName(generatorSettings.packageName.replaceAll("_", "-")); } additionalProperties.put(CodegenConstants.PROJECT_NAME, projectName); - additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); if (additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) { @@ -806,7 +794,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("configurations" + File.separatorChar + "api_configuration.hbs", packagePath() + File.separatorChar + "configurations", "api_configuration.py")); // If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files. - String[] packageNameSplits = packageName.split("\\."); + String[] packageNameSplits = generatorSettings.packageName.split("\\."); String currentPackagePath = ""; for (int i = 0; i < packageNameSplits.length - 1; i++) { if (i > 0) { @@ -991,7 +979,7 @@ public String toModelImport(String refClass) { return null; } String modelModule = refClassPieces[0]; - return "from " + packageName + "." + modelPackage + " import " + modelModule; + return "from " + generatorSettings.packageName + "." + modelPackage + " import " + modelModule; } /*** @@ -1780,7 +1768,7 @@ public void setPackageUrl(String packageUrl) { public String packagePath() { // src is needed for modern packaging per // https://packaging.python.org/en/latest/tutorials/packaging-projects/ - return "src" + File.separatorChar + packageName.replace('.', File.separatorChar); + return "src" + File.separatorChar + generatorSettings.packageName.replace('.', File.separatorChar); } @@ -2221,11 +2209,6 @@ public void postProcessFile(File file, String fileType) { } } - public void setPackageName(String packageName) { - this.packageName = packageName; - additionalProperties.put(CodegenConstants.PACKAGE_NAME, this.packageName); - } - public void setProjectName(String projectName) { this.projectName = projectName; } diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/options/AbstractOptionsTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/options/AbstractOptionsTest.java index 5744f7356e8..a4fc90daec2 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/options/AbstractOptionsTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/options/AbstractOptionsTest.java @@ -20,6 +20,8 @@ import com.google.common.base.Function; import org.apache.commons.lang3.StringUtils; import org.mockito.MockSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; +import org.openapijsonschematools.codegen.generators.PythonClientGenerator; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.generators.Generator; import org.testng.Assert; @@ -32,14 +34,15 @@ import java.util.stream.Collectors; import static org.mockito.Answers.CALLS_REAL_METHODS; +import static org.mockito.Mockito.spy; import static org.mockito.Mockito.withSettings; /** * Base class for applying and processing generator options, then invoking a helper method to verify those options. */ -public abstract class AbstractOptionsTest { +public abstract class AbstractOptionsTest { protected MockSettings mockSettings = withSettings().useConstructor().defaultAnswer(CALLS_REAL_METHODS); - private final OptionsProvider optionsProvider; + protected final OptionsProvider optionsProvider; protected AbstractOptionsTest(OptionsProvider optionsProvider) { this.optionsProvider = optionsProvider; @@ -48,14 +51,17 @@ protected AbstractOptionsTest(OptionsProvider optionsProvider) { @SuppressWarnings("unused") @Test public void checkOptionsProcessing() { - getCodegenConfig().additionalProperties().putAll(optionsProvider.createOptions()); - getCodegenConfig().processOpts(); - verifyOptions(); + T generator = getCodegenConfig(); + generator.additionalProperties().putAll(optionsProvider.createOptions()); + T spyGen = spy(generator); + spyGen.processOpts(); + verifyOptions(spyGen); } @Test(description = "check if all options described in documentation are presented in test case") public void checkOptionsHelp() { - final List cliOptions = getCodegenConfig().cliOptions().stream().map(getCliOptionTransformer()).collect(Collectors.toList()); + T generator = getCodegenConfig(); + final List cliOptions = generator.cliOptions().stream().map(getCliOptionTransformer()).collect(Collectors.toList()); final Set testOptions = optionsProvider.createOptions().keySet(); final Set skipped = new HashSet(cliOptions); skipped.removeAll(testOptions); @@ -78,7 +84,7 @@ public String apply(CliOption option) { }; } - protected abstract Generator getCodegenConfig(); + protected abstract T getCodegenConfig(); - protected abstract void verifyOptions(); + protected abstract void verifyOptions(T gen); } diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/options/OptionsProvider.java b/src/test/java/org/openapijsonschematools/codegen/generators/options/OptionsProvider.java index 5aa717c29fc..69412b666fb 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/options/OptionsProvider.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/options/OptionsProvider.java @@ -17,10 +17,16 @@ package org.openapijsonschematools.codegen.generators.options; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; + import java.util.Map; public interface OptionsProvider { String getLanguage(); Map createOptions(); + + WorkflowSettings createWorkflowInput(); + GeneratorSettings createGeneratorInput(); boolean isServer(); } diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsProvider.java b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsProvider.java index 78af9d58cd8..acee175f576 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsProvider.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsProvider.java @@ -19,6 +19,8 @@ import com.google.common.collect.ImmutableMap; import org.openapijsonschematools.codegen.common.CodegenConstants; +import org.openapijsonschematools.codegen.config.GeneratorSettings; +import org.openapijsonschematools.codegen.config.WorkflowSettings; import org.openapijsonschematools.codegen.generators.PythonClientGenerator; import java.util.Map; @@ -40,7 +42,6 @@ public String getLanguage() { public Map createOptions() { ImmutableMap.Builder builder = new ImmutableMap.Builder(); return builder.put(PythonClientGenerator.PACKAGE_URL, PACKAGE_URL_VALUE) - .put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE) .put(CodegenConstants.PROJECT_NAME, PROJECT_NAME_VALUE) .put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE) .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true") @@ -48,10 +49,19 @@ public Map createOptions() { .put(PythonClientGenerator.USE_NOSE, USE_NOSE_VALUE) .put(PythonClientGenerator.RECURSION_LIMIT, RECURSION_LIMIT) .put(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, "false") - .put(CodegenConstants.TEMPLATING_ENGINE, "handlebars") .build(); } + @Override + public WorkflowSettings createWorkflowInput() { + return WorkflowSettings.newBuilder().withTemplatingEngineName("handlebars").build(); + } + + @Override + public GeneratorSettings createGeneratorInput() { + return GeneratorSettings.newBuilder().withPackageName(PACKAGE_NAME_VALUE).build(); + } + @Override public boolean isServer() { return false; diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java index 500280d73ab..b8d2ad47404 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/options/PythonClientOptionsTest.java @@ -21,25 +21,23 @@ import org.openapijsonschematools.codegen.generators.PythonClientGenerator; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -public class PythonClientOptionsTest extends AbstractOptionsTest { +public class PythonClientOptionsTest extends AbstractOptionsTest { public PythonClientOptionsTest() { super(new PythonClientOptionsProvider()); } @Override protected PythonClientGenerator getCodegenConfig() { - return new PythonClientGenerator(null, null); + return new PythonClientGenerator(optionsProvider.createGeneratorInput(), optionsProvider.createWorkflowInput()); } - @SuppressWarnings("unused") @Override - protected void verifyOptions() { - PythonClientGenerator gen = getCodegenConfig(); - verify(gen).setPackageVersion(PythonClientOptionsProvider.PACKAGE_VERSION_VALUE); - verify(gen).setPackageName(PythonClientOptionsProvider.PACKAGE_NAME_VALUE); + protected void verifyOptions(PythonClientGenerator spyGen) { + verify(spyGen).setPackageVersion(PythonClientOptionsProvider.PACKAGE_VERSION_VALUE); } } From 1ecf67f07c9bb895ffe6fc405f9480b0a4d755da Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 14:02:06 -0700 Subject: [PATCH 23/44] Moves reservedWords into generator metadata --- .../codegen/clicommands/ConfigHelp.java | 6 +- .../codegen/clicommands/Generate.java | 10 +- .../codegen/config/CodegenConfigurator.java | 12 +- .../codegen/config/WorkflowSettings.java | 15 ++- .../DefaultGeneratorRunner.java | 8 +- .../codegen/generators/DefaultGenerator.java | 100 +++------------ .../codegen/generators/Generator.java | 37 +++--- .../generators/JavaClientGenerator.java | 120 +++++++++--------- .../generators/PythonClientGenerator.java | 114 ++++++----------- .../generatorloader/GeneratorLoader.java | 19 +-- .../generatormetadata/GeneratorMetadata.java | 38 +++++- .../models/CodeGeneratorSettings.java | 9 +- .../templating/mustache/CaseFormatLambda.java | 2 +- .../templating/mustache/LowercaseLambda.java | 2 +- .../generators/DefaultGeneratorTest.java | 29 ++--- .../mustache/LowercaseLambdaTest.java | 7 +- 16 files changed, 238 insertions(+), 290 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 46d8dc54696..4cd80906916 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -247,7 +247,7 @@ private void generateMdReservedWords(StringBuilder sb, Generator config) { sb.append(newline).append("## RESERVED WORDS").append(newline).append(newline); sb.append("
    ").append(newline); - config.reservedWords() + config.getGeneratorMetadata().getReservedWords() .stream() .sorted(String::compareTo) .forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); @@ -311,7 +311,7 @@ private void generateMdMetadata(StringBuilder sb, Generator config) { sb.append("| generator language version | "+meta.getLanguageVersion()+" | |").append(newline); } sb.append("| generator default templating engine | "+config.defaultTemplatingEngine()+" | |").append(newline); - sb.append("| helpTxt | "+meta.getHelpTxt()+" | |").append(newline); + sb.append("| helpMsg | "+meta.getHelpMsg()+" | |").append(newline); sb.append(newline); } @@ -423,7 +423,7 @@ private void generatePlainTextHelp(StringBuilder sb, Generator config) { if (Boolean.TRUE.equals(reservedWords)) { sb.append(newline).append("RESERVED WORDS").append(newline).append(newline); - String[] arr = config.reservedWords().stream().sorted().toArray(String[]::new); + String[] arr = config.getGeneratorMetadata().getReservedWords().stream().sorted().toArray(String[]::new); writePlainTextFromArray(sb, arr, optIndent); sb.append(newline); } diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index 761083b2975..b5242ba7b86 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -61,7 +61,7 @@ public class Generate extends AbstractCommand { private String templateDir; @Option(name = {"-e", "--engine"}, title = "templating engine", - description = "templating engine: \"mustache\" (default) or \"handlebars\" (beta)") + description = "templating engine: \"handlebars\"(default) or \"mustache\"") private String templatingEngine; @Option( @@ -165,6 +165,10 @@ public class Generate extends AbstractCommand { description = CodegenConstants.REMOVE_OPERATION_ID_PREFIX_DESC) private Boolean removeOperationIdPrefix; + @Option(name = {"--remove-enum-value-prefix"}, title = "remove prefix of the enum values", + description = CodegenConstants.REMOVE_ENUM_VALUE_PREFIX_DESC) + private Boolean removeEnumValuePrefix; + @Option(name = {"--skip-operation-example"}, title = "skip examples defined in the operation", description = CodegenConstants.SKIP_OPERATION_EXAMPLE_DESC) private Boolean skipOperationExample; @@ -315,6 +319,10 @@ public void execute() { configurator.setRemoveOperationIdPrefix(removeOperationIdPrefix); } + if (removeEnumValuePrefix != null) { + configurator.setRemoveOperationIdPrefix(removeOperationIdPrefix); + } + if (skipOperationExample != null) { configurator.setSkipOperationExample(skipOperationExample); } diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 972f7e607e8..c9659edc14f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -319,6 +319,11 @@ public CodegenConfigurator setRemoveOperationIdPrefix(boolean removeOperationIdP return this; } + public CodegenConfigurator setRemoveEnumValuePrefix(boolean removeEnumValuePrefix) { + workflowSettingsBuilder.withRemoveEnumValuePrefix(removeEnumValuePrefix); + return this; + } + public CodegenConfigurator setSkipOperationExample(boolean skipOperationExample) { workflowSettingsBuilder.withSkipOperationExample(skipOperationExample); return this; @@ -367,12 +372,7 @@ public Context toContext() { Validate.notEmpty(inputSpec, "input spec must be specified"); GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); - Generator config = GeneratorLoader.getGenerator(generatorSettings.getGeneratorName(), generatorSettings, null); - if (isEmpty(templatingEngineName)) { - // if templatingEngineName is empty check the config for a default - String defaultTemplatingEngine = config.defaultTemplatingEngine(); - workflowSettingsBuilder.withTemplatingEngineName(defaultTemplatingEngine); - } else { + if (!isEmpty(templatingEngineName)) { workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); } diff --git a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java index 30deab3fab3..3698bc0da10 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java @@ -39,13 +39,14 @@ public class WorkflowSettings { public static final boolean DEFAULT_VERBOSE = false; public static final boolean DEFAULT_SKIP_OVERWRITE = false; public static final boolean DEFAULT_REMOVE_OPERATION_ID_PREFIX = false; + public static final boolean DEFAULT_REMOVE_ENUM_VALUE_PREFIX = false; public static final boolean DEFAULT_SKIP_OPERATION_EXAMPLE = false; public static final boolean DEFAULT_LOG_TO_STDERR = false; public static final boolean DEFAULT_VALIDATE_SPEC = true; public static final boolean DEFAULT_ENABLE_POST_PROCESS_FILE = false; public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; - public static final String DEFAULT_TEMPLATING_ENGINE_NAME = null; // this is set by the generator + public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "handlebars"; public static final Map DEFAULT_GLOBAL_PROPERTIES = Collections.unmodifiableMap(new HashMap<>()); private String inputSpec; @@ -63,6 +64,7 @@ public class WorkflowSettings { private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME; private String ignoreFileOverride; private Map globalProperties = DEFAULT_GLOBAL_PROPERTIES; + private boolean removeEnumValuePrefix = DEFAULT_REMOVE_ENUM_VALUE_PREFIX; private WorkflowSettings(Builder builder) { this.inputSpec = builder.inputSpec; @@ -80,6 +82,7 @@ private WorkflowSettings(Builder builder) { this.templatingEngineName = builder.templatingEngineName; this.ignoreFileOverride = builder.ignoreFileOverride; this.globalProperties = Collections.unmodifiableMap(builder.globalProperties); + this.removeEnumValuePrefix = builder.removeEnumValuePrefix; } /** @@ -112,6 +115,7 @@ public static Builder newBuilder(WorkflowSettings copy) { // this, and any other collections, must be mutable in the builder. builder.globalProperties = new HashMap<>(copy.getGlobalProperties()); + builder.removeEnumValuePrefix = copy.isRemoveEnumValuePrefix(); // force builder "with" methods to invoke side effects builder.withTemplateDir(copy.getTemplateDir()); @@ -166,6 +170,9 @@ public boolean isRemoveOperationIdPrefix() { return removeOperationIdPrefix; } + public boolean isRemoveEnumValuePrefix() { + return removeEnumValuePrefix; + } /** * Indicates whether or not to skip examples defined in the operation. * @@ -289,6 +296,8 @@ public static final class Builder { private Boolean verbose = DEFAULT_VERBOSE; private Boolean skipOverwrite = DEFAULT_SKIP_OVERWRITE; private Boolean removeOperationIdPrefix = DEFAULT_REMOVE_OPERATION_ID_PREFIX; + + private Boolean removeEnumValuePrefix = DEFAULT_REMOVE_ENUM_VALUE_PREFIX; private Boolean skipOperationExample = DEFAULT_SKIP_OPERATION_EXAMPLE; private Boolean logToStderr = DEFAULT_LOG_TO_STDERR; private Boolean validateSpec = DEFAULT_VALIDATE_SPEC; @@ -367,6 +376,10 @@ public Builder withRemoveOperationIdPrefix(Boolean removeOperationIdPrefix) { return this; } + public Builder withRemoveEnumValuePrefix(Boolean removeEnumValuePrefix) { + this.removeEnumValuePrefix = removeEnumValuePrefix != null ? removeEnumValuePrefix : Boolean.valueOf(DEFAULT_REMOVE_ENUM_VALUE_PREFIX); + return this; + } /** * Sets the {@code skipOperationExample} and returns a reference to this Builder so that the methods can be chained together. * diff --git a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java index a1a4de7ca83..1ea91068f8e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java +++ b/src/main/java/org/openapijsonschematools/codegen/generatorrunner/DefaultGeneratorRunner.java @@ -1610,8 +1610,12 @@ public List generate() { } } - // post-process - generator.postProcess(); + List postGenerationMsg = generator.getGeneratorMetadata().getPostGenerationMsg(); + if (postGenerationMsg != null && !postGenerationMsg.isEmpty()) { + for (String msg: postGenerationMsg) { + LOGGER.info(msg); + } + } // reset GlobalSettings, so that the running thread can be reused for another generator-run GlobalSettings.reset(); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index fc0bf08e9f6..bcdc8a82f99 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -135,6 +135,14 @@ @SuppressWarnings("rawtypes") public class DefaultGenerator implements Generator { protected CodeGeneratorSettings generatorSettings; + protected static final List defaultPostGenerationMsg = List.of( + "################################################################################", + "# Thanks for using OpenAPI JSON Schema Generator. #", + "# Please consider donation to help us maintain this project \uD83D\uDE4F #", + "# https://github.com/sponsors/spacether #", + "################################################################################" + ); + protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { this.generatorSettings = CodeGeneratorSettings.of(generatorSettings, workflowSettings, embeddedTemplateDir, packageNameDefault, outputFolderDefault); @@ -182,8 +190,6 @@ protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings instantiationTypes = new HashMap<>(); - reservedWords = new HashSet<>(); - // name formatting options cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants .ALLOW_UNICODE_IDENTIFIERS_DESC).defaultValue(Boolean.FALSE.toString())); @@ -276,14 +282,15 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo .stability(Stability.EXPERIMENTAL) .featureSet(DefaultFeatureSet) .generationMessage("OpenAPI JSON Schema Generator: java "+GeneratorType.CLIENT.toValue()) - .helpTxt("todo replace help text") + .helpMsg("todo replace help text") + .postGenerationMsg(defaultPostGenerationMsg) + .reservedWords(Set.of()) .build(); protected String inputSpec; protected Set defaultIncludes; protected Map typeMapping; // instantiationTypes map from container types only: set, map, and array to the in language-type protected Map instantiationTypes; - protected Set reservedWords; protected Set languageSpecificPrimitives = new HashSet<>(); // a map to store the mapping between a schema and the new one // a map to store the mapping between inline schema and the name provided by the user @@ -300,8 +307,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo // for writing test files protected HashMap> jsonPathTestTemplateFiles = new HashMap<>(); - protected String templateDir; - protected String embeddedTemplateDir; protected Map additionalProperties = new HashMap<>(); protected Map vendorExtensions = new HashMap<>(); /* @@ -348,8 +353,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo // flag to indicate whether to use environment variable to post process file protected boolean enablePostProcessFile = false; - protected boolean enableMinimalUpdate = false; - // flag to indicate whether enum value prefixes are removed protected boolean removeEnumValuePrefix = true; @@ -424,13 +427,7 @@ public void processOpts() { .get(CodegenConstants.DOCEXTENSION).toString())); } - if (additionalProperties.containsKey(CodegenConstants.REMOVE_ENUM_VALUE_PREFIX)) { - this.setRemoveEnumValuePrefix(Boolean.parseBoolean(additionalProperties - .get(CodegenConstants.REMOVE_ENUM_VALUE_PREFIX).toString())); - } - requiredAddPropUnsetSchema = fromSchema(new JsonSchema(), null, null); - } /*** @@ -569,17 +566,6 @@ public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; } - // override with any message to be shown right before the process finishes - @Override - @SuppressWarnings("static-method") - public void postProcess() { - LOGGER.info("################################################################################"); - LOGGER.info("# Thanks for using OpenAPI JSON Schema Generator. #"); - LOGGER.info("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); - LOGGER.info("# https://github.com/sponsors/spacether #"); - LOGGER.info("################################################################################"); - } - // override with any special post-processing @Override @SuppressWarnings("static-method") @@ -645,32 +631,6 @@ public String escapeText(String input) { .replace("\"", "\\\"")); } - /** - * Escape characters while allowing new lines - * - * @param input String to be escaped - * @return escaped string - */ - @Override - public String escapeTextWhileAllowingNewLines(String input) { - if (input == null) { - return null; - } - - // remove \t - // replace \ with \\ - // replace " with \" - // outer unescape to retain the original multibyte characters - // finally escalate characters avoiding code injection - return escapeUnsafeCharacters( - StringEscapeUtils.unescapeJava( - StringEscapeUtils.escapeJava(input) - .replace("\\/", "/")) - .replaceAll("\\t", " ") - .replace("\\", "\\\\") - .replace("\"", "\\\"")); - } - /** * override with any special text escaping logic to handle unsafe * characters to avoid code injection @@ -721,11 +681,6 @@ public HashMap } } - @Override - public Set reservedWords() { - return reservedWords; - } - @Override public Set languageSpecificPrimitives() { return languageSpecificPrimitives; @@ -916,7 +871,7 @@ public GeneratorMetadata getGeneratorMetadata() { * @return the sanitized variable name */ public String toVarName(final String name) { - if (reservedWords.contains(name)) { + if (generatorMetadata.getReservedWords().contains(name)) { return escapeReservedWord(name); } else if (name.chars().anyMatch(character -> specialCharReplacements.containsKey(String.valueOf((char) character)))) { return org.openapijsonschematools.codegen.common.StringUtils.escape(name, specialCharReplacements, null, null); @@ -941,7 +896,7 @@ public String toParamName(String name) { result = result.substring(0, 1).toLowerCase(Locale.ROOT) + result.substring(1); } name = result; // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - if (reservedWords.contains(name)) { + if (generatorMetadata.getReservedWords().contains(name)) { return escapeReservedWord(name); } else if (name.chars().anyMatch(character -> specialCharReplacements.containsKey(String.valueOf((char) character)))) { return org.openapijsonschematools.codegen.common.StringUtils.escape(name, specialCharReplacements, null, null); @@ -3472,15 +3427,16 @@ public CodegenSecurityScheme fromSecurityScheme(SecurityScheme securityScheme, S return cs; } - protected void setReservedWordsLowerCase(List words) { - reservedWords = new HashSet<>(); + protected static Set getLowerCaseWords(List words) { + Set lowerCaseWords = new HashSet<>(); for (String word : words) { - reservedWords.add(word.toLowerCase(Locale.ROOT)); + lowerCaseWords.add(word.toLowerCase(Locale.ROOT)); } + return lowerCaseWords; } protected boolean isReservedWord(String word) { - return word != null && reservedWords.contains(word.toLowerCase(Locale.ROOT)); + return word != null && generatorMetadata.getReservedWords().contains(word.toLowerCase(Locale.ROOT)); } /** @@ -4232,7 +4188,7 @@ protected EnumInfo getEnumInfo(ArrayList values, Schema schema, Strin LinkedHashMap enumNameToValue = new LinkedHashMap<>(); int truncateIdx = 0; - if (isRemoveEnumValuePrefix()) { + if (generatorSettings.removeEnumValuePrefix) { String commonPrefix = findCommonPrefixOfVars(values); truncateIdx = commonPrefix.length(); } @@ -5136,24 +5092,6 @@ public void postProcessFile(File file, String fileType) { LOGGER.debug("Post processing file {} ({})", file, fileType); } - /** - * Get the boolean value indicating whether to remove enum value prefixes - */ - @Override - public boolean isRemoveEnumValuePrefix() { - return this.removeEnumValuePrefix; - } - - /** - * Set the boolean value indicating whether to remove enum value prefixes - * - * @param removeEnumValuePrefix true to enable enum value prefix removal - */ - @Override - public void setRemoveEnumValuePrefix(final boolean removeEnumValuePrefix) { - this.removeEnumValuePrefix = removeEnumValuePrefix; - } - /** * A map entry for cached sanitized names. */ diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index a28ba1ce1e8..303b624b51a 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -56,42 +56,35 @@ public interface Generator extends OpenApiProcessor, Comparable { CodeGeneratorSettings generatorSettings(); - // todo deprecate this and make a key of api String toApiName(String name); - // todo remove this because it is unused String toApiVarName(String name); - // todo deprecate this and change it to getClassName String toModelName(String name, String jsonPath); String escapeText(String text); - // todo remove because unused - String escapeTextWhileAllowingNewLines(String text); - String escapeUnsafeCharacters(String input); String escapeReservedWord(String name); String escapeQuotationMark(String input); - // todo deprecate this and move it into new + // todo remove this and move it into new void processOpts(); List cliOptions(); - Set reservedWords(); - List supportingFiles(); - // todo deprecate this CodegenKey getKey(String key, String keyType); + // todo move into metadata Map instantiationTypes(); HashMap> getJsonPathTemplateFiles(GeneratedFileType type); + // todo move into metadata Set languageSpecificPrimitives(); // todo remove + move this into the new constructor @@ -100,20 +93,14 @@ public interface Generator extends OpenApiProcessor, Comparable { // todo remove and move this into the new constructor void processOpenAPI(OpenAPI openAPI); - // todo deprecate this, use getKey with api type String toApiFilename(String name); - // todo deprecate and change to getSnakeCase String toModelFilename(String name, String jsonPath); - // todo can this be eliminated? getPascalCase/getSnakeCase and getFileName should do everything String toModuleFilename(String name, String jsonPath); TreeMap updateAllModels(TreeMap models); - // todo remove and use postGenerationMsg in generationMetadata - void postProcess(); - TreeMap postProcessAllModels(TreeMap schemas); Map postProcessSupportingFileData(Map data); @@ -147,10 +134,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodegenPatternInfo getPatternInfo(String pattern); - boolean isRemoveEnumValuePrefix(); - - void setRemoveEnumValuePrefix(boolean removeEnumValuePrefix); - String defaultTemplatingEngine(); List getSupportedVendorExtensions(); @@ -261,7 +244,7 @@ default String generatorLanguageVersion() { @Deprecated default String getHelp() { - return getGeneratorMetadata().getHelpTxt(); + return getGeneratorMetadata().getHelpMsg(); } @Deprecated @@ -365,5 +348,15 @@ default boolean isEnablePostProcessFile() { default String getInputSpec() { return generatorSettings().inputSpecLocation; } - // 96 - 41 -> 55 + + @Deprecated + default boolean isRemoveEnumValuePrefix() { + return generatorSettings().removeEnumValuePrefix; + } + + @Deprecated + default Set reservedWords() { + return getGeneratorMetadata().getReservedWords(); + } + // 93 - 42 -> 51 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 170f6e8a51a..9c78253a472 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -101,28 +101,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings hideGenerationTimestamp = false; - setReservedWordsLowerCase( - Arrays.asList( - // used as internal variables, can collide with parameter names - "localVarPath", "localVarQueryParams", "localVarCollectionQueryParams", - "localVarHeaderParams", "localVarCookieParams", "localVarFormParams", "localVarPostBody", - "localVarAccepts", "localVarAccept", "localVarContentTypes", - "localVarContentType", "localVarAuthNames", "localReturnType", - "ApiClient", "ApiException", "ApiResponse", "Configuration", "StringUtil", - - // language reserved words - "abstract", "continue", "for", "new", "switch", "assert", - "default", "if", "package", "synchronized", "boolean", "do", "goto", "private", - "this", "break", "double", "implements", "protected", "throw", "byte", "else", - "import", "public", "throws", "case", "enum", "instanceof", "return", "transient", - "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", - "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", - "native", "super", "while", "null", - // additional types - "localdate", "zoneddatetime", "list", "map", "linkedhashset", "void", "string", "uuid", "number", "integer", "toString" - ) - ); - languageSpecificPrimitives = Sets.newHashSet("String", "boolean", "Boolean", @@ -185,7 +163,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings instantiationTypes.put("boolean", "boolean"); instantiationTypes.put("null", "Void (null)"); - embeddedTemplateDir = templateDir = "java"; invokerPackage = "org.openapijsonschematools.client"; artifactId = "openapi-java-client"; modelPackage = "components.schemas"; @@ -332,42 +309,65 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings .stability(Stability.STABLE) .featureSet(featureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", "java", GeneratorType.CLIENT)) - .helpTxt( - String.join("
    ", - "Generates a Java client library", - "", - "Features in this generator:", - "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", - "- Very thorough documentation generated in the style of javadocs", - "- Input types constrained for a Schema in SomeSchema.validate", - " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", - "- Immutable List output classes generated and returned by validate for List<?> input", - "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", - "- Strictly typed list input can be instantiated in client code using generated ListBuilders", - "- Strictly typed map input can be instantiated in client code using generated MapBuilders", - " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", - " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", - "- Run time type checking and validation when", - " - validating schema payloads", - " - instantiating List output class (validation run)", - " - instantiating Map output class (validation run)", - " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", - "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", - "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", - " - ensuring that null pointer exceptions will not happen", - "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", - " - component schema names", - " - schema property names (a fallback setter is written in the MapBuilder)", - "- Generated interfaces are largely consistent with the python code", - "- Openapi spec inline schemas supported at any depth in any location", - "- Format support for: int32, int64, float, double, date, datetime, uuid", - "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", - "- enum types are generated for enums of type string/integer/number/boolean/null", - "- String transmission of numbers supported with type: string, format: number" - ) + .helpMsg(String.join( + "
    ", + "Generates a Java client library", + "", + "Features in this generator:", + "- v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support", + "- Very thorough documentation generated in the style of javadocs", + "- Input types constrained for a Schema in SomeSchema.validate", + " - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data", + "- Immutable List output classes generated and returned by validate for List<?> input", + "- Immutable Map output classes generated and returned by validate for Map<?, ?> input", + "- Strictly typed list input can be instantiated in client code using generated ListBuilders", + "- Strictly typed map input can be instantiated in client code using generated MapBuilders", + " - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").build()`", + " - `new MapBuilder().requiredA(\"a\").requiredB(\"b\").optionalProp(\"c\").additionalProperty(\"someAddProp\", \"d\").build()`", + "- Run time type checking and validation when", + " - validating schema payloads", + " - instantiating List output class (validation run)", + " - instantiating Map output class (validation run)", + " - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class", + "- Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods", + "- The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client", + " - ensuring that null pointer exceptions will not happen", + "- Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in", + " - component schema names", + " - schema property names (a fallback setter is written in the MapBuilder)", + "- Generated interfaces are largely consistent with the python code", + "- Openapi spec inline schemas supported at any depth in any location", + "- Format support for: int32, int64, float, double, date, datetime, uuid", + "- Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string", + "- enum types are generated for enums of type string/integer/number/boolean/null", + "- String transmission of numbers supported with type: string, format: number" + )) + .postGenerationMsg(defaultPostGenerationMsg) + .reservedWords( + getLowerCaseWords( + Arrays.asList( + // used as internal variables, can collide with parameter names + "localVarPath", "localVarQueryParams", "localVarCollectionQueryParams", + "localVarHeaderParams", "localVarCookieParams", "localVarFormParams", "localVarPostBody", + "localVarAccepts", "localVarAccept", "localVarContentTypes", + "localVarContentType", "localVarAuthNames", "localReturnType", + "ApiClient", "ApiException", "ApiResponse", "Configuration", "StringUtil", + + // language reserved words + "abstract", "continue", "for", "new", "switch", "assert", + "default", "if", "package", "synchronized", "boolean", "do", "goto", "private", + "this", "break", "double", "implements", "protected", "throw", "byte", "else", + "import", "public", "throws", "case", "enum", "instanceof", "return", "transient", + "catch", "extends", "int", "short", "try", "char", "final", "interface", "static", + "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", + "native", "super", "while", "null", + // additional types + "localdate", "zoneddatetime", "list", "map", "linkedhashset", "void", "string", "uuid", "number", "integer", "toString" + ) ) - .build(); + ) + .build(); @Override public GeneratorMetadata getGeneratorMetadata() { @@ -1065,7 +1065,7 @@ public Map postProcessSupportingFileData(Map dat @Override public String toApiVarName(String name) { String apiVarName = super.toApiVarName(name); - if (reservedWords.contains(apiVarName)) { + if (generatorMetadata.getReservedWords().contains(apiVarName)) { apiVarName = escapeReservedWord(apiVarName); } return apiVarName; @@ -2206,7 +2206,7 @@ protected EnumInfo getEnumInfo(ArrayList values, Schema schema, Strin LinkedHashMap enumNameToValue = new LinkedHashMap<>(); int truncateIdx = 0; - if (isRemoveEnumValuePrefix()) { + if (generatorSettings.removeEnumValuePrefix) { String commonPrefix = findCommonPrefixOfVars(values); truncateIdx = commonPrefix.length(); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 2a1fe70d4e1..6bc1455032f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -35,7 +35,6 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.features.ComponentsFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.OperationFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SchemaFeature; -import org.openapijsonschematools.codegen.generators.models.CodeGeneratorSettings; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenDiscriminator; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKeyType; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenPatternInfo; @@ -238,27 +237,48 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator .stability(Stability.STABLE) .featureSet(featureSet) .generationMessage(String.format(Locale.ROOT, "OpenAPI JSON Schema Generator: %s (%s)", "python", GeneratorType.CLIENT)) - .helpTxt( - String.join( - "
    ", - "Generates a Python client library", - "", - "Features in this generator:", - "- type hints on endpoints and model creation", - "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", - "- endpoint parameter names use the spec defined keys and cases", - "- inline schemas are supported at any location including composition", - "- multiple content types supported in request body and response bodies", - "- run time type checking + json schema validation", - "- json schema keyword validation may be selectively disabled with SchemaConfiguration", - "- enums of type string/integer/boolean typed using typing.Literal", - "- mypy static type checking run on generated sample", - "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", - "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", - "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", - "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", - "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" + .helpMsg(String.join( + "
    ", + "Generates a Python client library", + "", + "Features in this generator:", + "- type hints on endpoints and model creation", + "- model parameter names use the spec defined keys and cases", + "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", + "- endpoint parameter names use the spec defined keys and cases", + "- inline schemas are supported at any location including composition", + "- multiple content types supported in request body and response bodies", + "- run time type checking + json schema validation", + "- json schema keyword validation may be selectively disabled with SchemaConfiguration", + "- enums of type string/integer/boolean typed using typing.Literal", + "- mypy static type checking run on generated sample", + "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", + "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", + "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", + "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", + "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor" + )) + .postGenerationMsg(defaultPostGenerationMsg) + .reservedWords( + getLowerCaseWords( + Arrays.asList( // from https://docs.python.org/3/reference/lexical_analysis.html#keywords + // local variable name used in API methods (endpoints) + "all_params", "resource_path", "path_params", "query_params", + "header_params", "form_params", "local_var_files", "body_params", "auth_settings", + // @property + "property", "@property", + // python reserved words + "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", + "assert", "else", "if", "pass", "yield", "break", "except", "import", + "print", "class", "exec", "in", "raise", "continue", "finally", "is", + "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", + "False", "async", "await", + // imports, imports_schema_types.handlebars, include these to prevent name collision + "datetime", "decimal", "functools", "io", "re", + "typing", "typing_extensions", "uuid", "immutabledict", "schemas", + // types + "float", "int", "str", "bool", "dict", "immutabledict", "list", "tuple" + ) ) ) .build(); @@ -277,25 +297,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin addSchemaImportsFromV3SpecLocations = true; removeEnumValuePrefix = false; - // from https://docs.python.org/3/reference/lexical_analysis.html#keywords - setReservedWordsLowerCase( - Arrays.asList( - // local variable name used in API methods (endpoints) - "all_params", "resource_path", "path_params", "query_params", - "header_params", "form_params", "local_var_files", "body_params", "auth_settings", - // @property - "property", - // python reserved words - "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", - "assert", "else", "if", "pass", "yield", "break", "except", "import", - "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", - "False", "async", "await", - // imports, imports_schema_types.handlebars, include these to prevent name collision - "datetime", "decimal", "functools", "io", "re", - "typing", "typing_extensions", "uuid", "immutabledict", "schemas" - )); - languageSpecificPrimitives.clear(); languageSpecificPrimitives.add("int"); languageSpecificPrimitives.add("float"); @@ -335,30 +336,11 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin typeMapping.put("URI", "str"); typeMapping.put("null", "none_type"); - String generatorName = "python"; - GeneratorType generatorType = GeneratorType.CLIENT; - modelPackage = "components.schema"; - embeddedTemplateDir = templateDir = "python"; - // default HIDE_GENERATION_TIMESTAMP to true hideGenerationTimestamp = Boolean.TRUE; - // from https://docs.python.org/3/reference/lexical_analysis.html#keywords - setReservedWordsLowerCase( - Arrays.asList( - // @property - "property", - // python reserved words - "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", - "assert", "else", "if", "pass", "yield", "break", "except", "import", - "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", - "False", "async", "await", - // types - "float", "int", "str", "bool", "dict", "immutabledict", "list", "tuple")); - regexModifiers = new HashMap<>(); regexModifiers.put('i', "IGNORECASE"); regexModifiers.put('l', "LOCALE"); @@ -2079,18 +2061,6 @@ public String getOperationIdSnakeCase(String operationId) { return underscore(sanitizeName(operationId)); } - @Override - public void postProcess() { - LOGGER.info("################################################################################"); - LOGGER.info("# Thanks for using OpenAPI JSON Schema Generator. #"); - LOGGER.info("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); - LOGGER.info("# https://github.com/sponsors/spacether #"); - LOGGER.info("# #"); - LOGGER.info("# This generator was written by Justin Black (https://github.com/spacether) #"); - LOGGER.info("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#"); - LOGGER.info("################################################################################"); - } - @Override public String getPascalCase(CodegenKeyType type, String lastJsonPathFragment, String jsonPath) { switch (type) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java index a1e671eebc4..b74352ca021 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatorloader/GeneratorLoader.java @@ -34,11 +34,12 @@ import java.util.Set; public class GeneratorLoader { + private static final Map> generatorNameToGenerator = Map.ofEntries( + new AbstractMap.SimpleEntry<>(JavaClientGenerator.generatorMetadata.getName(), JavaClientGenerator.class), + new AbstractMap.SimpleEntry<>(PythonClientGenerator.generatorMetadata.getName(), PythonClientGenerator.class) + ); + public static Generator getGenerator(String name, GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { - Map> generatorNameToGenerator = Map.ofEntries( - new AbstractMap.SimpleEntry<>(JavaClientGenerator.generatorMetadata.getName(), JavaClientGenerator.class), - new AbstractMap.SimpleEntry<>(PythonClientGenerator.generatorMetadata.getName(), PythonClientGenerator.class) - ); StringBuilder availableConfigs = new StringBuilder(); for (String generatorName : generatorNameToGenerator.keySet()) { availableConfigs.append(generatorName).append("\n"); @@ -88,11 +89,11 @@ public static Generator forName(String name) { } public static List getAll() { - ServiceLoader loader = ServiceLoader.load(Generator.class, Generator.class.getClassLoader()); - List output = new ArrayList(); - for (Generator aLoader : loader) { - output.add(aLoader); + List genrators = new ArrayList(); + for (String generatorName: generatorNameToGenerator.keySet()) { + Generator generator = getGenerator(generatorName, null, null); + genrators.add(generator); } - return output; + return genrators; } } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java index fa5a1e27f5e..e565f1dcfe3 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java @@ -17,7 +17,9 @@ package org.openapijsonschematools.codegen.generators.generatormetadata; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Set; /** * Represents metadata about a generator. @@ -32,7 +34,9 @@ public class GeneratorMetadata { private Map libraryFeatures; private FeatureSet featureSet; private String generationMessage; - private String helpTxt; + private String helpMsg; + private List postGenerationMsg; + private Set reservedWords; private GeneratorMetadata(Builder builder) { if (builder != null) { @@ -44,7 +48,9 @@ private GeneratorMetadata(Builder builder) { generationMessage = builder.generationMessage; libraryFeatures = builder.libraryFeatures; featureSet = builder.featureSet; - helpTxt = builder.helpTxt; + helpMsg = builder.helpMsg; + postGenerationMsg = builder.postGenerationMsg; + reservedWords = builder.reservedWords; } } @@ -68,7 +74,9 @@ public static Builder newBuilder(GeneratorMetadata copy) { builder.generationMessage = copy.getGenerationMessage(); builder.libraryFeatures = copy.getLibraryFeatures(); builder.featureSet = copy.getFeatureSet(); - builder.helpTxt = copy.getHelpTxt(); + builder.helpMsg = copy.getHelpMsg(); + builder.postGenerationMsg = copy.getPostGenerationMsg(); + builder.reservedWords = copy.getReservedWords(); } return builder; } @@ -117,7 +125,11 @@ public Map getLibraryFeatures() { return libraryFeatures; } - public String getHelpTxt() { return helpTxt; } + public String getHelpMsg() { return helpMsg; } + + public List getPostGenerationMsg() { return postGenerationMsg; } + + public Set getReservedWords() { return reservedWords; } /** * {@code GeneratorMetadata} builder static inner class. @@ -131,7 +143,9 @@ public static final class Builder { private String generationMessage; private FeatureSet featureSet = FeatureSet.UNSPECIFIED; private Map libraryFeatures = new HashMap<>(); - private String helpTxt; + private String helpMsg; + private List postGenerationMsg; + private Set reservedWords; private Builder() { } @@ -204,8 +218,18 @@ public Builder generationMessage(String generationMessage) { return this; } - public Builder helpTxt(String helpTxt) { - this.helpTxt = helpTxt; + public Builder helpMsg(String helpMsg) { + this.helpMsg = helpMsg; + return this; + } + + public Builder postGenerationMsg(List postGenerationMsg) { + this.postGenerationMsg = postGenerationMsg; + return this; + } + + public Builder reservedWords(Set reservedWords) { + this.reservedWords = reservedWords; return this; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index d9c1ebb452c..5ca4aa1a4a0 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -20,6 +20,7 @@ public class CodeGeneratorSettings { public final boolean enablePostProcessFile; // boolean value indicating the state of the option for post-processing file using environment variables. public final String templateEngineName; public final String inputSpecLocation; // input spec's location, as URL or file + public final boolean removeEnumValuePrefix; public CodeGeneratorSettings( String apiPackage, String outputFolder, @@ -34,7 +35,8 @@ public CodeGeneratorSettings( boolean skipOperationExample, boolean enablePostProcessFile, String templateEngineName, - String inputSpecLocation + String inputSpecLocation, + boolean removeEnumValuePrefix ) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; @@ -50,6 +52,7 @@ public CodeGeneratorSettings( this.enablePostProcessFile = enablePostProcessFile; this.templateEngineName = templateEngineName; this.inputSpecLocation = inputSpecLocation; + this.removeEnumValuePrefix = removeEnumValuePrefix; } public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { @@ -67,6 +70,7 @@ public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, Work boolean enablePostProcessingFile = workflowSettings != null ? workflowSettings.isSkipOperationExample() : WorkflowSettings.DEFAULT_ENABLE_POST_PROCESS_FILE; String templateEnginName = workflowSettings != null ? workflowSettings.getTemplatingEngineName() : WorkflowSettings.DEFAULT_TEMPLATING_ENGINE_NAME; String inputSpecLocation = workflowSettings != null ? workflowSettings.getInputSpec() : null; + boolean removeEnumValuePrefix = workflowSettings != null ? workflowSettings.isRemoveEnumValuePrefix() : WorkflowSettings.DEFAULT_REMOVE_ENUM_VALUE_PREFIX; return new CodeGeneratorSettings( apiPackage, outputDir, @@ -81,7 +85,8 @@ public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, Work skipOperationExample, enablePostProcessingFile, templateEnginName, - inputSpecLocation + inputSpecLocation, + removeEnumValuePrefix ); } } diff --git a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CaseFormatLambda.java b/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CaseFormatLambda.java index c3c49b3faf2..b919e6ea876 100644 --- a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CaseFormatLambda.java +++ b/src/main/java/org/openapijsonschematools/codegen/templating/mustache/CaseFormatLambda.java @@ -40,7 +40,7 @@ public CaseFormatLambda generator(final Generator generator) { @Override public void execute(Template.Fragment fragment, Writer writer) throws IOException { String text = initialFormat.converterTo(targetFormat).convert(fragment.execute()); - if (generator != null && generator.reservedWords().contains(text)) { + if (generator != null && generator.getGeneratorMetadata().getReservedWords().contains(text)) { text = generator.escapeReservedWord(text); } writer.write(text); diff --git a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambda.java b/src/main/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambda.java index ace03adc329..012629f6639 100644 --- a/src/main/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambda.java +++ b/src/main/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambda.java @@ -53,7 +53,7 @@ public LowercaseLambda generator(final Generator generator) { @Override public void execute(Template.Fragment fragment, Writer writer) throws IOException { String text = fragment.execute().toLowerCase(Locale.ROOT); - if (generator != null && generator.reservedWords().contains(text)) { + if (generator != null && generator.getGeneratorMetadata().getReservedWords().contains(text)) { text = generator.escapeReservedWord(text); } writer.write(text); diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java index 7674b578827..b44b72f26e7 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java @@ -462,21 +462,6 @@ public void testEscapeText() { Assert.assertEquals(codegen.escapeText("\\/"), "/"); } - @Test - public void testEscapeTextWhileAllowingNewLines() { - final DefaultGenerator codegen = new ThisDefaultGenerator(); - - // allow new lines - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\n"), "\n"); - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\r"), "\r"); - - // escape other special characters - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\t"), " "); - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\\"), "\\\\"); - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\""), "\\\""); - Assert.assertEquals(codegen.escapeTextWhileAllowingNewLines("\\/"), "/"); - } - @Test public void updateCodegenPropertyEnum() { CodegenSchema array = codegenPropertyWithArrayOfIntegerValues(); @@ -523,7 +508,8 @@ public void updateCodegenPropertyEnumWithExtension() { @Test public void updateCodegenPropertyEnumWithPrefixRemoved() { - DefaultGenerator codegen = new ThisDefaultGenerator(); + WorkflowSettings ws = WorkflowSettings.newBuilder().withRemoveEnumValuePrefix(true).build(); + DefaultGenerator codegen = new ThisDefaultGenerator(ws); CodegenSchema enumProperty = codegenProperty(codegen, Arrays.asList("animal_dog", "animal_cat"), "updateCodegenPropertyEnumWithPrefixRemoved", null); Map enumVars = enumProperty.items.enumInfo.valueToName; @@ -534,8 +520,8 @@ public void updateCodegenPropertyEnumWithPrefixRemoved() { @Test public void updateCodegenPropertyEnumWithoutPrefixRemoved() { - final DefaultGenerator codegen = new ThisDefaultGenerator(); - codegen.setRemoveEnumValuePrefix(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withRemoveEnumValuePrefix(false).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); CodegenSchema enumProperty = codegenProperty(codegen, Arrays.asList("animal_dog", "animal_cat"), "updateCodegenPropertyEnumWithoutPrefixRemoved", null); @@ -547,7 +533,8 @@ public void updateCodegenPropertyEnumWithoutPrefixRemoved() { @Test public void postProcessModelsEnumWithPrefixRemoved() { - final DefaultGenerator codegen = new ThisDefaultGenerator(); + WorkflowSettings ws = WorkflowSettings.newBuilder().withRemoveEnumValuePrefix(true).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); TreeMap schemas = codegenModel(codegen, Arrays.asList("animal_dog", "animal_cat"), "postProcessModelsEnumWithPrefixRemoved", null, null); CodegenSchema cm = schemas.get("model"); @@ -559,8 +546,8 @@ public void postProcessModelsEnumWithPrefixRemoved() { @Test public void postProcessModelsEnumWithoutPrefixRemoved() { - final DefaultGenerator codegen = new ThisDefaultGenerator(); - codegen.setRemoveEnumValuePrefix(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withRemoveEnumValuePrefix(false).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); TreeMap objs = codegenModel(codegen, Arrays.asList("animal_dog", "animal_cat"), "postProcessModelsEnumWithoutPrefixRemoved", null, null); CodegenSchema cm = objs.get("model"); diff --git a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambdaTest.java b/src/test/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambdaTest.java index 0e1940aac34..919d0838cf8 100644 --- a/src/test/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambdaTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/templating/mustache/LowercaseLambdaTest.java @@ -11,6 +11,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openapijsonschematools.codegen.generators.Generator; +import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -19,6 +20,9 @@ public class LowercaseLambdaTest extends LambdaTest { @Mock Generator generator; + @Mock + GeneratorMetadata metadata; + @BeforeMethod public void setup() { MockitoAnnotations.initMocks(this); @@ -39,7 +43,8 @@ public void lowercaseReservedWordTest() { Map ctx = context("lowercase", new LowercaseLambda().generator(generator)); when(generator.sanitizeName(anyString())).then(returnsFirstArg()); - when(generator.reservedWords()).thenReturn(new HashSet(Arrays.asList("reserved"))); + when(metadata.getReservedWords()).thenReturn(new HashSet(Arrays.asList("reserved"))); + when(generator.getGeneratorMetadata()).thenReturn(metadata); when(generator.escapeReservedWord("reserved")).thenReturn("escaped-reserved"); // When & Then From f7b06ddfabcb86459b234d775879b257f9a1fc35 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 14:13:32 -0700 Subject: [PATCH 24/44] Moves instantiationTypes into metadata --- .../codegen/clicommands/ConfigHelp.java | 4 ++-- .../codegen/generators/DefaultGenerator.java | 10 +--------- .../codegen/generators/Generator.java | 8 +++++--- .../generators/JavaClientGenerator.java | 20 ++++++++++--------- .../generators/PythonClientGenerator.java | 19 ++++++++++-------- .../generatormetadata/GeneratorMetadata.java | 11 ++++++++++ 6 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 4cd80906916..95c196dd593 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -220,7 +220,7 @@ private void generateMdInstantiationTypes(StringBuilder sb, Generator config) { sb.append("| Type/Alias | Instantiated By |").append(newline); sb.append("| ---------- | --------------- |").append(newline); - config.instantiationTypes() + config.getGeneratorMetadata().getInstantiationTypes() .entrySet() .stream() .sorted(Map.Entry.comparingByKey()) @@ -401,7 +401,7 @@ private void generatePlainTextHelp(StringBuilder sb, Generator config) { sb.append(newline).append(newline); }); - Map instantiationTypes = config.instantiationTypes(); + Map instantiationTypes = config.getGeneratorMetadata().getInstantiationTypes(); if (instantiationTypes != null) { sb.append(newline).append("INSTANTIATION TYPES").append(newline).append(newline); Map map = instantiationTypes diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index bcdc8a82f99..fd6cfc7d677 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -188,8 +188,6 @@ protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings typeMapping.put("URI", "URI"); typeMapping.put("AnyType", "oas_any_type_not_mapped"); - instantiationTypes = new HashMap<>(); - // name formatting options cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants .ALLOW_UNICODE_IDENTIFIERS_DESC).defaultValue(Boolean.FALSE.toString())); @@ -285,12 +283,11 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo .helpMsg("todo replace help text") .postGenerationMsg(defaultPostGenerationMsg) .reservedWords(Set.of()) + .instantiationTypes(Map.of()) .build(); protected String inputSpec; protected Set defaultIncludes; protected Map typeMapping; - // instantiationTypes map from container types only: set, map, and array to the in language-type - protected Map instantiationTypes; protected Set languageSpecificPrimitives = new HashSet<>(); // a map to store the mapping between a schema and the new one // a map to store the mapping between inline schema and the name provided by the user @@ -662,11 +659,6 @@ public String escapeQuotationMark(String input) { return input.replace("\"", "\\\""); } - @Override - public Map instantiationTypes() { - return instantiationTypes; - } - @Override public HashMap> getJsonPathTemplateFiles(GeneratedFileType type) { switch (type) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 303b624b51a..76e3084af37 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -79,9 +79,6 @@ public interface Generator extends OpenApiProcessor, Comparable { CodegenKey getKey(String key, String keyType); - // todo move into metadata - Map instantiationTypes(); - HashMap> getJsonPathTemplateFiles(GeneratedFileType type); // todo move into metadata @@ -358,5 +355,10 @@ default boolean isRemoveEnumValuePrefix() { default Set reservedWords() { return getGeneratorMetadata().getReservedWords(); } + + @Deprecated + default Map instantiationTypes() { + return getGeneratorMetadata().getInstantiationTypes(); + } // 93 - 42 -> 51 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 9c78253a472..def8e63c35d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -154,15 +154,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings arrayIOClassNamePiece = "List"; arrayObjectInputClassNameSuffix = "Builder"; - // this tells users what openapi types turn in to - instantiationTypes.put("object", "FrozenMap"); - instantiationTypes.put("array", "FrozenList"); - instantiationTypes.put("string", "String"); - instantiationTypes.put("number", "Number (int, long, float, double)"); - instantiationTypes.put("integer", "Number (int, long, float with integer values, double with integer values)"); - instantiationTypes.put("boolean", "boolean"); - instantiationTypes.put("null", "Void (null)"); - invokerPackage = "org.openapijsonschematools.client"; artifactId = "openapi-java-client"; modelPackage = "components.schemas"; @@ -367,6 +358,17 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings ) ) ) + .instantiationTypes( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("object", "FrozenMap"), + new AbstractMap.SimpleEntry<>("array", "FrozenList"), + new AbstractMap.SimpleEntry<>("string", "String"), + new AbstractMap.SimpleEntry<>("number", "Number (int, long, float, double)"), + new AbstractMap.SimpleEntry<>("integer", "Number (int, long, float with integer values, double with integer values)"), + new AbstractMap.SimpleEntry<>("boolean", "boolean"), + new AbstractMap.SimpleEntry<>("null", "Void (null)") + ) + ) .build(); @Override diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 6bc1455032f..1ee6b655fa6 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -281,6 +281,17 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator ) ) ) + .instantiationTypes( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("object", "immutabledict.immutabledict"), + new AbstractMap.SimpleEntry<>("array", "tuple"), + new AbstractMap.SimpleEntry<>("string", "str"), + new AbstractMap.SimpleEntry<>("number", "typing.Union[float, int]"), + new AbstractMap.SimpleEntry<>("integer", "int"), + new AbstractMap.SimpleEntry<>("boolean", "bool"), + new AbstractMap.SimpleEntry<>("null", "None") + ) + ) .build(); public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { @@ -380,14 +391,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin supportsAdditionalPropertiesWithComposedSchema = true; // this tells users what openapi types turn in to - instantiationTypes.put("object", "immutabledict.immutabledict"); - instantiationTypes.put("array", "tuple"); - instantiationTypes.put("string", "str"); - instantiationTypes.put("number", "typing.Union[float, int]"); - instantiationTypes.put("integer", "int"); - instantiationTypes.put("boolean", "bool"); - instantiationTypes.put("null", "None"); - languageSpecificPrimitives.add("file_type"); languageSpecificPrimitives.add("none_type"); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java index e565f1dcfe3..57f9c835cfc 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java @@ -37,6 +37,7 @@ public class GeneratorMetadata { private String helpMsg; private List postGenerationMsg; private Set reservedWords; + private Map instantiationTypes; private GeneratorMetadata(Builder builder) { if (builder != null) { @@ -51,6 +52,7 @@ private GeneratorMetadata(Builder builder) { helpMsg = builder.helpMsg; postGenerationMsg = builder.postGenerationMsg; reservedWords = builder.reservedWords; + instantiationTypes = builder.instantiationTypes; } } @@ -77,6 +79,7 @@ public static Builder newBuilder(GeneratorMetadata copy) { builder.helpMsg = copy.getHelpMsg(); builder.postGenerationMsg = copy.getPostGenerationMsg(); builder.reservedWords = copy.getReservedWords(); + builder.instantiationTypes = copy.getInstantiationTypes(); } return builder; } @@ -131,6 +134,8 @@ public Map getLibraryFeatures() { public Set getReservedWords() { return reservedWords; } + public Map getInstantiationTypes() { return instantiationTypes; } + /** * {@code GeneratorMetadata} builder static inner class. */ @@ -146,6 +151,7 @@ public static final class Builder { private String helpMsg; private List postGenerationMsg; private Set reservedWords; + private Map instantiationTypes; private Builder() { } @@ -233,6 +239,11 @@ public Builder reservedWords(Set reservedWords) { return this; } + public Builder instantiationTypes(Map instantiationTypes) { + this.instantiationTypes = instantiationTypes; + return this; + } + /** * Returns a {@code GeneratorMetadata} built from the parameters previously set. * From 914c25779da941ecfa8973122e631e2a2e66003f Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 14:30:13 -0700 Subject: [PATCH 25/44] Reprecates languageSpecificPrimitives --- .../codegen/clicommands/ConfigHelp.java | 4 +- .../codegen/generators/DefaultGenerator.java | 36 +---------- .../codegen/generators/Generator.java | 8 ++- .../generators/JavaClientGenerator.java | 28 ++++----- .../generators/PythonClientGenerator.java | 59 +++++-------------- .../generatormetadata/GeneratorMetadata.java | 11 ++++ 6 files changed, 49 insertions(+), 97 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java index 95c196dd593..eb4711909b7 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/ConfigHelp.java @@ -236,7 +236,7 @@ private void generateMdLanguageSpecificPrimitives(StringBuilder sb, Generator co sb.append(newline).append("## LANGUAGE PRIMITIVES").append(newline).append(newline); sb.append("
      ").append(newline); - config.languageSpecificPrimitives() + config.getGeneratorMetadata().getLanguageSpecificPrimitives() .stream() .sorted(String::compareTo) .forEach(s -> sb.append("
    • ").append(escapeHtml4(s)).append("
    • ").append(newline)); @@ -416,7 +416,7 @@ private void generatePlainTextHelp(StringBuilder sb, Generator config) { { sb.append(newline).append("LANGUAGE PRIMITIVES").append(newline).append(newline); - String[] arr = config.languageSpecificPrimitives().stream().sorted().toArray(String[]::new); + String[] arr = config.getGeneratorMetadata().getLanguageSpecificPrimitives().stream().sorted().toArray(String[]::new); writePlainTextFromArray(sb, arr, optIndent); sb.append(newline); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index fd6cfc7d677..32e2519b606 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -163,31 +163,6 @@ protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings "Float") ); - typeMapping = new HashMap<>(); - typeMapping.put("array", "List"); - typeMapping.put("set", "Set"); - typeMapping.put("map", "Map"); - typeMapping.put("boolean", "Boolean"); - typeMapping.put("string", "String"); - typeMapping.put("int", "Integer"); - typeMapping.put("float", "Float"); - typeMapping.put("double", "Double"); - typeMapping.put("number", "BigDecimal"); - typeMapping.put("decimal", "BigDecimal"); - typeMapping.put("DateTime", "Date"); - typeMapping.put("long", "Long"); - typeMapping.put("short", "Short"); - typeMapping.put("char", "String"); - typeMapping.put("object", "Object"); - typeMapping.put("integer", "Integer"); - // FIXME: java specific type should be in Java Based Abstract Implementations - typeMapping.put("ByteArray", "byte[]"); - typeMapping.put("binary", "File"); - typeMapping.put("file", "File"); - typeMapping.put("UUID", "UUID"); - typeMapping.put("URI", "URI"); - typeMapping.put("AnyType", "oas_any_type_not_mapped"); - // name formatting options cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants .ALLOW_UNICODE_IDENTIFIERS_DESC).defaultValue(Boolean.FALSE.toString())); @@ -284,13 +259,11 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo .postGenerationMsg(defaultPostGenerationMsg) .reservedWords(Set.of()) .instantiationTypes(Map.of()) + .languageSpecificPrimitives(Set.of()) .build(); protected String inputSpec; protected Set defaultIncludes; protected Map typeMapping; - protected Set languageSpecificPrimitives = new HashSet<>(); - // a map to store the mapping between a schema and the new one - // a map to store the mapping between inline schema and the name provided by the user protected String modelPackage = "components.schema"; protected String modelNamePrefix = "", modelNameSuffix = ""; protected String apiNamePrefix = "", apiNameSuffix = "Api"; @@ -673,11 +646,6 @@ public HashMap } } - @Override - public Set languageSpecificPrimitives() { - return languageSpecificPrimitives; - } - @Deprecated public String modelPackage() { return modelPackage; @@ -3476,7 +3444,7 @@ protected String getOrGenerateOperationId(Operation operation, String path, Stri */ protected boolean needToImport(String type) { return StringUtils.isNotBlank(type) && !defaultIncludes.contains(type) - && !languageSpecificPrimitives.contains(type); + && !generatorMetadata.getLanguageSpecificPrimitives().contains(type); } protected void addImports(Set importsToBeAddedTo, Set importsToAdd) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 76e3084af37..8a03ab06613 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -81,9 +81,6 @@ public interface Generator extends OpenApiProcessor, Comparable { HashMap> getJsonPathTemplateFiles(GeneratedFileType type); - // todo move into metadata - Set languageSpecificPrimitives(); - // todo remove + move this into the new constructor void preprocessOpenAPI(OpenAPI openAPI); @@ -360,5 +357,10 @@ default Set reservedWords() { default Map instantiationTypes() { return getGeneratorMetadata().getInstantiationTypes(); } + + @Deprecated + default Set languageSpecificPrimitives() { + return getGeneratorMetadata().getLanguageSpecificPrimitives(); + } // 93 - 42 -> 51 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index def8e63c35d..a9c8f77dc6f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -96,24 +96,9 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings setOutputTestFolder(this.generatorSettings.outputFolder); } headersSchemaFragment = "HeadersSchema"; - supportsInheritance = true; - hideGenerationTimestamp = false; - languageSpecificPrimitives = Sets.newHashSet("String", - "boolean", - "Boolean", - "Double", - "Integer", - "Long", - "Float", - "Object", - "byte[]" - ); - typeMapping.put("date", "Date"); - typeMapping.put("file", "File"); - typeMapping.put("AnyType", "Object"); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage())); @@ -369,6 +354,19 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings new AbstractMap.SimpleEntry<>("null", "Void (null)") ) ) + .languageSpecificPrimitives( + Sets.newHashSet( + "String", + "boolean", + "Boolean", + "Double", + "Integer", + "Long", + "Float", + "Object", + "byte[]" + ) + ) .build(); @Override diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 1ee6b655fa6..40da9a39857 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -292,6 +292,22 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator new AbstractMap.SimpleEntry<>("null", "None") ) ) + .languageSpecificPrimitives( + Set.of( + "int", + "float", + "list", + "dict", + "bool", + "str", + "datetime", + "date", + "object", + "file", + "bytes", + "None" + ) + ) .build(); public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) { @@ -308,45 +324,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin addSchemaImportsFromV3SpecLocations = true; removeEnumValuePrefix = false; - languageSpecificPrimitives.clear(); - languageSpecificPrimitives.add("int"); - languageSpecificPrimitives.add("float"); - languageSpecificPrimitives.add("list"); - languageSpecificPrimitives.add("dict"); - languageSpecificPrimitives.add("bool"); - languageSpecificPrimitives.add("str"); - languageSpecificPrimitives.add("datetime"); - languageSpecificPrimitives.add("date"); - languageSpecificPrimitives.add("object"); - // TODO file and binary is mapped as `file` - languageSpecificPrimitives.add("file"); - languageSpecificPrimitives.add("bytes"); - - typeMapping.clear(); - typeMapping.put("integer", "int"); - typeMapping.put("float", "float"); - typeMapping.put("number", "float"); - typeMapping.put("long", "int"); - typeMapping.put("double", "float"); - typeMapping.put("array", "list"); - typeMapping.put("set", "list"); - typeMapping.put("map", "dict"); - typeMapping.put("boolean", "bool"); - typeMapping.put("string", "str"); - typeMapping.put("date", "date"); - typeMapping.put("DateTime", "datetime"); - typeMapping.put("object", "object"); - typeMapping.put("AnyType", "object"); - typeMapping.put("file", "file"); - // TODO binary should be mapped to byte array - // mapped to String as a workaround - typeMapping.put("binary", "str"); - typeMapping.put("ByteArray", "str"); - // map uuid to string for the time being - typeMapping.put("UUID", "str"); - typeMapping.put("URI", "str"); - typeMapping.put("null", "none_type"); - modelPackage = "components.schema"; // default HIDE_GENERATION_TIMESTAMP to true @@ -389,10 +366,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin // In principle, this should be enabled by default for all code generators. However, due to limitations // in other code generators, support needs to be enabled on a case-by-case basis. supportsAdditionalPropertiesWithComposedSchema = true; - - // this tells users what openapi types turn in to - languageSpecificPrimitives.add("file_type"); - languageSpecificPrimitives.add("none_type"); } @Override diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java index 57f9c835cfc..d25852be1f1 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/generatormetadata/GeneratorMetadata.java @@ -38,6 +38,7 @@ public class GeneratorMetadata { private List postGenerationMsg; private Set reservedWords; private Map instantiationTypes; + private Set languageSpecificPrimitives; private GeneratorMetadata(Builder builder) { if (builder != null) { @@ -53,6 +54,7 @@ private GeneratorMetadata(Builder builder) { postGenerationMsg = builder.postGenerationMsg; reservedWords = builder.reservedWords; instantiationTypes = builder.instantiationTypes; + languageSpecificPrimitives = builder.languageSpecificPrimitives; } } @@ -80,6 +82,7 @@ public static Builder newBuilder(GeneratorMetadata copy) { builder.postGenerationMsg = copy.getPostGenerationMsg(); builder.reservedWords = copy.getReservedWords(); builder.instantiationTypes = copy.getInstantiationTypes(); + builder.languageSpecificPrimitives = copy.getLanguageSpecificPrimitives(); } return builder; } @@ -136,6 +139,8 @@ public Map getLibraryFeatures() { public Map getInstantiationTypes() { return instantiationTypes; } + public Set getLanguageSpecificPrimitives() { return languageSpecificPrimitives; } + /** * {@code GeneratorMetadata} builder static inner class. */ @@ -152,6 +157,7 @@ public static final class Builder { private List postGenerationMsg; private Set reservedWords; private Map instantiationTypes; + private Set languageSpecificPrimitives; private Builder() { } @@ -244,6 +250,11 @@ public Builder instantiationTypes(Map instantiationTypes) { return this; } + public Builder languageSpecificPrimitives(Set languageSpecificPrimitives) { + this.languageSpecificPrimitives = languageSpecificPrimitives; + return this; + } + /** * Returns a {@code GeneratorMetadata} built from the parameters previously set. * From 7dea688b95e5ceae2fad39a24273378c89820ad8 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 15:07:32 -0700 Subject: [PATCH 26/44] Adds hide genration timestamp option --- .../codegen/clicommands/Generate.java | 10 +++++++++- .../codegen/config/CodegenConfigurator.java | 5 +++++ .../codegen/config/WorkflowSettings.java | 14 ++++++++++++++ .../codegen/generators/DefaultGenerator.java | 18 +----------------- .../codegen/generators/Generator.java | 11 ++++++----- .../generators/JavaClientGenerator.java | 2 -- .../generators/PythonClientGenerator.java | 3 --- .../models/CodeGeneratorSettings.java | 9 +++++++-- .../generators/DefaultGeneratorTest.java | 16 ++++++++-------- 9 files changed, 50 insertions(+), 38 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index b5242ba7b86..e8a70f4e9b9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -192,6 +192,10 @@ public class Generate extends AbstractCommand { description = "Only write output files that have changed.") private Boolean minimalUpdate; + @Option(name = {"--hide-generation-timestamp"}, title = "hides the generation timestamp in the generated files", + description = CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) + private Boolean hideGenerationTimestamp; + @Override public void execute() { // this initial check allows for field-level package private injection (for unit testing) @@ -320,7 +324,11 @@ public void execute() { } if (removeEnumValuePrefix != null) { - configurator.setRemoveOperationIdPrefix(removeOperationIdPrefix); + configurator.setRemoveEnumValuePrefix(removeEnumValuePrefix); + } + + if (hideGenerationTimestamp != null) { + configurator.setHideGenerationTimestamp(hideGenerationTimestamp); } if (skipOperationExample != null) { diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index c9659edc14f..616606428bf 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -324,6 +324,11 @@ public CodegenConfigurator setRemoveEnumValuePrefix(boolean removeEnumValuePrefi return this; } + public CodegenConfigurator setHideGenerationTimestamp(boolean hideGenerationTimestamp) { + workflowSettingsBuilder.withHideGenerationTimestamp(hideGenerationTimestamp); + return this; + } + public CodegenConfigurator setSkipOperationExample(boolean skipOperationExample) { workflowSettingsBuilder.withSkipOperationExample(skipOperationExample); return this; diff --git a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java index 3698bc0da10..70bacc92453 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java @@ -47,6 +47,8 @@ public class WorkflowSettings { public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "handlebars"; + + public static final boolean DEFAULT_HIDE_GENERATION_TIMESTAMP = true; public static final Map DEFAULT_GLOBAL_PROPERTIES = Collections.unmodifiableMap(new HashMap<>()); private String inputSpec; @@ -65,6 +67,7 @@ public class WorkflowSettings { private String ignoreFileOverride; private Map globalProperties = DEFAULT_GLOBAL_PROPERTIES; private boolean removeEnumValuePrefix = DEFAULT_REMOVE_ENUM_VALUE_PREFIX; + private boolean hideGenerationTimestamp = DEFAULT_HIDE_GENERATION_TIMESTAMP; private WorkflowSettings(Builder builder) { this.inputSpec = builder.inputSpec; @@ -83,6 +86,7 @@ private WorkflowSettings(Builder builder) { this.ignoreFileOverride = builder.ignoreFileOverride; this.globalProperties = Collections.unmodifiableMap(builder.globalProperties); this.removeEnumValuePrefix = builder.removeEnumValuePrefix; + this.hideGenerationTimestamp = builder.hideGenerationTimestamp; } /** @@ -116,6 +120,7 @@ public static Builder newBuilder(WorkflowSettings copy) { // this, and any other collections, must be mutable in the builder. builder.globalProperties = new HashMap<>(copy.getGlobalProperties()); builder.removeEnumValuePrefix = copy.isRemoveEnumValuePrefix(); + builder.hideGenerationTimestamp = copy.isHideGenerationTimestamp(); // force builder "with" methods to invoke side effects builder.withTemplateDir(copy.getTemplateDir()); @@ -173,6 +178,8 @@ public boolean isRemoveOperationIdPrefix() { public boolean isRemoveEnumValuePrefix() { return removeEnumValuePrefix; } + + public boolean isHideGenerationTimestamp() { return hideGenerationTimestamp; } /** * Indicates whether or not to skip examples defined in the operation. * @@ -307,6 +314,7 @@ public static final class Builder { private String templateDir; private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME; private String ignoreFileOverride; + private boolean hideGenerationTimestamp = DEFAULT_HIDE_GENERATION_TIMESTAMP; // NOTE: All collections must be mutable in the builder, and copied to a new immutable collection in .build() private Map globalProperties = new HashMap<>(); @@ -380,6 +388,7 @@ public Builder withRemoveEnumValuePrefix(Boolean removeEnumValuePrefix) { this.removeEnumValuePrefix = removeEnumValuePrefix != null ? removeEnumValuePrefix : Boolean.valueOf(DEFAULT_REMOVE_ENUM_VALUE_PREFIX); return this; } + /** * Sets the {@code skipOperationExample} and returns a reference to this Builder so that the methods can be chained together. * @@ -514,6 +523,11 @@ public Builder withIgnoreFileOverride(String ignoreFileOverride) { return this; } + public Builder withHideGenerationTimestamp(boolean hideGenerationTimestamp) { + this.hideGenerationTimestamp = hideGenerationTimestamp; + return this; + } + /** * Sets the {@code globalProperties} and returns a reference to this Builder so that the methods can be chained together. * diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 32e2519b606..6b37ac19c06 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -182,6 +182,7 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo "openapiclient", "generated-code" + File.separator + "java" ); + additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, this.generatorSettings.hideGenerationTimestamp); } private final Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class); @@ -312,7 +313,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo */ protected boolean supportsAdditionalPropertiesWithComposedSchema = true; protected Boolean allowUnicodeIdentifiers = false; - protected Boolean hideGenerationTimestamp = true; // How to encode special characters like $ // They are translated to words like "Dollar" and prefixed with ' // Then translated back during JSON encoding and decoding @@ -355,12 +355,6 @@ public List cliOptions() { @Override public void processOpts() { - if (additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) { - setHideGenerationTimestamp(convertPropertyToBooleanAndWriteBack(CodegenConstants.HIDE_GENERATION_TIMESTAMP)); - } else { - additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, hideGenerationTimestamp); - } - if (additionalProperties.containsKey(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS)) { this.setAllowUnicodeIdentifiers(Boolean.valueOf(additionalProperties .get(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS).toString())); @@ -4013,16 +4007,6 @@ public void setRemoveOperationIdPrefixCount(int removeOperationIdPrefixCount) { this.removeOperationIdPrefixCount = removeOperationIdPrefixCount; } - @Override - public boolean isHideGenerationTimestamp() { - return hideGenerationTimestamp; - } - - @Override - public void setHideGenerationTimestamp(boolean hideGenerationTimestamp) { - this.hideGenerationTimestamp = hideGenerationTimestamp; - } - /** * Set Documentation files extension * diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 8a03ab06613..26f3bf52bc9 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -107,10 +107,6 @@ public interface Generator extends OpenApiProcessor, Comparable { String getFilePath(GeneratedFileType type, String jsonPath); - boolean isHideGenerationTimestamp(); - - void setHideGenerationTimestamp(boolean hideGenerationTimestamp); - void setDocExtension(String docExtension); String sanitizeName(String name); @@ -362,5 +358,10 @@ default Map instantiationTypes() { default Set languageSpecificPrimitives() { return getGeneratorMetadata().getLanguageSpecificPrimitives(); } - // 93 - 42 -> 51 + + @Deprecated + default boolean isHideGenerationTimestamp() { + return generatorSettings().hideGenerationTimestamp; + } + // 93 - 45 -> 48 } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index a9c8f77dc6f..7a61b569835 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -97,7 +97,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings } headersSchemaFragment = "HeadersSchema"; supportsInheritance = true; - hideGenerationTimestamp = false; cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); @@ -117,7 +116,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC).defaultValue(this.getLicenseName())); cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC).defaultValue(this.getLicenseUrl())); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC).defaultValue(this.getSourceFolder())); - cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp())); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC)); cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC)); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 40da9a39857..2bdbe1af6b5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -326,9 +326,6 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin modelPackage = "components.schema"; - // default HIDE_GENERATION_TIMESTAMP to true - hideGenerationTimestamp = Boolean.TRUE; - regexModifiers = new HashMap<>(); regexModifiers.put('i', "IGNORECASE"); regexModifiers.put('l', "LOCALE"); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index 5ca4aa1a4a0..b4fd1e0e865 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -21,6 +21,7 @@ public class CodeGeneratorSettings { public final String templateEngineName; public final String inputSpecLocation; // input spec's location, as URL or file public final boolean removeEnumValuePrefix; + public final boolean hideGenerationTimestamp; public CodeGeneratorSettings( String apiPackage, String outputFolder, @@ -36,7 +37,8 @@ public CodeGeneratorSettings( boolean enablePostProcessFile, String templateEngineName, String inputSpecLocation, - boolean removeEnumValuePrefix + boolean removeEnumValuePrefix, + boolean hideGenerationTimestamp ) { this.apiPackage = apiPackage; this.outputFolder = outputFolder; @@ -53,6 +55,7 @@ public CodeGeneratorSettings( this.templateEngineName = templateEngineName; this.inputSpecLocation = inputSpecLocation; this.removeEnumValuePrefix = removeEnumValuePrefix; + this.hideGenerationTimestamp = hideGenerationTimestamp; } public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { @@ -71,6 +74,7 @@ public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, Work String templateEnginName = workflowSettings != null ? workflowSettings.getTemplatingEngineName() : WorkflowSettings.DEFAULT_TEMPLATING_ENGINE_NAME; String inputSpecLocation = workflowSettings != null ? workflowSettings.getInputSpec() : null; boolean removeEnumValuePrefix = workflowSettings != null ? workflowSettings.isRemoveEnumValuePrefix() : WorkflowSettings.DEFAULT_REMOVE_ENUM_VALUE_PREFIX; + boolean hideGenerationTimestamp = workflowSettings != null ? workflowSettings.isHideGenerationTimestamp() : WorkflowSettings.DEFAULT_HIDE_GENERATION_TIMESTAMP; return new CodeGeneratorSettings( apiPackage, outputDir, @@ -86,7 +90,8 @@ public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, Work enablePostProcessingFile, templateEnginName, inputSpecLocation, - removeEnumValuePrefix + removeEnumValuePrefix, + hideGenerationTimestamp ); } } diff --git a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java index b44b72f26e7..3c31ce14cd7 100644 --- a/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java +++ b/src/test/java/org/openapijsonschematools/codegen/generators/DefaultGeneratorTest.java @@ -250,27 +250,27 @@ public void testInitialConfigValues() throws Exception { codegen.processOpts(); Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE); - Assert.assertTrue(codegen.isHideGenerationTimestamp()); + Assert.assertTrue(codegen.generatorSettings.hideGenerationTimestamp); } @Test public void testSettersForConfigValues() throws Exception { - final DefaultGenerator codegen = new ThisDefaultGenerator(); - codegen.setHideGenerationTimestamp(false); + WorkflowSettings ws = WorkflowSettings.newBuilder().withHideGenerationTimestamp(false).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); codegen.processOpts(); Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); + Assert.assertFalse(codegen.generatorSettings.hideGenerationTimestamp); } @Test - public void testAdditionalPropertiesPutForConfigValues() throws Exception { - final DefaultGenerator codegen = new ThisDefaultGenerator(); - codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, false); + public void testAdditionalPropertiesPutForConfigValues() { + WorkflowSettings ws = WorkflowSettings.newBuilder().withHideGenerationTimestamp(false).build(); + final DefaultGenerator codegen = new ThisDefaultGenerator(ws); codegen.processOpts(); Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); + Assert.assertFalse(codegen.generatorSettings.hideGenerationTimestamp); } @Test From 3a8840f0f28229dc6dbb580fdac4a5658479b9a7 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 15:48:01 -0700 Subject: [PATCH 27/44] Removes defaultIncludes --- .../codegen/config/CodegenConfigurator.java | 12 ---- .../codegen/generators/DefaultGenerator.java | 65 ++++--------------- .../codegen/generators/Generator.java | 6 +- .../generators/JavaClientGenerator.java | 13 +++- 4 files changed, 28 insertions(+), 68 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 616606428bf..a728fd640d8 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -477,18 +477,6 @@ public ClientOptInput toClientOptInput() { // regardless of entrypoint (CLI sets properties on this type, config deserialization sets on generatorSettings). Generator config = GeneratorLoader.getGenerator(generatorSettings.getGeneratorName(), generatorSettings, workflowSettings); - // TODO: Work toward Generator having a "WorkflowSettings" property, or better a "Workflow" object which itself has a "WorkflowSettings" property. - config.additionalProperties().put(CodegenConstants.TEMPLATING_ENGINE, workflowSettings.getTemplatingEngineName()); - - // TODO: Work toward Generator having a "GeneratorSettings" property. - config.additionalProperties().putAll(generatorSettings.getAdditionalProperties()); - - // any other additional properties? - String templateDir = workflowSettings.getTemplateDir(); - if (templateDir != null) { - config.additionalProperties().put(CodegenConstants.TEMPLATE_DIR, workflowSettings.getTemplateDir()); - } - return new ClientOptInput( (OpenAPI)context.getSpecDocument(), config, diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 6b37ac19c06..a7ca9a5566d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -143,25 +143,20 @@ public class DefaultGenerator implements Generator { "################################################################################" ); + private static Map getInitialAdditionalProperties(GeneratorSettings generatorSettings, CodeGeneratorSettings codeGeneratorSettings) { + Map initialAddProps = new HashMap<>(); + initialAddProps.putAll(generatorSettings.getAdditionalProperties()); + initialAddProps.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, codeGeneratorSettings.hideGenerationTimestamp); + initialAddProps.put(CodegenConstants.TEMPLATING_ENGINE, codeGeneratorSettings.templateEngineName); + if (codeGeneratorSettings.templateDir != null) { + initialAddProps.put(CodegenConstants.TEMPLATE_DIR, codeGeneratorSettings.templateDir); + } + return initialAddProps; + } protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { this.generatorSettings = CodeGeneratorSettings.of(generatorSettings, workflowSettings, embeddedTemplateDir, packageNameDefault, outputFolderDefault); - defaultIncludes = new HashSet<>( - Arrays.asList("double", - "int", - "long", - "short", - "char", - "float", - "String", - "boolean", - "Boolean", - "Double", - "Void", - "Integer", - "Long", - "Float") - ); + additionalProperties = getInitialAdditionalProperties(generatorSettings, this.generatorSettings); // name formatting options cliOptions.add(CliOption.newBoolean(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, CodegenConstants @@ -182,7 +177,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo "openapiclient", "generated-code" + File.separator + "java" ); - additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, this.generatorSettings.hideGenerationTimestamp); } private final Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class); @@ -263,7 +257,6 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo .languageSpecificPrimitives(Set.of()) .build(); protected String inputSpec; - protected Set defaultIncludes; protected Map typeMapping; protected String modelPackage = "components.schema"; protected String modelNamePrefix = "", modelNameSuffix = ""; @@ -3437,8 +3430,7 @@ protected String getOrGenerateOperationId(Operation operation, String path, Stri * @return true if the library/module/package of the corresponding type needs to be imported */ protected boolean needToImport(String type) { - return StringUtils.isNotBlank(type) && !defaultIncludes.contains(type) - && !generatorMetadata.getLanguageSpecificPrimitives().contains(type); + return true; } protected void addImports(Set importsToBeAddedTo, Set importsToAdd) { @@ -4227,20 +4219,6 @@ protected EnumInfo getEnumInfo(ArrayList values, Schema schema, Strin return new EnumInfo(enumValueToName, typeToValues, jsonPathPiece); } - /** - * reads propertyKey from additionalProperties, converts it to a boolean and - * writes it back to additionalProperties to be usable as a boolean in - * mustache files. - * - * @param propertyKey property key - * @return property value as boolean - */ - public boolean convertPropertyToBooleanAndWriteBack(String propertyKey) { - boolean result = convertPropertyToBoolean(propertyKey); - writePropertyBack(propertyKey, result); - return result; - } - /** * Provides an override location, if any is specified, for the .openapi-generator-ignore. *

      @@ -4253,24 +4231,7 @@ public String getIgnoreFilePathOverride() { return ignoreFilePathOverride; } - public boolean convertPropertyToBoolean(String propertyKey) { - final Object booleanValue = additionalProperties.get(propertyKey); - boolean result = Boolean.FALSE; - if (booleanValue instanceof Boolean) { - result = (Boolean) booleanValue; - } else if (booleanValue instanceof String) { - result = Boolean.parseBoolean((String) booleanValue); - } else { - LOGGER.warn("The value (generator's option) must be either boolean or string. Default to `false`."); - } - return result; - } - - public void writePropertyBack(String propertyKey, boolean value) { - additionalProperties.put(propertyKey, value); - } - -// private List> getScopes(Scopes scopes) { + // private List> getScopes(Scopes scopes) { // if (scopes != null && !scopes.isEmpty()) { // List> newScopes = new ArrayList<>(); // for (Map.Entry scopeEntry : scopes.entrySet()) { diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java index 26f3bf52bc9..c30a963da8e 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/Generator.java @@ -70,7 +70,7 @@ public interface Generator extends OpenApiProcessor, Comparable { String escapeQuotationMark(String input); - // todo remove this and move it into new + // todo remove this and move it into the generator constructor void processOpts(); List cliOptions(); @@ -81,10 +81,10 @@ public interface Generator extends OpenApiProcessor, Comparable { HashMap> getJsonPathTemplateFiles(GeneratedFileType type); - // todo remove + move this into the new constructor + // todo remove this and move it into the generator constructor void preprocessOpenAPI(OpenAPI openAPI); - // todo remove and move this into the new constructor + // todo remove this and move it into the generator constructor void processOpenAPI(OpenAPI openAPI); String toApiFilename(String name); diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 7a61b569835..8c8ddd5f496 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -3204,7 +3204,18 @@ public void preprocessOpenAPI(OpenAPI openAPI) { } // must be sequential after initial setting above if (additionalProperties.containsKey(CodegenConstants.SNAPSHOT_VERSION)) { - if (convertPropertyToBooleanAndWriteBack(CodegenConstants.SNAPSHOT_VERSION)) { + final Object booleanValue = additionalProperties.get(CodegenConstants.SNAPSHOT_VERSION); + boolean result1 = Boolean.FALSE; + if (booleanValue instanceof Boolean) { + result1 = (Boolean) booleanValue; + } else if (booleanValue instanceof String) { + result1 = Boolean.parseBoolean((String) booleanValue); + } else { + LOGGER.warn("The value (generator's option) must be either boolean or string. Default to `false`."); + } + boolean result = result1; + additionalProperties.put(CodegenConstants.SNAPSHOT_VERSION, result); + if (result) { this.setArtifactVersion(this.buildSnapshotVersion(this.getArtifactVersion())); } } From bdb86440ab748eb79b3392f23eb805d658e9de9f Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 15:58:18 -0700 Subject: [PATCH 28/44] Fixes referencing issue --- .../codegen/generators/DefaultGenerator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index a7ca9a5566d..51ae3c1578d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -145,7 +145,9 @@ public class DefaultGenerator implements Generator { private static Map getInitialAdditionalProperties(GeneratorSettings generatorSettings, CodeGeneratorSettings codeGeneratorSettings) { Map initialAddProps = new HashMap<>(); - initialAddProps.putAll(generatorSettings.getAdditionalProperties()); + if (generatorSettings != null) { + initialAddProps.putAll(generatorSettings.getAdditionalProperties()); + } initialAddProps.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, codeGeneratorSettings.hideGenerationTimestamp); initialAddProps.put(CodegenConstants.TEMPLATING_ENGINE, codeGeneratorSettings.templateEngineName); if (codeGeneratorSettings.templateDir != null) { From bd0884d0036fbfb20855a099ccd6bdb0ae0061e8 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 16:05:49 -0700 Subject: [PATCH 29/44] Docs regen --- docs/generators/java.md | 40 +++++++++---------- docs/generators/python.md | 26 +++++++++--- .../generators/JavaClientGenerator.java | 1 - 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/docs/generators/java.md b/docs/generators/java.md index f9efbabe28f..0a542cff136 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -12,7 +12,7 @@ title: Documentation for the java generator | generator language | Java | | | generator language version | 17 | | | generator default templating engine | handlebars | | -| helpTxt | Generates a Java client library

      Features in this generator:
      - v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support
      - Very thorough documentation generated in the style of javadocs
      - Input types constrained for a Schema in SomeSchema.validate
      - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data
      - Immutable List output classes generated and returned by validate for List<?> input
      - Immutable Map output classes generated and returned by validate for Map<?, ?> input
      - Strictly typed list input can be instantiated in client code using generated ListBuilders
      - Strictly typed map input can be instantiated in client code using generated MapBuilders
      - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:
      - `new MapBuilder().requiredA("a").requiredB("b").build()`
      - `new MapBuilder().requiredA("a").requiredB("b").optionalProp("c").additionalProperty("someAddProp", "d").build()`
      - Run time type checking and validation when
      - validating schema payloads
      - instantiating List output class (validation run)
      - instantiating Map output class (validation run)
      - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class
      - Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods
      - The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client
      - ensuring that null pointer exceptions will not happen
      - Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in
      - component schema names
      - schema property names (a fallback setter is written in the MapBuilder)
      - Generated interfaces are largely consistent with the python code
      - Openapi spec inline schemas supported at any depth in any location
      - Format support for: int32, int64, float, double, date, datetime, uuid
      - Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string
      - enum types are generated for enums of type string/integer/number/boolean/null
      - String transmission of numbers supported with type: string, format: number | | +| helpMsg | Generates a Java client library

      Features in this generator:
      - v3.0.0 - [v3.1.0](#schema-feature) OpenAPI Specification support
      - Very thorough documentation generated in the style of javadocs
      - Input types constrained for a Schema in SomeSchema.validate
      - validate method can accept arbitrary List/Map/null/int/long/double/float/String json data
      - Immutable List output classes generated and returned by validate for List<?> input
      - Immutable Map output classes generated and returned by validate for Map<?, ?> input
      - Strictly typed list input can be instantiated in client code using generated ListBuilders
      - Strictly typed map input can be instantiated in client code using generated MapBuilders
      - Sequential map builders are generated ensuring that required properties are set before build is invoked. Looks like:
      - `new MapBuilder().requiredA("a").requiredB("b").build()`
      - `new MapBuilder().requiredA("a").requiredB("b").optionalProp("c").additionalProperty("someAddProp", "d").build()`
      - Run time type checking and validation when
      - validating schema payloads
      - instantiating List output class (validation run)
      - instantiating Map output class (validation run)
      - Note: if needed, validation of json schema keywords can be deactivated via a SchemaConfiguration class
      - Enums classes are generated and may be input into Schema.validate or the List/MapBuilder add/setter methods
      - The [Checker-Framework's](https://github.com/typetools/checker-framework) NullnessChecker and @Nullable annotations are used in the java client
      - ensuring that null pointer exceptions will not happen
      - Invalid (in java) property names supported like `class`, `1var`, `hi-there` etc in
      - component schema names
      - schema property names (a fallback setter is written in the MapBuilder)
      - Generated interfaces are largely consistent with the python code
      - Openapi spec inline schemas supported at any depth in any location
      - Format support for: int32, int64, float, double, date, datetime, uuid
      - Payload values are not coerced when validated, so a date/date-time value can pass other validations that describe the payload only as type string
      - enum types are generated for enums of type string/integer/number/boolean/null
      - String transmission of numbers supported with type: string, format: number | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. @@ -20,7 +20,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|apiPackage|package for generated api classes| |apis| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapi-json-schema-tools/openapi-json-schema-generator| @@ -30,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapijsonschematools.org| |groupId|groupId in generated pom.xml| |org.openapijsonschematools| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |invokerPackage|root package for generated code| |org.openapijsonschematools.client| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| @@ -192,26 +190,26 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Name | Supported | Defined By | | ---- | --------- | ---------- | |Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Integer|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Number|✓|OAS2,OAS3 -|String|✓|OAS2,OAS3 +|Int32|✗|OAS2,OAS3 +|Int64|✗|OAS2,OAS3 +|Integer|✗|OAS2,OAS3 +|Float|✗|OAS2,OAS3 +|Double|✗|OAS2,OAS3 +|Number|✗|OAS2,OAS3 +|String|✗|OAS2,OAS3 |Byte|✗|OAS2,OAS3 |Binary|✗|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 +|Boolean|✗|OAS2,OAS3 +|Date|✗|OAS2,OAS3 +|DateTime|✗|OAS2,OAS3 |Password|✗|OAS2,OAS3 |File|✗|OAS2 -|Uuid|✓|OAS2,OAS3 -|Array|✓|OAS2,OAS3 -|Null|✓|OAS3 -|AnyType|✓|OAS2,OAS3 -|Object|✓|OAS2,OAS3 -|Enum|✓|OAS2,OAS3 +|Uuid|✗|OAS2,OAS3 +|Array|✗|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✗|OAS2,OAS3 +|Enum|✗|OAS2,OAS3 ### Documentation Feature | Name | Supported | Defined By | @@ -233,7 +231,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl ### Global Feature | Name | Supported | Defined By | | ---- | --------- | ---------- | -|Info|✓|OAS2,OAS3 +|Info|✗|OAS2,OAS3 |Servers|✓|OAS3 |Paths|✓|OAS2,OAS3 |Webhooks|✗|OAS3 @@ -334,7 +332,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl ### Wire Format Feature | Name | Supported | Defined By | | ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 +|JSON|✗|OAS2,OAS3 |XML|✗|OAS2,OAS3 |PROTOBUF|✗|ToolingExtension |Custom|✗|OAS2,OAS3 diff --git a/docs/generators/python.md b/docs/generators/python.md index 09e0602888b..afbb5e7e2b2 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -12,7 +12,7 @@ title: Documentation for the python generator | generator language | Python | | | generator language version | >=3.8 | | | generator default templating engine | handlebars | | -| helpTxt | Generates a Python client library

      Features in this generator:
      - type hints on endpoints and model creation
      - model parameter names use the spec defined keys and cases
      - robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only
      - endpoint parameter names use the spec defined keys and cases
      - inline schemas are supported at any location including composition
      - multiple content types supported in request body and response bodies
      - run time type checking + json schema validation
      - json schema keyword validation may be selectively disabled with SchemaConfiguration
      - enums of type string/integer/boolean typed using typing.Literal
      - mypy static type checking run on generated sample
      - Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
      - Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema
      - quicker load time for python modules (a single endpoint can be imported and used without loading others)
      - composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
      - schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor | | +| helpMsg | Generates a Python client library

      Features in this generator:
      - type hints on endpoints and model creation
      - model parameter names use the spec defined keys and cases
      - robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only
      - endpoint parameter names use the spec defined keys and cases
      - inline schemas are supported at any location including composition
      - multiple content types supported in request body and response bodies
      - run time type checking + json schema validation
      - json schema keyword validation may be selectively disabled with SchemaConfiguration
      - enums of type string/integer/boolean typed using typing.Literal
      - mypy static type checking run on generated sample
      - Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
      - Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema
      - quicker load time for python modules (a single endpoint can be imported and used without loading others)
      - composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
      - schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. @@ -22,12 +22,10 @@ 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| |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.
      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:

      • defining the propertyName as an enum with only one value in the schemas that are in your discriminator map
      • setting additionalProperties: false in your schemas
      |
      **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| |projectName|python project name in setup.py (e.g. petstore-api).| |null| |recursionLimit|Set the recursion limit. If not set, use the system default value.| |null| -|templatingEngine|template engine|
      **handlebars**
      handlebars templating engine
      |handlebars| |useNose|use the nose test framework| |false| ## SUPPORTED VENDOR EXTENSIONS @@ -54,17 +52,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES
        +
      • None
      • bool
      • bytes
      • date
      • datetime
      • dict
      • file
      • -
      • file_type
      • float
      • int
      • list
      • -
      • none_type
      • object
      • str
      @@ -72,15 +69,21 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## RESERVED WORDS
        +
      • @property
      • +
      • all_params
      • and
      • as
      • assert
      • async
      • +
      • auth_settings
      • await
      • +
      • body_params
      • bool
      • break
      • class
      • continue
      • +
      • datetime
      • +
      • decimal
      • def
      • del
      • dict
      • @@ -92,30 +95,43 @@ These options may be applied as additional-properties (cli) or configOptions (pl
      • finally
      • float
      • for
      • +
      • form_params
      • from
      • +
      • functools
      • global
      • +
      • header_params
      • if
      • immutabledict
      • import
      • in
      • int
      • +
      • io
      • is
      • lambda
      • list
      • +
      • local_var_files
      • none
      • nonlocal
      • not
      • or
      • pass
      • +
      • path_params
      • print
      • property
      • +
      • query_params
      • raise
      • +
      • re
      • +
      • resource_path
      • return
      • +
      • schemas
      • self
      • str
      • true
      • try
      • tuple
      • +
      • typing
      • +
      • typing_extensions
      • +
      • uuid
      • while
      • with
      • yield
      • diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 8c8ddd5f496..37104bf5a06 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -99,7 +99,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings supportsInheritance = true; - cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage())); cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC).defaultValue(this.getGroupId())); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC).defaultValue(this.getArtifactId())); From 47bbf1af63dc5f3245458b558b6cb60144bb8166 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 16:14:46 -0700 Subject: [PATCH 30/44] Fixes java docs --- docs/generators/java.md | 36 +++++++++---------- docs/generators/python.md | 6 +--- .../generators/JavaClientGenerator.java | 26 +++++++++++++- .../generators/PythonClientGenerator.java | 4 +-- 4 files changed, 46 insertions(+), 26 deletions(-) diff --git a/docs/generators/java.md b/docs/generators/java.md index 0a542cff136..5893890d14a 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -190,26 +190,26 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Name | Supported | Defined By | | ---- | --------- | ---------- | |Custom|✗|OAS2,OAS3 -|Int32|✗|OAS2,OAS3 -|Int64|✗|OAS2,OAS3 -|Integer|✗|OAS2,OAS3 -|Float|✗|OAS2,OAS3 -|Double|✗|OAS2,OAS3 -|Number|✗|OAS2,OAS3 -|String|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Integer|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Number|✓|OAS2,OAS3 +|String|✓|OAS2,OAS3 |Byte|✗|OAS2,OAS3 |Binary|✗|OAS2,OAS3 -|Boolean|✗|OAS2,OAS3 -|Date|✗|OAS2,OAS3 -|DateTime|✗|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 |Password|✗|OAS2,OAS3 |File|✗|OAS2 -|Uuid|✗|OAS2,OAS3 -|Array|✗|OAS2,OAS3 -|Null|✗|OAS3 -|AnyType|✗|OAS2,OAS3 -|Object|✗|OAS2,OAS3 -|Enum|✗|OAS2,OAS3 +|Uuid|✓|OAS2,OAS3 +|Array|✓|OAS2,OAS3 +|Null|✓|OAS3 +|AnyType|✓|OAS2,OAS3 +|Object|✓|OAS2,OAS3 +|Enum|✓|OAS2,OAS3 ### Documentation Feature | Name | Supported | Defined By | @@ -231,7 +231,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl ### Global Feature | Name | Supported | Defined By | | ---- | --------- | ---------- | -|Info|✗|OAS2,OAS3 +|Info|✓|OAS2,OAS3 |Servers|✓|OAS3 |Paths|✓|OAS2,OAS3 |Webhooks|✗|OAS3 @@ -332,7 +332,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl ### Wire Format Feature | Name | Supported | Defined By | | ---- | --------- | ---------- | -|JSON|✗|OAS2,OAS3 +|JSON|✓|OAS2,OAS3 |XML|✗|OAS2,OAS3 |PROTOBUF|✗|ToolingExtension |Custom|✗|OAS2,OAS3 diff --git a/docs/generators/python.md b/docs/generators/python.md index afbb5e7e2b2..b708155ae63 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -70,18 +70,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
        • @property
        • -
        • all_params
        • and
        • as
        • assert
        • async
        • -
        • auth_settings
        • await
        • -
        • body_params
        • bool
        • break
        • class
        • continue
        • +
        • cookie_params
        • datetime
        • decimal
        • def
        • @@ -95,7 +93,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
        • finally
        • float
        • for
        • -
        • form_params
        • from
        • functools
        • global
        • @@ -109,7 +106,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
        • is
        • lambda
        • list
        • -
        • local_var_files
        • none
        • nonlocal
        • not
        • diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 37104bf5a06..f1201806d8b 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -36,12 +36,14 @@ import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorMetadata; import org.openapijsonschematools.codegen.generators.generatormetadata.Stability; import org.openapijsonschematools.codegen.generators.generatormetadata.features.ComponentsFeature; +import org.openapijsonschematools.codegen.generators.generatormetadata.features.DataTypeFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.GlobalFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.OperationFeature; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SchemaFeature; import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.generators.generatormetadata.GeneratorType; import org.openapijsonschematools.codegen.generators.generatormetadata.features.SecurityFeature; +import org.openapijsonschematools.codegen.generators.generatormetadata.features.WireFormatFeature; import org.openapijsonschematools.codegen.generators.models.CliOption; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenHeader; import org.openapijsonschematools.codegen.generators.openapimodels.CodegenKey; @@ -190,6 +192,24 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings private final Map schemaKeyToModelNameCache = new HashMap<>(); private static final FeatureSet featureSet = FeatureSet.newBuilder() + .includeDataTypeFeatures( + DataTypeFeature.Int32, + DataTypeFeature.Int64, + DataTypeFeature.Integer, + DataTypeFeature.Float, + DataTypeFeature.Double, + DataTypeFeature.Number, + DataTypeFeature.String, + DataTypeFeature.Boolean, + DataTypeFeature.Date, + DataTypeFeature.DateTime, + DataTypeFeature.Uuid, + DataTypeFeature.Array, + DataTypeFeature.Object, + DataTypeFeature.Null, + DataTypeFeature.AnyType, + DataTypeFeature.Enum + ) .includeDocumentationFeatures( DocumentationFeature.Readme, DocumentationFeature.Servers, @@ -206,7 +226,8 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings GlobalFeature.Components, GlobalFeature.Servers, GlobalFeature.Security, - GlobalFeature.Paths + GlobalFeature.Paths, + GlobalFeature.Info ) .includeComponentsFeatures( ComponentsFeature.schemas, @@ -273,6 +294,9 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings SchemaFeature.UnevaluatedProperties, SchemaFeature.UniqueItems ) + .includeWireFormatFeatures( + WireFormatFeature.JSON + ) .build(); public static final GeneratorMetadata generatorMetadata = GeneratorMetadata.newBuilder() .name("java") diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 2bdbe1af6b5..0e6741bb0b5 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -263,8 +263,8 @@ public class PythonClientGenerator extends DefaultGenerator implements Generator getLowerCaseWords( Arrays.asList( // from https://docs.python.org/3/reference/lexical_analysis.html#keywords // local variable name used in API methods (endpoints) - "all_params", "resource_path", "path_params", "query_params", - "header_params", "form_params", "local_var_files", "body_params", "auth_settings", + "resource_path", "path_params", "query_params", + "header_params", "cookie_params", // @property "property", "@property", // python reserved words From 3abf681be2279e7d193742863cfbbf8e8d197be5 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 16:49:37 -0700 Subject: [PATCH 31/44] Fixes setting package name --- .../codegen/clicommands/Generate.java | 16 ++++++++++++---- .../codegen/config/CodegenConfigurator.java | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index e8a70f4e9b9..ef11c119878 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -255,10 +255,6 @@ public void execute() { configurator.setTemplateDir(templateDir); } - if (isNotEmpty(packageName)) { - configurator.setPackageName(packageName); - } - if (isNotEmpty(templatingEngine)) { configurator.setTemplatingEngineName(templatingEngine); } @@ -350,8 +346,20 @@ public void execute() { if (globalProperties != null && !globalProperties.isEmpty()) { CodegenConfiguratorUtils.applyGlobalPropertiesKvpList(globalProperties, configurator); } + + if (isNotEmpty(packageName)) { + configurator.setPackageName(packageName); + } + CodegenConfiguratorUtils.applyAdditionalPropertiesKvpList(additionalProperties, configurator); + if (!isNotEmpty(packageName) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("packageName"))) { + // if packageName is passed as an additional property warn them + System.out.println("packageName should be passed in using --package-name from now on"); + packageName = (String) configurator.getAdditionalProperties().get("packageName"); + configurator.setPackageName(packageName); + } + try { final ClientOptInput clientOptInput = configurator.toClientOptInput(); diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index a728fd640d8..0af84a27579 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -468,6 +468,10 @@ public Context toContext() { return new Context<>(specification, generatorSettings, workflowSettings); } + public Map getAdditionalProperties() { + return additionalProperties; + } + public ClientOptInput toClientOptInput() { Context context = toContext(); WorkflowSettings workflowSettings = context.getWorkflowSettings(); From 94fe515ff9c2198697df70512805b858ad309a39 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 17 Apr 2024 17:12:11 -0700 Subject: [PATCH 32/44] Samples regen --- ...lpropertiesShouldNotLookInApplicators.java | 3 - .../client/components/schemas/Allof.java | 4 - .../schemas/AllofCombinedWithAnyofOneof.java | 1 - .../schemas/AllofWithBaseSchema.java | 2 - .../schemas/AllofWithOneEmptySchema.java | 1 - .../schemas/AllofWithTheFirstEmptySchema.java | 2 - .../schemas/AllofWithTheLastEmptySchema.java | 2 - .../schemas/AllofWithTwoEmptySchemas.java | 1 - .../client/components/schemas/Anyof.java | 1 - .../components/schemas/AnyofComplexTypes.java | 4 - .../schemas/AnyofWithBaseSchema.java | 16 - .../schemas/AnyofWithOneEmptySchema.java | 2 - .../components/schemas/ForbiddenProperty.java | 1 - ...NestedAllofToCheckValidationSemantics.java | 1 - ...NestedAnyofToCheckValidationSemantics.java | 1 - ...NestedOneofToCheckValidationSemantics.java | 1 - .../client/components/schemas/Not.java | 1 - .../schemas/NotMoreComplexSchema.java | 3 - .../client/components/schemas/Oneof.java | 1 - .../components/schemas/OneofComplexTypes.java | 4 - .../schemas/OneofWithBaseSchema.java | 16 - .../schemas/OneofWithEmptySchema.java | 2 - .../components/schemas/OneofWithRequired.java | 10 - .../python/.openapi-generator/FILES | 3610 +++++----- .../client/3_0_3_unit_test/python/README.md | 16 +- .../apis/tags/additional_properties_api.md | 2 +- .../python/docs/apis/tags/all_of_api.md | 2 +- .../python/docs/apis/tags/any_of_api.md | 2 +- .../docs/apis/tags/content_type_json_api.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../python/docs/apis/tags/enum_api.md | 2 +- .../python/docs/apis/tags/format_api.md | 2 +- .../python/docs/apis/tags/items_api.md | 2 +- .../python/docs/apis/tags/max_items_api.md | 2 +- .../python/docs/apis/tags/max_length_api.md | 2 +- .../docs/apis/tags/max_properties_api.md | 2 +- .../python/docs/apis/tags/maximum_api.md | 2 +- .../python/docs/apis/tags/min_items_api.md | 2 +- .../python/docs/apis/tags/min_length_api.md | 2 +- .../docs/apis/tags/min_properties_api.md | 2 +- .../python/docs/apis/tags/minimum_api.md | 2 +- .../python/docs/apis/tags/multiple_of_api.md | 2 +- .../python/docs/apis/tags/not_api.md | 19 + .../python/docs/apis/tags/one_of_api.md | 2 +- .../apis/tags/operation_request_body_api.md | 2 +- .../python/docs/apis/tags/path_post_api.md | 2 +- .../python/docs/apis/tags/pattern_api.md | 2 +- .../python/docs/apis/tags/properties_api.md | 2 +- .../python/docs/apis/tags/ref_api.md | 2 +- .../python/docs/apis/tags/required_api.md | 2 +- ...esponse_content_content_type_schema_api.md | 2 +- .../python/docs/apis/tags/type_api.md | 2 +- .../python/docs/apis/tags/unique_items_api.md | 2 +- ...s_allows_a_schema_which_should_validate.md | 2 +- ...tionalproperties_are_allowed_by_default.md | 2 +- ...dditionalproperties_can_exist_by_itself.md | 2 +- ...operties_should_not_look_in_applicators.md | 2 +- .../python/docs/components/schema/allof.md | 2 +- .../schema/allof_combined_with_anyof_oneof.md | 2 +- .../components/schema/allof_simple_types.md | 2 +- .../schema/allof_with_base_schema.md | 2 +- .../schema/allof_with_one_empty_schema.md | 2 +- .../allof_with_the_first_empty_schema.md | 2 +- .../allof_with_the_last_empty_schema.md | 2 +- .../schema/allof_with_two_empty_schemas.md | 2 +- .../python/docs/components/schema/anyof.md | 2 +- .../components/schema/anyof_complex_types.md | 2 +- .../schema/anyof_with_base_schema.md | 2 +- .../schema/anyof_with_one_empty_schema.md | 2 +- .../schema/array_type_matches_arrays.md | 2 +- .../schema/boolean_type_matches_booleans.md | 2 +- .../python/docs/components/schema/by_int.md | 2 +- .../docs/components/schema/by_number.md | 2 +- .../docs/components/schema/by_small_number.md | 2 +- .../components/schema/date_time_format.md | 2 +- .../docs/components/schema/email_format.md | 2 +- .../schema/enum_with0_does_not_match_false.md | 2 +- .../schema/enum_with1_does_not_match_true.md | 2 +- .../schema/enum_with_escaped_characters.md | 2 +- .../schema/enum_with_false_does_not_match0.md | 2 +- .../schema/enum_with_true_does_not_match1.md | 2 +- .../components/schema/enums_in_properties.md | 2 +- .../components/schema/forbidden_property.md | 6 +- .../docs/components/schema/hostname_format.md | 2 +- .../schema/integer_type_matches_integers.md | 2 +- ...not_raise_error_when_float_division_inf.md | 2 +- .../invalid_string_value_for_default.md | 2 +- .../docs/components/schema/ipv4_format.md | 2 +- .../docs/components/schema/ipv6_format.md | 2 +- .../components/schema/json_pointer_format.md | 2 +- .../components/schema/maximum_validation.md | 2 +- ...aximum_validation_with_unsigned_integer.md | 2 +- .../components/schema/maxitems_validation.md | 2 +- .../components/schema/maxlength_validation.md | 2 +- ...axproperties0_means_the_object_is_empty.md | 2 +- .../schema/maxproperties_validation.md | 2 +- .../components/schema/minimum_validation.md | 2 +- .../minimum_validation_with_signed_integer.md | 2 +- .../components/schema/minitems_validation.md | 2 +- .../components/schema/minlength_validation.md | 2 +- .../schema/minproperties_validation.md | 2 +- ...ted_allof_to_check_validation_semantics.md | 2 +- ...ted_anyof_to_check_validation_semantics.md | 2 +- .../docs/components/schema/nested_items.md | 2 +- ...ted_oneof_to_check_validation_semantics.md | 2 +- .../python/docs/components/schema/not.md | 28 + .../schema/not_more_complex_schema.md | 6 +- .../schema/nul_characters_in_strings.md | 2 +- .../null_type_matches_only_the_null_object.md | 2 +- .../schema/number_type_matches_numbers.md | 2 +- .../schema/object_properties_validation.md | 2 +- .../schema/object_type_matches_objects.md | 2 +- .../python/docs/components/schema/oneof.md | 2 +- .../components/schema/oneof_complex_types.md | 2 +- .../schema/oneof_with_base_schema.md | 2 +- .../schema/oneof_with_empty_schema.md | 2 +- .../components/schema/oneof_with_required.md | 2 +- .../schema/pattern_is_not_anchored.md | 2 +- .../components/schema/pattern_validation.md | 2 +- .../properties_with_escaped_characters.md | 2 +- ...perty_named_ref_that_is_not_a_reference.md | 2 +- .../schema/ref_in_additionalproperties.md | 2 +- .../docs/components/schema/ref_in_allof.md | 2 +- .../docs/components/schema/ref_in_anyof.md | 2 +- .../docs/components/schema/ref_in_items.md | 2 +- .../docs/components/schema/ref_in_not.md | 2 +- .../docs/components/schema/ref_in_oneof.md | 2 +- .../docs/components/schema/ref_in_property.md | 2 +- .../schema/required_default_validation.md | 2 +- .../components/schema/required_validation.md | 2 +- .../schema/required_with_empty_array.md | 2 +- .../required_with_escaped_characters.md | 2 +- .../schema/simple_enum_validation.md | 2 +- .../schema/string_type_matches_strings.md | 2 +- ..._do_anything_if_the_property_is_missing.md | 2 +- .../schema/uniqueitems_false_validation.md | 2 +- .../schema/uniqueitems_validation.md | 2 +- .../docs/components/schema/uri_format.md | 2 +- .../components/schema/uri_reference_format.md | 2 +- .../components/schema/uri_template_format.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 16 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 16 +- .../post.md | 20 +- .../content/application_json/schema.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 20 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 20 +- .../post.md | 22 +- .../content/application_json/schema.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../3_0_3_unit_test/python/pyproject.toml | 2 +- .../python/src/openapi_client/__init__.py | 26 + .../python/src/openapi_client/api_client.py | 1402 ++++ .../python/src/openapi_client/api_response.py | 28 + .../src/openapi_client/apis/__init__.py | 3 + .../src/openapi_client/apis/path_to_api.py | 536 ++ .../src/openapi_client/apis/paths/__init__.py | 3 + ...hema_which_should_validate_request_body.py | 16 + ...ies_are_allowed_by_default_request_body.py | 16 + ...erties_can_exist_by_itself_request_body.py | 16 + ...ld_not_look_in_applicators_request_body.py | 16 + ..._combined_with_anyof_oneof_request_body.py | 16 + .../request_body_post_allof_request_body.py | 16 + ...dy_post_allof_simple_types_request_body.py | 16 + ...ost_allof_with_base_schema_request_body.py | 16 + ...llof_with_one_empty_schema_request_body.py | 16 + ...ith_the_first_empty_schema_request_body.py | 16 + ...with_the_last_empty_schema_request_body.py | 16 + ...lof_with_two_empty_schemas_request_body.py | 16 + ...y_post_anyof_complex_types_request_body.py | 16 + .../request_body_post_anyof_request_body.py | 16 + ...ost_anyof_with_base_schema_request_body.py | 16 + ...nyof_with_one_empty_schema_request_body.py | 16 + ..._array_type_matches_arrays_request_body.py | 16 + ...lean_type_matches_booleans_request_body.py | 16 + .../request_body_post_by_int_request_body.py | 16 + ...equest_body_post_by_number_request_body.py | 16 + ..._body_post_by_small_number_request_body.py | 16 + ...body_post_date_time_format_request_body.py | 16 + ...est_body_post_email_format_request_body.py | 16 + ...with0_does_not_match_false_request_body.py | 16 + ..._with1_does_not_match_true_request_body.py | 16 + ...um_with_escaped_characters_request_body.py | 16 + ...with_false_does_not_match0_request_body.py | 16 + ..._with_true_does_not_match1_request_body.py | 16 + ...y_post_enums_in_properties_request_body.py | 16 + ...dy_post_forbidden_property_request_body.py | 16 + ..._body_post_hostname_format_request_body.py | 16 + ...eger_type_matches_integers_request_body.py | 16 + ...or_when_float_division_inf_request_body.py | 16 + ...d_string_value_for_default_request_body.py | 16 + ...uest_body_post_ipv4_format_request_body.py | 16 + ...uest_body_post_ipv6_format_request_body.py | 16 + ...y_post_json_pointer_format_request_body.py | 16 + ...dy_post_maximum_validation_request_body.py | 16 + ...tion_with_unsigned_integer_request_body.py | 16 + ...y_post_maxitems_validation_request_body.py | 16 + ..._post_maxlength_validation_request_body.py | 16 + ..._means_the_object_is_empty_request_body.py | 16 + ...t_maxproperties_validation_request_body.py | 16 + ...dy_post_minimum_validation_request_body.py | 16 + ...dation_with_signed_integer_request_body.py | 16 + ...y_post_minitems_validation_request_body.py | 16 + ..._post_minlength_validation_request_body.py | 16 + ...t_minproperties_validation_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ...est_body_post_nested_items_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ...st_not_more_complex_schema_request_body.py | 16 + .../request_body_post_not_request_body.py | 16 + ..._nul_characters_in_strings_request_body.py | 16 + ...tches_only_the_null_object_request_body.py | 16 + ...umber_type_matches_numbers_request_body.py | 16 + ...ject_properties_validation_request_body.py | 16 + ...bject_type_matches_objects_request_body.py | 16 + ...y_post_oneof_complex_types_request_body.py | 16 + .../request_body_post_oneof_request_body.py | 16 + ...ost_oneof_with_base_schema_request_body.py | 16 + ...st_oneof_with_empty_schema_request_body.py | 16 + ...y_post_oneof_with_required_request_body.py | 16 + ...st_pattern_is_not_anchored_request_body.py | 16 + ...dy_post_pattern_validation_request_body.py | 16 + ...es_with_escaped_characters_request_body.py | 16 + ...ef_that_is_not_a_reference_request_body.py | 16 + ...ef_in_additionalproperties_request_body.py | 16 + ...est_body_post_ref_in_allof_request_body.py | 16 + ...est_body_post_ref_in_anyof_request_body.py | 16 + ...est_body_post_ref_in_items_request_body.py | 16 + ...quest_body_post_ref_in_not_request_body.py | 16 + ...est_body_post_ref_in_oneof_request_body.py | 16 + ..._body_post_ref_in_property_request_body.py | 16 + ...equired_default_validation_request_body.py | 16 + ...y_post_required_validation_request_body.py | 16 + ..._required_with_empty_array_request_body.py | 16 + ...ed_with_escaped_characters_request_body.py | 16 + ...ost_simple_enum_validation_request_body.py | 16 + ...tring_type_matches_strings_request_body.py | 16 + ...if_the_property_is_missing_request_body.py | 16 + ...iqueitems_false_validation_request_body.py | 16 + ...ost_uniqueitems_validation_request_body.py | 16 + ...quest_body_post_uri_format_request_body.py | 16 + ..._post_uri_reference_format_request_body.py | 16 + ...y_post_uri_template_format_request_body.py | 16 + ...alidate_response_body_for_content_types.py | 16 + ...default_response_body_for_content_types.py | 16 + ..._itself_response_body_for_content_types.py | 16 + ...icators_response_body_for_content_types.py | 16 + ...f_oneof_response_body_for_content_types.py | 16 + ...t_allof_response_body_for_content_types.py | 16 + ...e_types_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...schemas_response_body_for_content_types.py | 16 + ...x_types_response_body_for_content_types.py | 16 + ...t_anyof_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._arrays_response_body_for_content_types.py | 16 + ...ooleans_response_body_for_content_types.py | 16 + ..._by_int_response_body_for_content_types.py | 16 + ..._number_response_body_for_content_types.py | 16 + ..._number_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...h_false_response_body_for_content_types.py | 16 + ...ch_true_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ..._match0_response_body_for_content_types.py | 16 + ..._match1_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...roperty_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...ntegers_response_body_for_content_types.py | 16 + ...ion_inf_response_body_for_content_types.py | 16 + ...default_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...integer_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...s_empty_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...integer_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ...d_items_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...ost_not_response_body_for_content_types.py | 16 + ...strings_response_body_for_content_types.py | 16 + ..._object_response_body_for_content_types.py | 16 + ...numbers_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...objects_response_body_for_content_types.py | 16 + ...x_types_response_body_for_content_types.py | 16 + ...t_oneof_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...equired_response_body_for_content_types.py | 16 + ...nchored_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ...ference_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...n_allof_response_body_for_content_types.py | 16 + ...n_anyof_response_body_for_content_types.py | 16 + ...n_items_response_body_for_content_types.py | 16 + ..._in_not_response_body_for_content_types.py | 16 + ...n_oneof_response_body_for_content_types.py | 16 + ...roperty_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...y_array_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...strings_response_body_for_content_types.py | 16 + ...missing_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + .../src/openapi_client/apis/tag_to_api.py | 98 + .../src/openapi_client/apis/tags/__init__.py | 3 + .../apis/tags/additional_properties_api.py | 35 + .../openapi_client/apis/tags/all_of_api.py | 55 + .../openapi_client/apis/tags/any_of_api.py | 39 + .../apis/tags/content_type_json_api.py | 367 + .../openapi_client/apis/tags/default_api.py | 27 + .../src/openapi_client/apis/tags/enum_api.py | 51 + .../openapi_client/apis/tags/format_api.py | 55 + .../src/openapi_client/apis/tags/items_api.py | 23 + .../openapi_client/apis/tags/max_items_api.py | 23 + .../apis/tags/max_length_api.py | 23 + .../apis/tags/max_properties_api.py | 27 + .../openapi_client/apis/tags/maximum_api.py | 27 + .../openapi_client/apis/tags/min_items_api.py | 23 + .../apis/tags/min_length_api.py | 23 + .../apis/tags/min_properties_api.py | 23 + .../openapi_client/apis/tags/minimum_api.py | 27 + .../apis/tags/multiple_of_api.py | 35 + .../src/openapi_client/apis/tags/not_api.py | 31 + .../openapi_client/apis/tags/one_of_api.py | 43 + .../apis/tags/operation_request_body_api.py | 193 + .../openapi_client/apis/tags/path_post_api.py | 367 + .../openapi_client/apis/tags/pattern_api.py | 27 + .../apis/tags/properties_api.py | 27 + .../src/openapi_client/apis/tags/ref_api.py | 51 + .../openapi_client/apis/tags/required_api.py | 35 + ...esponse_content_content_type_schema_api.py | 193 + .../src/openapi_client/apis/tags/type_api.py | 47 + .../apis/tags/unique_items_api.py | 27 + .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 + ...s_allows_a_schema_which_should_validate.py | 145 + ...tionalproperties_are_allowed_by_default.py | 110 + ...dditionalproperties_can_exist_by_itself.py | 88 + ...operties_should_not_look_in_applicators.py | 155 + .../openapi_client/components/schema/allof.py | 174 + .../schema/allof_combined_with_anyof_oneof.py | 64 + .../components/schema/allof_simple_types.py | 48 + .../schema/allof_with_base_schema.py | 238 + .../schema/allof_with_one_empty_schema.py | 30 + .../allof_with_the_first_empty_schema.py | 32 + .../allof_with_the_last_empty_schema.py | 32 + .../schema/allof_with_two_empty_schemas.py | 32 + .../openapi_client/components/schema/anyof.py | 40 + .../components/schema/anyof_complex_types.py | 174 + .../schema/anyof_with_base_schema.py | 49 + .../schema/anyof_with_one_empty_schema.py | 32 + .../schema/array_type_matches_arrays.py | 74 + .../schema/boolean_type_matches_booleans.py | 13 + .../components/schema/by_int.py | 26 + .../components/schema/by_number.py | 26 + .../components/schema/by_small_number.py | 26 + .../components/schema/date_time_format.py | 26 + .../components/schema/email_format.py | 26 + .../schema/enum_with0_does_not_match_false.py | 66 + .../schema/enum_with1_does_not_match_true.py | 66 + .../schema/enum_with_escaped_characters.py | 85 + .../schema/enum_with_false_does_not_match0.py | 71 + .../schema/enum_with_true_does_not_match1.py | 71 + .../components/schema/enums_in_properties.py | 236 + .../components/schema/forbidden_property.py | 94 + .../components/schema/hostname_format.py | 26 + .../schema/integer_type_matches_integers.py | 13 + ...not_raise_error_when_float_division_inf.py | 28 + .../invalid_string_value_for_default.py | 106 + .../components/schema/ipv4_format.py | 26 + .../components/schema/ipv6_format.py | 26 + .../components/schema/json_pointer_format.py | 26 + .../components/schema/maximum_validation.py | 26 + ...aximum_validation_with_unsigned_integer.py | 26 + .../components/schema/maxitems_validation.py | 26 + .../components/schema/maxlength_validation.py | 26 + ...axproperties0_means_the_object_is_empty.py | 26 + .../schema/maxproperties_validation.py | 26 + .../components/schema/minimum_validation.py | 26 + .../minimum_validation_with_signed_integer.py | 26 + .../components/schema/minitems_validation.py | 26 + .../components/schema/minlength_validation.py | 26 + .../schema/minproperties_validation.py | 26 + ...ted_allof_to_check_validation_semantics.py | 42 + ...ted_anyof_to_check_validation_semantics.py | 42 + .../components/schema/nested_items.py | 242 + ...ted_oneof_to_check_validation_semantics.py | 42 + .../openapi_client/components/schema/not.py | 27 + .../schema/not_more_complex_schema.py | 119 + .../schema/nul_characters_in_strings.py | 71 + .../null_type_matches_only_the_null_object.py | 13 + .../schema/number_type_matches_numbers.py | 13 + .../schema/object_properties_validation.py | 114 + .../schema/object_type_matches_objects.py | 13 + .../openapi_client/components/schema/oneof.py | 40 + .../components/schema/oneof_complex_types.py | 174 + .../schema/oneof_with_base_schema.py | 49 + .../schema/oneof_with_empty_schema.py | 32 + .../components/schema/oneof_with_required.py | 191 + .../schema/pattern_is_not_anchored.py | 28 + .../components/schema/pattern_validation.py | 28 + .../properties_with_escaped_characters.py | 91 + ...perty_named_ref_that_is_not_a_reference.py | 76 + .../schema/ref_in_additionalproperties.py | 95 + .../components/schema/ref_in_allof.py | 29 + .../components/schema/ref_in_anyof.py | 29 + .../components/schema/ref_in_items.py | 75 + .../components/schema/ref_in_not.py | 26 + .../components/schema/ref_in_oneof.py | 29 + .../components/schema/ref_in_property.py | 98 + .../schema/required_default_validation.py | 94 + .../components/schema/required_validation.py | 110 + .../schema/required_with_empty_array.py | 94 + .../required_with_escaped_characters.py | 82 + .../schema/simple_enum_validation.py | 90 + .../schema/string_type_matches_strings.py | 13 + ..._do_anything_if_the_property_is_missing.py | 121 + .../schema/uniqueitems_false_validation.py | 26 + .../schema/uniqueitems_validation.py | 26 + .../components/schema/uri_format.py | 26 + .../components/schema/uri_reference_format.py | 26 + .../components/schema/uri_template_format.py | 26 + .../components/schemas/__init__.py | 100 + .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 + .../configurations/schema_configuration.py | 108 + .../python/src/openapi_client/exceptions.py | 132 + .../src/openapi_client/paths/__init__.py | 3 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 + .../src/openapi_client/schemas/__init__.py | 148 + .../src/openapi_client/schemas/format.py | 115 + .../schemas/original_immutabledict.py | 97 + .../src/openapi_client/schemas/schema.py | 729 ++ .../src/openapi_client/schemas/schemas.py | 375 ++ .../src/openapi_client/schemas/validation.py | 1446 ++++ .../src/openapi_client/security_schemes.py | 227 + .../python/src/openapi_client/server.py | 34 + .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 + .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 + .../shared_imports/operation_imports.py | 18 + .../shared_imports/response_imports.py | 25 + .../shared_imports/schema_imports.py | 28 + .../shared_imports/security_scheme_imports.py | 12 + .../shared_imports/server_imports.py | 13 + .../python/test/components/schema/test_not.py | 40 + .../schemas/IfAndElseWithoutThen.md | 200 +- .../schemas/IfAndThenWithoutElse.md | 100 +- ...WhenSerializedKeywordProcessingSequence.md | 200 +- .../components/schemas/IgnoreElseWithoutIf.md | 100 +- .../schemas/IgnoreIfWithoutThenOrElse.md | 100 +- .../NonInterferenceAcrossCombinedSchemas.md | 200 +- ...seNamesAreJavascriptObjectPropertyNames.md | 103 +- ...seNamesAreJavascriptObjectPropertyNames.md | 3 +- .../ValidateAgainstCorrectBranchThenVsElse.md | 200 +- ...nalpropertiesDoesNotLookInApplicators.java | 3 - .../client/components/schemas/Allof.java | 4 - .../schemas/AllofCombinedWithAnyofOneof.java | 1 - .../schemas/AllofWithBaseSchema.java | 2 - .../schemas/AllofWithOneEmptySchema.java | 1 - .../schemas/AllofWithTheFirstEmptySchema.java | 2 - .../schemas/AllofWithTheLastEmptySchema.java | 2 - .../schemas/AllofWithTwoEmptySchemas.java | 1 - .../client/components/schemas/Anyof.java | 1 - .../components/schemas/AnyofComplexTypes.java | 4 - .../schemas/AnyofWithBaseSchema.java | 16 - .../schemas/AnyofWithOneEmptySchema.java | 2 - .../components/schemas/ForbiddenProperty.java | 1 - .../schemas/IfAndElseWithoutThen.java | 104 +- .../schemas/IfAndThenWithoutElse.java | 52 +- ...enSerializedKeywordProcessingSequence.java | 104 +- .../schemas/IgnoreElseWithoutIf.java | 52 +- .../schemas/IgnoreIfWithoutThenOrElse.java | 52 +- ...NestedAllofToCheckValidationSemantics.java | 1 - ...NestedAnyofToCheckValidationSemantics.java | 1 - ...NestedOneofToCheckValidationSemantics.java | 1 - .../NonInterferenceAcrossCombinedSchemas.java | 105 +- .../client/components/schemas/Not.java | 1 - .../schemas/NotMoreComplexSchema.java | 3 - .../client/components/schemas/Oneof.java | 1 - .../components/schemas/OneofComplexTypes.java | 4 - .../schemas/OneofWithBaseSchema.java | 16 - .../schemas/OneofWithEmptySchema.java | 2 - .../components/schemas/OneofWithRequired.java | 10 - ...NamesAreJavascriptObjectPropertyNames.java | 90 +- ...NamesAreJavascriptObjectPropertyNames.java | 46 +- ...alidateAgainstCorrectBranchThenVsElse.java | 104 +- .../python/.openapi-generator/FILES | 5876 ++++++++--------- .../client/3_1_0_unit_test/python/README.md | 20 +- .../apis/tags/additional_properties_api.md | 2 +- .../python/docs/apis/tags/all_of_api.md | 2 +- .../python/docs/apis/tags/any_of_api.md | 2 +- .../python/docs/apis/tags/const_api.md | 2 +- .../python/docs/apis/tags/contains_api.md | 2 +- .../docs/apis/tags/content_type_json_api.md | 2 +- .../docs/apis/tags/dependent_required_api.md | 2 +- .../docs/apis/tags/dependent_schemas_api.md | 2 +- .../python/docs/apis/tags/enum_api.md | 2 +- .../docs/apis/tags/exclusive_maximum_api.md | 2 +- .../docs/apis/tags/exclusive_minimum_api.md | 2 +- .../python/docs/apis/tags/format_api.md | 2 +- .../python/docs/apis/tags/if_then_else_api.md | 2 +- .../python/docs/apis/tags/items_api.md | 2 +- .../python/docs/apis/tags/max_contains_api.md | 2 +- .../python/docs/apis/tags/max_items_api.md | 2 +- .../python/docs/apis/tags/max_length_api.md | 2 +- .../docs/apis/tags/max_properties_api.md | 2 +- .../python/docs/apis/tags/maximum_api.md | 2 +- .../python/docs/apis/tags/min_contains_api.md | 2 +- .../python/docs/apis/tags/min_items_api.md | 2 +- .../python/docs/apis/tags/min_length_api.md | 2 +- .../docs/apis/tags/min_properties_api.md | 2 +- .../python/docs/apis/tags/minimum_api.md | 2 +- .../python/docs/apis/tags/multiple_of_api.md | 2 +- .../python/docs/apis/tags/not_api.md | 21 + .../python/docs/apis/tags/one_of_api.md | 2 +- .../apis/tags/operation_request_body_api.md | 2 +- .../python/docs/apis/tags/path_post_api.md | 2 +- .../python/docs/apis/tags/pattern_api.md | 2 +- .../docs/apis/tags/pattern_properties_api.md | 2 +- .../python/docs/apis/tags/prefix_items_api.md | 2 +- .../python/docs/apis/tags/properties_api.md | 2 +- .../docs/apis/tags/property_names_api.md | 2 +- .../python/docs/apis/tags/ref_api.md | 2 +- .../python/docs/apis/tags/required_api.md | 2 +- ...esponse_content_content_type_schema_api.md | 2 +- .../python/docs/apis/tags/type_api.md | 2 +- .../docs/apis/tags/unevaluated_items_api.md | 2 +- .../apis/tags/unevaluated_properties_api.md | 2 +- .../python/docs/apis/tags/unique_items_api.md | 2 +- .../schema/a_schema_given_for_prefixitems.md | 2 +- ...additional_items_are_allowed_by_default.md | 2 +- ...tionalproperties_are_allowed_by_default.md | 2 +- ...dditionalproperties_can_exist_by_itself.md | 2 +- ...properties_does_not_look_in_applicators.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- .../additionalproperties_with_schema.md | 2 +- .../python/docs/components/schema/allof.md | 2 +- .../schema/allof_combined_with_anyof_oneof.md | 2 +- .../components/schema/allof_simple_types.md | 2 +- .../schema/allof_with_base_schema.md | 2 +- .../schema/allof_with_one_empty_schema.md | 2 +- .../allof_with_the_first_empty_schema.md | 2 +- .../allof_with_the_last_empty_schema.md | 2 +- .../schema/allof_with_two_empty_schemas.md | 2 +- .../python/docs/components/schema/anyof.md | 2 +- .../components/schema/anyof_complex_types.md | 2 +- .../schema/anyof_with_base_schema.md | 2 +- .../schema/anyof_with_one_empty_schema.md | 2 +- .../schema/array_type_matches_arrays.md | 2 +- .../schema/boolean_type_matches_booleans.md | 2 +- .../python/docs/components/schema/by_int.md | 2 +- .../docs/components/schema/by_number.md | 2 +- .../docs/components/schema/by_small_number.md | 2 +- .../schema/const_nul_characters_in_strings.md | 2 +- .../schema/contains_keyword_validation.md | 2 +- .../contains_with_null_instance_elements.md | 2 +- .../docs/components/schema/date_format.md | 2 +- .../components/schema/date_time_format.md | 2 +- ...as_dependencies_with_escaped_characters.md | 2 +- ...endent_subschema_incompatible_with_root.md | 2 +- .../dependent_schemas_single_dependency.md | 2 +- .../docs/components/schema/duration_format.md | 2 +- .../docs/components/schema/email_format.md | 2 +- .../components/schema/empty_dependents.md | 2 +- .../schema/enum_with0_does_not_match_false.md | 2 +- .../schema/enum_with1_does_not_match_true.md | 2 +- .../schema/enum_with_escaped_characters.md | 2 +- .../schema/enum_with_false_does_not_match0.md | 2 +- .../schema/enum_with_true_does_not_match1.md | 2 +- .../components/schema/enums_in_properties.md | 2 +- .../schema/exclusivemaximum_validation.md | 2 +- .../schema/exclusiveminimum_validation.md | 2 +- .../components/schema/float_division_inf.md | 2 +- .../components/schema/forbidden_property.md | 6 +- .../docs/components/schema/hostname_format.md | 2 +- .../components/schema/idn_email_format.md | 2 +- .../components/schema/idn_hostname_format.md | 2 +- .../schema/if_and_else_without_then.md | 2 +- .../schema/if_and_then_without_else.md | 2 +- ..._serialized_keyword_processing_sequence.md | 2 +- .../schema/ignore_else_without_if.md | 2 +- .../schema/ignore_if_without_then_or_else.md | 2 +- .../schema/ignore_then_without_if.md | 2 +- .../schema/integer_type_matches_integers.md | 2 +- .../docs/components/schema/ipv4_format.md | 2 +- .../docs/components/schema/ipv6_format.md | 2 +- .../docs/components/schema/iri_format.md | 2 +- .../components/schema/iri_reference_format.md | 2 +- .../docs/components/schema/items_contains.md | 2 +- ...does_not_look_in_applicators_valid_case.md | 2 +- .../items_with_null_instance_elements.md | 2 +- .../components/schema/json_pointer_format.md | 2 +- ...maxcontains_without_contains_is_ignored.md | 2 +- .../components/schema/maximum_validation.md | 2 +- ...aximum_validation_with_unsigned_integer.md | 2 +- .../components/schema/maxitems_validation.md | 2 +- .../components/schema/maxlength_validation.md | 2 +- ...axproperties0_means_the_object_is_empty.md | 2 +- .../schema/maxproperties_validation.md | 2 +- ...mincontains_without_contains_is_ignored.md | 2 +- .../components/schema/minimum_validation.md | 2 +- .../minimum_validation_with_signed_integer.md | 2 +- .../components/schema/minitems_validation.md | 2 +- .../components/schema/minlength_validation.md | 2 +- .../schema/minproperties_validation.md | 2 +- .../schema/multiple_dependents_required.md | 2 +- ...taneous_patternproperties_are_validated.md | 2 +- ...iple_types_can_be_specified_in_an_array.md | 2 +- ...ted_allof_to_check_validation_semantics.md | 2 +- ...ted_anyof_to_check_validation_semantics.md | 2 +- .../docs/components/schema/nested_items.md | 2 +- ...ted_oneof_to_check_validation_semantics.md | 2 +- ...ascii_pattern_with_additionalproperties.md | 2 +- ...on_interference_across_combined_schemas.md | 2 +- .../python/docs/components/schema/not.md | 28 + .../schema/not_more_complex_schema.md | 6 +- .../components/schema/not_multiple_types.md | 6 +- .../schema/nul_characters_in_strings.md | 2 +- .../null_type_matches_only_the_null_object.md | 2 +- .../schema/number_type_matches_numbers.md | 2 +- .../schema/object_properties_validation.md | 2 +- .../schema/object_type_matches_objects.md | 2 +- .../python/docs/components/schema/oneof.md | 2 +- .../components/schema/oneof_complex_types.md | 2 +- .../schema/oneof_with_base_schema.md | 2 +- .../schema/oneof_with_empty_schema.md | 2 +- .../components/schema/oneof_with_required.md | 2 +- .../schema/pattern_is_not_anchored.md | 2 +- .../components/schema/pattern_validation.md | 2 +- ...s_validates_properties_matching_a_regex.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- ...on_adjusts_the_starting_index_for_items.md | 2 +- ...prefixitems_with_null_instance_elements.md | 2 +- ...erties_additionalproperties_interaction.md | 2 +- ...es_are_javascript_object_property_names.md | 2 +- .../properties_with_escaped_characters.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- ...perty_named_ref_that_is_not_a_reference.md | 2 +- .../schema/propertynames_validation.md | 2 +- .../docs/components/schema/regex_format.md | 2 +- ...hored_by_default_and_are_case_sensitive.md | 2 +- .../schema/relative_json_pointer_format.md | 2 +- .../schema/required_default_validation.md | 2 +- ...es_are_javascript_object_property_names.md | 2 +- .../components/schema/required_validation.md | 2 +- .../schema/required_with_empty_array.md | 2 +- .../required_with_escaped_characters.md | 2 +- .../schema/simple_enum_validation.md | 2 +- .../components/schema/single_dependency.md | 2 +- .../schema/small_multiple_of_large_integer.md | 2 +- .../schema/string_type_matches_strings.md | 2 +- .../docs/components/schema/time_format.md | 2 +- .../schema/type_array_object_or_null.md | 2 +- .../components/schema/type_array_or_object.md | 2 +- .../schema/type_as_array_with_one_item.md | 2 +- .../schema/unevaluateditems_as_schema.md | 2 +- ...ems_depends_on_multiple_nested_contains.md | 2 +- .../schema/unevaluateditems_with_items.md | 2 +- ...luateditems_with_null_instance_elements.md | 2 +- ...roperties_not_affected_by_propertynames.md | 2 +- .../schema/unevaluatedproperties_schema.md | 2 +- ...ties_with_adjacent_additionalproperties.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- .../schema/uniqueitems_false_validation.md | 2 +- ...niqueitems_false_with_an_array_of_items.md | 2 +- .../schema/uniqueitems_validation.md | 2 +- .../uniqueitems_with_an_array_of_items.md | 2 +- .../docs/components/schema/uri_format.md | 2 +- .../components/schema/uri_reference_format.md | 2 +- .../components/schema/uri_template_format.md | 2 +- .../docs/components/schema/uuid_format.md | 2 +- ...ate_against_correct_branch_then_vs_else.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 16 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 16 +- .../post.md | 16 +- .../post.md | 20 +- .../content/application_json/schema.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 20 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 20 +- .../post.md | 20 +- .../post.md | 22 +- .../content/application_json/schema.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../3_1_0_unit_test/python/pyproject.toml | 2 +- .../python/src/openapi_client/__init__.py | 26 + .../python/src/openapi_client/api_client.py | 1402 ++++ .../python/src/openapi_client/api_response.py | 28 + .../src/openapi_client/apis/__init__.py | 3 + .../src/openapi_client/apis/path_to_api.py | 872 +++ .../src/openapi_client/apis/paths/__init__.py | 3 + ...hema_given_for_prefixitems_request_body.py | 16 + ...ems_are_allowed_by_default_request_body.py | 16 + ...ies_are_allowed_by_default_request_body.py | 16 + ...erties_can_exist_by_itself_request_body.py | 16 + ...es_not_look_in_applicators_request_body.py | 16 + ...valued_instance_properties_request_body.py | 16 + ...onalproperties_with_schema_request_body.py | 16 + ..._combined_with_anyof_oneof_request_body.py | 16 + .../request_body_post_allof_request_body.py | 16 + ...dy_post_allof_simple_types_request_body.py | 16 + ...ost_allof_with_base_schema_request_body.py | 16 + ...llof_with_one_empty_schema_request_body.py | 16 + ...ith_the_first_empty_schema_request_body.py | 16 + ...with_the_last_empty_schema_request_body.py | 16 + ...lof_with_two_empty_schemas_request_body.py | 16 + ...y_post_anyof_complex_types_request_body.py | 16 + .../request_body_post_anyof_request_body.py | 16 + ...ost_anyof_with_base_schema_request_body.py | 16 + ...nyof_with_one_empty_schema_request_body.py | 16 + ..._array_type_matches_arrays_request_body.py | 16 + ...lean_type_matches_booleans_request_body.py | 16 + .../request_body_post_by_int_request_body.py | 16 + ...equest_body_post_by_number_request_body.py | 16 + ..._body_post_by_small_number_request_body.py | 16 + ..._nul_characters_in_strings_request_body.py | 16 + ...ontains_keyword_validation_request_body.py | 16 + ...ith_null_instance_elements_request_body.py | 16 + ...uest_body_post_date_format_request_body.py | 16 + ...body_post_date_time_format_request_body.py | 16 + ...es_with_escaped_characters_request_body.py | 16 + ...ema_incompatible_with_root_request_body.py | 16 + ..._schemas_single_dependency_request_body.py | 16 + ..._body_post_duration_format_request_body.py | 16 + ...est_body_post_email_format_request_body.py | 16 + ...body_post_empty_dependents_request_body.py | 16 + ...with0_does_not_match_false_request_body.py | 16 + ..._with1_does_not_match_true_request_body.py | 16 + ...um_with_escaped_characters_request_body.py | 16 + ...with_false_does_not_match0_request_body.py | 16 + ..._with_true_does_not_match1_request_body.py | 16 + ...y_post_enums_in_properties_request_body.py | 16 + ...xclusivemaximum_validation_request_body.py | 16 + ...xclusiveminimum_validation_request_body.py | 16 + ...dy_post_float_division_inf_request_body.py | 16 + ...dy_post_forbidden_property_request_body.py | 16 + ..._body_post_hostname_format_request_body.py | 16 + ...body_post_idn_email_format_request_body.py | 16 + ...y_post_idn_hostname_format_request_body.py | 16 + ...t_if_and_else_without_then_request_body.py | 16 + ...t_if_and_then_without_else_request_body.py | 16 + ...eyword_processing_sequence_request_body.py | 16 + ...ost_ignore_else_without_if_request_body.py | 16 + ...re_if_without_then_or_else_request_body.py | 16 + ...ost_ignore_then_without_if_request_body.py | 16 + ...eger_type_matches_integers_request_body.py | 16 + ...uest_body_post_ipv4_format_request_body.py | 16 + ...uest_body_post_ipv6_format_request_body.py | 16 + ...quest_body_post_iri_format_request_body.py | 16 + ..._post_iri_reference_format_request_body.py | 16 + ...t_body_post_items_contains_request_body.py | 16 + ..._in_applicators_valid_case_request_body.py | 16 + ...ith_null_instance_elements_request_body.py | 16 + ...y_post_json_pointer_format_request_body.py | 16 + ...ithout_contains_is_ignored_request_body.py | 16 + ...dy_post_maximum_validation_request_body.py | 16 + ...tion_with_unsigned_integer_request_body.py | 16 + ...y_post_maxitems_validation_request_body.py | 16 + ..._post_maxlength_validation_request_body.py | 16 + ..._means_the_object_is_empty_request_body.py | 16 + ...t_maxproperties_validation_request_body.py | 16 + ...ithout_contains_is_ignored_request_body.py | 16 + ...dy_post_minimum_validation_request_body.py | 16 + ...dation_with_signed_integer_request_body.py | 16 + ...y_post_minitems_validation_request_body.py | 16 + ..._post_minlength_validation_request_body.py | 16 + ...t_minproperties_validation_request_body.py | 16 + ...ltiple_dependents_required_request_body.py | 16 + ...rnproperties_are_validated_request_body.py | 16 + ...n_be_specified_in_an_array_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ...est_body_post_nested_items_request_body.py | 16 + ...check_validation_semantics_request_body.py | 16 + ..._with_additionalproperties_request_body.py | 16 + ...ce_across_combined_schemas_request_body.py | 16 + ...st_not_more_complex_schema_request_body.py | 16 + ...dy_post_not_multiple_types_request_body.py | 16 + .../request_body_post_not_request_body.py | 16 + ..._nul_characters_in_strings_request_body.py | 16 + ...tches_only_the_null_object_request_body.py | 16 + ...umber_type_matches_numbers_request_body.py | 16 + ...ject_properties_validation_request_body.py | 16 + ...bject_type_matches_objects_request_body.py | 16 + ...y_post_oneof_complex_types_request_body.py | 16 + .../request_body_post_oneof_request_body.py | 16 + ...ost_oneof_with_base_schema_request_body.py | 16 + ...st_oneof_with_empty_schema_request_body.py | 16 + ...y_post_oneof_with_required_request_body.py | 16 + ...st_pattern_is_not_anchored_request_body.py | 16 + ...dy_post_pattern_validation_request_body.py | 16 + ...roperties_matching_a_regex_request_body.py | 16 + ...valued_instance_properties_request_body.py | 16 + ...e_starting_index_for_items_request_body.py | 16 + ...ith_null_instance_elements_request_body.py | 16 + ...onalproperties_interaction_request_body.py | 16 + ...ript_object_property_names_request_body.py | 16 + ...es_with_escaped_characters_request_body.py | 16 + ...valued_instance_properties_request_body.py | 16 + ...ef_that_is_not_a_reference_request_body.py | 16 + ...t_propertynames_validation_request_body.py | 16 + ...est_body_post_regex_format_request_body.py | 16 + ...ult_and_are_case_sensitive_request_body.py | 16 + ...lative_json_pointer_format_request_body.py | 16 + ...equired_default_validation_request_body.py | 16 + ...ript_object_property_names_request_body.py | 16 + ...y_post_required_validation_request_body.py | 16 + ..._required_with_empty_array_request_body.py | 16 + ...ed_with_escaped_characters_request_body.py | 16 + ...ost_simple_enum_validation_request_body.py | 16 + ...ody_post_single_dependency_request_body.py | 16 + ..._multiple_of_large_integer_request_body.py | 16 + ...tring_type_matches_strings_request_body.py | 16 + ...uest_body_post_time_format_request_body.py | 16 + ..._type_array_object_or_null_request_body.py | 16 + ..._post_type_array_or_object_request_body.py | 16 + ...ype_as_array_with_one_item_request_body.py | 16 + ...unevaluateditems_as_schema_request_body.py | 16 + ...n_multiple_nested_contains_request_body.py | 16 + ...nevaluateditems_with_items_request_body.py | 16 + ...ith_null_instance_elements_request_body.py | 16 + ..._affected_by_propertynames_request_body.py | 16 + ...evaluatedproperties_schema_request_body.py | 16 + ...acent_additionalproperties_request_body.py | 16 + ...valued_instance_properties_request_body.py | 16 + ...iqueitems_false_validation_request_body.py | 16 + ...lse_with_an_array_of_items_request_body.py | 16 + ...ost_uniqueitems_validation_request_body.py | 16 + ...ems_with_an_array_of_items_request_body.py | 16 + ...quest_body_post_uri_format_request_body.py | 16 + ..._post_uri_reference_format_request_body.py | 16 + ...y_post_uri_template_format_request_body.py | 16 + ...uest_body_post_uuid_format_request_body.py | 16 + ...orrect_branch_then_vs_else_request_body.py | 16 + ...ixitems_response_body_for_content_types.py | 16 + ...default_response_body_for_content_types.py | 16 + ...default_response_body_for_content_types.py | 16 + ..._itself_response_body_for_content_types.py | 16 + ...icators_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...f_oneof_response_body_for_content_types.py | 16 + ...t_allof_response_body_for_content_types.py | 16 + ...e_types_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...schemas_response_body_for_content_types.py | 16 + ...x_types_response_body_for_content_types.py | 16 + ...t_anyof_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._arrays_response_body_for_content_types.py | 16 + ...ooleans_response_body_for_content_types.py | 16 + ..._by_int_response_body_for_content_types.py | 16 + ..._number_response_body_for_content_types.py | 16 + ..._number_response_body_for_content_types.py | 16 + ...strings_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...lements_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ...th_root_response_body_for_content_types.py | 16 + ...endency_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...endents_response_body_for_content_types.py | 16 + ...h_false_response_body_for_content_types.py | 16 + ...ch_true_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ..._match0_response_body_for_content_types.py | 16 + ..._match1_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...ion_inf_response_body_for_content_types.py | 16 + ...roperty_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...ut_then_response_body_for_content_types.py | 16 + ...ut_else_response_body_for_content_types.py | 16 + ...equence_response_body_for_content_types.py | 16 + ...hout_if_response_body_for_content_types.py | 16 + ...or_else_response_body_for_content_types.py | 16 + ...hout_if_response_body_for_content_types.py | 16 + ...ntegers_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...ontains_response_body_for_content_types.py | 16 + ...id_case_response_body_for_content_types.py | 16 + ...lements_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...ignored_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...integer_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...s_empty_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...ignored_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...integer_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...equired_response_body_for_content_types.py | 16 + ...lidated_response_body_for_content_types.py | 16 + ...n_array_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ...d_items_response_body_for_content_types.py | 16 + ...mantics_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...schemas_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...e_types_response_body_for_content_types.py | 16 + ...ost_not_response_body_for_content_types.py | 16 + ...strings_response_body_for_content_types.py | 16 + ..._object_response_body_for_content_types.py | 16 + ...numbers_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...objects_response_body_for_content_types.py | 16 + ...x_types_response_body_for_content_types.py | 16 + ...t_oneof_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...equired_response_body_for_content_types.py | 16 + ...nchored_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...a_regex_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...r_items_response_body_for_content_types.py | 16 + ...lements_response_body_for_content_types.py | 16 + ...raction_response_body_for_content_types.py | 16 + ...y_names_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...ference_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...nsitive_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...y_names_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...y_array_response_body_for_content_types.py | 16 + ...racters_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...endency_response_body_for_content_types.py | 16 + ...integer_response_body_for_content_types.py | 16 + ...strings_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...or_null_response_body_for_content_types.py | 16 + ..._object_response_body_for_content_types.py | 16 + ...ne_item_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...ontains_response_body_for_content_types.py | 16 + ...h_items_response_body_for_content_types.py | 16 + ...lements_response_body_for_content_types.py | 16 + ...tynames_response_body_for_content_types.py | 16 + ..._schema_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...perties_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...f_items_response_body_for_content_types.py | 16 + ...idation_response_body_for_content_types.py | 16 + ...f_items_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ..._format_response_body_for_content_types.py | 16 + ...vs_else_response_body_for_content_types.py | 16 + .../src/openapi_client/apis/tag_to_api.py | 137 + .../src/openapi_client/apis/tags/__init__.py | 3 + .../apis/tags/additional_properties_api.py | 43 + .../openapi_client/apis/tags/all_of_api.py | 55 + .../openapi_client/apis/tags/any_of_api.py | 39 + .../src/openapi_client/apis/tags/const_api.py | 23 + .../openapi_client/apis/tags/contains_api.py | 31 + .../apis/tags/content_type_json_api.py | 591 ++ .../apis/tags/dependent_required_api.py | 31 + .../apis/tags/dependent_schemas_api.py | 31 + .../src/openapi_client/apis/tags/enum_api.py | 51 + .../apis/tags/exclusive_maximum_api.py | 23 + .../apis/tags/exclusive_minimum_api.py | 23 + .../openapi_client/apis/tags/format_api.py | 95 + .../apis/tags/if_then_else_api.py | 51 + .../src/openapi_client/apis/tags/items_api.py | 35 + .../apis/tags/max_contains_api.py | 23 + .../openapi_client/apis/tags/max_items_api.py | 23 + .../apis/tags/max_length_api.py | 23 + .../apis/tags/max_properties_api.py | 27 + .../openapi_client/apis/tags/maximum_api.py | 27 + .../apis/tags/min_contains_api.py | 23 + .../openapi_client/apis/tags/min_items_api.py | 23 + .../apis/tags/min_length_api.py | 23 + .../apis/tags/min_properties_api.py | 23 + .../openapi_client/apis/tags/minimum_api.py | 27 + .../apis/tags/multiple_of_api.py | 39 + .../src/openapi_client/apis/tags/not_api.py | 35 + .../openapi_client/apis/tags/one_of_api.py | 43 + .../apis/tags/operation_request_body_api.py | 305 + .../openapi_client/apis/tags/path_post_api.py | 591 ++ .../openapi_client/apis/tags/pattern_api.py | 27 + .../apis/tags/pattern_properties_api.py | 35 + .../apis/tags/prefix_items_api.py | 31 + .../apis/tags/properties_api.py | 39 + .../apis/tags/property_names_api.py | 23 + .../src/openapi_client/apis/tags/ref_api.py | 23 + .../openapi_client/apis/tags/required_api.py | 39 + ...esponse_content_content_type_schema_api.py | 305 + .../src/openapi_client/apis/tags/type_api.py | 63 + .../apis/tags/unevaluated_items_api.py | 35 + .../apis/tags/unevaluated_properties_api.py | 35 + .../apis/tags/unique_items_api.py | 35 + .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 + .../schema/a_schema_given_for_prefixitems.py | 67 + ...additional_items_are_allowed_by_default.py | 62 + ...tionalproperties_are_allowed_by_default.py | 110 + ...dditionalproperties_can_exist_by_itself.py | 88 + ...properties_does_not_look_in_applicators.py | 155 + ...es_with_null_valued_instance_properties.py | 88 + .../additionalproperties_with_schema.py | 145 + .../openapi_client/components/schema/allof.py | 174 + .../schema/allof_combined_with_anyof_oneof.py | 64 + .../components/schema/allof_simple_types.py | 48 + .../schema/allof_with_base_schema.py | 238 + .../schema/allof_with_one_empty_schema.py | 30 + .../allof_with_the_first_empty_schema.py | 32 + .../allof_with_the_last_empty_schema.py | 32 + .../schema/allof_with_two_empty_schemas.py | 32 + .../openapi_client/components/schema/anyof.py | 40 + .../components/schema/anyof_complex_types.py | 174 + .../schema/anyof_with_base_schema.py | 49 + .../schema/anyof_with_one_empty_schema.py | 32 + .../schema/array_type_matches_arrays.py | 13 + .../schema/boolean_type_matches_booleans.py | 13 + .../components/schema/by_int.py | 26 + .../components/schema/by_number.py | 26 + .../components/schema/by_small_number.py | 26 + .../schema/const_nul_characters_in_strings.py | 38 + .../schema/contains_keyword_validation.py | 35 + .../contains_with_null_instance_elements.py | 27 + .../components/schema/date_format.py | 26 + .../components/schema/date_time_format.py | 26 + ...as_dependencies_with_escaped_characters.py | 97 + ...endent_subschema_incompatible_with_root.py | 197 + .../dependent_schemas_single_dependency.py | 129 + .../components/schema/duration_format.py | 26 + .../components/schema/email_format.py | 26 + .../components/schema/empty_dependents.py | 30 + .../schema/enum_with0_does_not_match_false.py | 66 + .../schema/enum_with1_does_not_match_true.py | 66 + .../schema/enum_with_escaped_characters.py | 85 + .../schema/enum_with_false_does_not_match0.py | 71 + .../schema/enum_with_true_does_not_match1.py | 71 + .../components/schema/enums_in_properties.py | 236 + .../schema/exclusivemaximum_validation.py | 26 + .../schema/exclusiveminimum_validation.py | 26 + .../components/schema/float_division_inf.py | 28 + .../components/schema/forbidden_property.py | 103 + .../components/schema/hostname_format.py | 26 + .../components/schema/idn_email_format.py | 26 + .../components/schema/idn_hostname_format.py | 26 + .../schema/if_and_else_without_then.py | 45 + .../schema/if_and_then_without_else.py | 45 + ..._serialized_keyword_processing_sequence.py | 79 + .../schema/ignore_else_without_if.py | 47 + .../schema/ignore_if_without_then_or_else.py | 47 + .../schema/ignore_then_without_if.py | 47 + .../schema/integer_type_matches_integers.py | 13 + .../components/schema/ipv4_format.py | 26 + .../components/schema/ipv6_format.py | 26 + .../components/schema/iri_format.py | 26 + .../components/schema/iri_reference_format.py | 26 + .../components/schema/items_contains.py | 92 + ...does_not_look_in_applicators_valid_case.py | 82 + .../items_with_null_instance_elements.py | 68 + .../components/schema/json_pointer_format.py | 26 + ...maxcontains_without_contains_is_ignored.py | 25 + .../components/schema/maximum_validation.py | 26 + ...aximum_validation_with_unsigned_integer.py | 26 + .../components/schema/maxitems_validation.py | 26 + .../components/schema/maxlength_validation.py | 26 + ...axproperties0_means_the_object_is_empty.py | 26 + .../schema/maxproperties_validation.py | 26 + ...mincontains_without_contains_is_ignored.py | 25 + .../components/schema/minimum_validation.py | 26 + .../minimum_validation_with_signed_integer.py | 26 + .../components/schema/minitems_validation.py | 26 + .../components/schema/minlength_validation.py | 26 + .../schema/minproperties_validation.py | 26 + .../schema/multiple_dependents_required.py | 32 + ...taneous_patternproperties_are_validated.py | 48 + ...iple_types_can_be_specified_in_an_array.py | 54 + ...ted_allof_to_check_validation_semantics.py | 42 + ...ted_anyof_to_check_validation_semantics.py | 42 + .../components/schema/nested_items.py | 242 + ...ted_oneof_to_check_validation_semantics.py | 42 + ...ascii_pattern_with_additionalproperties.py | 85 + ...on_interference_across_combined_schemas.py | 85 + .../openapi_client/components/schema/not.py | 27 + .../schema/not_more_complex_schema.py | 119 + .../components/schema/not_multiple_types.py | 63 + .../schema/nul_characters_in_strings.py | 71 + .../null_type_matches_only_the_null_object.py | 13 + .../schema/number_type_matches_numbers.py | 13 + .../schema/object_properties_validation.py | 114 + .../schema/object_type_matches_objects.py | 13 + .../openapi_client/components/schema/oneof.py | 40 + .../components/schema/oneof_complex_types.py | 174 + .../schema/oneof_with_base_schema.py | 49 + .../schema/oneof_with_empty_schema.py | 32 + .../components/schema/oneof_with_required.py | 191 + .../schema/pattern_is_not_anchored.py | 28 + .../components/schema/pattern_validation.py | 28 + ...s_validates_properties_matching_a_regex.py | 36 + ...es_with_null_valued_instance_properties.py | 36 + ...on_adjusts_the_starting_index_for_items.py | 83 + ...prefixitems_with_null_instance_elements.py | 62 + ...erties_additionalproperties_interaction.py | 194 + ...es_are_javascript_object_property_names.py | 213 + .../properties_with_escaped_characters.py | 91 + ...es_with_null_valued_instance_properties.py | 96 + ...perty_named_ref_that_is_not_a_reference.py | 76 + .../schema/propertynames_validation.py | 36 + .../components/schema/regex_format.py | 26 + ...hored_by_default_and_are_case_sensitive.py | 40 + .../schema/relative_json_pointer_format.py | 26 + .../schema/required_default_validation.py | 94 + ...es_are_javascript_object_property_names.py | 103 + .../components/schema/required_validation.py | 110 + .../schema/required_with_empty_array.py | 94 + .../required_with_escaped_characters.py | 82 + .../schema/simple_enum_validation.py | 90 + .../components/schema/single_dependency.py | 31 + .../schema/small_multiple_of_large_integer.py | 28 + .../schema/string_type_matches_strings.py | 13 + .../components/schema/time_format.py | 26 + .../schema/type_array_object_or_null.py | 64 + .../components/schema/type_array_or_object.py | 56 + .../schema/type_as_array_with_one_item.py | 13 + .../schema/unevaluateditems_as_schema.py | 27 + ...ems_depends_on_multiple_nested_contains.py | 76 + .../schema/unevaluateditems_with_items.py | 76 + ...luateditems_with_null_instance_elements.py | 27 + ...roperties_not_affected_by_propertynames.py | 38 + .../schema/unevaluatedproperties_schema.py | 47 + ...ties_with_adjacent_additionalproperties.py | 120 + ...es_with_null_valued_instance_properties.py | 27 + .../schema/uniqueitems_false_validation.py | 26 + ...niqueitems_false_with_an_array_of_items.py | 68 + .../schema/uniqueitems_validation.py | 26 + .../uniqueitems_with_an_array_of_items.py | 68 + .../components/schema/uri_format.py | 26 + .../components/schema/uri_reference_format.py | 26 + .../components/schema/uri_template_format.py | 26 + .../components/schema/uuid_format.py | 26 + ...ate_against_correct_branch_then_vs_else.py | 55 + .../components/schemas/__init__.py | 156 + .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 + .../configurations/schema_configuration.py | 108 + .../python/src/openapi_client/exceptions.py | 132 + .../src/openapi_client/paths/__init__.py | 3 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 132 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 156 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 153 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 126 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 135 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 35 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 116 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 + .../src/openapi_client/schemas/__init__.py | 148 + .../src/openapi_client/schemas/format.py | 115 + .../schemas/original_immutabledict.py | 97 + .../src/openapi_client/schemas/schema.py | 729 ++ .../src/openapi_client/schemas/schemas.py | 375 ++ .../src/openapi_client/schemas/validation.py | 1446 ++++ .../src/openapi_client/security_schemes.py | 227 + .../python/src/openapi_client/server.py | 34 + .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 + .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 + .../shared_imports/operation_imports.py | 18 + .../shared_imports/response_imports.py | 25 + .../shared_imports/schema_imports.py | 28 + .../shared_imports/security_scheme_imports.py | 12 + .../shared_imports/server_imports.py | 13 + .../python/test/components/schema/test_not.py | 40 + .../python/.openapi-generator/FILES | 98 +- .../python/README.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../components/schema/addition_operator.md | 2 +- .../python/docs/components/schema/operator.md | 2 +- .../components/schema/subtraction_operator.md | 2 +- .../python/docs/paths/operators/post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../python/pyproject.toml | 2 +- .../python/src/openapi_client/__init__.py | 26 + .../python/src/openapi_client/api_client.py | 1402 ++++ .../python/src/openapi_client/api_response.py | 28 + .../src/openapi_client/apis/__init__.py | 3 + .../src/openapi_client/apis/path_to_api.py | 17 + .../src/openapi_client/apis/paths/__init__.py | 3 + .../openapi_client/apis/paths/operators.py | 16 + .../src/openapi_client/apis/tag_to_api.py | 17 + .../src/openapi_client/apis/tags/__init__.py | 3 + .../openapi_client/apis/tags/default_api.py | 21 + .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 + .../components/schema/addition_operator.py | 158 + .../components/schema/operator.py | 45 + .../components/schema/subtraction_operator.py | 158 + .../components/schemas/__init__.py | 16 + .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 + .../configurations/schema_configuration.py | 108 + .../python/src/openapi_client/exceptions.py | 132 + .../src/openapi_client/paths/__init__.py | 3 + .../paths/operators/__init__.py | 5 + .../paths/operators/post/__init__.py | 0 .../paths/operators/post/operation.py | 139 + .../operators/post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../operators/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 + .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 + .../src/openapi_client/schemas/__init__.py | 148 + .../src/openapi_client/schemas/format.py | 115 + .../schemas/original_immutabledict.py | 97 + .../src/openapi_client/schemas/schema.py | 729 ++ .../src/openapi_client/schemas/schemas.py | 375 ++ .../src/openapi_client/schemas/validation.py | 1537 +++++ .../src/openapi_client/security_schemes.py | 227 + .../python/src/openapi_client/server.py | 34 + .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 + .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 + .../shared_imports/operation_imports.py | 18 + .../shared_imports/response_imports.py | 25 + .../shared_imports/schema_imports.py | 28 + .../shared_imports/security_scheme_imports.py | 12 + .../shared_imports/server_imports.py | 13 + .../security/python/.openapi-generator/FILES | 144 +- .../security/python/README.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../security_scheme_api_key.md | 2 +- .../security_scheme_bearer_test.md | 2 +- .../security_scheme_http_basic_test.md | 2 +- .../path_with_no_explicit_security/get.md | 12 +- .../path_with_one_explicit_security/get.md | 14 +- .../paths/path_with_security_from_root/get.md | 20 +- .../path_with_two_explicit_security/get.md | 16 +- .../security/python/docs/servers/server_0.md | 2 +- .../security/python/pyproject.toml | 2 +- .../python/src/openapi_client/__init__.py | 26 + .../python/src/openapi_client/api_client.py | 1425 ++++ .../python/src/openapi_client/api_response.py | 28 + .../src/openapi_client/apis/__init__.py | 3 + .../src/openapi_client/apis/path_to_api.py | 26 + .../src/openapi_client/apis/paths/__init__.py | 3 + .../paths/path_with_no_explicit_security.py | 16 + .../paths/path_with_one_explicit_security.py | 16 + .../paths/path_with_security_from_root.py | 16 + .../paths/path_with_two_explicit_security.py | 16 + .../src/openapi_client/apis/tag_to_api.py | 17 + .../src/openapi_client/apis/tags/__init__.py | 3 + .../openapi_client/apis/tags/default_api.py | 27 + .../components/schemas/__init__.py | 13 + .../components/security_schemes/__init__.py | 0 .../security_scheme_api_key.py | 18 + .../security_scheme_bearer_test.py | 17 + .../security_scheme_http_basic_test.py | 16 + .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 347 + .../configurations/schema_configuration.py | 108 + .../python/src/openapi_client/exceptions.py | 132 + .../src/openapi_client/paths/__init__.py | 3 + .../__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 108 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 122 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 + .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../path_with_security_from_root/__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 130 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 + .../__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 126 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 + .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 + .../src/openapi_client/schemas/__init__.py | 148 + .../src/openapi_client/schemas/format.py | 115 + .../schemas/original_immutabledict.py | 97 + .../src/openapi_client/schemas/schema.py | 729 ++ .../src/openapi_client/schemas/schemas.py | 375 ++ .../src/openapi_client/schemas/validation.py | 1446 ++++ .../src/openapi_client/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../security/security_requirement_object_2.py | 13 + .../security/security_requirement_object_3.py | 15 + .../src/openapi_client/security_schemes.py | 230 + .../python/src/openapi_client/server.py | 34 + .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 + .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 + .../shared_imports/operation_imports.py | 18 + .../shared_imports/response_imports.py | 25 + .../shared_imports/schema_imports.py | 28 + .../shared_imports/security_scheme_imports.py | 12 + .../shared_imports/server_imports.py | 13 + .../petstore/java/.openapi-generator/FILES | 23 +- samples/client/petstore/java/README.md | 14 +- .../java/docs/apis/paths/Fakerefsboolean.md | 2 +- .../java/docs/apis/paths/Fakerefsstring.md | 2 +- .../petstore/java/docs/apis/tags/Fake.md | 20 +- .../responses/SuccessWithJsonApiResponse.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../components/schemas/AnyTypeAndFormat.md | 472 +- .../docs/components/schemas/ApiResponse.md | 254 + .../java/docs/components/schemas/Boolean.md | 52 + .../docs/components/schemas/ClassModel.md | 26 +- .../docs/components/schemas/FormatTest.md | 330 +- ...dPropertiesAndAdditionalPropertiesClass.md | 67 +- .../java/docs/components/schemas/Number.md | 52 + .../schemas/ObjectModelWithRefProps.md | 2 +- .../java/docs/components/schemas/Return.md | 257 + .../components/schemas/Schema200Response.md | 30 +- .../java/docs/components/schemas/String.md | 52 + .../ApplicationxwwwformurlencodedSchema.md | 181 +- ...magewithrequiredfilePostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../fakerefsboolean/FakerefsbooleanPost.md | 12 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../fakerefsstring/FakerefsstringPost.md | 12 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../FakeuploadfilePostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../FakeuploadfilesPostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 6 +- .../client/apis/tags/Fake.java | 4 +- .../responses/SuccessWithJsonApiResponse.java | 2 +- .../HeadersWithNoBodyHeadersSchema.java | 1 - ...ssInlineContentAndHeaderHeadersSchema.java | 1 - ...ccessWithJsonApiResponseHeadersSchema.java | 1 - .../ApplicationjsonSchema.java | 6 +- .../schemas/AdditionalPropertiesSchema.java | 12 - .../components/schemas/AnyTypeAndFormat.java | 394 +- .../components/schemas/AnyTypeNotString.java | 1 - .../components/schemas/ApiResponse.java | 289 + .../client/components/schemas/AppleReq.java | 1 - .../client/components/schemas/BananaReq.java | 1 - .../client/components/schemas/Boolean.java | 19 + .../client/components/schemas/Cat.java | 3 - .../client/components/schemas/ChildCat.java | 3 - .../client/components/schemas/ClassModel.java | 20 +- .../schemas/ComplexQuadrilateral.java | 5 - ...posedAnyOfDifferentTypesNoValidations.java | 13 - .../components/schemas/ComposedBool.java | 1 - .../components/schemas/ComposedNone.java | 1 - .../components/schemas/ComposedNumber.java | 1 - .../components/schemas/ComposedObject.java | 1 - .../schemas/ComposedOneOfDifferentTypes.java | 4 - .../components/schemas/ComposedString.java | 1 - .../client/components/schemas/Dog.java | 3 - .../schemas/EquilateralTriangle.java | 5 - .../client/components/schemas/FormatTest.java | 368 +- .../client/components/schemas/FruitReq.java | 1 - .../components/schemas/IsoscelesTriangle.java | 5 - .../schemas/JSONPatchRequestMoveCopy.java | 1 - .../schemas/JSONPatchRequestRemove.java | 1 - ...ropertiesAndAdditionalPropertiesClass.java | 76 +- .../client/components/schemas/Money.java | 1 - .../schemas/MultiPropertiesSchema.java | 1 - .../components/schemas/MyObjectDto.java | 1 - .../schemas/NoAdditionalProperties.java | 1 - .../components/schemas/NullableShape.java | 1 - .../client/components/schemas/Number.java | 19 + .../schemas/ObjectModelWithRefProps.java | 4 +- ...hAllOfWithReqTestPropFromUnsetAddProp.java | 3 - .../schemas/ObjectWithOnlyOptionalProps.java | 1 - .../schemas/PaginatedResultMyObjectDto.java | 1 - .../client/components/schemas/Return.java | 417 ++ .../components/schemas/ScaleneTriangle.java | 5 - .../components/schemas/Schema200Response.java | 32 +- .../components/schemas/ShapeOrNull.java | 1 - .../schemas/SimpleQuadrilateral.java | 5 - .../client/components/schemas/String.java | 19 + .../client/components/schemas/User.java | 1 - ...mmonparamsubdirDeleteHeaderParameters.java | 1 - ...CommonparamsubdirDeletePathParameters.java | 1 - .../CommonparamsubdirGetPathParameters.java | 1 - .../CommonparamsubdirGetQueryParameters.java | 1 - ...CommonparamsubdirPostHeaderParameters.java | 1 - .../CommonparamsubdirPostPathParameters.java | 1 - .../delete/FakeDeleteHeaderParameters.java | 1 - .../delete/FakeDeleteQueryParameters.java | 1 - .../fake/get/FakeGetHeaderParameters.java | 1 - .../fake/get/FakeGetQueryParameters.java | 1 - .../ApplicationxwwwformurlencodedSchema.java | 90 +- ...bodywithqueryparamsPutQueryParameters.java | 1 - ...casesensitiveparamsPutQueryParameters.java | 1 - ...akedeletecoffeeidDeletePathParameters.java | 1 - ...einlinecompositionPostQueryParameters.java | 1 - .../get/FakeobjinqueryGetQueryParameters.java | 1 - ...isions1ababselfabPostCookieParameters.java | 1 - ...isions1ababselfabPostHeaderParameters.java | 1 - ...llisions1ababselfabPostPathParameters.java | 1 - ...lisions1ababselfabPostQueryParameters.java | 1 - ...agewithrequiredfilePostPathParameters.java | 1 - ...gewithrequiredfilePostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- ...withjsoncontenttypeGetQueryParameters.java | 1 - .../FakerefobjinqueryGetQueryParameters.java | 1 - .../fakerefsboolean/FakerefsbooleanPost.java | 4 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 6 +- .../fakerefsstring/FakerefsstringPost.java | 4 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 6 +- ...etestqueryparamtersPutQueryParameters.java | 1 - .../FakeuploadfilePostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- .../FakeuploadfilesPostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 12 +- .../server1/FooGetServer1Variables.java | 1 - .../PetfindbystatusGetQueryParameters.java | 1 - .../PetfindbystatusServer1Variables.java | 1 - .../get/PetfindbytagsGetQueryParameters.java | 1 - .../PetpetidDeleteHeaderParameters.java | 1 - .../delete/PetpetidDeletePathParameters.java | 1 - .../get/PetpetidGetPathParameters.java | 1 - .../post/PetpetidPostPathParameters.java | 1 - ...PetpetiduploadimagePostPathParameters.java | 1 - ...StoreorderorderidDeletePathParameters.java | 1 - .../StoreorderorderidGetPathParameters.java | 1 - .../get/UserloginGetQueryParameters.java | 1 - ...rloginGetCode200ResponseHeadersSchema.java | 1 - .../UserusernameDeletePathParameters.java | 1 - .../get/UserusernameGetPathParameters.java | 1 - .../put/UserusernamePutPathParameters.java | 1 - .../rootserver0/RootServer0Variables.java | 1 - .../rootserver1/RootServer1Variables.java | 1 - .../components/schemas/ApiResponseTest.java | 18 + .../components/schemas/BooleanTest.java | 18 + .../client/components/schemas/NumberTest.java | 18 + .../client/components/schemas/ReturnTest.java | 18 + .../client/components/schemas/StringTest.java | 18 + .../petstore/python/.openapi-generator/FILES | 2392 +++---- samples/client/petstore/python/README.md | 4 +- .../python/docs/apis/tags/another_fake_api.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../python/docs/apis/tags/fake_api.md | 2 +- .../apis/tags/fake_classname_tags123_api.md | 2 +- .../petstore/python/docs/apis/tags/pet_api.md | 2 +- .../python/docs/apis/tags/store_api.md | 2 +- .../python/docs/apis/tags/user_api.md | 2 +- .../header_int32_json_content_type_header.md | 2 +- .../headers/header_number_header.md | 2 +- .../header_ref_content_schema_header.md | 2 +- .../headers/header_ref_schema_header.md | 2 +- .../headers/header_ref_string_header.md | 2 +- .../headers/header_string_header.md | 2 +- ...onent_ref_schema_string_with_validation.md | 2 +- .../parameters/parameter_path_user_name.md | 2 +- .../parameter_ref_path_user_name.md | 2 +- ...meter_ref_schema_string_with_validation.md | 2 +- .../request_bodies/request_body_client.md | 2 +- .../request_bodies/request_body_pet.md | 2 +- .../request_body_ref_user_array.md | 2 +- .../request_bodies/request_body_user_array.md | 2 +- .../response_headers_with_no_body.md | 2 +- .../response_ref_success_description_only.md | 2 +- ...ef_successful_xml_and_json_array_of_pet.md | 2 +- .../response_success_description_only.md | 2 +- ...ponse_success_inline_content_and_header.md | 2 +- ...response_success_with_json_api_response.md | 2 +- ...se_successful_xml_and_json_array_of_pet.md | 2 +- .../docs/components/schema/_200_response.md | 5 +- .../schema/abstract_step_message.md | 2 +- .../schema/additional_properties_class.md | 2 +- .../schema/additional_properties_schema.md | 2 +- ...ditional_properties_with_array_of_enums.md | 2 +- .../python/docs/components/schema/address.md | 2 +- .../python/docs/components/schema/animal.md | 2 +- .../docs/components/schema/animal_farm.md | 2 +- .../components/schema/any_type_and_format.md | 6 +- .../components/schema/any_type_not_string.md | 6 +- .../docs/components/schema/api_response.md | 2 +- .../python/docs/components/schema/apple.md | 2 +- .../docs/components/schema/apple_req.md | 2 +- .../schema/array_holding_any_type.md | 2 +- .../schema/array_of_array_of_number_only.md | 2 +- .../docs/components/schema/array_of_enums.md | 2 +- .../components/schema/array_of_number_only.md | 2 +- .../docs/components/schema/array_test.md | 2 +- .../schema/array_with_validations_in_items.md | 2 +- .../python/docs/components/schema/banana.md | 2 +- .../docs/components/schema/banana_req.md | 2 +- .../python/docs/components/schema/bar.md | 2 +- .../docs/components/schema/basque_pig.md | 2 +- .../python/docs/components/schema/boolean.md | 2 +- .../docs/components/schema/boolean_enum.md | 2 +- .../docs/components/schema/capitalization.md | 2 +- .../python/docs/components/schema/cat.md | 2 +- .../python/docs/components/schema/category.md | 2 +- .../docs/components/schema/child_cat.md | 2 +- .../docs/components/schema/class_model.md | 2 +- .../python/docs/components/schema/client.md | 2 +- .../schema/complex_quadrilateral.md | 2 +- ...d_any_of_different_types_no_validations.md | 2 +- .../docs/components/schema/composed_array.md | 2 +- .../docs/components/schema/composed_bool.md | 2 +- .../docs/components/schema/composed_none.md | 2 +- .../docs/components/schema/composed_number.md | 2 +- .../docs/components/schema/composed_object.md | 2 +- .../schema/composed_one_of_different_types.md | 2 +- .../docs/components/schema/composed_string.md | 2 +- .../python/docs/components/schema/currency.md | 2 +- .../docs/components/schema/danish_pig.md | 2 +- .../docs/components/schema/date_time_test.md | 2 +- .../schema/date_time_with_validations.md | 2 +- .../schema/date_with_validations.md | 2 +- .../docs/components/schema/decimal_payload.md | 2 +- .../python/docs/components/schema/dog.md | 2 +- .../python/docs/components/schema/drawing.md | 2 +- .../docs/components/schema/enum_arrays.md | 2 +- .../docs/components/schema/enum_class.md | 2 +- .../docs/components/schema/enum_test.md | 2 +- .../components/schema/equilateral_triangle.md | 2 +- .../python/docs/components/schema/file.md | 2 +- .../schema/file_schema_test_class.md | 2 +- .../python/docs/components/schema/foo.md | 2 +- .../docs/components/schema/format_test.md | 5 +- .../docs/components/schema/from_schema.md | 2 +- .../python/docs/components/schema/fruit.md | 2 +- .../docs/components/schema/fruit_req.md | 2 +- .../python/docs/components/schema/gm_fruit.md | 2 +- .../components/schema/grandparent_animal.md | 2 +- .../components/schema/has_only_read_only.md | 2 +- .../components/schema/health_check_result.md | 2 +- .../docs/components/schema/integer_enum.md | 2 +- .../components/schema/integer_enum_big.md | 2 +- .../schema/integer_enum_one_value.md | 2 +- .../schema/integer_enum_with_default_value.md | 2 +- .../docs/components/schema/integer_max10.md | 2 +- .../docs/components/schema/integer_min15.md | 2 +- .../components/schema/isosceles_triangle.md | 2 +- .../python/docs/components/schema/items.md | 2 +- .../docs/components/schema/items_schema.md | 2 +- .../components/schema/json_patch_request.md | 2 +- .../json_patch_request_add_replace_test.md | 2 +- .../schema/json_patch_request_move_copy.md | 5 +- .../schema/json_patch_request_remove.md | 2 +- .../python/docs/components/schema/mammal.md | 2 +- .../python/docs/components/schema/map_test.md | 2 +- ...perties_and_additional_properties_class.md | 2 +- .../python/docs/components/schema/money.md | 2 +- .../schema/multi_properties_schema.md | 2 +- .../docs/components/schema/my_object_dto.md | 2 +- .../python/docs/components/schema/name.md | 5 +- .../schema/no_additional_properties.md | 2 +- .../docs/components/schema/nullable_class.md | 2 +- .../docs/components/schema/nullable_shape.md | 2 +- .../docs/components/schema/nullable_string.md | 2 +- .../python/docs/components/schema/number.md | 2 +- .../docs/components/schema/number_only.md | 2 +- .../schema/number_with_exclusive_min_max.md | 2 +- .../schema/number_with_validations.md | 2 +- .../schema/obj_with_required_props.md | 2 +- .../schema/obj_with_required_props_base.md | 2 +- .../components/schema/object_interface.md | 2 +- ...ject_model_with_arg_and_args_properties.md | 2 +- .../schema/object_model_with_ref_props.md | 2 +- ..._with_req_test_prop_from_unset_add_prop.md | 2 +- .../object_with_colliding_properties.md | 2 +- .../schema/object_with_decimal_properties.md | 2 +- .../object_with_difficultly_named_props.md | 2 +- ...object_with_inline_composition_property.md | 2 +- ...ect_with_invalid_named_refed_properties.md | 10 +- .../object_with_non_intersecting_values.md | 2 +- .../schema/object_with_only_optional_props.md | 2 +- .../schema/object_with_optional_test_prop.md | 2 +- .../schema/object_with_validations.md | 2 +- .../python/docs/components/schema/order.md | 2 +- .../schema/paginated_result_my_object_dto.md | 2 +- .../docs/components/schema/parent_pet.md | 2 +- .../python/docs/components/schema/pet.md | 2 +- .../python/docs/components/schema/pig.md | 2 +- .../python/docs/components/schema/player.md | 2 +- .../docs/components/schema/public_key.md | 2 +- .../docs/components/schema/quadrilateral.md | 2 +- .../schema/quadrilateral_interface.md | 2 +- .../docs/components/schema/read_only_first.md | 2 +- .../python/docs/components/schema/ref_pet.md | 2 +- .../req_props_from_explicit_add_props.md | 2 +- .../schema/req_props_from_true_add_props.md | 2 +- .../schema/req_props_from_unset_add_props.md | 2 +- .../python/docs/components/schema/return.md | 46 + .../components/schema/scalene_triangle.md | 2 +- .../schema/self_referencing_array_model.md | 2 +- .../schema/self_referencing_object_model.md | 2 +- .../python/docs/components/schema/shape.md | 2 +- .../docs/components/schema/shape_or_null.md | 2 +- .../components/schema/simple_quadrilateral.md | 2 +- .../docs/components/schema/some_object.md | 2 +- .../components/schema/special_model_name.md | 2 +- .../python/docs/components/schema/string.md | 2 +- .../components/schema/string_boolean_map.md | 2 +- .../docs/components/schema/string_enum.md | 2 +- .../schema/string_enum_with_default_value.md | 2 +- .../schema/string_with_validation.md | 2 +- .../python/docs/components/schema/tag.md | 2 +- .../python/docs/components/schema/triangle.md | 2 +- .../components/schema/triangle_interface.md | 2 +- .../python/docs/components/schema/user.md | 6 +- .../docs/components/schema/uuid_string.md | 2 +- .../python/docs/components/schema/whale.md | 2 +- .../python/docs/components/schema/zebra.md | 2 +- .../security_scheme_api_key.md | 2 +- .../security_scheme_api_key_query.md | 2 +- .../security_scheme_bearer_test.md | 2 +- .../security_scheme_http_basic_test.md | 2 +- .../security_scheme_http_signature_test.md | 4 +- .../security_scheme_open_id_connect_test.md | 2 +- .../security_scheme_petstore_auth.md | 2 +- .../docs/paths/another_fake_dummy/patch.md | 12 +- .../docs/paths/common_param_sub_dir/delete.md | 16 +- .../docs/paths/common_param_sub_dir/get.md | 16 +- .../docs/paths/common_param_sub_dir/post.md | 16 +- .../petstore/python/docs/paths/fake/delete.md | 18 +- .../petstore/python/docs/paths/fake/get.md | 14 +- .../petstore/python/docs/paths/fake/patch.md | 12 +- .../petstore/python/docs/paths/fake/post.md | 19 +- .../schema.md | 3 +- .../get.md | 12 +- .../paths/fake_body_with_file_schema/put.md | 12 +- .../paths/fake_body_with_query_params/put.md | 14 +- .../paths/fake_case_sensitive_params/put.md | 14 +- .../docs/paths/fake_classname_test/patch.md | 14 +- .../paths/fake_delete_coffee_id/delete.md | 14 +- .../python/docs/paths/fake_health/get.md | 12 +- .../fake_inline_additional_properties/post.md | 12 +- .../paths/fake_inline_composition/post.md | 14 +- .../docs/paths/fake_json_form_data/get.md | 12 +- .../docs/paths/fake_json_patch/patch.md | 12 +- .../docs/paths/fake_json_with_charset/post.md | 12 +- .../post.md | 12 +- .../fake_multiple_response_bodies/get.md | 12 +- .../paths/fake_multiple_securities/get.md | 18 +- .../docs/paths/fake_obj_in_query/get.md | 14 +- .../post.md | 32 +- .../docs/paths/fake_pem_content_type/get.md | 12 +- .../post.md | 18 +- .../get.md | 14 +- .../python/docs/paths/fake_redirection/get.md | 12 +- .../docs/paths/fake_ref_obj_in_query/get.md | 14 +- .../paths/fake_refs_array_of_enums/post.md | 12 +- .../docs/paths/fake_refs_arraymodel/post.md | 12 +- .../docs/paths/fake_refs_boolean/post.md | 12 +- .../post.md | 12 +- .../python/docs/paths/fake_refs_enum/post.md | 12 +- .../docs/paths/fake_refs_mammal/post.md | 12 +- .../docs/paths/fake_refs_number/post.md | 12 +- .../post.md | 12 +- .../docs/paths/fake_refs_string/post.md | 12 +- .../paths/fake_response_without_schema/get.md | 12 +- .../paths/fake_test_query_paramters/put.md | 14 +- .../paths/fake_upload_download_file/post.md | 12 +- .../docs/paths/fake_upload_file/post.md | 12 +- .../docs/paths/fake_upload_files/post.md | 12 +- .../paths/fake_wild_card_responses/get.md | 12 +- .../petstore/python/docs/paths/foo/get.md | 12 +- .../petstore/python/docs/paths/pet/post.md | 36 +- .../petstore/python/docs/paths/pet/put.md | 34 +- .../docs/paths/pet_find_by_status/get.md | 38 +- .../python/docs/paths/pet_find_by_tags/get.md | 36 +- .../python/docs/paths/pet_pet_id/delete.md | 20 +- .../python/docs/paths/pet_pet_id/get.md | 16 +- .../python/docs/paths/pet_pet_id/post.md | 20 +- .../paths/pet_pet_id_upload_image/post.md | 18 +- .../petstore/python/docs/paths/solidus/get.md | 12 +- .../python/docs/paths/store_inventory/get.md | 14 +- .../python/docs/paths/store_order/post.md | 12 +- .../docs/paths/store_order_order_id/delete.md | 14 +- .../docs/paths/store_order_order_id/get.md | 14 +- .../petstore/python/docs/paths/user/post.md | 12 +- .../docs/paths/user_create_with_array/post.md | 12 +- .../docs/paths/user_create_with_list/post.md | 12 +- .../python/docs/paths/user_login/get.md | 14 +- .../python/docs/paths/user_logout/get.md | 12 +- .../python/docs/paths/user_username/delete.md | 14 +- .../python/docs/paths/user_username/get.md | 14 +- .../python/docs/paths/user_username/put.md | 14 +- .../petstore/python/docs/servers/server_0.md | 2 +- .../petstore/python/docs/servers/server_1.md | 2 +- .../petstore/python/docs/servers/server_2.md | 2 +- samples/client/petstore/python/pyproject.toml | 2 +- .../python/src/openapi_client/__init__.py | 29 + .../python/src/openapi_client/api_client.py | 1429 ++++ .../python/src/openapi_client/api_response.py | 28 + .../src/openapi_client/apis/__init__.py | 3 + .../src/openapi_client/apis/path_to_api.py | 182 + .../src/openapi_client/apis/paths/__init__.py | 3 + .../apis/paths/another_fake_dummy.py | 16 + .../apis/paths/common_param_sub_dir.py | 20 + .../src/openapi_client/apis/paths/fake.py | 22 + ...ditional_properties_with_array_of_enums.py | 16 + .../apis/paths/fake_body_with_file_schema.py | 16 + .../apis/paths/fake_body_with_query_params.py | 16 + .../apis/paths/fake_case_sensitive_params.py | 16 + .../apis/paths/fake_classname_test.py | 16 + .../apis/paths/fake_delete_coffee_id.py | 16 + .../openapi_client/apis/paths/fake_health.py | 16 + .../fake_inline_additional_properties.py | 16 + .../apis/paths/fake_inline_composition.py | 16 + .../apis/paths/fake_json_form_data.py | 16 + .../apis/paths/fake_json_patch.py | 16 + .../apis/paths/fake_json_with_charset.py | 16 + ...ake_multiple_request_body_content_types.py | 16 + .../paths/fake_multiple_response_bodies.py | 16 + .../apis/paths/fake_multiple_securities.py | 16 + .../apis/paths/fake_obj_in_query.py | 16 + ...fake_parameter_collisions1_abab_self_ab.py | 16 + .../apis/paths/fake_pem_content_type.py | 16 + ..._pet_id_upload_image_with_required_file.py | 16 + ...fake_query_param_with_json_content_type.py | 16 + .../apis/paths/fake_redirection.py | 16 + .../apis/paths/fake_ref_obj_in_query.py | 16 + .../apis/paths/fake_refs_array_of_enums.py | 16 + .../apis/paths/fake_refs_arraymodel.py | 16 + .../apis/paths/fake_refs_boolean.py | 16 + ...composed_one_of_number_with_validations.py | 16 + .../apis/paths/fake_refs_enum.py | 16 + .../apis/paths/fake_refs_mammal.py | 16 + .../apis/paths/fake_refs_number.py | 16 + .../fake_refs_object_model_with_ref_props.py | 16 + .../apis/paths/fake_refs_string.py | 16 + .../paths/fake_response_without_schema.py | 16 + .../apis/paths/fake_test_query_paramters.py | 16 + .../apis/paths/fake_upload_download_file.py | 16 + .../apis/paths/fake_upload_file.py | 16 + .../apis/paths/fake_upload_files.py | 16 + .../apis/paths/fake_wild_card_responses.py | 16 + .../src/openapi_client/apis/paths/foo.py | 16 + .../src/openapi_client/apis/paths/pet.py | 18 + .../apis/paths/pet_find_by_status.py | 16 + .../apis/paths/pet_find_by_tags.py | 16 + .../openapi_client/apis/paths/pet_pet_id.py | 20 + .../apis/paths/pet_pet_id_upload_image.py | 16 + .../src/openapi_client/apis/paths/solidus.py | 16 + .../apis/paths/store_inventory.py | 16 + .../openapi_client/apis/paths/store_order.py | 16 + .../apis/paths/store_order_order_id.py | 18 + .../src/openapi_client/apis/paths/user.py | 16 + .../apis/paths/user_create_with_array.py | 16 + .../apis/paths/user_create_with_list.py | 16 + .../openapi_client/apis/paths/user_login.py | 16 + .../openapi_client/apis/paths/user_logout.py | 16 + .../apis/paths/user_username.py | 20 + .../src/openapi_client/apis/tag_to_api.py | 35 + .../src/openapi_client/apis/tags/__init__.py | 3 + .../apis/tags/another_fake_api.py | 21 + .../openapi_client/apis/tags/default_api.py | 21 + .../src/openapi_client/apis/tags/fake_api.py | 105 + .../apis/tags/fake_classname_tags123_api.py | 21 + .../src/openapi_client/apis/tags/pet_api.py | 37 + .../src/openapi_client/apis/tags/store_api.py | 27 + .../src/openapi_client/apis/tags/user_api.py | 35 + .../src/openapi_client/components/__init__.py | 0 .../components/headers/__init__.py | 0 .../__init__.py | 23 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../headers/header_number_header/__init__.py | 17 + .../headers/header_number_header/schema.py | 13 + .../__init__.py | 23 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../header_ref_schema_header/__init__.py | 18 + .../header_ref_schema_header/schema.py | 13 + .../header_ref_string_header/__init__.py | 12 + .../headers/header_string_header/__init__.py | 18 + .../headers/header_string_header/schema.py | 13 + .../components/parameters/__init__.py | 0 .../__init__.py | 24 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../parameter_path_user_name/__init__.py | 19 + .../parameter_path_user_name/schema.py | 13 + .../parameter_ref_path_user_name/__init__.py | 12 + .../__init__.py | 19 + .../schema.py | 13 + .../components/request_bodies/__init__.py | 0 .../request_body_client/__init__.py | 23 + .../request_body_client/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../request_body_pet/__init__.py | 29 + .../request_body_pet/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../request_body_ref_user_array/__init__.py | 12 + .../request_body_user_array/__init__.py | 23 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 70 + .../components/responses/__init__.py | 0 .../response_headers_with_no_body/__init__.py | 30 + .../header_parameters.py | 105 + .../headers/__init__.py | 0 .../headers/header_location/__init__.py | 17 + .../headers/header_location/schema.py | 13 + .../__init__.py | 13 + .../__init__.py | 13 + .../__init__.py | 22 + .../__init__.py | 38 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 83 + .../header_parameters.py | 105 + .../headers/__init__.py | 0 .../headers/header_some_header/__init__.py | 17 + .../headers/header_some_header/schema.py | 13 + .../__init__.py | 46 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../header_parameters.py | 157 + .../headers/__init__.py | 0 .../headers/header_int32/__init__.py | 12 + .../headers/header_number_header/__init__.py | 12 + .../__init__.py | 12 + .../header_ref_schema_header/__init__.py | 12 + .../headers/header_string_header/__init__.py | 12 + .../__init__.py | 40 + .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 70 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 70 + .../components/schema/_200_response.py | 116 + .../components/schema/__init__.py | 5 + .../schema/abstract_step_message.py | 138 + .../schema/additional_properties_class.py | 650 ++ .../schema/additional_properties_schema.py | 280 + ...ditional_properties_with_array_of_enums.py | 157 + .../components/schema/address.py | 88 + .../components/schema/animal.py | 146 + .../components/schema/animal_farm.py | 75 + .../components/schema/any_type_and_format.py | 295 + .../components/schema/any_type_not_string.py | 27 + .../components/schema/api_response.py | 146 + .../openapi_client/components/schema/apple.py | 166 + .../components/schema/apple_req.py | 141 + .../schema/array_holding_any_type.py | 74 + .../schema/array_of_array_of_number_only.py | 223 + .../components/schema/array_of_enums.py | 92 + .../components/schema/array_of_number_only.py | 167 + .../components/schema/array_test.py | 418 ++ .../schema/array_with_validations_in_items.py | 79 + .../components/schema/banana.py | 106 + .../components/schema/banana_req.py | 147 + .../openapi_client/components/schema/bar.py | 27 + .../components/schema/basque_pig.py | 158 + .../components/schema/boolean.py | 13 + .../components/schema/boolean_enum.py | 71 + .../components/schema/capitalization.py | 200 + .../openapi_client/components/schema/cat.py | 123 + .../components/schema/category.py | 135 + .../components/schema/child_cat.py | 123 + .../components/schema/class_model.py | 98 + .../components/schema/client.py | 110 + .../schema/complex_quadrilateral.py | 178 + ...d_any_of_different_types_no_validations.py | 116 + .../components/schema/composed_array.py | 74 + .../components/schema/composed_bool.py | 31 + .../components/schema/composed_none.py | 32 + .../components/schema/composed_number.py | 32 + .../components/schema/composed_object.py | 41 + .../schema/composed_one_of_different_types.py | 132 + .../components/schema/composed_string.py | 31 + .../components/schema/currency.py | 85 + .../components/schema/danish_pig.py | 158 + .../components/schema/date_time_test.py | 28 + .../schema/date_time_with_validations.py | 30 + .../schema/date_with_validations.py | 30 + .../components/schema/decimal_payload.py | 13 + .../openapi_client/components/schema/dog.py | 123 + .../components/schema/drawing.py | 259 + .../components/schema/enum_arrays.py | 322 + .../components/schema/enum_class.py | 128 + .../components/schema/enum_test.py | 563 ++ .../components/schema/equilateral_triangle.py | 178 + .../openapi_client/components/schema/file.py | 112 + .../schema/file_schema_test_class.py | 186 + .../openapi_client/components/schema/foo.py | 111 + .../components/schema/format_test.py | 632 ++ .../components/schema/from_schema.py | 128 + .../openapi_client/components/schema/fruit.py | 101 + .../components/schema/fruit_req.py | 32 + .../components/schema/gm_fruit.py | 101 + .../components/schema/grandparent_animal.py | 114 + .../components/schema/has_only_read_only.py | 128 + .../components/schema/health_check_result.py | 154 + .../components/schema/integer_enum.py | 100 + .../components/schema/integer_enum_big.py | 100 + .../schema/integer_enum_one_value.py | 72 + .../schema/integer_enum_with_default_value.py | 100 + .../components/schema/integer_max10.py | 28 + .../components/schema/integer_min15.py | 28 + .../components/schema/isosceles_triangle.py | 178 + .../openapi_client/components/schema/items.py | 76 + .../components/schema/items_schema.py | 146 + .../components/schema/json_patch_request.py | 87 + .../json_patch_request_add_replace_test.py | 224 + .../schema/json_patch_request_move_copy.py | 199 + .../schema/json_patch_request_remove.py | 172 + .../components/schema/mammal.py | 44 + .../components/schema/map_test.py | 528 ++ ...perties_and_additional_properties_class.py | 226 + .../openapi_client/components/schema/money.py | 125 + .../schema/multi_properties_schema.py | 222 + .../components/schema/my_object_dto.py | 113 + .../openapi_client/components/schema/name.py | 132 + .../schema/no_additional_properties.py | 132 + .../components/schema/nullable_class.py | 1412 ++++ .../components/schema/nullable_shape.py | 34 + .../components/schema/nullable_string.py | 53 + .../components/schema/number.py | 13 + .../components/schema/number_only.py | 111 + .../schema/number_with_exclusive_min_max.py | 29 + .../schema/number_with_validations.py | 29 + .../schema/obj_with_required_props.py | 107 + .../schema/obj_with_required_props_base.py | 103 + .../components/schema/object_interface.py | 13 + ...ject_model_with_arg_and_args_properties.py | 116 + .../schema/object_model_with_ref_props.py | 150 + ..._with_req_test_prop_from_unset_add_prop.py | 137 + .../object_with_colliding_properties.py | 132 + .../schema/object_with_decimal_properties.py | 148 + .../object_with_difficultly_named_props.py | 102 + ...object_with_inline_composition_property.py | 129 + ...ect_with_invalid_named_refed_properties.py | 111 + .../object_with_non_intersecting_values.py | 131 + .../schema/object_with_only_optional_props.py | 256 + .../schema/object_with_optional_test_prop.py | 110 + .../schema/object_with_validations.py | 37 + .../openapi_client/components/schema/order.py | 286 + .../schema/paginated_result_my_object_dto.py | 184 + .../components/schema/parent_pet.py | 49 + .../openapi_client/components/schema/pet.py | 392 ++ .../openapi_client/components/schema/pig.py | 41 + .../components/schema/player.py | 130 + .../components/schema/public_key.py | 112 + .../components/schema/quadrilateral.py | 41 + .../schema/quadrilateral_interface.py | 157 + .../components/schema/read_only_first.py | 128 + .../components/schema/ref_pet.py | 13 + .../req_props_from_explicit_add_props.py | 109 + .../schema/req_props_from_true_add_props.py | 105 + .../schema/req_props_from_unset_add_props.py | 97 + .../components/schema/return.py | 98 + .../components/schema/scalene_triangle.py | 178 + .../schema/self_referencing_array_model.py | 73 + .../schema/self_referencing_object_model.py | 132 + .../openapi_client/components/schema/shape.py | 41 + .../components/schema/shape_or_null.py | 45 + .../components/schema/simple_quadrilateral.py | 178 + .../components/schema/some_object.py | 29 + .../components/schema/special_model_name.py | 112 + .../components/schema/string.py | 13 + .../components/schema/string_boolean_map.py | 88 + .../components/schema/string_enum.py | 139 + .../schema/string_enum_with_default_value.py | 100 + .../schema/string_with_validation.py | 27 + .../openapi_client/components/schema/tag.py | 128 + .../components/schema/triangle.py | 44 + .../components/schema/triangle_interface.py | 157 + .../openapi_client/components/schema/user.py | 375 ++ .../components/schema/uuid_string.py | 28 + .../openapi_client/components/schema/whale.py | 199 + .../openapi_client/components/schema/zebra.py | 274 + .../components/schemas/__init__.py | 154 + .../components/security_schemes/__init__.py | 0 .../security_scheme_api_key.py | 18 + .../security_scheme_api_key_query.py | 18 + .../security_scheme_bearer_test.py | 17 + .../security_scheme_http_basic_test.py | 16 + .../security_scheme_http_signature_test.py | 16 + .../security_scheme_open_id_connect_test.py | 17 + .../security_scheme_petstore_auth.py | 25 + .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 407 ++ .../configurations/schema_configuration.py | 108 + .../python/src/openapi_client/exceptions.py | 132 + .../src/openapi_client/paths/__init__.py | 3 + .../paths/another_fake_dummy/__init__.py | 5 + .../another_fake_dummy/patch/__init__.py | 0 .../another_fake_dummy/patch/operation.py | 143 + .../patch/request_body/__init__.py | 12 + .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/common_param_sub_dir/__init__.py | 5 + .../common_param_sub_dir/delete/__init__.py | 0 .../delete/header_parameters.py | 105 + .../common_param_sub_dir/delete/operation.py | 166 + .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 18 + .../delete/parameters/parameter_0/schema.py | 13 + .../delete/parameters/parameter_1/__init__.py | 19 + .../delete/parameters/parameter_1/schema.py | 80 + .../delete/path_parameters.py | 103 + .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 + .../common_param_sub_dir/get/__init__.py | 0 .../common_param_sub_dir/get/operation.py | 161 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 13 + .../get/path_parameters.py | 103 + .../get/query_parameters.py | 105 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../parameters/__init__.py | 0 .../parameters/parameter_0/__init__.py | 19 + .../parameters/parameter_0/schema.py | 80 + .../common_param_sub_dir/post/__init__.py | 0 .../post/header_parameters.py | 105 + .../common_param_sub_dir/post/operation.py | 164 + .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 18 + .../post/parameters/parameter_0/schema.py | 13 + .../post/path_parameters.py | 103 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 + .../src/openapi_client/paths/fake/__init__.py | 5 + .../paths/fake/delete/__init__.py | 0 .../paths/fake/delete/header_parameters.py | 146 + .../paths/fake/delete/operation.py | 186 + .../paths/fake/delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 20 + .../delete/parameters/parameter_0/schema.py | 13 + .../delete/parameters/parameter_1/__init__.py | 19 + .../delete/parameters/parameter_1/schema.py | 80 + .../delete/parameters/parameter_2/__init__.py | 20 + .../delete/parameters/parameter_2/schema.py | 13 + .../delete/parameters/parameter_3/__init__.py | 19 + .../delete/parameters/parameter_3/schema.py | 13 + .../delete/parameters/parameter_4/__init__.py | 18 + .../delete/parameters/parameter_4/schema.py | 80 + .../delete/parameters/parameter_5/__init__.py | 19 + .../delete/parameters/parameter_5/schema.py | 13 + .../paths/fake/delete/query_parameters.py | 167 + .../paths/fake/delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 + .../paths/fake/delete/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../openapi_client/paths/fake/get/__init__.py | 0 .../paths/fake/get/header_parameters.py | 139 + .../paths/fake/get/operation.py | 239 + .../paths/fake/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 18 + .../fake/get/parameters/parameter_0/schema.py | 137 + .../get/parameters/parameter_1/__init__.py | 18 + .../fake/get/parameters/parameter_1/schema.py | 95 + .../get/parameters/parameter_2/__init__.py | 19 + .../fake/get/parameters/parameter_2/schema.py | 137 + .../get/parameters/parameter_3/__init__.py | 19 + .../fake/get/parameters/parameter_3/schema.py | 95 + .../get/parameters/parameter_4/__init__.py | 19 + .../fake/get/parameters/parameter_4/schema.py | 81 + .../get/parameters/parameter_5/__init__.py | 19 + .../fake/get/parameters/parameter_5/schema.py | 53 + .../paths/fake/get/query_parameters.py | 187 + .../paths/fake/get/request_body/__init__.py | 22 + .../fake/get/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 334 + .../paths/fake/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../get/responses/response_404/__init__.py | 31 + .../response_404/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake/patch/__init__.py | 0 .../paths/fake/patch/operation.py | 143 + .../paths/fake/patch/request_body/__init__.py | 12 + .../paths/fake/patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake/post/__init__.py | 0 .../paths/fake/post/operation.py | 175 + .../paths/fake/post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 434 ++ .../paths/fake/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 + .../post/responses/response_404/__init__.py | 22 + .../paths/fake/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 146 + .../get/request_body/__init__.py | 22 + .../get/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_body_with_file_schema/__init__.py | 5 + .../put/__init__.py | 0 .../put/operation.py | 135 + .../put/request_body/__init__.py | 23 + .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 + .../fake_body_with_query_params/__init__.py | 5 + .../put/__init__.py | 0 .../put/operation.py | 162 + .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 + .../put/parameters/parameter_0/schema.py | 13 + .../put/query_parameters.py | 97 + .../put/request_body/__init__.py | 23 + .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 + .../fake_case_sensitive_params/__init__.py | 5 + .../put/__init__.py | 0 .../put/operation.py | 140 + .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 + .../put/parameters/parameter_0/schema.py | 13 + .../put/parameters/parameter_1/__init__.py | 20 + .../put/parameters/parameter_1/schema.py | 13 + .../put/parameters/parameter_2/__init__.py | 20 + .../put/parameters/parameter_2/schema.py | 13 + .../put/query_parameters.py | 128 + .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 + .../paths/fake_classname_test/__init__.py | 5 + .../fake_classname_test/patch/__init__.py | 0 .../fake_classname_test/patch/operation.py | 157 + .../patch/request_body/__init__.py | 12 + .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../patch/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../paths/fake_delete_coffee_id/__init__.py | 5 + .../fake_delete_coffee_id/delete/__init__.py | 0 .../fake_delete_coffee_id/delete/operation.py | 141 + .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 19 + .../delete/parameters/parameter_0/schema.py | 13 + .../delete/path_parameters.py | 97 + .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 + .../responses/response_default/__init__.py | 22 + .../paths/fake_health/__init__.py | 5 + .../paths/fake_health/get/__init__.py | 0 .../paths/fake_health/get/operation.py | 117 + .../fake_health/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 136 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 83 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 + .../paths/fake_inline_composition/__init__.py | 5 + .../fake_inline_composition/post/__init__.py | 0 .../fake_inline_composition/post/operation.py | 236 + .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 + .../post/parameters/parameter_0/schema.py | 34 + .../post/parameters/parameter_1/__init__.py | 19 + .../post/parameters/parameter_1/schema.py | 124 + .../post/query_parameters.py | 135 + .../post/request_body/__init__.py | 28 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 34 + .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 124 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 40 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 34 + .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 124 + .../paths/fake_json_form_data/__init__.py | 5 + .../paths/fake_json_form_data/get/__init__.py | 0 .../fake_json_form_data/get/operation.py | 139 + .../get/request_body/__init__.py | 22 + .../get/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 111 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../paths/fake_json_patch/__init__.py | 5 + .../paths/fake_json_patch/patch/__init__.py | 0 .../paths/fake_json_patch/patch/operation.py | 139 + .../patch/request_body/__init__.py | 22 + .../patch/request_body/content/__init__.py | 0 .../application_json_patchjson/__init__.py | 0 .../application_json_patchjson/schema.py | 13 + .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 13 + .../paths/fake_json_with_charset/__init__.py | 5 + .../fake_json_with_charset/post/__init__.py | 0 .../fake_json_with_charset/post/operation.py | 146 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../application_json_charsetutf8/__init__.py | 0 .../application_json_charsetutf8/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../application_json_charsetutf8/__init__.py | 0 .../application_json_charsetutf8/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 190 + .../post/request_body/__init__.py | 28 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 105 + .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 105 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_multiple_response_bodies/__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 127 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_202/__init__.py | 31 + .../response_202/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_multiple_securities/__init__.py | 5 + .../fake_multiple_securities/get/__init__.py | 0 .../fake_multiple_securities/get/operation.py | 137 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 13 + .../security/security_requirement_object_1.py | 15 + .../security/security_requirement_object_2.py | 14 + .../paths/fake_obj_in_query/__init__.py | 5 + .../paths/fake_obj_in_query/get/__init__.py | 0 .../paths/fake_obj_in_query/get/operation.py | 139 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 105 + .../fake_obj_in_query/get/query_parameters.py | 109 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/cookie_parameters.py | 154 + .../post/header_parameters.py | 135 + .../post/operation.py | 287 + .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 + .../post/parameters/parameter_0/schema.py | 13 + .../post/parameters/parameter_1/__init__.py | 19 + .../post/parameters/parameter_1/schema.py | 13 + .../post/parameters/parameter_10/__init__.py | 19 + .../post/parameters/parameter_10/schema.py | 13 + .../post/parameters/parameter_11/__init__.py | 19 + .../post/parameters/parameter_11/schema.py | 13 + .../post/parameters/parameter_12/__init__.py | 19 + .../post/parameters/parameter_12/schema.py | 13 + .../post/parameters/parameter_13/__init__.py | 19 + .../post/parameters/parameter_13/schema.py | 13 + .../post/parameters/parameter_14/__init__.py | 19 + .../post/parameters/parameter_14/schema.py | 13 + .../post/parameters/parameter_15/__init__.py | 19 + .../post/parameters/parameter_15/schema.py | 13 + .../post/parameters/parameter_16/__init__.py | 19 + .../post/parameters/parameter_16/schema.py | 13 + .../post/parameters/parameter_17/__init__.py | 19 + .../post/parameters/parameter_17/schema.py | 13 + .../post/parameters/parameter_18/__init__.py | 19 + .../post/parameters/parameter_18/schema.py | 13 + .../post/parameters/parameter_2/__init__.py | 19 + .../post/parameters/parameter_2/schema.py | 13 + .../post/parameters/parameter_3/__init__.py | 19 + .../post/parameters/parameter_3/schema.py | 13 + .../post/parameters/parameter_4/__init__.py | 19 + .../post/parameters/parameter_4/schema.py | 13 + .../post/parameters/parameter_5/__init__.py | 18 + .../post/parameters/parameter_5/schema.py | 13 + .../post/parameters/parameter_6/__init__.py | 18 + .../post/parameters/parameter_6/schema.py | 13 + .../post/parameters/parameter_7/__init__.py | 18 + .../post/parameters/parameter_7/schema.py | 13 + .../post/parameters/parameter_8/__init__.py | 18 + .../post/parameters/parameter_8/schema.py | 13 + .../post/parameters/parameter_9/__init__.py | 19 + .../post/parameters/parameter_9/schema.py | 13 + .../post/path_parameters.py | 138 + .../post/query_parameters.py | 154 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_pem_content_type/__init__.py | 5 + .../fake_pem_content_type/get/__init__.py | 0 .../fake_pem_content_type/get/operation.py | 143 + .../get/request_body/__init__.py | 22 + .../get/request_body/content/__init__.py | 0 .../application_x_pem_file/__init__.py | 0 .../content/application_x_pem_file/schema.py | 13 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../application_x_pem_file/__init__.py | 0 .../content/application_x_pem_file/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 186 + .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 + .../post/parameters/parameter_0/schema.py | 13 + .../post/path_parameters.py | 97 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 144 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 24 + .../parameter_0/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/query_parameters.py | 103 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_redirection/__init__.py | 5 + .../paths/fake_redirection/get/__init__.py | 0 .../paths/fake_redirection/get/operation.py | 137 + .../get/responses/__init__.py | 0 .../get/responses/response_303/__init__.py | 22 + .../get/responses/response_3xx/__init__.py | 22 + .../paths/fake_ref_obj_in_query/__init__.py | 5 + .../fake_ref_obj_in_query/get/__init__.py | 0 .../fake_ref_obj_in_query/get/operation.py | 139 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 13 + .../get/query_parameters.py | 109 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../fake_refs_array_of_enums/__init__.py | 5 + .../fake_refs_array_of_enums/post/__init__.py | 0 .../post/operation.py | 146 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_arraymodel/__init__.py | 5 + .../fake_refs_arraymodel/post/__init__.py | 0 .../fake_refs_arraymodel/post/operation.py | 145 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_boolean/__init__.py | 5 + .../paths/fake_refs_boolean/post/__init__.py | 0 .../paths/fake_refs_boolean/post/operation.py | 142 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 145 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_enum/__init__.py | 5 + .../paths/fake_refs_enum/post/__init__.py | 0 .../paths/fake_refs_enum/post/operation.py | 166 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_refs_enum/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_mammal/__init__.py | 5 + .../paths/fake_refs_mammal/post/__init__.py | 0 .../paths/fake_refs_mammal/post/operation.py | 142 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_number/__init__.py | 5 + .../paths/fake_refs_number/post/__init__.py | 0 .../paths/fake_refs_number/post/operation.py | 145 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 145 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_refs_string/__init__.py | 5 + .../paths/fake_refs_string/post/__init__.py | 0 .../paths/fake_refs_string/post/operation.py | 142 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_response_without_schema/__init__.py | 5 + .../get/__init__.py | 0 .../get/operation.py | 118 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 35 + .../fake_test_query_paramters/__init__.py | 5 + .../fake_test_query_paramters/put/__init__.py | 0 .../put/operation.py | 146 + .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 + .../put/parameters/parameter_0/schema.py | 63 + .../put/parameters/parameter_1/__init__.py | 19 + .../put/parameters/parameter_1/schema.py | 63 + .../put/parameters/parameter_2/__init__.py | 19 + .../put/parameters/parameter_2/schema.py | 63 + .../put/parameters/parameter_3/__init__.py | 19 + .../put/parameters/parameter_3/schema.py | 63 + .../put/parameters/parameter_4/__init__.py | 20 + .../put/parameters/parameter_4/schema.py | 63 + .../put/parameters/parameter_5/__init__.py | 20 + .../put/parameters/parameter_5/schema.py | 13 + .../put/query_parameters.py | 200 + .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 + .../fake_upload_download_file/__init__.py | 5 + .../post/__init__.py | 0 .../post/operation.py | 149 + .../post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../application_octet_stream/__init__.py | 0 .../application_octet_stream/schema.py | 13 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../application_octet_stream/__init__.py | 0 .../application_octet_stream/schema.py | 13 + .../paths/fake_upload_file/__init__.py | 5 + .../paths/fake_upload_file/post/__init__.py | 0 .../paths/fake_upload_file/post/operation.py | 146 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/fake_upload_files/__init__.py | 5 + .../paths/fake_upload_files/post/__init__.py | 0 .../paths/fake_upload_files/post/operation.py | 146 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 166 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../fake_wild_card_responses/__init__.py | 5 + .../fake_wild_card_responses/get/__init__.py | 0 .../fake_wild_card_responses/get/operation.py | 183 + .../get/responses/__init__.py | 0 .../get/responses/response_1xx/__init__.py | 31 + .../response_1xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_200/__init__.py | 31 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_2xx/__init__.py | 31 + .../response_2xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_3xx/__init__.py | 31 + .../response_3xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_4xx/__init__.py | 31 + .../response_4xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_5xx/__init__.py | 31 + .../response_5xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../src/openapi_client/paths/foo/__init__.py | 5 + .../openapi_client/paths/foo/get/__init__.py | 0 .../openapi_client/paths/foo/get/operation.py | 94 + .../paths/foo/get/responses/__init__.py | 0 .../responses/response_default/__init__.py | 31 + .../response_default/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 107 + .../paths/foo/get/servers/__init__.py | 0 .../paths/foo/get/servers/server_0.py | 14 + .../paths/foo/get/servers/server_1.py | 180 + .../src/openapi_client/paths/pet/__init__.py | 5 + .../openapi_client/paths/pet/post/__init__.py | 0 .../paths/pet/post/operation.py | 219 + .../paths/pet/post/request_body/__init__.py | 12 + .../paths/pet/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 + .../post/responses/response_405/__init__.py | 22 + .../paths/pet/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../security/security_requirement_object_2.py | 14 + .../openapi_client/paths/pet/put/__init__.py | 0 .../openapi_client/paths/pet/put/operation.py | 210 + .../paths/pet/put/request_body/__init__.py | 12 + .../paths/pet/put/responses/__init__.py | 0 .../put/responses/response_400/__init__.py | 22 + .../put/responses/response_404/__init__.py | 22 + .../put/responses/response_405/__init__.py | 22 + .../paths/pet/put/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../paths/pet_find_by_status/__init__.py | 5 + .../paths/pet_find_by_status/get/__init__.py | 0 .../paths/pet_find_by_status/get/operation.py | 187 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 153 + .../get/query_parameters.py | 103 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../security/security_requirement_object_2.py | 14 + .../pet_find_by_status/servers/__init__.py | 0 .../pet_find_by_status/servers/server_0.py | 14 + .../pet_find_by_status/servers/server_1.py | 180 + .../paths/pet_find_by_tags/__init__.py | 5 + .../paths/pet_find_by_tags/get/__init__.py | 0 .../paths/pet_find_by_tags/get/operation.py | 175 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 63 + .../pet_find_by_tags/get/query_parameters.py | 103 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../pet_find_by_tags/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../paths/pet_pet_id/__init__.py | 5 + .../paths/pet_pet_id/delete/__init__.py | 0 .../pet_pet_id/delete/header_parameters.py | 105 + .../paths/pet_pet_id/delete/operation.py | 189 + .../pet_pet_id/delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 18 + .../delete/parameters/parameter_0/schema.py | 13 + .../delete/parameters/parameter_1/__init__.py | 19 + .../delete/parameters/parameter_1/schema.py | 13 + .../pet_pet_id/delete/path_parameters.py | 97 + .../pet_pet_id/delete/responses/__init__.py | 0 .../delete/responses/response_400/__init__.py | 22 + .../pet_pet_id/delete/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../paths/pet_pet_id/get/__init__.py | 0 .../paths/pet_pet_id/get/operation.py | 185 + .../pet_pet_id/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 13 + .../paths/pet_pet_id/get/path_parameters.py | 97 + .../pet_pet_id/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../get/responses/response_404/__init__.py | 22 + .../paths/pet_pet_id/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../paths/pet_pet_id/post/__init__.py | 0 .../paths/pet_pet_id/post/operation.py | 187 + .../pet_pet_id/post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 + .../post/parameters/parameter_0/schema.py | 13 + .../paths/pet_pet_id/post/path_parameters.py | 97 + .../pet_pet_id/post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 123 + .../pet_pet_id/post/responses/__init__.py | 0 .../post/responses/response_405/__init__.py | 22 + .../pet_pet_id/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../security/security_requirement_object_1.py | 14 + .../paths/pet_pet_id_upload_image/__init__.py | 5 + .../pet_pet_id_upload_image/post/__init__.py | 0 .../pet_pet_id_upload_image/post/operation.py | 186 + .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 + .../post/parameters/parameter_0/schema.py | 13 + .../post/path_parameters.py | 97 + .../post/request_body/__init__.py | 22 + .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 + .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 + .../post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../openapi_client/paths/solidus/__init__.py | 5 + .../paths/solidus/get/__init__.py | 0 .../paths/solidus/get/operation.py | 108 + .../paths/solidus/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../paths/store_inventory/__init__.py | 5 + .../paths/store_inventory/get/__init__.py | 0 .../paths/store_inventory/get/operation.py | 131 + .../store_inventory/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 + .../store_inventory/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 + .../paths/store_order/__init__.py | 5 + .../paths/store_order/post/__init__.py | 0 .../paths/store_order/post/operation.py | 166 + .../store_order/post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../store_order/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 40 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../post/responses/response_400/__init__.py | 22 + .../paths/store_order_order_id/__init__.py | 5 + .../store_order_order_id/delete/__init__.py | 0 .../store_order_order_id/delete/operation.py | 145 + .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 19 + .../delete/parameters/parameter_0/schema.py | 13 + .../delete/path_parameters.py | 97 + .../delete/responses/__init__.py | 0 .../delete/responses/response_400/__init__.py | 22 + .../delete/responses/response_404/__init__.py | 22 + .../store_order_order_id/get/__init__.py | 0 .../store_order_order_id/get/operation.py | 171 + .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 + .../get/parameters/parameter_0/schema.py | 24 + .../get/path_parameters.py | 97 + .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../get/responses/response_404/__init__.py | 22 + .../src/openapi_client/paths/user/__init__.py | 5 + .../paths/user/post/__init__.py | 0 .../paths/user/post/operation.py | 114 + .../paths/user/post/request_body/__init__.py | 23 + .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../paths/user/post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 + .../paths/user_create_with_array/__init__.py | 5 + .../user_create_with_array/post/__init__.py | 0 .../user_create_with_array/post/operation.py | 114 + .../post/request_body/__init__.py | 12 + .../post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 + .../paths/user_create_with_list/__init__.py | 5 + .../user_create_with_list/post/__init__.py | 0 .../user_create_with_list/post/operation.py | 114 + .../post/request_body/__init__.py | 12 + .../post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 + .../paths/user_login/__init__.py | 5 + .../paths/user_login/get/__init__.py | 0 .../paths/user_login/get/operation.py | 171 + .../user_login/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 20 + .../get/parameters/parameter_0/schema.py | 13 + .../get/parameters/parameter_1/__init__.py | 20 + .../get/parameters/parameter_1/schema.py | 13 + .../paths/user_login/get/query_parameters.py | 114 + .../user_login/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 55 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../response_200/header_parameters.py | 151 + .../response_200/headers/__init__.py | 0 .../headers/header_int32/__init__.py | 12 + .../headers/header_number_header/__init__.py | 12 + .../__init__.py | 12 + .../header_x_expires_after/__init__.py | 17 + .../headers/header_x_expires_after/schema.py | 13 + .../headers/header_x_rate_limit/__init__.py | 23 + .../header_x_rate_limit/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../paths/user_logout/__init__.py | 5 + .../paths/user_logout/get/__init__.py | 0 .../paths/user_logout/get/operation.py | 86 + .../user_logout/get/responses/__init__.py | 0 .../responses/response_default/__init__.py | 13 + .../paths/user_username/__init__.py | 5 + .../paths/user_username/delete/__init__.py | 0 .../paths/user_username/delete/operation.py | 156 + .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 12 + .../user_username/delete/path_parameters.py | 97 + .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 + .../delete/responses/response_404/__init__.py | 22 + .../paths/user_username/get/__init__.py | 0 .../paths/user_username/get/operation.py | 171 + .../user_username/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 12 + .../user_username/get/path_parameters.py | 97 + .../user_username/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 + .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 + .../get/responses/response_400/__init__.py | 22 + .../get/responses/response_404/__init__.py | 22 + .../paths/user_username/put/__init__.py | 0 .../paths/user_username/put/operation.py | 173 + .../user_username/put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 12 + .../user_username/put/path_parameters.py | 97 + .../put/request_body/__init__.py | 23 + .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 + .../user_username/put/responses/__init__.py | 0 .../put/responses/response_400/__init__.py | 22 + .../put/responses/response_404/__init__.py | 22 + .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 + .../src/openapi_client/schemas/__init__.py | 148 + .../src/openapi_client/schemas/format.py | 115 + .../schemas/original_immutabledict.py | 97 + .../src/openapi_client/schemas/schema.py | 729 ++ .../src/openapi_client/schemas/schemas.py | 375 ++ .../src/openapi_client/schemas/validation.py | 1446 ++++ .../src/openapi_client/security_schemes.py | 257 + .../python/src/openapi_client/server.py | 34 + .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 291 + .../src/openapi_client/servers/server_1.py | 183 + .../src/openapi_client/servers/server_2.py | 17 + .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 + .../shared_imports/operation_imports.py | 18 + .../shared_imports/response_imports.py | 25 + .../shared_imports/schema_imports.py | 28 + .../shared_imports/security_scheme_imports.py | 12 + .../shared_imports/server_imports.py | 13 + .../python/src/openapi_client/signing.py | 415 ++ .../test/components/schema/test_return.py | 25 + .../codegen/clicommands/Generate.java | 18 +- 7306 files changed, 204891 insertions(+), 12244 deletions(-) create mode 100644 samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md create mode 100644 samples/client/3_0_3_unit_test/python/docs/components/schema/not.md create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/server.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py create mode 100644 samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py create mode 100644 samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md create mode 100644 samples/client/3_1_0_unit_test/python/docs/components/schema/not.md create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/server.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py create mode 100644 samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py create mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/api_client.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/api_response.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/exceptions.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/py.typed create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/rest.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/server.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py create mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py create mode 100644 samples/client/petstore/java/docs/components/schemas/ApiResponse.md create mode 100644 samples/client/petstore/java/docs/components/schemas/Boolean.md create mode 100644 samples/client/petstore/java/docs/components/schemas/Number.md create mode 100644 samples/client/petstore/java/docs/components/schemas/Return.md create mode 100644 samples/client/petstore/java/docs/components/schemas/String.md create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java create mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java create mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java create mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java create mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java create mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java create mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java create mode 100644 samples/client/petstore/python/docs/components/schema/return.md create mode 100644 samples/client/petstore/python/src/openapi_client/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/api_client.py create mode 100644 samples/client/petstore/python/src/openapi_client/api_response.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/path_to_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/foo.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/address.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/animal.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/api_response.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/apple.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/banana.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/bar.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/boolean.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/cat.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/category.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/class_model.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/client.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/currency.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/dog.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/drawing.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/file.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/foo.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/format_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/fruit.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/items.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/mammal.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/map_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/money.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/name.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_only.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/order.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/pet.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/pig.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/player.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/public_key.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/return.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/shape.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/some_object.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/tag.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/triangle.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/user.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/whale.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/zebra.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py create mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py create mode 100644 samples/client/petstore/python/src/openapi_client/configurations/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py create mode 100644 samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py create mode 100644 samples/client/petstore/python/src/openapi_client/exceptions.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/py.typed create mode 100644 samples/client/petstore/python/src/openapi_client/rest.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/format.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/schema.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/schemas.py create mode 100644 samples/client/petstore/python/src/openapi_client/schemas/validation.py create mode 100644 samples/client/petstore/python/src/openapi_client/security_schemes.py create mode 100644 samples/client/petstore/python/src/openapi_client/server.py create mode 100644 samples/client/petstore/python/src/openapi_client/servers/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_0.py create mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_1.py create mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_2.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py create mode 100644 samples/client/petstore/python/src/openapi_client/signing.py create mode 100644 samples/client/petstore/python/test/components/schema/test_return.py diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java index e0e8acfbbb5..440d5977005 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java @@ -16,10 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; @@ -31,7 +29,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index 8e7bc5d7152..c1dc5bacc2e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index fa51a189f38..bf14383c104 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -1,5 +1,4 @@ package org.openapijsonschematools.client.components.schemas; -import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index b2d64cdcdff..8968227f734 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -18,8 +18,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index 09d4d5bd234..dffa31278f9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index 5db2ddd6167..c9b1f4a933c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 17920aead56..78f6e9d4040 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index 3fbe112d6c6..241ab07693f 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 65d6fc3dc39..43696f26f02 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index 713f9fcbc2e..c2f66f7defb 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index dd8146a6928..2b166776e74 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -1,31 +1,15 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index 70fdcfb67c3..33583e2bf32 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index 97ae41e88ad..0bacecab5df 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java index f05f987e5e5..14c42003ea9 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java index 4b123ad5b55..6a9ae4d36e4 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java index 096f3d30b79..ea9982cb925 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index 56e58519e7d..65923d494b7 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index 2d64dcfa61b..217572bfa8c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index 2472dd24499..ac189abd5a2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 97370cd35ac..98ce23a61c8 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 619be52f3e2..36024642e7c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -1,31 +1,15 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index 6a2499aefa6..b8201add5a5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index 4dde715b451..0fc34edbc6c 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -1,6 +1,4 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -9,26 +7,18 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithRequired { diff --git a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES index 54c2a4d140f..193f59241a2 100644 --- a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -2,7 +2,6 @@ .gitlab-ci.yml .travis.yml README.md -docs/apis/tags/_not_api.md docs/apis/tags/additional_properties_api.md docs/apis/tags/all_of_api.md docs/apis/tags/any_of_api.md @@ -20,6 +19,7 @@ docs/apis/tags/min_length_api.md docs/apis/tags/min_properties_api.md docs/apis/tags/minimum_api.md docs/apis/tags/multiple_of_api.md +docs/apis/tags/not_api.md docs/apis/tags/one_of_api.md docs/apis/tags/operation_request_body_api.md docs/apis/tags/path_post_api.md @@ -30,7 +30,6 @@ docs/apis/tags/required_api.md docs/apis/tags/response_content_content_type_schema_api.md docs/apis/tags/type_api.md docs/apis/tags/unique_items_api.md -docs/components/schema/_not.md docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md docs/components/schema/additionalproperties_are_allowed_by_default.md docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -83,6 +82,7 @@ docs/components/schema/nested_allof_to_check_validation_semantics.md docs/components/schema/nested_anyof_to_check_validation_semantics.md docs/components/schema/nested_items.md docs/components/schema/nested_oneof_to_check_validation_semantics.md +docs/components/schema/not.md docs/components/schema/not_more_complex_schema.md docs/components/schema/nul_characters_in_strings.md docs/components/schema/null_type_matches_only_the_null_object.md @@ -471,1809 +471,1809 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/unit_test_api/__init__.py -src/unit_test_api/api_client.py -src/unit_test_api/api_response.py -src/unit_test_api/apis/__init__.py -src/unit_test_api/apis/path_to_api.py -src/unit_test_api/apis/paths/__init__.py -src/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py -src/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py -src/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py -src/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py -src/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py -src/unit_test_api/apis/paths/request_body_post_anyof_request_body.py -src/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py -src/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py -src/unit_test_api/apis/paths/request_body_post_by_int_request_body.py -src/unit_test_api/apis/paths/request_body_post_by_number_request_body.py -src/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py -src/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_email_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py -src/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py -src/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py -src/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py -src/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py -src/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py -src/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py -src/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py -src/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py -src/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py -src/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py -src/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py -src/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py -src/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py -src/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py -src/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py -src/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py -src/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_not_request_body.py -src/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py -src/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py -src/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py -src/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py -src/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py -src/unit_test_api/apis/paths/request_body_post_oneof_request_body.py -src/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py -src/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py -src/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py -src/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py -src/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py -src/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py -src/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py -src/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py -src/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py -src/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py -src/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py -src/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py -src/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py -src/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py -src/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py -src/unit_test_api/apis/tag_to_api.py -src/unit_test_api/apis/tags/__init__.py -src/unit_test_api/apis/tags/_not_api.py -src/unit_test_api/apis/tags/additional_properties_api.py -src/unit_test_api/apis/tags/all_of_api.py -src/unit_test_api/apis/tags/any_of_api.py -src/unit_test_api/apis/tags/content_type_json_api.py -src/unit_test_api/apis/tags/default_api.py -src/unit_test_api/apis/tags/enum_api.py -src/unit_test_api/apis/tags/format_api.py -src/unit_test_api/apis/tags/items_api.py -src/unit_test_api/apis/tags/max_items_api.py -src/unit_test_api/apis/tags/max_length_api.py -src/unit_test_api/apis/tags/max_properties_api.py -src/unit_test_api/apis/tags/maximum_api.py -src/unit_test_api/apis/tags/min_items_api.py -src/unit_test_api/apis/tags/min_length_api.py -src/unit_test_api/apis/tags/min_properties_api.py -src/unit_test_api/apis/tags/minimum_api.py -src/unit_test_api/apis/tags/multiple_of_api.py -src/unit_test_api/apis/tags/one_of_api.py -src/unit_test_api/apis/tags/operation_request_body_api.py -src/unit_test_api/apis/tags/path_post_api.py -src/unit_test_api/apis/tags/pattern_api.py -src/unit_test_api/apis/tags/properties_api.py -src/unit_test_api/apis/tags/ref_api.py -src/unit_test_api/apis/tags/required_api.py -src/unit_test_api/apis/tags/response_content_content_type_schema_api.py -src/unit_test_api/apis/tags/type_api.py -src/unit_test_api/apis/tags/unique_items_api.py -src/unit_test_api/components/__init__.py -src/unit_test_api/components/schema/__init__.py -src/unit_test_api/components/schema/_not.py -src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py -src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py -src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py -src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py -src/unit_test_api/components/schema/allof.py -src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py -src/unit_test_api/components/schema/allof_simple_types.py -src/unit_test_api/components/schema/allof_with_base_schema.py -src/unit_test_api/components/schema/allof_with_one_empty_schema.py -src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py -src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py -src/unit_test_api/components/schema/allof_with_two_empty_schemas.py -src/unit_test_api/components/schema/anyof.py -src/unit_test_api/components/schema/anyof_complex_types.py -src/unit_test_api/components/schema/anyof_with_base_schema.py -src/unit_test_api/components/schema/anyof_with_one_empty_schema.py -src/unit_test_api/components/schema/array_type_matches_arrays.py -src/unit_test_api/components/schema/boolean_type_matches_booleans.py -src/unit_test_api/components/schema/by_int.py -src/unit_test_api/components/schema/by_number.py -src/unit_test_api/components/schema/by_small_number.py -src/unit_test_api/components/schema/date_time_format.py -src/unit_test_api/components/schema/email_format.py -src/unit_test_api/components/schema/enum_with0_does_not_match_false.py -src/unit_test_api/components/schema/enum_with1_does_not_match_true.py -src/unit_test_api/components/schema/enum_with_escaped_characters.py -src/unit_test_api/components/schema/enum_with_false_does_not_match0.py -src/unit_test_api/components/schema/enum_with_true_does_not_match1.py -src/unit_test_api/components/schema/enums_in_properties.py -src/unit_test_api/components/schema/forbidden_property.py -src/unit_test_api/components/schema/hostname_format.py -src/unit_test_api/components/schema/integer_type_matches_integers.py -src/unit_test_api/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py -src/unit_test_api/components/schema/invalid_string_value_for_default.py -src/unit_test_api/components/schema/ipv4_format.py -src/unit_test_api/components/schema/ipv6_format.py -src/unit_test_api/components/schema/json_pointer_format.py -src/unit_test_api/components/schema/maximum_validation.py -src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py -src/unit_test_api/components/schema/maxitems_validation.py -src/unit_test_api/components/schema/maxlength_validation.py -src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py -src/unit_test_api/components/schema/maxproperties_validation.py -src/unit_test_api/components/schema/minimum_validation.py -src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py -src/unit_test_api/components/schema/minitems_validation.py -src/unit_test_api/components/schema/minlength_validation.py -src/unit_test_api/components/schema/minproperties_validation.py -src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py -src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py -src/unit_test_api/components/schema/nested_items.py -src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py -src/unit_test_api/components/schema/not_more_complex_schema.py -src/unit_test_api/components/schema/nul_characters_in_strings.py -src/unit_test_api/components/schema/null_type_matches_only_the_null_object.py -src/unit_test_api/components/schema/number_type_matches_numbers.py -src/unit_test_api/components/schema/object_properties_validation.py -src/unit_test_api/components/schema/object_type_matches_objects.py -src/unit_test_api/components/schema/oneof.py -src/unit_test_api/components/schema/oneof_complex_types.py -src/unit_test_api/components/schema/oneof_with_base_schema.py -src/unit_test_api/components/schema/oneof_with_empty_schema.py -src/unit_test_api/components/schema/oneof_with_required.py -src/unit_test_api/components/schema/pattern_is_not_anchored.py -src/unit_test_api/components/schema/pattern_validation.py -src/unit_test_api/components/schema/properties_with_escaped_characters.py -src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py -src/unit_test_api/components/schema/ref_in_additionalproperties.py -src/unit_test_api/components/schema/ref_in_allof.py -src/unit_test_api/components/schema/ref_in_anyof.py -src/unit_test_api/components/schema/ref_in_items.py -src/unit_test_api/components/schema/ref_in_not.py -src/unit_test_api/components/schema/ref_in_oneof.py -src/unit_test_api/components/schema/ref_in_property.py -src/unit_test_api/components/schema/required_default_validation.py -src/unit_test_api/components/schema/required_validation.py -src/unit_test_api/components/schema/required_with_empty_array.py -src/unit_test_api/components/schema/required_with_escaped_characters.py -src/unit_test_api/components/schema/simple_enum_validation.py -src/unit_test_api/components/schema/string_type_matches_strings.py -src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py -src/unit_test_api/components/schema/uniqueitems_false_validation.py -src/unit_test_api/components/schema/uniqueitems_validation.py -src/unit_test_api/components/schema/uri_format.py -src/unit_test_api/components/schema/uri_reference_format.py -src/unit_test_api/components/schema/uri_template_format.py -src/unit_test_api/components/schemas/__init__.py -src/unit_test_api/configurations/__init__.py -src/unit_test_api/configurations/api_configuration.py -src/unit_test_api/configurations/schema_configuration.py -src/unit_test_api/exceptions.py -src/unit_test_api/paths/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_not_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py -src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py -src/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/__init__.py -src/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/operation.py -src/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/responses/__init__.py -src/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/responses/response_200/__init__.py -src/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/responses/response_200/content/__init__.py -src/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/responses/response_200/content/application_json/__init__.py -src/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/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/unit_test_api/py.typed -src/unit_test_api/rest.py -src/unit_test_api/schemas/__init__.py -src/unit_test_api/schemas/format.py -src/unit_test_api/schemas/original_immutabledict.py -src/unit_test_api/schemas/schema.py -src/unit_test_api/schemas/schemas.py -src/unit_test_api/schemas/validation.py -src/unit_test_api/security_schemes.py -src/unit_test_api/server.py -src/unit_test_api/servers/__init__.py -src/unit_test_api/servers/server_0.py -src/unit_test_api/shared_imports/__init__.py -src/unit_test_api/shared_imports/header_imports.py -src/unit_test_api/shared_imports/operation_imports.py -src/unit_test_api/shared_imports/response_imports.py -src/unit_test_api/shared_imports/schema_imports.py -src/unit_test_api/shared_imports/security_scheme_imports.py -src/unit_test_api/shared_imports/server_imports.py +src/openapi_client/__init__.py +src/openapi_client/api_client.py +src/openapi_client/api_response.py +src/openapi_client/apis/__init__.py +src/openapi_client/apis/path_to_api.py +src/openapi_client/apis/paths/__init__.py +src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py +src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py +src/openapi_client/apis/paths/request_body_post_anyof_request_body.py +src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +src/openapi_client/apis/paths/request_body_post_by_int_request_body.py +src/openapi_client/apis/paths/request_body_post_by_number_request_body.py +src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py +src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py +src/openapi_client/apis/paths/request_body_post_email_format_request_body.py +src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py +src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py +src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py +src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py +src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py +src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py +src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py +src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py +src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py +src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_not_request_body.py +src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py +src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py +src/openapi_client/apis/paths/request_body_post_oneof_request_body.py +src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py +src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py +src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py +src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py +src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py +src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py +src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py +src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py +src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py +src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py +src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +src/openapi_client/apis/tag_to_api.py +src/openapi_client/apis/tags/__init__.py +src/openapi_client/apis/tags/additional_properties_api.py +src/openapi_client/apis/tags/all_of_api.py +src/openapi_client/apis/tags/any_of_api.py +src/openapi_client/apis/tags/content_type_json_api.py +src/openapi_client/apis/tags/default_api.py +src/openapi_client/apis/tags/enum_api.py +src/openapi_client/apis/tags/format_api.py +src/openapi_client/apis/tags/items_api.py +src/openapi_client/apis/tags/max_items_api.py +src/openapi_client/apis/tags/max_length_api.py +src/openapi_client/apis/tags/max_properties_api.py +src/openapi_client/apis/tags/maximum_api.py +src/openapi_client/apis/tags/min_items_api.py +src/openapi_client/apis/tags/min_length_api.py +src/openapi_client/apis/tags/min_properties_api.py +src/openapi_client/apis/tags/minimum_api.py +src/openapi_client/apis/tags/multiple_of_api.py +src/openapi_client/apis/tags/not_api.py +src/openapi_client/apis/tags/one_of_api.py +src/openapi_client/apis/tags/operation_request_body_api.py +src/openapi_client/apis/tags/path_post_api.py +src/openapi_client/apis/tags/pattern_api.py +src/openapi_client/apis/tags/properties_api.py +src/openapi_client/apis/tags/ref_api.py +src/openapi_client/apis/tags/required_api.py +src/openapi_client/apis/tags/response_content_content_type_schema_api.py +src/openapi_client/apis/tags/type_api.py +src/openapi_client/apis/tags/unique_items_api.py +src/openapi_client/components/__init__.py +src/openapi_client/components/schema/__init__.py +src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py +src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py +src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py +src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py +src/openapi_client/components/schema/allof.py +src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py +src/openapi_client/components/schema/allof_simple_types.py +src/openapi_client/components/schema/allof_with_base_schema.py +src/openapi_client/components/schema/allof_with_one_empty_schema.py +src/openapi_client/components/schema/allof_with_the_first_empty_schema.py +src/openapi_client/components/schema/allof_with_the_last_empty_schema.py +src/openapi_client/components/schema/allof_with_two_empty_schemas.py +src/openapi_client/components/schema/anyof.py +src/openapi_client/components/schema/anyof_complex_types.py +src/openapi_client/components/schema/anyof_with_base_schema.py +src/openapi_client/components/schema/anyof_with_one_empty_schema.py +src/openapi_client/components/schema/array_type_matches_arrays.py +src/openapi_client/components/schema/boolean_type_matches_booleans.py +src/openapi_client/components/schema/by_int.py +src/openapi_client/components/schema/by_number.py +src/openapi_client/components/schema/by_small_number.py +src/openapi_client/components/schema/date_time_format.py +src/openapi_client/components/schema/email_format.py +src/openapi_client/components/schema/enum_with0_does_not_match_false.py +src/openapi_client/components/schema/enum_with1_does_not_match_true.py +src/openapi_client/components/schema/enum_with_escaped_characters.py +src/openapi_client/components/schema/enum_with_false_does_not_match0.py +src/openapi_client/components/schema/enum_with_true_does_not_match1.py +src/openapi_client/components/schema/enums_in_properties.py +src/openapi_client/components/schema/forbidden_property.py +src/openapi_client/components/schema/hostname_format.py +src/openapi_client/components/schema/integer_type_matches_integers.py +src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py +src/openapi_client/components/schema/invalid_string_value_for_default.py +src/openapi_client/components/schema/ipv4_format.py +src/openapi_client/components/schema/ipv6_format.py +src/openapi_client/components/schema/json_pointer_format.py +src/openapi_client/components/schema/maximum_validation.py +src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py +src/openapi_client/components/schema/maxitems_validation.py +src/openapi_client/components/schema/maxlength_validation.py +src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py +src/openapi_client/components/schema/maxproperties_validation.py +src/openapi_client/components/schema/minimum_validation.py +src/openapi_client/components/schema/minimum_validation_with_signed_integer.py +src/openapi_client/components/schema/minitems_validation.py +src/openapi_client/components/schema/minlength_validation.py +src/openapi_client/components/schema/minproperties_validation.py +src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py +src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py +src/openapi_client/components/schema/nested_items.py +src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py +src/openapi_client/components/schema/not.py +src/openapi_client/components/schema/not_more_complex_schema.py +src/openapi_client/components/schema/nul_characters_in_strings.py +src/openapi_client/components/schema/null_type_matches_only_the_null_object.py +src/openapi_client/components/schema/number_type_matches_numbers.py +src/openapi_client/components/schema/object_properties_validation.py +src/openapi_client/components/schema/object_type_matches_objects.py +src/openapi_client/components/schema/oneof.py +src/openapi_client/components/schema/oneof_complex_types.py +src/openapi_client/components/schema/oneof_with_base_schema.py +src/openapi_client/components/schema/oneof_with_empty_schema.py +src/openapi_client/components/schema/oneof_with_required.py +src/openapi_client/components/schema/pattern_is_not_anchored.py +src/openapi_client/components/schema/pattern_validation.py +src/openapi_client/components/schema/properties_with_escaped_characters.py +src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py +src/openapi_client/components/schema/ref_in_additionalproperties.py +src/openapi_client/components/schema/ref_in_allof.py +src/openapi_client/components/schema/ref_in_anyof.py +src/openapi_client/components/schema/ref_in_items.py +src/openapi_client/components/schema/ref_in_not.py +src/openapi_client/components/schema/ref_in_oneof.py +src/openapi_client/components/schema/ref_in_property.py +src/openapi_client/components/schema/required_default_validation.py +src/openapi_client/components/schema/required_validation.py +src/openapi_client/components/schema/required_with_empty_array.py +src/openapi_client/components/schema/required_with_escaped_characters.py +src/openapi_client/components/schema/simple_enum_validation.py +src/openapi_client/components/schema/string_type_matches_strings.py +src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +src/openapi_client/components/schema/uniqueitems_false_validation.py +src/openapi_client/components/schema/uniqueitems_validation.py +src/openapi_client/components/schema/uri_format.py +src/openapi_client/components/schema/uri_reference_format.py +src/openapi_client/components/schema/uri_template_format.py +src/openapi_client/components/schemas/__init__.py +src/openapi_client/configurations/__init__.py +src/openapi_client/configurations/api_configuration.py +src/openapi_client/configurations/schema_configuration.py +src/openapi_client/exceptions.py +src/openapi_client/paths/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/operation.py +src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py +src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/py.typed +src/openapi_client/rest.py +src/openapi_client/schemas/__init__.py +src/openapi_client/schemas/format.py +src/openapi_client/schemas/original_immutabledict.py +src/openapi_client/schemas/schema.py +src/openapi_client/schemas/schemas.py +src/openapi_client/schemas/validation.py +src/openapi_client/security_schemes.py +src/openapi_client/server.py +src/openapi_client/servers/__init__.py +src/openapi_client/servers/server_0.py +src/openapi_client/shared_imports/__init__.py +src/openapi_client/shared_imports/header_imports.py +src/openapi_client/shared_imports/operation_imports.py +src/openapi_client/shared_imports/response_imports.py +src/openapi_client/shared_imports/schema_imports.py +src/openapi_client/shared_imports/security_scheme_imports.py +src/openapi_client/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/3_0_3_unit_test/python/README.md b/samples/client/3_0_3_unit_test/python/README.md index c782d21bbe4..fba2362ddc2 100644 --- a/samples/client/3_0_3_unit_test/python/README.md +++ b/samples/client/3_0_3_unit_test/python/README.md @@ -1,4 +1,4 @@ -# unit-test-api +# openapi-client sample spec for testing openapi functionality, built from json schema tests for draft6 This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: @@ -202,7 +202,7 @@ HTTP request | Method | Description /requestBody/postEnumWithFalseDoesNotMatch0RequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) | /requestBody/postEnumWithTrueDoesNotMatch1RequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) | /requestBody/postEnumsInPropertiesRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) | -/requestBody/postForbiddenPropertyRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) | +/requestBody/postForbiddenPropertyRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) | /requestBody/postHostnameFormatRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [FormatApi](docs/apis/tags/format_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) | /requestBody/postIntegerTypeMatchesIntegersRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) | /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody **post** | [MultipleOfApi](docs/apis/tags/multiple_of_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) | @@ -225,8 +225,8 @@ HTTP request | Method | Description /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [AnyOfApi](docs/apis/tags/any_of_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) | /requestBody/postNestedItemsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [ItemsApi](docs/apis/tags/items_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) | /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [OneOfApi](docs/apis/tags/one_of_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) | -/requestBody/postNotMoreComplexSchemaRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) | -/requestBody/postNotRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) | +/requestBody/postNotMoreComplexSchemaRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) | +/requestBody/postNotRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) | /requestBody/postNulCharactersInStringsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) | /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) | /requestBody/postNumberTypeMatchesNumbersRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) | @@ -289,7 +289,7 @@ HTTP request | Method | Description /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) | /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) | /responseBody/postEnumsInPropertiesResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) | -/responseBody/postForbiddenPropertyResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | +/responseBody/postForbiddenPropertyResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | /responseBody/postHostnameFormatResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [FormatApi](docs/apis/tags/format_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) | /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) | /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes **post** | [MultipleOfApi](docs/apis/tags/multiple_of_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) | @@ -312,8 +312,8 @@ HTTP request | Method | Description /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [AnyOfApi](docs/apis/tags/any_of_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) | /responseBody/postNestedItemsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ItemsApi](docs/apis/tags/items_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) | /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes **post** | [OneOfApi](docs/apis/tags/one_of_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) | -/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | -/responseBody/postNotResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) | +/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | +/responseBody/postNotResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) | /responseBody/postNulCharactersInStringsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) | /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) | /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) | @@ -404,7 +404,7 @@ Class | Description [NestedAnyofToCheckValidationSemantics](docs/components/schema/nested_anyof_to_check_validation_semantics.md) | [NestedItems](docs/components/schema/nested_items.md) | [NestedOneofToCheckValidationSemantics](docs/components/schema/nested_oneof_to_check_validation_semantics.md) | -[_Not](docs/components/schema/_not.md) | +[Not](docs/components/schema/not.md) | [NotMoreComplexSchema](docs/components/schema/not_more_complex_schema.md) | [NulCharactersInStrings](docs/components/schema/nul_characters_in_strings.md) | [NullTypeMatchesOnlyTheNullObject](docs/components/schema/null_type_matches_only_the_null_object.md) | diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md index 397fce370e0..3e4f24ac50c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.additional_properties_api +openapi_client.apis.tags.additional_properties_api # AdditionalPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md index a8fc70cc41f..417b34edee4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.all_of_api +openapi_client.apis.tags.all_of_api # AllOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md index db24138c8f9..47da9b1b87e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.any_of_api +openapi_client.apis.tags.any_of_api # AnyOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md index 04d4743de09..6172fcc3636 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.content_type_json_api +openapi_client.apis.tags.content_type_json_api # ContentTypeJsonApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md index b207e3320f0..a9621a5414b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.default_api +openapi_client.apis.tags.default_api # DefaultApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md index 529224b8e7b..9ed8b5a134b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.enum_api +openapi_client.apis.tags.enum_api # EnumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md index 5f25edf69da..5df99056e47 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.format_api +openapi_client.apis.tags.format_api # FormatApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md index 7d4b0563bbb..cf23e008d52 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.items_api +openapi_client.apis.tags.items_api # ItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md index 3c2f39b81d9..fa7a6b881ab 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_items_api +openapi_client.apis.tags.max_items_api # MaxItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md index 581d53251b9..e50f6427b47 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_length_api +openapi_client.apis.tags.max_length_api # MaxLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md index 6274432bfaf..7c7f221dc03 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_properties_api +openapi_client.apis.tags.max_properties_api # MaxPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md index 431e5c64ad4..f93c66a5928 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.maximum_api +openapi_client.apis.tags.maximum_api # MaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md index eac5307be28..189af58359c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_items_api +openapi_client.apis.tags.min_items_api # MinItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md index 76d6f3acdbe..bf1b6a0c13c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_length_api +openapi_client.apis.tags.min_length_api # MinLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md index fc7595be9e2..861a30f1b6d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_properties_api +openapi_client.apis.tags.min_properties_api # MinPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md index 62d9b842e22..671bbf4f58d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.minimum_api +openapi_client.apis.tags.minimum_api # MinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md index 91592db4255..f4ffed0e3fc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.multiple_of_api +openapi_client.apis.tags.multiple_of_api # MultipleOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md new file mode 100644 index 00000000000..84d064377fd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md @@ -0,0 +1,19 @@ + +openapi_client.apis.tags.not_api +# NotApi + +All URIs are relative to the selected server +- The server is selected by passing in server_info and server_index into api_configuration.ApiConfiguration +- Code samples in endpoints documents show how to do this +- server_index can also be passed in to endpoint calls, see endpoint documentation + +Method | Description +------ | ------------- +[**post_forbidden_property_request_body**](../../paths/request_body_post_forbidden_property_request_body/post.md) | +[**post_forbidden_property_response_body_for_content_types**](../../paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | +[**post_not_more_complex_schema_request_body**](../../paths/request_body_post_not_more_complex_schema_request_body/post.md) | +[**post_not_more_complex_schema_response_body_for_content_types**](../../paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | +[**post_not_request_body**](../../paths/request_body_post_not_request_body/post.md) | +[**post_not_response_body_for_content_types**](../../paths/response_body_post_not_response_body_for_content_types/post.md) | + +[[Back to top]](#top) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md index 42058af96dd..58d2f471203 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.one_of_api +openapi_client.apis.tags.one_of_api # OneOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md index e49b4cfb7bb..bbdea3f4db6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.operation_request_body_api +openapi_client.apis.tags.operation_request_body_api # OperationRequestBodyApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md index 72bc6e90636..1b12a7912d9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.path_post_api +openapi_client.apis.tags.path_post_api # PathPostApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md index e36a5db710f..12cd14bde98 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.pattern_api +openapi_client.apis.tags.pattern_api # PatternApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md index 49bc5901215..53a25c96d3b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.properties_api +openapi_client.apis.tags.properties_api # PropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md index eef0c1721f6..be9cd309ef4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.ref_api +openapi_client.apis.tags.ref_api # RefApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md index a37631ea5ea..1ea58597191 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.required_api +openapi_client.apis.tags.required_api # RequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md index 31eea7f8cea..04b83ad2d7d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.response_content_content_type_schema_api +openapi_client.apis.tags.response_content_content_type_schema_api # ResponseContentContentTypeSchemaApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md index 547c75e6739..c40837dd708 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.type_api +openapi_client.apis.tags.type_api # TypeApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md index 8c687b43559..d470c375c00 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.unique_items_api +openapi_client.apis.tags.unique_items_api # UniqueItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md index 30dd79f1dfd..82d42b75243 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAllowsASchemaWhichShouldValidate -unit_test_api.components.schema.additionalproperties_allows_a_schema_which_should_validate +openapi_client.components.schema.additionalproperties_allows_a_schema_which_should_validate ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md index 8dd38499643..c26435c74a3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -unit_test_api.components.schema.additionalproperties_are_allowed_by_default +openapi_client.components.schema.additionalproperties_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md index 91734799218..fbb9f34b100 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -unit_test_api.components.schema.additionalproperties_can_exist_by_itself +openapi_client.components.schema.additionalproperties_can_exist_by_itself ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md index d3f57310681..86107570eb7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesShouldNotLookInApplicators -unit_test_api.components.schema.additionalproperties_should_not_look_in_applicators +openapi_client.components.schema.additionalproperties_should_not_look_in_applicators ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md index dba78598a7f..17aff8377b3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md @@ -1,5 +1,5 @@ # Allof -unit_test_api.components.schema.allof +openapi_client.components.schema.allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md index 5c3d9d5885c..ba71a7fa107 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -unit_test_api.components.schema.allof_combined_with_anyof_oneof +openapi_client.components.schema.allof_combined_with_anyof_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md index 9253a5b8437..63e6fc23071 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -unit_test_api.components.schema.allof_simple_types +openapi_client.components.schema.allof_simple_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md index cc5d8d960b8..e4d86154e75 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -unit_test_api.components.schema.allof_with_base_schema +openapi_client.components.schema.allof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md index 5cf9db40ba4..79097635223 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -unit_test_api.components.schema.allof_with_one_empty_schema +openapi_client.components.schema.allof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md index 356803ec24c..5c2b8248e88 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -unit_test_api.components.schema.allof_with_the_first_empty_schema +openapi_client.components.schema.allof_with_the_first_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md index 1b2e4fb7e53..40a9ccfae05 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -unit_test_api.components.schema.allof_with_the_last_empty_schema +openapi_client.components.schema.allof_with_the_last_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md index aa9c99a101f..699a57ce756 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -unit_test_api.components.schema.allof_with_two_empty_schemas +openapi_client.components.schema.allof_with_two_empty_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md index 042780da106..ef4898eb423 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md @@ -1,5 +1,5 @@ # Anyof -unit_test_api.components.schema.anyof +openapi_client.components.schema.anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md index 2c3cdca3cfd..763d73b2aab 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -unit_test_api.components.schema.anyof_complex_types +openapi_client.components.schema.anyof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md index 5c150ef6fa1..ea33c52d4a2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -unit_test_api.components.schema.anyof_with_base_schema +openapi_client.components.schema.anyof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md index d4243c366e9..c634c1d761c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -unit_test_api.components.schema.anyof_with_one_empty_schema +openapi_client.components.schema.anyof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md index c16d15867d8..9412c214057 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -unit_test_api.components.schema.array_type_matches_arrays +openapi_client.components.schema.array_type_matches_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md index 40353276217..ccf66cfebdb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -unit_test_api.components.schema.boolean_type_matches_booleans +openapi_client.components.schema.boolean_type_matches_booleans ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md index 1945ad2240f..ba7c4b17f7f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md @@ -1,5 +1,5 @@ # ByInt -unit_test_api.components.schema.by_int +openapi_client.components.schema.by_int ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md index 46ce873dcf1..0851beb6291 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md @@ -1,5 +1,5 @@ # ByNumber -unit_test_api.components.schema.by_number +openapi_client.components.schema.by_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md index e69123a95f8..2621ab7ee8f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md @@ -1,5 +1,5 @@ # BySmallNumber -unit_test_api.components.schema.by_small_number +openapi_client.components.schema.by_small_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md index 672d9536be7..4280a29b11e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md @@ -1,5 +1,5 @@ # DateTimeFormat -unit_test_api.components.schema.date_time_format +openapi_client.components.schema.date_time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md index 19c83e8d25b..0ffd547dadd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md @@ -1,5 +1,5 @@ # EmailFormat -unit_test_api.components.schema.email_format +openapi_client.components.schema.email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md index 15b5dc53b6e..ed83e936da4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -unit_test_api.components.schema.enum_with0_does_not_match_false +openapi_client.components.schema.enum_with0_does_not_match_false ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md index 6615b73908f..2025ed9ff16 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -unit_test_api.components.schema.enum_with1_does_not_match_true +openapi_client.components.schema.enum_with1_does_not_match_true ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md index 3c0ea810a81..c0a9f43b53d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -unit_test_api.components.schema.enum_with_escaped_characters +openapi_client.components.schema.enum_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md index fdc3978854d..212e10809ad 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -unit_test_api.components.schema.enum_with_false_does_not_match0 +openapi_client.components.schema.enum_with_false_does_not_match0 ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md index b77e0d0ce8c..8710e6dfd45 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -unit_test_api.components.schema.enum_with_true_does_not_match1 +openapi_client.components.schema.enum_with_true_does_not_match1 ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md index 70957943d7e..cd9a1e817aa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md @@ -1,5 +1,5 @@ # EnumsInProperties -unit_test_api.components.schema.enums_in_properties +openapi_client.components.schema.enums_in_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md index dfd224ae2ed..578716cefa4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md @@ -1,5 +1,5 @@ # ForbiddenProperty -unit_test_api.components.schema.forbidden_property +openapi_client.components.schema.forbidden_property ``` type: schemas.Schema ``` @@ -54,9 +54,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[Not](#not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md index df9411b9603..7e9e71ee21d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md @@ -1,5 +1,5 @@ # HostnameFormat -unit_test_api.components.schema.hostname_format +openapi_client.components.schema.hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md index 6630731f225..011382ff502 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -unit_test_api.components.schema.integer_type_matches_integers +openapi_client.components.schema.integer_type_matches_integers ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md index c20ec1b1bde..27f1c8cb209 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md @@ -1,5 +1,5 @@ # InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -unit_test_api.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf +openapi_client.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md index 75e7eebfd95..4d99da2dfee 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md @@ -1,5 +1,5 @@ # InvalidStringValueForDefault -unit_test_api.components.schema.invalid_string_value_for_default +openapi_client.components.schema.invalid_string_value_for_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md index 78d8cc1092c..4d85e2dfc50 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md @@ -1,5 +1,5 @@ # Ipv4Format -unit_test_api.components.schema.ipv4_format +openapi_client.components.schema.ipv4_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md index a72f9736166..ddfd419ea10 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md @@ -1,5 +1,5 @@ # Ipv6Format -unit_test_api.components.schema.ipv6_format +openapi_client.components.schema.ipv6_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md index 98e8b61825c..14b8237cdc1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md @@ -1,5 +1,5 @@ # JsonPointerFormat -unit_test_api.components.schema.json_pointer_format +openapi_client.components.schema.json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md index 378b58f8023..e2d0d04a242 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md @@ -1,5 +1,5 @@ # MaximumValidation -unit_test_api.components.schema.maximum_validation +openapi_client.components.schema.maximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md index d67df0a95ec..99f6aba50fb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -unit_test_api.components.schema.maximum_validation_with_unsigned_integer +openapi_client.components.schema.maximum_validation_with_unsigned_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md index e7b2d56546b..cad99d77c77 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -unit_test_api.components.schema.maxitems_validation +openapi_client.components.schema.maxitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md index 5f3a102065f..681922c6d72 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -unit_test_api.components.schema.maxlength_validation +openapi_client.components.schema.maxlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md index 5477108f943..15bb489c9b0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -unit_test_api.components.schema.maxproperties0_means_the_object_is_empty +openapi_client.components.schema.maxproperties0_means_the_object_is_empty ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md index cd9d2b02984..a949f7516bf 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -unit_test_api.components.schema.maxproperties_validation +openapi_client.components.schema.maxproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md index d90d5b573de..50e38f4b416 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md @@ -1,5 +1,5 @@ # MinimumValidation -unit_test_api.components.schema.minimum_validation +openapi_client.components.schema.minimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md index b3c9f3dba7f..75dba36ce70 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -unit_test_api.components.schema.minimum_validation_with_signed_integer +openapi_client.components.schema.minimum_validation_with_signed_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md index 76b3b846a9f..9e2902ac5dc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md @@ -1,5 +1,5 @@ # MinitemsValidation -unit_test_api.components.schema.minitems_validation +openapi_client.components.schema.minitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md index 149cd02b965..f4eec7c22e6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md @@ -1,5 +1,5 @@ # MinlengthValidation -unit_test_api.components.schema.minlength_validation +openapi_client.components.schema.minlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md index 87f643e4e40..9bfa96bb61b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -unit_test_api.components.schema.minproperties_validation +openapi_client.components.schema.minproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md index 216fa2e6bbc..27517ae43a8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -unit_test_api.components.schema.nested_allof_to_check_validation_semantics +openapi_client.components.schema.nested_allof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md index 69dbb3c5ed1..00cfa1e5d02 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -unit_test_api.components.schema.nested_anyof_to_check_validation_semantics +openapi_client.components.schema.nested_anyof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md index 12858c9191b..dd71cf121cc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md @@ -1,5 +1,5 @@ # NestedItems -unit_test_api.components.schema.nested_items +openapi_client.components.schema.nested_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md index 95a56bdfb5a..7c0a3a84ce7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -unit_test_api.components.schema.nested_oneof_to_check_validation_semantics +openapi_client.components.schema.nested_oneof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md new file mode 100644 index 00000000000..c5d503ba001 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md @@ -0,0 +1,28 @@ +# Not +openapi_client.components.schema.not +``` +type: schemas.Schema +``` + +## validate method +Input Type | Return Type | Notes +------------ | ------------- | ------------- +dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | + +## Composed Schemas (allOf/anyOf/oneOf/not) +## not +Schema Class | Input Type | Return Type +------------ | ---------- | ----------- +[Not2](#not2) | int | int + +# Not2 +``` +type: schemas.Schema +``` + +## validate method +Input Type | Return Type | Notes +------------ | ------------- | ------------- +int | int | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md index 0deae4d934b..c042b4880c3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -unit_test_api.components.schema.not_more_complex_schema +openapi_client.components.schema.not_more_complex_schema ``` type: schemas.Schema ``` @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) +[Not](#not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md index 6b2ae0f5596..87432dbc863 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -unit_test_api.components.schema.nul_characters_in_strings +openapi_client.components.schema.nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md index d61c3f1ddd1..6c8fa175936 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -unit_test_api.components.schema.null_type_matches_only_the_null_object +openapi_client.components.schema.null_type_matches_only_the_null_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md index cac70e72fdc..9de89f93f7b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -unit_test_api.components.schema.number_type_matches_numbers +openapi_client.components.schema.number_type_matches_numbers ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md index 119d76f77a0..cdcc6d319d4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -unit_test_api.components.schema.object_properties_validation +openapi_client.components.schema.object_properties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md index 71b0fb1fa2c..28386703ab2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -unit_test_api.components.schema.object_type_matches_objects +openapi_client.components.schema.object_type_matches_objects ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md index 1d897561347..78e3bdfe366 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md @@ -1,5 +1,5 @@ # Oneof -unit_test_api.components.schema.oneof +openapi_client.components.schema.oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md index a7f15deadb7..cd63a9482c7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md @@ -1,5 +1,5 @@ # OneofComplexTypes -unit_test_api.components.schema.oneof_complex_types +openapi_client.components.schema.oneof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md index 4230ca82320..7ff0bf6191c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -unit_test_api.components.schema.oneof_with_base_schema +openapi_client.components.schema.oneof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md index 9a5e93ffe25..55ed638a799 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -unit_test_api.components.schema.oneof_with_empty_schema +openapi_client.components.schema.oneof_with_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md index bde6e8f36ee..5e71f9061e7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md @@ -1,5 +1,5 @@ # OneofWithRequired -unit_test_api.components.schema.oneof_with_required +openapi_client.components.schema.oneof_with_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md index 172c789e202..448f029fad1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -unit_test_api.components.schema.pattern_is_not_anchored +openapi_client.components.schema.pattern_is_not_anchored ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md index 97fc2c367fd..54835339351 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md @@ -1,5 +1,5 @@ # PatternValidation -unit_test_api.components.schema.pattern_validation +openapi_client.components.schema.pattern_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md index 830a047b516..1e62c04f7c6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -unit_test_api.components.schema.properties_with_escaped_characters +openapi_client.components.schema.properties_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md index d70dd946f15..1133a853c9b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -unit_test_api.components.schema.property_named_ref_that_is_not_a_reference +openapi_client.components.schema.property_named_ref_that_is_not_a_reference ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md index a51bdc1ffaa..dc89dd91c6b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md @@ -1,5 +1,5 @@ # RefInAdditionalproperties -unit_test_api.components.schema.ref_in_additionalproperties +openapi_client.components.schema.ref_in_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md index 6c563963f4b..54ebfdfd545 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md @@ -1,5 +1,5 @@ # RefInAllof -unit_test_api.components.schema.ref_in_allof +openapi_client.components.schema.ref_in_allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md index 012b7825ee8..387efbc9f22 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md @@ -1,5 +1,5 @@ # RefInAnyof -unit_test_api.components.schema.ref_in_anyof +openapi_client.components.schema.ref_in_anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md index e5bffd4b68b..7b12e8822b3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md @@ -1,5 +1,5 @@ # RefInItems -unit_test_api.components.schema.ref_in_items +openapi_client.components.schema.ref_in_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md index 9b083bb46dc..f860a97d77b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md @@ -1,5 +1,5 @@ # RefInNot -unit_test_api.components.schema.ref_in_not +openapi_client.components.schema.ref_in_not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md index 0d03c124ece..04330bc4330 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md @@ -1,5 +1,5 @@ # RefInOneof -unit_test_api.components.schema.ref_in_oneof +openapi_client.components.schema.ref_in_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md index 87bf1615763..b49b4a1c30c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md @@ -1,5 +1,5 @@ # RefInProperty -unit_test_api.components.schema.ref_in_property +openapi_client.components.schema.ref_in_property ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md index a1923bc3370..013b2b6c3e9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -unit_test_api.components.schema.required_default_validation +openapi_client.components.schema.required_default_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md index 3dc9958f88b..ca5e4fb2b5c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md @@ -1,5 +1,5 @@ # RequiredValidation -unit_test_api.components.schema.required_validation +openapi_client.components.schema.required_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md index 06ca142ed71..31f72b12cda 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -unit_test_api.components.schema.required_with_empty_array +openapi_client.components.schema.required_with_empty_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md index b59d46f5094..ef7a12c740d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -unit_test_api.components.schema.required_with_escaped_characters +openapi_client.components.schema.required_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md index 76d4e96d6cb..8913312182e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -unit_test_api.components.schema.simple_enum_validation +openapi_client.components.schema.simple_enum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md index 5ad002dcdb6..c8cba112eb4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -unit_test_api.components.schema.string_type_matches_strings +openapi_client.components.schema.string_type_matches_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md index cfe27e462ba..7f367c94368 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md @@ -1,5 +1,5 @@ # TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -unit_test_api.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing +openapi_client.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md index a6d90d841c2..34fa0acc529 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -unit_test_api.components.schema.uniqueitems_false_validation +openapi_client.components.schema.uniqueitems_false_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md index 21ecd3794ff..6d824238bf2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -unit_test_api.components.schema.uniqueitems_validation +openapi_client.components.schema.uniqueitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md index 8d178c0bec8..a903ae2744a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md @@ -1,5 +1,5 @@ # UriFormat -unit_test_api.components.schema.uri_format +openapi_client.components.schema.uri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md index 1cb2c8ad458..a656995619f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md @@ -1,5 +1,5 @@ # UriReferenceFormat -unit_test_api.components.schema.uri_reference_format +openapi_client.components.schema.uri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md index 45598bd12a6..4f1b8fc8806 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md @@ -1,5 +1,5 @@ # UriTemplateFormat -unit_test_api.components.schema.uri_template_format +openapi_client.components.schema.uri_template_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md index f312006f588..341f9e65f99 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md index 95bb88f6efa..bda1c84a172 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md index 29d067da7f4..b82af170bfd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md index 3d963691b62..c744330e50b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md index 02f06c8e2fd..5b603004df3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation +openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md index d8a24db91a3..50da0fd2f89 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_request_body.operation +openapi_client.paths.request_body_post_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md index 0a01c74cdef..b44a20dc03b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_simple_types_request_body.operation +openapi_client.paths.request_body_post_allof_simple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md index 874d4202513..5f232725445 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md index 8117298865b..b1f42f34a0a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md index 646a46f821c..ba8da971840 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md index c365d970a7d..b8efef16203 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md index b22331cb592..51e9d99a4a4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation +openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md index 33f97e54a7d..1cd4866b4aa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_complex_types_request_body.operation +openapi_client.paths.request_body_post_anyof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md index f7b5e3192df..873b2cfc20e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_request_body.operation +openapi_client.paths.request_body_post_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md index 4c2144060f2..a8e1996eab3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md index 664c433e340..2afb748ca22 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation +openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md index 5a8aaeaf958..4ea2dec9161 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.operation +openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md index 8ba76b13aea..f013047d6eb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.operation +openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md index abfc5dc782b..e510a52ea3f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_int_request_body.operation +openapi_client.paths.request_body_post_by_int_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md index c3dfeb70aff..57fc5f3cbf3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_number_request_body.operation +openapi_client.paths.request_body_post_by_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md index a30753fa279..134a7a32553 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_small_number_request_body.operation +openapi_client.paths.request_body_post_by_small_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md index a94bc64b45b..05c7a3fe507 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_date_time_format_request_body.operation +openapi_client.paths.request_body_post_date_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md index 879b019c0e8..14b7d2c0807 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_email_format_request_body.operation +openapi_client.paths.request_body_post_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md index 3cb6bb40948..c47b85a5ef8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation +openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md index 585fa7bcd29..e88cabcbb65 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation +openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md index 367d822ce51..662c62e5d48 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md index fdebcdb5e8b..84be01b709b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation +openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md index c29caa01a4f..c89070ae61e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation +openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md index 3b98655662a..6fa42c97cec 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enums_in_properties_request_body.operation +openapi_client.paths.request_body_post_enums_in_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md index 9f6b6d47e94..f5577711145 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_forbidden_property_request_body.operation +openapi_client.paths.request_body_post_forbidden_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_forbidden_property_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_forbidden_property_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_forbidden_property_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_forbidden_property_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,13 +103,13 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md index 906a0d48a8f..93cdc6bb193 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_hostname_format_request_body.operation +openapi_client.paths.request_body_post_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md index 67742a752ed..f7b513def06 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.operation +openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md index 76a914d85cd..e50b9f882f3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.operation +openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md index 9fc35ff3ca9..cbcf6977992 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.operation +openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_invalid_string_value_for_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md index c3b02f62215..f9a0977b65a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ipv4_format_request_body.operation +openapi_client.paths.request_body_post_ipv4_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md index 582fccd68cb..ead74b40169 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ipv6_format_request_body.operation +openapi_client.paths.request_body_post_ipv6_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md index 7568f619f63..7abd81d3415 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_json_pointer_format_request_body.operation +openapi_client.paths.request_body_post_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md index fd36d29c7a3..ea07c977b28 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maximum_validation_request_body.operation +openapi_client.paths.request_body_post_maximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md index 2f08e39701f..d35e9ef5d55 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation +openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md index fcf803c693a..f128d463072 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxitems_validation_request_body.operation +openapi_client.paths.request_body_post_maxitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md index 0584da67055..55c54771958 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxlength_validation_request_body.operation +openapi_client.paths.request_body_post_maxlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md index 5d8aaf47802..9c70ec7981c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation +openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md index ed12e4e58a1..b1e875e6989 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxproperties_validation_request_body.operation +openapi_client.paths.request_body_post_maxproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md index 7b4705230e8..dfc8f9d22a8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minimum_validation_request_body.operation +openapi_client.paths.request_body_post_minimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md index 9f55b8327a4..4bf82cf4383 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation +openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md index 71b3ce83f04..464655cc7bf 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minitems_validation_request_body.operation +openapi_client.paths.request_body_post_minitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import min_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md index f856f019042..1cb3d563040 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minlength_validation_request_body.operation +openapi_client.paths.request_body_post_minlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md index 3d02d50edd2..ec6a804f869 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minproperties_validation_request_body.operation +openapi_client.paths.request_body_post_minproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md index 9dfb6bae67f..cf0fc95b9c3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md index 7e8b7a3693a..fc38bbd03d4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md index 5f95380db08..eeddaa49319 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_items_request_body.operation +openapi_client.paths.request_body_post_nested_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -111,7 +111,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md index 9b85d89b160..67dd488dee4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md index 526f9766094..4a406a0d1f4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.operation +openapi_client.paths.request_body_post_not_more_complex_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_more_complex_schema_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_more_complex_schema_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,13 +103,13 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md index f84e41a222b..78a21137fe9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_not_request_body.operation +openapi_client.paths.request_body_post_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -49,7 +49,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Return Types @@ -85,31 +85,31 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = _not._Not.validate(None) + body = not.Not.validate(None) try: api_response = api_instance.post_not_request_body( body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md index 6d44ea35a50..e162a0a7b57 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md index fcb18059c74..0d1c940b66f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.operation +openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md index f0407d66210..21b67e43383 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation +openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md index d63b60c0bdb..c02e707469e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.operation +openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md index 9feda9546c6..afeedb5a671 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_object_properties_validation_request_body.operation +openapi_client.paths.request_body_post_object_properties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md index 278955397cd..d262776fea7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.operation +openapi_client.paths.request_body_post_object_type_matches_objects_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md index dd031f2605a..7682cf80abf 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_complex_types_request_body.operation +openapi_client.paths.request_body_post_oneof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md index 63934610975..80e82088cdd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_request_body.operation +openapi_client.paths.request_body_post_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md index 14474108fbd..cb887f5e8ed 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md index a2bdcf86c7d..99894444d7b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.operation +openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md index 80d854e7eff..1021ca85272 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_required_request_body.operation +openapi_client.paths.request_body_post_oneof_with_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md index a6a269f1aa8..df1c37ca96a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.operation +openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md index 2b65e49f06f..35a6a6bcf14 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_pattern_validation_request_body.operation +openapi_client.paths.request_body_post_pattern_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md index 0109a423ba3..c207c982ff2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md index ad9024103e1..1e49eca8e08 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation +openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md index fc06e65a94b..1a2b19a0891 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.operation +openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md index b615be824fc..4f8dd3ca601 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_allof_request_body.operation +openapi_client.paths.request_body_post_ref_in_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md index 6fe1cd79b59..23e1c1c7e84 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_anyof_request_body.operation +openapi_client.paths.request_body_post_ref_in_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md index 277bc05982f..f32602fc100 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_items_request_body.operation +openapi_client.paths.request_body_post_ref_in_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md index 26a9d8c05a8..371fb17af57 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_not_request_body.operation +openapi_client.paths.request_body_post_ref_in_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_not_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md index 9b35bb34df3..4912f00e4ba 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_oneof_request_body.operation +openapi_client.paths.request_body_post_ref_in_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md index 4da5bb2fd84..ca6c72abb68 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ref_in_property_request_body.operation +openapi_client.paths.request_body_post_ref_in_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_property_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md index fb32df32606..8367ce59c2a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_default_validation_request_body.operation +openapi_client.paths.request_body_post_required_default_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md index 5fc5aaa3826..5a6bb47bcc1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_validation_request_body.operation +openapi_client.paths.request_body_post_required_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md index d1917bcb221..04c5a178a49 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_with_empty_array_request_body.operation +openapi_client.paths.request_body_post_required_with_empty_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md index 610ddd56ed3..d34a75a81ac 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md index b3f6e45925d..1a229cb5379 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_simple_enum_validation_request_body.operation +openapi_client.paths.request_body_post_simple_enum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md index 074b8897c69..c9024916b51 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.operation +openapi_client.paths.request_body_post_string_type_matches_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md index 9eaa98dd9f5..118257e94f3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.operation +openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md index bbf28e27903..417268d3f58 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md index 93d2f0fdb0b..ab030a1d830 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md index 4dfc24b9078..9db906cbe32 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_format_request_body.operation +openapi_client.paths.request_body_post_uri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md index 5c728aa410c..7ce4885346e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_reference_format_request_body.operation +openapi_client.paths.request_body_post_uri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md index 180e3ca0df7..bcad1cd0ae3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_template_format_request_body.operation +openapi_client.paths.request_body_post_uri_template_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md index bd1196899f6..f608d5cfa60 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md index 07083960d51..0596834e70a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md index 04bde18e729..487e6567ea5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md index 68c0cda5fdc..56d01915ab7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md index 47030a2a18a..c4829841abb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md index ecb1c4c6895..856e639b551 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md index 0704807b953..6d0d1b9cd24 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_simple_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md index d1a08bab46a..bb6e0c8cbbc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md index f5478360d53..a9a621ed118 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md index 4b7ecfdee21..f1de4ab7814 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md index f3d05d5b297..fa38624754a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md index 55efb17dc6d..82a608eb386 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md index 2ffbe705bc7..0730924c09a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md index 83d0e41e710..eb448faec46 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md index ef42615db00..d3244c2cb28 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md index 699da1d4991..bd1f6aed5b5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md index 0afe2389f97..db364155874 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation +openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md index f9373d2dded..211306a1fcb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation +openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md index 21e489b8ead..9e4bc7796b5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_int_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_int_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md index 03c1ef622ef..b0db091d735 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_number_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md index 9b2fbafcf1a..5c5bad58393 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_small_number_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md index 0384cee6fd8..0a51292b3de 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_time_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md index e3655122704..ea3230be1df 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_email_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md index 1f46d7858e0..b592169bbce 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md index 77cc20dba1c..bd1982a1363 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md index 6a6f86ee7b5..6841460dcb6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md index ecee92a82ef..8e9ffe3ceec 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md index 4fc607b4218..b5acb325f34 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md index 0f9751af197..429ec4185e7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enums_in_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md index e782eee6871..527e0b34476 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.operation +openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_forbidden_property_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_forbidden_property_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_forbidden_property_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_forbidden_property_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_forbidden_property_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md index 54e96e04d29..f6165eaf700 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_hostname_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md index 2e7e049149e..6b67c3c6cd0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation +openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md index 19124c89afc..8a5e2b2e895 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.operation +openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md index b57190613a8..a2969e02713 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.operation +openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md index d49ab322652..a905adc3e7d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv4_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md index 6f0bdf65c4e..849037c07a7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv6_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md index 38f99af75bc..68f5dde4db9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_json_pointer_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md index 33382572340..cc480f20114 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md index 2ad2c0f44f5..24b85834a3c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md index 9194f4e92ce..a5aa3d2b6f3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import max_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import max_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = max_items_api.MaxItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MaxItemsApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md index 94f4da2a652..62ae29a3fbb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxlength_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md index 1e3d5ea62a8..97673270682 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md index f24bc02e54f..8f6b460106b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md index f4de026b01e..02cb30532db 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md index f0623319deb..1b0e8b89345 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md index a2e80f516cc..c84e65d3e40 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import min_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md index 605f4403388..9111767d199 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minlength_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md index c32fe29c801..80932686545 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minproperties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md index 97f7bcff1fa..f10ac3a803d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md index cc0db50ccda..eb26f10a11e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md index 4373c46f801..4f533bab19c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md index f2e92c6f914..a24312df58d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index 00a52498cda..eea10ff93a7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_more_complex_schema_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_more_complex_schema_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index 365b2bbe3c8..17e0ba13835 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_not_response_body_for_content_types.operation +openapi_client.paths.response_body_post_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -66,7 +66,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Servers @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_not_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md index e821bba20a4..d862f126030 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md index 478075ffb53..9013325a6cb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md index 8da9e975d92..f25bbd07afc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation +openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md index 3c29f230822..057563b61a5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation +openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md index 7ee2932fe63..ad32384d076 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_properties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md index 0ad8829e9e3..f6d247c86c7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation +openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md index 802d049b6cf..c06d779c64a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md index 7da75e80400..5646db61dc2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md index b3db8a20701..fcded015635 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md index c3f84a2d1af..c76147da3fc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md index 2f30af9a726..c62f4232298 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_required_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md index acd43473cf5..59a8aed90c5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation +openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md index d9691bb1341..0a2e14b510c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md index e0fed3c6a05..1c1046391b4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md index c74b71131ec..6ad155a731f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation +openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md index 58360debb67..ef9a315b211 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md index 53de549744e..3813ad35d0c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_allof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md index 4979ec2517c..ddad8a526b4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md index a9fed183002..a0ad34ebd46 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md index 152f0f7a3ab..2ba3f228614 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_not_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md index e06989ea1cc..cf5c9406e14 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md index bfb6aa2c942..7bf1d993033 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_property_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md index 27dbc3b144d..f33377c06e7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_default_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md index b1bbd780334..875d378e0af 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md index 12fa5e0375a..ed7206b4edb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md index dcdd0878a37..9ab2652ec1f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md index ab8212b4d81..79e3d1b3af0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md index f221b5fd41a..face0e8d0d9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation +openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md index 6c6d5295b7a..bc8ebb0545f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.operation +openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md index ea686f3d9a0..8af53b5ab51 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md index b7c6bd6708f..ea563853c4b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md index 145c150a3ff..863eb3729a6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md index d3ee1f0955c..c4abca1e181 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_reference_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md index b3c216c87d2..a6c76d1210f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_template_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md b/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md index b37c67353d5..7055662bd76 100644 --- a/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md +++ b/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -unit_test_api.servers.server_0 +openapi_client.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/3_0_3_unit_test/python/pyproject.toml b/samples/client/3_0_3_unit_test/python/pyproject.toml index f930d6ed010..e28712644f2 100644 --- a/samples/client/3_0_3_unit_test/python/pyproject.toml +++ b/samples/client/3_0_3_unit_test/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "unit_test_api" = ["py.typed"] [project] -name = "unit-test-api" +name = "openapi-client" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py new file mode 100644 index 00000000000..feea94e1198 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +# flake8: noqa + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +__version__ = "1.0.0" + +# import ApiClient +from unit_test_api.api_client import ApiClient + +# import Configuration +from unit_test_api.configurations.api_configuration import ApiConfiguration + +# import exceptions +from unit_test_api.exceptions import OpenApiException +from unit_test_api.exceptions import ApiAttributeError +from unit_test_api.exceptions import ApiTypeError +from unit_test_api.exceptions import ApiValueError +from unit_test_api.exceptions import ApiKeyError +from unit_test_api.exceptions import ApiException diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py new file mode 100644 index 00000000000..83b78940685 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py @@ -0,0 +1,1402 @@ +# coding: utf-8 +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import datetime +import dataclasses +import decimal +import enum +import email +import json +import os +import io +import atexit +from multiprocessing import pool +import re +import tempfile +import typing +import typing_extensions +from urllib import parse +import urllib3 +from urllib3 import _collections, fields + + +from unit_test_api import exceptions, rest, schemas, security_schemes, api_response +from unit_test_api.configurations import api_configuration, schema_configuration as schema_configuration_ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj: typing.Any): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return obj + elif isinstance(obj, bool): + # must be before int check + return obj + elif isinstance(obj, int): + return obj + elif obj is None: + return None + elif isinstance(obj, (dict, schemas.immutabledict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +@dataclasses.dataclass +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + prefix: str + separator: str + first: bool = True + item_separator: str = dataclasses.field(init=False) + + def __post_init__(self): + self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return parse.quote(str(in_data)) + return str(in_data) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + @classmethod + def _serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + @classmethod + def _deserialize_simple( + cls, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +class Encoding: + content_type: str + headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None + style: typing.Optional[ParameterStyle] = None + explode: bool = False + allow_reserved: bool = False + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[schemas.Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +class ParameterBase(JSONDetector): + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[schemas.Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] + + _json_encoder = JSONEncoder() + + def __init_subclass__(cls, **kwargs): + if cls.explode is None: + if cls.style is ParameterStyle.FORM: + cls.explode = True + else: + cls.explode = False + + @classmethod + def _serialize_json( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=cls._json_encoder.compact_separators) + return json.dumps(in_data) + +_SERIALIZE_TYPES = typing.Union[ + int, + float, + str, + datetime.date, + datetime.datetime, + None, + bool, + list, + tuple, + dict, + schemas.immutabledict +] + +_JSON_TYPES = typing.Union[ + int, + float, + str, + None, + bool, + typing.Tuple['_JSON_TYPES', ...], + schemas.immutabledict[str, '_JSON_TYPES'], +] + +@dataclasses.dataclass +class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.PATH + style: ParameterStyle = ParameterStyle.SIMPLE + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_label( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_matrix( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = cls._serialize_simple( + in_data=in_data, + name=cls.name, + explode=cls.explode, + percent_encode=True + ) + return cls._to_dict(cls.name, value) + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if cls.style: + if cls.style is ParameterStyle.SIMPLE: + return cls.__serialize_simple(cast_in_data) + elif cls.style is ParameterStyle.LABEL: + return cls.__serialize_label(cast_in_data) + elif cls.style is ParameterStyle.MATRIX: + return cls.__serialize_matrix(cast_in_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class QueryParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.QUERY + style: ParameterStyle = ParameterStyle.FORM + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_space_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_pipe_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._serialize_form( + in_data, + name=cls.name, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: + if cls.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + raise ValueError(f'No iterator possible for style={cls.style}') + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if cls.style: + # TODO update query ones to omit setting values when [] {} or None is input + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + if cls.style is ParameterStyle.FORM: + return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) + return cls._to_dict( + cls.name, + next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) + ) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class CookieParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.FORM + in_type: ParameterInType = ParameterInType.COOKIE + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if cls.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + value = cls._serialize_form( + cast_in_data, + explode=explode, + name=cls.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return cls._to_dict(cls.name, value) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): + style: ParameterStyle = ParameterStyle.SIMPLE + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + explode: bool = False + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = _collections.HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + @classmethod + def serialize_with_name( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + value = cls._serialize_simple(cast_in_data, name, cls.explode, False) + return cls.__to_headers(((name, value),)) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls.__to_headers(((name, value),)) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + @classmethod + def deserialize( + cls, + in_data: str, + name: str + ): + if cls.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) + return cls.schema.validate_base(extracted_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + if cls._content_type_is_json(content_type): + cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) + assert media_type.schema is not None + return media_type.schema.validate_base(cast_in_data) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class HeaderParameterWithoutName(__HeaderParameterBase): + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + name, + skip_validation=skip_validation + ) + + +class HeaderParameter(__HeaderParameterBase): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + cls.name, + skip_validation=skip_validation + ) + +T = typing.TypeVar("T", bound=api_response.ApiResponse) + + +class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None + headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None + + @classmethod + @abc.abstractmethod + def get_response(cls, response, headers, body) -> T: ... + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = parse.urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + + @classmethod + def __deserialize_application_octet_stream( + cls, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or cls.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as write_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + write_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + @classmethod + def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: + content_type = response.headers.get('content-type') + deserialized_body = schemas.unset + streamed = response.supports_chunked_reads() + + deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset + if cls.headers is not None and cls.headers_schema is not None: + deserialized_headers = {} + for header_name, header_param in cls.headers.items(): + header_value = response.headers.get(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value + deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) + + if cls.content is not None: + if content_type not in cls.content: + raise exceptions.ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" + ) + body_schema = cls.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return cls.get_response( + response=response, + headers=deserialized_headers, + body=schemas.unset + ) + + if cls._content_type_is_json(content_type): + body_data = cls.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = cls.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = cls.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + elif content_type == 'application/x-pem-file': + body_data = response.data.decode() + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = schemas.get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema.validate_base(body_data) + else: + deserialized_body = body_schema.validate_base( + body_data, configuration=configuration) + elif streamed: + response.release_conn() + + return cls.get_response( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +@dataclasses.dataclass +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param configuration: api_configuration.ApiConfiguration object for this client + :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client + :param default_headers: any default headers to include when making calls to the API. + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + configuration: api_configuration.ApiConfiguration = dataclasses.field( + default_factory=lambda: api_configuration.ApiConfiguration()) + schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( + default_factory=lambda: schema_configuration_.SchemaConfiguration()) + default_headers: _collections.HTTPHeaderDict = dataclasses.field( + default_factory=lambda: _collections.HTTPHeaderDict()) + pool_threads: int = 1 + user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' + rest_client: rest.RESTClientObject = dataclasses.field(init=False) + + def __post_init__(self): + self._pool = None + self.rest_client = rest.RESTClientObject(self.configuration) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = pool.ThreadPool(self.pool_threads) + return self._pool + + def set_default_header(self, header_name: str, header_value: str): + self.default_headers[header_name] = header_value + + def call_api( + self, + resource_path: str, + method: str, + host: str, + query_params_suffix: typing.Optional[str] = None, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + body: typing.Union[str, bytes, None] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data` + :param security_requirement_object: The security requirement object, used to apply auth when making the call + :param async_req: execute request asynchronously + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the schemas.BinarySchema + instance will also inherit from FileSchema and schemas.FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + the method will return the response directly. + """ + # header parameters + used_headers = _collections.HTTPHeaderDict(self.default_headers) + user_agent_key = 'User-Agent' + if user_agent_key not in used_headers and self.user_agent: + used_headers[user_agent_key] = self.user_agent + + # auth setting + self.update_params_for_auth( + used_headers, + security_requirement_object, + resource_path, + method, + body, + query_params_suffix + ) + + # must happen after auth setting in case user is overriding those + if headers: + used_headers.update(headers) + + # request url + url = host + resource_path + if query_params_suffix: + url += query_params_suffix + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def request( + self, + method: str, + url: str, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + body: typing.Union[str, bytes, None] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "get": + return self.rest_client.get(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "head": + return self.rest_client.head(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "options": + return self.rest_client.options(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "post": + return self.rest_client.post(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "put": + return self.rest_client.put(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "patch": + return self.rest_client.patch(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "delete": + return self.rest_client.delete(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise exceptions.ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth( + self, + headers: _collections.HTTPHeaderDict, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], + resource_path: str, + method: str, + body: typing.Union[str, bytes, None] = None, + query_params_suffix: typing.Optional[str] = None + ): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param security_requirement_object: the openapi security requirement object + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + return + +@dataclasses.dataclass +class Api: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) + + @staticmethod + def _get_used_path( + used_path: str, + path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), + path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), + query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + skip_validation: bool = False + ) -> typing.Tuple[str, str]: + used_path_params = {} + if path_params is not None: + for path_parameter in path_parameters: + parameter_data = path_params.get(path_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) + used_path_params.update(serialized_data) + + for k, v in used_path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + query_params_suffix = "" + if query_params is not None: + prefix_separator_iterator = None + for query_parameter in query_parameters: + parameter_data = query_params.get(query_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = query_parameter.serialize( + parameter_data, + prefix_separator_iterator=prefix_separator_iterator, + skip_validation=skip_validation + ) + for serialized_value in serialized_data.values(): + query_params_suffix += serialized_value + return used_path, query_params_suffix + + @staticmethod + def _get_headers( + header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), + header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + accept_content_types: typing.Tuple[str, ...] = (), + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + headers = _collections.HTTPHeaderDict() + if header_params is not None: + for parameter in header_parameters: + parameter_data = header_params.get(parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) + headers.extend(serialized_data) + if accept_content_types: + for accept_content_type in accept_content_types: + headers.add('Accept', accept_content_type) + return headers + + def _get_fields_and_body( + self, + request_body: typing.Type[RequestBody], + body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], + content_type: str, + headers: _collections.HTTPHeaderDict + ): + if request_body.required and body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + + if isinstance(body, schemas.Unset): + return None, None + + serialized_fields = None + serialized_body = None + serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) + headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + serialized_fields = serialized_data['fields'] + elif 'body' in serialized_data: + serialized_body = serialized_data['body'] + return serialized_fields, serialized_body + + @staticmethod + def _verify_response_status(response: api_response.ApiResponse): + if not 200 <= response.response.status <= 399: + raise exceptions.ApiException( + status=response.response.status, + reason=response.response.reason, + api_response=response + ) + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[rest.RequestField, ...] + + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType schemas.Schema info + """ + __json_encoder = JSONEncoder() + __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} + content: typing.Dict[str, typing.Type[MediaType]] + required: bool = False + + @classmethod + def __serialize_json( + cls, + in_data: _JSON_TYPES + ) -> SerializedRequestBody: + in_data = cls.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return {'body': json_str} + + @staticmethod + def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: + return {'body': str(in_data)} + + @classmethod + def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: + json_value = cls.__json_encoder.default(value) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + @classmethod + def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: + if isinstance(value, str): + request_field = rest.RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = rest.RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, schemas.FileIO): + # TODO use content.encoding to limit allowed content types if they are present + urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, urllib3_request_field) + value.close() + else: + request_field = cls.__multipart_json_item(key=key, value=value) + return request_field + + @classmethod + def __serialize_multipart_form_data( + cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] + ) -> SerializedRequestBody: + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a rest.RequestField for each item with name=key + for item in value: + request_field = cls.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore + fields.append(request_field) + else: + request_field = cls.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return {'fields': tuple(fields)} + + @staticmethod + def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: + if isinstance(in_data, bytes): + return {'body': in_data} + # schemas.FileIO type + used_in_data = in_data.read() + in_data.close() + return {'body': used_in_data} + + @classmethod + def __serialize_application_x_www_form_data( + cls, in_data: schemas.immutabledict[str, _JSON_TYPES] + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + cast_in_data = cls.__json_encoder.default(in_data) + value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return {'body': value} + + @classmethod + def serialize( + cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = cls.content[content_type] + assert media_type.schema is not None + schema = schemas.get_class(media_type.schema) + used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() + cast_in_data = schema.validate_base(in_data, configuration=used_configuration) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if cls._content_type_is_json(content_type): + if isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") + return cls.__serialize_json(cast_in_data) + elif content_type in cls.__plain_txt_content_types: + if not isinstance(cast_in_data, (int, float, str)): + raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") + return cls.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") + return cls.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError( + f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") + return cls.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + if not isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") + return cls.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py new file mode 100644 index 00000000000..805c5f95e40 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py @@ -0,0 +1,28 @@ +# coding: utf-8 +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +import urllib3 + +from unit_test_api import schemas + + +@dataclasses.dataclass(frozen=True) +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] + headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] + + +@dataclasses.dataclass(frozen=True) +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py new file mode 100644 index 00000000000..7840f7726f6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py new file mode 100644 index 00000000000..59134cb109c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py @@ -0,0 +1,536 @@ +import typing +import typing_extensions + +from openapi_client.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody +from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody +from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody +from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody +from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody +from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody +from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody +from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody +from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody +from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody +from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody +from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody +from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody +from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody +from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody +from openapi_client.apis.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from openapi_client.apis.paths.request_body_post_invalid_string_value_for_default_request_body import RequestBodyPostInvalidStringValueForDefaultRequestBody +from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody +from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody +from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody +from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody +from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody +from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody +from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody +from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody +from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody +from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody +from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody +from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody +from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody +from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody +from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody +from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody +from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody +from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_additionalproperties_request_body import RequestBodyPostRefInAdditionalpropertiesRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_allof_request_body import RequestBodyPostRefInAllofRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_anyof_request_body import RequestBodyPostRefInAnyofRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_items_request_body import RequestBodyPostRefInItemsRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_not_request_body import RequestBodyPostRefInNotRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_oneof_request_body import RequestBodyPostRefInOneofRequestBody +from openapi_client.apis.paths.request_body_post_ref_in_property_request_body import RequestBodyPostRefInPropertyRequestBody +from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody +from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody +from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody +from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody +from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody +from openapi_client.apis.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody +from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody +from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody +from openapi_client.apis.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_allof_response_body_for_content_types import ResponseBodyPostRefInAllofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_anyof_response_body_for_content_types import ResponseBodyPostRefInAnyofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_items_response_body_for_content_types import ResponseBodyPostRefInItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_not_response_body_for_content_types import ResponseBodyPostRefInNotResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_oneof_response_body_for_content_types import ResponseBodyPostRefInOneofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ref_in_property_response_body_for_content_types import ResponseBodyPostRefInPropertyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes + +PathToApi = typing.TypedDict( + 'PathToApi', + { + "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody], + "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody], + "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody], + "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody], + "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": typing.Type[RequestBodyPostAllofCombinedWithAnyofOneofRequestBody], + "/requestBody/postAllofRequestBody": typing.Type[RequestBodyPostAllofRequestBody], + "/requestBody/postAllofSimpleTypesRequestBody": typing.Type[RequestBodyPostAllofSimpleTypesRequestBody], + "/requestBody/postAllofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAllofWithBaseSchemaRequestBody], + "/requestBody/postAllofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithOneEmptySchemaRequestBody], + "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody], + "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheLastEmptySchemaRequestBody], + "/requestBody/postAllofWithTwoEmptySchemasRequestBody": typing.Type[RequestBodyPostAllofWithTwoEmptySchemasRequestBody], + "/requestBody/postAnyofComplexTypesRequestBody": typing.Type[RequestBodyPostAnyofComplexTypesRequestBody], + "/requestBody/postAnyofRequestBody": typing.Type[RequestBodyPostAnyofRequestBody], + "/requestBody/postAnyofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAnyofWithBaseSchemaRequestBody], + "/requestBody/postAnyofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAnyofWithOneEmptySchemaRequestBody], + "/requestBody/postArrayTypeMatchesArraysRequestBody": typing.Type[RequestBodyPostArrayTypeMatchesArraysRequestBody], + "/requestBody/postBooleanTypeMatchesBooleansRequestBody": typing.Type[RequestBodyPostBooleanTypeMatchesBooleansRequestBody], + "/requestBody/postByIntRequestBody": typing.Type[RequestBodyPostByIntRequestBody], + "/requestBody/postByNumberRequestBody": typing.Type[RequestBodyPostByNumberRequestBody], + "/requestBody/postBySmallNumberRequestBody": typing.Type[RequestBodyPostBySmallNumberRequestBody], + "/requestBody/postDateTimeFormatRequestBody": typing.Type[RequestBodyPostDateTimeFormatRequestBody], + "/requestBody/postEmailFormatRequestBody": typing.Type[RequestBodyPostEmailFormatRequestBody], + "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": typing.Type[RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody], + "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": typing.Type[RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody], + "/requestBody/postEnumWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostEnumWithEscapedCharactersRequestBody], + "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": typing.Type[RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody], + "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": typing.Type[RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody], + "/requestBody/postEnumsInPropertiesRequestBody": typing.Type[RequestBodyPostEnumsInPropertiesRequestBody], + "/requestBody/postForbiddenPropertyRequestBody": typing.Type[RequestBodyPostForbiddenPropertyRequestBody], + "/requestBody/postHostnameFormatRequestBody": typing.Type[RequestBodyPostHostnameFormatRequestBody], + "/requestBody/postIntegerTypeMatchesIntegersRequestBody": typing.Type[RequestBodyPostIntegerTypeMatchesIntegersRequestBody], + "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody": typing.Type[RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody], + "/requestBody/postInvalidStringValueForDefaultRequestBody": typing.Type[RequestBodyPostInvalidStringValueForDefaultRequestBody], + "/requestBody/postIpv4FormatRequestBody": typing.Type[RequestBodyPostIpv4FormatRequestBody], + "/requestBody/postIpv6FormatRequestBody": typing.Type[RequestBodyPostIpv6FormatRequestBody], + "/requestBody/postJsonPointerFormatRequestBody": typing.Type[RequestBodyPostJsonPointerFormatRequestBody], + "/requestBody/postMaximumValidationRequestBody": typing.Type[RequestBodyPostMaximumValidationRequestBody], + "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": typing.Type[RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody], + "/requestBody/postMaxitemsValidationRequestBody": typing.Type[RequestBodyPostMaxitemsValidationRequestBody], + "/requestBody/postMaxlengthValidationRequestBody": typing.Type[RequestBodyPostMaxlengthValidationRequestBody], + "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": typing.Type[RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody], + "/requestBody/postMaxpropertiesValidationRequestBody": typing.Type[RequestBodyPostMaxpropertiesValidationRequestBody], + "/requestBody/postMinimumValidationRequestBody": typing.Type[RequestBodyPostMinimumValidationRequestBody], + "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": typing.Type[RequestBodyPostMinimumValidationWithSignedIntegerRequestBody], + "/requestBody/postMinitemsValidationRequestBody": typing.Type[RequestBodyPostMinitemsValidationRequestBody], + "/requestBody/postMinlengthValidationRequestBody": typing.Type[RequestBodyPostMinlengthValidationRequestBody], + "/requestBody/postMinpropertiesValidationRequestBody": typing.Type[RequestBodyPostMinpropertiesValidationRequestBody], + "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody], + "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody], + "/requestBody/postNestedItemsRequestBody": typing.Type[RequestBodyPostNestedItemsRequestBody], + "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody], + "/requestBody/postNotMoreComplexSchemaRequestBody": typing.Type[RequestBodyPostNotMoreComplexSchemaRequestBody], + "/requestBody/postNotRequestBody": typing.Type[RequestBodyPostNotRequestBody], + "/requestBody/postNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostNulCharactersInStringsRequestBody], + "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": typing.Type[RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody], + "/requestBody/postNumberTypeMatchesNumbersRequestBody": typing.Type[RequestBodyPostNumberTypeMatchesNumbersRequestBody], + "/requestBody/postObjectPropertiesValidationRequestBody": typing.Type[RequestBodyPostObjectPropertiesValidationRequestBody], + "/requestBody/postObjectTypeMatchesObjectsRequestBody": typing.Type[RequestBodyPostObjectTypeMatchesObjectsRequestBody], + "/requestBody/postOneofComplexTypesRequestBody": typing.Type[RequestBodyPostOneofComplexTypesRequestBody], + "/requestBody/postOneofRequestBody": typing.Type[RequestBodyPostOneofRequestBody], + "/requestBody/postOneofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostOneofWithBaseSchemaRequestBody], + "/requestBody/postOneofWithEmptySchemaRequestBody": typing.Type[RequestBodyPostOneofWithEmptySchemaRequestBody], + "/requestBody/postOneofWithRequiredRequestBody": typing.Type[RequestBodyPostOneofWithRequiredRequestBody], + "/requestBody/postPatternIsNotAnchoredRequestBody": typing.Type[RequestBodyPostPatternIsNotAnchoredRequestBody], + "/requestBody/postPatternValidationRequestBody": typing.Type[RequestBodyPostPatternValidationRequestBody], + "/requestBody/postPropertiesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostPropertiesWithEscapedCharactersRequestBody], + "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": typing.Type[RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody], + "/requestBody/postRefInAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostRefInAdditionalpropertiesRequestBody], + "/requestBody/postRefInAllofRequestBody": typing.Type[RequestBodyPostRefInAllofRequestBody], + "/requestBody/postRefInAnyofRequestBody": typing.Type[RequestBodyPostRefInAnyofRequestBody], + "/requestBody/postRefInItemsRequestBody": typing.Type[RequestBodyPostRefInItemsRequestBody], + "/requestBody/postRefInNotRequestBody": typing.Type[RequestBodyPostRefInNotRequestBody], + "/requestBody/postRefInOneofRequestBody": typing.Type[RequestBodyPostRefInOneofRequestBody], + "/requestBody/postRefInPropertyRequestBody": typing.Type[RequestBodyPostRefInPropertyRequestBody], + "/requestBody/postRequiredDefaultValidationRequestBody": typing.Type[RequestBodyPostRequiredDefaultValidationRequestBody], + "/requestBody/postRequiredValidationRequestBody": typing.Type[RequestBodyPostRequiredValidationRequestBody], + "/requestBody/postRequiredWithEmptyArrayRequestBody": typing.Type[RequestBodyPostRequiredWithEmptyArrayRequestBody], + "/requestBody/postRequiredWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostRequiredWithEscapedCharactersRequestBody], + "/requestBody/postSimpleEnumValidationRequestBody": typing.Type[RequestBodyPostSimpleEnumValidationRequestBody], + "/requestBody/postStringTypeMatchesStringsRequestBody": typing.Type[RequestBodyPostStringTypeMatchesStringsRequestBody], + "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody": typing.Type[RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody], + "/requestBody/postUniqueitemsFalseValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseValidationRequestBody], + "/requestBody/postUniqueitemsValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsValidationRequestBody], + "/requestBody/postUriFormatRequestBody": typing.Type[RequestBodyPostUriFormatRequestBody], + "/requestBody/postUriReferenceFormatRequestBody": typing.Type[RequestBodyPostUriReferenceFormatRequestBody], + "/requestBody/postUriTemplateFormatRequestBody": typing.Type[RequestBodyPostUriTemplateFormatRequestBody], + "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes], + "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes], + "/responseBody/postAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofResponseBodyForContentTypes], + "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes], + "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes], + "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes], + "/responseBody/postAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofResponseBodyForContentTypes], + "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes], + "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": typing.Type[ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes], + "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": typing.Type[ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes], + "/responseBody/postByIntResponseBodyForContentTypes": typing.Type[ResponseBodyPostByIntResponseBodyForContentTypes], + "/responseBody/postByNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostByNumberResponseBodyForContentTypes], + "/responseBody/postBySmallNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostBySmallNumberResponseBodyForContentTypes], + "/responseBody/postDateTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateTimeFormatResponseBodyForContentTypes], + "/responseBody/postEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmailFormatResponseBodyForContentTypes], + "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes], + "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes], + "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes], + "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes], + "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes], + "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes], + "/responseBody/postHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostHostnameFormatResponseBodyForContentTypes], + "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": typing.Type[ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes], + "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes": typing.Type[ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes], + "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes], + "/responseBody/postIpv4FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv4FormatResponseBodyForContentTypes], + "/responseBody/postIpv6FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv6FormatResponseBodyForContentTypes], + "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes], + "/responseBody/postMaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationResponseBodyForContentTypes], + "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes], + "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes], + "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes], + "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes], + "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes], + "/responseBody/postMinimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationResponseBodyForContentTypes], + "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes], + "/responseBody/postMinitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinitemsValidationResponseBodyForContentTypes], + "/responseBody/postMinlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinlengthValidationResponseBodyForContentTypes], + "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes], + "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNestedItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedItemsResponseBodyForContentTypes], + "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes], + "/responseBody/postNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotResponseBodyForContentTypes], + "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes], + "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes], + "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": typing.Type[ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes], + "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes], + "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes], + "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes], + "/responseBody/postOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofResponseBodyForContentTypes], + "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes], + "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes], + "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes], + "/responseBody/postPatternValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternValidationResponseBodyForContentTypes], + "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes], + "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes], + "/responseBody/postRefInAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAllofResponseBodyForContentTypes], + "/responseBody/postRefInAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAnyofResponseBodyForContentTypes], + "/responseBody/postRefInItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInItemsResponseBodyForContentTypes], + "/responseBody/postRefInNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInNotResponseBodyForContentTypes], + "/responseBody/postRefInOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInOneofResponseBodyForContentTypes], + "/responseBody/postRefInPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInPropertyResponseBodyForContentTypes], + "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes], + "/responseBody/postRequiredValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredValidationResponseBodyForContentTypes], + "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes], + "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes], + "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes], + "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes": typing.Type[ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes], + "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes], + "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes], + "/responseBody/postUriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriFormatResponseBodyForContentTypes], + "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes], + "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes], + } +) + +path_to_api = PathToApi( + { + "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody": RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, + "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, + "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody": RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, + "/requestBody/postAllofRequestBody": RequestBodyPostAllofRequestBody, + "/requestBody/postAllofSimpleTypesRequestBody": RequestBodyPostAllofSimpleTypesRequestBody, + "/requestBody/postAllofWithBaseSchemaRequestBody": RequestBodyPostAllofWithBaseSchemaRequestBody, + "/requestBody/postAllofWithOneEmptySchemaRequestBody": RequestBodyPostAllofWithOneEmptySchemaRequestBody, + "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, + "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, + "/requestBody/postAllofWithTwoEmptySchemasRequestBody": RequestBodyPostAllofWithTwoEmptySchemasRequestBody, + "/requestBody/postAnyofComplexTypesRequestBody": RequestBodyPostAnyofComplexTypesRequestBody, + "/requestBody/postAnyofRequestBody": RequestBodyPostAnyofRequestBody, + "/requestBody/postAnyofWithBaseSchemaRequestBody": RequestBodyPostAnyofWithBaseSchemaRequestBody, + "/requestBody/postAnyofWithOneEmptySchemaRequestBody": RequestBodyPostAnyofWithOneEmptySchemaRequestBody, + "/requestBody/postArrayTypeMatchesArraysRequestBody": RequestBodyPostArrayTypeMatchesArraysRequestBody, + "/requestBody/postBooleanTypeMatchesBooleansRequestBody": RequestBodyPostBooleanTypeMatchesBooleansRequestBody, + "/requestBody/postByIntRequestBody": RequestBodyPostByIntRequestBody, + "/requestBody/postByNumberRequestBody": RequestBodyPostByNumberRequestBody, + "/requestBody/postBySmallNumberRequestBody": RequestBodyPostBySmallNumberRequestBody, + "/requestBody/postDateTimeFormatRequestBody": RequestBodyPostDateTimeFormatRequestBody, + "/requestBody/postEmailFormatRequestBody": RequestBodyPostEmailFormatRequestBody, + "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, + "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, + "/requestBody/postEnumWithEscapedCharactersRequestBody": RequestBodyPostEnumWithEscapedCharactersRequestBody, + "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, + "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, + "/requestBody/postEnumsInPropertiesRequestBody": RequestBodyPostEnumsInPropertiesRequestBody, + "/requestBody/postForbiddenPropertyRequestBody": RequestBodyPostForbiddenPropertyRequestBody, + "/requestBody/postHostnameFormatRequestBody": RequestBodyPostHostnameFormatRequestBody, + "/requestBody/postIntegerTypeMatchesIntegersRequestBody": RequestBodyPostIntegerTypeMatchesIntegersRequestBody, + "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody": RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + "/requestBody/postInvalidStringValueForDefaultRequestBody": RequestBodyPostInvalidStringValueForDefaultRequestBody, + "/requestBody/postIpv4FormatRequestBody": RequestBodyPostIpv4FormatRequestBody, + "/requestBody/postIpv6FormatRequestBody": RequestBodyPostIpv6FormatRequestBody, + "/requestBody/postJsonPointerFormatRequestBody": RequestBodyPostJsonPointerFormatRequestBody, + "/requestBody/postMaximumValidationRequestBody": RequestBodyPostMaximumValidationRequestBody, + "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, + "/requestBody/postMaxitemsValidationRequestBody": RequestBodyPostMaxitemsValidationRequestBody, + "/requestBody/postMaxlengthValidationRequestBody": RequestBodyPostMaxlengthValidationRequestBody, + "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, + "/requestBody/postMaxpropertiesValidationRequestBody": RequestBodyPostMaxpropertiesValidationRequestBody, + "/requestBody/postMinimumValidationRequestBody": RequestBodyPostMinimumValidationRequestBody, + "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, + "/requestBody/postMinitemsValidationRequestBody": RequestBodyPostMinitemsValidationRequestBody, + "/requestBody/postMinlengthValidationRequestBody": RequestBodyPostMinlengthValidationRequestBody, + "/requestBody/postMinpropertiesValidationRequestBody": RequestBodyPostMinpropertiesValidationRequestBody, + "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, + "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, + "/requestBody/postNestedItemsRequestBody": RequestBodyPostNestedItemsRequestBody, + "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, + "/requestBody/postNotMoreComplexSchemaRequestBody": RequestBodyPostNotMoreComplexSchemaRequestBody, + "/requestBody/postNotRequestBody": RequestBodyPostNotRequestBody, + "/requestBody/postNulCharactersInStringsRequestBody": RequestBodyPostNulCharactersInStringsRequestBody, + "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, + "/requestBody/postNumberTypeMatchesNumbersRequestBody": RequestBodyPostNumberTypeMatchesNumbersRequestBody, + "/requestBody/postObjectPropertiesValidationRequestBody": RequestBodyPostObjectPropertiesValidationRequestBody, + "/requestBody/postObjectTypeMatchesObjectsRequestBody": RequestBodyPostObjectTypeMatchesObjectsRequestBody, + "/requestBody/postOneofComplexTypesRequestBody": RequestBodyPostOneofComplexTypesRequestBody, + "/requestBody/postOneofRequestBody": RequestBodyPostOneofRequestBody, + "/requestBody/postOneofWithBaseSchemaRequestBody": RequestBodyPostOneofWithBaseSchemaRequestBody, + "/requestBody/postOneofWithEmptySchemaRequestBody": RequestBodyPostOneofWithEmptySchemaRequestBody, + "/requestBody/postOneofWithRequiredRequestBody": RequestBodyPostOneofWithRequiredRequestBody, + "/requestBody/postPatternIsNotAnchoredRequestBody": RequestBodyPostPatternIsNotAnchoredRequestBody, + "/requestBody/postPatternValidationRequestBody": RequestBodyPostPatternValidationRequestBody, + "/requestBody/postPropertiesWithEscapedCharactersRequestBody": RequestBodyPostPropertiesWithEscapedCharactersRequestBody, + "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, + "/requestBody/postRefInAdditionalpropertiesRequestBody": RequestBodyPostRefInAdditionalpropertiesRequestBody, + "/requestBody/postRefInAllofRequestBody": RequestBodyPostRefInAllofRequestBody, + "/requestBody/postRefInAnyofRequestBody": RequestBodyPostRefInAnyofRequestBody, + "/requestBody/postRefInItemsRequestBody": RequestBodyPostRefInItemsRequestBody, + "/requestBody/postRefInNotRequestBody": RequestBodyPostRefInNotRequestBody, + "/requestBody/postRefInOneofRequestBody": RequestBodyPostRefInOneofRequestBody, + "/requestBody/postRefInPropertyRequestBody": RequestBodyPostRefInPropertyRequestBody, + "/requestBody/postRequiredDefaultValidationRequestBody": RequestBodyPostRequiredDefaultValidationRequestBody, + "/requestBody/postRequiredValidationRequestBody": RequestBodyPostRequiredValidationRequestBody, + "/requestBody/postRequiredWithEmptyArrayRequestBody": RequestBodyPostRequiredWithEmptyArrayRequestBody, + "/requestBody/postRequiredWithEscapedCharactersRequestBody": RequestBodyPostRequiredWithEscapedCharactersRequestBody, + "/requestBody/postSimpleEnumValidationRequestBody": RequestBodyPostSimpleEnumValidationRequestBody, + "/requestBody/postStringTypeMatchesStringsRequestBody": RequestBodyPostStringTypeMatchesStringsRequestBody, + "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody": RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + "/requestBody/postUniqueitemsFalseValidationRequestBody": RequestBodyPostUniqueitemsFalseValidationRequestBody, + "/requestBody/postUniqueitemsValidationRequestBody": RequestBodyPostUniqueitemsValidationRequestBody, + "/requestBody/postUriFormatRequestBody": RequestBodyPostUriFormatRequestBody, + "/requestBody/postUriReferenceFormatRequestBody": RequestBodyPostUriReferenceFormatRequestBody, + "/requestBody/postUriTemplateFormatRequestBody": RequestBodyPostUriTemplateFormatRequestBody, + "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + "/responseBody/postAllofResponseBodyForContentTypes": ResponseBodyPostAllofResponseBodyForContentTypes, + "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, + "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, + "/responseBody/postAnyofResponseBodyForContentTypes": ResponseBodyPostAnyofResponseBodyForContentTypes, + "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, + "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + "/responseBody/postByIntResponseBodyForContentTypes": ResponseBodyPostByIntResponseBodyForContentTypes, + "/responseBody/postByNumberResponseBodyForContentTypes": ResponseBodyPostByNumberResponseBodyForContentTypes, + "/responseBody/postBySmallNumberResponseBodyForContentTypes": ResponseBodyPostBySmallNumberResponseBodyForContentTypes, + "/responseBody/postDateTimeFormatResponseBodyForContentTypes": ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, + "/responseBody/postEmailFormatResponseBodyForContentTypes": ResponseBodyPostEmailFormatResponseBodyForContentTypes, + "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, + "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, + "/responseBody/postHostnameFormatResponseBodyForContentTypes": ResponseBodyPostHostnameFormatResponseBodyForContentTypes, + "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes": ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes": ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes, + "/responseBody/postIpv4FormatResponseBodyForContentTypes": ResponseBodyPostIpv4FormatResponseBodyForContentTypes, + "/responseBody/postIpv6FormatResponseBodyForContentTypes": ResponseBodyPostIpv6FormatResponseBodyForContentTypes, + "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, + "/responseBody/postMaximumValidationResponseBodyForContentTypes": ResponseBodyPostMaximumValidationResponseBodyForContentTypes, + "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, + "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, + "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, + "/responseBody/postMinimumValidationResponseBodyForContentTypes": ResponseBodyPostMinimumValidationResponseBodyForContentTypes, + "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + "/responseBody/postMinitemsValidationResponseBodyForContentTypes": ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, + "/responseBody/postMinlengthValidationResponseBodyForContentTypes": ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, + "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, + "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNestedItemsResponseBodyForContentTypes": ResponseBodyPostNestedItemsResponseBodyForContentTypes, + "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, + "/responseBody/postNotResponseBodyForContentTypes": ResponseBodyPostNotResponseBodyForContentTypes, + "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, + "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, + "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, + "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, + "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, + "/responseBody/postOneofResponseBodyForContentTypes": ResponseBodyPostOneofResponseBodyForContentTypes, + "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, + "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, + "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, + "/responseBody/postPatternValidationResponseBodyForContentTypes": ResponseBodyPostPatternValidationResponseBodyForContentTypes, + "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes, + "/responseBody/postRefInAllofResponseBodyForContentTypes": ResponseBodyPostRefInAllofResponseBodyForContentTypes, + "/responseBody/postRefInAnyofResponseBodyForContentTypes": ResponseBodyPostRefInAnyofResponseBodyForContentTypes, + "/responseBody/postRefInItemsResponseBodyForContentTypes": ResponseBodyPostRefInItemsResponseBodyForContentTypes, + "/responseBody/postRefInNotResponseBodyForContentTypes": ResponseBodyPostRefInNotResponseBodyForContentTypes, + "/responseBody/postRefInOneofResponseBodyForContentTypes": ResponseBodyPostRefInOneofResponseBodyForContentTypes, + "/responseBody/postRefInPropertyResponseBodyForContentTypes": ResponseBodyPostRefInPropertyResponseBodyForContentTypes, + "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, + "/responseBody/postRequiredValidationResponseBodyForContentTypes": ResponseBodyPostRequiredValidationResponseBodyForContentTypes, + "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, + "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, + "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, + "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes": ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, + "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, + "/responseBody/postUriFormatResponseBodyForContentTypes": ResponseBodyPostUriFormatResponseBodyForContentTypes, + "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, + "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, + } +) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py new file mode 100644 index 00000000000..cf241d055c1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py new file mode 100644 index 00000000000..6f675e44ce3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py new file mode 100644 index 00000000000..5929c8d2717 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py new file mode 100644 index 00000000000..48203c5cefc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py new file mode 100644 index 00000000000..f3bd123be3d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py new file mode 100644 index 00000000000..cb1dbbedd7b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofCombinedWithAnyofOneofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py new file mode 100644 index 00000000000..20aec555912 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py new file mode 100644 index 00000000000..a916fe793cc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofSimpleTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py new file mode 100644 index 00000000000..0c9f930d9d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py new file mode 100644 index 00000000000..401ffbb3324 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithOneEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py new file mode 100644 index 00000000000..bc4f2eda192 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py new file mode 100644 index 00000000000..ac509748dc6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTheLastEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py new file mode 100644 index 00000000000..276e657b0a2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTwoEmptySchemasRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py new file mode 100644 index 00000000000..7c6d7a4d16a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofComplexTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py new file mode 100644 index 00000000000..953f6926245 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py new file mode 100644 index 00000000000..ec1ca4e8002 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py new file mode 100644 index 00000000000..3b0ae778b39 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofWithOneEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py new file mode 100644 index 00000000000..bd186c8e433 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import ApiForPost + + +class RequestBodyPostArrayTypeMatchesArraysRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py new file mode 100644 index 00000000000..e7f71649b89 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import ApiForPost + + +class RequestBodyPostBooleanTypeMatchesBooleansRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py new file mode 100644 index 00000000000..4e248e736b3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import ApiForPost + + +class RequestBodyPostByIntRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py new file mode 100644 index 00000000000..6f7d7557cf1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import ApiForPost + + +class RequestBodyPostByNumberRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py new file mode 100644 index 00000000000..3870e6064fa --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import ApiForPost + + +class RequestBodyPostBySmallNumberRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py new file mode 100644 index 00000000000..9a68bdc1aaa --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostDateTimeFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py new file mode 100644 index 00000000000..f8e49f7922f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostEmailFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py new file mode 100644 index 00000000000..ad7bd4b42b4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py new file mode 100644 index 00000000000..9dcd7358cd0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..829a6de9cf6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py new file mode 100644 index 00000000000..fbc820e7b8d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py new file mode 100644 index 00000000000..2f1a0b24e33 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py new file mode 100644 index 00000000000..b53680477cf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumsInPropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py new file mode 100644 index 00000000000..fc686241e90 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import ApiForPost + + +class RequestBodyPostForbiddenPropertyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py new file mode 100644 index 00000000000..bc3298eb898 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostHostnameFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py new file mode 100644 index 00000000000..95d69960a99 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import ApiForPost + + +class RequestBodyPostIntegerTypeMatchesIntegersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py new file mode 100644 index 00000000000..28e166a8aaf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import ApiForPost + + +class RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py new file mode 100644 index 00000000000..6a9a908ce50 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import ApiForPost + + +class RequestBodyPostInvalidStringValueForDefaultRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py new file mode 100644 index 00000000000..fbe904fd1f3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIpv4FormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py new file mode 100644 index 00000000000..2dcf480c366 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIpv6FormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py new file mode 100644 index 00000000000..1cf91b51501 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostJsonPointerFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py new file mode 100644 index 00000000000..9273dce5d86 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaximumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py new file mode 100644 index 00000000000..30584fb32fe --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py new file mode 100644 index 00000000000..c9ca86ae75f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py new file mode 100644 index 00000000000..c23e88b0d67 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxlengthValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py new file mode 100644 index 00000000000..52a7a084e1d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py new file mode 100644 index 00000000000..f39ee138ba9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxpropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py new file mode 100644 index 00000000000..0009e26c08a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinimumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py new file mode 100644 index 00000000000..653ccb088ef --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinimumValidationWithSignedIntegerRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py new file mode 100644 index 00000000000..043ae5801c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py new file mode 100644 index 00000000000..f2846ae7901 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinlengthValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py new file mode 100644 index 00000000000..9de110a009a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinpropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..a2e38880b90 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..66511fe1ec9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py new file mode 100644 index 00000000000..8ac640a08d1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..087e0ba6f85 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py new file mode 100644 index 00000000000..25cf257f4d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostNotMoreComplexSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py new file mode 100644 index 00000000000..b68f3732fd4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_request_body.post.operation import ApiForPost + + +class RequestBodyPostNotRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py new file mode 100644 index 00000000000..651b397ef9a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import ApiForPost + + +class RequestBodyPostNulCharactersInStringsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py new file mode 100644 index 00000000000..ec06a06c1ef --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import ApiForPost + + +class RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py new file mode 100644 index 00000000000..fac543eb3b8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import ApiForPost + + +class RequestBodyPostNumberTypeMatchesNumbersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py new file mode 100644 index 00000000000..ea3b11f8e6e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostObjectPropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py new file mode 100644 index 00000000000..d01c15d081c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import ApiForPost + + +class RequestBodyPostObjectTypeMatchesObjectsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py new file mode 100644 index 00000000000..22543709f59 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofComplexTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py new file mode 100644 index 00000000000..b47953c0ee3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py new file mode 100644 index 00000000000..c27f4afa611 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py new file mode 100644 index 00000000000..6ac292344c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py new file mode 100644 index 00000000000..43c08766171 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithRequiredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py new file mode 100644 index 00000000000..20fc039d931 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternIsNotAnchoredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py new file mode 100644 index 00000000000..5ab0b9fd604 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..26834d3df67 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertiesWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py new file mode 100644 index 00000000000..e416e4e64c6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py new file mode 100644 index 00000000000..9f46f1f5c72 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInAdditionalpropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py new file mode 100644 index 00000000000..df93a2bda63 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInAllofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py new file mode 100644 index 00000000000..ffdd0894c9d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInAnyofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py new file mode 100644 index 00000000000..d0aa910477b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py new file mode 100644 index 00000000000..f4d6f93ad31 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInNotRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py new file mode 100644 index 00000000000..6d220a41f9c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInOneofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py new file mode 100644 index 00000000000..8724f70525b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import ApiForPost + + +class RequestBodyPostRefInPropertyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py new file mode 100644 index 00000000000..c11ae26f038 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredDefaultValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py new file mode 100644 index 00000000000..c64ede75b9b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py new file mode 100644 index 00000000000..764233a68b7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredWithEmptyArrayRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..182b1b839f0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py new file mode 100644 index 00000000000..7ebbd2f5ea3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostSimpleEnumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py new file mode 100644 index 00000000000..8d44f510846 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import ApiForPost + + +class RequestBodyPostStringTypeMatchesStringsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py new file mode 100644 index 00000000000..2bcd0ba3d2e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import ApiForPost + + +class RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py new file mode 100644 index 00000000000..45d607b6350 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsFalseValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py new file mode 100644 index 00000000000..5f891c9fbb0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py new file mode 100644 index 00000000000..0b1fb73cfe3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py new file mode 100644 index 00000000000..c322e59b291 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriReferenceFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py new file mode 100644 index 00000000000..2a5b4298591 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriTemplateFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py new file mode 100644 index 00000000000..81ab1558148 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..22bca357cff --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py new file mode 100644 index 00000000000..2f583060e1a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py new file mode 100644 index 00000000000..0337e6ee375 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..5443c652c01 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..2cf80e3bc38 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..d7b9a493be0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..01acd5af774 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..844ab1cf294 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..6ebfece4c12 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..557ec1e4d5e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..584ff83aff8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..fefa96348d7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..3a1aecbf0dd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..282beb275d8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..d2ebe614192 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py new file mode 100644 index 00000000000..215c7358e4d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py new file mode 100644 index 00000000000..a601d6a59f1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py new file mode 100644 index 00000000000..7d3313c203b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostByIntResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py new file mode 100644 index 00000000000..002e25e9994 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostByNumberResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py new file mode 100644 index 00000000000..d99c2fc52ea --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostBySmallNumberResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..9875a541218 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDateTimeFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..21f627bb4cb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEmailFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py new file mode 100644 index 00000000000..ee5a91a625b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py new file mode 100644 index 00000000000..6a2ea03f86c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..c1ba12c5306 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py new file mode 100644 index 00000000000..703ac3a0abe --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py new file mode 100644 index 00000000000..ff892aade79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..c3a54d88e56 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py new file mode 100644 index 00000000000..48c38287f9c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..f6c811f9d72 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostHostnameFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py new file mode 100644 index 00000000000..d3b024955f5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py new file mode 100644 index 00000000000..299f94246cf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py new file mode 100644 index 00000000000..b7ce4b9fde7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py new file mode 100644 index 00000000000..7d3b34393dd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIpv4FormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py new file mode 100644 index 00000000000..0e4a27008e4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIpv6FormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..f2c04d68434 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..682e7761990 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaximumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..291331d7deb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..2068f655d65 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..2ce24daae84 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py new file mode 100644 index 00000000000..ba62c77f93d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..080b7112dd4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..6de48e15f3b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinimumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..d47e57a46fe --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..b37a0b56f14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..739042a805a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinlengthValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..3b9a8146c52 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..6b47c344d11 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..59bdecd8653 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py new file mode 100644 index 00000000000..bc670a27186 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..811164f539e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..ccdd43ff87a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py new file mode 100644 index 00000000000..7f6339040dd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNotResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..7af0b6e25cd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py new file mode 100644 index 00000000000..3430f020347 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py new file mode 100644 index 00000000000..8963afeef3a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..fea3a09c6c4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py new file mode 100644 index 00000000000..ea2ecbbc856 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..394d167d062 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..32674b945da --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..ef54203ae92 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..df1fbe4ba91 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py new file mode 100644 index 00000000000..e4f473e6ba4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py new file mode 100644 index 00000000000..1ee305ce7d0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..f935d231123 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..ddb66b4e4ad --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py new file mode 100644 index 00000000000..71a7fcacc73 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..dc6e2b22ab6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..805c5fa9567 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInAllofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..9f1dbed4494 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInAnyofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py new file mode 100644 index 00000000000..555b3f94ac5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py new file mode 100644 index 00000000000..3de1498c519 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInNotResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..e56d747df8e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInOneofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py new file mode 100644 index 00000000000..81836b718bf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRefInPropertyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..921aada7439 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..1da8650b53f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py new file mode 100644 index 00000000000..b9007990da0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..ef671e458a9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..f721bb16b44 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..6f795fd2293 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py new file mode 100644 index 00000000000..01a381bde1b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..7d78b86f2d7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..e97b1d6aabd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..cbac9f4b821 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..19f3d33f199 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py new file mode 100644 index 00000000000..ce910515b00 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py new file mode 100644 index 00000000000..c2cc8ec4d0c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py @@ -0,0 +1,98 @@ +import typing +import typing_extensions + +from openapi_client.apis.tags.operation_request_body_api import OperationRequestBodyApi +from openapi_client.apis.tags.path_post_api import PathPostApi +from openapi_client.apis.tags.content_type_json_api import ContentTypeJsonApi +from openapi_client.apis.tags.additional_properties_api import AdditionalPropertiesApi +from openapi_client.apis.tags.all_of_api import AllOfApi +from openapi_client.apis.tags.any_of_api import AnyOfApi +from openapi_client.apis.tags.type_api import TypeApi +from openapi_client.apis.tags.multiple_of_api import MultipleOfApi +from openapi_client.apis.tags.format_api import FormatApi +from openapi_client.apis.tags.enum_api import EnumApi +from openapi_client.apis.tags.not_api import NotApi +from openapi_client.apis.tags.default_api import DefaultApi +from openapi_client.apis.tags.maximum_api import MaximumApi +from openapi_client.apis.tags.max_items_api import MaxItemsApi +from openapi_client.apis.tags.max_length_api import MaxLengthApi +from openapi_client.apis.tags.max_properties_api import MaxPropertiesApi +from openapi_client.apis.tags.minimum_api import MinimumApi +from openapi_client.apis.tags.min_items_api import MinItemsApi +from openapi_client.apis.tags.min_length_api import MinLengthApi +from openapi_client.apis.tags.min_properties_api import MinPropertiesApi +from openapi_client.apis.tags.items_api import ItemsApi +from openapi_client.apis.tags.one_of_api import OneOfApi +from openapi_client.apis.tags.properties_api import PropertiesApi +from openapi_client.apis.tags.pattern_api import PatternApi +from openapi_client.apis.tags.ref_api import RefApi +from openapi_client.apis.tags.required_api import RequiredApi +from openapi_client.apis.tags.unique_items_api import UniqueItemsApi +from openapi_client.apis.tags.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi + +TagToApi = typing.TypedDict( + 'TagToApi', + { + "operation.requestBody": typing.Type[OperationRequestBodyApi], + "path.post": typing.Type[PathPostApi], + "contentType_json": typing.Type[ContentTypeJsonApi], + "additionalProperties": typing.Type[AdditionalPropertiesApi], + "allOf": typing.Type[AllOfApi], + "anyOf": typing.Type[AnyOfApi], + "type": typing.Type[TypeApi], + "multipleOf": typing.Type[MultipleOfApi], + "format": typing.Type[FormatApi], + "enum": typing.Type[EnumApi], + "not": typing.Type[NotApi], + "default": typing.Type[DefaultApi], + "maximum": typing.Type[MaximumApi], + "maxItems": typing.Type[MaxItemsApi], + "maxLength": typing.Type[MaxLengthApi], + "maxProperties": typing.Type[MaxPropertiesApi], + "minimum": typing.Type[MinimumApi], + "minItems": typing.Type[MinItemsApi], + "minLength": typing.Type[MinLengthApi], + "minProperties": typing.Type[MinPropertiesApi], + "items": typing.Type[ItemsApi], + "oneOf": typing.Type[OneOfApi], + "properties": typing.Type[PropertiesApi], + "pattern": typing.Type[PatternApi], + "$ref": typing.Type[RefApi], + "required": typing.Type[RequiredApi], + "uniqueItems": typing.Type[UniqueItemsApi], + "response.content.contentType.schema": typing.Type[ResponseContentContentTypeSchemaApi], + } +) + +tag_to_api = TagToApi( + { + "operation.requestBody": OperationRequestBodyApi, + "path.post": PathPostApi, + "contentType_json": ContentTypeJsonApi, + "additionalProperties": AdditionalPropertiesApi, + "allOf": AllOfApi, + "anyOf": AnyOfApi, + "type": TypeApi, + "multipleOf": MultipleOfApi, + "format": FormatApi, + "enum": EnumApi, + "not": NotApi, + "default": DefaultApi, + "maximum": MaximumApi, + "maxItems": MaxItemsApi, + "maxLength": MaxLengthApi, + "maxProperties": MaxPropertiesApi, + "minimum": MinimumApi, + "minItems": MinItemsApi, + "minLength": MinLengthApi, + "minProperties": MinPropertiesApi, + "items": ItemsApi, + "oneOf": OneOfApi, + "properties": PropertiesApi, + "pattern": PatternApi, + "$ref": RefApi, + "required": RequiredApi, + "uniqueItems": UniqueItemsApi, + "response.content.contentType.schema": ResponseContentContentTypeSchemaApi, + } +) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py new file mode 100644 index 00000000000..f3c38f014ce --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py new file mode 100644 index 00000000000..38c361c928a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes + + +class AdditionalPropertiesApi( + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py new file mode 100644 index 00000000000..0531f01bfb9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes + + +class AllOfApi( + PostAllofWithTheFirstEmptySchemaRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostAllofWithTheLastEmptySchemaRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAllofWithOneEmptySchemaRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostAllofSimpleTypesRequestBody, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostAllofResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py new file mode 100644 index 00000000000..03bd96a12a7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody + + +class AnyOfApi( + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostAnyofComplexTypesRequestBody, + PostAnyofRequestBody, + PostAnyofWithOneEmptySchemaRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostAnyofWithBaseSchemaRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py new file mode 100644 index 00000000000..4cfd8df626b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody +from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody +from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody +from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class ContentTypeJsonApi( + PostMinlengthValidationResponseBodyForContentTypes, + PostRefInAllofResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostRefInPropertyResponseBodyForContentTypes, + PostOneofWithRequiredRequestBody, + PostMinlengthValidationRequestBody, + PostIntegerTypeMatchesIntegersRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostRefInAllofRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostRequiredWithEscapedCharactersRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostOneofComplexTypesResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsResponseBodyForContentTypes, + PostNotResponseBodyForContentTypes, + PostRefInAdditionalpropertiesRequestBody, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostNulCharactersInStringsRequestBody, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostMinimumValidationRequestBody, + PostByNumberResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostPatternValidationRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostIpv4FormatResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostMinitemsValidationRequestBody, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostNotRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostRefInOneofRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostStringTypeMatchesStringsRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostRefInNotRequestBody, + PostByNumberRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAnyofComplexTypesRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostPatternIsNotAnchoredRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostAllofSimpleTypesRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyRequestBody, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostRefInAnyofRequestBody, + PostRefInNotResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostByIntRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostRefInItemsRequestBody, + PostUriTemplateFormatRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostInvalidStringValueForDefaultRequestBody, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostEmailFormatRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py new file mode 100644 index 00000000000..70a0062498a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody +from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes + + +class DefaultApi( + PostInvalidStringValueForDefaultRequestBody, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py new file mode 100644 index 00000000000..11e7efb25a7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes + + +class EnumApi( + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostEnumsInPropertiesRequestBody, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostNulCharactersInStringsRequestBody, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py new file mode 100644 index 00000000000..0b0b0cc1e7f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes + + +class FormatApi( + PostIpv4FormatRequestBody, + PostUriFormatRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostJsonPointerFormatRequestBody, + PostUriReferenceFormatRequestBody, + PostHostnameFormatRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostUriTemplateFormatRequestBody, + PostUriTemplateFormatResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, + PostHostnameFormatResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py new file mode 100644 index 00000000000..45738acf118 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody + + +class ItemsApi( + PostNestedItemsResponseBodyForContentTypes, + PostNestedItemsRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py new file mode 100644 index 00000000000..7489bcffeea --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes + + +class MaxItemsApi( + PostMaxitemsValidationRequestBody, + PostMaxitemsValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py new file mode 100644 index 00000000000..868b8a8bfc7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes + + +class MaxLengthApi( + PostMaxlengthValidationRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py new file mode 100644 index 00000000000..8947f0dfed2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody + + +class MaxPropertiesApi( + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py new file mode 100644 index 00000000000..7618762d0cc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes + + +class MaximumApi( + PostMaximumValidationResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py new file mode 100644 index 00000000000..3f0555c50d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes + + +class MinItemsApi( + PostMinitemsValidationRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py new file mode 100644 index 00000000000..9113bc1d7f3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody + + +class MinLengthApi( + PostMinlengthValidationResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py new file mode 100644 index 00000000000..d5580e5667b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes + + +class MinPropertiesApi( + PostMinpropertiesValidationRequestBody, + PostMinpropertiesValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py new file mode 100644 index 00000000000..15a17ef077c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody + + +class MinimumApi( + PostMinimumValidationWithSignedIntegerRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostMinimumValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py new file mode 100644 index 00000000000..c35c6660341 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class MultipleOfApi( + PostByNumberResponseBodyForContentTypes, + PostByIntRequestBody, + PostBySmallNumberResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostByNumberRequestBody, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py new file mode 100644 index 00000000000..285d7950f3b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes + + +class NotApi( + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py new file mode 100644 index 00000000000..594a8f332f1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes + + +class OneOfApi( + PostOneofWithBaseSchemaRequestBody, + PostOneofRequestBody, + PostOneofResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostOneofWithRequiredRequestBody, + PostOneofComplexTypesRequestBody, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py new file mode 100644 index 00000000000..b94951ef21c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody + + +class OperationRequestBodyApi( + PostMinimumValidationWithSignedIntegerRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostIpv4FormatRequestBody, + PostMinpropertiesValidationRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostRefInOneofRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostAllofWithOneEmptySchemaRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostOneofWithRequiredRequestBody, + PostMinlengthValidationRequestBody, + PostIntegerTypeMatchesIntegersRequestBody, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostRefInNotRequestBody, + PostByNumberRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAnyofComplexTypesRequestBody, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostRefInAllofRequestBody, + PostPatternIsNotAnchoredRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostAllofWithTheLastEmptySchemaRequestBody, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostPropertiesWithEscapedCharactersRequestBody, + PostSimpleEnumValidationRequestBody, + PostIpv6FormatRequestBody, + PostRequiredWithEscapedCharactersRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostAllofSimpleTypesRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostRefInPropertyRequestBody, + PostRequiredDefaultValidationRequestBody, + PostRequiredWithEmptyArrayRequestBody, + PostNumberTypeMatchesNumbersRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostOneofWithEmptySchemaRequestBody, + PostAllofRequestBody, + PostUniqueitemsFalseValidationRequestBody, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMaxpropertiesValidationRequestBody, + PostRefInAdditionalpropertiesRequestBody, + PostRefInAnyofRequestBody, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostByIntRequestBody, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostMaxlengthValidationRequestBody, + PostRefInItemsRequestBody, + PostUriTemplateFormatRequestBody, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostNulCharactersInStringsRequestBody, + PostAnyofWithBaseSchemaRequestBody, + PostMinimumValidationRequestBody, + PostInvalidStringValueForDefaultRequestBody, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostUriFormatRequestBody, + PostOneofComplexTypesRequestBody, + PostPatternValidationRequestBody, + PostAllofCombinedWithAnyofOneofRequestBody, + PostJsonPointerFormatRequestBody, + PostMaximumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostMinitemsValidationRequestBody, + PostBooleanTypeMatchesBooleansRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostNotRequestBody, + PostBySmallNumberRequestBody, + PostEmailFormatRequestBody, + PostDateTimeFormatRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py new file mode 100644 index 00000000000..b5eb29e5089 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody +from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody +from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody +from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class PathPostApi( + PostMinlengthValidationResponseBodyForContentTypes, + PostRefInAllofResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostRefInPropertyResponseBodyForContentTypes, + PostOneofWithRequiredRequestBody, + PostMinlengthValidationRequestBody, + PostIntegerTypeMatchesIntegersRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostRefInAllofRequestBody, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostRequiredWithEscapedCharactersRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostOneofComplexTypesResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsResponseBodyForContentTypes, + PostNotResponseBodyForContentTypes, + PostRefInAdditionalpropertiesRequestBody, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostNulCharactersInStringsRequestBody, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostMinimumValidationRequestBody, + PostByNumberResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostPatternValidationRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostIpv4FormatResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostMinitemsValidationRequestBody, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostNotRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostRefInOneofRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostStringTypeMatchesStringsRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostRefInNotRequestBody, + PostByNumberRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAnyofComplexTypesRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostPatternIsNotAnchoredRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostAllofSimpleTypesRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyRequestBody, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostRefInAnyofRequestBody, + PostRefInNotResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostByIntRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostRefInItemsRequestBody, + PostUriTemplateFormatRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostInvalidStringValueForDefaultRequestBody, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostEmailFormatRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py new file mode 100644 index 00000000000..c3f6ecdebf4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes + + +class PatternApi( + PostPatternIsNotAnchoredRequestBody, + PostPatternValidationRequestBody, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py new file mode 100644 index 00000000000..7a89e1c3a27 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes + + +class PropertiesApi( + PostObjectPropertiesValidationRequestBody, + PostPropertiesWithEscapedCharactersRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py new file mode 100644 index 00000000000..c393a4beab8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody +from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody +from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody +from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody +from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody + + +class RefApi( + PostRefInAnyofResponseBodyForContentTypes, + PostRefInAllofResponseBodyForContentTypes, + PostRefInItemsResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostRefInOneofRequestBody, + PostRefInAdditionalpropertiesRequestBody, + PostRefInAnyofRequestBody, + PostRefInNotResponseBodyForContentTypes, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostRefInOneofResponseBodyForContentTypes, + PostRefInPropertyRequestBody, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRefInPropertyResponseBodyForContentTypes, + PostRefInItemsRequestBody, + PostRefInNotRequestBody, + PostRefInAllofRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py new file mode 100644 index 00000000000..7de1f19ba5d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody + + +class RequiredApi( + PostRequiredDefaultValidationRequestBody, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostRequiredValidationRequestBody, + PostRequiredWithEmptyArrayRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py new file mode 100644 index 00000000000..d2914435cd7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class ResponseContentContentTypeSchemaApi( + PostMinlengthValidationResponseBodyForContentTypes, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostRefInAllofResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostRefInPropertyResponseBodyForContentTypes, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostDateTimeFormatResponseBodyForContentTypes, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostMaxlengthValidationResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostRefInOneofResponseBodyForContentTypes, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostUriReferenceFormatResponseBodyForContentTypes, + PostInvalidStringValueForDefaultResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostRefInAnyofResponseBodyForContentTypes, + PostRefInItemsResponseBodyForContentTypes, + PostMinimumValidationResponseBodyForContentTypes, + PostNotResponseBodyForContentTypes, + PostNestedItemsResponseBodyForContentTypes, + PostRefInNotResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostOneofWithRequiredResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostByNumberResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostRefInAdditionalpropertiesResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py new file mode 100644 index 00000000000..f962fcc4505 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes + + +class TypeApi( + PostArrayTypeMatchesArraysRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostNumberTypeMatchesNumbersRequestBody, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py new file mode 100644 index 00000000000..999064652e7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes + + +class UniqueItemsApi( + PostUniqueitemsFalseValidationRequestBody, + PostUniqueitemsValidationRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py new file mode 100644 index 00000000000..e3edab2dc1c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py new file mode 100644 index 00000000000..038bd7c4d49 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class AdditionalpropertiesAllowsASchemaWhichShouldValidateDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, arg_) + return AdditionalpropertiesAllowsASchemaWhichShouldValidate.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, + AdditionalpropertiesAllowsASchemaWhichShouldValidateDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidateDict: + return AdditionalpropertiesAllowsASchemaWhichShouldValidate.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + bool, + ] +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesAllowsASchemaWhichShouldValidate( + schemas.Schema[AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesAllowsASchemaWhichShouldValidateDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, + AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidateDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py new file mode 100644 index 00000000000..572fdbf35d5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class AdditionalpropertiesAreAllowedByDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AdditionalpropertiesAreAllowedByDefaultDictInput, arg_) + return AdditionalpropertiesAreAllowedByDefault.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesAreAllowedByDefaultDictInput, + AdditionalpropertiesAreAllowedByDefaultDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesAreAllowedByDefaultDict: + return AdditionalpropertiesAreAllowedByDefault.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AdditionalpropertiesAreAllowedByDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesAreAllowedByDefault( + schemas.AnyTypeSchema[AdditionalpropertiesAreAllowedByDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesAreAllowedByDefaultDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py new file mode 100644 index 00000000000..80fdd6f4793 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema + + +class AdditionalpropertiesCanExistByItselfDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(AdditionalpropertiesCanExistByItselfDictInput, kwargs) + return AdditionalpropertiesCanExistByItself.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesCanExistByItselfDictInput, + AdditionalpropertiesCanExistByItselfDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesCanExistByItselfDict: + return AdditionalpropertiesCanExistByItself.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesCanExistByItselfDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesCanExistByItself( + schemas.Schema[AdditionalpropertiesCanExistByItselfDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesCanExistByItselfDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalpropertiesCanExistByItselfDictInput, + AdditionalpropertiesCanExistByItselfDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesCanExistByItselfDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py new file mode 100644 index 00000000000..5d0628f7ab0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +class AdditionalpropertiesShouldNotLookInApplicatorsDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(AdditionalpropertiesShouldNotLookInApplicatorsDictInput, kwargs) + return AdditionalpropertiesShouldNotLookInApplicators.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesShouldNotLookInApplicatorsDictInput, + AdditionalpropertiesShouldNotLookInApplicatorsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesShouldNotLookInApplicatorsDict: + return AdditionalpropertiesShouldNotLookInApplicators.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesShouldNotLookInApplicatorsDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesShouldNotLookInApplicators( + schemas.AnyTypeSchema[AdditionalpropertiesShouldNotLookInApplicatorsDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesShouldNotLookInApplicatorsDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py new file mode 100644 index 00000000000..6728548e074 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AllOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Allof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py new file mode 100644 index 00000000000..ea46cdbf618 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _03( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + +AllOf = typing.Tuple[ + typing.Type[_03], +] + + +@dataclasses.dataclass(frozen=True) +class _02( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 3 + +AnyOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 5 + +OneOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class AllofCombinedWithAnyofOneof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py new file mode 100644 index 00000000000..01058d9f887 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_maximum: typing.Union[int, float] = 30 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 20 + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofSimpleTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py new file mode 100644 index 00000000000..bd3918c17f5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Baz: typing_extensions.TypeAlias = schemas.NoneSchema +Properties3 = typing.TypedDict( + 'Properties3', + { + "baz": typing.Type[Baz], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "baz", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + baz: None, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "baz": baz, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def baz(self) -> None: + return typing.cast( + None, + self.__getitem__("baz") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "baz", + }) + properties: Properties3 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties3)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class AllofWithBaseSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(AllofWithBaseSchemaDictInput, arg_) + return AllofWithBaseSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AllofWithBaseSchemaDictInput, + AllofWithBaseSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AllofWithBaseSchemaDict: + return AllofWithBaseSchema.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AllofWithBaseSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AllofWithBaseSchema( + schemas.AnyTypeSchema[AllofWithBaseSchemaDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AllofWithBaseSchemaDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py new file mode 100644 index 00000000000..470e60242b3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithOneEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py new file mode 100644 index 00000000000..9e829e776af --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +_1: typing_extensions.TypeAlias = schemas.NumberSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTheFirstEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py new file mode 100644 index 00000000000..6507399dccb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTheLastEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py new file mode 100644 index 00000000000..1b09dd39228 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTwoEmptySchemas( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py new file mode 100644 index 00000000000..14ff8192681 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 2 + +AnyOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Anyof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py new file mode 100644 index 00000000000..c45cb20b190 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofComplexTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py new file mode 100644 index 00000000000..f276171b5f4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 2 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_length: int = 4 + +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofWithBaseSchema( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py new file mode 100644 index 00000000000..cfeca4eb94c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofWithOneEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py new file mode 100644 index 00000000000..08bb9b79d52 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class ArrayTypeMatchesArraysTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayTypeMatchesArraysTupleInput, ArrayTypeMatchesArraysTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayTypeMatchesArrays.validate(arg, configuration=configuration) +ArrayTypeMatchesArraysTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayTypeMatchesArrays( + schemas.Schema[schemas.immutabledict, ArrayTypeMatchesArraysTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayTypeMatchesArraysTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayTypeMatchesArraysTupleInput, + ArrayTypeMatchesArraysTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayTypeMatchesArraysTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py new file mode 100644 index 00000000000..8c91d791dc2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +BooleanTypeMatchesBooleans: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py new file mode 100644 index 00000000000..b7d770765dd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ByInt( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py new file mode 100644 index 00000000000..36eebf5722b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ByNumber( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 1.5 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py new file mode 100644 index 00000000000..9e49b70ba60 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class BySmallNumber( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 0.00010 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py new file mode 100644 index 00000000000..25f80d500d0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateTimeFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'date-time' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py new file mode 100644 index 00000000000..f7909faffee --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class EmailFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'email' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py new file mode 100644 index 00000000000..b74d5d80325 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWith0DoesNotMatchFalseEnums: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal[0]: + return EnumWith0DoesNotMatchFalse.validate(0) + + +@dataclasses.dataclass(frozen=True) +class EnumWith0DoesNotMatchFalse( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 0: "POSITIVE_0", + } + ) + enums = EnumWith0DoesNotMatchFalseEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[0], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py new file mode 100644 index 00000000000..23144b3078d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWith1DoesNotMatchTrueEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return EnumWith1DoesNotMatchTrue.validate(1) + + +@dataclasses.dataclass(frozen=True) +class EnumWith1DoesNotMatchTrue( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + } + ) + enums = EnumWith1DoesNotMatchTrueEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py new file mode 100644 index 00000000000..11bb6f792dc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithEscapedCharactersEnums: + + @schemas.classproperty + def FOO_LINE_FEED_LF_BAR(cls) -> typing.Literal["foo\nbar"]: + return EnumWithEscapedCharacters.validate("foo\nbar") + + @schemas.classproperty + def FOO_CARRIAGE_RETURN_CR_BAR(cls) -> typing.Literal["foo\rbar"]: + return EnumWithEscapedCharacters.validate("foo\rbar") + + +@dataclasses.dataclass(frozen=True) +class EnumWithEscapedCharacters( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "foo\nbar": "FOO_LINE_FEED_LF_BAR", + "foo\rbar": "FOO_CARRIAGE_RETURN_CR_BAR", + } + ) + enums = EnumWithEscapedCharactersEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo\nbar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\nbar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo\rbar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\rbar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\nbar","foo\rbar",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "foo\nbar", + "foo\rbar", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "foo\nbar", + "foo\rbar", + ], + validated_arg + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py new file mode 100644 index 00000000000..39070f584e0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithFalseDoesNotMatch0Enums: + + @schemas.classproperty + def FALSE(cls) -> typing.Literal[False]: + return EnumWithFalseDoesNotMatch0.validate(False) + + +@dataclasses.dataclass(frozen=True) +class EnumWithFalseDoesNotMatch0( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + schemas.Bool.FALSE: "FALSE", + } + ) + enums = EnumWithFalseDoesNotMatch0Enums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + False, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + False, + ], + validated_arg + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py new file mode 100644 index 00000000000..5a253b60571 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithTrueDoesNotMatch1Enums: + + @schemas.classproperty + def TRUE(cls) -> typing.Literal[True]: + return EnumWithTrueDoesNotMatch1.validate(True) + + +@dataclasses.dataclass(frozen=True) +class EnumWithTrueDoesNotMatch1( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + schemas.Bool.TRUE: "TRUE", + } + ) + enums = EnumWithTrueDoesNotMatch1Enums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + True, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + True, + ], + validated_arg + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py new file mode 100644 index 00000000000..47a8ea52683 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class FooEnums: + + @schemas.classproperty + def FOO(cls) -> typing.Literal["foo"]: + return Foo.validate("foo") + + +@dataclasses.dataclass(frozen=True) +class Foo( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "foo": "FOO", + } + ) + enums = FooEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "foo", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "foo", + ], + validated_arg + ) + + +class BarEnums: + + @schemas.classproperty + def BAR(cls) -> typing.Literal["bar"]: + return Bar.validate("bar") + + +@dataclasses.dataclass(frozen=True) +class Bar( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "bar": "BAR", + } + ) + enums = BarEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["bar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["bar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["bar",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "bar", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "bar", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class EnumsInPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + bar: typing.Literal[ + "bar" + ], + foo: typing.Union[ + typing.Literal[ + "foo" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(EnumsInPropertiesDictInput, arg_) + return EnumsInProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + EnumsInPropertiesDictInput, + EnumsInPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumsInPropertiesDict: + return EnumsInProperties.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Literal["bar"]: + return typing.cast( + typing.Literal["bar"], + self.__getitem__("bar") + ) + + @property + def foo(self) -> typing.Union[typing.Literal["foo"], schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["foo"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +EnumsInPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class EnumsInProperties( + schemas.Schema[EnumsInPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: EnumsInPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EnumsInPropertiesDictInput, + EnumsInPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumsInPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py new file mode 100644 index 00000000000..2cf2bdea6ca --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class ForbiddenPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ForbiddenPropertyDictInput, arg_) + return ForbiddenProperty.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ForbiddenPropertyDictInput, + ForbiddenPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ForbiddenPropertyDict: + return ForbiddenProperty.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ForbiddenPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ForbiddenProperty( + schemas.AnyTypeSchema[ForbiddenPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ForbiddenPropertyDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py new file mode 100644 index 00000000000..e5bfa3bd6d6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class HostnameFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'hostname' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py new file mode 100644 index 00000000000..5950bab69c7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +IntegerTypeMatchesIntegers: typing_extensions.TypeAlias = schemas.IntSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py new file mode 100644 index 00000000000..dae0c4fc796 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( + schemas.IntSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + multiple_of: typing.Union[int, float] = 0.123456789 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py new file mode 100644 index 00000000000..715c37d509a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Bar( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 4 + default: typing.Literal["bad"] = "bad" +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class InvalidStringValueForDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + + def __new__( + cls, + *, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(InvalidStringValueForDefaultDictInput, arg_) + return InvalidStringValueForDefault.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + InvalidStringValueForDefaultDictInput, + InvalidStringValueForDefaultDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> InvalidStringValueForDefaultDict: + return InvalidStringValueForDefault.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +InvalidStringValueForDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class InvalidStringValueForDefault( + schemas.AnyTypeSchema[InvalidStringValueForDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: InvalidStringValueForDefaultDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py new file mode 100644 index 00000000000..687ab5542cf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Ipv4Format( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'ipv4' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py new file mode 100644 index 00000000000..122c03fb2b0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Ipv6Format( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'ipv6' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py new file mode 100644 index 00000000000..bd10c038c39 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class JsonPointerFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'json-pointer' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py new file mode 100644 index 00000000000..223b3d1a9d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaximumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_maximum: typing.Union[int, float] = 3.0 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py new file mode 100644 index 00000000000..881d0b04650 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaximumValidationWithUnsignedInteger( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_maximum: typing.Union[int, float] = 300 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py new file mode 100644 index 00000000000..a6d064e1b66 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_items: int = 2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py new file mode 100644 index 00000000000..2860ab7b7b3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxlengthValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_length: int = 2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py new file mode 100644 index 00000000000..7822abc195b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Maxproperties0MeansTheObjectIsEmpty( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_properties: int = 0 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py new file mode 100644 index 00000000000..0c0d8993863 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxpropertiesValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_properties: int = 2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py new file mode 100644 index 00000000000..212bd9d6209 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinimumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_minimum: typing.Union[int, float] = 1.1 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py new file mode 100644 index 00000000000..e7f0b10aeda --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinimumValidationWithSignedInteger( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_minimum: typing.Union[int, float] = -2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py new file mode 100644 index 00000000000..a605035eb81 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_items: int = 1 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py new file mode 100644 index 00000000000..c4dc9989270 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinlengthValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_length: int = 2 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py new file mode 100644 index 00000000000..ab77435cfcf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinpropertiesValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_properties: int = 1 + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py new file mode 100644 index 00000000000..75fcc3a594b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +AllOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +AllOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedAllofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py new file mode 100644 index 00000000000..f97ce2a9ec8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +AnyOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + +AnyOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedAnyofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py new file mode 100644 index 00000000000..8702c5a5ecd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items4: typing_extensions.TypeAlias = schemas.NumberSchema + + +class ItemsTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items3.validate(arg, configuration=configuration) +ItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items3( + schemas.Schema[schemas.immutabledict, ItemsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput, + ItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ItemsTuple2( + typing.Tuple[ + ItemsTuple, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items2.validate(arg, configuration=configuration) +ItemsTupleInput2 = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items2( + schemas.Schema[schemas.immutabledict, ItemsTuple2] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple2 + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput2, + ItemsTuple2, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple2: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ItemsTuple3( + typing.Tuple[ + ItemsTuple2, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput3, ItemsTuple3], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items.validate(arg, configuration=configuration) +ItemsTupleInput3 = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema[schemas.immutabledict, ItemsTuple3] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple3 + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput3, + ItemsTuple3, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple3: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class NestedItemsTuple( + typing.Tuple[ + ItemsTuple3, + ... + ] +): + + def __new__(cls, arg: typing.Union[NestedItemsTupleInput, NestedItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return NestedItems.validate(arg, configuration=configuration) +NestedItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput3, + ItemsTuple3 + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput3, + ItemsTuple3 + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class NestedItems( + schemas.Schema[schemas.immutabledict, NestedItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: NestedItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NestedItemsTupleInput, + NestedItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NestedItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py new file mode 100644 index 00000000000..4bfb652ec79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +OneOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + +OneOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedOneofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py new file mode 100644 index 00000000000..aed7151d4c1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not2: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py new file mode 100644 index 00000000000..e5e0a5b915c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class NotDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(NotDictInput, arg_) + return Not.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NotDictInput, + NotDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NotDict: + return Not.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[str, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +NotDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.Schema[NotDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NotDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NotDictInput, + NotDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NotDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class NotMoreComplexSchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py new file mode 100644 index 00000000000..b2775cdb5d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class NulCharactersInStringsEnums: + + @schemas.classproperty + def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: + return NulCharactersInStrings.validate("hello\x00there") + + +@dataclasses.dataclass(frozen=True) +class NulCharactersInStrings( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "hello\x00there": "HELLO_NULL_THERE", + } + ) + enums = NulCharactersInStringsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["hello\x00there"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["hello\x00there"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["hello\x00there",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "hello\x00there", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "hello\x00there", + ], + validated_arg + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py new file mode 100644 index 00000000000..7a1f3b51ab3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +NullTypeMatchesOnlyTheNullObject: typing_extensions.TypeAlias = schemas.NoneSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py new file mode 100644 index 00000000000..62e38686690 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +NumberTypeMatchesNumbers: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py new file mode 100644 index 00000000000..22c0ff1a361 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.IntSchema +Bar: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class ObjectPropertiesValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectPropertiesValidationDictInput, arg_) + return ObjectPropertiesValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectPropertiesValidationDictInput, + ObjectPropertiesValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectPropertiesValidationDict: + return ObjectPropertiesValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[int, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectPropertiesValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectPropertiesValidation( + schemas.AnyTypeSchema[ObjectPropertiesValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectPropertiesValidationDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py new file mode 100644 index 00000000000..640c3aaaf65 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +ObjectTypeMatchesObjects: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py new file mode 100644 index 00000000000..311bccf4652 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 2 + +OneOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Oneof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py new file mode 100644 index 00000000000..599622aefdc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofComplexTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py new file mode 100644 index 00000000000..a47360cea6d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_length: int = 2 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 4 + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithBaseSchema( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py new file mode 100644 index 00000000000..2e472aacc60 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py new file mode 100644 index 00000000000..655b9cb81e7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("bar") + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + "foo", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "baz", + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + baz: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "baz": baz, + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def baz(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("baz") + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "baz", + "foo", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithRequired( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py new file mode 100644 index 00000000000..d9134a500d1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PatternIsNotAnchored( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'a+' # noqa: E501 + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py new file mode 100644 index 00000000000..81e8857ded2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PatternValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^a*$' # noqa: E501 + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py new file mode 100644 index 00000000000..99984579b56 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +FooNbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooBar: typing_extensions.TypeAlias = schemas.NumberSchema +FooBar: typing_extensions.TypeAlias = schemas.NumberSchema +FooRbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooTbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooFbar: typing_extensions.TypeAlias = schemas.NumberSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo\nbar": typing.Type[FooNbar], + "foo\"bar": typing.Type[FooBar], + "foo\\bar": typing.Type[FooBar], + "foo\rbar": typing.Type[FooRbar], + "foo\tbar": typing.Type[FooTbar], + "foo\fbar": typing.Type[FooFbar], + } +) + + +class PropertiesWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar", + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + arg_.update(kwargs) + used_arg_ = typing.cast(PropertiesWithEscapedCharactersDictInput, arg_) + return PropertiesWithEscapedCharacters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertiesWithEscapedCharactersDictInput, + PropertiesWithEscapedCharactersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesWithEscapedCharactersDict: + return PropertiesWithEscapedCharacters.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertiesWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertiesWithEscapedCharacters( + schemas.AnyTypeSchema[PropertiesWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertiesWithEscapedCharactersDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py new file mode 100644 index 00000000000..3ba28cea4d8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Ref: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "$ref": typing.Type[Ref], + } +) + + +class PropertyNamedRefThatIsNotAReferenceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "$ref", + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + arg_.update(kwargs) + used_arg_ = typing.cast(PropertyNamedRefThatIsNotAReferenceDictInput, arg_) + return PropertyNamedRefThatIsNotAReference.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertyNamedRefThatIsNotAReferenceDictInput, + PropertyNamedRefThatIsNotAReferenceDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertyNamedRefThatIsNotAReferenceDict: + return PropertyNamedRefThatIsNotAReference.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertyNamedRefThatIsNotAReferenceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertyNamedRefThatIsNotAReference( + schemas.AnyTypeSchema[PropertyNamedRefThatIsNotAReferenceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertyNamedRefThatIsNotAReferenceDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py new file mode 100644 index 00000000000..3c028ee0d5f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference + + +class RefInAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ): + used_kwargs = typing.cast(RefInAdditionalpropertiesDictInput, kwargs) + return RefInAdditionalproperties.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RefInAdditionalpropertiesDictInput, + RefInAdditionalpropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RefInAdditionalpropertiesDict: + return RefInAdditionalproperties.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +RefInAdditionalpropertiesDictInput = typing.Mapping[ + str, + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], +] + + +@dataclasses.dataclass(frozen=True) +class RefInAdditionalproperties( + schemas.Schema[RefInAdditionalpropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RefInAdditionalpropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + RefInAdditionalpropertiesDictInput, + RefInAdditionalpropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RefInAdditionalpropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py new file mode 100644 index 00000000000..f2c43f2a86e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AllOf = typing.Tuple[ + typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], +] + + +@dataclasses.dataclass(frozen=True) +class RefInAllof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py new file mode 100644 index 00000000000..04c04bf07fc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AnyOf = typing.Tuple[ + typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], +] + + +@dataclasses.dataclass(frozen=True) +class RefInAnyof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py new file mode 100644 index 00000000000..96f6fbe537a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference + + +class RefInItemsTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[RefInItemsTupleInput, RefInItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return RefInItems.validate(arg, configuration=configuration) +RefInItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class RefInItems( + schemas.Schema[schemas.immutabledict, RefInItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: RefInItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + RefInItemsTupleInput, + RefInItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RefInItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py new file mode 100644 index 00000000000..932c553fff3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class RefInNot( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py new file mode 100644 index 00000000000..74d51e63014 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +OneOf = typing.Tuple[ + typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], +] + + +@dataclasses.dataclass(frozen=True) +class RefInOneof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py new file mode 100644 index 00000000000..70c72455ec5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], + } +) + + +class RefInPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "a", + }) + + def __new__( + cls, + *, + a: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("a", a), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RefInPropertyDictInput, arg_) + return RefInProperty.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RefInPropertyDictInput, + RefInPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RefInPropertyDict: + return RefInProperty.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("a", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RefInPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RefInProperty( + schemas.AnyTypeSchema[RefInPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RefInPropertyDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py new file mode 100644 index 00000000000..5f1aadf3625 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class RequiredDefaultValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredDefaultValidationDictInput, arg_) + return RequiredDefaultValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredDefaultValidationDictInput, + RequiredDefaultValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredDefaultValidationDict: + return RequiredDefaultValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredDefaultValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredDefaultValidation( + schemas.AnyTypeSchema[RequiredDefaultValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredDefaultValidationDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py new file mode 100644 index 00000000000..696de0e8790 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class RequiredValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + for key_, val in ( + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredValidationDictInput, arg_) + return RequiredValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredValidationDictInput, + RequiredValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredValidationDict: + return RequiredValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredValidation( + schemas.AnyTypeSchema[RequiredValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredValidationDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py new file mode 100644 index 00000000000..ef95f3f7b6a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class RequiredWithEmptyArrayDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredWithEmptyArrayDictInput, arg_) + return RequiredWithEmptyArray.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredWithEmptyArrayDictInput, + RequiredWithEmptyArrayDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredWithEmptyArrayDict: + return RequiredWithEmptyArray.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredWithEmptyArrayDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredWithEmptyArray( + schemas.AnyTypeSchema[RequiredWithEmptyArrayDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredWithEmptyArrayDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py new file mode 100644 index 00000000000..5cc9067987e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class RequiredWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + } + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredWithEscapedCharactersDictInput, arg_) + return RequiredWithEscapedCharacters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredWithEscapedCharactersDictInput, + RequiredWithEscapedCharactersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredWithEscapedCharactersDict: + return RequiredWithEscapedCharacters.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredWithEscapedCharacters( + schemas.AnyTypeSchema[RequiredWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredWithEscapedCharactersDict, + } + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py new file mode 100644 index 00000000000..4bf1a0ae8b2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SimpleEnumValidationEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return SimpleEnumValidation.validate(1) + + @schemas.classproperty + def POSITIVE_2(cls) -> typing.Literal[2]: + return SimpleEnumValidation.validate(2) + + @schemas.classproperty + def POSITIVE_3(cls) -> typing.Literal[3]: + return SimpleEnumValidation.validate(3) + + +@dataclasses.dataclass(frozen=True) +class SimpleEnumValidation( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + 2: "POSITIVE_2", + 3: "POSITIVE_3", + } + ) + enums = SimpleEnumValidationEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[2], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[2]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[3], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[3]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,2,3,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py new file mode 100644 index 00000000000..c3a240932f2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +StringTypeMatchesStrings: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py new file mode 100644 index 00000000000..2e001fdaa96 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Alpha( + schemas.NumberSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + inclusive_maximum: typing.Union[int, float] = 3 +Properties = typing.TypedDict( + 'Properties', + { + "alpha": typing.Type[Alpha], + } +) + + +class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "alpha", + }) + + def __new__( + cls, + *, + alpha: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("alpha", alpha), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, arg_) + return TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict: + return TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.validate(arg, configuration=configuration) + + @property + def alpha(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("alpha", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( + schemas.Schema[TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, + TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py new file mode 100644 index 00000000000..f37744f39de --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsFalseValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unique_items: bool = False + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py new file mode 100644 index 00000000000..42a203fab65 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unique_items: bool = True + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py new file mode 100644 index 00000000000..14ed5159fde --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py new file mode 100644 index 00000000000..ab3bed76d66 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriReferenceFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri-reference' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py new file mode 100644 index 00000000000..1400cce58b1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriTemplateFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri-template' + diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py new file mode 100644 index 00000000000..68c8f77e506 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from unit_test_api.components.schema.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from unit_test_api.components.schema.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate +from unit_test_api.components.schema.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from unit_test_api.components.schema.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from unit_test_api.components.schema.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators +from unit_test_api.components.schema.allof import Allof +from unit_test_api.components.schema.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from unit_test_api.components.schema.allof_simple_types import AllofSimpleTypes +from unit_test_api.components.schema.allof_with_base_schema import AllofWithBaseSchema +from unit_test_api.components.schema.allof_with_one_empty_schema import AllofWithOneEmptySchema +from unit_test_api.components.schema.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from unit_test_api.components.schema.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from unit_test_api.components.schema.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from unit_test_api.components.schema.anyof import Anyof +from unit_test_api.components.schema.anyof_complex_types import AnyofComplexTypes +from unit_test_api.components.schema.anyof_with_base_schema import AnyofWithBaseSchema +from unit_test_api.components.schema.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from unit_test_api.components.schema.array_type_matches_arrays import ArrayTypeMatchesArrays +from unit_test_api.components.schema.boolean_type_matches_booleans import BooleanTypeMatchesBooleans +from unit_test_api.components.schema.by_int import ByInt +from unit_test_api.components.schema.by_number import ByNumber +from unit_test_api.components.schema.by_small_number import BySmallNumber +from unit_test_api.components.schema.date_time_format import DateTimeFormat +from unit_test_api.components.schema.email_format import EmailFormat +from unit_test_api.components.schema.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from unit_test_api.components.schema.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from unit_test_api.components.schema.enum_with_escaped_characters import EnumWithEscapedCharacters +from unit_test_api.components.schema.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from unit_test_api.components.schema.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from unit_test_api.components.schema.enums_in_properties import EnumsInProperties +from unit_test_api.components.schema.forbidden_property import ForbiddenProperty +from unit_test_api.components.schema.hostname_format import HostnameFormat +from unit_test_api.components.schema.integer_type_matches_integers import IntegerTypeMatchesIntegers +from unit_test_api.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf +from unit_test_api.components.schema.invalid_string_value_for_default import InvalidStringValueForDefault +from unit_test_api.components.schema.ipv4_format import Ipv4Format +from unit_test_api.components.schema.ipv6_format import Ipv6Format +from unit_test_api.components.schema.json_pointer_format import JsonPointerFormat +from unit_test_api.components.schema.maximum_validation import MaximumValidation +from unit_test_api.components.schema.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from unit_test_api.components.schema.maxitems_validation import MaxitemsValidation +from unit_test_api.components.schema.maxlength_validation import MaxlengthValidation +from unit_test_api.components.schema.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from unit_test_api.components.schema.maxproperties_validation import MaxpropertiesValidation +from unit_test_api.components.schema.minimum_validation import MinimumValidation +from unit_test_api.components.schema.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from unit_test_api.components.schema.minitems_validation import MinitemsValidation +from unit_test_api.components.schema.minlength_validation import MinlengthValidation +from unit_test_api.components.schema.minproperties_validation import MinpropertiesValidation +from unit_test_api.components.schema.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from unit_test_api.components.schema.nested_items import NestedItems +from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from unit_test_api.components.schema.not import Not +from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema +from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings +from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject +from unit_test_api.components.schema.number_type_matches_numbers import NumberTypeMatchesNumbers +from unit_test_api.components.schema.object_properties_validation import ObjectPropertiesValidation +from unit_test_api.components.schema.object_type_matches_objects import ObjectTypeMatchesObjects +from unit_test_api.components.schema.oneof import Oneof +from unit_test_api.components.schema.oneof_complex_types import OneofComplexTypes +from unit_test_api.components.schema.oneof_with_base_schema import OneofWithBaseSchema +from unit_test_api.components.schema.oneof_with_empty_schema import OneofWithEmptySchema +from unit_test_api.components.schema.oneof_with_required import OneofWithRequired +from unit_test_api.components.schema.pattern_is_not_anchored import PatternIsNotAnchored +from unit_test_api.components.schema.pattern_validation import PatternValidation +from unit_test_api.components.schema.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from unit_test_api.components.schema.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from unit_test_api.components.schema.ref_in_additionalproperties import RefInAdditionalproperties +from unit_test_api.components.schema.ref_in_allof import RefInAllof +from unit_test_api.components.schema.ref_in_anyof import RefInAnyof +from unit_test_api.components.schema.ref_in_items import RefInItems +from unit_test_api.components.schema.ref_in_not import RefInNot +from unit_test_api.components.schema.ref_in_oneof import RefInOneof +from unit_test_api.components.schema.ref_in_property import RefInProperty +from unit_test_api.components.schema.required_default_validation import RequiredDefaultValidation +from unit_test_api.components.schema.required_validation import RequiredValidation +from unit_test_api.components.schema.required_with_empty_array import RequiredWithEmptyArray +from unit_test_api.components.schema.required_with_escaped_characters import RequiredWithEscapedCharacters +from unit_test_api.components.schema.simple_enum_validation import SimpleEnumValidation +from unit_test_api.components.schema.string_type_matches_strings import StringTypeMatchesStrings +from unit_test_api.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing +from unit_test_api.components.schema.uniqueitems_false_validation import UniqueitemsFalseValidation +from unit_test_api.components.schema.uniqueitems_validation import UniqueitemsValidation +from unit_test_api.components.schema.uri_format import UriFormat +from unit_test_api.components.schema.uri_reference_format import UriReferenceFormat +from unit_test_api.components.schema.uri_template_format import UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py new file mode 100644 index 00000000000..1abc7dcbc6d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py @@ -0,0 +1,281 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import copy +from http import client as http_client +import logging +import multiprocessing +import sys +import typing +import typing_extensions + +import urllib3 + +from unit_test_api import exceptions +from unit_test_api.servers import server_0 + +# the server to use at each openapi document json path +ServerInfo = typing.TypedDict( + 'ServerInfo', + { + 'servers/0': server_0.Server0, + }, + total=False +) + + +class ServerIndexInfoRequired(typing.TypedDict): + servers: typing.Literal[0] + +ServerIndexInfoOptional = typing.TypedDict( + 'ServerIndexInfoOptional', + { + }, + total=False +) + + +class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): + """ + the default server_index to use at each openapi document json path + the fallback value is stored in the 'servers' key + """ + + +class ApiConfiguration(object): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param server_info: the servers that can be used to make endpoint calls + :param server_index_info: index to servers configuration + """ + + def __init__( + self, + server_info: typing.Optional[ServerInfo] = None, + server_index_info: typing.Optional[ServerIndexInfo] = None, + ): + """Constructor + """ + # Authentication Settings + self.security_scheme_info: typing.Dict[str, typing.Any] = {} + self.security_index_info = {'security': 0} + # Server Info + self.server_info: ServerInfo = server_info or { + 'servers/0': server_0.Server0(), + } + self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("unit_test_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.0.1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_server_url( + self, + key_prefix: typing.Literal[ + "servers", + ], + index: typing.Optional[int], + ) -> str: + """Gets host URL based on the index + :param index: array index of the host settings + :return: URL based on host settings + """ + if index: + used_index = index + else: + try: + used_index = self.server_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.server_index_info.get("servers", 0) + server_info_key = typing.cast( + typing.Literal[ + "servers/0", + ], + f"{key_prefix}/{used_index}" + ) + try: + server = self.server_info[server_info_key] + except KeyError as ex: + raise ex + return server.url diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py new file mode 100644 index 00000000000..1344eb81896 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +from unit_test_api import exceptions + + +PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { + 'additional_properties': 'additionalProperties', + 'all_of': 'allOf', + 'any_of': 'anyOf', + 'const_value_to_name': 'const', + 'contains': 'contains', + 'dependent_required': 'dependentRequired', + 'dependent_schemas': 'dependentSchemas', + 'discriminator': 'discriminator', + # default omitted because it has no validation impact + 'else_': 'else', + 'enum_value_to_name': 'enum', + 'exclusive_maximum': 'exclusiveMaximum', + 'exclusive_minimum': 'exclusiveMinimum', + 'format': 'format', + 'if_': 'if', + 'inclusive_maximum': 'maximum', + 'inclusive_minimum': 'minimum', + 'items': 'items', + 'max_contains': 'maxContains', + 'max_items': 'maxItems', + 'max_length': 'maxLength', + 'max_properties': 'maxProperties', + 'min_contains': 'minContains', + 'min_items': 'minItems', + 'min_length': 'minLength', + 'min_properties': 'minProperties', + 'multiple_of': 'multipleOf', + 'not_': 'not', + 'one_of': 'oneOf', + 'pattern': 'pattern', + 'pattern_properties': 'patternProperties', + 'prefix_items': 'prefixItems', + 'properties': 'properties', + 'property_names': 'propertyNames', + 'required': 'required', + 'then': 'then', + 'types': 'type', + 'unique_items': 'uniqueItems', + 'unevaluated_items': 'unevaluatedItems', + 'unevaluated_properties': 'unevaluatedProperties' +} + +class SchemaConfiguration: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param disabled_json_schema_keywords (set): Set of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_json_schema_keywords is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + """ + + def __init__( + self, + disabled_json_schema_keywords = set(), + ): + """Constructor + """ + self.disabled_json_schema_keywords = disabled_json_schema_keywords + + @property + def disabled_json_schema_python_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_python_keywords + + @property + def disabled_json_schema_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_keywords + + @disabled_json_schema_keywords.setter + def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): + disabled_json_schema_keywords = set() + disabled_json_schema_python_keywords = set() + for k in json_keywords: + python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} + if not python_keywords: + raise exceptions.ApiValueError( + "Invalid keyword: '{0}''".format(k)) + disabled_json_schema_keywords.add(k) + disabled_json_schema_python_keywords.update(python_keywords) + self.__disabled_json_schema_keywords = disabled_json_schema_keywords + self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py new file mode 100644 index 00000000000..d45185ec9b7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +from unit_test_api import api_response + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + +T = typing.TypeVar('T', bound=api_response.ApiResponse) + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: typing.Optional[str] = None + api_response: typing.Optional[T] = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.api_response: + if self.api_response.response.headers: + error_message += "HTTP response headers: {0}\n".format( + self.api_response.response.headers) + if self.api_response.response.data: + error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) + + return error_message diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py new file mode 100644 index 00000000000..2c2c9cc4bdc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis import path_to_api diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py new file mode 100644 index 00000000000..82b874069ba --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody + +path = "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py new file mode 100644 index 00000000000..064e50d3664 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[ + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[ + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( + self, + body: typing.Union[ + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, + additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_allows_a_schema_which_should_validate_request_body = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..340bf9ac466 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate +Schema: typing_extensions.TypeAlias = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py new file mode 100644 index 00000000000..5190cb5eaa5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody + +path = "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py new file mode 100644 index 00000000000..507b2b3fee2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_are_allowed_by_default_request_body = BaseApi._post_additionalproperties_are_allowed_by_default_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_are_allowed_by_default_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..0e1479a204a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default +Schema: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py new file mode 100644 index 00000000000..642b03110eb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody + +path = "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py new file mode 100644 index 00000000000..975167b5cec --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_can_exist_by_itself_request_body = BaseApi._post_additionalproperties_can_exist_by_itself_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_can_exist_by_itself_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..3604eaec570 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself +Schema: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py new file mode 100644 index 00000000000..6ce31665b0a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody + +path = "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py new file mode 100644 index 00000000000..e7ccfddfa07 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_should_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_should_not_look_in_applicators_request_body = BaseApi._post_additionalproperties_should_not_look_in_applicators_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_should_not_look_in_applicators_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..31a1e692371 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators +Schema: typing_extensions.TypeAlias = additionalproperties_should_not_look_in_applicators.AdditionalpropertiesShouldNotLookInApplicators diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py new file mode 100644 index 00000000000..ed94c39ba95 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody + +path = "/requestBody/postAllofCombinedWithAnyofOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py new file mode 100644 index 00000000000..b88aad79ab3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_combined_with_anyof_oneof_request_body = BaseApi._post_allof_combined_with_anyof_oneof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_combined_with_anyof_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..0f53323a58c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof +Schema: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py new file mode 100644 index 00000000000..5b7f8d32e3e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody + +path = "/requestBody/postAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py new file mode 100644 index 00000000000..5dd9561aea3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_request_body = BaseApi._post_allof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4d535df3587 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof +Schema: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py new file mode 100644 index 00000000000..0b0cfa4160b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody + +path = "/requestBody/postAllofSimpleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py new file mode 100644 index 00000000000..b13ad85a117 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofSimpleTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_simple_types_request_body = BaseApi._post_allof_simple_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_simple_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..20e2d311d65 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types +Schema: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..08c83aaec1b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody + +path = "/requestBody/postAllofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..85430fe79ff --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_base_schema_request_body = BaseApi._post_allof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d21fc0258d8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema +Schema: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..aea2f6ab6ed --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody + +path = "/requestBody/postAllofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..7e952d703ba --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithOneEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_one_empty_schema_request_body = BaseApi._post_allof_with_one_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_one_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..69c3924727e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..7aa083ee5bd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody + +path = "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..ace40540f1d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_first_empty_schema_request_body = BaseApi._post_allof_with_the_first_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_first_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..56a68d392e9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..9daab2c7562 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody + +path = "/requestBody/postAllofWithTheLastEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..3b92e4c02cf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_last_empty_schema_request_body = BaseApi._post_allof_with_the_last_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_last_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2ce7c85276d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py new file mode 100644 index 00000000000..d46b12c2bfe --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody + +path = "/requestBody/postAllofWithTwoEmptySchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py new file mode 100644 index 00000000000..a56105b2114 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_two_empty_schemas_request_body = BaseApi._post_allof_with_two_empty_schemas_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_two_empty_schemas_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1130b86c7fc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas +Schema: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py new file mode 100644 index 00000000000..30ce22d14d9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody + +path = "/requestBody/postAnyofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py new file mode 100644 index 00000000000..f4340f769b6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofComplexTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_complex_types_request_body = BaseApi._post_anyof_complex_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_complex_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..37d58d62929 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types +Schema: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py new file mode 100644 index 00000000000..0a3eeb92ed7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody + +path = "/requestBody/postAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py new file mode 100644 index 00000000000..4dae2f6a975 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_request_body = BaseApi._post_anyof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f78e4027a5e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof +Schema: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..582eec5d98e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody + +path = "/requestBody/postAnyofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..b8b746b160c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_base_schema_request_body = BaseApi._post_anyof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a51ee5c5cbb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema +Schema: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..276553e3f77 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody + +path = "/requestBody/postAnyofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..aca3fda91ec --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_one_empty_schema_request_body = BaseApi._post_anyof_with_one_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_one_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c89f2bd3f41 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema +Schema: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py new file mode 100644 index 00000000000..d8aa6c7999e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody + +path = "/requestBody/postArrayTypeMatchesArraysRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py new file mode 100644 index 00000000000..7202a3904d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, + array_type_matches_arrays.ArrayTypeMatchesArraysTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, + array_type_matches_arrays.ArrayTypeMatchesArraysTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, + array_type_matches_arrays.ArrayTypeMatchesArraysTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostArrayTypeMatchesArraysRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_array_type_matches_arrays_request_body = BaseApi._post_array_type_matches_arrays_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_array_type_matches_arrays_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c1f04ef4119 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays +Schema: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py new file mode 100644 index 00000000000..04cf90ab91d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody + +path = "/requestBody/postBooleanTypeMatchesBooleansRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py new file mode 100644 index 00000000000..5d8837f8fba --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_boolean_type_matches_booleans_request_body = BaseApi._post_boolean_type_matches_booleans_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_boolean_type_matches_booleans_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..08ea06ae60b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans +Schema: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py new file mode 100644 index 00000000000..9b8e641c5f0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody + +path = "/requestBody/postByIntRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py new file mode 100644 index 00000000000..081ad13bcc2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByIntRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_int_request_body = BaseApi._post_by_int_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_int_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7adfd689fbf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int +Schema: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py new file mode 100644 index 00000000000..3625b98cb9c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody + +path = "/requestBody/postByNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py new file mode 100644 index 00000000000..f09c49a58c7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByNumberRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_number_request_body = BaseApi._post_by_number_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_number_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..13f45350f7a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number +Schema: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py new file mode 100644 index 00000000000..cb0bd6eeac1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody + +path = "/requestBody/postBySmallNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py new file mode 100644 index 00000000000..d653a7b7005 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBySmallNumberRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_small_number_request_body = BaseApi._post_by_small_number_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_small_number_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..08d562eedca --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number +Schema: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py new file mode 100644 index 00000000000..fe71ff77c36 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody + +path = "/requestBody/postDateTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py new file mode 100644 index 00000000000..582a5e6aad0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateTimeFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_time_format_request_body = BaseApi._post_date_time_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_time_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2920670b4c7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format +Schema: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py new file mode 100644 index 00000000000..343ccc2d7e7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody + +path = "/requestBody/postEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py new file mode 100644 index 00000000000..3d1a89e26bd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmailFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_email_format_request_body = BaseApi._post_email_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_email_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ee6f2bff8f5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format +Schema: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py new file mode 100644 index 00000000000..6278f4f37bd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody + +path = "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py new file mode 100644 index 00000000000..677e4fab21c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with0_does_not_match_false_request_body = BaseApi._post_enum_with0_does_not_match_false_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with0_does_not_match_false_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c597080e60f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false +Schema: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py new file mode 100644 index 00000000000..2192491c663 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody + +path = "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py new file mode 100644 index 00000000000..6ebd923c476 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with1_does_not_match_true_request_body = BaseApi._post_enum_with1_does_not_match_true_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with1_does_not_match_true_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fd53b5fcf24 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true +Schema: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..f4b3a43f028 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody + +path = "/requestBody/postEnumWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..1bf7c4c9049 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_escaped_characters_request_body = BaseApi._post_enum_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..957f84b23de --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters +Schema: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py new file mode 100644 index 00000000000..3a9b589fde9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody + +path = "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py new file mode 100644 index 00000000000..325e71a1905 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_false_does_not_match0_request_body = BaseApi._post_enum_with_false_does_not_match0_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_false_does_not_match0_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..06d1a86cede --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 +Schema: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py new file mode 100644 index 00000000000..1ccbf7eb9c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody + +path = "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py new file mode 100644 index 00000000000..f1a63fac757 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_true_does_not_match1_request_body = BaseApi._post_enum_with_true_does_not_match1_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_true_does_not_match1_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6bb13075e98 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 +Schema: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py new file mode 100644 index 00000000000..83f65d50bbf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody + +path = "/requestBody/postEnumsInPropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py new file mode 100644 index 00000000000..1d154c0103f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumsInPropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enums_in_properties_request_body = BaseApi._post_enums_in_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enums_in_properties_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8c4fd671f3a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties +Schema: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py new file mode 100644 index 00000000000..dc0ec75dc30 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody + +path = "/requestBody/postForbiddenPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py new file mode 100644 index 00000000000..d3989a28ff4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostForbiddenPropertyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_forbidden_property_request_body = BaseApi._post_forbidden_property_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_forbidden_property_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7b1c9c5743b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property +Schema: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py new file mode 100644 index 00000000000..3ae4314eb5a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody + +path = "/requestBody/postHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py new file mode 100644 index 00000000000..158a08bb819 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostHostnameFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_hostname_format_request_body = BaseApi._post_hostname_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_hostname_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4dbbf097174 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format +Schema: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py new file mode 100644 index 00000000000..6ebb39e9071 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody + +path = "/requestBody/postIntegerTypeMatchesIntegersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py new file mode 100644 index 00000000000..9f8411a6e00 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_integer_type_matches_integers_request_body = BaseApi._post_integer_type_matches_integers_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_integer_type_matches_integers_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6158b6d193a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers +Schema: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py new file mode 100644 index 00000000000..406ff0675bb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody + +path = "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py new file mode 100644 index 00000000000..a69ff6fee00 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f4c72861928 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf +Schema: typing_extensions.TypeAlias = invalid_instance_should_not_raise_error_when_float_division_inf.InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py new file mode 100644 index 00000000000..94484c688b9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_invalid_string_value_for_default_request_body import RequestBodyPostInvalidStringValueForDefaultRequestBody + +path = "/requestBody/postInvalidStringValueForDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py new file mode 100644 index 00000000000..881ff543c96 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_string_value_for_default + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_invalid_string_value_for_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostInvalidStringValueForDefaultRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_invalid_string_value_for_default_request_body = BaseApi._post_invalid_string_value_for_default_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_invalid_string_value_for_default_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4d8393f859c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_string_value_for_default +Schema: typing_extensions.TypeAlias = invalid_string_value_for_default.InvalidStringValueForDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py new file mode 100644 index 00000000000..0121543e6ef --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody + +path = "/requestBody/postIpv4FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py new file mode 100644 index 00000000000..470b60208c2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv4FormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv4_format_request_body = BaseApi._post_ipv4_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv4_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..059799950e5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format +Schema: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py new file mode 100644 index 00000000000..ea64fe2d5bf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody + +path = "/requestBody/postIpv6FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py new file mode 100644 index 00000000000..cd202fc4b6c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv6FormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv6_format_request_body = BaseApi._post_ipv6_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv6_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2962488b272 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format +Schema: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py new file mode 100644 index 00000000000..01fde730e5a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody + +path = "/requestBody/postJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py new file mode 100644 index 00000000000..1fdca8c044f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostJsonPointerFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_json_pointer_format_request_body = BaseApi._post_json_pointer_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_json_pointer_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e2a8e4178f8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format +Schema: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py new file mode 100644 index 00000000000..e154f1fcdb2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody + +path = "/requestBody/postMaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..d086568cedb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_request_body = BaseApi._post_maximum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7d9db688e71 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation +Schema: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py new file mode 100644 index 00000000000..6ad11512c97 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody + +path = "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py new file mode 100644 index 00000000000..4fb589404bf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_with_unsigned_integer_request_body = BaseApi._post_maximum_validation_with_unsigned_integer_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_with_unsigned_integer_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7536bd0136c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer +Schema: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..713fdb3d848 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody + +path = "/requestBody/postMaxitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..70bbb41cf2b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxitems_validation_request_body = BaseApi._post_maxitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..faaf87ab0d7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation +Schema: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py new file mode 100644 index 00000000000..5c8fb246f4e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody + +path = "/requestBody/postMaxlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py new file mode 100644 index 00000000000..e53d7cf24a7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxlengthValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxlength_validation_request_body = BaseApi._post_maxlength_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxlength_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8c1872beb80 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation +Schema: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py new file mode 100644 index 00000000000..ee07bbdbbbd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody + +path = "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py new file mode 100644 index 00000000000..15ce6ba1ed5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties0_means_the_object_is_empty_request_body = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..be07984b186 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty +Schema: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py new file mode 100644 index 00000000000..bc81917babb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody + +path = "/requestBody/postMaxpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..e7fd11c2354 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxpropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties_validation_request_body = BaseApi._post_maxproperties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..16789fbe850 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation +Schema: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py new file mode 100644 index 00000000000..ad9ce2f4096 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody + +path = "/requestBody/postMinimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..3cbc67f84af --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_request_body = BaseApi._post_minimum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c2565a914a6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation +Schema: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py new file mode 100644 index 00000000000..5dadedfe25a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody + +path = "/requestBody/postMinimumValidationWithSignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py new file mode 100644 index 00000000000..7b710ba3340 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_with_signed_integer_request_body = BaseApi._post_minimum_validation_with_signed_integer_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_with_signed_integer_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1e1f0b94a42 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer +Schema: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..0f7cc0c1305 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody + +path = "/requestBody/postMinitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..d21ce3e5f8a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minitems_validation_request_body = BaseApi._post_minitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..08a7a0ce0ab --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation +Schema: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py new file mode 100644 index 00000000000..0fa95af2e9d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody + +path = "/requestBody/postMinlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py new file mode 100644 index 00000000000..eeecaa2e51d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinlengthValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minlength_validation_request_body = BaseApi._post_minlength_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minlength_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..352706b990d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation +Schema: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py new file mode 100644 index 00000000000..3373bc97244 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody + +path = "/requestBody/postMinpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..08f61ae11f5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinpropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minproperties_validation_request_body = BaseApi._post_minproperties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minproperties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..78f5320afd0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation +Schema: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..fa5ad4e8f6f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..46e51530cec --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_allof_to_check_validation_semantics_request_body = BaseApi._post_nested_allof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_allof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e6cddb5a48e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..809df9f9000 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..5af69d6bd9a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_anyof_to_check_validation_semantics_request_body = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..dd2578be639 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py new file mode 100644 index 00000000000..ac24cf6aa52 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody + +path = "/requestBody/postNestedItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py new file mode 100644 index 00000000000..4d95cd261f1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_items_request_body = BaseApi._post_nested_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_items_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..88c01be599d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items +Schema: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..53864f06e40 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..9bc735cdc52 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_oneof_to_check_validation_semantics_request_body = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..da246f2369a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py new file mode 100644 index 00000000000..0ce18a55b48 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody + +path = "/requestBody/postNotMoreComplexSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py new file mode 100644 index 00000000000..1a98f1038dc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMoreComplexSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_more_complex_schema_request_body = BaseApi._post_not_more_complex_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_more_complex_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f0f896578b9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema +Schema: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py new file mode 100644 index 00000000000..5d8109b6f57 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody + +path = "/requestBody/postNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py new file mode 100644 index 00000000000..9ebbcad3242 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_request_body = BaseApi._post_not_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ac66137b933 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not +Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py new file mode 100644 index 00000000000..9cd5dfb3207 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody + +path = "/requestBody/postNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py new file mode 100644 index 00000000000..e99280b4671 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNulCharactersInStringsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nul_characters_in_strings_request_body = BaseApi._post_nul_characters_in_strings_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nul_characters_in_strings_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5a75e8b811c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings +Schema: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py new file mode 100644 index 00000000000..d00cc04dfb9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody + +path = "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py new file mode 100644 index 00000000000..2a2665b4b48 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_null_type_matches_only_the_null_object_request_body = BaseApi._post_null_type_matches_only_the_null_object_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_null_type_matches_only_the_null_object_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fb3c7bee1da --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object +Schema: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py new file mode 100644 index 00000000000..47587baa209 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody + +path = "/requestBody/postNumberTypeMatchesNumbersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py new file mode 100644 index 00000000000..131d6d3b8bb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNumberTypeMatchesNumbersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_number_type_matches_numbers_request_body = BaseApi._post_number_type_matches_numbers_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_number_type_matches_numbers_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..91952830c9c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers +Schema: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py new file mode 100644 index 00000000000..4128e9e90db --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody + +path = "/requestBody/postObjectPropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..ad7b583cfc6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectPropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_properties_validation_request_body = BaseApi._post_object_properties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_properties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..0b4594d21a6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation +Schema: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py new file mode 100644 index 00000000000..9a28be7eac3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody + +path = "/requestBody/postObjectTypeMatchesObjectsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py new file mode 100644 index 00000000000..f1003bb773e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectTypeMatchesObjectsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_type_matches_objects_request_body = BaseApi._post_object_type_matches_objects_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_type_matches_objects_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7bd73ee7b25 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects +Schema: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py new file mode 100644 index 00000000000..19e6c49de33 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody + +path = "/requestBody/postOneofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py new file mode 100644 index 00000000000..05c28bb5073 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofComplexTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_complex_types_request_body = BaseApi._post_oneof_complex_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_complex_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..30234a39717 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types +Schema: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py new file mode 100644 index 00000000000..5c6ffb88a3a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody + +path = "/requestBody/postOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py new file mode 100644 index 00000000000..f737670374e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_request_body = BaseApi._post_oneof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2a261a8e487 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof +Schema: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..a08595ec8ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody + +path = "/requestBody/postOneofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..1be36e5cb2a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_base_schema_request_body = BaseApi._post_oneof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..34fa27fa52d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema +Schema: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..4f9a293eb8f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody + +path = "/requestBody/postOneofWithEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..5c980b38c84 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_empty_schema_request_body = BaseApi._post_oneof_with_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5162407590b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema +Schema: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py new file mode 100644 index 00000000000..ce1e3d7a855 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody + +path = "/requestBody/postOneofWithRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py new file mode 100644 index 00000000000..9feee812822 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithRequiredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_required_request_body = BaseApi._post_oneof_with_required_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_required_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2b4322b4bcd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required +Schema: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py new file mode 100644 index 00000000000..73139a7fca0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody + +path = "/requestBody/postPatternIsNotAnchoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py new file mode 100644 index 00000000000..ee3e83d0561 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternIsNotAnchoredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_is_not_anchored_request_body = BaseApi._post_pattern_is_not_anchored_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_is_not_anchored_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..91f09d1ded4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored +Schema: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py new file mode 100644 index 00000000000..df8f3abd132 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody + +path = "/requestBody/postPatternValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py new file mode 100644 index 00000000000..d7870d65f97 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_validation_request_body = BaseApi._post_pattern_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..27e60dfe8be --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation +Schema: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..4b7025d9ccb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody + +path = "/requestBody/postPropertiesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..d3623ecd49f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_escaped_characters_request_body = BaseApi._post_properties_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..47261737ae8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters +Schema: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py new file mode 100644 index 00000000000..a54d80da178 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody + +path = "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py new file mode 100644 index 00000000000..4084045fc11 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_property_named_ref_that_is_not_a_reference_request_body = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7a05f94ce79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference +Schema: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py new file mode 100644 index 00000000000..9b6c9622b89 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_additionalproperties_request_body import RequestBodyPostRefInAdditionalpropertiesRequestBody + +path = "/requestBody/postRefInAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py new file mode 100644 index 00000000000..3730e8193fa --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_additionalproperties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[ + ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, + ref_in_additionalproperties.RefInAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[ + ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, + ref_in_additionalproperties.RefInAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_additionalproperties_request_body( + self, + body: typing.Union[ + ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, + ref_in_additionalproperties.RefInAdditionalpropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAdditionalpropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_additionalproperties_request_body = BaseApi._post_ref_in_additionalproperties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_additionalproperties_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..260102ecb7e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_additionalproperties +Schema: typing_extensions.TypeAlias = ref_in_additionalproperties.RefInAdditionalproperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py new file mode 100644 index 00000000000..b4900ebefaf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_allof_request_body import RequestBodyPostRefInAllofRequestBody + +path = "/requestBody/postRefInAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py new file mode 100644 index 00000000000..b1289893d6a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_allof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAllofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_allof_request_body = BaseApi._post_ref_in_allof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_allof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d1e3c696440 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_allof +Schema: typing_extensions.TypeAlias = ref_in_allof.RefInAllof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py new file mode 100644 index 00000000000..0f1d5502e9b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_anyof_request_body import RequestBodyPostRefInAnyofRequestBody + +path = "/requestBody/postRefInAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py new file mode 100644 index 00000000000..cd9c738ab60 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_anyof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAnyofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_anyof_request_body = BaseApi._post_ref_in_anyof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_anyof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ef53520958f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_anyof +Schema: typing_extensions.TypeAlias = ref_in_anyof.RefInAnyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py new file mode 100644 index 00000000000..54fef5c117e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_items_request_body import RequestBodyPostRefInItemsRequestBody + +path = "/requestBody/postRefInItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py new file mode 100644 index 00000000000..259c2bd39ce --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_request_body( + self, + body: typing.Union[ + ref_in_items.RefInItemsTupleInput, + ref_in_items.RefInItemsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_items_request_body( + self, + body: typing.Union[ + ref_in_items.RefInItemsTupleInput, + ref_in_items.RefInItemsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_items_request_body( + self, + body: typing.Union[ + ref_in_items.RefInItemsTupleInput, + ref_in_items.RefInItemsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_items_request_body = BaseApi._post_ref_in_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_items_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fd61df6cd48 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_items +Schema: typing_extensions.TypeAlias = ref_in_items.RefInItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py new file mode 100644 index 00000000000..8e744c5dca8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_not_request_body import RequestBodyPostRefInNotRequestBody + +path = "/requestBody/postRefInNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py new file mode 100644 index 00000000000..a032f0a5b80 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_not + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInNotRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_not_request_body = BaseApi._post_ref_in_not_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_not_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..38c80af7bc4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_not +Schema: typing_extensions.TypeAlias = ref_in_not.RefInNot diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py new file mode 100644 index 00000000000..1b1ed6931d1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_oneof_request_body import RequestBodyPostRefInOneofRequestBody + +path = "/requestBody/postRefInOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py new file mode 100644 index 00000000000..37784168cdd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_oneof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInOneofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_oneof_request_body = BaseApi._post_ref_in_oneof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b2867bf3d14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_oneof +Schema: typing_extensions.TypeAlias = ref_in_oneof.RefInOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py new file mode 100644 index 00000000000..3b1ee36dc42 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ref_in_property_request_body import RequestBodyPostRefInPropertyRequestBody + +path = "/requestBody/postRefInPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py new file mode 100644 index 00000000000..81c91532daf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_property + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInPropertyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_property_request_body = BaseApi._post_ref_in_property_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_property_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..88a787e95b4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_property +Schema: typing_extensions.TypeAlias = ref_in_property.RefInProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py new file mode 100644 index 00000000000..5ea3e864c93 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody + +path = "/requestBody/postRequiredDefaultValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py new file mode 100644 index 00000000000..6cfc1d51d96 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredDefaultValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_default_validation_request_body = BaseApi._post_required_default_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_default_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b7a10fc1a21 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation +Schema: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py new file mode 100644 index 00000000000..f8b9dcf8fe1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody + +path = "/requestBody/postRequiredValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py new file mode 100644 index 00000000000..e00ceba288b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_validation_request_body = BaseApi._post_required_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6ca85dbe06d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation +Schema: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py new file mode 100644 index 00000000000..9f70eb66747 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody + +path = "/requestBody/postRequiredWithEmptyArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py new file mode 100644 index 00000000000..5dff7f12652 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEmptyArrayRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_empty_array_request_body = BaseApi._post_required_with_empty_array_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_empty_array_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..91b21b45316 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array +Schema: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..52861ef3116 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody + +path = "/requestBody/postRequiredWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..3b4b24c5c4c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_escaped_characters_request_body = BaseApi._post_required_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a0c77d21366 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters +Schema: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py new file mode 100644 index 00000000000..455fb167b26 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody + +path = "/requestBody/postSimpleEnumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..5c2ddee175a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSimpleEnumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_simple_enum_validation_request_body = BaseApi._post_simple_enum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_simple_enum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8377f58eb9f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation +Schema: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py new file mode 100644 index 00000000000..bf46191b89d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody + +path = "/requestBody/postStringTypeMatchesStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py new file mode 100644 index 00000000000..81002710b86 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostStringTypeMatchesStringsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_string_type_matches_strings_request_body = BaseApi._post_string_type_matches_strings_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_string_type_matches_strings_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b08e332ac24 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings +Schema: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py new file mode 100644 index 00000000000..a9a6b2d9a93 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody + +path = "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py new file mode 100644 index 00000000000..2a7de144405 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[ + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[ + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( + self, + body: typing.Union[ + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, + the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b5cefca0997 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing +Schema: typing_extensions.TypeAlias = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py new file mode 100644 index 00000000000..1e8addcca13 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody + +path = "/requestBody/postUniqueitemsFalseValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py new file mode 100644 index 00000000000..bb1db20ee1f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_validation_request_body = BaseApi._post_uniqueitems_false_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4b7be0c42e8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation +Schema: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..6a663f89e52 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody + +path = "/requestBody/postUniqueitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..0b9df9ad285 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_validation_request_body = BaseApi._post_uniqueitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b5ebe20daa6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation +Schema: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py new file mode 100644 index 00000000000..e57a1f4fda6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody + +path = "/requestBody/postUriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py new file mode 100644 index 00000000000..b2f918a9a67 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_format_request_body = BaseApi._post_uri_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f50ab22bd79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format +Schema: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py new file mode 100644 index 00000000000..3e35c33e574 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody + +path = "/requestBody/postUriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py new file mode 100644 index 00000000000..cf0c69f5dd6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriReferenceFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_reference_format_request_body = BaseApi._post_uri_reference_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_reference_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2abeeb7f30a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format +Schema: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py new file mode 100644 index 00000000000..6de7813243c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody + +path = "/requestBody/postUriTemplateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py new file mode 100644 index 00000000000..1d5936d7c61 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriTemplateFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_template_format_request_body = BaseApi._post_uri_template_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_template_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..6edef9170d2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..0e90a70da6f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format +Schema: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..85d62d43e14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ba5811c8caf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ffe3fdfd75a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..40a8a7cb914 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..340bf9ac466 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate +Schema: typing_extensions.TypeAlias = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9a9a1f63ce1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..205ccb71913 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..0e1479a204a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default +Schema: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..58098efaee9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d558474124d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_can_exist_by_itself_response_body_for_content_types = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..c5e803347e6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3604eaec570 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself +Schema: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e3bdc8efe25 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8fd8d55ac0d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types = BaseApi._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..31a1e692371 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators +Schema: typing_extensions.TypeAlias = additionalproperties_should_not_look_in_applicators.AdditionalpropertiesShouldNotLookInApplicators diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..94fcd5a91e2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes + +path = "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9ce7cfc8177 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_combined_with_anyof_oneof_response_body_for_content_types = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..0f53323a58c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof +Schema: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2dd5b1204a9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes + +path = "/responseBody/postAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c40f43fd99b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_response_body_for_content_types = BaseApi._post_allof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4d535df3587 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof +Schema: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4e22ee767b1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes + +path = "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..048e0956d50 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_simple_types_response_body_for_content_types = BaseApi._post_allof_simple_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_simple_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..20e2d311d65 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types +Schema: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..dd5b4e26c61 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9a00f7e10b2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_base_schema_response_body_for_content_types = BaseApi._post_allof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d21fc0258d8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema +Schema: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6f89734ca8e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6d900d0aba5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..69c3924727e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..64740cc3c20 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4d0dfa99747 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_first_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..56a68d392e9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..714d27c739d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b50ef7bdfdc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_last_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2ce7c85276d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema +Schema: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..33fa82761fd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f96091c9d0e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_two_empty_schemas_response_body_for_content_types = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1130b86c7fc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas +Schema: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..bf78d0d3dc6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes + +path = "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..7cef1f5cdca --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_complex_types_response_body_for_content_types = BaseApi._post_anyof_complex_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_complex_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..37d58d62929 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types +Schema: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..732664d5de2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes + +path = "/responseBody/postAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e3c5ead12f7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_response_body_for_content_types = BaseApi._post_anyof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f78e4027a5e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof +Schema: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..42a12880597 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..99336b090f2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_base_schema_response_body_for_content_types = BaseApi._post_anyof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..49488325780 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a51ee5c5cbb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema +Schema: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..41137e270ce --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f3881f08d7a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c89f2bd3f41 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema +Schema: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0d7d4c9726a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes + +path = "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..41bf7511544 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_array_type_matches_arrays_response_body_for_content_types = BaseApi._post_array_type_matches_arrays_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_array_type_matches_arrays_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..2ecad59bafd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.array_type_matches_arrays.ArrayTypeMatchesArraysTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c1f04ef4119 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays +Schema: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aadbb3b88e6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes + +path = "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..45bdaa407b8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_boolean_type_matches_booleans_response_body_for_content_types = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..391dd2a3830 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: bool + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..08ea06ae60b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans +Schema: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a5bd11c1830 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes + +path = "/responseBody/postByIntResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4a40fc146b8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByIntResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_int_response_body_for_content_types = BaseApi._post_by_int_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_int_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7adfd689fbf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int +Schema: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..b9a0567a12c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes + +path = "/responseBody/postByNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..aa3e9430558 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByNumberResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_number_response_body_for_content_types = BaseApi._post_by_number_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_number_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..13f45350f7a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number +Schema: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e0e5f516357 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes + +path = "/responseBody/postBySmallNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..392f9311ba8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBySmallNumberResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_small_number_response_body_for_content_types = BaseApi._post_by_small_number_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_small_number_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..08d562eedca --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number +Schema: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..13b6286ae93 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes + +path = "/responseBody/postDateTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c6a499e9d8b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_time_format_response_body_for_content_types = BaseApi._post_date_time_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_time_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2920670b4c7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format +Schema: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..427a78c0255 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes + +path = "/responseBody/postEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c2653ab986e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmailFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_email_format_response_body_for_content_types = BaseApi._post_email_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_email_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ee6f2bff8f5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format +Schema: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aa4d0c2b50f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes + +path = "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ccf7f40e0b9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with0_does_not_match_false_response_body_for_content_types = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1db50373cd1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c597080e60f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false +Schema: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e378c6460c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes + +path = "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d29637bc2c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with1_does_not_match_true_response_body_for_content_types = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1db50373cd1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fd53b5fcf24 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true +Schema: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..313b5ad0205 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d2ae781a9c5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_escaped_characters_response_body_for_content_types = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e645226c4d6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal["foo\nbar", "foo\rbar"] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..957f84b23de --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters +Schema: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2861bd2f1b4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes + +path = "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5e31338efeb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_false_does_not_match0_response_body_for_content_types = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..4e2c62f810d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal[False] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..06d1a86cede --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 +Schema: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..28b8c164e6c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes + +path = "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3c2108ac0c4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_true_does_not_match1_response_body_for_content_types = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..209a88880d0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal[True] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6bb13075e98 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 +Schema: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..bec380d4f76 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes + +path = "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8b281749cb0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enums_in_properties_response_body_for_content_types = BaseApi._post_enums_in_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enums_in_properties_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..87acc6cc302 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.enums_in_properties.EnumsInPropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8c4fd671f3a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties +Schema: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1530b05acd3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes + +path = "/responseBody/postForbiddenPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..bd24aa7fdf7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_forbidden_property_response_body_for_content_types = BaseApi._post_forbidden_property_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_forbidden_property_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7b1c9c5743b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property +Schema: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..54034c61770 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes + +path = "/responseBody/postHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1e5984a0a94 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostHostnameFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_hostname_format_response_body_for_content_types = BaseApi._post_hostname_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_hostname_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4dbbf097174 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format +Schema: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6fd639a97bd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes + +path = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5d950d14b7d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_integer_type_matches_integers_response_body_for_content_types = BaseApi._post_integer_type_matches_integers_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_integer_type_matches_integers_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..3621b2b4790 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: int + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6158b6d193a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers +Schema: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..08a58fea9cb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes + +path = "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9f39bfc65dc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..3621b2b4790 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: int + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f4c72861928 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf +Schema: typing_extensions.TypeAlias = invalid_instance_should_not_raise_error_when_float_division_inf.InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d2f60581791 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes + +path = "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d94189ae05d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_invalid_string_value_for_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_invalid_string_value_for_default_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_invalid_string_value_for_default_response_body_for_content_types = BaseApi._post_invalid_string_value_for_default_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_invalid_string_value_for_default_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4d8393f859c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import invalid_string_value_for_default +Schema: typing_extensions.TypeAlias = invalid_string_value_for_default.InvalidStringValueForDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f6d1f7bfbc8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes + +path = "/responseBody/postIpv4FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f5643a44f3c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv4FormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv4_format_response_body_for_content_types = BaseApi._post_ipv4_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv4_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..059799950e5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format +Schema: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e5190f29dec --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes + +path = "/responseBody/postIpv6FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..33b166af938 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv6FormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv6_format_response_body_for_content_types = BaseApi._post_ipv6_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv6_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2962488b272 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format +Schema: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9c29d339289 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes + +path = "/responseBody/postJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..18fca331566 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_json_pointer_format_response_body_for_content_types = BaseApi._post_json_pointer_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e2a8e4178f8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format +Schema: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..06c7038e33b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes + +path = "/responseBody/postMaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..cccfa360bcf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_response_body_for_content_types = BaseApi._post_maximum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7d9db688e71 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation +Schema: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ae78ec6c33e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes + +path = "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..49e6d5d9745 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_with_unsigned_integer_response_body_for_content_types = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7536bd0136c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer +Schema: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cb76cb68088 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..38915643d96 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxitems_validation_response_body_for_content_types = BaseApi._post_maxitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..faaf87ab0d7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation +Schema: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e9d84a641bb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a482016256c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxlength_validation_response_body_for_content_types = BaseApi._post_maxlength_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxlength_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8c1872beb80 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation +Schema: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4d41e385754 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes + +path = "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6124a1ad485 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties0_means_the_object_is_empty_response_body_for_content_types = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..be07984b186 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty +Schema: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..319dcbd3536 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9d7b2c07ce2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties_validation_response_body_for_content_types = BaseApi._post_maxproperties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..16789fbe850 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation +Schema: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3eb225cc1ba --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes + +path = "/responseBody/postMinimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..140d3d748ff --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_response_body_for_content_types = BaseApi._post_minimum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c2565a914a6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation +Schema: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a73b8e4f6d1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes + +path = "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..dec182d4d0d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_with_signed_integer_response_body_for_content_types = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1e1f0b94a42 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer +Schema: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..938aef53ed8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postMinitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..64106f1379a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minitems_validation_response_body_for_content_types = BaseApi._post_minitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..08a7a0ce0ab --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation +Schema: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2ca5319be17 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes + +path = "/responseBody/postMinlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c95c71f22e5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minlength_validation_response_body_for_content_types = BaseApi._post_minlength_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minlength_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..352706b990d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation +Schema: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cd2918690b4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c6750b8fb2b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minproperties_validation_response_body_for_content_types = BaseApi._post_minproperties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minproperties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..78f5320afd0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation +Schema: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..95e15ba92fd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..411be9b195e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_allof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e6cddb5a48e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aae340572e2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a71d70d7b4e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_anyof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..dd2578be639 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..12758f725c7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes + +path = "/responseBody/postNestedItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..540e4dcc22a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_items_response_body_for_content_types = BaseApi._post_nested_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_items_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..5f553449314 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.nested_items.NestedItemsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..88c01be599d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items +Schema: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0086d5c131c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e1916ec4221 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_oneof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..da246f2369a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics +Schema: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2968687b1d4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes + +path = "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2d66f1c2961 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_more_complex_schema_response_body_for_content_types = BaseApi._post_not_more_complex_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_more_complex_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f0f896578b9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema +Schema: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..12d3bba8822 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes + +path = "/responseBody/postNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..467dab2e0ea --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_response_body_for_content_types = BaseApi._post_not_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ac66137b933 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not +Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..53972940ea0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes + +path = "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3893df84236 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_nul_characters_in_strings_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..063d528d2a8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal["hello\x00there"] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5a75e8b811c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings +Schema: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f340743b836 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes + +path = "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..cb50c6e1bf8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_null_type_matches_only_the_null_object_response_body_for_content_types = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..8d22f289ae1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: None + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fb3c7bee1da --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object +Schema: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2c021329fd2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes + +path = "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..0c95b06b75c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_number_type_matches_numbers_response_body_for_content_types = BaseApi._post_number_type_matches_numbers_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_number_type_matches_numbers_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1db50373cd1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..91952830c9c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers +Schema: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..56fb6d5dd41 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9fe01bf1044 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_properties_validation_response_body_for_content_types = BaseApi._post_object_properties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_properties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..0b4594d21a6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation +Schema: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9c440333b2d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes + +path = "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..144f160e917 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_type_matches_objects_response_body_for_content_types = BaseApi._post_object_type_matches_objects_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_type_matches_objects_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..d3eec0adb00 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7bd73ee7b25 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects +Schema: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f096eb72f82 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes + +path = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b70264e4f40 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_complex_types_response_body_for_content_types = BaseApi._post_oneof_complex_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_complex_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..30234a39717 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types +Schema: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..222fe0b64a9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes + +path = "/responseBody/postOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f1106aaa3b0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_response_body_for_content_types = BaseApi._post_oneof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2a261a8e487 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof +Schema: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6aee2766777 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2054aa9f7c8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_base_schema_response_body_for_content_types = BaseApi._post_oneof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..49488325780 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..34fa27fa52d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema +Schema: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..29b1dba63cc --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e7212b57cdf --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_empty_schema_response_body_for_content_types = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5162407590b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema +Schema: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..fb966129116 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes + +path = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..fc0b6647fdb --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_required_response_body_for_content_types = BaseApi._post_oneof_with_required_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_required_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..d3eec0adb00 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2b4322b4bcd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required +Schema: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..06d097f0429 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes + +path = "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d022fe7980e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_is_not_anchored_response_body_for_content_types = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..91f09d1ded4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored +Schema: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3d2a9cd79fd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes + +path = "/responseBody/postPatternValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..06267e0cc35 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_validation_response_body_for_content_types = BaseApi._post_pattern_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..27e60dfe8be --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation +Schema: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..524ce0e570f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2ced2137cf0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_escaped_characters_response_body_for_content_types = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..47261737ae8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters +Schema: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0ca1fea80ee --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes + +path = "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..84fc2b6845e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_property_named_ref_that_is_not_a_reference_response_body_for_content_types = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7a05f94ce79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference +Schema: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4db5b856ad1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes + +path = "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..73edf839b8c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_additionalproperties_response_body_for_content_types = BaseApi._post_ref_in_additionalproperties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..662f4f12aea --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.ref_in_additionalproperties.RefInAdditionalpropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..260102ecb7e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_additionalproperties +Schema: typing_extensions.TypeAlias = ref_in_additionalproperties.RefInAdditionalproperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1af680f8c9f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_allof_response_body_for_content_types import ResponseBodyPostRefInAllofResponseBodyForContentTypes + +path = "/responseBody/postRefInAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..00b2ee474cd --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_allof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAllofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_allof_response_body_for_content_types = BaseApi._post_ref_in_allof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_allof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d1e3c696440 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_allof +Schema: typing_extensions.TypeAlias = ref_in_allof.RefInAllof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6172c878c8c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_anyof_response_body_for_content_types import ResponseBodyPostRefInAnyofResponseBodyForContentTypes + +path = "/responseBody/postRefInAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2688321be09 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInAnyofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_anyof_response_body_for_content_types = BaseApi._post_ref_in_anyof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_anyof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ef53520958f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_anyof +Schema: typing_extensions.TypeAlias = ref_in_anyof.RefInAnyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9273c3078b7 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_items_response_body_for_content_types import ResponseBodyPostRefInItemsResponseBodyForContentTypes + +path = "/responseBody/postRefInItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2d149092919 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_items_response_body_for_content_types = BaseApi._post_ref_in_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_items_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..4f3bf9cb7c3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.ref_in_items.RefInItemsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fd61df6cd48 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_items +Schema: typing_extensions.TypeAlias = ref_in_items.RefInItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..26a9ed4464f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_not_response_body_for_content_types import ResponseBodyPostRefInNotResponseBodyForContentTypes + +path = "/responseBody/postRefInNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f33ee53f26a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_not_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInNotResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_not_response_body_for_content_types = BaseApi._post_ref_in_not_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_not_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..38c80af7bc4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_not +Schema: typing_extensions.TypeAlias = ref_in_not.RefInNot diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..7e856a6d122 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_oneof_response_body_for_content_types import ResponseBodyPostRefInOneofResponseBodyForContentTypes + +path = "/responseBody/postRefInOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4a3c73f132a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInOneofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_oneof_response_body_for_content_types = BaseApi._post_ref_in_oneof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b2867bf3d14 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_oneof +Schema: typing_extensions.TypeAlias = ref_in_oneof.RefInOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..8c589053cd8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ref_in_property_response_body_for_content_types import ResponseBodyPostRefInPropertyResponseBodyForContentTypes + +path = "/responseBody/postRefInPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d4b3dbdb77d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ref_in_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ref_in_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ref_in_property_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRefInPropertyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ref_in_property_response_body_for_content_types = BaseApi._post_ref_in_property_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ref_in_property_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..88a787e95b4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_in_property +Schema: typing_extensions.TypeAlias = ref_in_property.RefInProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..8f8152a4d4e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes + +path = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e3654bfa004 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_default_validation_response_body_for_content_types = BaseApi._post_required_default_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_default_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b7a10fc1a21 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation +Schema: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e482831717f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes + +path = "/responseBody/postRequiredValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e6b1a3ddf58 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_validation_response_body_for_content_types = BaseApi._post_required_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6ca85dbe06d --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation +Schema: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..19d6f36e233 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes + +path = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..130476861ad --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_empty_array_response_body_for_content_types = BaseApi._post_required_with_empty_array_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_empty_array_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..91b21b45316 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array +Schema: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..5e8263300ab --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b4343afac07 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_escaped_characters_response_body_for_content_types = BaseApi._post_required_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a0c77d21366 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters +Schema: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..7c2389e93c5 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes + +path = "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..262b405dd5f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_simple_enum_validation_response_body_for_content_types = BaseApi._post_simple_enum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_simple_enum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1db50373cd1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8377f58eb9f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation +Schema: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..eded6790dd1 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes + +path = "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8e0d97c5ef2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_string_type_matches_strings_response_body_for_content_types = BaseApi._post_string_type_matches_strings_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_string_type_matches_strings_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..49488325780 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b08e332ac24 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings +Schema: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d78f43458f4 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes + +path = "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b5a0c6da1ff --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..b6a5b3c35f9 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b5cefca0997 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing +Schema: typing_extensions.TypeAlias = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..37e8f062863 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..17bd3cbafed --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_validation_response_body_for_content_types = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4b7be0c42e8 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation +Schema: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..95cf2c1f018 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b8360fed85f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_validation_response_body_for_content_types = BaseApi._post_uniqueitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b5ebe20daa6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation +Schema: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..91e06866bd6 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes + +path = "/responseBody/postUriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..45837e8f1c0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_format_response_body_for_content_types = BaseApi._post_uri_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f50ab22bd79 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format +Schema: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4b73213c603 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes + +path = "/responseBody/postUriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..843382e1b49 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_reference_format_response_body_for_content_types = BaseApi._post_uri_reference_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_reference_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2abeeb7f30a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format +Schema: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4d9fad8a307 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes + +path = "/responseBody/postUriTemplateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3db47982f71 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_template_format_response_body_for_content_types = BaseApi._post_uri_template_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_template_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..29f6e1106ac --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..0e90a70da6f --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format +Schema: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed b/samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py new file mode 100644 index 00000000000..e7207ca0cef --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi # type: ignore[import] +import urllib3 +from urllib3 import fields +from urllib3 import exceptions as urllib3_exceptions +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import exceptions + + +logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise exceptions.ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + headers = headers or HTTPHeaderDict() + + used_timeout: typing.Optional[urllib3.Timeout] = None + if timeout: + if isinstance(timeout, (int, float)): + used_timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: + if 'Content-Type' not in headers and body is None: + r = self.pool_manager.request( + method, + url, + preload_content=not stream, + timeout=used_timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + body=body, + encode_multipart=False, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise exceptions.ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + except urllib3_exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise exceptions.ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def get(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def head(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def options(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def delete(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def post(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def put(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def patch(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py new file mode 100644 index 00000000000..75cdb24e298 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +import typing_extensions + +from .schema import ( + get_class, + none_type_, + classproperty, + Bool, + FileIO, + Schema, + SingletonMeta, + AnyTypeSchema, + UnsetAnyTypeSchema, + INPUT_TYPES_ALL +) + +from .schemas import ( + ListSchema, + NoneSchema, + NumberSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + StrSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BytesSchema, + FileSchema, + BinarySchema, + BoolSchema, + NotAnyTypeSchema, + OUTPUT_BASE_TYPES, + DictSchema +) +from .validation import ( + PatternInfo, + ValidationMetadata, + immutabledict +) +from .format import ( + as_date, + as_datetime, + as_decimal, + as_uuid +) + +def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore + res = {} + for key, val in t_dict.__annotations__.items(): + if isinstance(val, typing._GenericAlias): # type: ignore + # typing.Type[W] -> W + val_cls = typing.get_args(val)[0] + res[key] = val_cls + return res + +X = typing.TypeVar('X', bound=typing.Tuple) + +def tuple_to_instance(tup: typing.Type[X]) -> X: + res = [] + for arg in typing.get_args(tup): + if isinstance(arg, typing._GenericAlias): # type: ignore + # typing.Type[Schema] -> Schema + arg_cls = typing.get_args(arg)[0] + res.append(arg_cls) + return tuple(res) # type: ignore + + +class Unset: + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset: Unset = Unset() + +def key_unknown_error_msg(key: str) -> str: + return (f"Invalid key. The key {key} is not a known key in this payload. " + "If this key is an additional property, use get_additional_property_" + ) + +def raise_if_key_known( + key: str, + required_keys: typing.FrozenSet[str], + optional_keys: typing.FrozenSet[str] +): + if key in required_keys or key in optional_keys: + raise ValueError(f"The key {key} is a known property, use get_property to access its value") + +__all__ = [ + 'get_class', + 'none_type_', + 'classproperty', + 'Bool', + 'FileIO', + 'Schema', + 'SingletonMeta', + 'AnyTypeSchema', + 'UnsetAnyTypeSchema', + 'INPUT_TYPES_ALL', + 'ListSchema', + 'NoneSchema', + 'NumberSchema', + 'IntSchema', + 'Int32Schema', + 'Int64Schema', + 'Float32Schema', + 'Float64Schema', + 'StrSchema', + 'UUIDSchema', + 'DateSchema', + 'DateTimeSchema', + 'DecimalSchema', + 'BytesSchema', + 'FileSchema', + 'BinarySchema', + 'BoolSchema', + 'NotAnyTypeSchema', + 'OUTPUT_BASE_TYPES', + 'DictSchema', + 'PatternInfo', + 'ValidationMetadata', + 'immutabledict', + 'as_date', + 'as_datetime', + 'as_decimal', + 'as_uuid', + 'typed_dict_to_instance', + 'tuple_to_instance', + 'Unset', + 'unset', + 'key_unknown_error_msg', + 'raise_if_key_known' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py new file mode 100644 index 00000000000..bb614903b82 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py @@ -0,0 +1,115 @@ +import datetime +import decimal +import functools +import typing +import uuid + +from dateutil import parser, tz + + +class CustomIsoparser(parser.isoparser): + def __init__(self, sep: typing.Optional[str] = None): + """ + :param sep: + A single character that separates date and time portions. If + ``None``, the parser will accept any single character. + For strict ISO-8601 adherence, pass ``'T'``. + """ + if sep is not None: + if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): + raise ValueError('Separator must be a single, non-numeric ' + + 'ASCII character') + + used_sep = sep.encode('ascii') + else: + used_sep = None + + self._sep = used_sep + + @staticmethod + def __get_ascii_bytes(str_in: str) -> bytes: + # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII + # ASCII is the same in UTF-8 + try: + return str_in.encode('ascii') + except UnicodeEncodeError as e: + msg = 'ISO-8601 strings should contain only ASCII characters' + raise ValueError(msg) from e + + def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isodate(dt_str_ascii) # type: ignore + values = typing.cast(typing.Tuple[typing.List[int], int], values) + components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) + pos = values[1] + return components, pos + + def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isotime(dt_str_ascii) # type: ignore + components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore + return components + + def parse_isodatetime(self, dt_str: str) -> datetime.datetime: + date_components, pos = self.__parse_isodate(dt_str) + if len(dt_str) <= pos: + # len(components) <= 3 + raise ValueError('Value is not a datetime') + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) + if hour == 24: + hour = 0 + components = (*date_components, hour, minute, second, microsecond, tzinfo) + return datetime.datetime(*components) + datetime.timedelta(days=1) + else: + components = (*date_components, hour, minute, second, microsecond, tzinfo) + else: + raise ValueError('String contains unknown ISO components') + + return datetime.datetime(*components) + + def parse_isodate_str(self, datestr: str) -> datetime.date: + components, pos = self.__parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return datetime.date(*components) + +DEFAULT_ISOPARSER = CustomIsoparser() + +@functools.lru_cache() +def as_date(arg: str) -> datetime.date: + """ + type = "string" + format = "date" + """ + return DEFAULT_ISOPARSER.parse_isodate_str(arg) + +@functools.lru_cache() +def as_datetime(arg: str) -> datetime.datetime: + """ + type = "string" + format = "date-time" + """ + return DEFAULT_ISOPARSER.parse_isodatetime(arg) + +@functools.lru_cache() +def as_decimal(arg: str) -> decimal.Decimal: + """ + Applicable when storing decimals that are sent over the wire as strings + type = "string" + format = "number" + """ + return decimal.Decimal(arg) + +@functools.lru_cache() +def as_uuid(arg: str) -> uuid.UUID: + """ + type = "string" + format = "uuid" + """ + return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py new file mode 100644 index 00000000000..3897e140a4a --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py @@ -0,0 +1,97 @@ +""" +MIT License + +Copyright (c) 2020 Corentin Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +from __future__ import annotations +import typing +import typing_extensions + +_K = typing.TypeVar("_K") +_V = typing.TypeVar("_V", covariant=True) + + +class immutabledict(typing.Mapping[_K, _V]): + """ + An immutable wrapper around dictionaries that implements + the complete :py:class:`collections.Mapping` interface. + It can be used as a drop-in replacement for dictionaries + where immutability is desired. + + Note: custom version of this class made to remove __init__ + """ + + dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict + _dict: typing.Dict[_K, _V] + _hash: typing.Optional[int] + + @classmethod + def fromkeys( + cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None + ) -> "immutabledict[_K, _V]": + return cls(dict.fromkeys(seq, value)) + + def __new__(cls, *args: typing.Any) -> typing_extensions.Self: + inst = super().__new__(cls) + setattr(inst, '_dict', cls.dict_cls(*args)) + setattr(inst, '_hash', None) + return inst + + def __getitem__(self, key: _K) -> _V: + return self._dict[key] + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def __iter__(self) -> typing.Iterator[_K]: + return iter(self._dict) + + def __len__(self) -> int: + return len(self._dict) + + def __repr__(self) -> str: + return "%s(%r)" % (self.__class__.__name__, self._dict) + + def __hash__(self) -> int: + if self._hash is None: + h = 0 + for key, value in self.items(): + h ^= hash((key, value)) + self._hash = h + + return self._hash + + def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(self) + new.update(other) + return self.__class__(new) + + def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(other) + new.update(self) + return new + + def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: + raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py new file mode 100644 index 00000000000..18cacd94c6c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py @@ -0,0 +1,729 @@ +from __future__ import annotations +import datetime +import dataclasses +import io +import types +import typing +import uuid + +import functools +import typing_extensions + +from unit_test_api import exceptions +from unit_test_api.configurations import schema_configuration + +from . import validation + +_T_co = typing.TypeVar("_T_co", covariant=True) + + +class SequenceNotStr(typing.Protocol[_T_co]): + """ + if a Protocol would define the interface of Sequence, this protocol + would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence + methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection + """ + def __contains__(self, value: object, /) -> bool: + raise NotImplementedError + + def __getitem__(self, index, /): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __iter__(self) -> typing.Iterator[_T_co]: + raise NotImplementedError + + def __reversed__(self, /) -> typing.Iterator[_T_co]: + raise NotImplementedError + +none_type_ = type(None) +T = typing.TypeVar('T', bound=typing.Mapping) +U = typing.TypeVar('U', bound=SequenceNotStr) +W = typing.TypeVar('W') + + +class SchemaTyped: + additional_properties: typing.Type[Schema] + all_of: typing.Tuple[typing.Type[Schema], ...] + any_of: typing.Tuple[typing.Type[Schema], ...] + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] + default: typing.Union[str, int, float, bool, None] + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] + exclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + format: str + inclusive_maximum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + items: typing.Type[Schema] + max_items: int + max_length: int + max_properties: int + min_items: int + min_length: int + min_properties: int + multiple_of: typing.Union[int, float] + not_: typing.Type[Schema] + one_of: typing.Tuple[typing.Type[Schema], ...] + pattern: validation.PatternInfo + properties: typing.Mapping[str, typing.Type[Schema]] + required: typing.FrozenSet[str] + types: typing.FrozenSet[typing.Type] + unique_items: bool + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') + arg.close() + inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore + super(FileIO, inst).__init__(arg.name) + return inst + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') + + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + """ + Needed for instantiation when passing in arguments of the above type + """ + pass + + +class classproperty(typing.Generic[W]): + def __init__(self, method: typing.Callable[..., W]): + self.__method = method + functools.update_wrapper(self, method) # type: ignore + + def __get__(self, obj, cls=None) -> W: + if cls is None: + cls = type(obj) + return self.__method(cls) + + +class Bool: + _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} + """ + This class is needed to replace bool during validation processing + json schema requires that 0 != False and 1 != True + python implementation defines 0 == False and 1 == True + To meet the json schema requirements, all bool instances are replaced with Bool singletons + during validation only, and then bool values are returned from validation + """ + + def __new__(cls, arg_: bool, **kwargs): + """ + Method that implements singleton + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, arg_) + if key not in cls._instances: + inst = super().__new__(cls) + cls._instances[key] = inst + return cls._instances[key] + + def __repr__(self): + if bool(self): + return f'' + return f'' + + @classproperty + def TRUE(cls): + return cls(True) # type: ignore + + @classproperty + def FALSE(cls): + return cls(False) # type: ignore + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +def cast_to_allowed_types( + arg: typing.Union[ + dict, + validation.immutabledict, + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + ], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] +) -> typing.Union[ + validation.immutabledict, + tuple, + float, + int, + str, + bytes, + Bool, + None, + FileIO +]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + path_to_type[path_to_item] = str + return str(arg) + elif isinstance(arg, (dict, validation.immutabledict)): + path_to_type[path_to_item] = validation.immutabledict + return validation.immutabledict( + { + key: cast_to_allowed_types( + val, + from_server, + validated_path_to_schemas, + path_to_item + (key,), + path_to_type, + ) + for key, val in arg.items() + } + ) + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + path_to_type[path_to_item] = Bool + if arg: + return Bool.TRUE + return Bool.FALSE + elif isinstance(arg, int): + path_to_type[path_to_item] = int + return arg + elif isinstance(arg, float): + path_to_type[path_to_item] = float + return arg + elif isinstance(arg, (tuple, list)): + path_to_type[path_to_item] = tuple + return tuple( + [ + cast_to_allowed_types( + item, + from_server, + validated_path_to_schemas, + path_to_item + (i,), + path_to_type, + ) + for i, item in enumerate(arg) + ] + ) + elif arg is None: + path_to_type[path_to_item] = type(None) + return None + elif isinstance(arg, (datetime.date, datetime.datetime)): + path_to_type[path_to_item] = str + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + path_to_type[path_to_item] = str + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, bytes): + path_to_type[path_to_item] = bytes + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + path_to_type[path_to_item] = FileIO + return FileIO(arg) + raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class SingletonMeta(type): + """ + A singleton class for schemas + Schemas are frozen classes that are never instantiated with init args + All args come from defaults + """ + _instances: typing.Dict[type, typing.Any] = {} + + def __call__(cls, *args, **kwargs): + if cls not in cls._instances: + cls._instances[cls] = super().__call__(*args, **kwargs) + return cls._instances[cls] + + +class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): + + @classmethod + def __get_path_to_schemas( + cls, + arg, + validation_metadata: validation.ValidationMetadata, + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: + """ + Run all validations in the json schema and return a dict of + json schema to tuple of validated schemas + """ + _path_to_schemas: validation.PathToSchemasType = {} + if validation_metadata.validation_ran_earlier(cls): + validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) + validation.update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} + for path, schema_classes in _path_to_schemas.items(): + schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) + path_to_schemas[path] = schema + """ + For locations that validation did not check + the code still needs to store type + schema information for instantiation + All of those schemas will be UnsetAnyTypeSchema + """ + missing_paths = path_to_type.keys() - path_to_schemas.keys() + for missing_path in missing_paths: + path_to_schemas[missing_path] = UnsetAnyTypeSchema + + return path_to_schemas + + @staticmethod + def __get_items( + arg: tuple, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + ''' + Schema __get_items + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return tuple(cast_items) + + @staticmethod + def __get_properties( + arg: validation.immutabledict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + """ + Schema __get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return validation.immutabledict(dict_items) + + @classmethod + def _get_new_instance_without_conversion( + cls, + arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + # We have a Dynamic class and we are making an instance of it + if isinstance(arg, validation.immutabledict): + used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) + elif isinstance(arg, tuple): + used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) + elif isinstance(arg, Bool): + return bool(arg) + else: + """ + str, int, float, FileIO, bytes + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return arg + arg_type = type(arg) + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is None: + return used_arg + if arg_type not in type_to_output_cls: + return used_arg + output_cls = type_to_output_cls[arg_type] + if arg_type is tuple: + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(U, inst) + return inst + assert issubclass(output_cls, validation.immutabledict) + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(T, inst) + return inst + + @typing.overload + @classmethod + def validate_base( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate_base( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + """ + Schema validate_base + + Args: + arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + like minItems, minLength etc + """ + if isinstance(arg, (tuple, validation.immutabledict)): + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is not None: + for output_cls in type_to_output_cls.values(): + if isinstance(arg, output_cls): + # U + T use case, don't run validations twice + return arg + + from_server = False + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] + ] = {} + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} + cast_arg = cast_to_allowed_types( + arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) + validation_metadata = validation.ValidationMetadata( + path_to_item=('args[0]',), + configuration=configuration or schema_configuration.SchemaConfiguration(), + validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) + ) + path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) + return cls._get_new_instance_without_conversion( + cast_arg, + validation_metadata.path_to_item, + path_to_schemas, + ) + + @classmethod + def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: + type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) + type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) + return type_to_output_cls + + +def get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[Schema]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + return item_cls._evaluate(None, local_namespace) + raise ValueError('invalid class value passed in') + + +@dataclasses.dataclass(frozen=True) +class AnyTypeSchema(Schema[T, U]): + # Python representation of a schema defined as true or {} + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return cls.validate_base( + arg, + configuration=configuration + ) + +class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + +INPUT_TYPES_ALL = typing.Union[ + dict, + validation.immutabledict, + typing.Mapping[str, object], # for TypedDict + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + FileIO +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py new file mode 100644 index 00000000000..8b545884c06 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import datetime +import dataclasses +import io +import typing +import uuid + +import typing_extensions + +from unit_test_api.configurations import schema_configuration + +from . import schema, validation + + +@dataclasses.dataclass(frozen=True) +class ListSchema(schema.Schema[validation.immutabledict, tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schema.INPUT_TYPES_ALL], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Tuple[schema.INPUT_TYPES_ALL, ...], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NoneSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) + + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NumberSchema(schema.Schema): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + types: typing.FrozenSet[typing.Type] = frozenset({float, int}) + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class IntSchema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int' + + +@dataclasses.dataclass(frozen=True) +class Int32Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int32' + + +@dataclasses.dataclass(frozen=True) +class Int64Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int64' + + +@dataclasses.dataclass(frozen=True) +class Float32Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'float' + + +@dataclasses.dataclass(frozen=True) +class Float64Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'double' + + +@dataclasses.dataclass(frozen=True) +class StrSchema(schema.Schema): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + types: typing.FrozenSet[typing.Type] = frozenset({str}) + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class UUIDSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'uuid' + + @classmethod + def validate( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateTimeSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date-time' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DecimalSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'number' + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class BytesSchema(schema.Schema): + """ + this class will subclass bytes and is immutable + """ + types: typing.FrozenSet[typing.Type] = frozenset({bytes}) + + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class FileSchema(schema.Schema): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.FileIO: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BinarySchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) + format: str = 'binary' + + one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( + BytesSchema, + FileSchema, + ) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[schema.FileIO, bytes]: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BoolSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NotAnyTypeSchema(schema.AnyTypeSchema): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + not_: typing.Type[schema.Schema] = schema.AnyTypeSchema + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return super().validate_base(arg, configuration=configuration) + +OUTPUT_BASE_TYPES = typing.Union[ + validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], + str, + int, + float, + bool, + schema.none_type_, + typing.Tuple['OUTPUT_BASE_TYPES', ...], + bytes, + schema.FileIO +] + + +@dataclasses.dataclass(frozen=True) +class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) + + @typing.overload + @classmethod + def validate( + cls, + arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: + return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py new file mode 100644 index 00000000000..120f1bd7e18 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py @@ -0,0 +1,1446 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import collections +import dataclasses +import decimal +import re +import sys +import types +import typing +import uuid + +import typing_extensions + +from unit_test_api import exceptions +from unit_test_api.configurations import schema_configuration + +from . import format, original_immutabledict + +immutabledict = original_immutabledict.immutabledict + + +@dataclasses.dataclass +class ValidationMetadata: + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + path_to_item: typing.Tuple[typing.Union[str, int], ...] + configuration: schema_configuration.SchemaConfiguration + validated_path_to_schemas: typing.Mapping[ + typing.Tuple[typing.Union[str, int], ...], + typing.Mapping[type, None] + ] = dataclasses.field(default_factory=dict) + seen_classes: typing.FrozenSet[type] = frozenset() + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) + if validated_schemas and cls in validated_schemas: + return True + if cls in self.seen_classes: + return True + return False + +def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise exceptions.ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class SchemaValidator: + __excluded_cls_properties = { + '__module__', + '__dict__', + '__weakref__', + '__doc__', + '__annotations__', + 'default', # excluded because it has no impact on validation + 'type_to_output_cls', # used to pluck the output class for instantiation + } + + @classmethod + def _validate( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> PathToSchemasType: + """ + SchemaValidator validate + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + """ + cls_schema = cls() + json_schema_data = { + k: v + for k, v in vars(cls_schema).items() + if k not in cls.__excluded_cls_properties + and k + not in validation_metadata.configuration.disabled_json_schema_python_keywords + } + contains_path_to_schemas = [] + path_to_schemas: PathToSchemasType = {} + if 'contains' in vars(cls_schema): + contains_path_to_schemas = _get_contains_path_to_schemas( + arg, + vars(cls_schema)['contains'], + validation_metadata, + path_to_schemas + ) + if_path_to_schemas = None + if 'if_' in vars(cls_schema): + if_path_to_schemas = _get_if_path_to_schemas( + arg, + vars(cls_schema)['if_'], + validation_metadata, + ) + validated_pattern_properties: typing.Optional[PathToSchemasType] = None + if 'pattern_properties' in vars(cls_schema): + validated_pattern_properties = _get_validated_pattern_properties( + arg, + vars(cls_schema)['pattern_properties'], + cls, + validation_metadata + ) + prefix_items_length = 0 + if 'prefix_items' in vars(cls_schema): + prefix_items_length = len(vars(cls_schema)['prefix_items']) + for keyword, val in json_schema_data.items(): + used_val: typing.Any + if keyword in {'contains', 'min_contains', 'max_contains'}: + used_val = (val, contains_path_to_schemas) + elif keyword == 'items': + used_val = (val, prefix_items_length) + elif keyword in {'unevaluated_items', 'unevaluated_properties'}: + used_val = (val, path_to_schemas) + elif keyword in {'types'}: + format: typing.Optional[str] = vars(cls_schema).get('format', None) + used_val = (val, format) + elif keyword in {'pattern_properties', 'additional_properties'}: + used_val = (val, validated_pattern_properties) + elif keyword in {'if_', 'then', 'else_'}: + used_val = (val, if_path_to_schemas) + else: + used_val = val + validator = json_schema_keyword_to_validator[keyword] + + other_path_to_schemas = validator( + arg, + used_val, + cls, + validation_metadata, + ) + if other_path_to_schemas: + update(path_to_schemas, other_path_to_schemas) + + base_class = type(arg) + if validation_metadata.path_to_item not in path_to_schemas: + path_to_schemas[validation_metadata.path_to_item] = dict() + path_to_schemas[validation_metadata.path_to_item][base_class] = None + path_to_schemas[validation_metadata.path_to_item][cls] = None + return path_to_schemas + +PathToSchemasType = typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Dict[ + typing.Union[ + typing.Type[SchemaValidator], + typing.Type[str], + typing.Type[int], + typing.Type[float], + typing.Type[bool], + typing.Type[None], + typing.Type[immutabledict], + typing.Type[tuple] + ], + None + ] +] + +def _get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[SchemaValidator]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + if sys.version_info < (3, 9): + return item_cls._evaluate(None, local_namespace) + return item_cls._evaluate(None, local_namespace, set()) + raise ValueError('invalid class value passed in') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is collections.defaultdict(dict) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k].update(v) + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def __type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = __get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + +def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = __type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return exceptions.ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternInfo: + pattern: str + flags: typing.Optional[re.RegexFlag] = None + + +def validate_types( + arg: typing.Any, + allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + allowed_types = allowed_types_format[0] + if type(arg) not in allowed_types: + raise __get_type_error( + arg, + validation_metadata.path_to_item, + allowed_types, + key_type=False, + ) + if isinstance(arg, bool) or not isinstance(arg, (int, float)): + return None + format = allowed_types_format[1] + if format and format == 'int' and arg != int(arg): + # there is a json schema test where 1.0 validates as an integer + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + return None + + +def validate_enum( + arg: typing.Any, + enum_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in enum_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) + return None + + +def validate_unique_items( + arg: typing.Any, + unique_items_value: bool, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not unique_items_value or not isinstance(arg, tuple): + return None + if len(arg) == len(set(arg)): + return None + _raise_validation_error_message( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + +def validate_min_items( + arg: typing.Any, + min_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) < min_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=min_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_items( + arg: typing.Any, + max_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) > max_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=max_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_properties( + arg: typing.Any, + min_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) < min_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=min_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_properties( + arg: typing.Any, + max_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) > max_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=max_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_length( + arg: typing.Any, + min_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) < min_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=min_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_length( + arg: typing.Any, + max_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) > max_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=max_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_minimum( + arg: typing.Any, + inclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg < inclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_minimum( + arg: typing.Any, + exclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg <= exclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=exclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_maximum( + arg: typing.Any, + inclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg > inclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_maximum( + arg: typing.Any, + exclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg >= exclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than", + constraint_value=exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + +def validate_multiple_of( + arg: typing.Any, + multiple_of: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if (not (float(arg) / multiple_of).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + _raise_validation_error_message( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_pattern( + arg: typing.Any, + pattern_info: PatternInfo, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item + ) + return None + + +__int32_inclusive_minimum = -2147483648 +__int32_inclusive_maximum = 2147483647 +__int64_inclusive_minimum = -9223372036854775808 +__int64_inclusive_maximum = 9223372036854775807 +__float_inclusive_minimum = -3.4028234663852886e+38 +__float_inclusive_maximum = 3.4028234663852886e+38 +__double_inclusive_minimum = -1.7976931348623157E+308 +__double_inclusive_maximum = 1.7976931348623157E+308 + +def __validate_numeric_format( + arg: typing.Union[int, float], + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value[:3] == 'int': + # there is a json schema test where 1.0 validates as an integer + if arg != int(arg): + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + if format_value == 'int32': + if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + elif format_value == 'int64': + if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + elif format_value in {'float', 'double'}: + if format_value == 'float': + if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + return None + # double + if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + + +def __validate_string_format( + arg: str, + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value == 'uuid': + try: + uuid.UUID(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'number': + try: + decimal.Decimal(arg) + return None + except decimal.InvalidOperation: + raise exceptions.ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date': + try: + format.DEFAULT_ISOPARSER.parse_isodate_str(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date-time': + try: + format.DEFAULT_ISOPARSER.parse_isodatetime(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + return None + + +def validate_format( + arg: typing.Union[str, int, float], + format_value: str, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + # formats work for strings + numbers + if isinstance(arg, (int, float)): + return __validate_numeric_format( + arg, + format_value, + validation_metadata + ) + elif isinstance(arg, str): + return __validate_string_format( + arg, + format_value, + validation_metadata + ) + return None + + +def validate_required( + arg: typing.Any, + required: typing.Set[str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + missing_req_args = required - arg.keys() + if missing_req_args: + missing_required_arguments = list(missing_req_args) + missing_required_arguments.sort() + raise exceptions.ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + return None + + +def validate_items( + arg: typing.Any, + item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + item_cls = _get_class(item_cls_prefix_items_length[0]) + prefix_items_length = item_cls_prefix_items_length[1] + path_to_schemas: PathToSchemasType = {} + for i in range(prefix_items_length, len(arg)): + value = arg[i] + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_properties( + arg: typing.Any, + properties: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + present_properties = {k: v for k, v, in arg.items() if k in properties} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, value in present_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + schema = properties[property_name] + schema = _get_class(schema, module_namespace) + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_additional_properties( + arg: typing.Any, + additional_properties_cls_val_pprops: typing.Tuple[ + typing.Type[SchemaValidator], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + schema = _get_class(additional_properties_cls_val_pprops[0]) + path_to_schemas: PathToSchemasType = {} + cls_schema = cls() + properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} + present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} + validated_pattern_properties = additional_properties_cls_val_pprops[1] + for property_name, value in present_additional_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if validated_pattern_properties and path_to_item in validated_pattern_properties: + continue + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_one_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + oneof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(schema) + continue + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + oneof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + oneof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate oneof_classes + continue + oneof_classes.append(schema) + if not oneof_classes: + raise exceptions.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: + raise exceptions.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 + + +def validate_any_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + anyof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + module_namespace = vars(sys.modules[cls.__module__]) + for schema in classes: + schema = _get_class(schema, module_namespace) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + anyof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + anyof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate anyof_classes + continue + anyof_classes.append(schema) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise exceptions.ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + +def validate_all_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + continue + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_not( + arg: typing.Any, + not_cls: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + not_schema = _get_class(not_cls) + other_path_to_schemas = None + not_exception = exceptions.ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_schema.__name__, + ) + ) + if validation_metadata.validation_ran_earlier(not_schema): + raise not_exception + + try: + other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + return None + + +def __ensure_discriminator_value_present( + disc_property_name: str, + validation_metadata: ValidationMetadata, + arg +): + if disc_property_name not in arg: + # The input data does not contain the discriminator property + raise exceptions.ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + +def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + cls_schema = cls() + if not hasattr(cls_schema, 'discriminator'): + return None + disc = cls_schema.discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not ( + hasattr(cls_schema, 'all_of') or + hasattr(cls_schema, 'one_of') or + hasattr(cls_schema, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls_schema, 'all_of'): + for allof_cls in cls_schema.all_of: + discriminated_cls = __get_discriminated_class( + allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'one_of'): + for oneof_cls in cls_schema.one_of: + discriminated_cls = __get_discriminated_class( + oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'any_of'): + for anyof_cls in cls_schema.any_of: + discriminated_cls = __get_discriminated_class( + anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +def validate_discriminator( + arg: typing.Any, + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + disc_prop_name = list(discriminator.keys())[0] + __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) + discriminated_cls = __get_discriminated_class( + cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ) + if discriminated_cls is None: + raise exceptions.ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls is cls: + """ + Optimistically assume that cls will pass validation + If the code invoked _validate on cls it would infinitely recurse + """ + return None + if validation_metadata.validation_ran_earlier(discriminated_cls): + path_to_schemas: PathToSchemasType = {} + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + return path_to_schemas + updated_vm = ValidationMetadata( + path_to_item=validation_metadata.path_to_item, + configuration=validation_metadata.configuration, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + return discriminated_cls._validate(arg, validation_metadata=updated_vm) + + +def _get_if_path_to_schemas( + arg: typing.Any, + if_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + if_cls = _get_class(if_cls) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = if_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, other_path_to_schemas) + except exceptions.OpenApiException: + pass + return these_path_to_schemas + + +def validate_if( + arg: typing.Any, + if_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = if_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + + if true, then true -> true for whole schema + so validate_then will add if_path_to_schemas data to path_to_schemas + """ + return None + + +def validate_then( + arg: typing.Any, + then_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = then_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + """ + if not if_path_to_schemas: + return None + then_cls = _get_class(then_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = then_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # then False case + raise ex + + +def validate_else( + arg: typing.Any, + else_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = else_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + if if_path_to_schemas: + # skip validation if if_path_to_schemas was true + return None + """ + if is false use case + if_path_to_schemas == {} + """ + else_cls = _get_class(else_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = else_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # else False case + raise ex + + +def _get_contains_path_to_schemas( + arg: typing.Any, + contains_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, + path_to_schemas: PathToSchemasType +) -> typing.List[PathToSchemasType]: + if not isinstance(arg, tuple): + return [] + contains_cls = _get_class(contains_cls) + contains_path_to_schemas = [] + for i, value in enumerate(arg): + these_path_to_schemas: PathToSchemasType = {} + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(contains_cls): + add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) + contains_path_to_schemas.append(these_path_to_schemas) + continue + try: + other_path_to_schemas = contains_cls._validate( + value, validation_metadata=item_validation_metadata) + contains_path_to_schemas.append(other_path_to_schemas) + except exceptions.OpenApiException: + pass + return contains_path_to_schemas + + +def validate_contains( + arg: typing.Any, + contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + many_path_to_schemas = contains_cls_path_to_schemas[1] + if not many_path_to_schemas: + raise exceptions.ApiValueError( + "Validation failed for contains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + these_path_to_schemas: PathToSchemasType = {} + for other_path_to_schema in many_path_to_schemas: + update(these_path_to_schemas, other_path_to_schema) + return these_path_to_schemas + + +def validate_min_contains( + arg: typing.Any, + min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + min_contains = min_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) < min_contains: + raise exceptions.ApiValueError( + "Validation failed for minContains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_max_contains( + arg: typing.Any, + max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + max_contains = max_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) > max_contains: + raise exceptions.ApiValueError( + "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " + "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_const( + arg: typing.Any, + const_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in const_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) + return None + + +def validate_dependent_required( + arg: typing.Any, + dependent_required: typing.Mapping[str, typing.Set[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + for key, keys_that_must_exist in dependent_required.items(): + if key not in arg: + continue + missing_keys = keys_that_must_exist - arg.keys() + if missing_keys: + raise exceptions.ApiValueError( + f"Validation failed for dependentRequired because these_keys={missing_keys} are " + f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" + ) + return None + + +def validate_dependent_schemas( + arg: typing.Any, + dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for key, schema in dependent_schemas.items(): + if key not in arg: + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_property_names( + arg: typing.Any, + property_names_schema: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + module_namespace = vars(sys.modules[cls.__module__]) + property_names_schema = _get_class(property_names_schema, module_namespace) + for key in arg.keys(): + path_to_item = validation_metadata.path_to_item + (key,) + key_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + property_names_schema._validate(key, validation_metadata=key_validation_metadata) + return None + + +def _get_validated_pattern_properties( + arg: typing.Any, + pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, property_value in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + for pattern_info, schema in pattern_properties.items(): + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, property_name, flags=flags): + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_pattern_properties( + arg: typing.Any, + pattern_properties_validation_results: typing.Tuple[ + typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + validation_results = pattern_properties_validation_results[1] + return validation_results + + +def validate_prefix_items( + arg: typing.Any, + prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for i, val in enumerate(arg): + if i >= len(prefix_items): + break + schema = _get_class(prefix_items[i], module_namespace) + path_to_item = validation_metadata.path_to_item + (i,) + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_items( + arg: typing.Any, + unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] + for i, val in enumerate(arg): + path_to_item = validation_metadata.path_to_item + (i,) + if path_to_item in validated_path_to_schemas: + continue + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_properties( + arg: typing.Any, + unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] + for property_name, val in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if path_to_item in validated_path_to_schemas: + continue + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] +json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { + 'types': validate_types, + 'enum_value_to_name': validate_enum, + 'unique_items': validate_unique_items, + 'min_items': validate_min_items, + 'max_items': validate_max_items, + 'min_properties': validate_min_properties, + 'max_properties': validate_max_properties, + 'min_length': validate_min_length, + 'max_length': validate_max_length, + 'inclusive_minimum': validate_inclusive_minimum, + 'exclusive_minimum': validate_exclusive_minimum, + 'inclusive_maximum': validate_inclusive_maximum, + 'exclusive_maximum': validate_exclusive_maximum, + 'multiple_of': validate_multiple_of, + 'pattern': validate_pattern, + 'format': validate_format, + 'required': validate_required, + 'items': validate_items, + 'properties': validate_properties, + 'additional_properties': validate_additional_properties, + 'one_of': validate_one_of, + 'any_of': validate_any_of, + 'all_of': validate_all_of, + 'not_': validate_not, + 'discriminator': validate_discriminator, + 'contains': validate_contains, + 'min_contains': validate_min_contains, + 'max_contains': validate_max_contains, + 'const_value_to_name': validate_const, + 'dependent_required': validate_dependent_required, + 'dependent_schemas': validate_dependent_schemas, + 'property_names': validate_property_names, + 'pattern_properties': validate_pattern_properties, + 'prefix_items': validate_prefix_items, + 'unevaluated_items': validate_unevaluated_items, + 'unevaluated_properties': validate_unevaluated_properties, + 'if_': validate_if, + 'then': validate_then, + 'else_': validate_else +} \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py new file mode 100644 index 00000000000..714f7ab4f29 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py @@ -0,0 +1,227 @@ +# coding: utf-8 +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import abc +import base64 +import dataclasses +import enum +import typing +import typing_extensions + +from urllib3 import _collections + + +class SecuritySchemeType(enum.Enum): + API_KEY = 'apiKey' + HTTP = 'http' + MUTUAL_TLS = 'mutualTLS' + OAUTH_2 = 'oauth2' + OPENID_CONNECT = 'openIdConnect' + + +class ApiKeyInLocation(enum.Enum): + QUERY = 'query' + HEADER = 'header' + COOKIE = 'cookie' + + +class __SecuritySchemeBase(metaclass=abc.ABCMeta): + @abc.abstractmethod + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + pass + + +@dataclasses.dataclass +class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): + api_key: str # this must be set by the developer + name: str = '' + in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY + type: SecuritySchemeType = SecuritySchemeType.API_KEY + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + if self.in_location is ApiKeyInLocation.COOKIE: + headers.add('Cookie', self.api_key) + elif self.in_location is ApiKeyInLocation.HEADER: + headers.add(self.name, self.api_key) + elif self.in_location is ApiKeyInLocation.QUERY: + # todo add query handling + raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") + return + + +class HTTPSchemeType(enum.Enum): + BASIC = 'basic' + BEARER = 'bearer' + DIGEST = 'digest' + SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + + +@dataclasses.dataclass +class HTTPBasicSecurityScheme(__SecuritySchemeBase): + user_id: str # user name + password: str + scheme: HTTPSchemeType = HTTPSchemeType.BASIC + encoding: str = 'utf-8' + type: SecuritySchemeType = SecuritySchemeType.HTTP + """ + https://www.rfc-editor.org/rfc/rfc7617.html + """ + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + user_pass = f"{self.user_id}:{self.password}" + b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) + headers.add('Authorization', f"Basic {b64_user_pass.decode()}") + + +@dataclasses.dataclass +class HTTPBearerSecurityScheme(__SecuritySchemeBase): + access_token: str + bearer_format: typing.Optional[str] = None + scheme: HTTPSchemeType = HTTPSchemeType.BEARER + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + headers.add('Authorization', f"Bearer {self.access_token}") + + +@dataclasses.dataclass +class HTTPDigestSecurityScheme(__SecuritySchemeBase): + scheme: HTTPSchemeType = HTTPSchemeType.DIGEST + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class MutualTLSSecurityScheme(__SecuritySchemeBase): + type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class ImplicitOAuthFlow: + authorization_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class TokenUrlOauthFlow: + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class AuthorizationCodeOauthFlow: + authorization_url: str + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class OAuthFlows: + implicit: typing.Optional[ImplicitOAuthFlow] = None + password: typing.Optional[TokenUrlOauthFlow] = None + client_credentials: typing.Optional[TokenUrlOauthFlow] = None + authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None + + +class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): + flows: OAuthFlows + type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OAuth2SecurityScheme not yet implemented") + + +class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): + openid_connect_url: str + type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") + +""" +Key is the Security scheme class +Value is the list of scopes +""" +SecurityRequirementObject = typing.TypedDict( + 'SecurityRequirementObject', + { + }, + total=False +) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py new file mode 100644 index 00000000000..dc41c4e14f0 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py @@ -0,0 +1,34 @@ +# coding: utf-8 +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import dataclasses +import typing + +from unit_test_api.schemas import validation, schema + + +@dataclasses.dataclass +class ServerWithoutVariables(abc.ABC): + url: str + + +@dataclasses.dataclass +class ServerWithVariables(abc.ABC): + _url: str + variables: validation.immutabledict[str, str] + variables_schema: typing.Type[schema.Schema] + url: str = dataclasses.field(init=False) + + def __post_init__(self): + url = self._url + assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) + for (key, value) in self.variables.items(): + url = url.replace("{" + key + "}", value) + self.url = url diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py new file mode 100644 index 00000000000..80dc4807268 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "https://someserver.com/v1" diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py new file mode 100644 index 00000000000..5374be6472e --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py @@ -0,0 +1,15 @@ +import decimal +import io +import typing +import typing_extensions + +from unit_test_api import api_client, schemas + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'api_client', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py new file mode 100644 index 00000000000..55bcea40b80 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py @@ -0,0 +1,18 @@ +import datetime +import decimal +import io +import typing +import typing_extensions +import uuid + +from unit_test_api import schemas, api_response + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py new file mode 100644 index 00000000000..ebe9120bd08 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py @@ -0,0 +1,25 @@ +import dataclasses +import datetime +import decimal +import io +import typing +import uuid + +import typing_extensions +import urllib3 + +from unit_test_api import api_client, schemas, api_response + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'typing', + 'uuid', + 'typing_extensions', + 'urllib3', + 'api_client', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py new file mode 100644 index 00000000000..c7b3d6440f2 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py @@ -0,0 +1,28 @@ +import dataclasses +import datetime +import decimal +import io +import numbers +import re +import typing +import typing_extensions +import uuid + +from unit_test_api import schemas +from unit_test_api.configurations import schema_configuration + +U = typing.TypeVar('U') + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'numbers', + 're', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'schema_configuration' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py new file mode 100644 index 00000000000..8156260e9b3 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py @@ -0,0 +1,12 @@ +import dataclasses +import typing +import typing_extensions + +from unit_test_api import security_schemes + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'security_schemes' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py new file mode 100644 index 00000000000..9fe6c950a11 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py @@ -0,0 +1,13 @@ +import dataclasses +import typing +import typing_extensions + +from unit_test_api import server, schemas + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'server', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py b/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py new file mode 100644 index 00000000000..ece12ae010b --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import unittest + +import openapi_client +from openapi_client.components.schema.not import Not +from openapi_client.configurations import schema_configuration + + +class TestNot(unittest.TestCase): + """Not unit test stubs""" + configuration = schema_configuration.SchemaConfiguration( + disabled_json_schema_keywords={'format'} + ) + + def test_allowed_passes(self): + # allowed + Not.validate( + "foo", + configuration=self.configuration + ) + + def test_disallowed_fails(self): + # disallowed + with self.assertRaises((openapi_client.ApiValueError, openapi_client.ApiTypeError)): + Not.validate( + 1, + configuration=self.configuration + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md index 66ec8e109bf..23bad84b6e8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md @@ -18,22 +18,22 @@ A class that contains necessary nested | record | [IfAndElseWithoutThen.IfAndElseWithoutThen1BoxedList](#ifandelsewithoutthen1boxedlist)
          boxed class to store validated List payloads | | record | [IfAndElseWithoutThen.IfAndElseWithoutThen1BoxedMap](#ifandelsewithoutthen1boxedmap)
          boxed class to store validated Map payloads | | static class | [IfAndElseWithoutThen.IfAndElseWithoutThen1](#ifandelsewithoutthen1)
          schema class | -| sealed interface | [IfAndElseWithoutThen.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndElseWithoutThen.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndElseWithoutThen.IfSchema](#ifschema)
          schema class | -| sealed interface | [IfAndElseWithoutThen.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndElseWithoutThen.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndElseWithoutThen.ElseSchema](#elseschema)
          schema class | +| sealed interface | [IfAndElseWithoutThen.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [IfAndElseWithoutThen.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndElseWithoutThen.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndElseWithoutThen.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndElseWithoutThen.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndElseWithoutThen.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndElseWithoutThen.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndElseWithoutThen.If](#if)
          schema class | +| sealed interface | [IfAndElseWithoutThen.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | +| record | [IfAndElseWithoutThen.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndElseWithoutThen.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndElseWithoutThen.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndElseWithoutThen.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndElseWithoutThen.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndElseWithoutThen.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndElseWithoutThen.Else](#else)
          schema class | ## IfAndElseWithoutThen1Boxed public sealed interface IfAndElseWithoutThen1Boxed
          @@ -158,8 +158,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | -| Class | elseSchema = [ElseSchema.class](#elseschema) | +| Class | if = [If.class](#if) | +| Class | elseSchema = [Else.class](#else) | ### Method Summary | Modifier and Type | Method and Description | @@ -183,28 +183,28 @@ A schema class that validates payloads | [IfAndElseWithoutThen1Boxed](#ifandelsewithoutthen1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -212,16 +212,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -229,16 +229,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -246,16 +246,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -263,16 +263,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -280,16 +280,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -297,8 +297,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -321,37 +321,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseSchemaBoxed -public sealed interface ElseSchemaBoxed
          +## ElseBoxed +public sealed interface ElseBoxed
          permits
          -[ElseSchemaBoxedVoid](#elseschemaboxedvoid), -[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), -[ElseSchemaBoxedNumber](#elseschemaboxednumber), -[ElseSchemaBoxedString](#elseschemaboxedstring), -[ElseSchemaBoxedList](#elseschemaboxedlist), -[ElseSchemaBoxedMap](#elseschemaboxedmap) +[ElseBoxedVoid](#elseboxedvoid), +[ElseBoxedBoolean](#elseboxedboolean), +[ElseBoxedNumber](#elseboxednumber), +[ElseBoxedString](#elseboxedstring), +[ElseBoxedList](#elseboxedlist), +[ElseBoxedMap](#elseboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseSchemaBoxedVoid -public record ElseSchemaBoxedVoid
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedVoid +public record ElseBoxedVoid
          +implements [ElseBoxed](#elseboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -359,16 +359,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedBoolean -public record ElseSchemaBoxedBoolean
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedBoolean +public record ElseBoxedBoolean
          +implements [ElseBoxed](#elseboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -376,16 +376,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedNumber -public record ElseSchemaBoxedNumber
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedNumber +public record ElseBoxedNumber
          +implements [ElseBoxed](#elseboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -393,16 +393,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedString -public record ElseSchemaBoxedString
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedString +public record ElseBoxedString
          +implements [ElseBoxed](#elseboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ElseBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -410,16 +410,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedList -public record ElseSchemaBoxedList
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedList +public record ElseBoxedList
          +implements [ElseBoxed](#elseboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -427,16 +427,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedMap -public record ElseSchemaBoxedMap
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedMap +public record ElseBoxedMap
          +implements [ElseBoxed](#elseboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -444,8 +444,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchema -public static class ElseSchema
          +## Else +public static class Else
          extends JsonSchema A schema class that validates payloads @@ -468,13 +468,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md index 7f611633c05..30168d5f831 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md @@ -26,14 +26,14 @@ A class that contains necessary nested | record | [IfAndThenWithoutElse.ThenBoxedList](#thenboxedlist)
          boxed class to store validated List payloads | | record | [IfAndThenWithoutElse.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [IfAndThenWithoutElse.Then](#then)
          schema class | -| sealed interface | [IfAndThenWithoutElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndThenWithoutElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndThenWithoutElse.IfSchema](#ifschema)
          schema class | +| sealed interface | [IfAndThenWithoutElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [IfAndThenWithoutElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndThenWithoutElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndThenWithoutElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndThenWithoutElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndThenWithoutElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndThenWithoutElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndThenWithoutElse.If](#if)
          schema class | ## IfAndThenWithoutElse1Boxed public sealed interface IfAndThenWithoutElse1Boxed
          @@ -158,7 +158,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | +| Class | if = [If.class](#if) | | Class | then = [Then.class](#then) | ### Method Summary @@ -330,28 +330,28 @@ A schema class that validates payloads | [ThenBoxed](#thenboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -359,16 +359,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -376,16 +376,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -393,16 +393,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -410,16 +410,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -427,16 +427,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -444,8 +444,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -468,13 +468,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md index 35f6c235a13..cf769cf4aa2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md @@ -28,22 +28,22 @@ A class that contains necessary nested | record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.Then](#then)
          schema class | | enum | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.StringThenConst](#stringthenconst)
          String enum | -| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchema](#ifschema)
          schema class | -| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchema](#elseschema)
          schema class | +| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.If](#if)
          schema class | +| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.Else](#else)
          schema class | | enum | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.StringElseConst](#stringelseconst)
          String enum | ## IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed @@ -169,9 +169,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | +| Class | if = [If.class](#if) | | Class | then = [Then.class](#then) | -| Class | elseSchema = [ElseSchema.class](#elseschema) | +| Class | elseSchema = [Else.class](#else) | ### Method Summary | Modifier and Type | Method and Description | @@ -353,28 +353,28 @@ A class that stores String enum values | ------------- | ----------- | | YES | value = "yes" | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -382,16 +382,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -399,16 +399,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -416,16 +416,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -433,16 +433,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -450,16 +450,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -467,8 +467,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -491,37 +491,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseSchemaBoxed -public sealed interface ElseSchemaBoxed
          +## ElseBoxed +public sealed interface ElseBoxed
          permits
          -[ElseSchemaBoxedVoid](#elseschemaboxedvoid), -[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), -[ElseSchemaBoxedNumber](#elseschemaboxednumber), -[ElseSchemaBoxedString](#elseschemaboxedstring), -[ElseSchemaBoxedList](#elseschemaboxedlist), -[ElseSchemaBoxedMap](#elseschemaboxedmap) +[ElseBoxedVoid](#elseboxedvoid), +[ElseBoxedBoolean](#elseboxedboolean), +[ElseBoxedNumber](#elseboxednumber), +[ElseBoxedString](#elseboxedstring), +[ElseBoxedList](#elseboxedlist), +[ElseBoxedMap](#elseboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseSchemaBoxedVoid -public record ElseSchemaBoxedVoid
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedVoid +public record ElseBoxedVoid
          +implements [ElseBoxed](#elseboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -529,16 +529,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedBoolean -public record ElseSchemaBoxedBoolean
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedBoolean +public record ElseBoxedBoolean
          +implements [ElseBoxed](#elseboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -546,16 +546,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedNumber -public record ElseSchemaBoxedNumber
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedNumber +public record ElseBoxedNumber
          +implements [ElseBoxed](#elseboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -563,16 +563,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedString -public record ElseSchemaBoxedString
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedString +public record ElseBoxedString
          +implements [ElseBoxed](#elseboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ElseBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -580,16 +580,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedList -public record ElseSchemaBoxedList
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedList +public record ElseBoxedList
          +implements [ElseBoxed](#elseboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -597,16 +597,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedMap -public record ElseSchemaBoxedMap
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedMap +public record ElseBoxedMap
          +implements [ElseBoxed](#elseboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -614,8 +614,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchema -public static class ElseSchema
          +## Else +public static class Else
          extends JsonSchema A schema class that validates payloads @@ -638,13 +638,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringElseConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md index dc5da4ce435..242395210ce 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md @@ -19,14 +19,14 @@ A class that contains necessary nested | record | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1BoxedList](#ignoreelsewithoutif1boxedlist)
          boxed class to store validated List payloads | | record | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1BoxedMap](#ignoreelsewithoutif1boxedmap)
          boxed class to store validated Map payloads | | static class | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1](#ignoreelsewithoutif1)
          schema class | -| sealed interface | [IgnoreElseWithoutIf.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IgnoreElseWithoutIf.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IgnoreElseWithoutIf.ElseSchema](#elseschema)
          schema class | +| sealed interface | [IgnoreElseWithoutIf.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | +| record | [IgnoreElseWithoutIf.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | +| static class | [IgnoreElseWithoutIf.Else](#else)
          schema class | | enum | [IgnoreElseWithoutIf.StringElseConst](#stringelseconst)
          String enum | ## IgnoreElseWithoutIf1Boxed @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | elseSchema = [ElseSchema.class](#elseschema) | +| Class | elseSchema = [Else.class](#else) | ### Method Summary | Modifier and Type | Method and Description | @@ -176,28 +176,28 @@ A schema class that validates payloads | [IgnoreElseWithoutIf1Boxed](#ignoreelsewithoutif1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseSchemaBoxed -public sealed interface ElseSchemaBoxed
          +## ElseBoxed +public sealed interface ElseBoxed
          permits
          -[ElseSchemaBoxedVoid](#elseschemaboxedvoid), -[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), -[ElseSchemaBoxedNumber](#elseschemaboxednumber), -[ElseSchemaBoxedString](#elseschemaboxedstring), -[ElseSchemaBoxedList](#elseschemaboxedlist), -[ElseSchemaBoxedMap](#elseschemaboxedmap) +[ElseBoxedVoid](#elseboxedvoid), +[ElseBoxedBoolean](#elseboxedboolean), +[ElseBoxedNumber](#elseboxednumber), +[ElseBoxedString](#elseboxedstring), +[ElseBoxedList](#elseboxedlist), +[ElseBoxedMap](#elseboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseSchemaBoxedVoid -public record ElseSchemaBoxedVoid
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedVoid +public record ElseBoxedVoid
          +implements [ElseBoxed](#elseboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -205,16 +205,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedBoolean -public record ElseSchemaBoxedBoolean
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedBoolean +public record ElseBoxedBoolean
          +implements [ElseBoxed](#elseboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -222,16 +222,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedNumber -public record ElseSchemaBoxedNumber
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedNumber +public record ElseBoxedNumber
          +implements [ElseBoxed](#elseboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,16 +239,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedString -public record ElseSchemaBoxedString
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedString +public record ElseBoxedString
          +implements [ElseBoxed](#elseboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ElseBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -256,16 +256,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedList -public record ElseSchemaBoxedList
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedList +public record ElseBoxedList
          +implements [ElseBoxed](#elseboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -273,16 +273,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedMap -public record ElseSchemaBoxedMap
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedMap +public record ElseBoxedMap
          +implements [ElseBoxed](#elseboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -290,8 +290,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchema -public static class ElseSchema
          +## Else +public static class Else
          extends JsonSchema A schema class that validates payloads @@ -314,13 +314,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringElseConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md index 8c9062f441c..7a3b61ef811 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md @@ -19,14 +19,14 @@ A class that contains necessary nested | record | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1BoxedList](#ignoreifwithoutthenorelse1boxedlist)
          boxed class to store validated List payloads | | record | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1BoxedMap](#ignoreifwithoutthenorelse1boxedmap)
          boxed class to store validated Map payloads | | static class | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1](#ignoreifwithoutthenorelse1)
          schema class | -| sealed interface | [IgnoreIfWithoutThenOrElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [IgnoreIfWithoutThenOrElse.IfSchema](#ifschema)
          schema class | +| sealed interface | [IgnoreIfWithoutThenOrElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [IgnoreIfWithoutThenOrElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [IgnoreIfWithoutThenOrElse.If](#if)
          schema class | | enum | [IgnoreIfWithoutThenOrElse.StringIfConst](#stringifconst)
          String enum | ## IgnoreIfWithoutThenOrElse1Boxed @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | +| Class | if = [If.class](#if) | ### Method Summary | Modifier and Type | Method and Description | @@ -176,28 +176,28 @@ A schema class that validates payloads | [IgnoreIfWithoutThenOrElse1Boxed](#ignoreifwithoutthenorelse1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -205,16 +205,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -222,16 +222,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,16 +239,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -256,16 +256,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -273,16 +273,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -290,8 +290,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -314,13 +314,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringIfConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md index 727c527c7b2..980d373f1f4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md @@ -26,14 +26,14 @@ A class that contains necessary nested | record | [NonInterferenceAcrossCombinedSchemas.Schema2BoxedList](#schema2boxedlist)
          boxed class to store validated List payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema2BoxedMap](#schema2boxedmap)
          boxed class to store validated Map payloads | | static class | [NonInterferenceAcrossCombinedSchemas.Schema2](#schema2)
          schema class | -| sealed interface | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [NonInterferenceAcrossCombinedSchemas.ElseSchema](#elseschema)
          schema class | +| sealed interface | [NonInterferenceAcrossCombinedSchemas.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | +| static class | [NonInterferenceAcrossCombinedSchemas.Else](#else)
          schema class | | sealed interface | [NonInterferenceAcrossCombinedSchemas.Schema1Boxed](#schema1boxed)
          sealed interface for validated payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema1BoxedVoid](#schema1boxedvoid)
          boxed class to store validated null payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema1BoxedBoolean](#schema1boxedboolean)
          boxed class to store validated boolean payloads | @@ -58,14 +58,14 @@ A class that contains necessary nested | record | [NonInterferenceAcrossCombinedSchemas.Schema0BoxedList](#schema0boxedlist)
          boxed class to store validated List payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema0BoxedMap](#schema0boxedmap)
          boxed class to store validated Map payloads | | static class | [NonInterferenceAcrossCombinedSchemas.Schema0](#schema0)
          schema class | -| sealed interface | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [NonInterferenceAcrossCombinedSchemas.IfSchema](#ifschema)
          schema class | +| sealed interface | [NonInterferenceAcrossCombinedSchemas.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [NonInterferenceAcrossCombinedSchemas.If](#if)
          schema class | ## NonInterferenceAcrossCombinedSchemas1Boxed public sealed interface NonInterferenceAcrossCombinedSchemas1Boxed
          @@ -337,7 +337,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | elseSchema = [ElseSchema.class](#elseschema) | +| Class | elseSchema = [Else.class](#else) | ### Method Summary | Modifier and Type | Method and Description | @@ -361,28 +361,28 @@ A schema class that validates payloads | [Schema2Boxed](#schema2boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseSchemaBoxed -public sealed interface ElseSchemaBoxed
          +## ElseBoxed +public sealed interface ElseBoxed
          permits
          -[ElseSchemaBoxedVoid](#elseschemaboxedvoid), -[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), -[ElseSchemaBoxedNumber](#elseschemaboxednumber), -[ElseSchemaBoxedString](#elseschemaboxedstring), -[ElseSchemaBoxedList](#elseschemaboxedlist), -[ElseSchemaBoxedMap](#elseschemaboxedmap) +[ElseBoxedVoid](#elseboxedvoid), +[ElseBoxedBoolean](#elseboxedboolean), +[ElseBoxedNumber](#elseboxednumber), +[ElseBoxedString](#elseboxedstring), +[ElseBoxedList](#elseboxedlist), +[ElseBoxedMap](#elseboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseSchemaBoxedVoid -public record ElseSchemaBoxedVoid
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedVoid +public record ElseBoxedVoid
          +implements [ElseBoxed](#elseboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -390,16 +390,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedBoolean -public record ElseSchemaBoxedBoolean
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedBoolean +public record ElseBoxedBoolean
          +implements [ElseBoxed](#elseboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -407,16 +407,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedNumber -public record ElseSchemaBoxedNumber
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedNumber +public record ElseBoxedNumber
          +implements [ElseBoxed](#elseboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -424,16 +424,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedString -public record ElseSchemaBoxedString
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedString +public record ElseBoxedString
          +implements [ElseBoxed](#elseboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ElseBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -441,16 +441,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedList -public record ElseSchemaBoxedList
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedList +public record ElseBoxedList
          +implements [ElseBoxed](#elseboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -458,16 +458,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedMap -public record ElseSchemaBoxedMap
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedMap +public record ElseBoxedMap
          +implements [ElseBoxed](#elseboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -475,8 +475,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchema -public static class ElseSchema
          +## Else +public static class Else
          extends JsonSchema A schema class that validates payloads @@ -499,13 +499,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Schema1Boxed @@ -925,7 +925,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | +| Class | if = [If.class](#if) | ### Method Summary | Modifier and Type | Method and Description | @@ -949,28 +949,28 @@ A schema class that validates payloads | [Schema0Boxed](#schema0boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -978,16 +978,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -995,16 +995,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1012,16 +1012,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1029,16 +1029,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1046,16 +1046,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1063,8 +1063,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -1087,13 +1087,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 89fe00d535c..79d86cedacc 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -25,14 +25,14 @@ A class that contains necessary nested | sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ConstructorBoxed](#constructorboxed)
          sealed interface for validated payloads | | record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ConstructorBoxedNumber](#constructorboxednumber)
          boxed class to store validated Number payloads | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.Constructor](#constructor)
          schema class | -| sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxed](#tostringschemaboxed)
          sealed interface for validated payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedVoid](#tostringschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedNumber](#tostringschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedString](#tostringschemaboxedstring)
          boxed class to store validated String payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedList](#tostringschemaboxedlist)
          boxed class to store validated List payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedMap](#tostringschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchema](#tostringschema)
          schema class | +| sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxed](#tostringboxed)
          sealed interface for validated payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedVoid](#tostringboxedvoid)
          boxed class to store validated null payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedBoolean](#tostringboxedboolean)
          boxed class to store validated boolean payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedNumber](#tostringboxednumber)
          boxed class to store validated Number payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedString](#tostringboxedstring)
          boxed class to store validated String payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedList](#tostringboxedlist)
          boxed class to store validated List payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedMap](#tostringboxedmap)
          boxed class to store validated Map payloads | +| static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToString](#tostring)
          schema class | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringMapBuilder](#tostringmapbuilder)
          builder for Map payloads | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringMap](#tostringmap)
          output class for Map payloads | | sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.LengthBoxed](#lengthboxed)
          sealed interface for validated payloads | @@ -165,7 +165,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("__proto__", [Proto.class](#proto))),
              new PropertyEntry("toString", [ToStringSchema.class](#tostringschema))),
              new PropertyEntry("constructor", [Constructor.class](#constructor)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("__proto__", [Proto.class](#proto))),
              new PropertyEntry("toString", [ToString.class](#tostring))),
              new PropertyEntry("constructor", [Constructor.class](#constructor)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -241,8 +241,9 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap](#propertieswhosenamesarejavascriptobjectpropertynamesmap) | of([Map](#propertieswhosenamesarejavascriptobjectpropertynamesmapbuilder) arg, SchemaConfiguration configuration) | +| @Nullable Object | toString()
          [optional] | | Number | constructor()
          [optional] | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], instance["toString"], | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## ConstructorBoxed @@ -280,28 +281,28 @@ A schema class that validates payloads | validate | | validateAndBox | -## ToStringSchemaBoxed -public sealed interface ToStringSchemaBoxed
          +## ToStringBoxed +public sealed interface ToStringBoxed
          permits
          -[ToStringSchemaBoxedVoid](#tostringschemaboxedvoid), -[ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean), -[ToStringSchemaBoxedNumber](#tostringschemaboxednumber), -[ToStringSchemaBoxedString](#tostringschemaboxedstring), -[ToStringSchemaBoxedList](#tostringschemaboxedlist), -[ToStringSchemaBoxedMap](#tostringschemaboxedmap) +[ToStringBoxedVoid](#tostringboxedvoid), +[ToStringBoxedBoolean](#tostringboxedboolean), +[ToStringBoxedNumber](#tostringboxednumber), +[ToStringBoxedString](#tostringboxedstring), +[ToStringBoxedList](#tostringboxedlist), +[ToStringBoxedMap](#tostringboxedmap) sealed interface that stores validated payloads using boxed classes -## ToStringSchemaBoxedVoid -public record ToStringSchemaBoxedVoid
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedVoid +public record ToStringBoxedVoid
          +implements [ToStringBoxed](#tostringboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ToStringBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -309,16 +310,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchemaBoxedBoolean -public record ToStringSchemaBoxedBoolean
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedBoolean +public record ToStringBoxedBoolean
          +implements [ToStringBoxed](#tostringboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ToStringBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -326,16 +327,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchemaBoxedNumber -public record ToStringSchemaBoxedNumber
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedNumber +public record ToStringBoxedNumber
          +implements [ToStringBoxed](#tostringboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ToStringBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -343,16 +344,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchemaBoxedString -public record ToStringSchemaBoxedString
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedString +public record ToStringBoxedString
          +implements [ToStringBoxed](#tostringboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ToStringBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -360,16 +361,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchemaBoxedList -public record ToStringSchemaBoxedList
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedList +public record ToStringBoxedList
          +implements [ToStringBoxed](#tostringboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ToStringBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -377,16 +378,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchemaBoxedMap -public record ToStringSchemaBoxedMap
          -implements [ToStringSchemaBoxed](#tostringschemaboxed) +## ToStringBoxedMap +public record ToStringBoxedMap
          +implements [ToStringBoxed](#tostringboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringSchemaBoxedMap([ToStringMap](#tostringmap) data)
          Creates an instance, private visibility | +| ToStringBoxedMap([ToStringMap](#tostringmap) data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -394,8 +395,8 @@ record that stores validated Map payloads, sealed permits implementation | [ToStringMap](#tostringmap) | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringSchema -public static class ToStringSchema
          +## ToString +public static class ToString
          extends JsonSchema A schema class that validates payloads @@ -418,13 +419,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | [ToStringMap](#tostringmap) | validate([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedString](#tostringschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedVoid](#tostringschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedNumber](#tostringschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedMap](#tostringschemaboxedmap) | validateAndBox([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxedList](#tostringschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ToStringSchemaBoxed](#tostringschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ToStringBoxedString](#tostringboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ToStringBoxedVoid](#tostringboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ToStringBoxedNumber](#tostringboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ToStringBoxedBoolean](#tostringboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ToStringBoxedMap](#tostringboxedmap) | validateAndBox([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | +| [ToStringBoxedList](#tostringboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ToStringBoxed](#tostringboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## ToStringMapBuilder diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 490111f55e8..a11d3f1046e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -419,7 +419,8 @@ A class to store validated Map payloads | ----------------- | ---------------------- | | static [RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap](#requiredpropertieswhosenamesarejavascriptobjectpropertynamesmap) | of([Map](#requiredpropertieswhosenamesarejavascriptobjectpropertynamesmapbuilder) arg, SchemaConfiguration configuration) | | @Nullable Object | constructor()
          | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], instance["toString"], | +| @Nullable Object | toString()
          | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md index 38fda5efcca..92addae6f95 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md @@ -26,22 +26,22 @@ A class that contains necessary nested | record | [ValidateAgainstCorrectBranchThenVsElse.ThenBoxedList](#thenboxedlist)
          boxed class to store validated List payloads | | record | [ValidateAgainstCorrectBranchThenVsElse.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [ValidateAgainstCorrectBranchThenVsElse.Then](#then)
          schema class | -| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [ValidateAgainstCorrectBranchThenVsElse.IfSchema](#ifschema)
          schema class | -| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [ValidateAgainstCorrectBranchThenVsElse.ElseSchema](#elseschema)
          schema class | +| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | +| static class | [ValidateAgainstCorrectBranchThenVsElse.If](#if)
          schema class | +| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | +| static class | [ValidateAgainstCorrectBranchThenVsElse.Else](#else)
          schema class | ## ValidateAgainstCorrectBranchThenVsElse1Boxed public sealed interface ValidateAgainstCorrectBranchThenVsElse1Boxed
          @@ -166,9 +166,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [IfSchema.class](#ifschema) | +| Class | if = [If.class](#if) | | Class | then = [Then.class](#then) | -| Class | elseSchema = [ElseSchema.class](#elseschema) | +| Class | elseSchema = [Else.class](#else) | ### Method Summary | Modifier and Type | Method and Description | @@ -339,28 +339,28 @@ A schema class that validates payloads | [ThenBoxed](#thenboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfSchemaBoxed -public sealed interface IfSchemaBoxed
          +## IfBoxed +public sealed interface IfBoxed
          permits
          -[IfSchemaBoxedVoid](#ifschemaboxedvoid), -[IfSchemaBoxedBoolean](#ifschemaboxedboolean), -[IfSchemaBoxedNumber](#ifschemaboxednumber), -[IfSchemaBoxedString](#ifschemaboxedstring), -[IfSchemaBoxedList](#ifschemaboxedlist), -[IfSchemaBoxedMap](#ifschemaboxedmap) +[IfBoxedVoid](#ifboxedvoid), +[IfBoxedBoolean](#ifboxedboolean), +[IfBoxedNumber](#ifboxednumber), +[IfBoxedString](#ifboxedstring), +[IfBoxedList](#ifboxedlist), +[IfBoxedMap](#ifboxedmap) sealed interface that stores validated payloads using boxed classes -## IfSchemaBoxedVoid -public record IfSchemaBoxedVoid
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedVoid +public record IfBoxedVoid
          +implements [IfBoxed](#ifboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -368,16 +368,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedBoolean -public record IfSchemaBoxedBoolean
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedBoolean +public record IfBoxedBoolean
          +implements [IfBoxed](#ifboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -385,16 +385,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedNumber -public record IfSchemaBoxedNumber
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedNumber +public record IfBoxedNumber
          +implements [IfBoxed](#ifboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -402,16 +402,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedString -public record IfSchemaBoxedString
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedString +public record IfBoxedString
          +implements [IfBoxed](#ifboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | +| IfBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -419,16 +419,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedList -public record IfSchemaBoxedList
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedList +public record IfBoxedList
          +implements [IfBoxed](#ifboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -436,16 +436,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchemaBoxedMap -public record IfSchemaBoxedMap
          -implements [IfSchemaBoxed](#ifschemaboxed) +## IfBoxedMap +public record IfBoxedMap
          +implements [IfBoxed](#ifboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -453,8 +453,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfSchema -public static class IfSchema
          +## If +public static class If
          extends JsonSchema A schema class that validates payloads @@ -477,37 +477,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseSchemaBoxed -public sealed interface ElseSchemaBoxed
          +## ElseBoxed +public sealed interface ElseBoxed
          permits
          -[ElseSchemaBoxedVoid](#elseschemaboxedvoid), -[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), -[ElseSchemaBoxedNumber](#elseschemaboxednumber), -[ElseSchemaBoxedString](#elseschemaboxedstring), -[ElseSchemaBoxedList](#elseschemaboxedlist), -[ElseSchemaBoxedMap](#elseschemaboxedmap) +[ElseBoxedVoid](#elseboxedvoid), +[ElseBoxedBoolean](#elseboxedboolean), +[ElseBoxedNumber](#elseboxednumber), +[ElseBoxedString](#elseboxedstring), +[ElseBoxedList](#elseboxedlist), +[ElseBoxedMap](#elseboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseSchemaBoxedVoid -public record ElseSchemaBoxedVoid
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedVoid +public record ElseBoxedVoid
          +implements [ElseBoxed](#elseboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -515,16 +515,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedBoolean -public record ElseSchemaBoxedBoolean
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedBoolean +public record ElseBoxedBoolean
          +implements [ElseBoxed](#elseboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -532,16 +532,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedNumber -public record ElseSchemaBoxedNumber
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedNumber +public record ElseBoxedNumber
          +implements [ElseBoxed](#elseboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -549,16 +549,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedString -public record ElseSchemaBoxedString
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedString +public record ElseBoxedString
          +implements [ElseBoxed](#elseboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ElseBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -566,16 +566,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedList -public record ElseSchemaBoxedList
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedList +public record ElseBoxedList
          +implements [ElseBoxed](#elseboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -583,16 +583,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchemaBoxedMap -public record ElseSchemaBoxedMap
          -implements [ElseSchemaBoxed](#elseschemaboxed) +## ElseBoxedMap +public record ElseBoxedMap
          +implements [ElseBoxed](#elseboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -600,8 +600,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseSchema -public static class ElseSchema
          +## Else +public static class Else
          extends JsonSchema A schema class that validates payloads @@ -624,13 +624,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java index 507dbc069ab..348d7ffd3fb 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java @@ -16,10 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; @@ -31,7 +29,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index 8e7bc5d7152..c1dc5bacc2e 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index fa51a189f38..bf14383c104 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -1,5 +1,4 @@ package org.openapijsonschematools.client.components.schemas; -import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index b2d64cdcdff..8968227f734 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -18,8 +18,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index 09d4d5bd234..dffa31278f9 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index 5db2ddd6167..c9b1f4a933c 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 17920aead56..78f6e9d4040 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index 3fbe112d6c6..241ab07693f 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 65d6fc3dc39..43696f26f02 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index 713f9fcbc2e..c2f66f7defb 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index dd8146a6928..2b166776e74 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -1,31 +1,15 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index 70fdcfb67c3..33583e2bf32 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index dcffcc4c62b..2132a11b594 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java index 6ee6e0267b7..5ab443fa24d 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java @@ -35,46 +35,46 @@ public class IfAndElseWithoutThen { // nest classes so all schemas and input/output classes can be public - public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { @Nullable Object getData(); } - public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { + public record ElseBoxedVoid(Void data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { + public record ElseBoxedNumber(Number data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { + public record ElseBoxedString(String data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; @@ -82,18 +82,18 @@ public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements El } - public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { - private static @Nullable ElseSchema instance = null; + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; - protected ElseSchema() { + protected Else() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static ElseSchema getInstance() { + public static Else getInstance() { if (instance == null) { - instance = new ElseSchema(); + instance = new Else(); } return instance; } @@ -276,31 +276,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedVoid(validate(arg, configuration)); + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); } @Override - public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedBoolean(validate(arg, configuration)); + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); } @Override - public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedNumber(validate(arg, configuration)); + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); } @Override - public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedString(validate(arg, configuration)); + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); } @Override - public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedList(validate(arg, configuration)); + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); } @Override - public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedMap(validate(arg, configuration)); + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); } @Override - public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -320,46 +320,46 @@ public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration } } - public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { @Nullable Object getData(); } - public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { + public record IfBoxedVoid(Void data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { + public record IfBoxedBoolean(boolean data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { + public record IfBoxedNumber(Number data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { + public record IfBoxedString(String data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -367,18 +367,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -561,31 +561,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -663,8 +663,8 @@ public static class IfAndElseWithoutThen1 extends JsonSchema data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -81,18 +81,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -275,31 +275,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -662,7 +662,7 @@ public static class IfAndThenWithoutElse1 extends JsonSchema data) implements ElseSchemaBoxed { + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements El } - public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { - private static @Nullable ElseSchema instance = null; + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; - protected ElseSchema() { + protected Else() { super(new JsonSchemaInfo() .constValue("other") ); } - public static ElseSchema getInstance() { + public static Else getInstance() { if (instance == null) { - instance = new ElseSchema(); + instance = new Else(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedVoid(validate(arg, configuration)); + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); } @Override - public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedBoolean(validate(arg, configuration)); + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); } @Override - public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedNumber(validate(arg, configuration)); + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); } @Override - public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedString(validate(arg, configuration)); + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); } @Override - public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedList(validate(arg, configuration)); + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); } @Override - public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedMap(validate(arg, configuration)); + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); } @Override - public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -333,46 +333,46 @@ public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration } } - public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { @Nullable Object getData(); } - public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { + public record IfBoxedVoid(Void data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { + public record IfBoxedBoolean(boolean data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { + public record IfBoxedNumber(Number data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { + public record IfBoxedString(String data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -380,18 +380,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .maxLength(4) ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -574,31 +574,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -973,9 +973,9 @@ public static class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 ex protected IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1() { super(new JsonSchemaInfo() - .ifSchema(IfSchema.class) + .ifSchema(If.class) .then(Then.class) - .elseSchema(ElseSchema.class) + .elseSchema(Else.class) ); } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java index 69f39db1275..20b569e152d 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java @@ -48,46 +48,46 @@ public String value() { } - public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { @Nullable Object getData(); } - public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { + public record ElseBoxedVoid(Void data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { + public record ElseBoxedNumber(Number data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { + public record ElseBoxedString(String data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements El } - public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { - private static @Nullable ElseSchema instance = null; + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; - protected ElseSchema() { + protected Else() { super(new JsonSchemaInfo() .constValue("0") ); } - public static ElseSchema getInstance() { + public static Else getInstance() { if (instance == null) { - instance = new ElseSchema(); + instance = new Else(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedVoid(validate(arg, configuration)); + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); } @Override - public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedBoolean(validate(arg, configuration)); + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); } @Override - public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedNumber(validate(arg, configuration)); + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); } @Override - public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedString(validate(arg, configuration)); + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); } @Override - public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedList(validate(arg, configuration)); + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); } @Override - public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedMap(validate(arg, configuration)); + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); } @Override - public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -391,7 +391,7 @@ public static class IgnoreElseWithoutIf1 extends JsonSchema data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .constValue("0") ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -391,7 +391,7 @@ public static class IgnoreIfWithoutThenOrElse1 extends JsonSchema data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -82,18 +81,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -276,31 +275,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -372,7 +371,7 @@ public static class Schema0 extends JsonSchema implements NullSche protected Schema0() { super(new JsonSchemaInfo() - .ifSchema(IfSchema.class) + .ifSchema(If.class) ); } @@ -1175,46 +1174,46 @@ public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration con } } - public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { @Nullable Object getData(); } - public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { + public record ElseBoxedVoid(Void data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { + public record ElseBoxedNumber(Number data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { + public record ElseBoxedString(String data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; @@ -1222,18 +1221,18 @@ public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements El } - public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { - private static @Nullable ElseSchema instance = null; + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; - protected ElseSchema() { + protected Else() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static ElseSchema getInstance() { + public static Else getInstance() { if (instance == null) { - instance = new ElseSchema(); + instance = new Else(); } return instance; } @@ -1416,31 +1415,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedVoid(validate(arg, configuration)); + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); } @Override - public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedBoolean(validate(arg, configuration)); + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); } @Override - public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedNumber(validate(arg, configuration)); + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); } @Override - public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedString(validate(arg, configuration)); + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); } @Override - public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedList(validate(arg, configuration)); + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); } @Override - public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedMap(validate(arg, configuration)); + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); } @Override - public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -1512,7 +1511,7 @@ public static class Schema2 extends JsonSchema implements NullSche protected Schema2() { super(new JsonSchemaInfo() - .elseSchema(ElseSchema.class) + .elseSchema(Else.class) ); } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index 56e58519e7d..65923d494b7 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index 2d64dcfa61b..217572bfa8c 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index 2472dd24499..ac189abd5a2 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 97370cd35ac..98ce23a61c8 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -16,9 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -30,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 619be52f3e2..36024642e7c 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -1,31 +1,15 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index 6a2499aefa6..b8201add5a5 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index 4dde715b451..0fc34edbc6c 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -1,6 +1,4 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -9,26 +7,18 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithRequired { diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java index d751523546f..b60f026d0d4 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -69,7 +69,7 @@ protected ToStringMap(FrozenMap<@Nullable Object> m) { "length" ); public static ToStringMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ToStringSchema.getInstance().validate(arg, configuration); + return ToString.getInstance().validate(arg, configuration); } public String length() throws UnsetPropertyException { @@ -126,46 +126,46 @@ public ToStringMapBuilder getBuilderAfterAdditionalProperty(Map data) implements ToStringSchemaBoxed { + public record ToStringBoxedList(FrozenList<@Nullable Object> data) implements ToStringBoxed { @Override public @Nullable Object getData() { return data; } } - public record ToStringSchemaBoxedMap(ToStringMap data) implements ToStringSchemaBoxed { + public record ToStringBoxedMap(ToStringMap data) implements ToStringBoxed { @Override public @Nullable Object getData() { return data; @@ -173,10 +173,10 @@ public record ToStringSchemaBoxedMap(ToStringMap data) implements ToStringSchema } - public static class ToStringSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringSchemaBoxedList>, MapSchemaValidator { - private static @Nullable ToStringSchema instance = null; + public static class ToString extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringBoxedList>, MapSchemaValidator { + private static @Nullable ToString instance = null; - protected ToStringSchema() { + protected ToString() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("length", Length.class) @@ -184,9 +184,9 @@ protected ToStringSchema() { ); } - public static ToStringSchema getInstance() { + public static ToString getInstance() { if (instance == null) { - instance = new ToStringSchema(); + instance = new ToString(); } return instance; } @@ -369,31 +369,31 @@ public ToStringMap validate(Map arg, SchemaConfiguration configuration) th throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ToStringSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedVoid(validate(arg, configuration)); + public ToStringBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedVoid(validate(arg, configuration)); } @Override - public ToStringSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedBoolean(validate(arg, configuration)); + public ToStringBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedBoolean(validate(arg, configuration)); } @Override - public ToStringSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedNumber(validate(arg, configuration)); + public ToStringBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedNumber(validate(arg, configuration)); } @Override - public ToStringSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedString(validate(arg, configuration)); + public ToStringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedString(validate(arg, configuration)); } @Override - public ToStringSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedList(validate(arg, configuration)); + public ToStringBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedList(validate(arg, configuration)); } @Override - public ToStringSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringSchemaBoxedMap(validate(arg, configuration)); + public ToStringBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedMap(validate(arg, configuration)); } @Override - public ToStringSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ToStringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -438,6 +438,16 @@ public static PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map { + public interface SetterForToString { Map getInstance(); - T getBuilderAfterToStringSchema(Map instance); + T getBuilderAfterToString(Map instance); default T toString(Void value) { var instance = getInstance(); instance.put("toString", null); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(boolean value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(String value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(int value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(float value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(long value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(double value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(List value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(Map value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } } @@ -572,7 +582,7 @@ default T constructor(double value) { } } - public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToStringSchema, SetterForConstructor { + public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToString, SetterForConstructor { private final Map instance; private static final Set knownKeys = Set.of( "__proto__", @@ -594,7 +604,7 @@ public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterProto(Map instance) { return this; } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToStringSchema(Map instance) { + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToString(Map instance) { return this; } public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterConstructor(Map instance) { @@ -666,7 +676,7 @@ protected PropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("__proto__", Proto.class), - new PropertyEntry("toString", ToStringSchema.class), + new PropertyEntry("toString", ToString.class), new PropertyEntry("constructor", Constructor.class) )) ); diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java index 0ba4a54153f..de93766a126 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -57,6 +57,14 @@ public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of } } + public @Nullable Object toString() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -182,62 +190,62 @@ default T constructor(Map value) { } } - public interface SetterForToStringSchema { + public interface SetterForToString { Map getInstance(); - T getBuilderAfterToStringSchema(Map instance); + T getBuilderAfterToString(Map instance); default T toString(Void value) { var instance = getInstance(); instance.put("toString", null); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(boolean value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(String value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(int value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(float value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(long value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(double value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(List value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } default T toString(Map value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToStringSchema(instance); + return getBuilderAfterToString(instance); } } @@ -265,7 +273,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToStringSchema { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToString { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(Map instance) { this.instance = instance; @@ -273,7 +281,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder public Map getInstance() { return instance; } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToStringSchema(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToString(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); } } @@ -291,7 +299,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToStringSchema { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToString { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(Map instance) { this.instance = instance; @@ -302,7 +310,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterConstructor(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToStringSchema(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToString(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); } } @@ -320,7 +328,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToStringSchema { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToString { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(Map instance) { this.instance = instance; @@ -331,7 +339,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterProto(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToStringSchema(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToString(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); } } @@ -352,7 +360,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToStringSchema { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToString { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { this.instance = new LinkedHashMap<>(); @@ -366,7 +374,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder getBuilderAfterConstructor(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToStringSchema(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToString(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(instance); } } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java index 5def190d1a3..411272d145d 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java @@ -35,46 +35,46 @@ public class ValidateAgainstCorrectBranchThenVsElse { // nest classes so all schemas and input/output classes can be public - public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { @Nullable Object getData(); } - public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { + public record ElseBoxedVoid(Void data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { + public record ElseBoxedNumber(Number data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { + public record ElseBoxedString(String data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { @Override public @Nullable Object getData() { return data; @@ -82,18 +82,18 @@ public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements El } - public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { - private static @Nullable ElseSchema instance = null; + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; - protected ElseSchema() { + protected Else() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static ElseSchema getInstance() { + public static Else getInstance() { if (instance == null) { - instance = new ElseSchema(); + instance = new Else(); } return instance; } @@ -276,31 +276,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedVoid(validate(arg, configuration)); + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); } @Override - public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedBoolean(validate(arg, configuration)); + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); } @Override - public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedNumber(validate(arg, configuration)); + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); } @Override - public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedString(validate(arg, configuration)); + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); } @Override - public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedList(validate(arg, configuration)); + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); } @Override - public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseSchemaBoxedMap(validate(arg, configuration)); + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); } @Override - public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -320,46 +320,46 @@ public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration } } - public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { @Nullable Object getData(); } - public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { + public record IfBoxedVoid(Void data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { + public record IfBoxedBoolean(boolean data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { + public record IfBoxedNumber(Number data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { + public record IfBoxedString(String data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { @Override public @Nullable Object getData() { return data; @@ -367,18 +367,18 @@ public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSc } - public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { - private static @Nullable IfSchema instance = null; + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; - protected IfSchema() { + protected If() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static IfSchema getInstance() { + public static If getInstance() { if (instance == null) { - instance = new IfSchema(); + instance = new If(); } return instance; } @@ -561,31 +561,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedVoid(validate(arg, configuration)); + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); } @Override - public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedBoolean(validate(arg, configuration)); + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); } @Override - public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedNumber(validate(arg, configuration)); + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); } @Override - public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedString(validate(arg, configuration)); + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); } @Override - public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedList(validate(arg, configuration)); + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); } @Override - public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfSchemaBoxedMap(validate(arg, configuration)); + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); } @Override - public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -948,9 +948,9 @@ public static class ValidateAgainstCorrectBranchThenVsElse1 extends JsonSchema -unit_test_api.apis.tags.additional_properties_api +openapi_client.apis.tags.additional_properties_api # AdditionalPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md index a8fc70cc41f..417b34edee4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.all_of_api +openapi_client.apis.tags.all_of_api # AllOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md index db24138c8f9..47da9b1b87e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.any_of_api +openapi_client.apis.tags.any_of_api # AnyOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md index d8d502a150e..70836b10bc2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.const_api +openapi_client.apis.tags.const_api # ConstApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md index 7bbc1479da7..2b6a6bfb42b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.contains_api +openapi_client.apis.tags.contains_api # ContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md index 0f5e3582655..99960614703 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.content_type_json_api +openapi_client.apis.tags.content_type_json_api # ContentTypeJsonApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md index 4eedf6dda5d..7b053703dbc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.dependent_required_api +openapi_client.apis.tags.dependent_required_api # DependentRequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md index 55bb8085e68..15b50a839c1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.dependent_schemas_api +openapi_client.apis.tags.dependent_schemas_api # DependentSchemasApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md index 529224b8e7b..9ed8b5a134b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.enum_api +openapi_client.apis.tags.enum_api # EnumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md index 709a1555810..509aa30fb84 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.exclusive_maximum_api +openapi_client.apis.tags.exclusive_maximum_api # ExclusiveMaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md index 2172830756c..a7dfc115b36 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.exclusive_minimum_api +openapi_client.apis.tags.exclusive_minimum_api # ExclusiveMinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md index ef542859709..d81fbbda89c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.format_api +openapi_client.apis.tags.format_api # FormatApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md index 4d337911a9f..c82e2f4e325 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.if_then_else_api +openapi_client.apis.tags.if_then_else_api # IfThenElseApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md index 46ed698566d..f4c3068b899 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.items_api +openapi_client.apis.tags.items_api # ItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md index b34c8a41d8a..590ce29e231 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_contains_api +openapi_client.apis.tags.max_contains_api # MaxContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md index 3c2f39b81d9..fa7a6b881ab 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_items_api +openapi_client.apis.tags.max_items_api # MaxItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md index 581d53251b9..e50f6427b47 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_length_api +openapi_client.apis.tags.max_length_api # MaxLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md index 6274432bfaf..7c7f221dc03 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.max_properties_api +openapi_client.apis.tags.max_properties_api # MaxPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md index 431e5c64ad4..f93c66a5928 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.maximum_api +openapi_client.apis.tags.maximum_api # MaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md index c95fdd9fb95..7d920de789d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_contains_api +openapi_client.apis.tags.min_contains_api # MinContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md index eac5307be28..189af58359c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_items_api +openapi_client.apis.tags.min_items_api # MinItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md index 76d6f3acdbe..bf1b6a0c13c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_length_api +openapi_client.apis.tags.min_length_api # MinLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md index fc7595be9e2..861a30f1b6d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.min_properties_api +openapi_client.apis.tags.min_properties_api # MinPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md index 62d9b842e22..671bbf4f58d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.minimum_api +openapi_client.apis.tags.minimum_api # MinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md index 30e9df4678a..f5cc8bf8f58 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.multiple_of_api +openapi_client.apis.tags.multiple_of_api # MultipleOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md new file mode 100644 index 00000000000..5fb0d554c2d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md @@ -0,0 +1,21 @@ + +openapi_client.apis.tags.not_api +# NotApi + +All URIs are relative to the selected server +- The server is selected by passing in server_info and server_index into api_configuration.ApiConfiguration +- Code samples in endpoints documents show how to do this +- server_index can also be passed in to endpoint calls, see endpoint documentation + +Method | Description +------ | ------------- +[**post_forbidden_property_request_body**](../../paths/request_body_post_forbidden_property_request_body/post.md) | +[**post_forbidden_property_response_body_for_content_types**](../../paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | +[**post_not_more_complex_schema_request_body**](../../paths/request_body_post_not_more_complex_schema_request_body/post.md) | +[**post_not_more_complex_schema_response_body_for_content_types**](../../paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | +[**post_not_multiple_types_request_body**](../../paths/request_body_post_not_multiple_types_request_body/post.md) | +[**post_not_multiple_types_response_body_for_content_types**](../../paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md) | +[**post_not_request_body**](../../paths/request_body_post_not_request_body/post.md) | +[**post_not_response_body_for_content_types**](../../paths/response_body_post_not_response_body_for_content_types/post.md) | + +[[Back to top]](#top) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md index 42058af96dd..58d2f471203 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.one_of_api +openapi_client.apis.tags.one_of_api # OneOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md index b35465bed3e..79fb29ff85e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.operation_request_body_api +openapi_client.apis.tags.operation_request_body_api # OperationRequestBodyApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md index 9a244cbd21c..36a48d24570 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.path_post_api +openapi_client.apis.tags.path_post_api # PathPostApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md index e36a5db710f..12cd14bde98 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.pattern_api +openapi_client.apis.tags.pattern_api # PatternApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md index 31a41a06c16..a54ab2ae660 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.pattern_properties_api +openapi_client.apis.tags.pattern_properties_api # PatternPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md index f630d8bd73c..c242a9853d9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.prefix_items_api +openapi_client.apis.tags.prefix_items_api # PrefixItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md index 121308a9060..0996cc914a7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.properties_api +openapi_client.apis.tags.properties_api # PropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md index eac6996a414..42996ed659f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.property_names_api +openapi_client.apis.tags.property_names_api # PropertyNamesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md index 17c53242bc0..8fb305b5258 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.ref_api +openapi_client.apis.tags.ref_api # RefApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md index 1dabd60a970..42663e9672c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.required_api +openapi_client.apis.tags.required_api # RequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md index 8c88b7ee305..311d144e694 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.response_content_content_type_schema_api +openapi_client.apis.tags.response_content_content_type_schema_api # ResponseContentContentTypeSchemaApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md index f616926f4a5..e27e4447bf2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.type_api +openapi_client.apis.tags.type_api # TypeApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md index 7442b21b474..bee132b3551 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.unevaluated_items_api +openapi_client.apis.tags.unevaluated_items_api # UnevaluatedItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md index 8c9b70ce875..37dfe294e65 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.unevaluated_properties_api +openapi_client.apis.tags.unevaluated_properties_api # UnevaluatedPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md index 92f9cb2529c..964c46751b3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md @@ -1,5 +1,5 @@ -unit_test_api.apis.tags.unique_items_api +openapi_client.apis.tags.unique_items_api # UniqueItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md index b9fa7ced2cb..9587a19673d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md @@ -1,5 +1,5 @@ # ASchemaGivenForPrefixitems -unit_test_api.components.schema.a_schema_given_for_prefixitems +openapi_client.components.schema.a_schema_given_for_prefixitems ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md index 4506f70cedb..13128baed7a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalItemsAreAllowedByDefault -unit_test_api.components.schema.additional_items_are_allowed_by_default +openapi_client.components.schema.additional_items_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md index 8dd38499643..c26435c74a3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -unit_test_api.components.schema.additionalproperties_are_allowed_by_default +openapi_client.components.schema.additionalproperties_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md index 91734799218..fbb9f34b100 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -unit_test_api.components.schema.additionalproperties_can_exist_by_itself +openapi_client.components.schema.additionalproperties_can_exist_by_itself ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md index 683059023c6..de4fb640776 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesDoesNotLookInApplicators -unit_test_api.components.schema.additionalproperties_does_not_look_in_applicators +openapi_client.components.schema.additionalproperties_does_not_look_in_applicators ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md index 7b25a19e73b..cadf11fe8da 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schema.additionalproperties_with_null_valued_instance_properties +openapi_client.components.schema.additionalproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md index 714cd074cdc..5fa5ef248e2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithSchema -unit_test_api.components.schema.additionalproperties_with_schema +openapi_client.components.schema.additionalproperties_with_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md index dba78598a7f..17aff8377b3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md @@ -1,5 +1,5 @@ # Allof -unit_test_api.components.schema.allof +openapi_client.components.schema.allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md index 5c3d9d5885c..ba71a7fa107 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -unit_test_api.components.schema.allof_combined_with_anyof_oneof +openapi_client.components.schema.allof_combined_with_anyof_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md index 9253a5b8437..63e6fc23071 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -unit_test_api.components.schema.allof_simple_types +openapi_client.components.schema.allof_simple_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md index cc5d8d960b8..e4d86154e75 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -unit_test_api.components.schema.allof_with_base_schema +openapi_client.components.schema.allof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md index 5cf9db40ba4..79097635223 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -unit_test_api.components.schema.allof_with_one_empty_schema +openapi_client.components.schema.allof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md index 356803ec24c..5c2b8248e88 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -unit_test_api.components.schema.allof_with_the_first_empty_schema +openapi_client.components.schema.allof_with_the_first_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md index 1b2e4fb7e53..40a9ccfae05 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -unit_test_api.components.schema.allof_with_the_last_empty_schema +openapi_client.components.schema.allof_with_the_last_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md index aa9c99a101f..699a57ce756 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -unit_test_api.components.schema.allof_with_two_empty_schemas +openapi_client.components.schema.allof_with_two_empty_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md index 042780da106..ef4898eb423 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md @@ -1,5 +1,5 @@ # Anyof -unit_test_api.components.schema.anyof +openapi_client.components.schema.anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md index 2c3cdca3cfd..763d73b2aab 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -unit_test_api.components.schema.anyof_complex_types +openapi_client.components.schema.anyof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md index 5c150ef6fa1..ea33c52d4a2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -unit_test_api.components.schema.anyof_with_base_schema +openapi_client.components.schema.anyof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md index d4243c366e9..c634c1d761c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -unit_test_api.components.schema.anyof_with_one_empty_schema +openapi_client.components.schema.anyof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md index f4d1f115977..7efbfb9da9f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -unit_test_api.components.schema.array_type_matches_arrays +openapi_client.components.schema.array_type_matches_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md index 40353276217..ccf66cfebdb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -unit_test_api.components.schema.boolean_type_matches_booleans +openapi_client.components.schema.boolean_type_matches_booleans ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md index 1945ad2240f..ba7c4b17f7f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md @@ -1,5 +1,5 @@ # ByInt -unit_test_api.components.schema.by_int +openapi_client.components.schema.by_int ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md index 46ce873dcf1..0851beb6291 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md @@ -1,5 +1,5 @@ # ByNumber -unit_test_api.components.schema.by_number +openapi_client.components.schema.by_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md index e69123a95f8..2621ab7ee8f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md @@ -1,5 +1,5 @@ # BySmallNumber -unit_test_api.components.schema.by_small_number +openapi_client.components.schema.by_small_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md index e8001cd0268..c64502d133b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md @@ -1,5 +1,5 @@ # ConstNulCharactersInStrings -unit_test_api.components.schema.const_nul_characters_in_strings +openapi_client.components.schema.const_nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md index 3f38ed66a5a..836711cd472 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md @@ -1,5 +1,5 @@ # ContainsKeywordValidation -unit_test_api.components.schema.contains_keyword_validation +openapi_client.components.schema.contains_keyword_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md index e9f248a1291..c11cfa2c05f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md @@ -1,5 +1,5 @@ # ContainsWithNullInstanceElements -unit_test_api.components.schema.contains_with_null_instance_elements +openapi_client.components.schema.contains_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md index b8cac14f730..6b31bb526f0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md @@ -1,5 +1,5 @@ # DateFormat -unit_test_api.components.schema.date_format +openapi_client.components.schema.date_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md index 672d9536be7..4280a29b11e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md @@ -1,5 +1,5 @@ # DateTimeFormat -unit_test_api.components.schema.date_time_format +openapi_client.components.schema.date_time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md index 31836342fba..04b3a50fa51 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md @@ -1,5 +1,5 @@ # DependentSchemasDependenciesWithEscapedCharacters -unit_test_api.components.schema.dependent_schemas_dependencies_with_escaped_characters +openapi_client.components.schema.dependent_schemas_dependencies_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md index 3fb18b118c4..be5cedd2c62 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md @@ -1,5 +1,5 @@ # DependentSchemasDependentSubschemaIncompatibleWithRoot -unit_test_api.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root +openapi_client.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md index b39875c1ce0..64d1a285734 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md @@ -1,5 +1,5 @@ # DependentSchemasSingleDependency -unit_test_api.components.schema.dependent_schemas_single_dependency +openapi_client.components.schema.dependent_schemas_single_dependency ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md index e0b483a4460..d755ae7034e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md @@ -1,5 +1,5 @@ # DurationFormat -unit_test_api.components.schema.duration_format +openapi_client.components.schema.duration_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md index 19c83e8d25b..0ffd547dadd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md @@ -1,5 +1,5 @@ # EmailFormat -unit_test_api.components.schema.email_format +openapi_client.components.schema.email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md index c1e8220de4b..01e2cbb83dd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md @@ -1,5 +1,5 @@ # EmptyDependents -unit_test_api.components.schema.empty_dependents +openapi_client.components.schema.empty_dependents ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md index 15b5dc53b6e..ed83e936da4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -unit_test_api.components.schema.enum_with0_does_not_match_false +openapi_client.components.schema.enum_with0_does_not_match_false ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md index 6615b73908f..2025ed9ff16 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -unit_test_api.components.schema.enum_with1_does_not_match_true +openapi_client.components.schema.enum_with1_does_not_match_true ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md index 3c0ea810a81..c0a9f43b53d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -unit_test_api.components.schema.enum_with_escaped_characters +openapi_client.components.schema.enum_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md index fdc3978854d..212e10809ad 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -unit_test_api.components.schema.enum_with_false_does_not_match0 +openapi_client.components.schema.enum_with_false_does_not_match0 ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md index b77e0d0ce8c..8710e6dfd45 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -unit_test_api.components.schema.enum_with_true_does_not_match1 +openapi_client.components.schema.enum_with_true_does_not_match1 ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md index 70957943d7e..cd9a1e817aa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md @@ -1,5 +1,5 @@ # EnumsInProperties -unit_test_api.components.schema.enums_in_properties +openapi_client.components.schema.enums_in_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md index 09f075daee1..f008495c4b4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md @@ -1,5 +1,5 @@ # ExclusivemaximumValidation -unit_test_api.components.schema.exclusivemaximum_validation +openapi_client.components.schema.exclusivemaximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md index c5109fc199d..bc9b678e2b2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md @@ -1,5 +1,5 @@ # ExclusiveminimumValidation -unit_test_api.components.schema.exclusiveminimum_validation +openapi_client.components.schema.exclusiveminimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md index 710791b201d..5e84e1aa02f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md @@ -1,5 +1,5 @@ # FloatDivisionInf -unit_test_api.components.schema.float_division_inf +openapi_client.components.schema.float_division_inf ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md index dfd224ae2ed..578716cefa4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md @@ -1,5 +1,5 @@ # ForbiddenProperty -unit_test_api.components.schema.forbidden_property +openapi_client.components.schema.forbidden_property ``` type: schemas.Schema ``` @@ -54,9 +54,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[Not](#not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md index df9411b9603..7e9e71ee21d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md @@ -1,5 +1,5 @@ # HostnameFormat -unit_test_api.components.schema.hostname_format +openapi_client.components.schema.hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md index 162a2bb916b..8fb0d84a0dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md @@ -1,5 +1,5 @@ # IdnEmailFormat -unit_test_api.components.schema.idn_email_format +openapi_client.components.schema.idn_email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md index aabda8772c3..dafa3f74f24 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md @@ -1,5 +1,5 @@ # IdnHostnameFormat -unit_test_api.components.schema.idn_hostname_format +openapi_client.components.schema.idn_hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md index 8e60df47f91..4cc7de16f1e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md @@ -1,5 +1,5 @@ # IfAndElseWithoutThen -unit_test_api.components.schema.if_and_else_without_then +openapi_client.components.schema.if_and_else_without_then ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md index b793ed2938b..8805187fdc4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md @@ -1,5 +1,5 @@ # IfAndThenWithoutElse -unit_test_api.components.schema.if_and_then_without_else +openapi_client.components.schema.if_and_then_without_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md index df389c370b0..1ec3423219d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md @@ -1,5 +1,5 @@ # IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence -unit_test_api.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence +openapi_client.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md index ea607ce3d29..b50938cc9fa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md @@ -1,5 +1,5 @@ # IgnoreElseWithoutIf -unit_test_api.components.schema.ignore_else_without_if +openapi_client.components.schema.ignore_else_without_if ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md index 3839a641431..12af7f09089 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md @@ -1,5 +1,5 @@ # IgnoreIfWithoutThenOrElse -unit_test_api.components.schema.ignore_if_without_then_or_else +openapi_client.components.schema.ignore_if_without_then_or_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md index 44657030040..cbe8d29f8ef 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md @@ -1,5 +1,5 @@ # IgnoreThenWithoutIf -unit_test_api.components.schema.ignore_then_without_if +openapi_client.components.schema.ignore_then_without_if ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md index 6630731f225..011382ff502 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -unit_test_api.components.schema.integer_type_matches_integers +openapi_client.components.schema.integer_type_matches_integers ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md index 78d8cc1092c..4d85e2dfc50 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md @@ -1,5 +1,5 @@ # Ipv4Format -unit_test_api.components.schema.ipv4_format +openapi_client.components.schema.ipv4_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md index a72f9736166..ddfd419ea10 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md @@ -1,5 +1,5 @@ # Ipv6Format -unit_test_api.components.schema.ipv6_format +openapi_client.components.schema.ipv6_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md index d2c2ac19dbc..34427b55b3e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md @@ -1,5 +1,5 @@ # IriFormat -unit_test_api.components.schema.iri_format +openapi_client.components.schema.iri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md index edac7f8814a..d2382f13ddb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md @@ -1,5 +1,5 @@ # IriReferenceFormat -unit_test_api.components.schema.iri_reference_format +openapi_client.components.schema.iri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md index ca8b1a4ab42..c2b2e0b6ecf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md @@ -1,5 +1,5 @@ # ItemsContains -unit_test_api.components.schema.items_contains +openapi_client.components.schema.items_contains ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md index 4927b50ce1a..356c0b7d441 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md @@ -1,5 +1,5 @@ # ItemsDoesNotLookInApplicatorsValidCase -unit_test_api.components.schema.items_does_not_look_in_applicators_valid_case +openapi_client.components.schema.items_does_not_look_in_applicators_valid_case ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md index 3922bc7e409..6dd5a05bd82 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md @@ -1,5 +1,5 @@ # ItemsWithNullInstanceElements -unit_test_api.components.schema.items_with_null_instance_elements +openapi_client.components.schema.items_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md index 98e8b61825c..14b8237cdc1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md @@ -1,5 +1,5 @@ # JsonPointerFormat -unit_test_api.components.schema.json_pointer_format +openapi_client.components.schema.json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md index 47b8eb381f5..a58c9c99271 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md @@ -1,5 +1,5 @@ # MaxcontainsWithoutContainsIsIgnored -unit_test_api.components.schema.maxcontains_without_contains_is_ignored +openapi_client.components.schema.maxcontains_without_contains_is_ignored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md index 378b58f8023..e2d0d04a242 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md @@ -1,5 +1,5 @@ # MaximumValidation -unit_test_api.components.schema.maximum_validation +openapi_client.components.schema.maximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md index d67df0a95ec..99f6aba50fb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -unit_test_api.components.schema.maximum_validation_with_unsigned_integer +openapi_client.components.schema.maximum_validation_with_unsigned_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md index e7b2d56546b..cad99d77c77 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -unit_test_api.components.schema.maxitems_validation +openapi_client.components.schema.maxitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md index 5f3a102065f..681922c6d72 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -unit_test_api.components.schema.maxlength_validation +openapi_client.components.schema.maxlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md index 5477108f943..15bb489c9b0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -unit_test_api.components.schema.maxproperties0_means_the_object_is_empty +openapi_client.components.schema.maxproperties0_means_the_object_is_empty ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md index cd9d2b02984..a949f7516bf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -unit_test_api.components.schema.maxproperties_validation +openapi_client.components.schema.maxproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md index 2ee43a35728..b8989294172 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md @@ -1,5 +1,5 @@ # MincontainsWithoutContainsIsIgnored -unit_test_api.components.schema.mincontains_without_contains_is_ignored +openapi_client.components.schema.mincontains_without_contains_is_ignored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md index d90d5b573de..50e38f4b416 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md @@ -1,5 +1,5 @@ # MinimumValidation -unit_test_api.components.schema.minimum_validation +openapi_client.components.schema.minimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md index b3c9f3dba7f..75dba36ce70 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -unit_test_api.components.schema.minimum_validation_with_signed_integer +openapi_client.components.schema.minimum_validation_with_signed_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md index 76b3b846a9f..9e2902ac5dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md @@ -1,5 +1,5 @@ # MinitemsValidation -unit_test_api.components.schema.minitems_validation +openapi_client.components.schema.minitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md index 149cd02b965..f4eec7c22e6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md @@ -1,5 +1,5 @@ # MinlengthValidation -unit_test_api.components.schema.minlength_validation +openapi_client.components.schema.minlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md index 87f643e4e40..9bfa96bb61b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -unit_test_api.components.schema.minproperties_validation +openapi_client.components.schema.minproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md index f2d3a0b03f9..69343ea00d4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md @@ -1,5 +1,5 @@ # MultipleDependentsRequired -unit_test_api.components.schema.multiple_dependents_required +openapi_client.components.schema.multiple_dependents_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md index b42dd4f0758..b8375ae2dda 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md @@ -1,5 +1,5 @@ # MultipleSimultaneousPatternpropertiesAreValidated -unit_test_api.components.schema.multiple_simultaneous_patternproperties_are_validated +openapi_client.components.schema.multiple_simultaneous_patternproperties_are_validated ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md index 62e07008e94..a6e3e451d2d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md @@ -1,5 +1,5 @@ # MultipleTypesCanBeSpecifiedInAnArray -unit_test_api.components.schema.multiple_types_can_be_specified_in_an_array +openapi_client.components.schema.multiple_types_can_be_specified_in_an_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md index 216fa2e6bbc..27517ae43a8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -unit_test_api.components.schema.nested_allof_to_check_validation_semantics +openapi_client.components.schema.nested_allof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md index 69dbb3c5ed1..00cfa1e5d02 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -unit_test_api.components.schema.nested_anyof_to_check_validation_semantics +openapi_client.components.schema.nested_anyof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md index 12858c9191b..dd71cf121cc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md @@ -1,5 +1,5 @@ # NestedItems -unit_test_api.components.schema.nested_items +openapi_client.components.schema.nested_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md index 95a56bdfb5a..7c0a3a84ce7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -unit_test_api.components.schema.nested_oneof_to_check_validation_semantics +openapi_client.components.schema.nested_oneof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md index f0f000fa7b2..426c99effb2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md @@ -1,5 +1,5 @@ # NonAsciiPatternWithAdditionalproperties -unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties +openapi_client.components.schema.non_ascii_pattern_with_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md index ddf72dee086..7a399c44325 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md @@ -1,5 +1,5 @@ # NonInterferenceAcrossCombinedSchemas -unit_test_api.components.schema.non_interference_across_combined_schemas +openapi_client.components.schema.non_interference_across_combined_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md new file mode 100644 index 00000000000..c5d503ba001 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md @@ -0,0 +1,28 @@ +# Not +openapi_client.components.schema.not +``` +type: schemas.Schema +``` + +## validate method +Input Type | Return Type | Notes +------------ | ------------- | ------------- +dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | + +## Composed Schemas (allOf/anyOf/oneOf/not) +## not +Schema Class | Input Type | Return Type +------------ | ---------- | ----------- +[Not2](#not2) | int | int + +# Not2 +``` +type: schemas.Schema +``` + +## validate method +Input Type | Return Type | Notes +------------ | ------------- | ------------- +int | int | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md index 0deae4d934b..c042b4880c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -unit_test_api.components.schema.not_more_complex_schema +openapi_client.components.schema.not_more_complex_schema ``` type: schemas.Schema ``` @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) +[Not](#not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md index 1b37e5c4b35..be0d1407542 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md @@ -1,5 +1,5 @@ # NotMultipleTypes -unit_test_api.components.schema.not_multiple_types +openapi_client.components.schema.not_multiple_types ``` type: schemas.Schema ``` @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | int, bool | int, bool +[Not](#not) | int, bool | int, bool -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md index 6b2ae0f5596..87432dbc863 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -unit_test_api.components.schema.nul_characters_in_strings +openapi_client.components.schema.nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md index d61c3f1ddd1..6c8fa175936 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -unit_test_api.components.schema.null_type_matches_only_the_null_object +openapi_client.components.schema.null_type_matches_only_the_null_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md index cac70e72fdc..9de89f93f7b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -unit_test_api.components.schema.number_type_matches_numbers +openapi_client.components.schema.number_type_matches_numbers ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md index 119d76f77a0..cdcc6d319d4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -unit_test_api.components.schema.object_properties_validation +openapi_client.components.schema.object_properties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md index 71b0fb1fa2c..28386703ab2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -unit_test_api.components.schema.object_type_matches_objects +openapi_client.components.schema.object_type_matches_objects ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md index 1d897561347..78e3bdfe366 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md @@ -1,5 +1,5 @@ # Oneof -unit_test_api.components.schema.oneof +openapi_client.components.schema.oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md index a7f15deadb7..cd63a9482c7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md @@ -1,5 +1,5 @@ # OneofComplexTypes -unit_test_api.components.schema.oneof_complex_types +openapi_client.components.schema.oneof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md index 4230ca82320..7ff0bf6191c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -unit_test_api.components.schema.oneof_with_base_schema +openapi_client.components.schema.oneof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md index 9a5e93ffe25..55ed638a799 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -unit_test_api.components.schema.oneof_with_empty_schema +openapi_client.components.schema.oneof_with_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md index bde6e8f36ee..5e71f9061e7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md @@ -1,5 +1,5 @@ # OneofWithRequired -unit_test_api.components.schema.oneof_with_required +openapi_client.components.schema.oneof_with_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md index 172c789e202..448f029fad1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -unit_test_api.components.schema.pattern_is_not_anchored +openapi_client.components.schema.pattern_is_not_anchored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md index 97fc2c367fd..54835339351 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md @@ -1,5 +1,5 @@ # PatternValidation -unit_test_api.components.schema.pattern_validation +openapi_client.components.schema.pattern_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md index 5ab5975f0cf..a750b1cb32c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md @@ -1,5 +1,5 @@ # PatternpropertiesValidatesPropertiesMatchingARegex -unit_test_api.components.schema.patternproperties_validates_properties_matching_a_regex +openapi_client.components.schema.patternproperties_validates_properties_matching_a_regex ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md index 58e994f1d56..54c8b58ecd0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # PatternpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schema.patternproperties_with_null_valued_instance_properties +openapi_client.components.schema.patternproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md index 5dd889aa9e4..885f1932e56 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md @@ -1,5 +1,5 @@ # PrefixitemsValidationAdjustsTheStartingIndexForItems -unit_test_api.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items +openapi_client.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md index e1c66535f91..e309c83f83d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md @@ -1,5 +1,5 @@ # PrefixitemsWithNullInstanceElements -unit_test_api.components.schema.prefixitems_with_null_instance_elements +openapi_client.components.schema.prefixitems_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md index 3b9c58ea6cb..c7b26d8bd10 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md @@ -1,5 +1,5 @@ # PropertiesPatternpropertiesAdditionalpropertiesInteraction -unit_test_api.components.schema.properties_patternproperties_additionalproperties_interaction +openapi_client.components.schema.properties_patternproperties_additionalproperties_interaction ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md index f0f6c0df9a1..dbe2902d46f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md @@ -1,5 +1,5 @@ # PropertiesWhoseNamesAreJavascriptObjectPropertyNames -unit_test_api.components.schema.properties_whose_names_are_javascript_object_property_names +openapi_client.components.schema.properties_whose_names_are_javascript_object_property_names ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md index 830a047b516..1e62c04f7c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -unit_test_api.components.schema.properties_with_escaped_characters +openapi_client.components.schema.properties_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md index 164d19697b6..f615427aeeb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # PropertiesWithNullValuedInstanceProperties -unit_test_api.components.schema.properties_with_null_valued_instance_properties +openapi_client.components.schema.properties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md index d70dd946f15..1133a853c9b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -unit_test_api.components.schema.property_named_ref_that_is_not_a_reference +openapi_client.components.schema.property_named_ref_that_is_not_a_reference ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md index cdbd52bb0b3..028208da49c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md @@ -1,5 +1,5 @@ # PropertynamesValidation -unit_test_api.components.schema.propertynames_validation +openapi_client.components.schema.propertynames_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md index ed6d8333292..35419fdb03b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md @@ -1,5 +1,5 @@ # RegexFormat -unit_test_api.components.schema.regex_format +openapi_client.components.schema.regex_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md index a151897b321..d3548f68366 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md @@ -1,5 +1,5 @@ # RegexesAreNotAnchoredByDefaultAndAreCaseSensitive -unit_test_api.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive +openapi_client.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md index e5ed11821b5..719515d18d8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md @@ -1,5 +1,5 @@ # RelativeJsonPointerFormat -unit_test_api.components.schema.relative_json_pointer_format +openapi_client.components.schema.relative_json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md index a1923bc3370..013b2b6c3e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -unit_test_api.components.schema.required_default_validation +openapi_client.components.schema.required_default_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md index 2a782b24abf..f25ec01881f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md @@ -1,5 +1,5 @@ # RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames -unit_test_api.components.schema.required_properties_whose_names_are_javascript_object_property_names +openapi_client.components.schema.required_properties_whose_names_are_javascript_object_property_names ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md index 3dc9958f88b..ca5e4fb2b5c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md @@ -1,5 +1,5 @@ # RequiredValidation -unit_test_api.components.schema.required_validation +openapi_client.components.schema.required_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md index 06ca142ed71..31f72b12cda 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -unit_test_api.components.schema.required_with_empty_array +openapi_client.components.schema.required_with_empty_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md index b59d46f5094..ef7a12c740d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -unit_test_api.components.schema.required_with_escaped_characters +openapi_client.components.schema.required_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md index 76d4e96d6cb..8913312182e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -unit_test_api.components.schema.simple_enum_validation +openapi_client.components.schema.simple_enum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md index a77bfbe2103..3599a3f77ec 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md @@ -1,5 +1,5 @@ # SingleDependency -unit_test_api.components.schema.single_dependency +openapi_client.components.schema.single_dependency ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md index aa100295572..a1cbd121ef3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md @@ -1,5 +1,5 @@ # SmallMultipleOfLargeInteger -unit_test_api.components.schema.small_multiple_of_large_integer +openapi_client.components.schema.small_multiple_of_large_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md index 5ad002dcdb6..c8cba112eb4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -unit_test_api.components.schema.string_type_matches_strings +openapi_client.components.schema.string_type_matches_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md index ea891f00175..719fd460775 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md @@ -1,5 +1,5 @@ # TimeFormat -unit_test_api.components.schema.time_format +openapi_client.components.schema.time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md index c1c5ce74844..de2bf9d42af 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md @@ -1,5 +1,5 @@ # TypeArrayObjectOrNull -unit_test_api.components.schema.type_array_object_or_null +openapi_client.components.schema.type_array_object_or_null ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md index 8fdb24655dc..249511729f1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md @@ -1,5 +1,5 @@ # TypeArrayOrObject -unit_test_api.components.schema.type_array_or_object +openapi_client.components.schema.type_array_or_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md index a7d127faa8e..8478a95bd61 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md @@ -1,5 +1,5 @@ # TypeAsArrayWithOneItem -unit_test_api.components.schema.type_as_array_with_one_item +openapi_client.components.schema.type_as_array_with_one_item ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md index e3f730178b7..d73cf627dd4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md @@ -1,5 +1,5 @@ # UnevaluateditemsAsSchema -unit_test_api.components.schema.unevaluateditems_as_schema +openapi_client.components.schema.unevaluateditems_as_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md index fe0b729e67b..19e98af95e8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md @@ -1,5 +1,5 @@ # UnevaluateditemsDependsOnMultipleNestedContains -unit_test_api.components.schema.unevaluateditems_depends_on_multiple_nested_contains +openapi_client.components.schema.unevaluateditems_depends_on_multiple_nested_contains ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md index f6f9281bc8d..c4f4e453b39 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithItems -unit_test_api.components.schema.unevaluateditems_with_items +openapi_client.components.schema.unevaluateditems_with_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md index 3e905088328..3448b1f1e2b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithNullInstanceElements -unit_test_api.components.schema.unevaluateditems_with_null_instance_elements +openapi_client.components.schema.unevaluateditems_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md index af2f9cb1723..62e2420aa1d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesNotAffectedByPropertynames -unit_test_api.components.schema.unevaluatedproperties_not_affected_by_propertynames +openapi_client.components.schema.unevaluatedproperties_not_affected_by_propertynames ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md index 93e9eb7c1d4..5e36cef11aa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesSchema -unit_test_api.components.schema.unevaluatedproperties_schema +openapi_client.components.schema.unevaluatedproperties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md index 5e65917d346..ff83452a21b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithAdjacentAdditionalproperties -unit_test_api.components.schema.unevaluatedproperties_with_adjacent_additionalproperties +openapi_client.components.schema.unevaluatedproperties_with_adjacent_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md index 255a7e30e97..b0a481a7c00 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schema.unevaluatedproperties_with_null_valued_instance_properties +openapi_client.components.schema.unevaluatedproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md index a6d90d841c2..34fa0acc529 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -unit_test_api.components.schema.uniqueitems_false_validation +openapi_client.components.schema.uniqueitems_false_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md index f8e419b5c71..f60ba68bd8c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md @@ -1,5 +1,5 @@ # UniqueitemsFalseWithAnArrayOfItems -unit_test_api.components.schema.uniqueitems_false_with_an_array_of_items +openapi_client.components.schema.uniqueitems_false_with_an_array_of_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md index 21ecd3794ff..6d824238bf2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -unit_test_api.components.schema.uniqueitems_validation +openapi_client.components.schema.uniqueitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md index 29abd65a114..e7f63ce15d2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md @@ -1,5 +1,5 @@ # UniqueitemsWithAnArrayOfItems -unit_test_api.components.schema.uniqueitems_with_an_array_of_items +openapi_client.components.schema.uniqueitems_with_an_array_of_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md index 8d178c0bec8..a903ae2744a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md @@ -1,5 +1,5 @@ # UriFormat -unit_test_api.components.schema.uri_format +openapi_client.components.schema.uri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md index 1cb2c8ad458..a656995619f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md @@ -1,5 +1,5 @@ # UriReferenceFormat -unit_test_api.components.schema.uri_reference_format +openapi_client.components.schema.uri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md index 45598bd12a6..4f1b8fc8806 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md @@ -1,5 +1,5 @@ # UriTemplateFormat -unit_test_api.components.schema.uri_template_format +openapi_client.components.schema.uri_template_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md index 1a20a142a5a..9063178f55a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md @@ -1,5 +1,5 @@ # UuidFormat -unit_test_api.components.schema.uuid_format +openapi_client.components.schema.uuid_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md index 51ef995df7d..b00ddee5c99 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md @@ -1,5 +1,5 @@ # ValidateAgainstCorrectBranchThenVsElse -unit_test_api.components.schema.validate_against_correct_branch_then_vs_else +openapi_client.components.schema.validate_against_correct_branch_then_vs_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md index e45318ad04d..cd4c6132465 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_a_schema_given_for_prefixitems_request_body.operation +openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_a_schema_given_for_prefixitems_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md index 0fad63d5795..c48904353e1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additional_items_are_allowed_by_default_request_body.operation +openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additional_items_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md index 110b85cbbe2..35cca7ee9d1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md index 68be6adfef7..ca9ebe6c797 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md index 4e3acb6853b..7324ace29e5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_does_not_look_in_applicators_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md index 25f66785846..71195b0ee15 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md index ca04d5c1e1e..a7cf8558a4c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_additionalproperties_with_schema_request_body.operation +openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_with_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md index b8452c3b430..18fc8daecf6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation +openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md index 4510ddebabf..398d17ab0da 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_request_body.operation +openapi_client.paths.request_body_post_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md index 63ca858d926..93610737559 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_simple_types_request_body.operation +openapi_client.paths.request_body_post_allof_simple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md index f474402a883..e13b8fdf38a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md index 4be8897cd29..e0727aa3980 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md index 4742c933e73..8421d85c4ff 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md index 8eb619a5430..a863e5a7296 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation +openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md index e72d229de81..9f2ac2ffbfa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation +openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md index 44932e771bf..1d940e1fe8f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_complex_types_request_body.operation +openapi_client.paths.request_body_post_anyof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md index 0ab897a1cfe..a29c9b8917f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_request_body.operation +openapi_client.paths.request_body_post_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md index 9fe2943ea99..95535a41c53 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md index 92ec911c863..0e93c88cc44 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation +openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md index e60a37b5893..6e0ce6b5e1b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.operation +openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md index ca1bd14e43a..4602f4859f7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.operation +openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md index 3b8eaac0855..02be71b59f9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_int_request_body.operation +openapi_client.paths.request_body_post_by_int_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md index c219dd32371..10badf24418 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_number_request_body.operation +openapi_client.paths.request_body_post_by_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md index b1dd4f60736..17a56e579e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_by_small_number_request_body.operation +openapi_client.paths.request_body_post_by_small_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md index 33d7883d833..a39b351ecce 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_const_nul_characters_in_strings_request_body.operation +openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_const_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md index 9f4854cebb2..9ce6deb277b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_contains_keyword_validation_request_body.operation +openapi_client.paths.request_body_post_contains_keyword_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_contains_keyword_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md index d2bf595681b..33eda569535 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_contains_with_null_instance_elements_request_body.operation +openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_contains_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md index 83306cec6ad..27953843f16 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_date_format_request_body.operation +openapi_client.paths.request_body_post_date_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md index 22f51d88ec0..19161ccb7b8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_date_time_format_request_body.operation +openapi_client.paths.request_body_post_date_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md index 92eedc60443..c319b8e1464 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_dependencies_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md index 27de5f64da3..2b576862e7c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.operation +openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md index 7d032cfb404..e0566c93a25 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_dependent_schemas_single_dependency_request_body.operation +openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_single_dependency_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md index 1dc639a47ec..b75d5a6893e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_duration_format_request_body.operation +openapi_client.paths.request_body_post_duration_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_duration_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md index 3a9f9de78cf..cd422fa78e8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_email_format_request_body.operation +openapi_client.paths.request_body_post_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md index 24fe4781df7..7cbf0e7df30 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_empty_dependents_request_body.operation +openapi_client.paths.request_body_post_empty_dependents_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_empty_dependents_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md index 3e49495c679..06187d8c063 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation +openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md index 868990642c3..328df6e7204 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation +openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md index a22db8a20af..cf0a6047e1d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md index 9267427c716..b58151f23fa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation +openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md index 640f172d633..4844ce9e63d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation +openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md index 85217ed11a6..f9eb8455206 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_enums_in_properties_request_body.operation +openapi_client.paths.request_body_post_enums_in_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md index ec5cc929756..f1ce7b1f2d2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_exclusivemaximum_validation_request_body.operation +openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import exclusive_maximum_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import exclusive_maximum_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = exclusive_maximum_api.ExclusiveMaximumApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling ExclusiveMaximumApi->post_exclusivemaximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md index 892dc05a12f..e9457bd9914 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_exclusiveminimum_validation_request_body.operation +openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_exclusiveminimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md index d83fa579abb..405518de613 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_float_division_inf_request_body.operation +openapi_client.paths.request_body_post_float_division_inf_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_float_division_inf_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md index e2db3f67bba..a14661d42f8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_forbidden_property_request_body.operation +openapi_client.paths.request_body_post_forbidden_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_forbidden_property_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_forbidden_property_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_forbidden_property_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_forbidden_property_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,13 +103,13 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md index 294cea79577..2e7c04f5037 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_hostname_format_request_body.operation +openapi_client.paths.request_body_post_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md index 22e48f71922..de3b84f7cac 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_idn_email_format_request_body.operation +openapi_client.paths.request_body_post_idn_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_idn_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md index 08048612101..93702f1525b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_idn_hostname_format_request_body.operation +openapi_client.paths.request_body_post_idn_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_idn_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md index f3e6dd28e3a..a0c3df1c60e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_if_and_else_without_then_request_body.operation +openapi_client.paths.request_body_post_if_and_else_without_then_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_and_else_without_then_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md index 7da0bc3cacf..195b9cdb989 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_if_and_then_without_else_request_body.operation +openapi_client.paths.request_body_post_if_and_then_without_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_and_then_without_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md index 47b59050cd5..8d6255ec33d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.operation +openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md index 37eedca16cd..8525cbe52a6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ignore_else_without_if_request_body.operation +openapi_client.paths.request_body_post_ignore_else_without_if_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_else_without_if_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md index de22045504f..ce79dbd2c33 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ignore_if_without_then_or_else_request_body.operation +openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_if_without_then_or_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md index 939377de9c9..b9f5ee8287a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ignore_then_without_if_request_body.operation +openapi_client.paths.request_body_post_ignore_then_without_if_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_then_without_if_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md index b9d3e3d4720..e21fa537a06 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.operation +openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md index 9aeb9426f96..2b3a5f61bd6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ipv4_format_request_body.operation +openapi_client.paths.request_body_post_ipv4_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md index 8050d4e38b8..1677e7d2525 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_ipv6_format_request_body.operation +openapi_client.paths.request_body_post_ipv6_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md index e019fe92308..9d974bb9497 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_iri_format_request_body.operation +openapi_client.paths.request_body_post_iri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_iri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md index 7c948cd87c6..4f2ca75e6c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_iri_reference_format_request_body.operation +openapi_client.paths.request_body_post_iri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_iri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md index 9b234eb7665..8a03c28c06b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_items_contains_request_body.operation +openapi_client.paths.request_body_post_items_contains_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_contains_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md index db0f9e5a8c6..84415f11d68 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.operation +openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_does_not_look_in_applicators_valid_case_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md index 0911a9da045..d1e66d3585a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_items_with_null_instance_elements_request_body.operation +openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md index 79e97542369..e16dcb5aacf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_json_pointer_format_request_body.operation +openapi_client.paths.request_body_post_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md index b93aaeeb942..748a9fdc812 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.operation +openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxcontains_without_contains_is_ignored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md index a4cf41c5a21..0544cc6468b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maximum_validation_request_body.operation +openapi_client.paths.request_body_post_maximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md index b9192384acf..41f2a7d9d4d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation +openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md index 76b56511900..f8e81e98154 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxitems_validation_request_body.operation +openapi_client.paths.request_body_post_maxitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md index 865aa26009e..93d80f3c925 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxlength_validation_request_body.operation +openapi_client.paths.request_body_post_maxlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md index 1d91fa18a50..6ebd397ea55 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation +openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md index 054e62200de..f67b22c22dd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_maxproperties_validation_request_body.operation +openapi_client.paths.request_body_post_maxproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md index 03abb572522..9680a3faf61 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.operation +openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_mincontains_without_contains_is_ignored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md index cc80b57b977..4dbe7049700 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minimum_validation_request_body.operation +openapi_client.paths.request_body_post_minimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md index a9c04d11a5a..fc53fc2843c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation +openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md index 9c38740da8a..36b33fcf39f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minitems_validation_request_body.operation +openapi_client.paths.request_body_post_minitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import min_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md index 4c53aa747e5..e37ff4f0004 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minlength_validation_request_body.operation +openapi_client.paths.request_body_post_minlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md index 21ec6fe1840..8a742a7239f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_minproperties_validation_request_body.operation +openapi_client.paths.request_body_post_minproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md index 12e1d5f3406..0d8ee2e9d77 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_multiple_dependents_required_request_body.operation +openapi_client.paths.request_body_post_multiple_dependents_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_multiple_dependents_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md index 3d7749cb427..87635cf1ca8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.operation +openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_multiple_simultaneous_patternproperties_are_validated_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md index c84c845d394..1b52b1896d2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.operation +openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_multiple_types_can_be_specified_in_an_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md index 5438484d94d..0de64f2df39 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md index a421805e866..f51f046051a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md index 82909325d37..b3dc3589182 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_items_request_body.operation +openapi_client.paths.request_body_post_nested_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -111,7 +111,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md index 7ecd99cc6bc..899f5cd7cb5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation +openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md index 96d147c6431..006832d2ae9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.operation +openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_non_ascii_pattern_with_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md index 86d482027ea..9ece6387c53 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_non_interference_across_combined_schemas_request_body.operation +openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_non_interference_across_combined_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md index 71bb3272c96..996d1d5d1c1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.operation +openapi_client.paths.request_body_post_not_more_complex_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_more_complex_schema_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_more_complex_schema_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,13 +103,13 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md index 60612451cd6..4598c41c47f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_not_multiple_types_request_body.operation +openapi_client.paths.request_body_post_not_multiple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_multiple_types_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_multiple_types_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_multiple_types_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_multiple_types_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_multiple_types_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,13 +103,13 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_multiple_types_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md index 65175a1384a..1c1abcc14a9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md @@ -1,10 +1,10 @@ -unit_test_api.paths.request_body_post_not_request_body.operation +openapi_client.paths.request_body_post_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -49,7 +49,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Return Types @@ -85,31 +85,31 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = _not._Not.validate(None) + body = not.Not.validate(None) try: api_response = api_instance.post_not_request_body( body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) ``` [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md index 7010931a423..182827619a8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md index 9c736950dd7..7d326dc9dbe 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.operation +openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md index ef4fe60ec73..1bb37c3d32e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation +openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md index 798cad055b4..1452797a9fd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.operation +openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md index 517f2d9f6c4..197d333c25d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_object_properties_validation_request_body.operation +openapi_client.paths.request_body_post_object_properties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md index 592b36537d9..a15853f9b0c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.operation +openapi_client.paths.request_body_post_object_type_matches_objects_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md index 907311b6469..2532f9c9ef4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_complex_types_request_body.operation +openapi_client.paths.request_body_post_oneof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md index 22f845e0e62..84e15bbb499 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_request_body.operation +openapi_client.paths.request_body_post_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md index d3bc5e23ef2..a0681e0f6f1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.operation +openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md index 2cf25497138..cc73acd26fb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.operation +openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md index 3b3dac03539..8449e1a0716 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_oneof_with_required_request_body.operation +openapi_client.paths.request_body_post_oneof_with_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md index 74eff8b32a7..a0d2712e120 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.operation +openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md index 703f9588b6e..79cc75e82fd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_pattern_validation_request_body.operation +openapi_client.paths.request_body_post_pattern_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md index a3cac306b51..f2a9a895b6e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.operation +openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_validates_properties_matching_a_regex_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md index 0f895767a86..c1cb6e2eda9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.operation +openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md index b58ccc2cddd..619782460dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.operation +openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md index 9ec78f25a24..2e315a08705 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.operation +openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_prefixitems_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md index fe2c13ee801..bb359e6dd29 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.operation +openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_patternproperties_additionalproperties_interaction_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md index 31c48bd2837..1a7af86448a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.operation +openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_whose_names_are_javascript_object_property_names_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md index 6388a754811..c33401af01e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md index ba4fc208e72..784f554a9c1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.operation +openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md index 9f7590ae649..19ff8c4b1c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation +openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md index 2defea3187e..038ef9ba1df 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_propertynames_validation_request_body.operation +openapi_client.paths.request_body_post_propertynames_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_propertynames_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md index 767647fe464..27a96d856c2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_regex_format_request_body.operation +openapi_client.paths.request_body_post_regex_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_regex_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md index e4723c8a17a..f609721dcbf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.operation +openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md index deebacfd8eb..28fce1aa2da 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_relative_json_pointer_format_request_body.operation +openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_relative_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md index 4f6d15db526..581451091ca 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_default_validation_request_body.operation +openapi_client.paths.request_body_post_required_default_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md index c336468ee30..475ea9e4970 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.operation +openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_properties_whose_names_are_javascript_object_property_names_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md index f3a3d153004..fd4f0dc9d94 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_validation_request_body.operation +openapi_client.paths.request_body_post_required_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md index c4781bc3162..f95b015d763 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_with_empty_array_request_body.operation +openapi_client.paths.request_body_post_required_with_empty_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md index 7e1362ed638..0b376de420b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.operation +openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md index 60a4896e371..adf3fb89928 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_simple_enum_validation_request_body.operation +openapi_client.paths.request_body_post_simple_enum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md index 78dc9f9822e..c880766a093 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_single_dependency_request_body.operation +openapi_client.paths.request_body_post_single_dependency_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_single_dependency_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md index 4ea1d0c6461..a27b9a4faee 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_small_multiple_of_large_integer_request_body.operation +openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_small_multiple_of_large_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md index 492b543d00b..5ce3d79a847 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.operation +openapi_client.paths.request_body_post_string_type_matches_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md index 125127ecc4f..93991afc04a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_time_format_request_body.operation +openapi_client.paths.request_body_post_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md index 31943f6d395..13972430501 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_type_array_object_or_null_request_body.operation +openapi_client.paths.request_body_post_type_array_object_or_null_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_array_object_or_null_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md index 0ea46f10b35..75770bfb373 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_type_array_or_object_request_body.operation +openapi_client.paths.request_body_post_type_array_or_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_array_or_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md index 7cf7dfe2350..3b7922755a0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_type_as_array_with_one_item_request_body.operation +openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_as_array_with_one_item_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md index ee571e20b9d..8e777e67aff 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluateditems_as_schema_request_body.operation +openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_as_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md index 10c00a9d913..a90de5fe557 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.operation +openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_depends_on_multiple_nested_contains_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md index c998bc10a34..ca4a390939d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluateditems_with_items_request_body.operation +openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md index 426bef1eb4c..529d389157c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.operation +openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md index c5083d740c2..9b1d613496d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.operation +openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_not_affected_by_propertynames_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md index 15431df8806..68c8f9c920f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluatedproperties_schema_request_body.operation +openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md index fcb33047594..f078f657eb8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.operation +openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_with_adjacent_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md index b0a938b5e3b..7204d561b4f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.operation +openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md index 73669fb75ba..d1ee6b007ee 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md index 081a042616b..ec2c41b6a69 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_with_an_array_of_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md index 925f59d5229..b5f3e671167 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md index 8502e128274..4e4a4a7ef1e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.operation +openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_with_an_array_of_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md index 2687068ba7e..7942e7fdce2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_format_request_body.operation +openapi_client.paths.request_body_post_uri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md index 223b2dcbd3c..7d973b75c5d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_reference_format_request_body.operation +openapi_client.paths.request_body_post_uri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md index f5978d8234b..01bc53ac0a7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uri_template_format_request_body.operation +openapi_client.paths.request_body_post_uri_template_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md index 16ab62b4cbf..4ab09dd8fc3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_uuid_format_request_body.operation +openapi_client.paths.request_body_post_uuid_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uuid_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md index 5c35d811877..9fb91cee32d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.operation +openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import operation_request_body_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_validate_against_correct_branch_then_vs_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md index a3ae9793aa3..fb65b661a6f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.operation +openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_a_schema_given_for_prefixitems_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_a_schema_given_for_prefixitems_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md index 8eb7d332353..6fdda5c26ab 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additional_items_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additional_items_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md index c6aaa6d278d..e289466a8e5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md index 9e163998999..430be40fd21 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md index 483f8195ef3..78bad17c742 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 68c41553910..ac89ed232ba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md index 98294abccc4..e127a421e65 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_with_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_with_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md index 6c7a89b34d6..ebf5cf32da9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md index f584dc53c73..990466bd57c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md index a1b9080192d..d96ea1ddd7d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_simple_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md index d7e7d3a4a8e..7ba2612b338 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md index 3597c3367fa..a39b1cab145 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md index b9b156178b0..c4135f29add 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md index 73c28674a62..6bbad61793e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md index d6649f6df12..18224e932bf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation +openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md index 5754f3486bb..4d25565193d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md index 0479bfcbd11..a220c16188a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md index 1e04eb186ba..b1b38c81904 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md index d2a63827d64..ef6707997a1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md index 922b0f63795..03c26caf9c9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation +openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md index 7d646f2c845..7fd2b4cd0d8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation +openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md index 317976adab6..8d59ac8e7a5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_int_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_int_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md index 073c6dc750b..44c4051ce48 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_number_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md index a009d75a070..67ff781896f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.operation +openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_small_number_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md index d3dffbff2f7..706dbea0751 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.operation +openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_const_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_const_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md index ae0a8c23a92..6d3a0f55f05 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import contains_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_contains_keyword_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling ContainsApi->post_contains_keyword_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md index 255b55758e3..7fe603ea026 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.operation +openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import contains_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_contains_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling ContainsApi->post_contains_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md index 7f1f68b9241..e898ec07355 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_date_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_date_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_date_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md index 49058625cfd..653fb4b7827 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_time_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md index 7ada09edab5..4becf85f5ea 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md index 485f338e302..4b3f12016a9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.operation +openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md index 134eee0b6b6..f712feb1025 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.operation +openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_single_dependency_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_single_dependency_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md index 439c7809a25..e7a8ed494fc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_duration_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_duration_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_duration_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md index d7d2883ec30..0f426708a7b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_email_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md index b6665ec9e09..8ab287fbecd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_empty_dependents_response_body_for_content_types.operation +openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_empty_dependents_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_empty_dependents_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md index c1a7d25f65c..a08ae332c0c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md index 00e6c65ec28..26b0462d835 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md index d898842c20c..fcfd31865d2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md index 40e4d10b7c4..3d63bb240dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md index 267af222348..41ed5134ab8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md index 1f2bfbd863c..d0eb2167a3e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enums_in_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md index 8eb83207ef4..96a020d528f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import exclusive_maximum_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import exclusive_maximum_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = exclusive_maximum_api.ExclusiveMaximumApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_exclusivemaximum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling ExclusiveMaximumApi->post_exclusivemaximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md index 9fa696f3344..1f10f3ad9cb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_exclusiveminimum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_exclusiveminimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md index b74c8351b31..a6dc2163105 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_float_division_inf_response_body_for_content_types.operation +openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_float_division_inf_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_float_division_inf_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md index 82dc6842ebe..1e79811f4fb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.operation +openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_forbidden_property_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_forbidden_property_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_forbidden_property_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_forbidden_property_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_forbidden_property_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md index 2b2088e4c8e..bdfdc7f0b80 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_hostname_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md index 018e4393714..077927776f1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_idn_email_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_idn_email_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_idn_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md index f4ebb466c62..63d8ce4536b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_idn_hostname_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_idn_hostname_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_idn_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md index f2b43df3795..2ec0bde671b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.operation +openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_and_else_without_then_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_if_and_else_without_then_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md index cfe801e35c9..4ef62d42e35 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.operation +openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_and_then_without_else_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_if_and_then_without_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md index c8cc852f1a8..28c285afdea 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.operation +openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md index 2c01a423f65..d11625ab1f9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_else_without_if_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ignore_else_without_if_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md index 89c0c522356..a6cc97547e8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_if_without_then_or_else_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ignore_if_without_then_or_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md index a9143162e98..1a958fa90e0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_then_without_if_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ignore_then_without_if_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md index 459ba2f745c..d05e57a2dad 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation +openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md index 7fc6454f55f..2f728286e8f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv4_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md index 3dd2b61eb94..ab48c1d93e0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv6_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md index 5980d0bbeba..31c47923848 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_iri_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_iri_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_iri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md index 535cc587e90..7bf9ffbee86 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_iri_reference_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_iri_reference_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_iri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md index 819109227b4..19c34290dfd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_items_contains_response_body_for_content_types.operation +openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import contains_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_contains_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling ContainsApi->post_items_contains_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md index 1e3f52bceba..ecef2d81c25 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.operation +openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md index 60e7bbf2fa3..f95202f013f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.operation +openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_items_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md index a542232206d..8e0cffb98ce 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_json_pointer_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md index 6a592f78f1c..df525c9545e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxcontains_without_contains_is_ignored_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxcontains_without_contains_is_ignored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md index 948197766e9..a6243a3d557 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md index 336adcf37e4..b08a9e8debd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md index dad52273a43..0b62fedf52b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import max_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import max_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = max_items_api.MaxItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MaxItemsApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md index 495413c64b5..5e68f5121dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxlength_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md index 9a8f6c2e437..84ddef7cd2b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md index 2e6666ae343..f672bdded5b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md index d64cb5e9ff7..1090fb9aa3a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.operation +openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_mincontains_without_contains_is_ignored_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_mincontains_without_contains_is_ignored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md index 745fe18490e..0603e799ee9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md index 20d37276e13..7017a4ccb8d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md index 6a5458d8a38..d81f7dbf7c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import min_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md index fe0cb3892e3..1f601c3c18b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minlength_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md index 612471e8abb..e67d9198bc6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minproperties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md index cb17fdadff8..6edcdbb4a0f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.operation +openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_dependents_required_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_multiple_dependents_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md index f9ab10b4ef6..63dc5499b5d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.operation +openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md index 661f305de26..682ec799b08 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.operation +openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md index 5985e6c67bc..8d3fb7c6817 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import all_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md index 7f54ccbdc2a..e72315d6313 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md index 90c7777923e..09737733c1b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md index 7202c7402a5..f1f23fc909d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md index 40416b76e75..be55a7fbdce 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md index 561d39905b1..7c513045e91 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.operation +openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_non_interference_across_combined_schemas_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_non_interference_across_combined_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index 30770bcc8f1..ca6b9048897 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_more_complex_schema_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_more_complex_schema_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md index 3c92e883433..c09045889f4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_not_multiple_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_multiple_types_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_multiple_types_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_multiple_types_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_multiple_types_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_multiple_types_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_multiple_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_not_multiple_types_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_not_multiple_types_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index c514091bf50..196053c31d2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -1,9 +1,9 @@ -unit_test_api.paths.response_body_post_not_response_body_for_content_types.operation +openapi_client.paths.response_body_post_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | +| post_not_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | | post_not_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -66,7 +66,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Servers @@ -83,27 +83,27 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import _not_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = _not_api._NotApi(api_client) + api_instance = not_api.NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling _NotApi->post_not_response_body_for_content_types: %s\n" % e) + except openapi_client.ApiException as e: + print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to _NotApi API]](../../apis/tags/_not_api.md) +[[Back to NotApi API]](../../apis/tags/not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md index ba78ba3a0ce..befa85299f4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**_not._Not**](../../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**not.Not**](../../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md index da408d48628..bdca38022d7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation +openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md index 514eb011d87..0213a95753e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation +openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md index e8a62a6907a..8f9e9d2d022 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation +openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md index dc96db4b68a..4da104ffce1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_properties_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md index 7fb8227199e..237d8b8c6d1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation +openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md index 54f06b3c861..13489926ec6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md index a2c09ed9b23..1aad7256e20 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md index 98711704aae..6e3e8fea039 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md index 30949ce3603..1b901d28a88 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md index 970824d1bac..de480445596 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation +openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import one_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_required_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md index 99d71b0c156..dbb461e55c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation +openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md index c5eee572391..9cae904155a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md index 6ac02ace7c5..480623f98dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.operation +openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 91458defe8a..832be86bde3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md index a92fc23efef..3a2eff80112 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md index 856d9af61af..4c55bf4b0c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.operation +openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_prefixitems_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_prefixitems_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md index 45ecc6e1a24..ab7784bd6f0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.operation +openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md index a8bb989b3ea..04c3f97bace 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation +openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md index 710926fc921..203ba4f0fcb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md index efaf213d821..15add33cb30 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md index 060ebe57b3b..4fd53eb670a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation +openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md index 2d32bfa90b4..0f44580ed27 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_propertynames_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_propertynames_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_propertynames_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md index a9b8453459e..176a720cbf8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_regex_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_regex_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_regex_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md index 4b3dcfa6e86..fcc2c16119f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.operation +openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import pattern_properties_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PatternPropertiesApi->post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md index 87a68251d32..4e40f3eb54c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_relative_json_pointer_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_relative_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md index 1a6a0d020ff..bc6b9cfa57a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_default_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md index 7312c752185..f301c3282a5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md index 7020c09630e..b4c75ed19e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md index 6f7a17013d1..4bfa6fd5dd5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md index bf3a00d159b..3c2ad9e894c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation +openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md index 678e01025d4..5d4e8aee549 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md index 6d6a211c4ef..8c2aa9b9d7c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_single_dependency_response_body_for_content_types.operation +openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import dependent_required_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_single_dependency_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DependentRequiredApi->post_single_dependency_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md index 56f4dc635bc..f9e61a6873f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.operation +openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import multiple_of_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_small_multiple_of_large_integer_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling MultipleOfApi->post_small_multiple_of_large_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md index 32f68007c75..9ad2f91cd0b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation +openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md index d6c35534716..8f79372a726 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_time_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_time_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md index 3b5d7b525cd..e3b7b2d253d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.operation +openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_array_object_or_null_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_type_array_object_or_null_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md index 022ab6d91e2..b12f9ba9ec9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_type_array_or_object_response_body_for_content_types.operation +openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_array_or_object_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_type_array_or_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md index dadedcc48b0..95ea7fb491a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.operation +openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_as_array_with_one_item_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_type_as_array_with_one_item_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md index 23d85aba249..245f7eacb3c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_as_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_as_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md index d510a55f0c3..da4ceb7d7b4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md index 1e428f2eb0e..2586dabe5f2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_with_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md index 2667afffe8b..07aa21828e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import unevaluated_items_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md index e3edd145129..c6d93c75716 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md index 4046920e2e4..45e026e54f2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_schema_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md index a1c2e19810c..1881c6ccccf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 8a6c678b953..9032e6c9550 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md index cc4471e9a4e..efe4eea9c81 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md index ba4a54c34c4..89847f2cd3f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md index 6ae609762a4..e2e2c842646 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md index 492e171bcd6..ba9bd856b36 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_with_an_array_of_items_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_with_an_array_of_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md index 3f4342d4f04..72feb4c48a7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md index 551d3b9d88a..35e998167c1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_reference_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md index 7e704ec48a4..e51c8aedfa4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_template_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md index ba068a34552..437025cadb5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_uuid_format_response_body_for_content_types.operation +openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uuid_format_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_uuid_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md index 0b2cefec130..1db57364203 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -unit_test_api.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.operation +openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import unit_test_api -from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import path_post_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with unit_test_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_validate_against_correct_branch_then_vs_else_response_body_for_content_types() pprint(api_response) - except unit_test_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PathPostApi->post_validate_against_correct_branch_then_vs_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md b/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md index b37c67353d5..7055662bd76 100644 --- a/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md +++ b/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -unit_test_api.servers.server_0 +openapi_client.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/3_1_0_unit_test/python/pyproject.toml b/samples/client/3_1_0_unit_test/python/pyproject.toml index a09122de22d..62fd25e9f49 100644 --- a/samples/client/3_1_0_unit_test/python/pyproject.toml +++ b/samples/client/3_1_0_unit_test/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "unit_test_api" = ["py.typed"] [project] -name = "unit-test-api" +name = "openapi-client" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py new file mode 100644 index 00000000000..efb64434f1b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +# flake8: noqa + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +__version__ = "1.0.0" + +# import ApiClient +from unit_test_api.api_client import ApiClient + +# import Configuration +from unit_test_api.configurations.api_configuration import ApiConfiguration + +# import exceptions +from unit_test_api.exceptions import OpenApiException +from unit_test_api.exceptions import ApiAttributeError +from unit_test_api.exceptions import ApiTypeError +from unit_test_api.exceptions import ApiValueError +from unit_test_api.exceptions import ApiKeyError +from unit_test_api.exceptions import ApiException diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py new file mode 100644 index 00000000000..1eb81cb10b3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py @@ -0,0 +1,1402 @@ +# coding: utf-8 +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import datetime +import dataclasses +import decimal +import enum +import email +import json +import os +import io +import atexit +from multiprocessing import pool +import re +import tempfile +import typing +import typing_extensions +from urllib import parse +import urllib3 +from urllib3 import _collections, fields + + +from unit_test_api import exceptions, rest, schemas, security_schemes, api_response +from unit_test_api.configurations import api_configuration, schema_configuration as schema_configuration_ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj: typing.Any): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return obj + elif isinstance(obj, bool): + # must be before int check + return obj + elif isinstance(obj, int): + return obj + elif obj is None: + return None + elif isinstance(obj, (dict, schemas.immutabledict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +@dataclasses.dataclass +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + prefix: str + separator: str + first: bool = True + item_separator: str = dataclasses.field(init=False) + + def __post_init__(self): + self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return parse.quote(str(in_data)) + return str(in_data) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + @classmethod + def _serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + @classmethod + def _deserialize_simple( + cls, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +class Encoding: + content_type: str + headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None + style: typing.Optional[ParameterStyle] = None + explode: bool = False + allow_reserved: bool = False + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[schemas.Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +class ParameterBase(JSONDetector): + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[schemas.Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] + + _json_encoder = JSONEncoder() + + def __init_subclass__(cls, **kwargs): + if cls.explode is None: + if cls.style is ParameterStyle.FORM: + cls.explode = True + else: + cls.explode = False + + @classmethod + def _serialize_json( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=cls._json_encoder.compact_separators) + return json.dumps(in_data) + +_SERIALIZE_TYPES = typing.Union[ + int, + float, + str, + datetime.date, + datetime.datetime, + None, + bool, + list, + tuple, + dict, + schemas.immutabledict +] + +_JSON_TYPES = typing.Union[ + int, + float, + str, + None, + bool, + typing.Tuple['_JSON_TYPES', ...], + schemas.immutabledict[str, '_JSON_TYPES'], +] + +@dataclasses.dataclass +class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.PATH + style: ParameterStyle = ParameterStyle.SIMPLE + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_label( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_matrix( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = cls._serialize_simple( + in_data=in_data, + name=cls.name, + explode=cls.explode, + percent_encode=True + ) + return cls._to_dict(cls.name, value) + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if cls.style: + if cls.style is ParameterStyle.SIMPLE: + return cls.__serialize_simple(cast_in_data) + elif cls.style is ParameterStyle.LABEL: + return cls.__serialize_label(cast_in_data) + elif cls.style is ParameterStyle.MATRIX: + return cls.__serialize_matrix(cast_in_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class QueryParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.QUERY + style: ParameterStyle = ParameterStyle.FORM + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_space_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_pipe_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._serialize_form( + in_data, + name=cls.name, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: + if cls.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + raise ValueError(f'No iterator possible for style={cls.style}') + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if cls.style: + # TODO update query ones to omit setting values when [] {} or None is input + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + if cls.style is ParameterStyle.FORM: + return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) + return cls._to_dict( + cls.name, + next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) + ) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class CookieParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.FORM + in_type: ParameterInType = ParameterInType.COOKIE + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if cls.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + value = cls._serialize_form( + cast_in_data, + explode=explode, + name=cls.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return cls._to_dict(cls.name, value) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): + style: ParameterStyle = ParameterStyle.SIMPLE + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + explode: bool = False + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = _collections.HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + @classmethod + def serialize_with_name( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + value = cls._serialize_simple(cast_in_data, name, cls.explode, False) + return cls.__to_headers(((name, value),)) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls.__to_headers(((name, value),)) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + @classmethod + def deserialize( + cls, + in_data: str, + name: str + ): + if cls.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) + return cls.schema.validate_base(extracted_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + if cls._content_type_is_json(content_type): + cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) + assert media_type.schema is not None + return media_type.schema.validate_base(cast_in_data) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class HeaderParameterWithoutName(__HeaderParameterBase): + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + name, + skip_validation=skip_validation + ) + + +class HeaderParameter(__HeaderParameterBase): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + cls.name, + skip_validation=skip_validation + ) + +T = typing.TypeVar("T", bound=api_response.ApiResponse) + + +class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None + headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None + + @classmethod + @abc.abstractmethod + def get_response(cls, response, headers, body) -> T: ... + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = parse.urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + + @classmethod + def __deserialize_application_octet_stream( + cls, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or cls.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as write_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + write_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + @classmethod + def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: + content_type = response.headers.get('content-type') + deserialized_body = schemas.unset + streamed = response.supports_chunked_reads() + + deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset + if cls.headers is not None and cls.headers_schema is not None: + deserialized_headers = {} + for header_name, header_param in cls.headers.items(): + header_value = response.headers.get(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value + deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) + + if cls.content is not None: + if content_type not in cls.content: + raise exceptions.ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" + ) + body_schema = cls.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return cls.get_response( + response=response, + headers=deserialized_headers, + body=schemas.unset + ) + + if cls._content_type_is_json(content_type): + body_data = cls.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = cls.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = cls.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + elif content_type == 'application/x-pem-file': + body_data = response.data.decode() + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = schemas.get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema.validate_base(body_data) + else: + deserialized_body = body_schema.validate_base( + body_data, configuration=configuration) + elif streamed: + response.release_conn() + + return cls.get_response( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +@dataclasses.dataclass +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param configuration: api_configuration.ApiConfiguration object for this client + :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client + :param default_headers: any default headers to include when making calls to the API. + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + configuration: api_configuration.ApiConfiguration = dataclasses.field( + default_factory=lambda: api_configuration.ApiConfiguration()) + schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( + default_factory=lambda: schema_configuration_.SchemaConfiguration()) + default_headers: _collections.HTTPHeaderDict = dataclasses.field( + default_factory=lambda: _collections.HTTPHeaderDict()) + pool_threads: int = 1 + user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' + rest_client: rest.RESTClientObject = dataclasses.field(init=False) + + def __post_init__(self): + self._pool = None + self.rest_client = rest.RESTClientObject(self.configuration) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = pool.ThreadPool(self.pool_threads) + return self._pool + + def set_default_header(self, header_name: str, header_value: str): + self.default_headers[header_name] = header_value + + def call_api( + self, + resource_path: str, + method: str, + host: str, + query_params_suffix: typing.Optional[str] = None, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + body: typing.Union[str, bytes, None] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data` + :param security_requirement_object: The security requirement object, used to apply auth when making the call + :param async_req: execute request asynchronously + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the schemas.BinarySchema + instance will also inherit from FileSchema and schemas.FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + the method will return the response directly. + """ + # header parameters + used_headers = _collections.HTTPHeaderDict(self.default_headers) + user_agent_key = 'User-Agent' + if user_agent_key not in used_headers and self.user_agent: + used_headers[user_agent_key] = self.user_agent + + # auth setting + self.update_params_for_auth( + used_headers, + security_requirement_object, + resource_path, + method, + body, + query_params_suffix + ) + + # must happen after auth setting in case user is overriding those + if headers: + used_headers.update(headers) + + # request url + url = host + resource_path + if query_params_suffix: + url += query_params_suffix + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def request( + self, + method: str, + url: str, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + body: typing.Union[str, bytes, None] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "get": + return self.rest_client.get(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "head": + return self.rest_client.head(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "options": + return self.rest_client.options(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "post": + return self.rest_client.post(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "put": + return self.rest_client.put(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "patch": + return self.rest_client.patch(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "delete": + return self.rest_client.delete(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise exceptions.ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth( + self, + headers: _collections.HTTPHeaderDict, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], + resource_path: str, + method: str, + body: typing.Union[str, bytes, None] = None, + query_params_suffix: typing.Optional[str] = None + ): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param security_requirement_object: the openapi security requirement object + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + return + +@dataclasses.dataclass +class Api: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) + + @staticmethod + def _get_used_path( + used_path: str, + path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), + path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), + query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + skip_validation: bool = False + ) -> typing.Tuple[str, str]: + used_path_params = {} + if path_params is not None: + for path_parameter in path_parameters: + parameter_data = path_params.get(path_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) + used_path_params.update(serialized_data) + + for k, v in used_path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + query_params_suffix = "" + if query_params is not None: + prefix_separator_iterator = None + for query_parameter in query_parameters: + parameter_data = query_params.get(query_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = query_parameter.serialize( + parameter_data, + prefix_separator_iterator=prefix_separator_iterator, + skip_validation=skip_validation + ) + for serialized_value in serialized_data.values(): + query_params_suffix += serialized_value + return used_path, query_params_suffix + + @staticmethod + def _get_headers( + header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), + header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + accept_content_types: typing.Tuple[str, ...] = (), + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + headers = _collections.HTTPHeaderDict() + if header_params is not None: + for parameter in header_parameters: + parameter_data = header_params.get(parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) + headers.extend(serialized_data) + if accept_content_types: + for accept_content_type in accept_content_types: + headers.add('Accept', accept_content_type) + return headers + + def _get_fields_and_body( + self, + request_body: typing.Type[RequestBody], + body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], + content_type: str, + headers: _collections.HTTPHeaderDict + ): + if request_body.required and body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + + if isinstance(body, schemas.Unset): + return None, None + + serialized_fields = None + serialized_body = None + serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) + headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + serialized_fields = serialized_data['fields'] + elif 'body' in serialized_data: + serialized_body = serialized_data['body'] + return serialized_fields, serialized_body + + @staticmethod + def _verify_response_status(response: api_response.ApiResponse): + if not 200 <= response.response.status <= 399: + raise exceptions.ApiException( + status=response.response.status, + reason=response.response.reason, + api_response=response + ) + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[rest.RequestField, ...] + + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType schemas.Schema info + """ + __json_encoder = JSONEncoder() + __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} + content: typing.Dict[str, typing.Type[MediaType]] + required: bool = False + + @classmethod + def __serialize_json( + cls, + in_data: _JSON_TYPES + ) -> SerializedRequestBody: + in_data = cls.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return {'body': json_str} + + @staticmethod + def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: + return {'body': str(in_data)} + + @classmethod + def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: + json_value = cls.__json_encoder.default(value) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + @classmethod + def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: + if isinstance(value, str): + request_field = rest.RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = rest.RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, schemas.FileIO): + # TODO use content.encoding to limit allowed content types if they are present + urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, urllib3_request_field) + value.close() + else: + request_field = cls.__multipart_json_item(key=key, value=value) + return request_field + + @classmethod + def __serialize_multipart_form_data( + cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] + ) -> SerializedRequestBody: + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a rest.RequestField for each item with name=key + for item in value: + request_field = cls.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore + fields.append(request_field) + else: + request_field = cls.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return {'fields': tuple(fields)} + + @staticmethod + def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: + if isinstance(in_data, bytes): + return {'body': in_data} + # schemas.FileIO type + used_in_data = in_data.read() + in_data.close() + return {'body': used_in_data} + + @classmethod + def __serialize_application_x_www_form_data( + cls, in_data: schemas.immutabledict[str, _JSON_TYPES] + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + cast_in_data = cls.__json_encoder.default(in_data) + value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return {'body': value} + + @classmethod + def serialize( + cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = cls.content[content_type] + assert media_type.schema is not None + schema = schemas.get_class(media_type.schema) + used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() + cast_in_data = schema.validate_base(in_data, configuration=used_configuration) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if cls._content_type_is_json(content_type): + if isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") + return cls.__serialize_json(cast_in_data) + elif content_type in cls.__plain_txt_content_types: + if not isinstance(cast_in_data, (int, float, str)): + raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") + return cls.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") + return cls.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError( + f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") + return cls.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + if not isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") + return cls.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py new file mode 100644 index 00000000000..52f0a194438 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py @@ -0,0 +1,28 @@ +# coding: utf-8 +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +import urllib3 + +from unit_test_api import schemas + + +@dataclasses.dataclass(frozen=True) +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] + headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] + + +@dataclasses.dataclass(frozen=True) +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py new file mode 100644 index 00000000000..7840f7726f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py new file mode 100644 index 00000000000..d94ba41150a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py @@ -0,0 +1,872 @@ +import typing +import typing_extensions + +from openapi_client.apis.paths.request_body_post_a_schema_given_for_prefixitems_request_body import RequestBodyPostASchemaGivenForPrefixitemsRequestBody +from openapi_client.apis.paths.request_body_post_additional_items_are_allowed_by_default_request_body import RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body import RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.apis.paths.request_body_post_additionalproperties_with_schema_request_body import RequestBodyPostAdditionalpropertiesWithSchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody +from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody +from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody +from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody +from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody +from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody +from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody +from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody +from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody +from openapi_client.apis.paths.request_body_post_const_nul_characters_in_strings_request_body import RequestBodyPostConstNulCharactersInStringsRequestBody +from openapi_client.apis.paths.request_body_post_contains_keyword_validation_request_body import RequestBodyPostContainsKeywordValidationRequestBody +from openapi_client.apis.paths.request_body_post_contains_with_null_instance_elements_request_body import RequestBodyPostContainsWithNullInstanceElementsRequestBody +from openapi_client.apis.paths.request_body_post_date_format_request_body import RequestBodyPostDateFormatRequestBody +from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody +from openapi_client.apis.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body import RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body import RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody +from openapi_client.apis.paths.request_body_post_dependent_schemas_single_dependency_request_body import RequestBodyPostDependentSchemasSingleDependencyRequestBody +from openapi_client.apis.paths.request_body_post_duration_format_request_body import RequestBodyPostDurationFormatRequestBody +from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody +from openapi_client.apis.paths.request_body_post_empty_dependents_request_body import RequestBodyPostEmptyDependentsRequestBody +from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody +from openapi_client.apis.paths.request_body_post_exclusivemaximum_validation_request_body import RequestBodyPostExclusivemaximumValidationRequestBody +from openapi_client.apis.paths.request_body_post_exclusiveminimum_validation_request_body import RequestBodyPostExclusiveminimumValidationRequestBody +from openapi_client.apis.paths.request_body_post_float_division_inf_request_body import RequestBodyPostFloatDivisionInfRequestBody +from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody +from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody +from openapi_client.apis.paths.request_body_post_idn_email_format_request_body import RequestBodyPostIdnEmailFormatRequestBody +from openapi_client.apis.paths.request_body_post_idn_hostname_format_request_body import RequestBodyPostIdnHostnameFormatRequestBody +from openapi_client.apis.paths.request_body_post_if_and_else_without_then_request_body import RequestBodyPostIfAndElseWithoutThenRequestBody +from openapi_client.apis.paths.request_body_post_if_and_then_without_else_request_body import RequestBodyPostIfAndThenWithoutElseRequestBody +from openapi_client.apis.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body import RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody +from openapi_client.apis.paths.request_body_post_ignore_else_without_if_request_body import RequestBodyPostIgnoreElseWithoutIfRequestBody +from openapi_client.apis.paths.request_body_post_ignore_if_without_then_or_else_request_body import RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody +from openapi_client.apis.paths.request_body_post_ignore_then_without_if_request_body import RequestBodyPostIgnoreThenWithoutIfRequestBody +from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody +from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody +from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody +from openapi_client.apis.paths.request_body_post_iri_format_request_body import RequestBodyPostIriFormatRequestBody +from openapi_client.apis.paths.request_body_post_iri_reference_format_request_body import RequestBodyPostIriReferenceFormatRequestBody +from openapi_client.apis.paths.request_body_post_items_contains_request_body import RequestBodyPostItemsContainsRequestBody +from openapi_client.apis.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body import RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody +from openapi_client.apis.paths.request_body_post_items_with_null_instance_elements_request_body import RequestBodyPostItemsWithNullInstanceElementsRequestBody +from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody +from openapi_client.apis.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body import RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody +from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody +from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_mincontains_without_contains_is_ignored_request_body import RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody +from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody +from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_multiple_dependents_required_request_body import RequestBodyPostMultipleDependentsRequiredRequestBody +from openapi_client.apis.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body import RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody +from openapi_client.apis.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body import RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody +from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody +from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.apis.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body import RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody +from openapi_client.apis.paths.request_body_post_non_interference_across_combined_schemas_request_body import RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody +from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody +from openapi_client.apis.paths.request_body_post_not_multiple_types_request_body import RequestBodyPostNotMultipleTypesRequestBody +from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody +from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody +from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody +from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody +from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody +from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody +from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody +from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody +from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody +from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody +from openapi_client.apis.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body import RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody +from openapi_client.apis.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body import RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.apis.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body import RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody +from openapi_client.apis.paths.request_body_post_prefixitems_with_null_instance_elements_request_body import RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody +from openapi_client.apis.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body import RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody +from openapi_client.apis.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_properties_with_null_valued_instance_properties_request_body import RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.apis.paths.request_body_post_propertynames_validation_request_body import RequestBodyPostPropertynamesValidationRequestBody +from openapi_client.apis.paths.request_body_post_regex_format_request_body import RequestBodyPostRegexFormatRequestBody +from openapi_client.apis.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body import RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody +from openapi_client.apis.paths.request_body_post_relative_json_pointer_format_request_body import RequestBodyPostRelativeJsonPointerFormatRequestBody +from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody +from openapi_client.apis.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody +from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody +from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody +from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody +from openapi_client.apis.paths.request_body_post_single_dependency_request_body import RequestBodyPostSingleDependencyRequestBody +from openapi_client.apis.paths.request_body_post_small_multiple_of_large_integer_request_body import RequestBodyPostSmallMultipleOfLargeIntegerRequestBody +from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody +from openapi_client.apis.paths.request_body_post_time_format_request_body import RequestBodyPostTimeFormatRequestBody +from openapi_client.apis.paths.request_body_post_type_array_object_or_null_request_body import RequestBodyPostTypeArrayObjectOrNullRequestBody +from openapi_client.apis.paths.request_body_post_type_array_or_object_request_body import RequestBodyPostTypeArrayOrObjectRequestBody +from openapi_client.apis.paths.request_body_post_type_as_array_with_one_item_request_body import RequestBodyPostTypeAsArrayWithOneItemRequestBody +from openapi_client.apis.paths.request_body_post_unevaluateditems_as_schema_request_body import RequestBodyPostUnevaluateditemsAsSchemaRequestBody +from openapi_client.apis.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body import RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody +from openapi_client.apis.paths.request_body_post_unevaluateditems_with_items_request_body import RequestBodyPostUnevaluateditemsWithItemsRequestBody +from openapi_client.apis.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body import RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody +from openapi_client.apis.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body import RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody +from openapi_client.apis.paths.request_body_post_unevaluatedproperties_schema_request_body import RequestBodyPostUnevaluatedpropertiesSchemaRequestBody +from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body import RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody +from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body import RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody +from openapi_client.apis.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody +from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody +from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody +from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody +from openapi_client.apis.paths.request_body_post_uuid_format_request_body import RequestBodyPostUuidFormatRequestBody +from openapi_client.apis.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body import RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody +from openapi_client.apis.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types import ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_contains_keyword_validation_response_body_for_content_types import ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_date_format_response_body_for_content_types import ResponseBodyPostDateFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types import ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types import ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types import ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_duration_format_response_body_for_content_types import ResponseBodyPostDurationFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_empty_dependents_response_body_for_content_types import ResponseBodyPostEmptyDependentsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types import ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types import ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_float_division_inf_response_body_for_content_types import ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_idn_email_format_response_body_for_content_types import ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_idn_hostname_format_response_body_for_content_types import ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_if_and_else_without_then_response_body_for_content_types import ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_if_and_then_without_else_response_body_for_content_types import ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types import ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ignore_else_without_if_response_body_for_content_types import ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types import ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ignore_then_without_if_response_body_for_content_types import ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_iri_format_response_body_for_content_types import ResponseBodyPostIriFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_iri_reference_format_response_body_for_content_types import ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_items_contains_response_body_for_content_types import ResponseBodyPostItemsContainsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types import ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_multiple_dependents_required_response_body_for_content_types import ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types import ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types import ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types import ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types import ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_not_multiple_types_response_body_for_content_types import ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types import ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types import ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types import ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_propertynames_validation_response_body_for_content_types import ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_regex_format_response_body_for_content_types import ResponseBodyPostRegexFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types import ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types import ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_single_dependency_response_body_for_content_types import ResponseBodyPostSingleDependencyResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types import ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_time_format_response_body_for_content_types import ResponseBodyPostTimeFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_type_array_object_or_null_response_body_for_content_types import ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_type_array_or_object_response_body_for_content_types import ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types import ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types import ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types import ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_uuid_format_response_body_for_content_types import ResponseBodyPostUuidFormatResponseBodyForContentTypes +from openapi_client.apis.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types import ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes + +PathToApi = typing.TypedDict( + 'PathToApi', + { + "/requestBody/postASchemaGivenForPrefixitemsRequestBody": typing.Type[RequestBodyPostASchemaGivenForPrefixitemsRequestBody], + "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody], + "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody], + "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody], + "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody], + "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody], + "/requestBody/postAdditionalpropertiesWithSchemaRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesWithSchemaRequestBody], + "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": typing.Type[RequestBodyPostAllofCombinedWithAnyofOneofRequestBody], + "/requestBody/postAllofRequestBody": typing.Type[RequestBodyPostAllofRequestBody], + "/requestBody/postAllofSimpleTypesRequestBody": typing.Type[RequestBodyPostAllofSimpleTypesRequestBody], + "/requestBody/postAllofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAllofWithBaseSchemaRequestBody], + "/requestBody/postAllofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithOneEmptySchemaRequestBody], + "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody], + "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheLastEmptySchemaRequestBody], + "/requestBody/postAllofWithTwoEmptySchemasRequestBody": typing.Type[RequestBodyPostAllofWithTwoEmptySchemasRequestBody], + "/requestBody/postAnyofComplexTypesRequestBody": typing.Type[RequestBodyPostAnyofComplexTypesRequestBody], + "/requestBody/postAnyofRequestBody": typing.Type[RequestBodyPostAnyofRequestBody], + "/requestBody/postAnyofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAnyofWithBaseSchemaRequestBody], + "/requestBody/postAnyofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAnyofWithOneEmptySchemaRequestBody], + "/requestBody/postArrayTypeMatchesArraysRequestBody": typing.Type[RequestBodyPostArrayTypeMatchesArraysRequestBody], + "/requestBody/postBooleanTypeMatchesBooleansRequestBody": typing.Type[RequestBodyPostBooleanTypeMatchesBooleansRequestBody], + "/requestBody/postByIntRequestBody": typing.Type[RequestBodyPostByIntRequestBody], + "/requestBody/postByNumberRequestBody": typing.Type[RequestBodyPostByNumberRequestBody], + "/requestBody/postBySmallNumberRequestBody": typing.Type[RequestBodyPostBySmallNumberRequestBody], + "/requestBody/postConstNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostConstNulCharactersInStringsRequestBody], + "/requestBody/postContainsKeywordValidationRequestBody": typing.Type[RequestBodyPostContainsKeywordValidationRequestBody], + "/requestBody/postContainsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostContainsWithNullInstanceElementsRequestBody], + "/requestBody/postDateFormatRequestBody": typing.Type[RequestBodyPostDateFormatRequestBody], + "/requestBody/postDateTimeFormatRequestBody": typing.Type[RequestBodyPostDateTimeFormatRequestBody], + "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody], + "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody": typing.Type[RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody], + "/requestBody/postDependentSchemasSingleDependencyRequestBody": typing.Type[RequestBodyPostDependentSchemasSingleDependencyRequestBody], + "/requestBody/postDurationFormatRequestBody": typing.Type[RequestBodyPostDurationFormatRequestBody], + "/requestBody/postEmailFormatRequestBody": typing.Type[RequestBodyPostEmailFormatRequestBody], + "/requestBody/postEmptyDependentsRequestBody": typing.Type[RequestBodyPostEmptyDependentsRequestBody], + "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": typing.Type[RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody], + "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": typing.Type[RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody], + "/requestBody/postEnumWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostEnumWithEscapedCharactersRequestBody], + "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": typing.Type[RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody], + "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": typing.Type[RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody], + "/requestBody/postEnumsInPropertiesRequestBody": typing.Type[RequestBodyPostEnumsInPropertiesRequestBody], + "/requestBody/postExclusivemaximumValidationRequestBody": typing.Type[RequestBodyPostExclusivemaximumValidationRequestBody], + "/requestBody/postExclusiveminimumValidationRequestBody": typing.Type[RequestBodyPostExclusiveminimumValidationRequestBody], + "/requestBody/postFloatDivisionInfRequestBody": typing.Type[RequestBodyPostFloatDivisionInfRequestBody], + "/requestBody/postForbiddenPropertyRequestBody": typing.Type[RequestBodyPostForbiddenPropertyRequestBody], + "/requestBody/postHostnameFormatRequestBody": typing.Type[RequestBodyPostHostnameFormatRequestBody], + "/requestBody/postIdnEmailFormatRequestBody": typing.Type[RequestBodyPostIdnEmailFormatRequestBody], + "/requestBody/postIdnHostnameFormatRequestBody": typing.Type[RequestBodyPostIdnHostnameFormatRequestBody], + "/requestBody/postIfAndElseWithoutThenRequestBody": typing.Type[RequestBodyPostIfAndElseWithoutThenRequestBody], + "/requestBody/postIfAndThenWithoutElseRequestBody": typing.Type[RequestBodyPostIfAndThenWithoutElseRequestBody], + "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody": typing.Type[RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody], + "/requestBody/postIgnoreElseWithoutIfRequestBody": typing.Type[RequestBodyPostIgnoreElseWithoutIfRequestBody], + "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody": typing.Type[RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody], + "/requestBody/postIgnoreThenWithoutIfRequestBody": typing.Type[RequestBodyPostIgnoreThenWithoutIfRequestBody], + "/requestBody/postIntegerTypeMatchesIntegersRequestBody": typing.Type[RequestBodyPostIntegerTypeMatchesIntegersRequestBody], + "/requestBody/postIpv4FormatRequestBody": typing.Type[RequestBodyPostIpv4FormatRequestBody], + "/requestBody/postIpv6FormatRequestBody": typing.Type[RequestBodyPostIpv6FormatRequestBody], + "/requestBody/postIriFormatRequestBody": typing.Type[RequestBodyPostIriFormatRequestBody], + "/requestBody/postIriReferenceFormatRequestBody": typing.Type[RequestBodyPostIriReferenceFormatRequestBody], + "/requestBody/postItemsContainsRequestBody": typing.Type[RequestBodyPostItemsContainsRequestBody], + "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody": typing.Type[RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody], + "/requestBody/postItemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostItemsWithNullInstanceElementsRequestBody], + "/requestBody/postJsonPointerFormatRequestBody": typing.Type[RequestBodyPostJsonPointerFormatRequestBody], + "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody": typing.Type[RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody], + "/requestBody/postMaximumValidationRequestBody": typing.Type[RequestBodyPostMaximumValidationRequestBody], + "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": typing.Type[RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody], + "/requestBody/postMaxitemsValidationRequestBody": typing.Type[RequestBodyPostMaxitemsValidationRequestBody], + "/requestBody/postMaxlengthValidationRequestBody": typing.Type[RequestBodyPostMaxlengthValidationRequestBody], + "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": typing.Type[RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody], + "/requestBody/postMaxpropertiesValidationRequestBody": typing.Type[RequestBodyPostMaxpropertiesValidationRequestBody], + "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody": typing.Type[RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody], + "/requestBody/postMinimumValidationRequestBody": typing.Type[RequestBodyPostMinimumValidationRequestBody], + "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": typing.Type[RequestBodyPostMinimumValidationWithSignedIntegerRequestBody], + "/requestBody/postMinitemsValidationRequestBody": typing.Type[RequestBodyPostMinitemsValidationRequestBody], + "/requestBody/postMinlengthValidationRequestBody": typing.Type[RequestBodyPostMinlengthValidationRequestBody], + "/requestBody/postMinpropertiesValidationRequestBody": typing.Type[RequestBodyPostMinpropertiesValidationRequestBody], + "/requestBody/postMultipleDependentsRequiredRequestBody": typing.Type[RequestBodyPostMultipleDependentsRequiredRequestBody], + "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody": typing.Type[RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody], + "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody": typing.Type[RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody], + "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody], + "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody], + "/requestBody/postNestedItemsRequestBody": typing.Type[RequestBodyPostNestedItemsRequestBody], + "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody], + "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody], + "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody": typing.Type[RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody], + "/requestBody/postNotMoreComplexSchemaRequestBody": typing.Type[RequestBodyPostNotMoreComplexSchemaRequestBody], + "/requestBody/postNotMultipleTypesRequestBody": typing.Type[RequestBodyPostNotMultipleTypesRequestBody], + "/requestBody/postNotRequestBody": typing.Type[RequestBodyPostNotRequestBody], + "/requestBody/postNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostNulCharactersInStringsRequestBody], + "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": typing.Type[RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody], + "/requestBody/postNumberTypeMatchesNumbersRequestBody": typing.Type[RequestBodyPostNumberTypeMatchesNumbersRequestBody], + "/requestBody/postObjectPropertiesValidationRequestBody": typing.Type[RequestBodyPostObjectPropertiesValidationRequestBody], + "/requestBody/postObjectTypeMatchesObjectsRequestBody": typing.Type[RequestBodyPostObjectTypeMatchesObjectsRequestBody], + "/requestBody/postOneofComplexTypesRequestBody": typing.Type[RequestBodyPostOneofComplexTypesRequestBody], + "/requestBody/postOneofRequestBody": typing.Type[RequestBodyPostOneofRequestBody], + "/requestBody/postOneofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostOneofWithBaseSchemaRequestBody], + "/requestBody/postOneofWithEmptySchemaRequestBody": typing.Type[RequestBodyPostOneofWithEmptySchemaRequestBody], + "/requestBody/postOneofWithRequiredRequestBody": typing.Type[RequestBodyPostOneofWithRequiredRequestBody], + "/requestBody/postPatternIsNotAnchoredRequestBody": typing.Type[RequestBodyPostPatternIsNotAnchoredRequestBody], + "/requestBody/postPatternValidationRequestBody": typing.Type[RequestBodyPostPatternValidationRequestBody], + "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody": typing.Type[RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody], + "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody], + "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody": typing.Type[RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody], + "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody], + "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody": typing.Type[RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody], + "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": typing.Type[RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody], + "/requestBody/postPropertiesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostPropertiesWithEscapedCharactersRequestBody], + "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody], + "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": typing.Type[RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody], + "/requestBody/postPropertynamesValidationRequestBody": typing.Type[RequestBodyPostPropertynamesValidationRequestBody], + "/requestBody/postRegexFormatRequestBody": typing.Type[RequestBodyPostRegexFormatRequestBody], + "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody": typing.Type[RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody], + "/requestBody/postRelativeJsonPointerFormatRequestBody": typing.Type[RequestBodyPostRelativeJsonPointerFormatRequestBody], + "/requestBody/postRequiredDefaultValidationRequestBody": typing.Type[RequestBodyPostRequiredDefaultValidationRequestBody], + "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": typing.Type[RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody], + "/requestBody/postRequiredValidationRequestBody": typing.Type[RequestBodyPostRequiredValidationRequestBody], + "/requestBody/postRequiredWithEmptyArrayRequestBody": typing.Type[RequestBodyPostRequiredWithEmptyArrayRequestBody], + "/requestBody/postRequiredWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostRequiredWithEscapedCharactersRequestBody], + "/requestBody/postSimpleEnumValidationRequestBody": typing.Type[RequestBodyPostSimpleEnumValidationRequestBody], + "/requestBody/postSingleDependencyRequestBody": typing.Type[RequestBodyPostSingleDependencyRequestBody], + "/requestBody/postSmallMultipleOfLargeIntegerRequestBody": typing.Type[RequestBodyPostSmallMultipleOfLargeIntegerRequestBody], + "/requestBody/postStringTypeMatchesStringsRequestBody": typing.Type[RequestBodyPostStringTypeMatchesStringsRequestBody], + "/requestBody/postTimeFormatRequestBody": typing.Type[RequestBodyPostTimeFormatRequestBody], + "/requestBody/postTypeArrayObjectOrNullRequestBody": typing.Type[RequestBodyPostTypeArrayObjectOrNullRequestBody], + "/requestBody/postTypeArrayOrObjectRequestBody": typing.Type[RequestBodyPostTypeArrayOrObjectRequestBody], + "/requestBody/postTypeAsArrayWithOneItemRequestBody": typing.Type[RequestBodyPostTypeAsArrayWithOneItemRequestBody], + "/requestBody/postUnevaluateditemsAsSchemaRequestBody": typing.Type[RequestBodyPostUnevaluateditemsAsSchemaRequestBody], + "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody], + "/requestBody/postUnevaluateditemsWithItemsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsWithItemsRequestBody], + "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody], + "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody], + "/requestBody/postUnevaluatedpropertiesSchemaRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesSchemaRequestBody], + "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody], + "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody], + "/requestBody/postUniqueitemsFalseValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseValidationRequestBody], + "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody], + "/requestBody/postUniqueitemsValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsValidationRequestBody], + "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody": typing.Type[RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody], + "/requestBody/postUriFormatRequestBody": typing.Type[RequestBodyPostUriFormatRequestBody], + "/requestBody/postUriReferenceFormatRequestBody": typing.Type[RequestBodyPostUriReferenceFormatRequestBody], + "/requestBody/postUriTemplateFormatRequestBody": typing.Type[RequestBodyPostUriTemplateFormatRequestBody], + "/requestBody/postUuidFormatRequestBody": typing.Type[RequestBodyPostUuidFormatRequestBody], + "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody": typing.Type[RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody], + "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes], + "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], + "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes], + "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes], + "/responseBody/postAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofResponseBodyForContentTypes], + "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes], + "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes], + "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes], + "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes], + "/responseBody/postAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofResponseBodyForContentTypes], + "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes], + "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": typing.Type[ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes], + "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": typing.Type[ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes], + "/responseBody/postByIntResponseBodyForContentTypes": typing.Type[ResponseBodyPostByIntResponseBodyForContentTypes], + "/responseBody/postByNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostByNumberResponseBodyForContentTypes], + "/responseBody/postBySmallNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostBySmallNumberResponseBodyForContentTypes], + "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes], + "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes], + "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes], + "/responseBody/postDateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateFormatResponseBodyForContentTypes], + "/responseBody/postDateTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateTimeFormatResponseBodyForContentTypes], + "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes], + "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes], + "/responseBody/postDurationFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDurationFormatResponseBodyForContentTypes], + "/responseBody/postEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmailFormatResponseBodyForContentTypes], + "/responseBody/postEmptyDependentsResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmptyDependentsResponseBodyForContentTypes], + "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes], + "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes], + "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes], + "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes], + "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes], + "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes], + "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes], + "/responseBody/postFloatDivisionInfResponseBodyForContentTypes": typing.Type[ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes], + "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes], + "/responseBody/postHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostHostnameFormatResponseBodyForContentTypes], + "/responseBody/postIdnEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes], + "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes], + "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes], + "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes], + "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes], + "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes], + "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes], + "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes], + "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": typing.Type[ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes], + "/responseBody/postIpv4FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv4FormatResponseBodyForContentTypes], + "/responseBody/postIpv6FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv6FormatResponseBodyForContentTypes], + "/responseBody/postIriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIriFormatResponseBodyForContentTypes], + "/responseBody/postIriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes], + "/responseBody/postItemsContainsResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsContainsResponseBodyForContentTypes], + "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes], + "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes], + "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes], + "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes], + "/responseBody/postMaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationResponseBodyForContentTypes], + "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes], + "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes], + "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes], + "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes], + "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes], + "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes], + "/responseBody/postMinimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationResponseBodyForContentTypes], + "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes], + "/responseBody/postMinitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinitemsValidationResponseBodyForContentTypes], + "/responseBody/postMinlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinlengthValidationResponseBodyForContentTypes], + "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes], + "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes], + "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes], + "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes], + "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNestedItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedItemsResponseBodyForContentTypes], + "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes], + "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes], + "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes], + "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes], + "/responseBody/postNotMultipleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes], + "/responseBody/postNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotResponseBodyForContentTypes], + "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes], + "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes], + "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": typing.Type[ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes], + "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes], + "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes], + "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes], + "/responseBody/postOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofResponseBodyForContentTypes], + "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes], + "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes], + "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes], + "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes], + "/responseBody/postPatternValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternValidationResponseBodyForContentTypes], + "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes], + "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], + "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes], + "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes], + "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes], + "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes], + "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], + "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes], + "/responseBody/postPropertynamesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes], + "/responseBody/postRegexFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostRegexFormatResponseBodyForContentTypes], + "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes": typing.Type[ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes], + "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes], + "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes], + "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes], + "/responseBody/postRequiredValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredValidationResponseBodyForContentTypes], + "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes], + "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes], + "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes], + "/responseBody/postSingleDependencyResponseBodyForContentTypes": typing.Type[ResponseBodyPostSingleDependencyResponseBodyForContentTypes], + "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes], + "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes], + "/responseBody/postTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostTimeFormatResponseBodyForContentTypes], + "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes], + "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes], + "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes], + "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes], + "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes], + "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes], + "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes], + "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes], + "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes], + "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes], + "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], + "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes], + "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes], + "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes], + "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes], + "/responseBody/postUriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriFormatResponseBodyForContentTypes], + "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes], + "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes], + "/responseBody/postUuidFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUuidFormatResponseBodyForContentTypes], + "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes], + } +) + +path_to_api = PathToApi( + { + "/requestBody/postASchemaGivenForPrefixitemsRequestBody": RequestBodyPostASchemaGivenForPrefixitemsRequestBody, + "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody, + "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, + "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, + "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody": RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, + "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, + "/requestBody/postAdditionalpropertiesWithSchemaRequestBody": RequestBodyPostAdditionalpropertiesWithSchemaRequestBody, + "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, + "/requestBody/postAllofRequestBody": RequestBodyPostAllofRequestBody, + "/requestBody/postAllofSimpleTypesRequestBody": RequestBodyPostAllofSimpleTypesRequestBody, + "/requestBody/postAllofWithBaseSchemaRequestBody": RequestBodyPostAllofWithBaseSchemaRequestBody, + "/requestBody/postAllofWithOneEmptySchemaRequestBody": RequestBodyPostAllofWithOneEmptySchemaRequestBody, + "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, + "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, + "/requestBody/postAllofWithTwoEmptySchemasRequestBody": RequestBodyPostAllofWithTwoEmptySchemasRequestBody, + "/requestBody/postAnyofComplexTypesRequestBody": RequestBodyPostAnyofComplexTypesRequestBody, + "/requestBody/postAnyofRequestBody": RequestBodyPostAnyofRequestBody, + "/requestBody/postAnyofWithBaseSchemaRequestBody": RequestBodyPostAnyofWithBaseSchemaRequestBody, + "/requestBody/postAnyofWithOneEmptySchemaRequestBody": RequestBodyPostAnyofWithOneEmptySchemaRequestBody, + "/requestBody/postArrayTypeMatchesArraysRequestBody": RequestBodyPostArrayTypeMatchesArraysRequestBody, + "/requestBody/postBooleanTypeMatchesBooleansRequestBody": RequestBodyPostBooleanTypeMatchesBooleansRequestBody, + "/requestBody/postByIntRequestBody": RequestBodyPostByIntRequestBody, + "/requestBody/postByNumberRequestBody": RequestBodyPostByNumberRequestBody, + "/requestBody/postBySmallNumberRequestBody": RequestBodyPostBySmallNumberRequestBody, + "/requestBody/postConstNulCharactersInStringsRequestBody": RequestBodyPostConstNulCharactersInStringsRequestBody, + "/requestBody/postContainsKeywordValidationRequestBody": RequestBodyPostContainsKeywordValidationRequestBody, + "/requestBody/postContainsWithNullInstanceElementsRequestBody": RequestBodyPostContainsWithNullInstanceElementsRequestBody, + "/requestBody/postDateFormatRequestBody": RequestBodyPostDateFormatRequestBody, + "/requestBody/postDateTimeFormatRequestBody": RequestBodyPostDateTimeFormatRequestBody, + "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody": RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody, + "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody": RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, + "/requestBody/postDependentSchemasSingleDependencyRequestBody": RequestBodyPostDependentSchemasSingleDependencyRequestBody, + "/requestBody/postDurationFormatRequestBody": RequestBodyPostDurationFormatRequestBody, + "/requestBody/postEmailFormatRequestBody": RequestBodyPostEmailFormatRequestBody, + "/requestBody/postEmptyDependentsRequestBody": RequestBodyPostEmptyDependentsRequestBody, + "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, + "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, + "/requestBody/postEnumWithEscapedCharactersRequestBody": RequestBodyPostEnumWithEscapedCharactersRequestBody, + "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, + "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, + "/requestBody/postEnumsInPropertiesRequestBody": RequestBodyPostEnumsInPropertiesRequestBody, + "/requestBody/postExclusivemaximumValidationRequestBody": RequestBodyPostExclusivemaximumValidationRequestBody, + "/requestBody/postExclusiveminimumValidationRequestBody": RequestBodyPostExclusiveminimumValidationRequestBody, + "/requestBody/postFloatDivisionInfRequestBody": RequestBodyPostFloatDivisionInfRequestBody, + "/requestBody/postForbiddenPropertyRequestBody": RequestBodyPostForbiddenPropertyRequestBody, + "/requestBody/postHostnameFormatRequestBody": RequestBodyPostHostnameFormatRequestBody, + "/requestBody/postIdnEmailFormatRequestBody": RequestBodyPostIdnEmailFormatRequestBody, + "/requestBody/postIdnHostnameFormatRequestBody": RequestBodyPostIdnHostnameFormatRequestBody, + "/requestBody/postIfAndElseWithoutThenRequestBody": RequestBodyPostIfAndElseWithoutThenRequestBody, + "/requestBody/postIfAndThenWithoutElseRequestBody": RequestBodyPostIfAndThenWithoutElseRequestBody, + "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody": RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, + "/requestBody/postIgnoreElseWithoutIfRequestBody": RequestBodyPostIgnoreElseWithoutIfRequestBody, + "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody": RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody, + "/requestBody/postIgnoreThenWithoutIfRequestBody": RequestBodyPostIgnoreThenWithoutIfRequestBody, + "/requestBody/postIntegerTypeMatchesIntegersRequestBody": RequestBodyPostIntegerTypeMatchesIntegersRequestBody, + "/requestBody/postIpv4FormatRequestBody": RequestBodyPostIpv4FormatRequestBody, + "/requestBody/postIpv6FormatRequestBody": RequestBodyPostIpv6FormatRequestBody, + "/requestBody/postIriFormatRequestBody": RequestBodyPostIriFormatRequestBody, + "/requestBody/postIriReferenceFormatRequestBody": RequestBodyPostIriReferenceFormatRequestBody, + "/requestBody/postItemsContainsRequestBody": RequestBodyPostItemsContainsRequestBody, + "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody": RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody, + "/requestBody/postItemsWithNullInstanceElementsRequestBody": RequestBodyPostItemsWithNullInstanceElementsRequestBody, + "/requestBody/postJsonPointerFormatRequestBody": RequestBodyPostJsonPointerFormatRequestBody, + "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody": RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody, + "/requestBody/postMaximumValidationRequestBody": RequestBodyPostMaximumValidationRequestBody, + "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, + "/requestBody/postMaxitemsValidationRequestBody": RequestBodyPostMaxitemsValidationRequestBody, + "/requestBody/postMaxlengthValidationRequestBody": RequestBodyPostMaxlengthValidationRequestBody, + "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, + "/requestBody/postMaxpropertiesValidationRequestBody": RequestBodyPostMaxpropertiesValidationRequestBody, + "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody": RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody, + "/requestBody/postMinimumValidationRequestBody": RequestBodyPostMinimumValidationRequestBody, + "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, + "/requestBody/postMinitemsValidationRequestBody": RequestBodyPostMinitemsValidationRequestBody, + "/requestBody/postMinlengthValidationRequestBody": RequestBodyPostMinlengthValidationRequestBody, + "/requestBody/postMinpropertiesValidationRequestBody": RequestBodyPostMinpropertiesValidationRequestBody, + "/requestBody/postMultipleDependentsRequiredRequestBody": RequestBodyPostMultipleDependentsRequiredRequestBody, + "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody": RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, + "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody": RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, + "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, + "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, + "/requestBody/postNestedItemsRequestBody": RequestBodyPostNestedItemsRequestBody, + "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, + "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody": RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody, + "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody": RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody, + "/requestBody/postNotMoreComplexSchemaRequestBody": RequestBodyPostNotMoreComplexSchemaRequestBody, + "/requestBody/postNotMultipleTypesRequestBody": RequestBodyPostNotMultipleTypesRequestBody, + "/requestBody/postNotRequestBody": RequestBodyPostNotRequestBody, + "/requestBody/postNulCharactersInStringsRequestBody": RequestBodyPostNulCharactersInStringsRequestBody, + "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, + "/requestBody/postNumberTypeMatchesNumbersRequestBody": RequestBodyPostNumberTypeMatchesNumbersRequestBody, + "/requestBody/postObjectPropertiesValidationRequestBody": RequestBodyPostObjectPropertiesValidationRequestBody, + "/requestBody/postObjectTypeMatchesObjectsRequestBody": RequestBodyPostObjectTypeMatchesObjectsRequestBody, + "/requestBody/postOneofComplexTypesRequestBody": RequestBodyPostOneofComplexTypesRequestBody, + "/requestBody/postOneofRequestBody": RequestBodyPostOneofRequestBody, + "/requestBody/postOneofWithBaseSchemaRequestBody": RequestBodyPostOneofWithBaseSchemaRequestBody, + "/requestBody/postOneofWithEmptySchemaRequestBody": RequestBodyPostOneofWithEmptySchemaRequestBody, + "/requestBody/postOneofWithRequiredRequestBody": RequestBodyPostOneofWithRequiredRequestBody, + "/requestBody/postPatternIsNotAnchoredRequestBody": RequestBodyPostPatternIsNotAnchoredRequestBody, + "/requestBody/postPatternValidationRequestBody": RequestBodyPostPatternValidationRequestBody, + "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody": RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, + "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, + "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody": RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, + "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody": RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody, + "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody": RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, + "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + "/requestBody/postPropertiesWithEscapedCharactersRequestBody": RequestBodyPostPropertiesWithEscapedCharactersRequestBody, + "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody, + "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, + "/requestBody/postPropertynamesValidationRequestBody": RequestBodyPostPropertynamesValidationRequestBody, + "/requestBody/postRegexFormatRequestBody": RequestBodyPostRegexFormatRequestBody, + "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody": RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, + "/requestBody/postRelativeJsonPointerFormatRequestBody": RequestBodyPostRelativeJsonPointerFormatRequestBody, + "/requestBody/postRequiredDefaultValidationRequestBody": RequestBodyPostRequiredDefaultValidationRequestBody, + "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + "/requestBody/postRequiredValidationRequestBody": RequestBodyPostRequiredValidationRequestBody, + "/requestBody/postRequiredWithEmptyArrayRequestBody": RequestBodyPostRequiredWithEmptyArrayRequestBody, + "/requestBody/postRequiredWithEscapedCharactersRequestBody": RequestBodyPostRequiredWithEscapedCharactersRequestBody, + "/requestBody/postSimpleEnumValidationRequestBody": RequestBodyPostSimpleEnumValidationRequestBody, + "/requestBody/postSingleDependencyRequestBody": RequestBodyPostSingleDependencyRequestBody, + "/requestBody/postSmallMultipleOfLargeIntegerRequestBody": RequestBodyPostSmallMultipleOfLargeIntegerRequestBody, + "/requestBody/postStringTypeMatchesStringsRequestBody": RequestBodyPostStringTypeMatchesStringsRequestBody, + "/requestBody/postTimeFormatRequestBody": RequestBodyPostTimeFormatRequestBody, + "/requestBody/postTypeArrayObjectOrNullRequestBody": RequestBodyPostTypeArrayObjectOrNullRequestBody, + "/requestBody/postTypeArrayOrObjectRequestBody": RequestBodyPostTypeArrayOrObjectRequestBody, + "/requestBody/postTypeAsArrayWithOneItemRequestBody": RequestBodyPostTypeAsArrayWithOneItemRequestBody, + "/requestBody/postUnevaluateditemsAsSchemaRequestBody": RequestBodyPostUnevaluateditemsAsSchemaRequestBody, + "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody": RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, + "/requestBody/postUnevaluateditemsWithItemsRequestBody": RequestBodyPostUnevaluateditemsWithItemsRequestBody, + "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody": RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody, + "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody": RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, + "/requestBody/postUnevaluatedpropertiesSchemaRequestBody": RequestBodyPostUnevaluatedpropertiesSchemaRequestBody, + "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody": RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, + "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, + "/requestBody/postUniqueitemsFalseValidationRequestBody": RequestBodyPostUniqueitemsFalseValidationRequestBody, + "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody": RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody, + "/requestBody/postUniqueitemsValidationRequestBody": RequestBodyPostUniqueitemsValidationRequestBody, + "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody": RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody, + "/requestBody/postUriFormatRequestBody": RequestBodyPostUriFormatRequestBody, + "/requestBody/postUriReferenceFormatRequestBody": RequestBodyPostUriReferenceFormatRequestBody, + "/requestBody/postUriTemplateFormatRequestBody": RequestBodyPostUriTemplateFormatRequestBody, + "/requestBody/postUuidFormatRequestBody": RequestBodyPostUuidFormatRequestBody, + "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody": RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody, + "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes": ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes, + "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, + "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + "/responseBody/postAllofResponseBodyForContentTypes": ResponseBodyPostAllofResponseBodyForContentTypes, + "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, + "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, + "/responseBody/postAnyofResponseBodyForContentTypes": ResponseBodyPostAnyofResponseBodyForContentTypes, + "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, + "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + "/responseBody/postByIntResponseBodyForContentTypes": ResponseBodyPostByIntResponseBodyForContentTypes, + "/responseBody/postByNumberResponseBodyForContentTypes": ResponseBodyPostByNumberResponseBodyForContentTypes, + "/responseBody/postBySmallNumberResponseBodyForContentTypes": ResponseBodyPostBySmallNumberResponseBodyForContentTypes, + "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes, + "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes": ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes, + "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes, + "/responseBody/postDateFormatResponseBodyForContentTypes": ResponseBodyPostDateFormatResponseBodyForContentTypes, + "/responseBody/postDateTimeFormatResponseBodyForContentTypes": ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, + "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes": ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, + "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes": ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes, + "/responseBody/postDurationFormatResponseBodyForContentTypes": ResponseBodyPostDurationFormatResponseBodyForContentTypes, + "/responseBody/postEmailFormatResponseBodyForContentTypes": ResponseBodyPostEmailFormatResponseBodyForContentTypes, + "/responseBody/postEmptyDependentsResponseBodyForContentTypes": ResponseBodyPostEmptyDependentsResponseBodyForContentTypes, + "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, + "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes": ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes, + "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes": ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes, + "/responseBody/postFloatDivisionInfResponseBodyForContentTypes": ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes, + "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, + "/responseBody/postHostnameFormatResponseBodyForContentTypes": ResponseBodyPostHostnameFormatResponseBodyForContentTypes, + "/responseBody/postIdnEmailFormatResponseBodyForContentTypes": ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes, + "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes": ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes, + "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes": ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes, + "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes": ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes, + "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes": ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, + "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes": ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes, + "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes": ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, + "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes": ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes, + "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + "/responseBody/postIpv4FormatResponseBodyForContentTypes": ResponseBodyPostIpv4FormatResponseBodyForContentTypes, + "/responseBody/postIpv6FormatResponseBodyForContentTypes": ResponseBodyPostIpv6FormatResponseBodyForContentTypes, + "/responseBody/postIriFormatResponseBodyForContentTypes": ResponseBodyPostIriFormatResponseBodyForContentTypes, + "/responseBody/postIriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes, + "/responseBody/postItemsContainsResponseBodyForContentTypes": ResponseBodyPostItemsContainsResponseBodyForContentTypes, + "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes": ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, + "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes, + "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, + "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + "/responseBody/postMaximumValidationResponseBodyForContentTypes": ResponseBodyPostMaximumValidationResponseBodyForContentTypes, + "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, + "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, + "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, + "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + "/responseBody/postMinimumValidationResponseBodyForContentTypes": ResponseBodyPostMinimumValidationResponseBodyForContentTypes, + "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + "/responseBody/postMinitemsValidationResponseBodyForContentTypes": ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, + "/responseBody/postMinlengthValidationResponseBodyForContentTypes": ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, + "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, + "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes": ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes, + "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes": ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, + "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes": ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, + "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNestedItemsResponseBodyForContentTypes": ResponseBodyPostNestedItemsResponseBodyForContentTypes, + "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, + "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes": ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, + "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, + "/responseBody/postNotMultipleTypesResponseBodyForContentTypes": ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes, + "/responseBody/postNotResponseBodyForContentTypes": ResponseBodyPostNotResponseBodyForContentTypes, + "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, + "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, + "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, + "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, + "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, + "/responseBody/postOneofResponseBodyForContentTypes": ResponseBodyPostOneofResponseBodyForContentTypes, + "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, + "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, + "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, + "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, + "/responseBody/postPatternValidationResponseBodyForContentTypes": ResponseBodyPostPatternValidationResponseBodyForContentTypes, + "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes": ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, + "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes": ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, + "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, + "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes": ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, + "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + "/responseBody/postPropertynamesValidationResponseBodyForContentTypes": ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes, + "/responseBody/postRegexFormatResponseBodyForContentTypes": ResponseBodyPostRegexFormatResponseBodyForContentTypes, + "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes": ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, + "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes, + "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, + "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + "/responseBody/postRequiredValidationResponseBodyForContentTypes": ResponseBodyPostRequiredValidationResponseBodyForContentTypes, + "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, + "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, + "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, + "/responseBody/postSingleDependencyResponseBodyForContentTypes": ResponseBodyPostSingleDependencyResponseBodyForContentTypes, + "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes": ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, + "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, + "/responseBody/postTimeFormatResponseBodyForContentTypes": ResponseBodyPostTimeFormatResponseBodyForContentTypes, + "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes": ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes, + "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes": ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes, + "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes": ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes, + "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes, + "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, + "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes, + "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, + "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, + "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, + "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, + "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, + "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, + "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, + "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes": ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, + "/responseBody/postUriFormatResponseBodyForContentTypes": ResponseBodyPostUriFormatResponseBodyForContentTypes, + "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, + "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, + "/responseBody/postUuidFormatResponseBodyForContentTypes": ResponseBodyPostUuidFormatResponseBodyForContentTypes, + "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes": ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, + } +) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py new file mode 100644 index 00000000000..cf241d055c1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py new file mode 100644 index 00000000000..4f45085b8ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import ApiForPost + + +class RequestBodyPostASchemaGivenForPrefixitemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py new file mode 100644 index 00000000000..aa8c5bae97e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py new file mode 100644 index 00000000000..36532c11740 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py new file mode 100644 index 00000000000..4e78c4910a7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py new file mode 100644 index 00000000000..dad7ec6c30a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py new file mode 100644 index 00000000000..bd7a287cfb9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py new file mode 100644 index 00000000000..931521fcf08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAdditionalpropertiesWithSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py new file mode 100644 index 00000000000..4480daaccba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofCombinedWithAnyofOneofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py new file mode 100644 index 00000000000..532efdb2ee8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py new file mode 100644 index 00000000000..623774c43a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofSimpleTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py new file mode 100644 index 00000000000..af4ff5ef4e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py new file mode 100644 index 00000000000..5a70255cc45 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithOneEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py new file mode 100644 index 00000000000..2e0f5927ddd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py new file mode 100644 index 00000000000..d80740df7b0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTheLastEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py new file mode 100644 index 00000000000..7b7dd7d0b42 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import ApiForPost + + +class RequestBodyPostAllofWithTwoEmptySchemasRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py new file mode 100644 index 00000000000..ccaa6b01276 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofComplexTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py new file mode 100644 index 00000000000..647b1f802f2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py new file mode 100644 index 00000000000..4b917efdd47 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py new file mode 100644 index 00000000000..9a23748a21a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostAnyofWithOneEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py new file mode 100644 index 00000000000..84b93e5f9d2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import ApiForPost + + +class RequestBodyPostArrayTypeMatchesArraysRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py new file mode 100644 index 00000000000..292403f027d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import ApiForPost + + +class RequestBodyPostBooleanTypeMatchesBooleansRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py new file mode 100644 index 00000000000..732cf2f7b63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import ApiForPost + + +class RequestBodyPostByIntRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py new file mode 100644 index 00000000000..237f942e46a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import ApiForPost + + +class RequestBodyPostByNumberRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py new file mode 100644 index 00000000000..69b8d1fc812 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import ApiForPost + + +class RequestBodyPostBySmallNumberRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py new file mode 100644 index 00000000000..6d2a3e98043 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import ApiForPost + + +class RequestBodyPostConstNulCharactersInStringsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py new file mode 100644 index 00000000000..cae353fc557 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostContainsKeywordValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py new file mode 100644 index 00000000000..337ee06e0ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import ApiForPost + + +class RequestBodyPostContainsWithNullInstanceElementsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py new file mode 100644 index 00000000000..656ae0a8326 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_date_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostDateFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py new file mode 100644 index 00000000000..0af82fb0b19 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostDateTimeFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..9f3f7280d0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py new file mode 100644 index 00000000000..6cb83d31563 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import ApiForPost + + +class RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py new file mode 100644 index 00000000000..2732f5dfc84 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import ApiForPost + + +class RequestBodyPostDependentSchemasSingleDependencyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py new file mode 100644 index 00000000000..0ddf109b1f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostDurationFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py new file mode 100644 index 00000000000..d488c739731 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostEmailFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py new file mode 100644 index 00000000000..4cff9079b29 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import ApiForPost + + +class RequestBodyPostEmptyDependentsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py new file mode 100644 index 00000000000..17edfbea653 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py new file mode 100644 index 00000000000..69fed82e8ea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..4170ddf46e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py new file mode 100644 index 00000000000..497786a2f63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py new file mode 100644 index 00000000000..3ecc317d968 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py new file mode 100644 index 00000000000..b3fd918b730 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostEnumsInPropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py new file mode 100644 index 00000000000..a630ad544a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostExclusivemaximumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py new file mode 100644 index 00000000000..0fdf671fee7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostExclusiveminimumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py new file mode 100644 index 00000000000..9c661779210 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import ApiForPost + + +class RequestBodyPostFloatDivisionInfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py new file mode 100644 index 00000000000..d6feb065be9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import ApiForPost + + +class RequestBodyPostForbiddenPropertyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py new file mode 100644 index 00000000000..c27e42fa7b9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostHostnameFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py new file mode 100644 index 00000000000..1eb622c201a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIdnEmailFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py new file mode 100644 index 00000000000..ecdc87c665b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIdnHostnameFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py new file mode 100644 index 00000000000..b1a206860e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import ApiForPost + + +class RequestBodyPostIfAndElseWithoutThenRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py new file mode 100644 index 00000000000..52a93559c66 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import ApiForPost + + +class RequestBodyPostIfAndThenWithoutElseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py new file mode 100644 index 00000000000..014514c0088 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import ApiForPost + + +class RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py new file mode 100644 index 00000000000..eb15675f93e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import ApiForPost + + +class RequestBodyPostIgnoreElseWithoutIfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py new file mode 100644 index 00000000000..832523825ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import ApiForPost + + +class RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py new file mode 100644 index 00000000000..8cf0a2830b2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import ApiForPost + + +class RequestBodyPostIgnoreThenWithoutIfRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py new file mode 100644 index 00000000000..bfa468c9418 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import ApiForPost + + +class RequestBodyPostIntegerTypeMatchesIntegersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py new file mode 100644 index 00000000000..6288b0bc8c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIpv4FormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py new file mode 100644 index 00000000000..bb18ad7b04a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIpv6FormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py new file mode 100644 index 00000000000..99beb0a18f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIriFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py new file mode 100644 index 00000000000..bb97fcbffd0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostIriReferenceFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py new file mode 100644 index 00000000000..c250465fcf6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import ApiForPost + + +class RequestBodyPostItemsContainsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py new file mode 100644 index 00000000000..a6fa002d893 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import ApiForPost + + +class RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py new file mode 100644 index 00000000000..41b19e5b1f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import ApiForPost + + +class RequestBodyPostItemsWithNullInstanceElementsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py new file mode 100644 index 00000000000..0df910056be --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostJsonPointerFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py new file mode 100644 index 00000000000..b08aca33e1a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py new file mode 100644 index 00000000000..674eb049aa6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaximumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py new file mode 100644 index 00000000000..f55f13db9ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py new file mode 100644 index 00000000000..df142bdc19b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py new file mode 100644 index 00000000000..ddff73ec08a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxlengthValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py new file mode 100644 index 00000000000..7ccd2f00b27 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py new file mode 100644 index 00000000000..53c2f641a9d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMaxpropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py new file mode 100644 index 00000000000..57b4545bfa3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import ApiForPost + + +class RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py new file mode 100644 index 00000000000..52b7e1cca45 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinimumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py new file mode 100644 index 00000000000..7b08146a4d6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinimumValidationWithSignedIntegerRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py new file mode 100644 index 00000000000..fb8771470d9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py new file mode 100644 index 00000000000..a64211cf799 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinlengthValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py new file mode 100644 index 00000000000..c6588d4c181 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostMinpropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py new file mode 100644 index 00000000000..d057f7302aa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import ApiForPost + + +class RequestBodyPostMultipleDependentsRequiredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py new file mode 100644 index 00000000000..e6b064fc8f8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import ApiForPost + + +class RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py new file mode 100644 index 00000000000..92db38c8ef8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import ApiForPost + + +class RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..d030cd5ced4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..10599f9f8b8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py new file mode 100644 index 00000000000..20c87854f7a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py new file mode 100644 index 00000000000..78ecdddb7a8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import ApiForPost + + +class RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py new file mode 100644 index 00000000000..55e9374e8ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import ApiForPost + + +class RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py new file mode 100644 index 00000000000..eb2fc38e4ca --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import ApiForPost + + +class RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py new file mode 100644 index 00000000000..c16784dced4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostNotMoreComplexSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py new file mode 100644 index 00000000000..d032c999dfa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostNotMultipleTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py new file mode 100644 index 00000000000..ed139742514 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_request_body.post.operation import ApiForPost + + +class RequestBodyPostNotRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py new file mode 100644 index 00000000000..556b0cac442 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import ApiForPost + + +class RequestBodyPostNulCharactersInStringsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py new file mode 100644 index 00000000000..20ab0b86c2a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import ApiForPost + + +class RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py new file mode 100644 index 00000000000..9653e78ebb4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import ApiForPost + + +class RequestBodyPostNumberTypeMatchesNumbersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py new file mode 100644 index 00000000000..c99f22092f5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostObjectPropertiesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py new file mode 100644 index 00000000000..2cc13a7b4d1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import ApiForPost + + +class RequestBodyPostObjectTypeMatchesObjectsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py new file mode 100644 index 00000000000..ccc3cf5cceb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofComplexTypesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py new file mode 100644 index 00000000000..88ba41fd46d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py new file mode 100644 index 00000000000..dbf639f8789 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithBaseSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py new file mode 100644 index 00000000000..6a417f71839 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithEmptySchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py new file mode 100644 index 00000000000..48e8f046b44 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import ApiForPost + + +class RequestBodyPostOneofWithRequiredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py new file mode 100644 index 00000000000..da3c84fc103 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternIsNotAnchoredRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py new file mode 100644 index 00000000000..20ede2aeb3c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py new file mode 100644 index 00000000000..36d7c0cd1af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py new file mode 100644 index 00000000000..646fa1fd1c2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py new file mode 100644 index 00000000000..15e13019192 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py new file mode 100644 index 00000000000..3388319db74 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import ApiForPost + + +class RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py new file mode 100644 index 00000000000..83d49419562 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py new file mode 100644 index 00000000000..e35e2f4a51b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..6b3886eb815 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertiesWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py new file mode 100644 index 00000000000..85fef4c141b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py new file mode 100644 index 00000000000..3b2f40d08d7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py new file mode 100644 index 00000000000..700be7b9a6b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostPropertynamesValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py new file mode 100644 index 00000000000..6b75f9d047a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostRegexFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py new file mode 100644 index 00000000000..fabf1a799e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import ApiForPost + + +class RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py new file mode 100644 index 00000000000..e799ca47f18 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostRelativeJsonPointerFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py new file mode 100644 index 00000000000..174034e1d0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredDefaultValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py new file mode 100644 index 00000000000..14430e0a2f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py new file mode 100644 index 00000000000..b70a88e909c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py new file mode 100644 index 00000000000..8c4fce75faf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredWithEmptyArrayRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py new file mode 100644 index 00000000000..cc3eb78287f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import ApiForPost + + +class RequestBodyPostRequiredWithEscapedCharactersRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py new file mode 100644 index 00000000000..01b5089d5fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostSimpleEnumValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py new file mode 100644 index 00000000000..c029d9b24f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import ApiForPost + + +class RequestBodyPostSingleDependencyRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py new file mode 100644 index 00000000000..fee4ba60ddc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import ApiForPost + + +class RequestBodyPostSmallMultipleOfLargeIntegerRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py new file mode 100644 index 00000000000..0c0c29c0f88 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import ApiForPost + + +class RequestBodyPostStringTypeMatchesStringsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py new file mode 100644 index 00000000000..e527b3fd2f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_time_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostTimeFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py new file mode 100644 index 00000000000..703fbbc081f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import ApiForPost + + +class RequestBodyPostTypeArrayObjectOrNullRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py new file mode 100644 index 00000000000..e0097d83317 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import ApiForPost + + +class RequestBodyPostTypeArrayOrObjectRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py new file mode 100644 index 00000000000..8950ac1612e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import ApiForPost + + +class RequestBodyPostTypeAsArrayWithOneItemRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py new file mode 100644 index 00000000000..a7963b04c5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluateditemsAsSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py new file mode 100644 index 00000000000..382f41dd8a8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py new file mode 100644 index 00000000000..1de40ea89f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluateditemsWithItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py new file mode 100644 index 00000000000..80852b13ba1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py new file mode 100644 index 00000000000..26218bd7658 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py new file mode 100644 index 00000000000..5aabcca6245 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluatedpropertiesSchemaRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py new file mode 100644 index 00000000000..e8ba92f7d76 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py new file mode 100644 index 00000000000..161519f4a14 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost + + +class RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py new file mode 100644 index 00000000000..51097da6994 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsFalseValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py new file mode 100644 index 00000000000..3150c965940 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py new file mode 100644 index 00000000000..b31adf6d7b0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsValidationRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py new file mode 100644 index 00000000000..18320963098 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import ApiForPost + + +class RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py new file mode 100644 index 00000000000..e8a3d3c0af9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py new file mode 100644 index 00000000000..58c7c2cccb7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriReferenceFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py new file mode 100644 index 00000000000..1f55f71bed7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUriTemplateFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py new file mode 100644 index 00000000000..2a21fbccfc2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import ApiForPost + + +class RequestBodyPostUuidFormatRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py new file mode 100644 index 00000000000..918ff40ce1f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import ApiForPost + + +class RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py new file mode 100644 index 00000000000..b5619e6f9a6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..6aedb043f82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py new file mode 100644 index 00000000000..38ea9c51a0e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py new file mode 100644 index 00000000000..4110c9f1d82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py new file mode 100644 index 00000000000..c8825c0f42d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..e2375d54b8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..1844a172b63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..be301da0bf5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py new file mode 100644 index 00000000000..c3f4e74b8d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..d7312b8d643 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..452cf325331 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..a69ecb4fdd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..fb4178e9acb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..770b21b06be --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..02789ab3d5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..1f67d8fc354 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py new file mode 100644 index 00000000000..bd8f1d2fdde --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..4cd77d39175 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..3ae65f45cc6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py new file mode 100644 index 00000000000..e194b6ba539 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py new file mode 100644 index 00000000000..dc7016c7123 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py new file mode 100644 index 00000000000..7318812f2af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostByIntResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py new file mode 100644 index 00000000000..8db33c953d8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostByNumberResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py new file mode 100644 index 00000000000..67972605e91 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostBySmallNumberResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..b3ced876cdb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..b0af9da1a4a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py new file mode 100644 index 00000000000..3e799675384 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py new file mode 100644 index 00000000000..bf4fdd6440f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDateFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..248a1ece66c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDateTimeFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..aadf9602831 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py new file mode 100644 index 00000000000..4215764d966 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py new file mode 100644 index 00000000000..59354134abf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py new file mode 100644 index 00000000000..04a56fd88e1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostDurationFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..cc3b57cb053 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEmailFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py new file mode 100644 index 00000000000..39d1b1a9cc5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEmptyDependentsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py new file mode 100644 index 00000000000..fa99edb15a4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py new file mode 100644 index 00000000000..66659bf7f08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..10908094d73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py new file mode 100644 index 00000000000..16e4cb7a856 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py new file mode 100644 index 00000000000..1393f16c370 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..da078e10c0b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..d1fe25aecf4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..5abe75f1069 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py new file mode 100644 index 00000000000..4d652990d02 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py new file mode 100644 index 00000000000..c15dcf49dbd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..dce908eb65e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostHostnameFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py new file mode 100644 index 00000000000..f7888abd8b7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py new file mode 100644 index 00000000000..ced9b47c90b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py new file mode 100644 index 00000000000..8c3b383582c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py new file mode 100644 index 00000000000..3899b3334ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py new file mode 100644 index 00000000000..80b26e0dd47 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py new file mode 100644 index 00000000000..77f0370a42e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py new file mode 100644 index 00000000000..74179444937 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py new file mode 100644 index 00000000000..1bf29addf50 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py new file mode 100644 index 00000000000..6906efe5199 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py new file mode 100644 index 00000000000..fce3e100a9d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIpv4FormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py new file mode 100644 index 00000000000..7b2a2663415 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIpv6FormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..ba8d5dbb4c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIriFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..70b80edf11c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py new file mode 100644 index 00000000000..8504c48eb07 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostItemsContainsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py new file mode 100644 index 00000000000..d249fcac467 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py new file mode 100644 index 00000000000..e35082f9382 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..dd871c68782 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py new file mode 100644 index 00000000000..df0b8c5c6af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..395ff428a1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaximumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..2793858fbcb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..07505ab9c95 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..dd37437ba93 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py new file mode 100644 index 00000000000..939de700993 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..e879ca0b5a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py new file mode 100644 index 00000000000..e1ef72109fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..c67d47c8e0b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinimumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..5baedece0e1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..923cda49058 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..6e269ec52a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinlengthValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..05bc54f3fe1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py new file mode 100644 index 00000000000..9ec578d7bb2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py new file mode 100644 index 00000000000..ddc8e541058 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py new file mode 100644 index 00000000000..09ea92353e7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..9297fc2f991 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..6df177a58f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py new file mode 100644 index 00000000000..27dd38fe6b8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py new file mode 100644 index 00000000000..7496bfb73fb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..33d6a7fcab3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py new file mode 100644 index 00000000000..727143e3200 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..fd71b9e9971 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py new file mode 100644 index 00000000000..ea114c38a51 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py new file mode 100644 index 00000000000..d8a38229a41 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNotResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..b31e4ca403d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py new file mode 100644 index 00000000000..89e88f7a2ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py new file mode 100644 index 00000000000..cc2c7ddb2d5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..db35b129189 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py new file mode 100644 index 00000000000..0355a660707 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py new file mode 100644 index 00000000000..991c5657fb0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py new file mode 100644 index 00000000000..8798cbe40f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..34e10a2713b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..f82a7eec1ae --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py new file mode 100644 index 00000000000..c6b1fded641 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py new file mode 100644 index 00000000000..c92ad6904e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..bc77b21fc79 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py new file mode 100644 index 00000000000..01ba5b2d193 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..5da7778105d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py new file mode 100644 index 00000000000..4731ef923e7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py new file mode 100644 index 00000000000..7ea8ee5134f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py new file mode 100644 index 00000000000..8d4475b960a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py new file mode 100644 index 00000000000..b07bff09fa3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..1ddafcb8663 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..552dfb16ebe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py new file mode 100644 index 00000000000..551eee85024 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..153f70d56d9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py new file mode 100644 index 00000000000..798f211d66d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRegexFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py new file mode 100644 index 00000000000..cc87c2d9415 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py new file mode 100644 index 00000000000..9a0abfc58ee --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..5fee9d6e184 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py new file mode 100644 index 00000000000..8f5eead9b8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..fa649f88e7f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py new file mode 100644 index 00000000000..4521b9105ab --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py new file mode 100644 index 00000000000..236051838e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..8a9ff212518 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py new file mode 100644 index 00000000000..aad375f0a81 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostSingleDependencyResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py new file mode 100644 index 00000000000..27fae5acab5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py new file mode 100644 index 00000000000..ad259803428 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py new file mode 100644 index 00000000000..21dffee4c1b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostTimeFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py new file mode 100644 index 00000000000..77381eaf890 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py new file mode 100644 index 00000000000..0e8a2fc90e5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py new file mode 100644 index 00000000000..d7079547301 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..3f99906e487 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py new file mode 100644 index 00000000000..7176e815134 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py new file mode 100644 index 00000000000..a3662fed9ea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py new file mode 100644 index 00000000000..816cdf0313d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py new file mode 100644 index 00000000000..ae37c6d7fa9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py new file mode 100644 index 00000000000..443f3a44989 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py new file mode 100644 index 00000000000..d5d849ba74f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py new file mode 100644 index 00000000000..e6325e150db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..530d358ec89 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py new file mode 100644 index 00000000000..d61b2227c80 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py new file mode 100644 index 00000000000..a9a7e1eaf8e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py new file mode 100644 index 00000000000..3fb7ac5e62f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py new file mode 100644 index 00000000000..4dc4cf90291 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py new file mode 100644 index 00000000000..eada88c71c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py new file mode 100644 index 00000000000..602bd1505ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py new file mode 100644 index 00000000000..cf2eef95759 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostUuidFormatResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py new file mode 100644 index 00000000000..b247ee1ba8c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import ApiForPost + + +class ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py new file mode 100644 index 00000000000..f0895eaa0ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py @@ -0,0 +1,137 @@ +import typing +import typing_extensions + +from openapi_client.apis.tags.operation_request_body_api import OperationRequestBodyApi +from openapi_client.apis.tags.path_post_api import PathPostApi +from openapi_client.apis.tags.prefix_items_api import PrefixItemsApi +from openapi_client.apis.tags.content_type_json_api import ContentTypeJsonApi +from openapi_client.apis.tags.additional_properties_api import AdditionalPropertiesApi +from openapi_client.apis.tags.all_of_api import AllOfApi +from openapi_client.apis.tags.any_of_api import AnyOfApi +from openapi_client.apis.tags.type_api import TypeApi +from openapi_client.apis.tags.multiple_of_api import MultipleOfApi +from openapi_client.apis.tags.const_api import ConstApi +from openapi_client.apis.tags.contains_api import ContainsApi +from openapi_client.apis.tags.format_api import FormatApi +from openapi_client.apis.tags.dependent_schemas_api import DependentSchemasApi +from openapi_client.apis.tags.dependent_required_api import DependentRequiredApi +from openapi_client.apis.tags.enum_api import EnumApi +from openapi_client.apis.tags.exclusive_maximum_api import ExclusiveMaximumApi +from openapi_client.apis.tags.exclusive_minimum_api import ExclusiveMinimumApi +from openapi_client.apis.tags.not_api import NotApi +from openapi_client.apis.tags.if_then_else_api import IfThenElseApi +from openapi_client.apis.tags.items_api import ItemsApi +from openapi_client.apis.tags.max_contains_api import MaxContainsApi +from openapi_client.apis.tags.maximum_api import MaximumApi +from openapi_client.apis.tags.max_items_api import MaxItemsApi +from openapi_client.apis.tags.max_length_api import MaxLengthApi +from openapi_client.apis.tags.max_properties_api import MaxPropertiesApi +from openapi_client.apis.tags.min_contains_api import MinContainsApi +from openapi_client.apis.tags.minimum_api import MinimumApi +from openapi_client.apis.tags.min_items_api import MinItemsApi +from openapi_client.apis.tags.min_length_api import MinLengthApi +from openapi_client.apis.tags.min_properties_api import MinPropertiesApi +from openapi_client.apis.tags.pattern_properties_api import PatternPropertiesApi +from openapi_client.apis.tags.one_of_api import OneOfApi +from openapi_client.apis.tags.properties_api import PropertiesApi +from openapi_client.apis.tags.pattern_api import PatternApi +from openapi_client.apis.tags.ref_api import RefApi +from openapi_client.apis.tags.property_names_api import PropertyNamesApi +from openapi_client.apis.tags.required_api import RequiredApi +from openapi_client.apis.tags.unevaluated_items_api import UnevaluatedItemsApi +from openapi_client.apis.tags.unevaluated_properties_api import UnevaluatedPropertiesApi +from openapi_client.apis.tags.unique_items_api import UniqueItemsApi +from openapi_client.apis.tags.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi + +TagToApi = typing.TypedDict( + 'TagToApi', + { + "operation.requestBody": typing.Type[OperationRequestBodyApi], + "path.post": typing.Type[PathPostApi], + "prefixItems": typing.Type[PrefixItemsApi], + "contentType_json": typing.Type[ContentTypeJsonApi], + "additionalProperties": typing.Type[AdditionalPropertiesApi], + "allOf": typing.Type[AllOfApi], + "anyOf": typing.Type[AnyOfApi], + "type": typing.Type[TypeApi], + "multipleOf": typing.Type[MultipleOfApi], + "const": typing.Type[ConstApi], + "contains": typing.Type[ContainsApi], + "format": typing.Type[FormatApi], + "dependentSchemas": typing.Type[DependentSchemasApi], + "dependentRequired": typing.Type[DependentRequiredApi], + "enum": typing.Type[EnumApi], + "exclusiveMaximum": typing.Type[ExclusiveMaximumApi], + "exclusiveMinimum": typing.Type[ExclusiveMinimumApi], + "not": typing.Type[NotApi], + "if-then-else": typing.Type[IfThenElseApi], + "items": typing.Type[ItemsApi], + "maxContains": typing.Type[MaxContainsApi], + "maximum": typing.Type[MaximumApi], + "maxItems": typing.Type[MaxItemsApi], + "maxLength": typing.Type[MaxLengthApi], + "maxProperties": typing.Type[MaxPropertiesApi], + "minContains": typing.Type[MinContainsApi], + "minimum": typing.Type[MinimumApi], + "minItems": typing.Type[MinItemsApi], + "minLength": typing.Type[MinLengthApi], + "minProperties": typing.Type[MinPropertiesApi], + "patternProperties": typing.Type[PatternPropertiesApi], + "oneOf": typing.Type[OneOfApi], + "properties": typing.Type[PropertiesApi], + "pattern": typing.Type[PatternApi], + "$ref": typing.Type[RefApi], + "propertyNames": typing.Type[PropertyNamesApi], + "required": typing.Type[RequiredApi], + "unevaluatedItems": typing.Type[UnevaluatedItemsApi], + "unevaluatedProperties": typing.Type[UnevaluatedPropertiesApi], + "uniqueItems": typing.Type[UniqueItemsApi], + "response.content.contentType.schema": typing.Type[ResponseContentContentTypeSchemaApi], + } +) + +tag_to_api = TagToApi( + { + "operation.requestBody": OperationRequestBodyApi, + "path.post": PathPostApi, + "prefixItems": PrefixItemsApi, + "contentType_json": ContentTypeJsonApi, + "additionalProperties": AdditionalPropertiesApi, + "allOf": AllOfApi, + "anyOf": AnyOfApi, + "type": TypeApi, + "multipleOf": MultipleOfApi, + "const": ConstApi, + "contains": ContainsApi, + "format": FormatApi, + "dependentSchemas": DependentSchemasApi, + "dependentRequired": DependentRequiredApi, + "enum": EnumApi, + "exclusiveMaximum": ExclusiveMaximumApi, + "exclusiveMinimum": ExclusiveMinimumApi, + "not": NotApi, + "if-then-else": IfThenElseApi, + "items": ItemsApi, + "maxContains": MaxContainsApi, + "maximum": MaximumApi, + "maxItems": MaxItemsApi, + "maxLength": MaxLengthApi, + "maxProperties": MaxPropertiesApi, + "minContains": MinContainsApi, + "minimum": MinimumApi, + "minItems": MinItemsApi, + "minLength": MinLengthApi, + "minProperties": MinPropertiesApi, + "patternProperties": PatternPropertiesApi, + "oneOf": OneOfApi, + "properties": PropertiesApi, + "pattern": PatternApi, + "$ref": RefApi, + "propertyNames": PropertyNamesApi, + "required": RequiredApi, + "unevaluatedItems": UnevaluatedItemsApi, + "unevaluatedProperties": UnevaluatedPropertiesApi, + "uniqueItems": UniqueItemsApi, + "response.content.contentType.schema": ResponseContentContentTypeSchemaApi, + } +) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py new file mode 100644 index 00000000000..f3c38f014ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py new file mode 100644 index 00000000000..1804a25f839 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes + + +class AdditionalPropertiesApi( + PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, + PostNonAsciiPatternWithAdditionalpropertiesRequestBody, + PostAdditionalpropertiesWithSchemaRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, + PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py new file mode 100644 index 00000000000..91cabe521e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes + + +class AllOfApi( + PostAllofWithTheFirstEmptySchemaRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostAllofWithTheLastEmptySchemaRequestBody, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAllofWithOneEmptySchemaRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostAllofSimpleTypesRequestBody, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAllofRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostAllofResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py new file mode 100644 index 00000000000..f2a1c8d0fe3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody + + +class AnyOfApi( + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostAnyofComplexTypesRequestBody, + PostAnyofRequestBody, + PostAnyofWithOneEmptySchemaRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostAnyofWithBaseSchemaRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py new file mode 100644 index 00000000000..4f083f946ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody + + +class ConstApi( + PostConstNulCharactersInStringsResponseBodyForContentTypes, + PostConstNulCharactersInStringsRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py new file mode 100644 index 00000000000..f81459a111e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody +from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody +from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes + + +class ContainsApi( + PostContainsWithNullInstanceElementsRequestBody, + PostContainsWithNullInstanceElementsResponseBodyForContentTypes, + PostItemsContainsRequestBody, + PostContainsKeywordValidationRequestBody, + PostContainsKeywordValidationResponseBodyForContentTypes, + PostItemsContainsResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py new file mode 100644 index 00000000000..3d0ba110b43 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py @@ -0,0 +1,591 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody +from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody +from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody +from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody +from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody +from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody +from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes +from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody +from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody +from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes +from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody +from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody +from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody +from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody +from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody +from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody +from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody +from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody +from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody +from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody +from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes +from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody + + +class ContentTypeJsonApi( + PostIriReferenceFormatRequestBody, + PostUnevaluateditemsWithNullInstanceElementsRequestBody, + PostMinlengthValidationResponseBodyForContentTypes, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, + PostAdditionalItemsAreAllowedByDefaultRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostOneofWithRequiredRequestBody, + PostPrefixitemsWithNullInstanceElementsRequestBody, + PostUnevaluateditemsAsSchemaRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostIdnHostnameFormatRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostIriReferenceFormatResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, + PostDurationFormatRequestBody, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostIdnHostnameFormatResponseBodyForContentTypes, + PostExclusiveminimumValidationRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostAllofRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostContainsKeywordValidationResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, + PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, + PostUuidFormatRequestBody, + PostTimeFormatResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredRequestBody, + PostValidateAgainstCorrectBranchThenVsElseRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostUnevaluatedpropertiesSchemaRequestBody, + PostUnevaluateditemsWithItemsResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostItemsWithNullInstanceElementsResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostRegexFormatRequestBody, + PostNulCharactersInStringsRequestBody, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostItemsContainsResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostRelativeJsonPointerFormatRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, + PostNotRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostSingleDependencyRequestBody, + PostDateTimeFormatRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostContainsWithNullInstanceElementsResponseBodyForContentTypes, + PostTypeArrayOrObjectResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostExclusivemaximumValidationResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyRequestBody, + PostMincontainsWithoutContainsIsIgnoredRequestBody, + PostByNumberRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostIgnoreThenWithoutIfRequestBody, + PostAnyofComplexTypesRequestBody, + PostPropertynamesValidationRequestBody, + PostPatternIsNotAnchoredRequestBody, + PostPropertiesWithNullValuedInstancePropertiesRequestBody, + PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, + PostSmallMultipleOfLargeIntegerRequestBody, + PostAllofSimpleTypesRequestBody, + PostTypeArrayObjectOrNullRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, + PostUnevaluateditemsWithItemsRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, + PostOneofWithEmptySchemaRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, + PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, + PostTypeArrayObjectOrNullResponseBodyForContentTypes, + PostASchemaGivenForPrefixitemsRequestBody, + PostByIntRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, + PostUniqueitemsWithAnArrayOfItemsRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostPropertynamesValidationResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, + PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostIgnoreIfWithoutThenOrElseRequestBody, + PostTypeAsArrayWithOneItemResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostNotMultipleTypesResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostByIntResponseBodyForContentTypes, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, + PostIgnoreElseWithoutIfResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostTypeArrayOrObjectRequestBody, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostIfAndThenWithoutElseRequestBody, + PostIriFormatRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostSingleDependencyResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostItemsWithNullInstanceElementsRequestBody, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostExclusiveminimumValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostMultipleDependentsRequiredRequestBody, + PostIfAndElseWithoutThenRequestBody, + PostNotResponseBodyForContentTypes, + PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, + PostIdnEmailFormatResponseBodyForContentTypes, + PostIriFormatResponseBodyForContentTypes, + PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostMultipleDependentsRequiredResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostTimeFormatRequestBody, + PostMinimumValidationRequestBody, + PostByNumberResponseBodyForContentTypes, + PostDateFormatResponseBodyForContentTypes, + PostNonAsciiPatternWithAdditionalpropertiesRequestBody, + PostPatternValidationRequestBody, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostIgnoreElseWithoutIfRequestBody, + PostEmptyDependentsRequestBody, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, + PostMinitemsValidationRequestBody, + PostIgnoreThenWithoutIfResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostNotMultipleTypesRequestBody, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostItemsContainsRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, + PostAdditionalpropertiesWithSchemaRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, + PostContainsWithNullInstanceElementsRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostExclusivemaximumValidationRequestBody, + PostContainsKeywordValidationRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, + PostIfAndThenWithoutElseResponseBodyForContentTypes, + PostUuidFormatResponseBodyForContentTypes, + PostDateFormatRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostRelativeJsonPointerFormatResponseBodyForContentTypes, + PostTypeAsArrayWithOneItemRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostNonInterferenceAcrossCombinedSchemasRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, + PostEmptyDependentsResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, + PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostFloatDivisionInfRequestBody, + PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, + PostFloatDivisionInfResponseBodyForContentTypes, + PostConstNulCharactersInStringsResponseBodyForContentTypes, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, + PostUriTemplateFormatRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, + PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostConstNulCharactersInStringsRequestBody, + PostDurationFormatResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostIfAndElseWithoutThenResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostIdnEmailFormatRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostBySmallNumberRequestBody, + PostRegexFormatResponseBodyForContentTypes, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py new file mode 100644 index 00000000000..e7ebde52314 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody +from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody +from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody + + +class DependentRequiredApi( + PostMultipleDependentsRequiredRequestBody, + PostSingleDependencyRequestBody, + PostMultipleDependentsRequiredResponseBodyForContentTypes, + PostSingleDependencyResponseBodyForContentTypes, + PostEmptyDependentsResponseBodyForContentTypes, + PostEmptyDependentsRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py new file mode 100644 index 00000000000..458c97d7876 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody +from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody +from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes + + +class DependentSchemasApi( + PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, + PostDependentSchemasSingleDependencyResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyRequestBody, + PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, + PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py new file mode 100644 index 00000000000..c400dbc4bf5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes + + +class EnumApi( + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostEnumsInPropertiesRequestBody, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostNulCharactersInStringsRequestBody, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py new file mode 100644 index 00000000000..7581c95f124 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody + + +class ExclusiveMaximumApi( + PostExclusivemaximumValidationResponseBodyForContentTypes, + PostExclusivemaximumValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py new file mode 100644 index 00000000000..e663d09c9c8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody +from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes + + +class ExclusiveMinimumApi( + PostExclusiveminimumValidationRequestBody, + PostExclusiveminimumValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py new file mode 100644 index 00000000000..b29833cffa6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody +from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody +from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody +from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody +from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody + + +class FormatApi( + PostIriReferenceFormatRequestBody, + PostIpv4FormatRequestBody, + PostUuidFormatRequestBody, + PostTimeFormatResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostIdnEmailFormatResponseBodyForContentTypes, + PostIriFormatResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostUriFormatResponseBodyForContentTypes, + PostUriTemplateFormatRequestBody, + PostUuidFormatResponseBodyForContentTypes, + PostDateFormatRequestBody, + PostRegexFormatRequestBody, + PostTimeFormatRequestBody, + PostHostnameFormatResponseBodyForContentTypes, + PostRelativeJsonPointerFormatResponseBodyForContentTypes, + PostDateFormatResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostDurationFormatResponseBodyForContentTypes, + PostIriFormatRequestBody, + PostIpv4FormatResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostJsonPointerFormatRequestBody, + PostIdnHostnameFormatRequestBody, + PostRelativeJsonPointerFormatRequestBody, + PostUriReferenceFormatRequestBody, + PostIriReferenceFormatResponseBodyForContentTypes, + PostIdnEmailFormatRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostDurationFormatRequestBody, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostIdnHostnameFormatResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostUriTemplateFormatResponseBodyForContentTypes, + PostRegexFormatResponseBodyForContentTypes, + PostDateTimeFormatRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py new file mode 100644 index 00000000000..b801897c261 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody +from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody +from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody +from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody +from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody +from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody +from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody +from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody +from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes + + +class IfThenElseApi( + PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, + PostIfAndElseWithoutThenRequestBody, + PostIfAndThenWithoutElseRequestBody, + PostNonInterferenceAcrossCombinedSchemasRequestBody, + PostValidateAgainstCorrectBranchThenVsElseRequestBody, + PostIfAndElseWithoutThenResponseBodyForContentTypes, + PostIgnoreElseWithoutIfRequestBody, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, + PostIgnoreIfWithoutThenOrElseRequestBody, + PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, + PostIgnoreThenWithoutIfResponseBodyForContentTypes, + PostIgnoreElseWithoutIfResponseBodyForContentTypes, + PostIfAndThenWithoutElseResponseBodyForContentTypes, + PostIgnoreThenWithoutIfRequestBody, + PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py new file mode 100644 index 00000000000..95d79219e5c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody +from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes + + +class ItemsApi( + PostItemsWithNullInstanceElementsResponseBodyForContentTypes, + PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, + PostItemsWithNullInstanceElementsRequestBody, + PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, + PostNestedItemsResponseBodyForContentTypes, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, + PostNestedItemsRequestBody, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py new file mode 100644 index 00000000000..8660d5232a0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody + + +class MaxContainsApi( + PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py new file mode 100644 index 00000000000..5c14e1bcb55 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes + + +class MaxItemsApi( + PostMaxitemsValidationRequestBody, + PostMaxitemsValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py new file mode 100644 index 00000000000..33bba8bd6ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes + + +class MaxLengthApi( + PostMaxlengthValidationRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py new file mode 100644 index 00000000000..e43a4c5ff0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody + + +class MaxPropertiesApi( + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py new file mode 100644 index 00000000000..189f4853874 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes + + +class MaximumApi( + PostMaximumValidationResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py new file mode 100644 index 00000000000..87f50957cc8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody + + +class MinContainsApi( + PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostMincontainsWithoutContainsIsIgnoredRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py new file mode 100644 index 00000000000..f376dfad5dc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes + + +class MinItemsApi( + PostMinitemsValidationRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py new file mode 100644 index 00000000000..9b08098ac59 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody + + +class MinLengthApi( + PostMinlengthValidationResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py new file mode 100644 index 00000000000..4c23c49712c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes + + +class MinPropertiesApi( + PostMinpropertiesValidationRequestBody, + PostMinpropertiesValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py new file mode 100644 index 00000000000..8e892722855 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody + + +class MinimumApi( + PostMinimumValidationWithSignedIntegerRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostMinimumValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py new file mode 100644 index 00000000000..94f8db92c01 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class MultipleOfApi( + PostByNumberResponseBodyForContentTypes, + PostByIntRequestBody, + PostFloatDivisionInfRequestBody, + PostBySmallNumberResponseBodyForContentTypes, + PostFloatDivisionInfResponseBodyForContentTypes, + PostBySmallNumberRequestBody, + PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, + PostByNumberRequestBody, + PostSmallMultipleOfLargeIntegerRequestBody, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py new file mode 100644 index 00000000000..fbc8cb2a4aa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes + + +class NotApi( + PostNotMultipleTypesRequestBody, + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNotMultipleTypesResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py new file mode 100644 index 00000000000..ecf6cd1ffd6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes + + +class OneOfApi( + PostOneofWithBaseSchemaRequestBody, + PostOneofRequestBody, + PostOneofResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostOneofWithRequiredRequestBody, + PostOneofComplexTypesRequestBody, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostOneofWithEmptySchemaRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py new file mode 100644 index 00000000000..cc8b2895925 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody +from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody +from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody +from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody +from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody +from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody +from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody +from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody +from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody +from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody +from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody +from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody +from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody +from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody +from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody +from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody +from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody +from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody +from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody +from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody + + +class OperationRequestBodyApi( + PostIriReferenceFormatRequestBody, + PostUnevaluateditemsWithNullInstanceElementsRequestBody, + PostMinpropertiesValidationRequestBody, + PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, + PostAdditionalItemsAreAllowedByDefaultRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, + PostOneofWithRequiredRequestBody, + PostPrefixitemsWithNullInstanceElementsRequestBody, + PostUnevaluateditemsAsSchemaRequestBody, + PostMinlengthValidationRequestBody, + PostIntegerTypeMatchesIntegersRequestBody, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostTypeArrayOrObjectRequestBody, + PostAllofWithTheLastEmptySchemaRequestBody, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostIfAndThenWithoutElseRequestBody, + PostIriFormatRequestBody, + PostPropertiesWithEscapedCharactersRequestBody, + PostSimpleEnumValidationRequestBody, + PostRequiredWithEscapedCharactersRequestBody, + PostIdnHostnameFormatRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostRequiredDefaultValidationRequestBody, + PostDurationFormatRequestBody, + PostItemsWithNullInstanceElementsRequestBody, + PostRequiredWithEmptyArrayRequestBody, + PostExclusiveminimumValidationRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostAllofRequestBody, + PostUniqueitemsFalseValidationRequestBody, + PostMultipleDependentsRequiredRequestBody, + PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, + PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, + PostIfAndElseWithoutThenRequestBody, + PostUuidFormatRequestBody, + PostMaxcontainsWithoutContainsIsIgnoredRequestBody, + PostValidateAgainstCorrectBranchThenVsElseRequestBody, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostUnevaluatedpropertiesSchemaRequestBody, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostMaxlengthValidationRequestBody, + PostRegexFormatRequestBody, + PostNulCharactersInStringsRequestBody, + PostTimeFormatRequestBody, + PostMinimumValidationRequestBody, + PostNonAsciiPatternWithAdditionalpropertiesRequestBody, + PostUriFormatRequestBody, + PostOneofComplexTypesRequestBody, + PostPatternValidationRequestBody, + PostAllofCombinedWithAnyofOneofRequestBody, + PostJsonPointerFormatRequestBody, + PostIgnoreElseWithoutIfRequestBody, + PostEmptyDependentsRequestBody, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostRelativeJsonPointerFormatRequestBody, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, + PostMinitemsValidationRequestBody, + PostBooleanTypeMatchesBooleansRequestBody, + PostNotMultipleTypesRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, + PostNotRequestBody, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, + PostSingleDependencyRequestBody, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, + PostItemsContainsRequestBody, + PostDateTimeFormatRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, + PostMinimumValidationWithSignedIntegerRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, + PostAdditionalpropertiesWithSchemaRequestBody, + PostIpv4FormatRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostContainsWithNullInstanceElementsRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostAllofWithOneEmptySchemaRequestBody, + PostExclusivemaximumValidationRequestBody, + PostContainsKeywordValidationRequestBody, + PostDependentSchemasSingleDependencyRequestBody, + PostMincontainsWithoutContainsIsIgnoredRequestBody, + PostByNumberRequestBody, + PostDateFormatRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostIgnoreThenWithoutIfRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostAnyofComplexTypesRequestBody, + PostPropertynamesValidationRequestBody, + PostPatternIsNotAnchoredRequestBody, + PostPropertiesWithNullValuedInstancePropertiesRequestBody, + PostTypeAsArrayWithOneItemRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostNonInterferenceAcrossCombinedSchemasRequestBody, + PostIpv6FormatRequestBody, + PostSmallMultipleOfLargeIntegerRequestBody, + PostAllofSimpleTypesRequestBody, + PostTypeArrayObjectOrNullRequestBody, + PostUnevaluateditemsWithItemsRequestBody, + PostNumberTypeMatchesNumbersRequestBody, + PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, + PostOneofWithEmptySchemaRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMaxpropertiesValidationRequestBody, + PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostASchemaGivenForPrefixitemsRequestBody, + PostByIntRequestBody, + PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, + PostFloatDivisionInfRequestBody, + PostUniqueitemsWithAnArrayOfItemsRequestBody, + PostUriTemplateFormatRequestBody, + PostAnyofWithBaseSchemaRequestBody, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostConstNulCharactersInStringsRequestBody, + PostMaximumValidationRequestBody, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostIdnEmailFormatRequestBody, + PostIgnoreIfWithoutThenOrElseRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostBySmallNumberRequestBody, + PostEmailFormatRequestBody, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py new file mode 100644 index 00000000000..859f8228685 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py @@ -0,0 +1,591 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody +from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody +from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody +from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody +from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody +from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody +from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody +from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody +from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody +from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody +from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody +from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody +from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody +from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody +from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody +from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody +from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody +from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody +from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody +from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody +from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes +from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody +from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody +from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody +from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody +from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody +from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody +from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes +from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody +from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody +from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody +from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody +from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody +from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody +from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody +from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody +from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody +from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody +from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody +from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody +from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody +from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody +from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody +from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody +from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody +from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody +from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody +from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody +from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody +from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody +from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody +from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody +from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody +from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody +from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes +from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody +from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody +from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody +from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes +from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody +from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody +from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody +from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody +from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes +from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody +from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody + + +class PathPostApi( + PostIriReferenceFormatRequestBody, + PostUnevaluateditemsWithNullInstanceElementsRequestBody, + PostMinlengthValidationResponseBodyForContentTypes, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, + PostMinpropertiesValidationRequestBody, + PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, + PostAdditionalItemsAreAllowedByDefaultRequestBody, + PostEnumWithFalseDoesNotMatch0RequestBody, + PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, + PostEnumWithEscapedCharactersRequestBody, + PostOneofWithRequiredRequestBody, + PostPrefixitemsWithNullInstanceElementsRequestBody, + PostUnevaluateditemsAsSchemaRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, + PostMinlengthValidationRequestBody, + PostAdditionalpropertiesCanExistByItselfRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaRequestBody, + PostDateTimeFormatResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersRequestBody, + PostIdnHostnameFormatRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostIriReferenceFormatResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, + PostDurationFormatRequestBody, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostIdnHostnameFormatResponseBodyForContentTypes, + PostExclusiveminimumValidationRequestBody, + PostNotMoreComplexSchemaRequestBody, + PostAllofRequestBody, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostContainsKeywordValidationResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, + PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, + PostUuidFormatRequestBody, + PostTimeFormatResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredRequestBody, + PostValidateAgainstCorrectBranchThenVsElseRequestBody, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerRequestBody, + PostOneofWithRequiredResponseBodyForContentTypes, + PostUnevaluatedpropertiesSchemaRequestBody, + PostUnevaluateditemsWithItemsResponseBodyForContentTypes, + PostMaxitemsValidationRequestBody, + PostOneofRequestBody, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostItemsWithNullInstanceElementsResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostRegexFormatRequestBody, + PostNulCharactersInStringsRequestBody, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostItemsContainsResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostUriFormatRequestBody, + PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostOneofComplexTypesRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofRequestBody, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsRequestBody, + PostRelativeJsonPointerFormatRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, + PostNotRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostSingleDependencyRequestBody, + PostDateTimeFormatRequestBody, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerRequestBody, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, + PostIpv4FormatRequestBody, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostContainsWithNullInstanceElementsResponseBodyForContentTypes, + PostTypeArrayOrObjectResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostExclusivemaximumValidationResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyRequestBody, + PostMincontainsWithoutContainsIsIgnoredRequestBody, + PostByNumberRequestBody, + PostNestedOneofToCheckValidationSemanticsRequestBody, + PostIgnoreThenWithoutIfRequestBody, + PostAnyofComplexTypesRequestBody, + PostPropertynamesValidationRequestBody, + PostPatternIsNotAnchoredRequestBody, + PostPropertiesWithNullValuedInstancePropertiesRequestBody, + PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, + PostSmallMultipleOfLargeIntegerRequestBody, + PostAllofSimpleTypesRequestBody, + PostTypeArrayObjectOrNullRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, + PostUnevaluateditemsWithItemsRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, + PostOneofWithEmptySchemaRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, + PostAllofWithTheFirstEmptySchemaRequestBody, + PostMinimumValidationResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, + PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, + PostTypeArrayObjectOrNullResponseBodyForContentTypes, + PostASchemaGivenForPrefixitemsRequestBody, + PostByIntRequestBody, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, + PostUniqueitemsWithAnArrayOfItemsRequestBody, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostPropertynamesValidationResponseBodyForContentTypes, + PostAnyofWithBaseSchemaRequestBody, + PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, + PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1RequestBody, + PostAnyofRequestBody, + PostIgnoreIfWithoutThenOrElseRequestBody, + PostTypeAsArrayWithOneItemResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostNotMultipleTypesResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEmailFormatRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostByIntResponseBodyForContentTypes, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostHostnameFormatRequestBody, + PostObjectPropertiesValidationRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, + PostIgnoreElseWithoutIfResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseRequestBody, + PostTypeArrayOrObjectRequestBody, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostNestedItemsRequestBody, + PostRequiredValidationRequestBody, + PostIfAndThenWithoutElseRequestBody, + PostIriFormatRequestBody, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostSimpleEnumValidationRequestBody, + PostSingleDependencyResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersRequestBody, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostUriReferenceFormatRequestBody, + PostEnumWith1DoesNotMatchTrueRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostRequiredDefaultValidationRequestBody, + PostUriReferenceFormatResponseBodyForContentTypes, + PostItemsWithNullInstanceElementsRequestBody, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostRequiredWithEmptyArrayRequestBody, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostExclusiveminimumValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationRequestBody, + PostMultipleDependentsRequiredRequestBody, + PostIfAndElseWithoutThenRequestBody, + PostNotResponseBodyForContentTypes, + PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, + PostIdnEmailFormatResponseBodyForContentTypes, + PostIriFormatResponseBodyForContentTypes, + PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostMaxlengthValidationRequestBody, + PostMultipleDependentsRequiredResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostTimeFormatRequestBody, + PostMinimumValidationRequestBody, + PostByNumberResponseBodyForContentTypes, + PostDateFormatResponseBodyForContentTypes, + PostNonAsciiPatternWithAdditionalpropertiesRequestBody, + PostPatternValidationRequestBody, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostJsonPointerFormatRequestBody, + PostIgnoreElseWithoutIfRequestBody, + PostEmptyDependentsRequestBody, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, + PostMinitemsValidationRequestBody, + PostIgnoreThenWithoutIfResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostNotMultipleTypesRequestBody, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostItemsContainsRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, + PostOneofWithBaseSchemaRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, + PostAdditionalpropertiesWithSchemaRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, + PostContainsWithNullInstanceElementsRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaRequestBody, + PostExclusivemaximumValidationRequestBody, + PostContainsKeywordValidationRequestBody, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, + PostIfAndThenWithoutElseResponseBodyForContentTypes, + PostUuidFormatResponseBodyForContentTypes, + PostDateFormatRequestBody, + PostNestedAllofToCheckValidationSemanticsRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostRelativeJsonPointerFormatResponseBodyForContentTypes, + PostTypeAsArrayWithOneItemRequestBody, + PostAllofWithTwoEmptySchemasRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostNonInterferenceAcrossCombinedSchemasRequestBody, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostIpv6FormatRequestBody, + PostMaxlengthValidationResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostMaxpropertiesValidationRequestBody, + PostNestedItemsResponseBodyForContentTypes, + PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, + PostEmptyDependentsResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaRequestBody, + PostForbiddenPropertyRequestBody, + PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, + PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostFloatDivisionInfRequestBody, + PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, + PostFloatDivisionInfResponseBodyForContentTypes, + PostConstNulCharactersInStringsResponseBodyForContentTypes, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, + PostUriTemplateFormatRequestBody, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, + PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, + PostUniqueitemsValidationRequestBody, + PostMaxproperties0MeansTheObjectIsEmptyRequestBody, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostConstNulCharactersInStringsRequestBody, + PostDurationFormatResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostIfAndElseWithoutThenResponseBodyForContentTypes, + PostMaximumValidationRequestBody, + PostIdnEmailFormatRequestBody, + PostAdditionalpropertiesAreAllowedByDefaultRequestBody, + PostBySmallNumberRequestBody, + PostRegexFormatResponseBodyForContentTypes, + PostAllofWithBaseSchemaRequestBody, + PostEnumsInPropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py new file mode 100644 index 00000000000..5d2c7fa831b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody +from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes + + +class PatternApi( + PostPatternIsNotAnchoredRequestBody, + PostPatternValidationRequestBody, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py new file mode 100644 index 00000000000..136106d5b2e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes +from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody +from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody +from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody +from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes +from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody + + +class PatternPropertiesApi( + PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, + PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, + PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, + PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, + PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py new file mode 100644 index 00000000000..c2e051cb6a6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody +from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody +from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody +from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes + + +class PrefixItemsApi( + PostASchemaGivenForPrefixitemsRequestBody, + PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, + PostPrefixitemsWithNullInstanceElementsRequestBody, + PostAdditionalItemsAreAllowedByDefaultRequestBody, + PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, + PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py new file mode 100644 index 00000000000..462065c8597 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody +from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody +from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes +from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody +from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody +from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody +from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes + + +class PropertiesApi( + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostPropertiesWithNullValuedInstancePropertiesRequestBody, + PostObjectPropertiesValidationRequestBody, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, + PostPropertiesWithEscapedCharactersRequestBody, + PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py new file mode 100644 index 00000000000..0983e490ce8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes +from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody + + +class PropertyNamesApi( + PostPropertynamesValidationResponseBodyForContentTypes, + PostPropertynamesValidationRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py new file mode 100644 index 00000000000..04d781fd602 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody + + +class RefApi( + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py new file mode 100644 index 00000000000..c33cb00c3c1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody +from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody +from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody + + +class RequiredApi( + PostRequiredDefaultValidationRequestBody, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostRequiredValidationRequestBody, + PostRequiredWithEmptyArrayRequestBody, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersRequestBody, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py new file mode 100644 index 00000000000..ab2da787a68 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes +from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes +from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes +from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes +from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes +from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes +from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes +from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes +from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes +from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes +from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes + + +class ResponseContentContentTypeSchemaApi( + PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostMinlengthValidationResponseBodyForContentTypes, + PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, + PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, + PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, + PostIgnoreElseWithoutIfResponseBodyForContentTypes, + PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostHostnameFormatResponseBodyForContentTypes, + PostMinpropertiesValidationResponseBodyForContentTypes, + PostOneofResponseBodyForContentTypes, + PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, + PostDateTimeFormatResponseBodyForContentTypes, + PostEnumWithEscapedCharactersResponseBodyForContentTypes, + PostSingleDependencyResponseBodyForContentTypes, + PostIriReferenceFormatResponseBodyForContentTypes, + PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, + PostOneofComplexTypesResponseBodyForContentTypes, + PostPatternIsNotAnchoredResponseBodyForContentTypes, + PostMaximumValidationResponseBodyForContentTypes, + PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, + PostUriReferenceFormatResponseBodyForContentTypes, + PostJsonPointerFormatResponseBodyForContentTypes, + PostIpv6FormatResponseBodyForContentTypes, + PostRequiredWithEscapedCharactersResponseBodyForContentTypes, + PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, + PostIdnHostnameFormatResponseBodyForContentTypes, + PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, + PostAnyofWithBaseSchemaResponseBodyForContentTypes, + PostContainsKeywordValidationResponseBodyForContentTypes, + PostExclusiveminimumValidationResponseBodyForContentTypes, + PostSimpleEnumValidationResponseBodyForContentTypes, + PostNotResponseBodyForContentTypes, + PostTimeFormatResponseBodyForContentTypes, + PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, + PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, + PostIdnEmailFormatResponseBodyForContentTypes, + PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, + PostIriFormatResponseBodyForContentTypes, + PostOneofWithRequiredResponseBodyForContentTypes, + PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, + PostUnevaluateditemsWithItemsResponseBodyForContentTypes, + PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, + PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, + PostItemsWithNullInstanceElementsResponseBodyForContentTypes, + PostBySmallNumberResponseBodyForContentTypes, + PostMultipleDependentsRequiredResponseBodyForContentTypes, + PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostNulCharactersInStringsResponseBodyForContentTypes, + PostRequiredValidationResponseBodyForContentTypes, + PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, + PostForbiddenPropertyResponseBodyForContentTypes, + PostAllofResponseBodyForContentTypes, + PostEnumsInPropertiesResponseBodyForContentTypes, + PostItemsContainsResponseBodyForContentTypes, + PostByNumberResponseBodyForContentTypes, + PostDateFormatResponseBodyForContentTypes, + PostDependentSchemasSingleDependencyResponseBodyForContentTypes, + PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, + PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, + PostAllofWithBaseSchemaResponseBodyForContentTypes, + PostRequiredDefaultValidationResponseBodyForContentTypes, + PostRequiredWithEmptyArrayResponseBodyForContentTypes, + PostIpv4FormatResponseBodyForContentTypes, + PostAnyofComplexTypesResponseBodyForContentTypes, + PostIgnoreThenWithoutIfResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, + PostMinitemsValidationResponseBodyForContentTypes, + PostUriTemplateFormatResponseBodyForContentTypes, + PostOneofWithBaseSchemaResponseBodyForContentTypes, + PostMaxpropertiesValidationResponseBodyForContentTypes, + PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, + PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, + PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostContainsWithNullInstanceElementsResponseBodyForContentTypes, + PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, + PostTypeArrayOrObjectResponseBodyForContentTypes, + PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, + PostAllofWithOneEmptySchemaResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostAnyofResponseBodyForContentTypes, + PostExclusivemaximumValidationResponseBodyForContentTypes, + PostUriFormatResponseBodyForContentTypes, + PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, + PostIfAndThenWithoutElseResponseBodyForContentTypes, + PostUuidFormatResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, + PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostRelativeJsonPointerFormatResponseBodyForContentTypes, + PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, + PostObjectPropertiesValidationResponseBodyForContentTypes, + PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, + PostMaxlengthValidationResponseBodyForContentTypes, + PostPatternValidationResponseBodyForContentTypes, + PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, + PostMaxitemsValidationResponseBodyForContentTypes, + PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostNotMoreComplexSchemaResponseBodyForContentTypes, + PostMinimumValidationResponseBodyForContentTypes, + PostNestedItemsResponseBodyForContentTypes, + PostEmailFormatResponseBodyForContentTypes, + PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, + PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, + PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, + PostEmptyDependentsResponseBodyForContentTypes, + PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, + PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, + PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, + PostTypeArrayObjectOrNullResponseBodyForContentTypes, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, + PostFloatDivisionInfResponseBodyForContentTypes, + PostConstNulCharactersInStringsResponseBodyForContentTypes, + PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, + PostAllofSimpleTypesResponseBodyForContentTypes, + PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, + PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, + PostPropertynamesValidationResponseBodyForContentTypes, + PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, + PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, + PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, + PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, + PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, + PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, + PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, + PostDurationFormatResponseBodyForContentTypes, + PostOneofWithEmptySchemaResponseBodyForContentTypes, + PostIfAndElseWithoutThenResponseBodyForContentTypes, + PostTypeAsArrayWithOneItemResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostNotMultipleTypesResponseBodyForContentTypes, + PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, + PostRegexFormatResponseBodyForContentTypes, + PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, + PostByIntResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py new file mode 100644 index 00000000000..cb97e8de51f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody +from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody +from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody +from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes +from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody +from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody +from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes +from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes +from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes +from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes +from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes +from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody +from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody +from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody +from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes +from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody +from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody +from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody +from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes + + +class TypeApi( + PostTypeAsArrayWithOneItemRequestBody, + PostArrayTypeMatchesArraysRequestBody, + PostStringTypeMatchesStringsRequestBody, + PostObjectTypeMatchesObjectsResponseBodyForContentTypes, + PostTypeArrayOrObjectResponseBodyForContentTypes, + PostNullTypeMatchesOnlyTheNullObjectRequestBody, + PostTypeArrayObjectOrNullRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, + PostNumberTypeMatchesNumbersResponseBodyForContentTypes, + PostTypeArrayObjectOrNullResponseBodyForContentTypes, + PostTypeAsArrayWithOneItemResponseBodyForContentTypes, + PostArrayTypeMatchesArraysResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, + PostBooleanTypeMatchesBooleansRequestBody, + PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, + PostNumberTypeMatchesNumbersRequestBody, + PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, + PostIntegerTypeMatchesIntegersRequestBody, + PostObjectTypeMatchesObjectsRequestBody, + PostStringTypeMatchesStringsResponseBodyForContentTypes, + PostTypeArrayOrObjectRequestBody, + PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py new file mode 100644 index 00000000000..09e88266137 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody +from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody +from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody + + +class UnevaluatedItemsApi( + PostUnevaluateditemsWithNullInstanceElementsRequestBody, + PostUnevaluateditemsWithItemsResponseBodyForContentTypes, + PostUnevaluateditemsWithItemsRequestBody, + PostUnevaluateditemsAsSchemaRequestBody, + PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, + PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, + PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, + PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py new file mode 100644 index 00000000000..923d95ad6f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody +from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes +from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes +from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody +from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody + + +class UnevaluatedPropertiesApi( + PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, + PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, + PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, + PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, + PostUnevaluatedpropertiesSchemaRequestBody, + PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py new file mode 100644 index 00000000000..cb37ee072c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody +from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody +from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes +from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody +from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes +from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes + + +class UniqueItemsApi( + PostUniqueitemsFalseValidationRequestBody, + PostUniqueitemsValidationRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, + PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, + PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, + PostUniqueitemsWithAnArrayOfItemsRequestBody, + PostUniqueitemsValidationResponseBodyForContentTypes, + PostUniqueitemsFalseValidationResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py new file mode 100644 index 00000000000..e3edab2dc1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py new file mode 100644 index 00000000000..f25e38185d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ASchemaGivenForPrefixitemsTuple( + typing.Tuple[ + int, + str, + typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] + ] +): + + def __new__(cls, arg: typing.Union[ASchemaGivenForPrefixitemsTupleInput, ASchemaGivenForPrefixitemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ASchemaGivenForPrefixitems.validate(arg, configuration=configuration) +ASchemaGivenForPrefixitemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + int, + str, + typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] + ] +] +_0: typing_extensions.TypeAlias = schemas.IntSchema +_1: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class ASchemaGivenForPrefixitems( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ASchemaGivenForPrefixitemsTuple], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + prefix_items: typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + ] = ( + _0, + _1, + ) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ASchemaGivenForPrefixitemsTuple, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py new file mode 100644 index 00000000000..60b52116b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class AdditionalItemsAreAllowedByDefaultTuple( + typing.Tuple[ + int, + typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] + ] +): + + def __new__(cls, arg: typing.Union[AdditionalItemsAreAllowedByDefaultTupleInput, AdditionalItemsAreAllowedByDefaultTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return AdditionalItemsAreAllowedByDefault.validate(arg, configuration=configuration) +AdditionalItemsAreAllowedByDefaultTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + int, + typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] + ] +] +_0: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class AdditionalItemsAreAllowedByDefault( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], AdditionalItemsAreAllowedByDefaultTuple], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + prefix_items: typing.Tuple[ + typing.Type[_0], + ] = ( + _0, + ) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: AdditionalItemsAreAllowedByDefaultTuple, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py new file mode 100644 index 00000000000..be297b23981 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class AdditionalpropertiesAreAllowedByDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AdditionalpropertiesAreAllowedByDefaultDictInput, arg_) + return AdditionalpropertiesAreAllowedByDefault.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesAreAllowedByDefaultDictInput, + AdditionalpropertiesAreAllowedByDefaultDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesAreAllowedByDefaultDict: + return AdditionalpropertiesAreAllowedByDefault.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AdditionalpropertiesAreAllowedByDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesAreAllowedByDefault( + schemas.AnyTypeSchema[AdditionalpropertiesAreAllowedByDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesAreAllowedByDefaultDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py new file mode 100644 index 00000000000..5e73cc40d6a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema + + +class AdditionalpropertiesCanExistByItselfDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(AdditionalpropertiesCanExistByItselfDictInput, kwargs) + return AdditionalpropertiesCanExistByItself.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesCanExistByItselfDictInput, + AdditionalpropertiesCanExistByItselfDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesCanExistByItselfDict: + return AdditionalpropertiesCanExistByItself.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesCanExistByItselfDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesCanExistByItself( + schemas.Schema[AdditionalpropertiesCanExistByItselfDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesCanExistByItselfDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalpropertiesCanExistByItselfDictInput, + AdditionalpropertiesCanExistByItselfDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesCanExistByItselfDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py new file mode 100644 index 00000000000..0af01b4cf54 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +class AdditionalpropertiesDoesNotLookInApplicatorsDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(AdditionalpropertiesDoesNotLookInApplicatorsDictInput, kwargs) + return AdditionalpropertiesDoesNotLookInApplicators.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesDoesNotLookInApplicatorsDictInput, + AdditionalpropertiesDoesNotLookInApplicatorsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesDoesNotLookInApplicatorsDict: + return AdditionalpropertiesDoesNotLookInApplicators.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesDoesNotLookInApplicatorsDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesDoesNotLookInApplicators( + schemas.AnyTypeSchema[AdditionalpropertiesDoesNotLookInApplicatorsDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesDoesNotLookInApplicatorsDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py new file mode 100644 index 00000000000..eb5d99a7271 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NoneSchema + + +class AdditionalpropertiesWithNullValuedInstancePropertiesDict(schemas.immutabledict[str, None]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: None, + ): + used_kwargs = typing.cast(AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, kwargs) + return AdditionalpropertiesWithNullValuedInstanceProperties.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, + AdditionalpropertiesWithNullValuedInstancePropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesWithNullValuedInstancePropertiesDict: + return AdditionalpropertiesWithNullValuedInstanceProperties.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[None, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + None, + val + ) +AdditionalpropertiesWithNullValuedInstancePropertiesDictInput = typing.Mapping[ + str, + None, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesWithNullValuedInstanceProperties( + schemas.Schema[AdditionalpropertiesWithNullValuedInstancePropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesWithNullValuedInstancePropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, + AdditionalpropertiesWithNullValuedInstancePropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesWithNullValuedInstancePropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py new file mode 100644 index 00000000000..6a572c78edc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class AdditionalpropertiesWithSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AdditionalpropertiesWithSchemaDictInput, arg_) + return AdditionalpropertiesWithSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalpropertiesWithSchemaDictInput, + AdditionalpropertiesWithSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesWithSchemaDict: + return AdditionalpropertiesWithSchema.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +AdditionalpropertiesWithSchemaDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + bool, + ] +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalpropertiesWithSchema( + schemas.Schema[AdditionalpropertiesWithSchemaDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalpropertiesWithSchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalpropertiesWithSchemaDictInput, + AdditionalpropertiesWithSchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalpropertiesWithSchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py new file mode 100644 index 00000000000..36eab71226e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AllOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Allof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py new file mode 100644 index 00000000000..21eaaca3407 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _03( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + +AllOf = typing.Tuple[ + typing.Type[_03], +] + + +@dataclasses.dataclass(frozen=True) +class _02( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 3 + +AnyOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 5 + +OneOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class AllofCombinedWithAnyofOneof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py new file mode 100644 index 00000000000..3ae0ad99045 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_maximum: typing.Union[int, float] = 30 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 20 + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofSimpleTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py new file mode 100644 index 00000000000..1c85ad3c380 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Baz: typing_extensions.TypeAlias = schemas.NoneSchema +Properties3 = typing.TypedDict( + 'Properties3', + { + "baz": typing.Type[Baz], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "baz", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + baz: None, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "baz": baz, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def baz(self) -> None: + return typing.cast( + None, + self.__getitem__("baz") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "baz", + }) + properties: Properties3 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties3)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class AllofWithBaseSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(AllofWithBaseSchemaDictInput, arg_) + return AllofWithBaseSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AllofWithBaseSchemaDictInput, + AllofWithBaseSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AllofWithBaseSchemaDict: + return AllofWithBaseSchema.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AllofWithBaseSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AllofWithBaseSchema( + schemas.AnyTypeSchema[AllofWithBaseSchemaDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AllofWithBaseSchemaDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py new file mode 100644 index 00000000000..4c1dfa6e55b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithOneEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py new file mode 100644 index 00000000000..52fb972186b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +_1: typing_extensions.TypeAlias = schemas.NumberSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTheFirstEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py new file mode 100644 index 00000000000..8019bc8d0c7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTheLastEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py new file mode 100644 index 00000000000..63bb8100aab --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AllofWithTwoEmptySchemas( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py new file mode 100644 index 00000000000..7757b765ca6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 2 + +AnyOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Anyof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py new file mode 100644 index 00000000000..c24467347b3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofComplexTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py new file mode 100644 index 00000000000..0c0c672429b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 2 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_length: int = 4 + +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofWithBaseSchema( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py new file mode 100644 index 00000000000..0589eabc829 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class AnyofWithOneEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py new file mode 100644 index 00000000000..7ca16341a82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +ArrayTypeMatchesArrays: typing_extensions.TypeAlias = schemas.ListSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py new file mode 100644 index 00000000000..2dfb02c2e0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +BooleanTypeMatchesBooleans: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py new file mode 100644 index 00000000000..b140ae55565 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ByInt( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py new file mode 100644 index 00000000000..5cbfe70a6d6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ByNumber( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 1.5 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py new file mode 100644 index 00000000000..e265cc881ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class BySmallNumber( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + multiple_of: typing.Union[int, float] = 0.00010 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py new file mode 100644 index 00000000000..a33c47c4b70 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ConstNulCharactersInStringsConst: + + @schemas.classproperty + def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: + return ConstNulCharactersInStrings.validate("hello\x00there") + + +@dataclasses.dataclass(frozen=True) +class ConstNulCharactersInStrings( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "hello\x00there": "HELLO_NULL_THERE", + } + ) + const = ConstNulCharactersInStringsConst + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py new file mode 100644 index 00000000000..1a611281267 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Contains( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 5 + + + +@dataclasses.dataclass(frozen=True) +class ContainsKeywordValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py new file mode 100644 index 00000000000..eea9302179a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Contains: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class ContainsWithNullInstanceElements( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py new file mode 100644 index 00000000000..466cfa2bcd8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'date' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py new file mode 100644 index 00000000000..c6946ac5ae3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateTimeFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'date-time' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py new file mode 100644 index 00000000000..b2250a5907f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class FooTbar( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_properties: int = 4 + + + +class FoobarDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo\"bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + } + arg_.update(kwargs) + used_arg_ = typing.cast(FoobarDictInput, arg_) + return Foobar.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FoobarDictInput, + FoobarDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FoobarDict: + return Foobar.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FoobarDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Foobar( + schemas.AnyTypeSchema[FoobarDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo\"bar", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FoobarDict, + } + ) + +DependentSchemas = typing.TypedDict( + 'DependentSchemas', + { + "foo\tbar": typing.Type[FooTbar], + "foo'bar": typing.Type[Foobar], + } +) + + +@dataclasses.dataclass(frozen=True) +class DependentSchemasDependenciesWithEscapedCharacters( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py new file mode 100644 index 00000000000..68492e9ed3f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py @@ -0,0 +1,197 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "bar": typing.Type[Bar], + } +) + + +class FooDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + + def __new__( + cls, + *, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(FooDictInput, arg_) + return Foo2.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FooDictInput, + FooDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FooDict: + return Foo2.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +FooDictInput = typing.TypedDict( + 'FooDictInput', + { + "bar": typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class Foo2( + schemas.Schema[FooDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FooDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FooDictInput, + FooDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FooDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +DependentSchemas = typing.TypedDict( + 'DependentSchemas', + { + "foo": typing.Type[Foo2], + } +) +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class DependentSchemasDependentSubschemaIncompatibleWithRootDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(DependentSchemasDependentSubschemaIncompatibleWithRootDictInput, arg_) + return DependentSchemasDependentSubschemaIncompatibleWithRoot.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + DependentSchemasDependentSubschemaIncompatibleWithRootDictInput, + DependentSchemasDependentSubschemaIncompatibleWithRootDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DependentSchemasDependentSubschemaIncompatibleWithRootDict: + return DependentSchemasDependentSubschemaIncompatibleWithRoot.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +DependentSchemasDependentSubschemaIncompatibleWithRootDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class DependentSchemasDependentSubschemaIncompatibleWithRoot( + schemas.AnyTypeSchema[DependentSchemasDependentSubschemaIncompatibleWithRootDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: DependentSchemasDependentSubschemaIncompatibleWithRootDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py new file mode 100644 index 00000000000..c50bca5f799 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.IntSchema +Bar2: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar2], + } +) + + +class BarDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(BarDictInput, arg_) + return Bar.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + BarDictInput, + BarDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BarDict: + return Bar.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[int, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def bar(self) -> typing.Union[int, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +BarDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Bar( + schemas.AnyTypeSchema[BarDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: BarDict, + } + ) + +DependentSchemas = typing.TypedDict( + 'DependentSchemas', + { + "bar": typing.Type[Bar], + } +) + + +@dataclasses.dataclass(frozen=True) +class DependentSchemasSingleDependency( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py new file mode 100644 index 00000000000..a76c0704c50 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DurationFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'duration' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py new file mode 100644 index 00000000000..f3c809a48b1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class EmailFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'email' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py new file mode 100644 index 00000000000..b8f36ca490c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class EmptyDependents( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( + default_factory=lambda: { + "bar": { + }, + } + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py new file mode 100644 index 00000000000..db151bca44c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWith0DoesNotMatchFalseEnums: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal[0]: + return EnumWith0DoesNotMatchFalse.validate(0) + + +@dataclasses.dataclass(frozen=True) +class EnumWith0DoesNotMatchFalse( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 0: "POSITIVE_0", + } + ) + enums = EnumWith0DoesNotMatchFalseEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[0], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py new file mode 100644 index 00000000000..0cd21f6929d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWith1DoesNotMatchTrueEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return EnumWith1DoesNotMatchTrue.validate(1) + + +@dataclasses.dataclass(frozen=True) +class EnumWith1DoesNotMatchTrue( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + } + ) + enums = EnumWith1DoesNotMatchTrueEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py new file mode 100644 index 00000000000..45dc81b21fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithEscapedCharactersEnums: + + @schemas.classproperty + def FOO_LINE_FEED_LF_BAR(cls) -> typing.Literal["foo\nbar"]: + return EnumWithEscapedCharacters.validate("foo\nbar") + + @schemas.classproperty + def FOO_CARRIAGE_RETURN_CR_BAR(cls) -> typing.Literal["foo\rbar"]: + return EnumWithEscapedCharacters.validate("foo\rbar") + + +@dataclasses.dataclass(frozen=True) +class EnumWithEscapedCharacters( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "foo\nbar": "FOO_LINE_FEED_LF_BAR", + "foo\rbar": "FOO_CARRIAGE_RETURN_CR_BAR", + } + ) + enums = EnumWithEscapedCharactersEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo\nbar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\nbar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo\rbar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\rbar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo\nbar","foo\rbar",]: ... + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "foo\nbar", + "foo\rbar", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "foo\nbar", + "foo\rbar", + ], + validated_arg + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py new file mode 100644 index 00000000000..9cc720a6276 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithFalseDoesNotMatch0Enums: + + @schemas.classproperty + def FALSE(cls) -> typing.Literal[False]: + return EnumWithFalseDoesNotMatch0.validate(False) + + +@dataclasses.dataclass(frozen=True) +class EnumWithFalseDoesNotMatch0( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + schemas.Bool.FALSE: "FALSE", + } + ) + enums = EnumWithFalseDoesNotMatch0Enums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False,]: ... + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + False, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + False, + ], + validated_arg + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py new file mode 100644 index 00000000000..1b1407e8837 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumWithTrueDoesNotMatch1Enums: + + @schemas.classproperty + def TRUE(cls) -> typing.Literal[True]: + return EnumWithTrueDoesNotMatch1.validate(True) + + +@dataclasses.dataclass(frozen=True) +class EnumWithTrueDoesNotMatch1( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + schemas.Bool.TRUE: "TRUE", + } + ) + enums = EnumWithTrueDoesNotMatch1Enums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True,]: ... + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + True, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + True, + ], + validated_arg + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py new file mode 100644 index 00000000000..0f26a8e8ce7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class FooEnums: + + @schemas.classproperty + def FOO(cls) -> typing.Literal["foo"]: + return Foo.validate("foo") + + +@dataclasses.dataclass(frozen=True) +class Foo( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "foo": "FOO", + } + ) + enums = FooEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["foo"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["foo",]: ... + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "foo", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "foo", + ], + validated_arg + ) + + +class BarEnums: + + @schemas.classproperty + def BAR(cls) -> typing.Literal["bar"]: + return Bar.validate("bar") + + +@dataclasses.dataclass(frozen=True) +class Bar( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "bar": "BAR", + } + ) + enums = BarEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["bar"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["bar"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["bar",]: ... + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "bar", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "bar", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class EnumsInPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + bar: typing.Literal[ + "bar" + ], + foo: typing.Union[ + typing.Literal[ + "foo" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(EnumsInPropertiesDictInput, arg_) + return EnumsInProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + EnumsInPropertiesDictInput, + EnumsInPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumsInPropertiesDict: + return EnumsInProperties.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Literal["bar"]: + return typing.cast( + typing.Literal["bar"], + self.__getitem__("bar") + ) + + @property + def foo(self) -> typing.Union[typing.Literal["foo"], schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["foo"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +EnumsInPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class EnumsInProperties( + schemas.Schema[EnumsInPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: EnumsInPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EnumsInPropertiesDictInput, + EnumsInPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumsInPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py new file mode 100644 index 00000000000..a72994bc205 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ExclusivemaximumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + exclusive_maximum: typing.Union[int, float] = 3.0 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py new file mode 100644 index 00000000000..8dfe03ac690 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ExclusiveminimumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + exclusive_minimum: typing.Union[int, float] = 1.1 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py new file mode 100644 index 00000000000..6b12e09da60 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class FloatDivisionInf( + schemas.IntSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + multiple_of: typing.Union[int, float] = 0.123456789 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py new file mode 100644 index 00000000000..134c59d5552 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +@dataclasses.dataclass(frozen=True) +class Foo( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class ForbiddenPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ForbiddenPropertyDictInput, arg_) + return ForbiddenProperty.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ForbiddenPropertyDictInput, + ForbiddenPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ForbiddenPropertyDict: + return ForbiddenProperty.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ForbiddenPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ForbiddenProperty( + schemas.AnyTypeSchema[ForbiddenPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ForbiddenPropertyDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py new file mode 100644 index 00000000000..f3b377a8b0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class HostnameFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'hostname' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py new file mode 100644 index 00000000000..390c3a748d4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IdnEmailFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'idn-email' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py new file mode 100644 index 00000000000..f41c6645e51 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IdnHostnameFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'idn-hostname' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py new file mode 100644 index 00000000000..911e889df8c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Else( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + exclusive_maximum: typing.Union[int, float] = 0 + + + +@dataclasses.dataclass(frozen=True) +class IfAndElseWithoutThen( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py new file mode 100644 index 00000000000..3fe99a49324 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + exclusive_maximum: typing.Union[int, float] = 0 + + + +@dataclasses.dataclass(frozen=True) +class Then( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = -10 + + + +@dataclasses.dataclass(frozen=True) +class IfAndThenWithoutElse( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py new file mode 100644 index 00000000000..2f568f6407f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ElseConst: + + @schemas.classproperty + def OTHER(cls) -> typing.Literal["other"]: + return Else.validate("other") + + +@dataclasses.dataclass(frozen=True) +class Else( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "other": "OTHER", + } + ) + const = ElseConst + + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 4 + + + +class ThenConst: + + @schemas.classproperty + def YES(cls) -> typing.Literal["yes"]: + return Then.validate("yes") + + +@dataclasses.dataclass(frozen=True) +class Then( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "yes": "YES", + } + ) + const = ThenConst + + + +@dataclasses.dataclass(frozen=True) +class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py new file mode 100644 index 00000000000..1e1c7b1770a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ElseConst: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal["0"]: + return Else.validate("0") + + +@dataclasses.dataclass(frozen=True) +class Else( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "0": "POSITIVE_0", + } + ) + const = ElseConst + + + +@dataclasses.dataclass(frozen=True) +class IgnoreElseWithoutIf( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py new file mode 100644 index 00000000000..d19961151f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class IfConst: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal["0"]: + return If.validate("0") + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "0": "POSITIVE_0", + } + ) + const = IfConst + + + +@dataclasses.dataclass(frozen=True) +class IgnoreIfWithoutThenOrElse( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py new file mode 100644 index 00000000000..95bcbe336ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ThenConst: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal["0"]: + return Then.validate("0") + + +@dataclasses.dataclass(frozen=True) +class Then( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "0": "POSITIVE_0", + } + ) + const = ThenConst + + + +@dataclasses.dataclass(frozen=True) +class IgnoreThenWithoutIf( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py new file mode 100644 index 00000000000..6d8cf46cdbf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +IntegerTypeMatchesIntegers: typing_extensions.TypeAlias = schemas.IntSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py new file mode 100644 index 00000000000..4855bb77ab2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Ipv4Format( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'ipv4' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py new file mode 100644 index 00000000000..de4ca06741e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Ipv6Format( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'ipv6' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py new file mode 100644 index 00000000000..bb91eda56cc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IriFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'iri' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py new file mode 100644 index 00000000000..70e9d058ca6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IriReferenceFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'iri-reference' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py new file mode 100644 index 00000000000..8c141a47c08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Contains( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 3 + + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + + + +class ItemsContainsTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsContainsTupleInput, ItemsContainsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ItemsContains.validate(arg, configuration=configuration) +ItemsContainsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ItemsContains( + schemas.Schema[schemas.immutabledict, ItemsContainsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsContainsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsContainsTupleInput, + ItemsContainsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsContainsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py new file mode 100644 index 00000000000..09fa12a88ea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 5 + + + +class ItemsDoesNotLookInApplicatorsValidCaseTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsDoesNotLookInApplicatorsValidCaseTupleInput, ItemsDoesNotLookInApplicatorsValidCaseTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ItemsDoesNotLookInApplicatorsValidCase.validate(arg, configuration=configuration) +ItemsDoesNotLookInApplicatorsValidCaseTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ItemsDoesNotLookInApplicatorsValidCase( + schemas.Schema[schemas.immutabledict, ItemsDoesNotLookInApplicatorsValidCaseTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsDoesNotLookInApplicatorsValidCaseTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsDoesNotLookInApplicatorsValidCaseTupleInput, + ItemsDoesNotLookInApplicatorsValidCaseTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsDoesNotLookInApplicatorsValidCaseTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py new file mode 100644 index 00000000000..c75b2b85190 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.NoneSchema + + +class ItemsWithNullInstanceElementsTuple( + typing.Tuple[ + None, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsWithNullInstanceElementsTupleInput, ItemsWithNullInstanceElementsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ItemsWithNullInstanceElements.validate(arg, configuration=configuration) +ItemsWithNullInstanceElementsTupleInput = typing.Union[ + typing.List[ + None, + ], + typing.Tuple[ + None, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ItemsWithNullInstanceElements( + schemas.Schema[schemas.immutabledict, ItemsWithNullInstanceElementsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsWithNullInstanceElementsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsWithNullInstanceElementsTupleInput, + ItemsWithNullInstanceElementsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsWithNullInstanceElementsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py new file mode 100644 index 00000000000..24f683db206 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class JsonPointerFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'json-pointer' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py new file mode 100644 index 00000000000..c565610bdbd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxcontainsWithoutContainsIsIgnored( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py new file mode 100644 index 00000000000..c2133390df2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaximumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_maximum: typing.Union[int, float] = 3.0 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py new file mode 100644 index 00000000000..948908c3abb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaximumValidationWithUnsignedInteger( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_maximum: typing.Union[int, float] = 300 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py new file mode 100644 index 00000000000..69a196af7a0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_items: int = 2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py new file mode 100644 index 00000000000..9337f83cc1d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxlengthValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_length: int = 2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py new file mode 100644 index 00000000000..b98f828c08a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Maxproperties0MeansTheObjectIsEmpty( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_properties: int = 0 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py new file mode 100644 index 00000000000..65a8e84bdfd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MaxpropertiesValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + max_properties: int = 2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py new file mode 100644 index 00000000000..a94435d02db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MincontainsWithoutContainsIsIgnored( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py new file mode 100644 index 00000000000..7f8ad8a2a35 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinimumValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_minimum: typing.Union[int, float] = 1.1 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py new file mode 100644 index 00000000000..0c6b8bfbaca --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinimumValidationWithSignedInteger( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + inclusive_minimum: typing.Union[int, float] = -2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py new file mode 100644 index 00000000000..f4fa4d9774b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_items: int = 1 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py new file mode 100644 index 00000000000..8673b92ea66 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinlengthValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_length: int = 2 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py new file mode 100644 index 00000000000..c06aec223ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MinpropertiesValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + min_properties: int = 1 + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py new file mode 100644 index 00000000000..1f96d76d966 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MultipleDependentsRequired( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( + default_factory=lambda: { + "quux": { + "foo", + "bar", + }, + } + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py new file mode 100644 index 00000000000..ef1be48a50f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +A: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class Aaa( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_maximum: typing.Union[int, float] = 20 + + + +@dataclasses.dataclass(frozen=True) +class MultipleSimultaneousPatternpropertiesAreValidated( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'a*' # noqa: E501 + ): A, + schemas.PatternInfo( + pattern=r'aaa*' # noqa: E501 + ): Aaa, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py new file mode 100644 index 00000000000..8590a90ddfb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class MultipleTypesCanBeSpecifiedInAnArray( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + str, + }) + format: str = 'int' + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py new file mode 100644 index 00000000000..79e2d4188c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +AllOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +AllOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedAllofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py new file mode 100644 index 00000000000..261b6e985ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +AnyOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + +AnyOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedAnyofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py new file mode 100644 index 00000000000..7920ab20f97 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items4: typing_extensions.TypeAlias = schemas.NumberSchema + + +class ItemsTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items3.validate(arg, configuration=configuration) +ItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items3( + schemas.Schema[schemas.immutabledict, ItemsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput, + ItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ItemsTuple2( + typing.Tuple[ + ItemsTuple, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items2.validate(arg, configuration=configuration) +ItemsTupleInput2 = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items2( + schemas.Schema[schemas.immutabledict, ItemsTuple2] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple2 + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput2, + ItemsTuple2, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple2: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ItemsTuple3( + typing.Tuple[ + ItemsTuple2, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput3, ItemsTuple3], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items.validate(arg, configuration=configuration) +ItemsTupleInput3 = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema[schemas.immutabledict, ItemsTuple3] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple3 + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput3, + ItemsTuple3, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple3: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class NestedItemsTuple( + typing.Tuple[ + ItemsTuple3, + ... + ] +): + + def __new__(cls, arg: typing.Union[NestedItemsTupleInput, NestedItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return NestedItems.validate(arg, configuration=configuration) +NestedItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput3, + ItemsTuple3 + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput3, + ItemsTuple3 + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class NestedItems( + schemas.Schema[schemas.immutabledict, NestedItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: NestedItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NestedItemsTupleInput, + NestedItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NestedItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py new file mode 100644 index 00000000000..a7845141254 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_02: typing_extensions.TypeAlias = schemas.NoneSchema +OneOf = typing.Tuple[ + typing.Type[_02], +] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + +OneOf2 = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class NestedOneofToCheckValidationSemantics( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py new file mode 100644 index 00000000000..45d3e08a17d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +CircumflexAccentLatinSmallLetterAWithAcute: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class NonAsciiPatternWithAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + # map with no key value pairs + def __new__( + cls, + arg: NonAsciiPatternWithAdditionalpropertiesDictInput, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return NonAsciiPatternWithAdditionalproperties.validate(arg, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NonAsciiPatternWithAdditionalpropertiesDictInput, + NonAsciiPatternWithAdditionalpropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NonAsciiPatternWithAdditionalpropertiesDict: + return NonAsciiPatternWithAdditionalproperties.validate(arg, configuration=configuration) +NonAsciiPatternWithAdditionalpropertiesDictInput = typing.Mapping # mapping must be empty + + +@dataclasses.dataclass(frozen=True) +class NonAsciiPatternWithAdditionalproperties( + schemas.Schema[NonAsciiPatternWithAdditionalpropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'^á' # noqa: E501 + ): CircumflexAccentLatinSmallLetterAWithAcute, + } + ) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NonAsciiPatternWithAdditionalpropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NonAsciiPatternWithAdditionalpropertiesDictInput, + NonAsciiPatternWithAdditionalpropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NonAsciiPatternWithAdditionalpropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py new file mode 100644 index 00000000000..61fbc53bf4c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + exclusive_maximum: typing.Union[int, float] = 0 + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + + + +@dataclasses.dataclass(frozen=True) +class Then( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = -10 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore + + + +@dataclasses.dataclass(frozen=True) +class Else( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + + + +@dataclasses.dataclass(frozen=True) +class _2( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + typing.Type[_2], +] + + +@dataclasses.dataclass(frozen=True) +class NonInterferenceAcrossCombinedSchemas( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py new file mode 100644 index 00000000000..f6664c76896 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not2: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py new file mode 100644 index 00000000000..355f7902bc7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class NotDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(NotDictInput, arg_) + return Not.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NotDictInput, + NotDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NotDict: + return Not.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[str, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +NotDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.Schema[NotDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NotDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NotDictInput, + NotDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NotDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class NotMoreComplexSchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py new file mode 100644 index 00000000000..3bfb09f6693 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + schemas.Bool, + }) + format: str = 'int' + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class NotMultipleTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py new file mode 100644 index 00000000000..bed0a8ca7ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class NulCharactersInStringsEnums: + + @schemas.classproperty + def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: + return NulCharactersInStrings.validate("hello\x00there") + + +@dataclasses.dataclass(frozen=True) +class NulCharactersInStrings( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "hello\x00there": "HELLO_NULL_THERE", + } + ) + enums = NulCharactersInStringsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["hello\x00there"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["hello\x00there"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["hello\x00there",]: ... + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "hello\x00there", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "hello\x00there", + ], + validated_arg + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py new file mode 100644 index 00000000000..d99e9d3782b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +NullTypeMatchesOnlyTheNullObject: typing_extensions.TypeAlias = schemas.NoneSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py new file mode 100644 index 00000000000..66bc8b3d57b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +NumberTypeMatchesNumbers: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py new file mode 100644 index 00000000000..0bbd62c5796 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.IntSchema +Bar: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class ObjectPropertiesValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectPropertiesValidationDictInput, arg_) + return ObjectPropertiesValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectPropertiesValidationDictInput, + ObjectPropertiesValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectPropertiesValidationDict: + return ObjectPropertiesValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[int, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectPropertiesValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectPropertiesValidation( + schemas.AnyTypeSchema[ObjectPropertiesValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectPropertiesValidationDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py new file mode 100644 index 00000000000..aa4da781b99 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +ObjectTypeMatchesObjects: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py new file mode 100644 index 00000000000..e39a8a21e99 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = 2 + +OneOf2 = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Oneof( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py new file mode 100644 index 00000000000..b21ba65ba5c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + } +) + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> int: + return typing.cast( + int, + self.__getitem__("bar") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "foo": typing.Type[Foo], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + foo: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def foo(self) -> str: + return typing.cast( + str, + self.__getitem__("foo") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofComplexTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py new file mode 100644 index 00000000000..984d7abc544 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_length: int = 2 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 4 + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithBaseSchema( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py new file mode 100644 index 00000000000..6591242da44 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NumberSchema +_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithEmptySchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py new file mode 100644 index 00000000000..bbeedc78bc7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "bar": bar, + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_0DictInput, arg_) + return _0.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + @property + def bar(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("bar") + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "bar", + "foo", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict, + } + ) + + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "baz", + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + baz: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "baz": baz, + "foo": foo, + } + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def baz(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("baz") + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + required: typing.FrozenSet[str] = frozenset({ + "baz", + "foo", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict, + } + ) + +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class OneofWithRequired( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py new file mode 100644 index 00000000000..035f8e495c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PatternIsNotAnchored( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'a+' # noqa: E501 + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py new file mode 100644 index 00000000000..126c3273361 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PatternValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^a*$' # noqa: E501 + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py new file mode 100644 index 00000000000..6e8e8597ada --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +FO: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class PatternpropertiesValidatesPropertiesMatchingARegex( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'f.*o' # noqa: E501 + ): FO, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py new file mode 100644 index 00000000000..c1ad822813a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class PatternpropertiesWithNullValuedInstanceProperties( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'^.*bar$' # noqa: E501 + ): Bar, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py new file mode 100644 index 00000000000..1f8d58ac646 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.IntSchema + + +class PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple( + typing.Tuple[ + str, + typing_extensions.Unpack[typing.Tuple[ + int, + ... + ]] + ] +): + + def __new__(cls, arg: typing.Union[PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return PrefixitemsValidationAdjustsTheStartingIndexForItems.validate(arg, configuration=configuration) +PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + str, + ], + ], + typing.Tuple[ + str, + typing_extensions.Unpack[typing.Tuple[ + int, + ... + ]] + ] +] +_0: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class PrefixitemsValidationAdjustsTheStartingIndexForItems( + schemas.Schema[schemas.immutabledict, PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + prefix_items: typing.Tuple[ + typing.Type[_0], + ] = ( + _0, + ) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, + PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py new file mode 100644 index 00000000000..dfea03db69d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class PrefixitemsWithNullInstanceElementsTuple( + typing.Tuple[ + None, + typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] + ] +): + + def __new__(cls, arg: typing.Union[PrefixitemsWithNullInstanceElementsTupleInput, PrefixitemsWithNullInstanceElementsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return PrefixitemsWithNullInstanceElements.validate(arg, configuration=configuration) +PrefixitemsWithNullInstanceElementsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + None, + typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] + ] +] +_0: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class PrefixitemsWithNullInstanceElements( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], PrefixitemsWithNullInstanceElementsTuple], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + prefix_items: typing.Tuple[ + typing.Type[_0], + ] = ( + _0, + ) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: PrefixitemsWithNullInstanceElementsTuple, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py new file mode 100644 index 00000000000..451cf73c544 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class FO( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_items: int = 2 + + + +@dataclasses.dataclass(frozen=True) +class Foo( + schemas.Schema[schemas.immutabledict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + max_items: int = 3 + + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schemas.INPUT_TYPES_ALL], + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: + return super().validate_base( + arg, + configuration=configuration, + ) +Bar: typing_extensions.TypeAlias = schemas.ListSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class PropertiesPatternpropertiesAdditionalpropertiesInteractionDict(schemas.immutabledict[str, typing.Union[ + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + int, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + schemas.Unset + ] = schemas.unset, + bar: typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: int, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, arg_) + return PropertiesPatternpropertiesAdditionalpropertiesInteraction.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, + PropertiesPatternpropertiesAdditionalpropertiesInteractionDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesPatternpropertiesAdditionalpropertiesInteractionDict: + return PropertiesPatternpropertiesAdditionalpropertiesInteraction.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[typing.Tuple[schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + val + ) + + @property + def bar(self) -> typing.Union[typing.Tuple[schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) +PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + int, + ] +] + + +@dataclasses.dataclass(frozen=True) +class PropertiesPatternpropertiesAdditionalpropertiesInteraction( + schemas.Schema[PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'f.o' # noqa: E501 + ): FO, + } + ) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertiesPatternpropertiesAdditionalpropertiesInteractionDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, + PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesPatternpropertiesAdditionalpropertiesInteractionDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py new file mode 100644 index 00000000000..87ac3f86ca7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Proto: typing_extensions.TypeAlias = schemas.NumberSchema +Length: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "length": typing.Type[Length], + } +) + + +class ToStringDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "length", + }) + + def __new__( + cls, + *, + length: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("length", length), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ToStringDictInput, arg_) + return ToString.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ToStringDictInput, + ToStringDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ToStringDict: + return ToString.validate(arg, configuration=configuration) + + @property + def length(self) -> typing.Union[str, schemas.Unset]: + val = self.get("length", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ToStringDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ToString( + schemas.AnyTypeSchema[ToStringDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ToStringDict, + } + ) + +Constructor: typing_extensions.TypeAlias = schemas.NumberSchema +Properties2 = typing.TypedDict( + 'Properties2', + { + "__proto__": typing.Type[Proto], + "toString": typing.Type[ToString], + "constructor": typing.Type[Constructor], + } +) + + +class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "__proto__", + "toString", + "constructor", + }) + + def __new__( + cls, + *, + __proto__: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + toString: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + constructor: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("__proto__", __proto__), + ("toString", toString), + ("constructor", constructor), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, arg_) + return PropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, + PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict: + return PropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(arg, configuration=configuration) + + @property + def __proto__(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("__proto__", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def toString(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("toString", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + @property + def constructor(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("constructor", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertiesWhoseNamesAreJavascriptObjectPropertyNames( + schemas.AnyTypeSchema[PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py new file mode 100644 index 00000000000..5b0779046eb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +FooNbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooBar: typing_extensions.TypeAlias = schemas.NumberSchema +FooBar: typing_extensions.TypeAlias = schemas.NumberSchema +FooRbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooTbar: typing_extensions.TypeAlias = schemas.NumberSchema +FooFbar: typing_extensions.TypeAlias = schemas.NumberSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo\nbar": typing.Type[FooNbar], + "foo\"bar": typing.Type[FooBar], + "foo\\bar": typing.Type[FooBar], + "foo\rbar": typing.Type[FooRbar], + "foo\tbar": typing.Type[FooTbar], + "foo\fbar": typing.Type[FooFbar], + } +) + + +class PropertiesWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar", + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + arg_.update(kwargs) + used_arg_ = typing.cast(PropertiesWithEscapedCharactersDictInput, arg_) + return PropertiesWithEscapedCharacters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertiesWithEscapedCharactersDictInput, + PropertiesWithEscapedCharactersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesWithEscapedCharactersDict: + return PropertiesWithEscapedCharacters.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertiesWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertiesWithEscapedCharacters( + schemas.AnyTypeSchema[PropertiesWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertiesWithEscapedCharactersDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py new file mode 100644 index 00000000000..8f5792393b2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.NoneSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class PropertiesWithNullValuedInstancePropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + None, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PropertiesWithNullValuedInstancePropertiesDictInput, arg_) + return PropertiesWithNullValuedInstanceProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertiesWithNullValuedInstancePropertiesDictInput, + PropertiesWithNullValuedInstancePropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertiesWithNullValuedInstancePropertiesDict: + return PropertiesWithNullValuedInstanceProperties.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[None, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + None, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertiesWithNullValuedInstancePropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertiesWithNullValuedInstanceProperties( + schemas.AnyTypeSchema[PropertiesWithNullValuedInstancePropertiesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertiesWithNullValuedInstancePropertiesDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py new file mode 100644 index 00000000000..cb9f829559f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Ref: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "$ref": typing.Type[Ref], + } +) + + +class PropertyNamedRefThatIsNotAReferenceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "$ref", + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + arg_.update(kwargs) + used_arg_ = typing.cast(PropertyNamedRefThatIsNotAReferenceDictInput, arg_) + return PropertyNamedRefThatIsNotAReference.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PropertyNamedRefThatIsNotAReferenceDictInput, + PropertyNamedRefThatIsNotAReferenceDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PropertyNamedRefThatIsNotAReferenceDict: + return PropertyNamedRefThatIsNotAReference.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PropertyNamedRefThatIsNotAReferenceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PropertyNamedRefThatIsNotAReference( + schemas.AnyTypeSchema[PropertyNamedRefThatIsNotAReferenceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PropertyNamedRefThatIsNotAReferenceDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py new file mode 100644 index 00000000000..b1999d35246 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PropertyNames( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + max_length: int = 3 + + +@dataclasses.dataclass(frozen=True) +class PropertynamesValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + property_names: typing.Type[PropertyNames] = dataclasses.field(default_factory=lambda: PropertyNames) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py new file mode 100644 index 00000000000..d22caef5f9d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class RegexFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'regex' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py new file mode 100644 index 00000000000..0f6c1de5f87 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_092: typing_extensions.TypeAlias = schemas.BoolSchema +X: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + pattern_properties: typing.Mapping[ + schemas.PatternInfo, + typing.Type[schemas.Schema] + ] = dataclasses.field( + default_factory=lambda: { + schemas.PatternInfo( + pattern=r'[0-9]{2,}' # noqa: E501 + ): _092, + schemas.PatternInfo( + pattern=r'X_' # noqa: E501 + ): X, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py new file mode 100644 index 00000000000..fed696c65d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class RelativeJsonPointerFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'relative-json-pointer' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py new file mode 100644 index 00000000000..0c6b0e50bee --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class RequiredDefaultValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredDefaultValidationDictInput, arg_) + return RequiredDefaultValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredDefaultValidationDictInput, + RequiredDefaultValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredDefaultValidationDict: + return RequiredDefaultValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredDefaultValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredDefaultValidation( + schemas.AnyTypeSchema[RequiredDefaultValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredDefaultValidationDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py new file mode 100644 index 00000000000..cd839a18033 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "__proto__", + "constructor", + "toString", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + __proto__: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + constructor: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + toString: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "__proto__": __proto__, + "constructor": constructor, + "toString": toString, + } + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, arg_) + return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, + RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict: + return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(arg, configuration=configuration) + + @property + def __proto__(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("__proto__") + + @property + def constructor(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("constructor") + + @property + def toString(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("toString") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames( + schemas.AnyTypeSchema[RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "__proto__", + "constructor", + "toString", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py new file mode 100644 index 00000000000..7ba276946f2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + "bar": typing.Type[Bar], + } +) + + +class RequiredValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + bar: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "foo": foo, + } + for key_, val in ( + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredValidationDictInput, arg_) + return RequiredValidation.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredValidationDictInput, + RequiredValidationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredValidationDict: + return RequiredValidation.validate(arg, configuration=configuration) + + @property + def foo(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("foo") + + @property + def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredValidation( + schemas.AnyTypeSchema[RequiredValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredValidationDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py new file mode 100644 index 00000000000..f4f0e2d4fca --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class RequiredWithEmptyArrayDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredWithEmptyArrayDictInput, arg_) + return RequiredWithEmptyArray.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredWithEmptyArrayDictInput, + RequiredWithEmptyArrayDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredWithEmptyArrayDict: + return RequiredWithEmptyArray.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredWithEmptyArrayDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredWithEmptyArray( + schemas.AnyTypeSchema[RequiredWithEmptyArrayDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredWithEmptyArrayDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py new file mode 100644 index 00000000000..f8c3c7514c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class RequiredWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + } + arg_.update(kwargs) + used_arg_ = typing.cast(RequiredWithEscapedCharactersDictInput, arg_) + return RequiredWithEscapedCharacters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + RequiredWithEscapedCharactersDictInput, + RequiredWithEscapedCharactersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> RequiredWithEscapedCharactersDict: + return RequiredWithEscapedCharacters.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +RequiredWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class RequiredWithEscapedCharacters( + schemas.AnyTypeSchema[RequiredWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: RequiredWithEscapedCharactersDict, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py new file mode 100644 index 00000000000..b2daaaf5ea3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SimpleEnumValidationEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return SimpleEnumValidation.validate(1) + + @schemas.classproperty + def POSITIVE_2(cls) -> typing.Literal[2]: + return SimpleEnumValidation.validate(2) + + @schemas.classproperty + def POSITIVE_3(cls) -> typing.Literal[3]: + return SimpleEnumValidation.validate(3) + + +@dataclasses.dataclass(frozen=True) +class SimpleEnumValidation( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + 2: "POSITIVE_2", + 3: "POSITIVE_3", + } + ) + enums = SimpleEnumValidationEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[2], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[2]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[3], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[3]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,2,3,]: ... + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py new file mode 100644 index 00000000000..50c8214956e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class SingleDependency( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( + default_factory=lambda: { + "bar": { + "foo", + }, + } + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py new file mode 100644 index 00000000000..557918ef62c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class SmallMultipleOfLargeInteger( + schemas.IntSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + multiple_of: typing.Union[int, float] = 1.0E-8 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py new file mode 100644 index 00000000000..c6bc46221b3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +StringTypeMatchesStrings: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py new file mode 100644 index 00000000000..baca2f74f3a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class TimeFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'time' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py new file mode 100644 index 00000000000..cecf34ad7cb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class TypeArrayObjectOrNull( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + tuple, + schemas.immutabledict, + type(None), + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schemas.INPUT_TYPES_ALL], + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py new file mode 100644 index 00000000000..6f8fd1423a6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class TypeArrayOrObject( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + tuple, + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schemas.INPUT_TYPES_ALL], + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py new file mode 100644 index 00000000000..8c3a2ed4d7c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +TypeAsArrayWithOneItem: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py new file mode 100644 index 00000000000..c1968ee5f73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +UnevaluatedItems: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluateditemsAsSchema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py new file mode 100644 index 00000000000..f4d0c496aee --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Contains( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore + + + +@dataclasses.dataclass(frozen=True) +class Contains2( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 3 + + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + contains: typing.Type[Contains2] = dataclasses.field(default_factory=lambda: Contains2) # type: ignore + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedItems( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 5 + + + +@dataclasses.dataclass(frozen=True) +class UnevaluateditemsDependsOnMultipleNestedContains( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py new file mode 100644 index 00000000000..a672a271658 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.NumberSchema + + +class UnevaluateditemsWithItemsTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[UnevaluateditemsWithItemsTupleInput, UnevaluateditemsWithItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return UnevaluateditemsWithItems.validate(arg, configuration=configuration) +UnevaluateditemsWithItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] +UnevaluatedItems: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluateditemsWithItems( + schemas.Schema[schemas.immutabledict, UnevaluateditemsWithItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: UnevaluateditemsWithItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + UnevaluateditemsWithItemsTupleInput, + UnevaluateditemsWithItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UnevaluateditemsWithItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py new file mode 100644 index 00000000000..471701f31d1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +UnevaluatedItems: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluateditemsWithNullInstanceElements( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py new file mode 100644 index 00000000000..c9623afd041 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class PropertyNames( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + max_length: int = 1 +UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NumberSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedpropertiesNotAffectedByPropertynames( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + property_names: typing.Type[PropertyNames] = dataclasses.field(default_factory=lambda: PropertyNames) # type: ignore + unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py new file mode 100644 index 00000000000..f6c432d4ee1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedProperties( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 3 + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedpropertiesSchema( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py new file mode 100644 index 00000000000..b8c41294bff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "foo": typing.Type[Foo], + } +) + + +class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "foo", + }) + + def __new__( + cls, + *, + foo: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, arg_) + return UnevaluatedpropertiesWithAdjacentAdditionalproperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, + UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict: + return UnevaluatedpropertiesWithAdjacentAdditionalproperties.validate(arg, configuration=configuration) + + @property + def foo(self) -> typing.Union[str, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] +UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedpropertiesWithAdjacentAdditionalproperties( + schemas.Schema[UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, + UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py new file mode 100644 index 00000000000..43b97ea0ac5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class UnevaluatedpropertiesWithNullValuedInstanceProperties( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py new file mode 100644 index 00000000000..eb3dd1dd9da --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsFalseValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unique_items: bool = False + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py new file mode 100644 index 00000000000..aa5b8fa1570 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class UniqueitemsFalseWithAnArrayOfItemsTuple( + typing.Tuple[ + bool, + bool, + typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] + ] +): + + def __new__(cls, arg: typing.Union[UniqueitemsFalseWithAnArrayOfItemsTupleInput, UniqueitemsFalseWithAnArrayOfItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return UniqueitemsFalseWithAnArrayOfItems.validate(arg, configuration=configuration) +UniqueitemsFalseWithAnArrayOfItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + bool, + bool, + typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] + ] +] +_0: typing_extensions.TypeAlias = schemas.BoolSchema +_1: typing_extensions.TypeAlias = schemas.BoolSchema + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsFalseWithAnArrayOfItems( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], UniqueitemsFalseWithAnArrayOfItemsTuple], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + prefix_items: typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + ] = ( + _0, + _1, + ) + unique_items: bool = False + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: UniqueitemsFalseWithAnArrayOfItemsTuple, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py new file mode 100644 index 00000000000..2dab8004288 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsValidation( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + unique_items: bool = True + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py new file mode 100644 index 00000000000..c48de95a3fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class UniqueitemsWithAnArrayOfItemsTuple( + typing.Tuple[ + bool, + bool, + typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] + ] +): + + def __new__(cls, arg: typing.Union[UniqueitemsWithAnArrayOfItemsTupleInput, UniqueitemsWithAnArrayOfItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return UniqueitemsWithAnArrayOfItems.validate(arg, configuration=configuration) +UniqueitemsWithAnArrayOfItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + bool, + bool, + typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] + ] +] +_0: typing_extensions.TypeAlias = schemas.BoolSchema +_1: typing_extensions.TypeAlias = schemas.BoolSchema + + +@dataclasses.dataclass(frozen=True) +class UniqueitemsWithAnArrayOfItems( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], UniqueitemsWithAnArrayOfItemsTuple], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + prefix_items: typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + ] = ( + _0, + _1, + ) + unique_items: bool = True + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: UniqueitemsWithAnArrayOfItemsTuple, + } + ) + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py new file mode 100644 index 00000000000..d7690fc9afd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py new file mode 100644 index 00000000000..bb6024943e7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriReferenceFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri-reference' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py new file mode 100644 index 00000000000..92c4c3ed0b2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UriTemplateFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uri-template' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py new file mode 100644 index 00000000000..30f1e08b604 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UuidFormat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + format: str = 'uuid' + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py new file mode 100644 index 00000000000..7884b7da8a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Else( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + multiple_of: typing.Union[int, float] = 2 + + + +@dataclasses.dataclass(frozen=True) +class If( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + exclusive_maximum: typing.Union[int, float] = 0 + + + +@dataclasses.dataclass(frozen=True) +class Then( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + inclusive_minimum: typing.Union[int, float] = -10 + + + +@dataclasses.dataclass(frozen=True) +class ValidateAgainstCorrectBranchThenVsElse( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py new file mode 100644 index 00000000000..77bdbe22aa6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from unit_test_api.components.schema.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from unit_test_api.components.schema.a_schema_given_for_prefixitems import ASchemaGivenForPrefixitems +from unit_test_api.components.schema.additional_items_are_allowed_by_default import AdditionalItemsAreAllowedByDefault +from unit_test_api.components.schema.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault +from unit_test_api.components.schema.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself +from unit_test_api.components.schema.additionalproperties_does_not_look_in_applicators import AdditionalpropertiesDoesNotLookInApplicators +from unit_test_api.components.schema.additionalproperties_with_null_valued_instance_properties import AdditionalpropertiesWithNullValuedInstanceProperties +from unit_test_api.components.schema.additionalproperties_with_schema import AdditionalpropertiesWithSchema +from unit_test_api.components.schema.allof import Allof +from unit_test_api.components.schema.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof +from unit_test_api.components.schema.allof_simple_types import AllofSimpleTypes +from unit_test_api.components.schema.allof_with_base_schema import AllofWithBaseSchema +from unit_test_api.components.schema.allof_with_one_empty_schema import AllofWithOneEmptySchema +from unit_test_api.components.schema.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema +from unit_test_api.components.schema.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema +from unit_test_api.components.schema.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas +from unit_test_api.components.schema.anyof import Anyof +from unit_test_api.components.schema.anyof_complex_types import AnyofComplexTypes +from unit_test_api.components.schema.anyof_with_base_schema import AnyofWithBaseSchema +from unit_test_api.components.schema.anyof_with_one_empty_schema import AnyofWithOneEmptySchema +from unit_test_api.components.schema.array_type_matches_arrays import ArrayTypeMatchesArrays +from unit_test_api.components.schema.boolean_type_matches_booleans import BooleanTypeMatchesBooleans +from unit_test_api.components.schema.by_int import ByInt +from unit_test_api.components.schema.by_number import ByNumber +from unit_test_api.components.schema.by_small_number import BySmallNumber +from unit_test_api.components.schema.const_nul_characters_in_strings import ConstNulCharactersInStrings +from unit_test_api.components.schema.contains_keyword_validation import ContainsKeywordValidation +from unit_test_api.components.schema.contains_with_null_instance_elements import ContainsWithNullInstanceElements +from unit_test_api.components.schema.date_format import DateFormat +from unit_test_api.components.schema.date_time_format import DateTimeFormat +from unit_test_api.components.schema.dependent_schemas_dependencies_with_escaped_characters import DependentSchemasDependenciesWithEscapedCharacters +from unit_test_api.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root import DependentSchemasDependentSubschemaIncompatibleWithRoot +from unit_test_api.components.schema.dependent_schemas_single_dependency import DependentSchemasSingleDependency +from unit_test_api.components.schema.duration_format import DurationFormat +from unit_test_api.components.schema.email_format import EmailFormat +from unit_test_api.components.schema.empty_dependents import EmptyDependents +from unit_test_api.components.schema.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse +from unit_test_api.components.schema.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue +from unit_test_api.components.schema.enum_with_escaped_characters import EnumWithEscapedCharacters +from unit_test_api.components.schema.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 +from unit_test_api.components.schema.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 +from unit_test_api.components.schema.enums_in_properties import EnumsInProperties +from unit_test_api.components.schema.exclusivemaximum_validation import ExclusivemaximumValidation +from unit_test_api.components.schema.exclusiveminimum_validation import ExclusiveminimumValidation +from unit_test_api.components.schema.float_division_inf import FloatDivisionInf +from unit_test_api.components.schema.forbidden_property import ForbiddenProperty +from unit_test_api.components.schema.hostname_format import HostnameFormat +from unit_test_api.components.schema.idn_email_format import IdnEmailFormat +from unit_test_api.components.schema.idn_hostname_format import IdnHostnameFormat +from unit_test_api.components.schema.if_and_else_without_then import IfAndElseWithoutThen +from unit_test_api.components.schema.if_and_then_without_else import IfAndThenWithoutElse +from unit_test_api.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence import IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence +from unit_test_api.components.schema.ignore_else_without_if import IgnoreElseWithoutIf +from unit_test_api.components.schema.ignore_if_without_then_or_else import IgnoreIfWithoutThenOrElse +from unit_test_api.components.schema.ignore_then_without_if import IgnoreThenWithoutIf +from unit_test_api.components.schema.integer_type_matches_integers import IntegerTypeMatchesIntegers +from unit_test_api.components.schema.ipv4_format import Ipv4Format +from unit_test_api.components.schema.ipv6_format import Ipv6Format +from unit_test_api.components.schema.iri_format import IriFormat +from unit_test_api.components.schema.iri_reference_format import IriReferenceFormat +from unit_test_api.components.schema.items_contains import ItemsContains +from unit_test_api.components.schema.items_does_not_look_in_applicators_valid_case import ItemsDoesNotLookInApplicatorsValidCase +from unit_test_api.components.schema.items_with_null_instance_elements import ItemsWithNullInstanceElements +from unit_test_api.components.schema.json_pointer_format import JsonPointerFormat +from unit_test_api.components.schema.maxcontains_without_contains_is_ignored import MaxcontainsWithoutContainsIsIgnored +from unit_test_api.components.schema.maximum_validation import MaximumValidation +from unit_test_api.components.schema.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger +from unit_test_api.components.schema.maxitems_validation import MaxitemsValidation +from unit_test_api.components.schema.maxlength_validation import MaxlengthValidation +from unit_test_api.components.schema.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty +from unit_test_api.components.schema.maxproperties_validation import MaxpropertiesValidation +from unit_test_api.components.schema.mincontains_without_contains_is_ignored import MincontainsWithoutContainsIsIgnored +from unit_test_api.components.schema.minimum_validation import MinimumValidation +from unit_test_api.components.schema.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger +from unit_test_api.components.schema.minitems_validation import MinitemsValidation +from unit_test_api.components.schema.minlength_validation import MinlengthValidation +from unit_test_api.components.schema.minproperties_validation import MinpropertiesValidation +from unit_test_api.components.schema.multiple_dependents_required import MultipleDependentsRequired +from unit_test_api.components.schema.multiple_simultaneous_patternproperties_are_validated import MultipleSimultaneousPatternpropertiesAreValidated +from unit_test_api.components.schema.multiple_types_can_be_specified_in_an_array import MultipleTypesCanBeSpecifiedInAnArray +from unit_test_api.components.schema.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics +from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics +from unit_test_api.components.schema.nested_items import NestedItems +from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics +from unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties import NonAsciiPatternWithAdditionalproperties +from unit_test_api.components.schema.non_interference_across_combined_schemas import NonInterferenceAcrossCombinedSchemas +from unit_test_api.components.schema.not import Not +from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema +from unit_test_api.components.schema.not_multiple_types import NotMultipleTypes +from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings +from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject +from unit_test_api.components.schema.number_type_matches_numbers import NumberTypeMatchesNumbers +from unit_test_api.components.schema.object_properties_validation import ObjectPropertiesValidation +from unit_test_api.components.schema.object_type_matches_objects import ObjectTypeMatchesObjects +from unit_test_api.components.schema.oneof import Oneof +from unit_test_api.components.schema.oneof_complex_types import OneofComplexTypes +from unit_test_api.components.schema.oneof_with_base_schema import OneofWithBaseSchema +from unit_test_api.components.schema.oneof_with_empty_schema import OneofWithEmptySchema +from unit_test_api.components.schema.oneof_with_required import OneofWithRequired +from unit_test_api.components.schema.pattern_is_not_anchored import PatternIsNotAnchored +from unit_test_api.components.schema.pattern_validation import PatternValidation +from unit_test_api.components.schema.patternproperties_validates_properties_matching_a_regex import PatternpropertiesValidatesPropertiesMatchingARegex +from unit_test_api.components.schema.patternproperties_with_null_valued_instance_properties import PatternpropertiesWithNullValuedInstanceProperties +from unit_test_api.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items import PrefixitemsValidationAdjustsTheStartingIndexForItems +from unit_test_api.components.schema.prefixitems_with_null_instance_elements import PrefixitemsWithNullInstanceElements +from unit_test_api.components.schema.properties_patternproperties_additionalproperties_interaction import PropertiesPatternpropertiesAdditionalpropertiesInteraction +from unit_test_api.components.schema.properties_whose_names_are_javascript_object_property_names import PropertiesWhoseNamesAreJavascriptObjectPropertyNames +from unit_test_api.components.schema.properties_with_escaped_characters import PropertiesWithEscapedCharacters +from unit_test_api.components.schema.properties_with_null_valued_instance_properties import PropertiesWithNullValuedInstanceProperties +from unit_test_api.components.schema.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference +from unit_test_api.components.schema.propertynames_validation import PropertynamesValidation +from unit_test_api.components.schema.regex_format import RegexFormat +from unit_test_api.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive import RegexesAreNotAnchoredByDefaultAndAreCaseSensitive +from unit_test_api.components.schema.relative_json_pointer_format import RelativeJsonPointerFormat +from unit_test_api.components.schema.required_default_validation import RequiredDefaultValidation +from unit_test_api.components.schema.required_properties_whose_names_are_javascript_object_property_names import RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames +from unit_test_api.components.schema.required_validation import RequiredValidation +from unit_test_api.components.schema.required_with_empty_array import RequiredWithEmptyArray +from unit_test_api.components.schema.required_with_escaped_characters import RequiredWithEscapedCharacters +from unit_test_api.components.schema.simple_enum_validation import SimpleEnumValidation +from unit_test_api.components.schema.single_dependency import SingleDependency +from unit_test_api.components.schema.small_multiple_of_large_integer import SmallMultipleOfLargeInteger +from unit_test_api.components.schema.string_type_matches_strings import StringTypeMatchesStrings +from unit_test_api.components.schema.time_format import TimeFormat +from unit_test_api.components.schema.type_array_object_or_null import TypeArrayObjectOrNull +from unit_test_api.components.schema.type_array_or_object import TypeArrayOrObject +from unit_test_api.components.schema.type_as_array_with_one_item import TypeAsArrayWithOneItem +from unit_test_api.components.schema.unevaluateditems_as_schema import UnevaluateditemsAsSchema +from unit_test_api.components.schema.unevaluateditems_depends_on_multiple_nested_contains import UnevaluateditemsDependsOnMultipleNestedContains +from unit_test_api.components.schema.unevaluateditems_with_items import UnevaluateditemsWithItems +from unit_test_api.components.schema.unevaluateditems_with_null_instance_elements import UnevaluateditemsWithNullInstanceElements +from unit_test_api.components.schema.unevaluatedproperties_not_affected_by_propertynames import UnevaluatedpropertiesNotAffectedByPropertynames +from unit_test_api.components.schema.unevaluatedproperties_schema import UnevaluatedpropertiesSchema +from unit_test_api.components.schema.unevaluatedproperties_with_adjacent_additionalproperties import UnevaluatedpropertiesWithAdjacentAdditionalproperties +from unit_test_api.components.schema.unevaluatedproperties_with_null_valued_instance_properties import UnevaluatedpropertiesWithNullValuedInstanceProperties +from unit_test_api.components.schema.uniqueitems_false_validation import UniqueitemsFalseValidation +from unit_test_api.components.schema.uniqueitems_false_with_an_array_of_items import UniqueitemsFalseWithAnArrayOfItems +from unit_test_api.components.schema.uniqueitems_validation import UniqueitemsValidation +from unit_test_api.components.schema.uniqueitems_with_an_array_of_items import UniqueitemsWithAnArrayOfItems +from unit_test_api.components.schema.uri_format import UriFormat +from unit_test_api.components.schema.uri_reference_format import UriReferenceFormat +from unit_test_api.components.schema.uri_template_format import UriTemplateFormat +from unit_test_api.components.schema.uuid_format import UuidFormat +from unit_test_api.components.schema.validate_against_correct_branch_then_vs_else import ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py new file mode 100644 index 00000000000..454797c5140 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py @@ -0,0 +1,281 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import copy +from http import client as http_client +import logging +import multiprocessing +import sys +import typing +import typing_extensions + +import urllib3 + +from unit_test_api import exceptions +from unit_test_api.servers import server_0 + +# the server to use at each openapi document json path +ServerInfo = typing.TypedDict( + 'ServerInfo', + { + 'servers/0': server_0.Server0, + }, + total=False +) + + +class ServerIndexInfoRequired(typing.TypedDict): + servers: typing.Literal[0] + +ServerIndexInfoOptional = typing.TypedDict( + 'ServerIndexInfoOptional', + { + }, + total=False +) + + +class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): + """ + the default server_index to use at each openapi document json path + the fallback value is stored in the 'servers' key + """ + + +class ApiConfiguration(object): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param server_info: the servers that can be used to make endpoint calls + :param server_index_info: index to servers configuration + """ + + def __init__( + self, + server_info: typing.Optional[ServerInfo] = None, + server_index_info: typing.Optional[ServerIndexInfo] = None, + ): + """Constructor + """ + # Authentication Settings + self.security_scheme_info: typing.Dict[str, typing.Any] = {} + self.security_index_info = {'security': 0} + # Server Info + self.server_info: ServerInfo = server_info or { + 'servers/0': server_0.Server0(), + } + self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("unit_test_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.0.1\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_server_url( + self, + key_prefix: typing.Literal[ + "servers", + ], + index: typing.Optional[int], + ) -> str: + """Gets host URL based on the index + :param index: array index of the host settings + :return: URL based on host settings + """ + if index: + used_index = index + else: + try: + used_index = self.server_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.server_index_info.get("servers", 0) + server_info_key = typing.cast( + typing.Literal[ + "servers/0", + ], + f"{key_prefix}/{used_index}" + ) + try: + server = self.server_info[server_info_key] + except KeyError as ex: + raise ex + return server.url diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py new file mode 100644 index 00000000000..b0684d73d5f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +from unit_test_api import exceptions + + +PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { + 'additional_properties': 'additionalProperties', + 'all_of': 'allOf', + 'any_of': 'anyOf', + 'const_value_to_name': 'const', + 'contains': 'contains', + 'dependent_required': 'dependentRequired', + 'dependent_schemas': 'dependentSchemas', + 'discriminator': 'discriminator', + # default omitted because it has no validation impact + 'else_': 'else', + 'enum_value_to_name': 'enum', + 'exclusive_maximum': 'exclusiveMaximum', + 'exclusive_minimum': 'exclusiveMinimum', + 'format': 'format', + 'if_': 'if', + 'inclusive_maximum': 'maximum', + 'inclusive_minimum': 'minimum', + 'items': 'items', + 'max_contains': 'maxContains', + 'max_items': 'maxItems', + 'max_length': 'maxLength', + 'max_properties': 'maxProperties', + 'min_contains': 'minContains', + 'min_items': 'minItems', + 'min_length': 'minLength', + 'min_properties': 'minProperties', + 'multiple_of': 'multipleOf', + 'not_': 'not', + 'one_of': 'oneOf', + 'pattern': 'pattern', + 'pattern_properties': 'patternProperties', + 'prefix_items': 'prefixItems', + 'properties': 'properties', + 'property_names': 'propertyNames', + 'required': 'required', + 'then': 'then', + 'types': 'type', + 'unique_items': 'uniqueItems', + 'unevaluated_items': 'unevaluatedItems', + 'unevaluated_properties': 'unevaluatedProperties' +} + +class SchemaConfiguration: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param disabled_json_schema_keywords (set): Set of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_json_schema_keywords is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + """ + + def __init__( + self, + disabled_json_schema_keywords = set(), + ): + """Constructor + """ + self.disabled_json_schema_keywords = disabled_json_schema_keywords + + @property + def disabled_json_schema_python_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_python_keywords + + @property + def disabled_json_schema_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_keywords + + @disabled_json_schema_keywords.setter + def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): + disabled_json_schema_keywords = set() + disabled_json_schema_python_keywords = set() + for k in json_keywords: + python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} + if not python_keywords: + raise exceptions.ApiValueError( + "Invalid keyword: '{0}''".format(k)) + disabled_json_schema_keywords.add(k) + disabled_json_schema_python_keywords.update(python_keywords) + self.__disabled_json_schema_keywords = disabled_json_schema_keywords + self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py new file mode 100644 index 00000000000..3843c84be18 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +from unit_test_api import api_response + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + +T = typing.TypeVar('T', bound=api_response.ApiResponse) + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: typing.Optional[str] = None + api_response: typing.Optional[T] = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.api_response: + if self.api_response.response.headers: + error_message += "HTTP response headers: {0}\n".format( + self.api_response.response.headers) + if self.api_response.response.data: + error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) + + return error_message diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py new file mode 100644 index 00000000000..2c2c9cc4bdc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis import path_to_api diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py new file mode 100644 index 00000000000..972a0679fc7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_a_schema_given_for_prefixitems_request_body import RequestBodyPostASchemaGivenForPrefixitemsRequestBody + +path = "/requestBody/postASchemaGivenForPrefixitemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py new file mode 100644 index 00000000000..a4b93b19651 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import a_schema_given_for_prefixitems + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_a_schema_given_for_prefixitems_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_a_schema_given_for_prefixitems_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_a_schema_given_for_prefixitems_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostASchemaGivenForPrefixitemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_a_schema_given_for_prefixitems_request_body = BaseApi._post_a_schema_given_for_prefixitems_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_a_schema_given_for_prefixitems_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..03fda6470fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import a_schema_given_for_prefixitems +Schema2: typing_extensions.TypeAlias = a_schema_given_for_prefixitems.ASchemaGivenForPrefixitems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py new file mode 100644 index 00000000000..b5a1da9f408 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additional_items_are_allowed_by_default_request_body import RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody + +path = "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py new file mode 100644 index 00000000000..9b130485e72 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_items_are_allowed_by_default + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additional_items_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additional_items_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additional_items_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalItemsAreAllowedByDefaultRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additional_items_are_allowed_by_default_request_body = BaseApi._post_additional_items_are_allowed_by_default_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additional_items_are_allowed_by_default_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..15e21c81b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_items_are_allowed_by_default +Schema2: typing_extensions.TypeAlias = additional_items_are_allowed_by_default.AdditionalItemsAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py new file mode 100644 index 00000000000..5190cb5eaa5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody + +path = "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py new file mode 100644 index 00000000000..e3a767fb516 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_are_allowed_by_default_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_are_allowed_by_default_request_body = BaseApi._post_additionalproperties_are_allowed_by_default_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_are_allowed_by_default_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f320e878562 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default +Schema2: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py new file mode 100644 index 00000000000..642b03110eb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody + +path = "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py new file mode 100644 index 00000000000..c49263d964f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_can_exist_by_itself_request_body( + self, + body: typing.Union[ + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, + additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_can_exist_by_itself_request_body = BaseApi._post_additionalproperties_can_exist_by_itself_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_can_exist_by_itself_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b7fce07ef58 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself +Schema2: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py new file mode 100644 index 00000000000..0fd803cb9c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody + +path = "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py new file mode 100644 index 00000000000..009c73d6f78 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_does_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_does_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_does_not_look_in_applicators_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_does_not_look_in_applicators_request_body = BaseApi._post_additionalproperties_does_not_look_in_applicators_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_does_not_look_in_applicators_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e194ba355a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators +Schema2: typing_extensions.TypeAlias = additionalproperties_does_not_look_in_applicators.AdditionalpropertiesDoesNotLookInApplicators diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py new file mode 100644 index 00000000000..abe8e789e71 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body import RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody + +path = "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py new file mode 100644 index 00000000000..c9b8aff1e5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, + additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_with_null_valued_instance_properties_request_body = BaseApi._post_additionalproperties_with_null_valued_instance_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ff0333176a0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py new file mode 100644 index 00000000000..9ca0006c2c1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_additionalproperties_with_schema_request_body import RequestBodyPostAdditionalpropertiesWithSchemaRequestBody + +path = "/requestBody/postAdditionalpropertiesWithSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py new file mode 100644 index 00000000000..1a9af7581aa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_with_schema_request_body( + self, + body: typing.Union[ + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_with_schema_request_body( + self, + body: typing.Union[ + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_with_schema_request_body( + self, + body: typing.Union[ + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, + additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesWithSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_with_schema_request_body = BaseApi._post_additionalproperties_with_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_with_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e457613c9a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_schema +Schema2: typing_extensions.TypeAlias = additionalproperties_with_schema.AdditionalpropertiesWithSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py new file mode 100644 index 00000000000..ed94c39ba95 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody + +path = "/requestBody/postAllofCombinedWithAnyofOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py new file mode 100644 index 00000000000..91edc43c717 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_combined_with_anyof_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_combined_with_anyof_oneof_request_body = BaseApi._post_allof_combined_with_anyof_oneof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_combined_with_anyof_oneof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e6f7ceccca4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof +Schema2: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py new file mode 100644 index 00000000000..5b7f8d32e3e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody + +path = "/requestBody/postAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py new file mode 100644 index 00000000000..d5fbaa13525 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_request_body = BaseApi._post_allof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..58ea8d6fe3c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof +Schema2: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py new file mode 100644 index 00000000000..0b0cfa4160b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody + +path = "/requestBody/postAllofSimpleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py new file mode 100644 index 00000000000..555910f6843 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_simple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofSimpleTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_simple_types_request_body = BaseApi._post_allof_simple_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_simple_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..04ffe7a5c26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types +Schema2: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..08c83aaec1b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody + +path = "/requestBody/postAllofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..94caf2c34f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_base_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_base_schema_request_body = BaseApi._post_allof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..68c4f35329d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema +Schema2: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..aea2f6ab6ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody + +path = "/requestBody/postAllofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..a7f8d59ecf2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithOneEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_one_empty_schema_request_body = BaseApi._post_allof_with_one_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_one_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..53fd4ffe2fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..7aa083ee5bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody + +path = "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..5c369074c0e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_first_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_first_empty_schema_request_body = BaseApi._post_allof_with_the_first_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_first_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4a8764a76f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..9daab2c7562 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody + +path = "/requestBody/postAllofWithTheLastEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..12d937153ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_last_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_last_empty_schema_request_body = BaseApi._post_allof_with_the_last_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_last_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..dffb1658cb6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py new file mode 100644 index 00000000000..d46b12c2bfe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody + +path = "/requestBody/postAllofWithTwoEmptySchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py new file mode 100644 index 00000000000..a681fb5025b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_two_empty_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_two_empty_schemas_request_body = BaseApi._post_allof_with_two_empty_schemas_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_two_empty_schemas_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6c0ee15f391 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas +Schema2: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py new file mode 100644 index 00000000000..30ce22d14d9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody + +path = "/requestBody/postAnyofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py new file mode 100644 index 00000000000..ce387aad34f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofComplexTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_complex_types_request_body = BaseApi._post_anyof_complex_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_complex_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5cf2d870bec --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types +Schema2: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py new file mode 100644 index 00000000000..0a3eeb92ed7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody + +path = "/requestBody/postAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py new file mode 100644 index 00000000000..fa3969cbce9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_request_body = BaseApi._post_anyof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fd388ae0816 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof +Schema2: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..582eec5d98e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody + +path = "/requestBody/postAnyofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..928c418c7e3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_base_schema_request_body = BaseApi._post_anyof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..50467d99daa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema +Schema2: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..276553e3f77 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody + +path = "/requestBody/postAnyofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..f75d8a9a4a1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_one_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_one_empty_schema_request_body = BaseApi._post_anyof_with_one_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_one_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7399a723ae4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema +Schema2: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py new file mode 100644 index 00000000000..d8aa6c7999e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody + +path = "/requestBody/postArrayTypeMatchesArraysRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py new file mode 100644 index 00000000000..9fd769aee48 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_array_type_matches_arrays_request_body( + self, + body: typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostArrayTypeMatchesArraysRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_array_type_matches_arrays_request_body = BaseApi._post_array_type_matches_arrays_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_array_type_matches_arrays_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e5b3f23185a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays +Schema2: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py new file mode 100644 index 00000000000..04cf90ab91d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody + +path = "/requestBody/postBooleanTypeMatchesBooleansRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py new file mode 100644 index 00000000000..b670c895942 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_boolean_type_matches_booleans_request_body( + self, + body: bool, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_boolean_type_matches_booleans_request_body = BaseApi._post_boolean_type_matches_booleans_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_boolean_type_matches_booleans_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d4e345c87b1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans +Schema2: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py new file mode 100644 index 00000000000..9b8e641c5f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody + +path = "/requestBody/postByIntRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py new file mode 100644 index 00000000000..f8fbd45cc79 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_int_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByIntRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_int_request_body = BaseApi._post_by_int_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_int_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ce650694a07 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int +Schema2: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py new file mode 100644 index 00000000000..3625b98cb9c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody + +path = "/requestBody/postByNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py new file mode 100644 index 00000000000..36a71a07663 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByNumberRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_number_request_body = BaseApi._post_by_number_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_number_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ab6f9a04822 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number +Schema2: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py new file mode 100644 index 00000000000..cb0bd6eeac1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody + +path = "/requestBody/postBySmallNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py new file mode 100644 index 00000000000..2312317913c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_small_number_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBySmallNumberRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_small_number_request_body = BaseApi._post_by_small_number_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_small_number_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4508b52a87d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number +Schema2: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py new file mode 100644 index 00000000000..8e211944e53 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_const_nul_characters_in_strings_request_body import RequestBodyPostConstNulCharactersInStringsRequestBody + +path = "/requestBody/postConstNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py new file mode 100644 index 00000000000..20c73783324 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import const_nul_characters_in_strings + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_const_nul_characters_in_strings_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_const_nul_characters_in_strings_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_const_nul_characters_in_strings_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostConstNulCharactersInStringsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_const_nul_characters_in_strings_request_body = BaseApi._post_const_nul_characters_in_strings_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_const_nul_characters_in_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..563f2c99b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import const_nul_characters_in_strings +Schema2: typing_extensions.TypeAlias = const_nul_characters_in_strings.ConstNulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py new file mode 100644 index 00000000000..34eab770b79 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_contains_keyword_validation_request_body import RequestBodyPostContainsKeywordValidationRequestBody + +path = "/requestBody/postContainsKeywordValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py new file mode 100644 index 00000000000..fd5dcdca9b9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_keyword_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_contains_keyword_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_contains_keyword_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_contains_keyword_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostContainsKeywordValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_contains_keyword_validation_request_body = BaseApi._post_contains_keyword_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_contains_keyword_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f519bece380 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_keyword_validation +Schema2: typing_extensions.TypeAlias = contains_keyword_validation.ContainsKeywordValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py new file mode 100644 index 00000000000..d7ca471535c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_contains_with_null_instance_elements_request_body import RequestBodyPostContainsWithNullInstanceElementsRequestBody + +path = "/requestBody/postContainsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py new file mode 100644 index 00000000000..9d2dedfdf9a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_with_null_instance_elements + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_contains_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_contains_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_contains_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostContainsWithNullInstanceElementsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_contains_with_null_instance_elements_request_body = BaseApi._post_contains_with_null_instance_elements_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_contains_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f239f206444 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = contains_with_null_instance_elements.ContainsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py new file mode 100644 index 00000000000..881d8a9ff1e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_date_format_request_body import RequestBodyPostDateFormatRequestBody + +path = "/requestBody/postDateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py new file mode 100644 index 00000000000..0d9372f69c6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_format_request_body = BaseApi._post_date_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d8ee34fd280 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_format +Schema2: typing_extensions.TypeAlias = date_format.DateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py new file mode 100644 index 00000000000..fe71ff77c36 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody + +path = "/requestBody/postDateTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py new file mode 100644 index 00000000000..f97fd17f451 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateTimeFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_time_format_request_body = BaseApi._post_date_time_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_time_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d9c84ea8aca --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format +Schema2: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..5dbed6ecd7e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body import RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody + +path = "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..f8318756306 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasDependenciesWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_dependencies_with_escaped_characters_request_body = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2843b8be0d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters +Schema2: typing_extensions.TypeAlias = dependent_schemas_dependencies_with_escaped_characters.DependentSchemasDependenciesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py new file mode 100644 index 00000000000..7c3df7f2d5f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body import RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody + +path = "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py new file mode 100644 index 00000000000..81825fc5862 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..85ff65ae213 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root +Schema2: typing_extensions.TypeAlias = dependent_schemas_dependent_subschema_incompatible_with_root.DependentSchemasDependentSubschemaIncompatibleWithRoot diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py new file mode 100644 index 00000000000..ff5c1c16db3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_dependent_schemas_single_dependency_request_body import RequestBodyPostDependentSchemasSingleDependencyRequestBody + +path = "/requestBody/postDependentSchemasSingleDependencyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py new file mode 100644 index 00000000000..3e8b1c2abf6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_single_dependency + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasSingleDependencyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_single_dependency_request_body = BaseApi._post_dependent_schemas_single_dependency_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_single_dependency_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d9a02a6c025 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_single_dependency +Schema2: typing_extensions.TypeAlias = dependent_schemas_single_dependency.DependentSchemasSingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py new file mode 100644 index 00000000000..37732fa1eb0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_duration_format_request_body import RequestBodyPostDurationFormatRequestBody + +path = "/requestBody/postDurationFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py new file mode 100644 index 00000000000..156290db6b7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import duration_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_duration_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_duration_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_duration_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDurationFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_duration_format_request_body = BaseApi._post_duration_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_duration_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1919784341f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import duration_format +Schema2: typing_extensions.TypeAlias = duration_format.DurationFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py new file mode 100644 index 00000000000..343ccc2d7e7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody + +path = "/requestBody/postEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py new file mode 100644 index 00000000000..98f3f44dd6d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmailFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_email_format_request_body = BaseApi._post_email_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_email_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5043f89584b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format +Schema2: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py new file mode 100644 index 00000000000..563bc0c6c7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_empty_dependents_request_body import RequestBodyPostEmptyDependentsRequestBody + +path = "/requestBody/postEmptyDependentsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py new file mode 100644 index 00000000000..2a92de49c44 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import empty_dependents + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_empty_dependents_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_empty_dependents_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_empty_dependents_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmptyDependentsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_empty_dependents_request_body = BaseApi._post_empty_dependents_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_empty_dependents_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..aa466ad9a06 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import empty_dependents +Schema2: typing_extensions.TypeAlias = empty_dependents.EmptyDependents diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py new file mode 100644 index 00000000000..6278f4f37bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody + +path = "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py new file mode 100644 index 00000000000..61ec05fc9f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with0_does_not_match_false_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with0_does_not_match_false_request_body = BaseApi._post_enum_with0_does_not_match_false_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with0_does_not_match_false_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1fba80557bf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false +Schema2: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py new file mode 100644 index 00000000000..2192491c663 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody + +path = "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py new file mode 100644 index 00000000000..6180860a7c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with1_does_not_match_true_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with1_does_not_match_true_request_body = BaseApi._post_enum_with1_does_not_match_true_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with1_does_not_match_true_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..58e4afb2697 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true +Schema2: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..f4b3a43f028 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody + +path = "/requestBody/postEnumWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..2cb4c758b23 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_escaped_characters_request_body( + self, + body: typing.Literal[ + "foo\nbar", + "foo\rbar" + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_escaped_characters_request_body = BaseApi._post_enum_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..716a7b075de --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters +Schema2: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py new file mode 100644 index 00000000000..3a9b589fde9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody + +path = "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py new file mode 100644 index 00000000000..4f29320a179 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_false_does_not_match0_request_body( + self, + body: typing.Literal[ + False + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_false_does_not_match0_request_body = BaseApi._post_enum_with_false_does_not_match0_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_false_does_not_match0_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fa242d67709 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 +Schema2: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py new file mode 100644 index 00000000000..1ccbf7eb9c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody + +path = "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py new file mode 100644 index 00000000000..422b5aac77a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_true_does_not_match1_request_body( + self, + body: typing.Literal[ + True + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_true_does_not_match1_request_body = BaseApi._post_enum_with_true_does_not_match1_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_true_does_not_match1_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ee7e09e06bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 +Schema2: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py new file mode 100644 index 00000000000..83f65d50bbf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody + +path = "/requestBody/postEnumsInPropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py new file mode 100644 index 00000000000..0f93cd467b2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enums_in_properties_request_body( + self, + body: typing.Union[ + enums_in_properties.EnumsInPropertiesDictInput, + enums_in_properties.EnumsInPropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumsInPropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enums_in_properties_request_body = BaseApi._post_enums_in_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enums_in_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e62f262bdfe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties +Schema2: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py new file mode 100644 index 00000000000..e2f72d08b72 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_exclusivemaximum_validation_request_body import RequestBodyPostExclusivemaximumValidationRequestBody + +path = "/requestBody/postExclusivemaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..c0a0dcd696d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusivemaximum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_exclusivemaximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_exclusivemaximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_exclusivemaximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostExclusivemaximumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_exclusivemaximum_validation_request_body = BaseApi._post_exclusivemaximum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_exclusivemaximum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..dbc0369f87f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusivemaximum_validation +Schema2: typing_extensions.TypeAlias = exclusivemaximum_validation.ExclusivemaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py new file mode 100644 index 00000000000..8e6b4a5ebf1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_exclusiveminimum_validation_request_body import RequestBodyPostExclusiveminimumValidationRequestBody + +path = "/requestBody/postExclusiveminimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..a8fce568d5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusiveminimum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_exclusiveminimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_exclusiveminimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_exclusiveminimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostExclusiveminimumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_exclusiveminimum_validation_request_body = BaseApi._post_exclusiveminimum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_exclusiveminimum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2b423e4a8de --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusiveminimum_validation +Schema2: typing_extensions.TypeAlias = exclusiveminimum_validation.ExclusiveminimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py new file mode 100644 index 00000000000..e979241b0f4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_float_division_inf_request_body import RequestBodyPostFloatDivisionInfRequestBody + +path = "/requestBody/postFloatDivisionInfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py new file mode 100644 index 00000000000..e0bbd6ed5db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import float_division_inf + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_float_division_inf_request_body( + self, + body: int, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostFloatDivisionInfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_float_division_inf_request_body = BaseApi._post_float_division_inf_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_float_division_inf_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..93e1dd44d11 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import float_division_inf +Schema2: typing_extensions.TypeAlias = float_division_inf.FloatDivisionInf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py new file mode 100644 index 00000000000..dc0ec75dc30 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody + +path = "/requestBody/postForbiddenPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py new file mode 100644 index 00000000000..e79b407ba62 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_forbidden_property_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostForbiddenPropertyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_forbidden_property_request_body = BaseApi._post_forbidden_property_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_forbidden_property_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a20158e1e64 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property +Schema2: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py new file mode 100644 index 00000000000..3ae4314eb5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody + +path = "/requestBody/postHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py new file mode 100644 index 00000000000..7ae0d1b32ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostHostnameFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_hostname_format_request_body = BaseApi._post_hostname_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_hostname_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..71160bda951 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format +Schema2: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py new file mode 100644 index 00000000000..9c97bd86295 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_idn_email_format_request_body import RequestBodyPostIdnEmailFormatRequestBody + +path = "/requestBody/postIdnEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py new file mode 100644 index 00000000000..43f9a777467 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_email_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_idn_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_idn_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_idn_email_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIdnEmailFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_idn_email_format_request_body = BaseApi._post_idn_email_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_idn_email_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..bdcb513c406 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_email_format +Schema2: typing_extensions.TypeAlias = idn_email_format.IdnEmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py new file mode 100644 index 00000000000..97a1c3a7a38 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_idn_hostname_format_request_body import RequestBodyPostIdnHostnameFormatRequestBody + +path = "/requestBody/postIdnHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py new file mode 100644 index 00000000000..ddb5366dc14 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_hostname_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_idn_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_idn_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_idn_hostname_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIdnHostnameFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_idn_hostname_format_request_body = BaseApi._post_idn_hostname_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_idn_hostname_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..08005f9e7ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_hostname_format +Schema2: typing_extensions.TypeAlias = idn_hostname_format.IdnHostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py new file mode 100644 index 00000000000..f0a3919ddfd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_if_and_else_without_then_request_body import RequestBodyPostIfAndElseWithoutThenRequestBody + +path = "/requestBody/postIfAndElseWithoutThenRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py new file mode 100644 index 00000000000..385d781ffbf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_else_without_then + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_and_else_without_then_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_and_else_without_then_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_and_else_without_then_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAndElseWithoutThenRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_and_else_without_then_request_body = BaseApi._post_if_and_else_without_then_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_and_else_without_then_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..539f547c303 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_else_without_then +Schema2: typing_extensions.TypeAlias = if_and_else_without_then.IfAndElseWithoutThen diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py new file mode 100644 index 00000000000..85747ded97b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_if_and_then_without_else_request_body import RequestBodyPostIfAndThenWithoutElseRequestBody + +path = "/requestBody/postIfAndThenWithoutElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py new file mode 100644 index 00000000000..f922d58ef84 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_then_without_else + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_and_then_without_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_and_then_without_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_and_then_without_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAndThenWithoutElseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_and_then_without_else_request_body = BaseApi._post_if_and_then_without_else_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_and_then_without_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6af342aacad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_then_without_else +Schema2: typing_extensions.TypeAlias = if_and_then_without_else.IfAndThenWithoutElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py new file mode 100644 index 00000000000..f4396f026e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body import RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody + +path = "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py new file mode 100644 index 00000000000..93acf03cdb2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..813371f1669 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence +Schema2: typing_extensions.TypeAlias = if_appears_at_the_end_when_serialized_keyword_processing_sequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py new file mode 100644 index 00000000000..e6d431a11ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ignore_else_without_if_request_body import RequestBodyPostIgnoreElseWithoutIfRequestBody + +path = "/requestBody/postIgnoreElseWithoutIfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py new file mode 100644 index 00000000000..0dd3d286a6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_else_without_if + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_else_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_else_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_else_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreElseWithoutIfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_else_without_if_request_body = BaseApi._post_ignore_else_without_if_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_else_without_if_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c133595c014 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_else_without_if +Schema2: typing_extensions.TypeAlias = ignore_else_without_if.IgnoreElseWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py new file mode 100644 index 00000000000..a4ee9a63ac9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ignore_if_without_then_or_else_request_body import RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody + +path = "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py new file mode 100644 index 00000000000..0938e1d2e94 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_if_without_then_or_else + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_if_without_then_or_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_if_without_then_or_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_if_without_then_or_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreIfWithoutThenOrElseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_if_without_then_or_else_request_body = BaseApi._post_ignore_if_without_then_or_else_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_if_without_then_or_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d481bc18fd2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_if_without_then_or_else +Schema2: typing_extensions.TypeAlias = ignore_if_without_then_or_else.IgnoreIfWithoutThenOrElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py new file mode 100644 index 00000000000..b2e6b3c053c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ignore_then_without_if_request_body import RequestBodyPostIgnoreThenWithoutIfRequestBody + +path = "/requestBody/postIgnoreThenWithoutIfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py new file mode 100644 index 00000000000..0f2426167ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_then_without_if + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_then_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_then_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_then_without_if_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreThenWithoutIfRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_then_without_if_request_body = BaseApi._post_ignore_then_without_if_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_then_without_if_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9613e4b85c2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_then_without_if +Schema2: typing_extensions.TypeAlias = ignore_then_without_if.IgnoreThenWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py new file mode 100644 index 00000000000..6ebb39e9071 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody + +path = "/requestBody/postIntegerTypeMatchesIntegersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py new file mode 100644 index 00000000000..85284949220 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_integer_type_matches_integers_request_body( + self, + body: int, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_integer_type_matches_integers_request_body = BaseApi._post_integer_type_matches_integers_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_integer_type_matches_integers_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..75015a55e57 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers +Schema2: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py new file mode 100644 index 00000000000..0121543e6ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody + +path = "/requestBody/postIpv4FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py new file mode 100644 index 00000000000..466fb58afba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv4_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv4FormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv4_format_request_body = BaseApi._post_ipv4_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv4_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..55901e0867d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format +Schema2: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py new file mode 100644 index 00000000000..ea64fe2d5bf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody + +path = "/requestBody/postIpv6FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py new file mode 100644 index 00000000000..306fed20616 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv6_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv6FormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv6_format_request_body = BaseApi._post_ipv6_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv6_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f664f74ba26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format +Schema2: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py new file mode 100644 index 00000000000..70084af2845 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_iri_format_request_body import RequestBodyPostIriFormatRequestBody + +path = "/requestBody/postIriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py new file mode 100644 index 00000000000..5acdd07b313 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_iri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_iri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_iri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIriFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_iri_format_request_body = BaseApi._post_iri_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_iri_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2d5ce8c0714 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_format +Schema2: typing_extensions.TypeAlias = iri_format.IriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py new file mode 100644 index 00000000000..c10ecb7a137 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_iri_reference_format_request_body import RequestBodyPostIriReferenceFormatRequestBody + +path = "/requestBody/postIriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py new file mode 100644 index 00000000000..eb62d783a08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_reference_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_iri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_iri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_iri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIriReferenceFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_iri_reference_format_request_body = BaseApi._post_iri_reference_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_iri_reference_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e38e4efe7af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_reference_format +Schema2: typing_extensions.TypeAlias = iri_reference_format.IriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py new file mode 100644 index 00000000000..bcf75d2d0d7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_items_contains_request_body import RequestBodyPostItemsContainsRequestBody + +path = "/requestBody/postItemsContainsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py new file mode 100644 index 00000000000..6547cb3cbea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_contains + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_contains_request_body( + self, + body: typing.Union[ + items_contains.ItemsContainsTupleInput, + items_contains.ItemsContainsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_contains_request_body( + self, + body: typing.Union[ + items_contains.ItemsContainsTupleInput, + items_contains.ItemsContainsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_contains_request_body( + self, + body: typing.Union[ + items_contains.ItemsContainsTupleInput, + items_contains.ItemsContainsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsContainsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_contains_request_body = BaseApi._post_items_contains_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_contains_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..75681108ad2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_contains +Schema2: typing_extensions.TypeAlias = items_contains.ItemsContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py new file mode 100644 index 00000000000..8396a09cdd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body import RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody + +path = "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py new file mode 100644 index 00000000000..72abdcb5431 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_does_not_look_in_applicators_valid_case_request_body( + self, + body: typing.Union[ + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_does_not_look_in_applicators_valid_case_request_body( + self, + body: typing.Union[ + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_does_not_look_in_applicators_valid_case_request_body( + self, + body: typing.Union[ + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, + items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsDoesNotLookInApplicatorsValidCaseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_does_not_look_in_applicators_valid_case_request_body = BaseApi._post_items_does_not_look_in_applicators_valid_case_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_does_not_look_in_applicators_valid_case_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..56c52e9e116 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case +Schema2: typing_extensions.TypeAlias = items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCase diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py new file mode 100644 index 00000000000..08615840da4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_items_with_null_instance_elements_request_body import RequestBodyPostItemsWithNullInstanceElementsRequestBody + +path = "/requestBody/postItemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py new file mode 100644 index 00000000000..3c67e6c725b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_with_null_instance_elements + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_with_null_instance_elements_request_body( + self, + body: typing.Union[ + items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, + items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_with_null_instance_elements_request_body( + self, + body: typing.Union[ + items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, + items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_with_null_instance_elements_request_body( + self, + body: typing.Union[ + items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, + items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsWithNullInstanceElementsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_with_null_instance_elements_request_body = BaseApi._post_items_with_null_instance_elements_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..60737c9dad5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = items_with_null_instance_elements.ItemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py new file mode 100644 index 00000000000..01fde730e5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody + +path = "/requestBody/postJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py new file mode 100644 index 00000000000..1cea61a5ef6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostJsonPointerFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_json_pointer_format_request_body = BaseApi._post_json_pointer_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_json_pointer_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..489bbe53817 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format +Schema2: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py new file mode 100644 index 00000000000..a9553e628ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body import RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody + +path = "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py new file mode 100644 index 00000000000..ed136362c6b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxcontains_without_contains_is_ignored + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxcontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxcontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxcontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxcontainsWithoutContainsIsIgnoredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxcontains_without_contains_is_ignored_request_body = BaseApi._post_maxcontains_without_contains_is_ignored_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxcontains_without_contains_is_ignored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ebd36d19ec3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxcontains_without_contains_is_ignored +Schema2: typing_extensions.TypeAlias = maxcontains_without_contains_is_ignored.MaxcontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py new file mode 100644 index 00000000000..e154f1fcdb2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody + +path = "/requestBody/postMaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..cca2b5a02a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_request_body = BaseApi._post_maximum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b73de2ae539 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation +Schema2: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py new file mode 100644 index 00000000000..6ad11512c97 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody + +path = "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py new file mode 100644 index 00000000000..d5880de2fc9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_with_unsigned_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_with_unsigned_integer_request_body = BaseApi._post_maximum_validation_with_unsigned_integer_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_with_unsigned_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a5cb9f890fd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer +Schema2: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..713fdb3d848 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody + +path = "/requestBody/postMaxitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..54c1e39012a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxitems_validation_request_body = BaseApi._post_maxitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..16c2894ebba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation +Schema2: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py new file mode 100644 index 00000000000..5c8fb246f4e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody + +path = "/requestBody/postMaxlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py new file mode 100644 index 00000000000..27fa550cc70 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxlengthValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxlength_validation_request_body = BaseApi._post_maxlength_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxlength_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d94050ba037 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation +Schema2: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py new file mode 100644 index 00000000000..ee07bbdbbbd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody + +path = "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py new file mode 100644 index 00000000000..5267de99fda --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties0_means_the_object_is_empty_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties0_means_the_object_is_empty_request_body = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1c24d48d19b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty +Schema2: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py new file mode 100644 index 00000000000..bc81917babb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody + +path = "/requestBody/postMaxpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..2dfe5bbd95a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxpropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties_validation_request_body = BaseApi._post_maxproperties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e5bd830805a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation +Schema2: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py new file mode 100644 index 00000000000..61e149c8f8d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_mincontains_without_contains_is_ignored_request_body import RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody + +path = "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py new file mode 100644 index 00000000000..935570c2c97 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mincontains_without_contains_is_ignored + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_mincontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_mincontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_mincontains_without_contains_is_ignored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMincontainsWithoutContainsIsIgnoredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_mincontains_without_contains_is_ignored_request_body = BaseApi._post_mincontains_without_contains_is_ignored_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_mincontains_without_contains_is_ignored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..68d35232895 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mincontains_without_contains_is_ignored +Schema2: typing_extensions.TypeAlias = mincontains_without_contains_is_ignored.MincontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py new file mode 100644 index 00000000000..ad9ce2f4096 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody + +path = "/requestBody/postMinimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..cdf97e46f41 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_request_body = BaseApi._post_minimum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..675ae689104 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation +Schema2: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py new file mode 100644 index 00000000000..5dadedfe25a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody + +path = "/requestBody/postMinimumValidationWithSignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py new file mode 100644 index 00000000000..e969e45a34c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_with_signed_integer_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_with_signed_integer_request_body = BaseApi._post_minimum_validation_with_signed_integer_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_with_signed_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..06b5dea583e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer +Schema2: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..0f7cc0c1305 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody + +path = "/requestBody/postMinitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..19fcba11479 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minitems_validation_request_body = BaseApi._post_minitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..29f288f2b17 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation +Schema2: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py new file mode 100644 index 00000000000..0fa95af2e9d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody + +path = "/requestBody/postMinlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py new file mode 100644 index 00000000000..cb549983d29 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minlength_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinlengthValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minlength_validation_request_body = BaseApi._post_minlength_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minlength_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..618e8ab4279 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation +Schema2: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py new file mode 100644 index 00000000000..3373bc97244 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody + +path = "/requestBody/postMinpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..408503016ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minproperties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinpropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minproperties_validation_request_body = BaseApi._post_minproperties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minproperties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f6e1a9b1c20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation +Schema2: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py new file mode 100644 index 00000000000..20e856d6c42 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_multiple_dependents_required_request_body import RequestBodyPostMultipleDependentsRequiredRequestBody + +path = "/requestBody/postMultipleDependentsRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py new file mode 100644 index 00000000000..3c0be68e4a6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_dependents_required + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_dependents_required_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_dependents_required_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_dependents_required_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleDependentsRequiredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_dependents_required_request_body = BaseApi._post_multiple_dependents_required_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_dependents_required_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..3ba1ea03ac2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_dependents_required +Schema2: typing_extensions.TypeAlias = multiple_dependents_required.MultipleDependentsRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py new file mode 100644 index 00000000000..0998431112c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body import RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody + +path = "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py new file mode 100644 index 00000000000..e75f07d9fa5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_simultaneous_patternproperties_are_validated_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_simultaneous_patternproperties_are_validated_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_simultaneous_patternproperties_are_validated_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_simultaneous_patternproperties_are_validated_request_body = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..66dd94e3c9e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated +Schema2: typing_extensions.TypeAlias = multiple_simultaneous_patternproperties_are_validated.MultipleSimultaneousPatternpropertiesAreValidated diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py new file mode 100644 index 00000000000..d557c68d471 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body import RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody + +path = "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py new file mode 100644 index 00000000000..3136826bcd9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_types_can_be_specified_in_an_array_request_body( + self, + body: typing.Union[ + int, + str, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_types_can_be_specified_in_an_array_request_body( + self, + body: typing.Union[ + int, + str, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_types_can_be_specified_in_an_array_request_body( + self, + body: typing.Union[ + int, + str, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_types_can_be_specified_in_an_array_request_body = BaseApi._post_multiple_types_can_be_specified_in_an_array_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_types_can_be_specified_in_an_array_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2d953804838 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array +Schema2: typing_extensions.TypeAlias = multiple_types_can_be_specified_in_an_array.MultipleTypesCanBeSpecifiedInAnArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..fa5ad4e8f6f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..b9883a102de --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_allof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_allof_to_check_validation_semantics_request_body = BaseApi._post_nested_allof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_allof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1aaa108330d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..809df9f9000 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..430c5ee60fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_anyof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_anyof_to_check_validation_semantics_request_body = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4d81833ca5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py new file mode 100644 index 00000000000..ac24cf6aa52 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody + +path = "/requestBody/postNestedItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py new file mode 100644 index 00000000000..53604ab38a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_items_request_body( + self, + body: typing.Union[ + nested_items.NestedItemsTupleInput, + nested_items.NestedItemsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_items_request_body = BaseApi._post_nested_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8a0193a2831 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items +Schema2: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py new file mode 100644 index 00000000000..53864f06e40 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody + +path = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py new file mode 100644 index 00000000000..b04ec723d1a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_oneof_to_check_validation_semantics_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_oneof_to_check_validation_semantics_request_body = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..164ce7d2feb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py new file mode 100644 index 00000000000..1e784160f84 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body import RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody + +path = "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py new file mode 100644 index 00000000000..cc7250e6eff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_non_ascii_pattern_with_additionalproperties_request_body( + self, + body: typing.Union[ + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_non_ascii_pattern_with_additionalproperties_request_body( + self, + body: typing.Union[ + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_non_ascii_pattern_with_additionalproperties_request_body( + self, + body: typing.Union[ + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, + non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNonAsciiPatternWithAdditionalpropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_non_ascii_pattern_with_additionalproperties_request_body = BaseApi._post_non_ascii_pattern_with_additionalproperties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_non_ascii_pattern_with_additionalproperties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fe71df0ddc0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties +Schema2: typing_extensions.TypeAlias = non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py new file mode 100644 index 00000000000..fa664ca13f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_non_interference_across_combined_schemas_request_body import RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody + +path = "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py new file mode 100644 index 00000000000..e7a3c3b1792 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_interference_across_combined_schemas + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_non_interference_across_combined_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_non_interference_across_combined_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_non_interference_across_combined_schemas_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNonInterferenceAcrossCombinedSchemasRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_non_interference_across_combined_schemas_request_body = BaseApi._post_non_interference_across_combined_schemas_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_non_interference_across_combined_schemas_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7f98584568e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_interference_across_combined_schemas +Schema2: typing_extensions.TypeAlias = non_interference_across_combined_schemas.NonInterferenceAcrossCombinedSchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py new file mode 100644 index 00000000000..0ce18a55b48 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody + +path = "/requestBody/postNotMoreComplexSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py new file mode 100644 index 00000000000..c9afbde92df --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_more_complex_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMoreComplexSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_more_complex_schema_request_body = BaseApi._post_not_more_complex_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_more_complex_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7466659646d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema +Schema2: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py new file mode 100644 index 00000000000..05bb43a3b9f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_not_multiple_types_request_body import RequestBodyPostNotMultipleTypesRequestBody + +path = "/requestBody/postNotMultipleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py new file mode 100644 index 00000000000..3fb48b052c8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_multiple_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_multiple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_multiple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_multiple_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMultipleTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_multiple_types_request_body = BaseApi._post_not_multiple_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_multiple_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..808ed7158e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_multiple_types +Schema2: typing_extensions.TypeAlias = not_multiple_types.NotMultipleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py new file mode 100644 index 00000000000..5d8109b6f57 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody + +path = "/requestBody/postNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py new file mode 100644 index 00000000000..cd610e49d23 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_request_body = BaseApi._post_not_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9ad18bdd1d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not +Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py new file mode 100644 index 00000000000..9cd5dfb3207 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody + +path = "/requestBody/postNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py new file mode 100644 index 00000000000..e8fab53d96d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nul_characters_in_strings_request_body( + self, + body: typing.Literal[ + "hello\x00there" + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNulCharactersInStringsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nul_characters_in_strings_request_body = BaseApi._post_nul_characters_in_strings_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nul_characters_in_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2422cba070d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings +Schema2: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py new file mode 100644 index 00000000000..d00cc04dfb9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody + +path = "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py new file mode 100644 index 00000000000..12d96b16e38 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_null_type_matches_only_the_null_object_request_body( + self, + body: None, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_null_type_matches_only_the_null_object_request_body = BaseApi._post_null_type_matches_only_the_null_object_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_null_type_matches_only_the_null_object_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a70311d5d92 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object +Schema2: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py new file mode 100644 index 00000000000..47587baa209 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody + +path = "/requestBody/postNumberTypeMatchesNumbersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py new file mode 100644 index 00000000000..d76fc77ebae --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_number_type_matches_numbers_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNumberTypeMatchesNumbersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_number_type_matches_numbers_request_body = BaseApi._post_number_type_matches_numbers_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_number_type_matches_numbers_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..404c9d56f43 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers +Schema2: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py new file mode 100644 index 00000000000..4128e9e90db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody + +path = "/requestBody/postObjectPropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py new file mode 100644 index 00000000000..6737e2d9d16 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_properties_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectPropertiesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_properties_validation_request_body = BaseApi._post_object_properties_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_properties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1593145b4bc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation +Schema2: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py new file mode 100644 index 00000000000..9a28be7eac3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody + +path = "/requestBody/postObjectTypeMatchesObjectsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py new file mode 100644 index 00000000000..6187696ea8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_type_matches_objects_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectTypeMatchesObjectsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_type_matches_objects_request_body = BaseApi._post_object_type_matches_objects_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_type_matches_objects_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..417224c18ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects +Schema2: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py new file mode 100644 index 00000000000..19e6c49de33 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody + +path = "/requestBody/postOneofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py new file mode 100644 index 00000000000..ca65ba80f61 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_complex_types_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofComplexTypesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_complex_types_request_body = BaseApi._post_oneof_complex_types_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_complex_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c473dde6bfb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types +Schema2: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py new file mode 100644 index 00000000000..5c6ffb88a3a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody + +path = "/requestBody/postOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py new file mode 100644 index 00000000000..9e24ea1dd3a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_request_body = BaseApi._post_oneof_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..474d29f6009 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof +Schema2: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py new file mode 100644 index 00000000000..a08595ec8ac --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody + +path = "/requestBody/postOneofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py new file mode 100644 index 00000000000..0c076d2ec5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_base_schema_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithBaseSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_base_schema_request_body = BaseApi._post_oneof_with_base_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d1898df2fe7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema +Schema2: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py new file mode 100644 index 00000000000..4f9a293eb8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody + +path = "/requestBody/postOneofWithEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py new file mode 100644 index 00000000000..71649629dc5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_empty_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithEmptySchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_empty_schema_request_body = BaseApi._post_oneof_with_empty_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..792b00c2b5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema +Schema2: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py new file mode 100644 index 00000000000..ce1e3d7a855 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody + +path = "/requestBody/postOneofWithRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py new file mode 100644 index 00000000000..3a4b21d436e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_required_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithRequiredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_required_request_body = BaseApi._post_oneof_with_required_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_required_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..16715d35af0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required +Schema2: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py new file mode 100644 index 00000000000..73139a7fca0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody + +path = "/requestBody/postPatternIsNotAnchoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py new file mode 100644 index 00000000000..754eeb128d5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_is_not_anchored_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternIsNotAnchoredRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_is_not_anchored_request_body = BaseApi._post_pattern_is_not_anchored_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_is_not_anchored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..293cfe38cb4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored +Schema2: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py new file mode 100644 index 00000000000..df8f3abd132 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody + +path = "/requestBody/postPatternValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py new file mode 100644 index 00000000000..ba195f4413c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_validation_request_body = BaseApi._post_pattern_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..4920b211601 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation +Schema2: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py new file mode 100644 index 00000000000..3ec8b0f6407 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body import RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody + +path = "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py new file mode 100644 index 00000000000..715a9b63b1e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_patternproperties_validates_properties_matching_a_regex_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_patternproperties_validates_properties_matching_a_regex_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_patternproperties_validates_properties_matching_a_regex_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_patternproperties_validates_properties_matching_a_regex_request_body = BaseApi._post_patternproperties_validates_properties_matching_a_regex_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_patternproperties_validates_properties_matching_a_regex_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..87ad0cdfa8d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex +Schema2: typing_extensions.TypeAlias = patternproperties_validates_properties_matching_a_regex.PatternpropertiesValidatesPropertiesMatchingARegex diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py new file mode 100644 index 00000000000..00f47c38a5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body import RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody + +path = "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py new file mode 100644 index 00000000000..ed56f623c32 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_patternproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_patternproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_patternproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_patternproperties_with_null_valued_instance_properties_request_body = BaseApi._post_patternproperties_with_null_valued_instance_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_patternproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..b7142af3c40 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = patternproperties_with_null_valued_instance_properties.PatternpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py new file mode 100644 index 00000000000..00be82012fa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body import RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody + +path = "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py new file mode 100644 index 00000000000..8d339d7a0d6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( + self, + body: typing.Union[ + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( + self, + body: typing.Union[ + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( + self, + body: typing.Union[ + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, + prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..cd69d04ea26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items +Schema2: typing_extensions.TypeAlias = prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py new file mode 100644 index 00000000000..aea7209c610 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_prefixitems_with_null_instance_elements_request_body import RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody + +path = "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py new file mode 100644 index 00000000000..ebd4b682c57 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_with_null_instance_elements + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_prefixitems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_prefixitems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_prefixitems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPrefixitemsWithNullInstanceElementsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_prefixitems_with_null_instance_elements_request_body = BaseApi._post_prefixitems_with_null_instance_elements_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_prefixitems_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2185e963d00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = prefixitems_with_null_instance_elements.PrefixitemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py new file mode 100644 index 00000000000..94fcb893ae7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body import RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody + +path = "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py new file mode 100644 index 00000000000..540e720d4c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_patternproperties_additionalproperties_interaction_request_body( + self, + body: typing.Union[ + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_patternproperties_additionalproperties_interaction_request_body( + self, + body: typing.Union[ + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_patternproperties_additionalproperties_interaction_request_body( + self, + body: typing.Union[ + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, + properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_patternproperties_additionalproperties_interaction_request_body = BaseApi._post_properties_patternproperties_additionalproperties_interaction_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_patternproperties_additionalproperties_interaction_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..83b71f80614 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction +Schema2: typing_extensions.TypeAlias = properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteraction diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py new file mode 100644 index 00000000000..b20aa8feaa0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody + +path = "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py new file mode 100644 index 00000000000..9eb82cb56a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_whose_names_are_javascript_object_property_names_request_body = BaseApi._post_properties_whose_names_are_javascript_object_property_names_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_whose_names_are_javascript_object_property_names_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..baee22e025f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names +Schema2: typing_extensions.TypeAlias = properties_whose_names_are_javascript_object_property_names.PropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..4b7025d9ccb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody + +path = "/requestBody/postPropertiesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..f7f1907b01f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_escaped_characters_request_body = BaseApi._post_properties_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5260b009fd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters +Schema2: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py new file mode 100644 index 00000000000..e9ba34b3e95 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_properties_with_null_valued_instance_properties_request_body import RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody + +path = "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py new file mode 100644 index 00000000000..81fb6a1eb65 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_null_valued_instance_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_null_valued_instance_properties_request_body = BaseApi._post_properties_with_null_valued_instance_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e02ac63f49f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = properties_with_null_valued_instance_properties.PropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py new file mode 100644 index 00000000000..a54d80da178 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody + +path = "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py new file mode 100644 index 00000000000..f6c69abbb41 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_property_named_ref_that_is_not_a_reference_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_property_named_ref_that_is_not_a_reference_request_body = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c5b136bf4a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference +Schema2: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py new file mode 100644 index 00000000000..72ec2a32d4a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_propertynames_validation_request_body import RequestBodyPostPropertynamesValidationRequestBody + +path = "/requestBody/postPropertynamesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py new file mode 100644 index 00000000000..1b5b1101cd1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import propertynames_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_propertynames_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_propertynames_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_propertynames_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertynamesValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_propertynames_validation_request_body = BaseApi._post_propertynames_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_propertynames_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..915e3feeac0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import propertynames_validation +Schema2: typing_extensions.TypeAlias = propertynames_validation.PropertynamesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py new file mode 100644 index 00000000000..6c72b4e6d18 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_regex_format_request_body import RequestBodyPostRegexFormatRequestBody + +path = "/requestBody/postRegexFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py new file mode 100644 index 00000000000..6ce7ad79332 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regex_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_regex_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_regex_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_regex_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRegexFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_regex_format_request_body = BaseApi._post_regex_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_regex_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..28598ef5139 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regex_format +Schema2: typing_extensions.TypeAlias = regex_format.RegexFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py new file mode 100644 index 00000000000..368ad1c4c49 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body import RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody + +path = "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py new file mode 100644 index 00000000000..e6e3fd9169e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a13163b0df7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive +Schema2: typing_extensions.TypeAlias = regexes_are_not_anchored_by_default_and_are_case_sensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py new file mode 100644 index 00000000000..ea31c0603b7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_relative_json_pointer_format_request_body import RequestBodyPostRelativeJsonPointerFormatRequestBody + +path = "/requestBody/postRelativeJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py new file mode 100644 index 00000000000..c96de2bbaf5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import relative_json_pointer_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_relative_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_relative_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_relative_json_pointer_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRelativeJsonPointerFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_relative_json_pointer_format_request_body = BaseApi._post_relative_json_pointer_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_relative_json_pointer_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..ba70730fb48 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import relative_json_pointer_format +Schema2: typing_extensions.TypeAlias = relative_json_pointer_format.RelativeJsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py new file mode 100644 index 00000000000..5ea3e864c93 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody + +path = "/requestBody/postRequiredDefaultValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py new file mode 100644 index 00000000000..83fe31dc612 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_default_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredDefaultValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_default_validation_request_body = BaseApi._post_required_default_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_default_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..3ddabc1af63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation +Schema2: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py new file mode 100644 index 00000000000..90bc586ed2c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody + +path = "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py new file mode 100644 index 00000000000..7f9d7969234 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_properties_whose_names_are_javascript_object_property_names_request_body = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8d36048378e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names +Schema2: typing_extensions.TypeAlias = required_properties_whose_names_are_javascript_object_property_names.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py new file mode 100644 index 00000000000..f8b9dcf8fe1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody + +path = "/requestBody/postRequiredValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py new file mode 100644 index 00000000000..8b84cb57f7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_validation_request_body = BaseApi._post_required_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8f5ebbe79cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation +Schema2: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py new file mode 100644 index 00000000000..9f70eb66747 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody + +path = "/requestBody/postRequiredWithEmptyArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py new file mode 100644 index 00000000000..95add17687c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_empty_array_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEmptyArrayRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_empty_array_request_body = BaseApi._post_required_with_empty_array_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_empty_array_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..af52814277e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array +Schema2: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py new file mode 100644 index 00000000000..52861ef3116 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody + +path = "/requestBody/postRequiredWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py new file mode 100644 index 00000000000..40b8874dde0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_escaped_characters_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEscapedCharactersRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_escaped_characters_request_body = BaseApi._post_required_with_escaped_characters_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9489d00c981 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters +Schema2: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py new file mode 100644 index 00000000000..455fb167b26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody + +path = "/requestBody/postSimpleEnumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py new file mode 100644 index 00000000000..d4990c52b2d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_simple_enum_validation_request_body( + self, + body: typing.Union[ + int, + float + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSimpleEnumValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_simple_enum_validation_request_body = BaseApi._post_simple_enum_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_simple_enum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5e64dd92807 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation +Schema2: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py new file mode 100644 index 00000000000..1ee27e23ac5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_single_dependency_request_body import RequestBodyPostSingleDependencyRequestBody + +path = "/requestBody/postSingleDependencyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py new file mode 100644 index 00000000000..96757053d86 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import single_dependency + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_single_dependency_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSingleDependencyRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_single_dependency_request_body = BaseApi._post_single_dependency_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_single_dependency_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..3982e382df8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import single_dependency +Schema2: typing_extensions.TypeAlias = single_dependency.SingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py new file mode 100644 index 00000000000..d4595a3437a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_small_multiple_of_large_integer_request_body import RequestBodyPostSmallMultipleOfLargeIntegerRequestBody + +path = "/requestBody/postSmallMultipleOfLargeIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py new file mode 100644 index 00000000000..c00b28dc35a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import small_multiple_of_large_integer + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_small_multiple_of_large_integer_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_small_multiple_of_large_integer_request_body( + self, + body: int, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_small_multiple_of_large_integer_request_body( + self, + body: int, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSmallMultipleOfLargeIntegerRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_small_multiple_of_large_integer_request_body = BaseApi._post_small_multiple_of_large_integer_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_small_multiple_of_large_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..5493790072e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import small_multiple_of_large_integer +Schema2: typing_extensions.TypeAlias = small_multiple_of_large_integer.SmallMultipleOfLargeInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py new file mode 100644 index 00000000000..bf46191b89d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody + +path = "/requestBody/postStringTypeMatchesStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py new file mode 100644 index 00000000000..54388df0e65 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_string_type_matches_strings_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostStringTypeMatchesStringsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_string_type_matches_strings_request_body = BaseApi._post_string_type_matches_strings_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_string_type_matches_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..27b5b8bcead --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings +Schema2: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py new file mode 100644 index 00000000000..d7585a38c92 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_time_format_request_body import RequestBodyPostTimeFormatRequestBody + +path = "/requestBody/postTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py new file mode 100644 index 00000000000..2747083c249 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import time_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_time_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTimeFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_time_format_request_body = BaseApi._post_time_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_time_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..10d05231bea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import time_format +Schema2: typing_extensions.TypeAlias = time_format.TimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py new file mode 100644 index 00000000000..91862fbc1ec --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_type_array_object_or_null_request_body import RequestBodyPostTypeArrayObjectOrNullRequestBody + +path = "/requestBody/postTypeArrayObjectOrNullRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py new file mode 100644 index 00000000000..2f7098a9c6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_object_or_null + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_array_object_or_null_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + None, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_array_object_or_null_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + None, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_array_object_or_null_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + None, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeArrayObjectOrNullRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_array_object_or_null_request_body = BaseApi._post_type_array_object_or_null_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_array_object_or_null_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..75bddff3f20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_object_or_null +Schema2: typing_extensions.TypeAlias = type_array_object_or_null.TypeArrayObjectOrNull diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py new file mode 100644 index 00000000000..78cee53bda5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_type_array_or_object_request_body import RequestBodyPostTypeArrayOrObjectRequestBody + +path = "/requestBody/postTypeArrayOrObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py new file mode 100644 index 00000000000..434709a727e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_or_object + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_array_or_object_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_array_or_object_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_array_or_object_request_body( + self, + body: typing.Union[ + typing.Union[ + typing.Tuple[schemas.INPUT_TYPES_ALL, ...], + typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], + ], + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeArrayOrObjectRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_array_or_object_request_body = BaseApi._post_type_array_or_object_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_array_or_object_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..207c015b341 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_or_object +Schema2: typing_extensions.TypeAlias = type_array_or_object.TypeArrayOrObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py new file mode 100644 index 00000000000..c07c7c39810 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_type_as_array_with_one_item_request_body import RequestBodyPostTypeAsArrayWithOneItemRequestBody + +path = "/requestBody/postTypeAsArrayWithOneItemRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py new file mode 100644 index 00000000000..e888f7ad32c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_as_array_with_one_item + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_as_array_with_one_item_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_as_array_with_one_item_request_body( + self, + body: str, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_as_array_with_one_item_request_body( + self, + body: str, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeAsArrayWithOneItemRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_as_array_with_one_item_request_body = BaseApi._post_type_as_array_with_one_item_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_as_array_with_one_item_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..008ad4c0312 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_as_array_with_one_item +Schema2: typing_extensions.TypeAlias = type_as_array_with_one_item.TypeAsArrayWithOneItem diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py new file mode 100644 index 00000000000..6700b6e3bf6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluateditems_as_schema_request_body import RequestBodyPostUnevaluateditemsAsSchemaRequestBody + +path = "/requestBody/postUnevaluateditemsAsSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py new file mode 100644 index 00000000000..571fbdd4a20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_as_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_as_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_as_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_as_schema_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsAsSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_as_schema_request_body = BaseApi._post_unevaluateditems_as_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_as_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d5f5a3df221 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_as_schema +Schema2: typing_extensions.TypeAlias = unevaluateditems_as_schema.UnevaluateditemsAsSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py new file mode 100644 index 00000000000..b8d6a2de947 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body import RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody + +path = "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py new file mode 100644 index 00000000000..a472c8bd566 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_depends_on_multiple_nested_contains_request_body = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a0d5b127247 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains +Schema2: typing_extensions.TypeAlias = unevaluateditems_depends_on_multiple_nested_contains.UnevaluateditemsDependsOnMultipleNestedContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py new file mode 100644 index 00000000000..6f0cae1c447 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluateditems_with_items_request_body import RequestBodyPostUnevaluateditemsWithItemsRequestBody + +path = "/requestBody/postUnevaluateditemsWithItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py new file mode 100644 index 00000000000..190b8e4b564 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_with_items_request_body( + self, + body: typing.Union[ + unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, + unevaluateditems_with_items.UnevaluateditemsWithItemsTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_with_items_request_body( + self, + body: typing.Union[ + unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, + unevaluateditems_with_items.UnevaluateditemsWithItemsTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_with_items_request_body( + self, + body: typing.Union[ + unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, + unevaluateditems_with_items.UnevaluateditemsWithItemsTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsWithItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_with_items_request_body = BaseApi._post_unevaluateditems_with_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_with_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9a0410581eb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_items +Schema2: typing_extensions.TypeAlias = unevaluateditems_with_items.UnevaluateditemsWithItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py new file mode 100644 index 00000000000..7e8cb32ca73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body import RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody + +path = "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py new file mode 100644 index 00000000000..189432ea0d1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_null_instance_elements + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_with_null_instance_elements_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsWithNullInstanceElementsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_with_null_instance_elements_request_body = BaseApi._post_unevaluateditems_with_null_instance_elements_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fa885543144 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = unevaluateditems_with_null_instance_elements.UnevaluateditemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py new file mode 100644 index 00000000000..10726ada218 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body import RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody + +path = "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py new file mode 100644 index 00000000000..9961995ccde --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_not_affected_by_propertynames_request_body = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..d2d6d5dc23c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_not_affected_by_propertynames.UnevaluatedpropertiesNotAffectedByPropertynames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py new file mode 100644 index 00000000000..7421a4d72e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_schema_request_body import RequestBodyPostUnevaluatedpropertiesSchemaRequestBody + +path = "/requestBody/postUnevaluatedpropertiesSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py new file mode 100644 index 00000000000..c6c0a20df59 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_schema_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_schema_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_schema_request_body( + self, + body: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesSchemaRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_schema_request_body = BaseApi._post_unevaluatedproperties_schema_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..fca2e2461c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_schema +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_schema.UnevaluatedpropertiesSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py new file mode 100644 index 00000000000..70d1447448c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body import RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody + +path = "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py new file mode 100644 index 00000000000..23e1c63cdba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( + self, + body: typing.Union[ + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( + self, + body: typing.Union[ + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( + self, + body: typing.Union[ + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, + unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_with_adjacent_additionalproperties_request_body = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1a3d1132937 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py new file mode 100644 index 00000000000..0ff130a6909 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body import RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody + +path = "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py new file mode 100644 index 00000000000..3a34d537bd6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_with_null_valued_instance_properties_request_body = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..6e452389e71 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_null_valued_instance_properties.UnevaluatedpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py new file mode 100644 index 00000000000..1e8addcca13 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody + +path = "/requestBody/postUniqueitemsFalseValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py new file mode 100644 index 00000000000..498a03ae5fb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_validation_request_body = BaseApi._post_uniqueitems_false_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..a87136f730d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation +Schema2: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py new file mode 100644 index 00000000000..d408da0761f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody + +path = "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py new file mode 100644 index 00000000000..757dab38875 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseWithAnArrayOfItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_with_an_array_of_items_request_body = BaseApi._post_uniqueitems_false_with_an_array_of_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_with_an_array_of_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8b39a15068e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items +Schema2: typing_extensions.TypeAlias = uniqueitems_false_with_an_array_of_items.UniqueitemsFalseWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py new file mode 100644 index 00000000000..6a663f89e52 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody + +path = "/requestBody/postUniqueitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py new file mode 100644 index 00000000000..8cb93dbc108 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_validation_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsValidationRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_validation_request_body = BaseApi._post_uniqueitems_validation_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..22d0b748ea7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation +Schema2: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py new file mode 100644 index 00000000000..64dc9150a25 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody + +path = "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py new file mode 100644 index 00000000000..d0e27033756 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_with_an_array_of_items + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_with_an_array_of_items_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsWithAnArrayOfItemsRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_with_an_array_of_items_request_body = BaseApi._post_uniqueitems_with_an_array_of_items_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_with_an_array_of_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..82a52c16a75 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_with_an_array_of_items +Schema2: typing_extensions.TypeAlias = uniqueitems_with_an_array_of_items.UniqueitemsWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py new file mode 100644 index 00000000000..e57a1f4fda6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody + +path = "/requestBody/postUriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py new file mode 100644 index 00000000000..7408afb67d7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_format_request_body = BaseApi._post_uri_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..654ba34398b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format +Schema2: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py new file mode 100644 index 00000000000..3e35c33e574 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody + +path = "/requestBody/postUriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py new file mode 100644 index 00000000000..c3f37d8126c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_reference_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriReferenceFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_reference_format_request_body = BaseApi._post_uri_reference_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_reference_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2b77aef5da1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format +Schema2: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py new file mode 100644 index 00000000000..6de7813243c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody + +path = "/requestBody/postUriTemplateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py new file mode 100644 index 00000000000..94ff739b556 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_template_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriTemplateFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_template_format_request_body = BaseApi._post_uri_template_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_template_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..c4967db183c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format +Schema2: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py new file mode 100644 index 00000000000..c66e6ec97af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_uuid_format_request_body import RequestBodyPostUuidFormatRequestBody + +path = "/requestBody/postUuidFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py new file mode 100644 index 00000000000..d08bae1e1a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uuid_format + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uuid_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uuid_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uuid_format_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUuidFormatRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uuid_format_request_body = BaseApi._post_uuid_format_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uuid_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..76fa1e8f1e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uuid_format +Schema2: typing_extensions.TypeAlias = uuid_format.UuidFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py new file mode 100644 index 00000000000..1b2ead672e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body import RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody + +path = "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py new file mode 100644 index 00000000000..04d2698602f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import validate_against_correct_branch_then_vs_else + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_validate_against_correct_branch_then_vs_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_validate_against_correct_branch_then_vs_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_validate_against_correct_branch_then_vs_else_request_body( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostValidateAgainstCorrectBranchThenVsElseRequestBody(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_validate_against_correct_branch_then_vs_else_request_body = BaseApi._post_validate_against_correct_branch_then_vs_else_request_body + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_validate_against_correct_branch_then_vs_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py new file mode 100644 index 00000000000..ed4680461db --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..026e5c74a70 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import validate_against_correct_branch_then_vs_else +Schema2: typing_extensions.TypeAlias = validate_against_correct_branch_then_vs_else.ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4d24d606c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..100eaecbe9c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types import ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes + +path = "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..51572cb35f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_a_schema_given_for_prefixitems_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_a_schema_given_for_prefixitems_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_a_schema_given_for_prefixitems_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostASchemaGivenForPrefixitemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_a_schema_given_for_prefixitems_response_body_for_content_types = BaseApi._post_a_schema_given_for_prefixitems_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_a_schema_given_for_prefixitems_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..03fda6470fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import a_schema_given_for_prefixitems +Schema2: typing_extensions.TypeAlias = a_schema_given_for_prefixitems.ASchemaGivenForPrefixitems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cb9c34b720d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes + +path = "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..104bc42997f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additional_items_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additional_items_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additional_items_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additional_items_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additional_items_are_allowed_by_default_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additional_items_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..15e21c81b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_items_are_allowed_by_default +Schema2: typing_extensions.TypeAlias = additional_items_are_allowed_by_default.AdditionalItemsAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9a9a1f63ce1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6e0cef1b9f2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f320e878562 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_are_allowed_by_default +Schema2: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..58098efaee9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..647b89cb08d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_can_exist_by_itself_response_body_for_content_types = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..efb2f439ad6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b7fce07ef58 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_can_exist_by_itself +Schema2: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..7763b077706 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..38db0a323f4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types = BaseApi._post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e194ba355a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators +Schema2: typing_extensions.TypeAlias = additionalproperties_does_not_look_in_applicators.AdditionalpropertiesDoesNotLookInApplicators diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ec89fa5c089 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1b926b3cc6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1a8671e3497 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ff0333176a0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..863dcf8aabf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes + +path = "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5110220dffb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_additionalproperties_with_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_additionalproperties_with_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_additionalproperties_with_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_additionalproperties_with_schema_response_body_for_content_types = BaseApi._post_additionalproperties_with_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_additionalproperties_with_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..46b640468a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e457613c9a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additionalproperties_with_schema +Schema2: typing_extensions.TypeAlias = additionalproperties_with_schema.AdditionalpropertiesWithSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..94fcd5a91e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes + +path = "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1dd9115a629 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_combined_with_anyof_oneof_response_body_for_content_types = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e6f7ceccca4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_combined_with_anyof_oneof +Schema2: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2dd5b1204a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes + +path = "/responseBody/postAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6fdff3fcf93 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_response_body_for_content_types = BaseApi._post_allof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..58ea8d6fe3c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof +Schema2: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4e22ee767b1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes + +path = "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2c6ab6921ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_simple_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_simple_types_response_body_for_content_types = BaseApi._post_allof_simple_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_simple_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..04ffe7a5c26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_simple_types +Schema2: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..dd5b4e26c61 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b26372c41a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_base_schema_response_body_for_content_types = BaseApi._post_allof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..68c4f35329d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_base_schema +Schema2: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6f89734ca8e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d9bff7e0505 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..53fd4ffe2fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_one_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..64740cc3c20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ef94285e3a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_first_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_first_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4a8764a76f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_first_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..714d27c739d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..64ed6c803a5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_the_last_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_the_last_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..dffb1658cb6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_the_last_empty_schema +Schema2: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..33fa82761fd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes + +path = "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f23c16a96c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_allof_with_two_empty_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_allof_with_two_empty_schemas_response_body_for_content_types = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6c0ee15f391 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import allof_with_two_empty_schemas +Schema2: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..bf78d0d3dc6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes + +path = "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6bf3fe2b64a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_complex_types_response_body_for_content_types = BaseApi._post_anyof_complex_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_complex_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5cf2d870bec --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_complex_types +Schema2: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..732664d5de2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes + +path = "/responseBody/postAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a41dee1b906 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_response_body_for_content_types = BaseApi._post_anyof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fd388ae0816 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof +Schema2: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..42a12880597 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..0c3aaedd5a7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_base_schema_response_body_for_content_types = BaseApi._post_anyof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..afd6bbfefd5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..50467d99daa --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_base_schema +Schema2: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..41137e270ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..29b9dc4a757 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_anyof_with_one_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_anyof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7399a723ae4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import anyof_with_one_empty_schema +Schema2: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0d7d4c9726a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes + +path = "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e461d8a6d8e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_array_type_matches_arrays_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_array_type_matches_arrays_response_body_for_content_types = BaseApi._post_array_type_matches_arrays_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_array_type_matches_arrays_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..1c4bdfabd73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Tuple[schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e5b3f23185a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_type_matches_arrays +Schema2: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aadbb3b88e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes + +path = "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..de9a0bc83f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_boolean_type_matches_booleans_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_boolean_type_matches_booleans_response_body_for_content_types = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..61346186f4a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: bool + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d4e345c87b1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean_type_matches_booleans +Schema2: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a5bd11c1830 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes + +path = "/responseBody/postByIntResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f10119ef8f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_int_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByIntResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_int_response_body_for_content_types = BaseApi._post_by_int_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_int_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ce650694a07 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_int +Schema2: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..b9a0567a12c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes + +path = "/responseBody/postByNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4d75d92b604 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_number_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostByNumberResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_number_response_body_for_content_types = BaseApi._post_by_number_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_number_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ab6f9a04822 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_number +Schema2: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e0e5f516357 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes + +path = "/responseBody/postBySmallNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d6eea237dce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_by_small_number_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostBySmallNumberResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_by_small_number_response_body_for_content_types = BaseApi._post_by_small_number_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_by_small_number_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4508b52a87d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import by_small_number +Schema2: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0d4b86846dc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes + +path = "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..eae8d3fc66e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_const_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_const_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_const_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostConstNulCharactersInStringsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_const_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_const_nul_characters_in_strings_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_const_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..563f2c99b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import const_nul_characters_in_strings +Schema2: typing_extensions.TypeAlias = const_nul_characters_in_strings.ConstNulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..adaa1824768 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_contains_keyword_validation_response_body_for_content_types import ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes + +path = "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b9b479bb91d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_contains_keyword_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_contains_keyword_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_contains_keyword_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostContainsKeywordValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_contains_keyword_validation_response_body_for_content_types = BaseApi._post_contains_keyword_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_contains_keyword_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f519bece380 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_keyword_validation +Schema2: typing_extensions.TypeAlias = contains_keyword_validation.ContainsKeywordValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2ce9822ed35 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes + +path = "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b2f037b20e7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_contains_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_contains_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_contains_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostContainsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_contains_with_null_instance_elements_response_body_for_content_types = BaseApi._post_contains_with_null_instance_elements_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_contains_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f239f206444 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import contains_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = contains_with_null_instance_elements.ContainsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d72e560e323 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_date_format_response_body_for_content_types import ResponseBodyPostDateFormatResponseBodyForContentTypes + +path = "/responseBody/postDateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c3ce9b38e51 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_format_response_body_for_content_types = BaseApi._post_date_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d8ee34fd280 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_format +Schema2: typing_extensions.TypeAlias = date_format.DateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..13b6286ae93 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes + +path = "/responseBody/postDateTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..77e95e77abf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_date_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_date_time_format_response_body_for_content_types = BaseApi._post_date_time_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_date_time_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d9c84ea8aca --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import date_time_format +Schema2: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..5927aa39a32 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types import ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6322005e88a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2843b8be0d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters +Schema2: typing_extensions.TypeAlias = dependent_schemas_dependencies_with_escaped_characters.DependentSchemasDependenciesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..bb38523f74e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types import ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes + +path = "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5a23e1ea68c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..85ff65ae213 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root +Schema2: typing_extensions.TypeAlias = dependent_schemas_dependent_subschema_incompatible_with_root.DependentSchemasDependentSubschemaIncompatibleWithRoot diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d6ff6e21f1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types import ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes + +path = "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..78c2af9c864 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_dependent_schemas_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_dependent_schemas_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_dependent_schemas_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDependentSchemasSingleDependencyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_dependent_schemas_single_dependency_response_body_for_content_types = BaseApi._post_dependent_schemas_single_dependency_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_dependent_schemas_single_dependency_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d9a02a6c025 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import dependent_schemas_single_dependency +Schema2: typing_extensions.TypeAlias = dependent_schemas_single_dependency.DependentSchemasSingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a7f1c0aac8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_duration_format_response_body_for_content_types import ResponseBodyPostDurationFormatResponseBodyForContentTypes + +path = "/responseBody/postDurationFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..7696bd8edd5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_duration_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_duration_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_duration_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostDurationFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_duration_format_response_body_for_content_types = BaseApi._post_duration_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_duration_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1919784341f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import duration_format +Schema2: typing_extensions.TypeAlias = duration_format.DurationFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..427a78c0255 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes + +path = "/responseBody/postEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a97ac3aaf4e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmailFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_email_format_response_body_for_content_types = BaseApi._post_email_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_email_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5043f89584b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import email_format +Schema2: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4f52a93701b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_empty_dependents_response_body_for_content_types import ResponseBodyPostEmptyDependentsResponseBodyForContentTypes + +path = "/responseBody/postEmptyDependentsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e20e6e38dcb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_empty_dependents_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_empty_dependents_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_empty_dependents_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEmptyDependentsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_empty_dependents_response_body_for_content_types = BaseApi._post_empty_dependents_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_empty_dependents_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..aa466ad9a06 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import empty_dependents +Schema2: typing_extensions.TypeAlias = empty_dependents.EmptyDependents diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aa4d0c2b50f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes + +path = "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9f10c052867 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with0_does_not_match_false_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with0_does_not_match_false_response_body_for_content_types = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..bedf2ff6ca1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1fba80557bf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with0_does_not_match_false +Schema2: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e378c6460c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes + +path = "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ea6bfc6f671 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with1_does_not_match_true_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with1_does_not_match_true_response_body_for_content_types = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..bedf2ff6ca1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..58e4afb2697 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with1_does_not_match_true +Schema2: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..313b5ad0205 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..0a2ffcbe270 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_escaped_characters_response_body_for_content_types = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..df96b5e6964 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal["foo\nbar", "foo\rbar"] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..716a7b075de --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_escaped_characters +Schema2: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2861bd2f1b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes + +path = "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1b72a02fd43 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_false_does_not_match0_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_false_does_not_match0_response_body_for_content_types = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..084f224ba44 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal[False] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fa242d67709 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_false_does_not_match0 +Schema2: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..28b8c164e6c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes + +path = "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2b91e5a3fd9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enum_with_true_does_not_match1_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enum_with_true_does_not_match1_response_body_for_content_types = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..71c087eebd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal[True] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ee7e09e06bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enum_with_true_does_not_match1 +Schema2: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..bec380d4f76 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes + +path = "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..53b0e35de58 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_enums_in_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_enums_in_properties_response_body_for_content_types = BaseApi._post_enums_in_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_enums_in_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..60a048f4cd9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.enums_in_properties.EnumsInPropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e62f262bdfe --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import enums_in_properties +Schema2: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..af3ba24a6ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types import ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes + +path = "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..883d14bde34 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_exclusivemaximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_exclusivemaximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_exclusivemaximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostExclusivemaximumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_exclusivemaximum_validation_response_body_for_content_types = BaseApi._post_exclusivemaximum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_exclusivemaximum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..dbc0369f87f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusivemaximum_validation +Schema2: typing_extensions.TypeAlias = exclusivemaximum_validation.ExclusivemaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2087550d18a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types import ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes + +path = "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b0f1d4ae198 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_exclusiveminimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_exclusiveminimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_exclusiveminimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostExclusiveminimumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_exclusiveminimum_validation_response_body_for_content_types = BaseApi._post_exclusiveminimum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_exclusiveminimum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2b423e4a8de --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import exclusiveminimum_validation +Schema2: typing_extensions.TypeAlias = exclusiveminimum_validation.ExclusiveminimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f797e58e02e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_float_division_inf_response_body_for_content_types import ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes + +path = "/responseBody/postFloatDivisionInfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d6ed496d3bb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_float_division_inf_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostFloatDivisionInfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_float_division_inf_response_body_for_content_types = BaseApi._post_float_division_inf_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_float_division_inf_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..f83cf220b7d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: int + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..93e1dd44d11 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import float_division_inf +Schema2: typing_extensions.TypeAlias = float_division_inf.FloatDivisionInf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1530b05acd3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes + +path = "/responseBody/postForbiddenPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3025d831fac --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_forbidden_property_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_forbidden_property_response_body_for_content_types = BaseApi._post_forbidden_property_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_forbidden_property_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a20158e1e64 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import forbidden_property +Schema2: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..54034c61770 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes + +path = "/responseBody/postHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9ae8a2ee83b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostHostnameFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_hostname_format_response_body_for_content_types = BaseApi._post_hostname_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_hostname_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..71160bda951 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import hostname_format +Schema2: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..13d038914c5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_idn_email_format_response_body_for_content_types import ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes + +path = "/responseBody/postIdnEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ec9913367fb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_idn_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_idn_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_idn_email_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIdnEmailFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_idn_email_format_response_body_for_content_types = BaseApi._post_idn_email_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_idn_email_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..bdcb513c406 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_email_format +Schema2: typing_extensions.TypeAlias = idn_email_format.IdnEmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..65262f7b972 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_idn_hostname_format_response_body_for_content_types import ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes + +path = "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5d0e1e86bf3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_idn_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_idn_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_idn_hostname_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIdnHostnameFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_idn_hostname_format_response_body_for_content_types = BaseApi._post_idn_hostname_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_idn_hostname_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..08005f9e7ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import idn_hostname_format +Schema2: typing_extensions.TypeAlias = idn_hostname_format.IdnHostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d81390039b6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_if_and_else_without_then_response_body_for_content_types import ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes + +path = "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d0096be5440 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_and_else_without_then_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_and_else_without_then_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_and_else_without_then_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAndElseWithoutThenResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_and_else_without_then_response_body_for_content_types = BaseApi._post_if_and_else_without_then_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_and_else_without_then_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..539f547c303 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_else_without_then +Schema2: typing_extensions.TypeAlias = if_and_else_without_then.IfAndElseWithoutThen diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..c4737b30384 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_if_and_then_without_else_response_body_for_content_types import ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes + +path = "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e37481dcd4b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_and_then_without_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_and_then_without_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_and_then_without_else_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAndThenWithoutElseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_and_then_without_else_response_body_for_content_types = BaseApi._post_if_and_then_without_else_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_and_then_without_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6af342aacad --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_and_then_without_else +Schema2: typing_extensions.TypeAlias = if_and_then_without_else.IfAndThenWithoutElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..989c5fd2233 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types import ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes + +path = "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b797a5c2fa5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..813371f1669 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence +Schema2: typing_extensions.TypeAlias = if_appears_at_the_end_when_serialized_keyword_processing_sequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..70f3a1bf478 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ignore_else_without_if_response_body_for_content_types import ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes + +path = "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3213419e88c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_else_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_else_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_else_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreElseWithoutIfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_else_without_if_response_body_for_content_types = BaseApi._post_ignore_else_without_if_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_else_without_if_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c133595c014 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_else_without_if +Schema2: typing_extensions.TypeAlias = ignore_else_without_if.IgnoreElseWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6987b79eb23 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types import ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes + +path = "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..cfe3d7c2495 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_if_without_then_or_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_if_without_then_or_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_if_without_then_or_else_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_if_without_then_or_else_response_body_for_content_types = BaseApi._post_ignore_if_without_then_or_else_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_if_without_then_or_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d481bc18fd2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_if_without_then_or_else +Schema2: typing_extensions.TypeAlias = ignore_if_without_then_or_else.IgnoreIfWithoutThenOrElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..240072a553b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ignore_then_without_if_response_body_for_content_types import ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes + +path = "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..222cf9f744e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ignore_then_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ignore_then_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ignore_then_without_if_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIgnoreThenWithoutIfResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ignore_then_without_if_response_body_for_content_types = BaseApi._post_ignore_then_without_if_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ignore_then_without_if_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9613e4b85c2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ignore_then_without_if +Schema2: typing_extensions.TypeAlias = ignore_then_without_if.IgnoreThenWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6fd639a97bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes + +path = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..141cd5132e4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_integer_type_matches_integers_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_integer_type_matches_integers_response_body_for_content_types = BaseApi._post_integer_type_matches_integers_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_integer_type_matches_integers_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..f83cf220b7d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: int + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..75015a55e57 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import integer_type_matches_integers +Schema2: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f6d1f7bfbc8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes + +path = "/responseBody/postIpv4FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..04ad2539275 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv4_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv4FormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv4_format_response_body_for_content_types = BaseApi._post_ipv4_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv4_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..55901e0867d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv4_format +Schema2: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e5190f29dec --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes + +path = "/responseBody/postIpv6FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b86845f73e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_ipv6_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIpv6FormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_ipv6_format_response_body_for_content_types = BaseApi._post_ipv6_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_ipv6_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f664f74ba26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ipv6_format +Schema2: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..fa4b21eedbc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_iri_format_response_body_for_content_types import ResponseBodyPostIriFormatResponseBodyForContentTypes + +path = "/responseBody/postIriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..0fdc66e598c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_iri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_iri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_iri_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIriFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_iri_format_response_body_for_content_types = BaseApi._post_iri_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_iri_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2d5ce8c0714 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_format +Schema2: typing_extensions.TypeAlias = iri_format.IriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..49e03e18c32 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_iri_reference_format_response_body_for_content_types import ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes + +path = "/responseBody/postIriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d418e67698c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_iri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_iri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_iri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostIriReferenceFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_iri_reference_format_response_body_for_content_types = BaseApi._post_iri_reference_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_iri_reference_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e38e4efe7af --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import iri_reference_format +Schema2: typing_extensions.TypeAlias = iri_reference_format.IriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ab04f810cde --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_items_contains_response_body_for_content_types import ResponseBodyPostItemsContainsResponseBodyForContentTypes + +path = "/responseBody/postItemsContainsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a9eba781bb4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_contains_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_contains_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_contains_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsContainsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_contains_response_body_for_content_types = BaseApi._post_items_contains_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_contains_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..11613081516 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.items_contains.ItemsContainsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..75681108ad2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_contains +Schema2: typing_extensions.TypeAlias = items_contains.ItemsContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a0cd821d43b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types import ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes + +path = "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..cded9debf7e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types = BaseApi._post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..6cea3951174 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..56c52e9e116 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case +Schema2: typing_extensions.TypeAlias = items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCase diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..52134518ba1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes + +path = "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a9d4ceef799 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_items_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_items_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_items_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostItemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_items_with_null_instance_elements_response_body_for_content_types = BaseApi._post_items_with_null_instance_elements_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_items_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..c9b7ab9ea09 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..60737c9dad5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import items_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = items_with_null_instance_elements.ItemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9c29d339289 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes + +path = "/responseBody/postJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..318c8291a1f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_json_pointer_format_response_body_for_content_types = BaseApi._post_json_pointer_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..489bbe53817 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_pointer_format +Schema2: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1dc286e7b7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes + +path = "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..db7c1b08769 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxcontains_without_contains_is_ignored_response_body_for_content_types = BaseApi._post_maxcontains_without_contains_is_ignored_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxcontains_without_contains_is_ignored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ebd36d19ec3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxcontains_without_contains_is_ignored +Schema2: typing_extensions.TypeAlias = maxcontains_without_contains_is_ignored.MaxcontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..06c7038e33b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes + +path = "/responseBody/postMaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1543302c1f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_response_body_for_content_types = BaseApi._post_maximum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b73de2ae539 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation +Schema2: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ae78ec6c33e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes + +path = "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b7f2edc24bc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maximum_validation_with_unsigned_integer_response_body_for_content_types = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a5cb9f890fd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maximum_validation_with_unsigned_integer +Schema2: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cb76cb68088 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..9e45e4f3e97 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxitems_validation_response_body_for_content_types = BaseApi._post_maxitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..16c2894ebba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxitems_validation +Schema2: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e9d84a641bb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ad73e88cf29 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxlength_validation_response_body_for_content_types = BaseApi._post_maxlength_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxlength_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d94050ba037 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxlength_validation +Schema2: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4d41e385754 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes + +path = "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..75d32073fd2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties0_means_the_object_is_empty_response_body_for_content_types = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1c24d48d19b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties0_means_the_object_is_empty +Schema2: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..319dcbd3536 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..04f20e2f2e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_maxproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_maxproperties_validation_response_body_for_content_types = BaseApi._post_maxproperties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_maxproperties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e5bd830805a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import maxproperties_validation +Schema2: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1c6f586b01c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes + +path = "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..da3adea83e3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_mincontains_without_contains_is_ignored_response_body_for_content_types = BaseApi._post_mincontains_without_contains_is_ignored_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_mincontains_without_contains_is_ignored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..68d35232895 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mincontains_without_contains_is_ignored +Schema2: typing_extensions.TypeAlias = mincontains_without_contains_is_ignored.MincontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3eb225cc1ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes + +path = "/responseBody/postMinimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6c5ab27f180 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_response_body_for_content_types = BaseApi._post_minimum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..675ae689104 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation +Schema2: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..a73b8e4f6d1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes + +path = "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..036a5021cb3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minimum_validation_with_signed_integer_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minimum_validation_with_signed_integer_response_body_for_content_types = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..06b5dea583e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minimum_validation_with_signed_integer +Schema2: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..938aef53ed8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postMinitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a550e7c927e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minitems_validation_response_body_for_content_types = BaseApi._post_minitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..29f288f2b17 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minitems_validation +Schema2: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2ca5319be17 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes + +path = "/responseBody/postMinlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b8dbb68909f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minlength_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minlength_validation_response_body_for_content_types = BaseApi._post_minlength_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minlength_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..618e8ab4279 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minlength_validation +Schema2: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cd2918690b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..448da8f80d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_minproperties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_minproperties_validation_response_body_for_content_types = BaseApi._post_minproperties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_minproperties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f6e1a9b1c20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import minproperties_validation +Schema2: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..478acc4d74a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_multiple_dependents_required_response_body_for_content_types import ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes + +path = "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8f3cf3e2433 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_dependents_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_dependents_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_dependents_required_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleDependentsRequiredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_dependents_required_response_body_for_content_types = BaseApi._post_multiple_dependents_required_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_dependents_required_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3ba1ea03ac2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_dependents_required +Schema2: typing_extensions.TypeAlias = multiple_dependents_required.MultipleDependentsRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..774354cf0ec --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types import ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes + +path = "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..fa96af72421 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..66dd94e3c9e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated +Schema2: typing_extensions.TypeAlias = multiple_simultaneous_patternproperties_are_validated.MultipleSimultaneousPatternpropertiesAreValidated diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0367d6c69c8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types import ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes + +path = "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1fa17f17d85 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types = BaseApi._post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..ca4aa5887ce --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + int, + str, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2d953804838 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array +Schema2: typing_extensions.TypeAlias = multiple_types_can_be_specified_in_an_array.MultipleTypesCanBeSpecifiedInAnArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..95e15ba92fd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..691bedcc1dd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_allof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1aaa108330d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_allof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..aae340572e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..a5c58418d78 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_anyof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4d81833ca5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_anyof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..12758f725c7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes + +path = "/responseBody/postNestedItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5cd1c08891e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_items_response_body_for_content_types = BaseApi._post_nested_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..2d1144f546d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.nested_items.NestedItemsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8a0193a2831 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_items +Schema2: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0086d5c131c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes + +path = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..d11395d5809 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nested_oneof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..164ce7d2feb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nested_oneof_to_check_validation_semantics +Schema2: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0d1a20a9594 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types import ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes + +path = "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..771d1444a0e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types = BaseApi._post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..ded6c211b01 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fe71df0ddc0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties +Schema2: typing_extensions.TypeAlias = non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..be23568be28 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types import ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes + +path = "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..949ed38d831 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_non_interference_across_combined_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_non_interference_across_combined_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_non_interference_across_combined_schemas_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_non_interference_across_combined_schemas_response_body_for_content_types = BaseApi._post_non_interference_across_combined_schemas_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_non_interference_across_combined_schemas_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7f98584568e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import non_interference_across_combined_schemas +Schema2: typing_extensions.TypeAlias = non_interference_across_combined_schemas.NonInterferenceAcrossCombinedSchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2968687b1d4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes + +path = "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b3365eea277 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_more_complex_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_more_complex_schema_response_body_for_content_types = BaseApi._post_not_more_complex_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_more_complex_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7466659646d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_more_complex_schema +Schema2: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..fab62f6f0f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_not_multiple_types_response_body_for_content_types import ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes + +path = "/responseBody/postNotMultipleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..60e598632f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_multiple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_multiple_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_multiple_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotMultipleTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_multiple_types_response_body_for_content_types = BaseApi._post_not_multiple_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_multiple_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..808ed7158e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not_multiple_types +Schema2: typing_extensions.TypeAlias = not_multiple_types.NotMultipleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..12d3bba8822 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes + +path = "/responseBody/postNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5fe9d69ef6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_not_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNotResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_not_response_body_for_content_types = BaseApi._post_not_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_not_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9ad18bdd1d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import not +Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..53972940ea0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes + +path = "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4c827820e66 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_nul_characters_in_strings_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_nul_characters_in_strings_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..8a213c77893 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Literal["hello\x00there"] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2422cba070d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import nul_characters_in_strings +Schema2: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f340743b836 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes + +path = "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f6767d186c6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_null_type_matches_only_the_null_object_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_null_type_matches_only_the_null_object_response_body_for_content_types = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..50796c1ac43 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: None + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a70311d5d92 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import null_type_matches_only_the_null_object +Schema2: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..2c021329fd2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes + +path = "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..00f8609c3ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_number_type_matches_numbers_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_number_type_matches_numbers_response_body_for_content_types = BaseApi._post_number_type_matches_numbers_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_number_type_matches_numbers_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..bedf2ff6ca1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..404c9d56f43 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_type_matches_numbers +Schema2: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..56fb6d5dd41 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes + +path = "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..967edc154a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_properties_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_properties_validation_response_body_for_content_types = BaseApi._post_object_properties_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_properties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1593145b4bc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_properties_validation +Schema2: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9c440333b2d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes + +path = "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1dd9fa3fbb6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_object_type_matches_objects_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_object_type_matches_objects_response_body_for_content_types = BaseApi._post_object_type_matches_objects_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_object_type_matches_objects_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..a769310ea96 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..417224c18ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_type_matches_objects +Schema2: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f096eb72f82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes + +path = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8d95130244f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_complex_types_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_complex_types_response_body_for_content_types = BaseApi._post_oneof_complex_types_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_complex_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c473dde6bfb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_complex_types +Schema2: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..222fe0b64a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes + +path = "/responseBody/postOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..87d905e6cb2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_response_body_for_content_types = BaseApi._post_oneof_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..474d29f6009 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof +Schema2: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..6aee2766777 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes + +path = "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ca43c65d7b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_base_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_base_schema_response_body_for_content_types = BaseApi._post_oneof_with_base_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..afd6bbfefd5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d1898df2fe7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_base_schema +Schema2: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..29b1dba63cc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes + +path = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8fcc6cfcb87 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_empty_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_empty_schema_response_body_for_content_types = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..792b00c2b5e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_empty_schema +Schema2: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..fb966129116 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes + +path = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..21df132c256 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_oneof_with_required_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_oneof_with_required_response_body_for_content_types = BaseApi._post_oneof_with_required_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_oneof_with_required_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..a769310ea96 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..16715d35af0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import oneof_with_required +Schema2: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..06d097f0429 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes + +path = "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f9c647f4f5f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_is_not_anchored_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_is_not_anchored_response_body_for_content_types = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..293cfe38cb4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_is_not_anchored +Schema2: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3d2a9cd79fd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes + +path = "/responseBody/postPatternValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..09f446da89a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_pattern_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_pattern_validation_response_body_for_content_types = BaseApi._post_pattern_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_pattern_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..4920b211601 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pattern_validation +Schema2: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..8ae1347b4b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types import ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes + +path = "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b9ae2397916 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types = BaseApi._post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..87ad0cdfa8d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex +Schema2: typing_extensions.TypeAlias = patternproperties_validates_properties_matching_a_regex.PatternpropertiesValidatesPropertiesMatchingARegex diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..5a13f3a9335 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes + +path = "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..2e1c88c4012 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..b7142af3c40 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = patternproperties_with_null_valued_instance_properties.PatternpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..743caf8869c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types import ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes + +path = "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..6ce2b37375b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..97378ea1acc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..cd69d04ea26 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items +Schema2: typing_extensions.TypeAlias = prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..d9367885649 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes + +path = "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..712ff10d8b8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_prefixitems_with_null_instance_elements_response_body_for_content_types = BaseApi._post_prefixitems_with_null_instance_elements_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_prefixitems_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2185e963d00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import prefixitems_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = prefixitems_with_null_instance_elements.PrefixitemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..41aabde4e4e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types import ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes + +path = "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..51f93cf5d5f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types = BaseApi._post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..de649fa4319 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..83b71f80614 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction +Schema2: typing_extensions.TypeAlias = properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteraction diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cc1349075a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes + +path = "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..672f6d3cf90 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types = BaseApi._post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..baee22e025f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names +Schema2: typing_extensions.TypeAlias = properties_whose_names_are_javascript_object_property_names.PropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..524ce0e570f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f2e193a5990 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_escaped_characters_response_body_for_content_types = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5260b009fd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_escaped_characters +Schema2: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3ffa469a8c5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes + +path = "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ef72091615f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_properties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_properties_with_null_valued_instance_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_properties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e02ac63f49f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import properties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = properties_with_null_valued_instance_properties.PropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0ca1fea80ee --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes + +path = "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..49132310f60 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_property_named_ref_that_is_not_a_reference_response_body_for_content_types = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c5b136bf4a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import property_named_ref_that_is_not_a_reference +Schema2: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..5e23637021f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_propertynames_validation_response_body_for_content_types import ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes + +path = "/responseBody/postPropertynamesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ed471342a52 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_propertynames_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_propertynames_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_propertynames_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostPropertynamesValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_propertynames_validation_response_body_for_content_types = BaseApi._post_propertynames_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_propertynames_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..915e3feeac0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import propertynames_validation +Schema2: typing_extensions.TypeAlias = propertynames_validation.PropertynamesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..af3ca1c015a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_regex_format_response_body_for_content_types import ResponseBodyPostRegexFormatResponseBodyForContentTypes + +path = "/responseBody/postRegexFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..21dffe89c5c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_regex_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_regex_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_regex_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRegexFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_regex_format_response_body_for_content_types = BaseApi._post_regex_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_regex_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..28598ef5139 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regex_format +Schema2: typing_extensions.TypeAlias = regex_format.RegexFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..ac517b795dc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types import ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes + +path = "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3c419c09354 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a13163b0df7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive +Schema2: typing_extensions.TypeAlias = regexes_are_not_anchored_by_default_and_are_case_sensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..724da9a034d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types import ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes + +path = "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..603d249dd1b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_relative_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_relative_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_relative_json_pointer_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRelativeJsonPointerFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_relative_json_pointer_format_response_body_for_content_types = BaseApi._post_relative_json_pointer_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_relative_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..ba70730fb48 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import relative_json_pointer_format +Schema2: typing_extensions.TypeAlias = relative_json_pointer_format.RelativeJsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..8f8152a4d4e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes + +path = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..dd7fc1b83fb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_default_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_default_validation_response_body_for_content_types = BaseApi._post_required_default_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_default_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3ddabc1af63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_default_validation +Schema2: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4cbc6625cc4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes + +path = "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e900da1ce31 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8d36048378e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names +Schema2: typing_extensions.TypeAlias = required_properties_whose_names_are_javascript_object_property_names.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..e482831717f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes + +path = "/responseBody/postRequiredValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8e0461985a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_validation_response_body_for_content_types = BaseApi._post_required_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8f5ebbe79cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_validation +Schema2: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..19d6f36e233 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes + +path = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b817cb104eb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_empty_array_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_empty_array_response_body_for_content_types = BaseApi._post_required_with_empty_array_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_empty_array_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..af52814277e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_empty_array +Schema2: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..5e8263300ab --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes + +path = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..7e773621962 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_required_with_escaped_characters_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_required_with_escaped_characters_response_body_for_content_types = BaseApi._post_required_with_escaped_characters_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_required_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9489d00c981 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import required_with_escaped_characters +Schema2: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..7c2389e93c5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes + +path = "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..b54d0e0f8d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_simple_enum_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_simple_enum_validation_response_body_for_content_types = BaseApi._post_simple_enum_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_simple_enum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..bedf2ff6ca1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5e64dd92807 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import simple_enum_validation +Schema2: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..c1f67fa4d84 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_single_dependency_response_body_for_content_types import ResponseBodyPostSingleDependencyResponseBodyForContentTypes + +path = "/responseBody/postSingleDependencyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..85803b45f7f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_single_dependency_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSingleDependencyResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_single_dependency_response_body_for_content_types = BaseApi._post_single_dependency_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_single_dependency_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3982e382df8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import single_dependency +Schema2: typing_extensions.TypeAlias = single_dependency.SingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f793c61db45 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types import ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes + +path = "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f4e91b0ad73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_small_multiple_of_large_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_small_multiple_of_large_integer_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_small_multiple_of_large_integer_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_small_multiple_of_large_integer_response_body_for_content_types = BaseApi._post_small_multiple_of_large_integer_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_small_multiple_of_large_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..f83cf220b7d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: int + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..5493790072e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import small_multiple_of_large_integer +Schema2: typing_extensions.TypeAlias = small_multiple_of_large_integer.SmallMultipleOfLargeInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..eded6790dd1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes + +path = "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..1448af5a7c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_string_type_matches_strings_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_string_type_matches_strings_response_body_for_content_types = BaseApi._post_string_type_matches_strings_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_string_type_matches_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..afd6bbfefd5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..27b5b8bcead --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_type_matches_strings +Schema2: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..3e5bbe20eb9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_time_format_response_body_for_content_types import ResponseBodyPostTimeFormatResponseBodyForContentTypes + +path = "/responseBody/postTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..0f996c7333d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_time_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTimeFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_time_format_response_body_for_content_types = BaseApi._post_time_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_time_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..10d05231bea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import time_format +Schema2: typing_extensions.TypeAlias = time_format.TimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..07a1adabf53 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_type_array_object_or_null_response_body_for_content_types import ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes + +path = "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..3a53a57d04b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_array_object_or_null_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_array_object_or_null_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_array_object_or_null_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeArrayObjectOrNullResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_array_object_or_null_response_body_for_content_types = BaseApi._post_type_array_object_or_null_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_array_object_or_null_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..98cb654ccd9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + None, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..75bddff3f20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_object_or_null +Schema2: typing_extensions.TypeAlias = type_array_object_or_null.TypeArrayObjectOrNull diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..760a294f189 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_type_array_or_object_response_body_for_content_types import ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes + +path = "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..61fc4f4aa62 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_array_or_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_array_or_object_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_array_or_object_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeArrayOrObjectResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_array_or_object_response_body_for_content_types = BaseApi._post_type_array_or_object_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_array_or_object_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e0fe2593326 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..207c015b341 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_array_or_object +Schema2: typing_extensions.TypeAlias = type_array_or_object.TypeArrayOrObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..9188deec331 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types import ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes + +path = "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f5b05ddaeed --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_type_as_array_with_one_item_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_type_as_array_with_one_item_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_type_as_array_with_one_item_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostTypeAsArrayWithOneItemResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_type_as_array_with_one_item_response_body_for_content_types = BaseApi._post_type_as_array_with_one_item_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_type_as_array_with_one_item_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..afd6bbfefd5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..008ad4c0312 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import type_as_array_with_one_item +Schema2: typing_extensions.TypeAlias = type_as_array_with_one_item.TypeAsArrayWithOneItem diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0753616c549 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types import ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes + +path = "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..65bd75e36b5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_as_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_as_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_as_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsAsSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_as_schema_response_body_for_content_types = BaseApi._post_unevaluateditems_as_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_as_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d5f5a3df221 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_as_schema +Schema2: typing_extensions.TypeAlias = unevaluateditems_as_schema.UnevaluateditemsAsSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..c8dc397f25b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types import ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes + +path = "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..7494783637c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a0d5b127247 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains +Schema2: typing_extensions.TypeAlias = unevaluateditems_depends_on_multiple_nested_contains.UnevaluateditemsDependsOnMultipleNestedContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..1e607d8d3a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes + +path = "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..df993ea0de8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_with_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_with_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_with_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsWithItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_with_items_response_body_for_content_types = BaseApi._post_unevaluateditems_with_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_with_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..fd395b03b8f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.unevaluateditems_with_items.UnevaluateditemsWithItemsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9a0410581eb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_items +Schema2: typing_extensions.TypeAlias = unevaluateditems_with_items.UnevaluateditemsWithItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..f24aa9420e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes + +path = "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..e784ef4c1cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluateditems_with_null_instance_elements_response_body_for_content_types = BaseApi._post_unevaluateditems_with_null_instance_elements_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluateditems_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fa885543144 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluateditems_with_null_instance_elements +Schema2: typing_extensions.TypeAlias = unevaluateditems_with_null_instance_elements.UnevaluateditemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0147d7453ee --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes + +path = "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..4a75715b224 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d2d6d5dc23c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_not_affected_by_propertynames.UnevaluatedpropertiesNotAffectedByPropertynames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..443ee48da06 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes + +path = "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..362dcaeac0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_schema_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_schema_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_schema_response_body_for_content_types = BaseApi._post_unevaluatedproperties_schema_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..a769310ea96 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..fca2e2461c0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_schema +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_schema.UnevaluatedpropertiesSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4feff9c9260 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes + +path = "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ad9137009dc --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..af2a926d0e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1a3d1132937 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..c95ae9e40b2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes + +path = "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..34e6bcb4d17 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..6e452389e71 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties +Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_null_valued_instance_properties.UnevaluatedpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..37e8f062863 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..211fa9e22c6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_validation_response_body_for_content_types = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..a87136f730d --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_validation +Schema2: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..cb2c9d36fea --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..fee09eec632 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types = BaseApi._post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8b39a15068e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items +Schema2: typing_extensions.TypeAlias = uniqueitems_false_with_an_array_of_items.UniqueitemsFalseWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..95cf2c1f018 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..bb3c95b8fe5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_validation_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_validation_response_body_for_content_types = BaseApi._post_uniqueitems_validation_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..22d0b748ea7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_validation +Schema2: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..0f0578e0be9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes + +path = "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..c804454a0da --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uniqueitems_with_an_array_of_items_response_body_for_content_types = BaseApi._post_uniqueitems_with_an_array_of_items_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uniqueitems_with_an_array_of_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..82a52c16a75 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uniqueitems_with_an_array_of_items +Schema2: typing_extensions.TypeAlias = uniqueitems_with_an_array_of_items.UniqueitemsWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..91e06866bd6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes + +path = "/responseBody/postUriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..ec1b58f8f00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_format_response_body_for_content_types = BaseApi._post_uri_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..654ba34398b --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_format +Schema2: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4b73213c603 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes + +path = "/responseBody/postUriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..5b991fb70bb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_reference_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_reference_format_response_body_for_content_types = BaseApi._post_uri_reference_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_reference_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..2b77aef5da1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_reference_format +Schema2: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..4d9fad8a307 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes + +path = "/responseBody/postUriTemplateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..8176c47db49 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uri_template_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uri_template_format_response_body_for_content_types = BaseApi._post_uri_template_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uri_template_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c4967db183c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uri_template_format +Schema2: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..c54d8f14a05 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_uuid_format_response_body_for_content_types import ResponseBodyPostUuidFormatResponseBodyForContentTypes + +path = "/responseBody/postUuidFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..7c66139a44f --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_uuid_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_uuid_format_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_uuid_format_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostUuidFormatResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_uuid_format_response_body_for_content_types = BaseApi._post_uuid_format_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_uuid_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..76fa1e8f1e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import uuid_format +Schema2: typing_extensions.TypeAlias = uuid_format.UuidFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py new file mode 100644 index 00000000000..8764e5383f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types import ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes + +path = "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py new file mode 100644 index 00000000000..f4761bd0b40 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_validate_against_correct_branch_then_vs_else_response_body_for_content_types = BaseApi._post_validate_against_correct_branch_then_vs_else_response_body_for_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_validate_against_correct_branch_then_vs_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..675c3d42400 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema2 + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..026e5c74a70 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import validate_against_correct_branch_then_vs_else +Schema2: typing_extensions.TypeAlias = validate_against_correct_branch_then_vs_else.ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed b/samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py new file mode 100644 index 00000000000..ea2057c7c05 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi # type: ignore[import] +import urllib3 +from urllib3 import fields +from urllib3 import exceptions as urllib3_exceptions +from urllib3._collections import HTTPHeaderDict + +from unit_test_api import exceptions + + +logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise exceptions.ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + headers = headers or HTTPHeaderDict() + + used_timeout: typing.Optional[urllib3.Timeout] = None + if timeout: + if isinstance(timeout, (int, float)): + used_timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: + if 'Content-Type' not in headers and body is None: + r = self.pool_manager.request( + method, + url, + preload_content=not stream, + timeout=used_timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + body=body, + encode_multipart=False, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise exceptions.ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + except urllib3_exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise exceptions.ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def get(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def head(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def options(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def delete(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def post(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def put(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def patch(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py new file mode 100644 index 00000000000..93aebd2e4f9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +import typing_extensions + +from .schema import ( + get_class, + none_type_, + classproperty, + Bool, + FileIO, + Schema, + SingletonMeta, + AnyTypeSchema, + UnsetAnyTypeSchema, + INPUT_TYPES_ALL +) + +from .schemas import ( + ListSchema, + NoneSchema, + NumberSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + StrSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BytesSchema, + FileSchema, + BinarySchema, + BoolSchema, + NotAnyTypeSchema, + OUTPUT_BASE_TYPES, + DictSchema +) +from .validation import ( + PatternInfo, + ValidationMetadata, + immutabledict +) +from .format import ( + as_date, + as_datetime, + as_decimal, + as_uuid +) + +def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore + res = {} + for key, val in t_dict.__annotations__.items(): + if isinstance(val, typing._GenericAlias): # type: ignore + # typing.Type[W] -> W + val_cls = typing.get_args(val)[0] + res[key] = val_cls + return res + +X = typing.TypeVar('X', bound=typing.Tuple) + +def tuple_to_instance(tup: typing.Type[X]) -> X: + res = [] + for arg in typing.get_args(tup): + if isinstance(arg, typing._GenericAlias): # type: ignore + # typing.Type[Schema] -> Schema + arg_cls = typing.get_args(arg)[0] + res.append(arg_cls) + return tuple(res) # type: ignore + + +class Unset: + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset: Unset = Unset() + +def key_unknown_error_msg(key: str) -> str: + return (f"Invalid key. The key {key} is not a known key in this payload. " + "If this key is an additional property, use get_additional_property_" + ) + +def raise_if_key_known( + key: str, + required_keys: typing.FrozenSet[str], + optional_keys: typing.FrozenSet[str] +): + if key in required_keys or key in optional_keys: + raise ValueError(f"The key {key} is a known property, use get_property to access its value") + +__all__ = [ + 'get_class', + 'none_type_', + 'classproperty', + 'Bool', + 'FileIO', + 'Schema', + 'SingletonMeta', + 'AnyTypeSchema', + 'UnsetAnyTypeSchema', + 'INPUT_TYPES_ALL', + 'ListSchema', + 'NoneSchema', + 'NumberSchema', + 'IntSchema', + 'Int32Schema', + 'Int64Schema', + 'Float32Schema', + 'Float64Schema', + 'StrSchema', + 'UUIDSchema', + 'DateSchema', + 'DateTimeSchema', + 'DecimalSchema', + 'BytesSchema', + 'FileSchema', + 'BinarySchema', + 'BoolSchema', + 'NotAnyTypeSchema', + 'OUTPUT_BASE_TYPES', + 'DictSchema', + 'PatternInfo', + 'ValidationMetadata', + 'immutabledict', + 'as_date', + 'as_datetime', + 'as_decimal', + 'as_uuid', + 'typed_dict_to_instance', + 'tuple_to_instance', + 'Unset', + 'unset', + 'key_unknown_error_msg', + 'raise_if_key_known' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py new file mode 100644 index 00000000000..bb614903b82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py @@ -0,0 +1,115 @@ +import datetime +import decimal +import functools +import typing +import uuid + +from dateutil import parser, tz + + +class CustomIsoparser(parser.isoparser): + def __init__(self, sep: typing.Optional[str] = None): + """ + :param sep: + A single character that separates date and time portions. If + ``None``, the parser will accept any single character. + For strict ISO-8601 adherence, pass ``'T'``. + """ + if sep is not None: + if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): + raise ValueError('Separator must be a single, non-numeric ' + + 'ASCII character') + + used_sep = sep.encode('ascii') + else: + used_sep = None + + self._sep = used_sep + + @staticmethod + def __get_ascii_bytes(str_in: str) -> bytes: + # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII + # ASCII is the same in UTF-8 + try: + return str_in.encode('ascii') + except UnicodeEncodeError as e: + msg = 'ISO-8601 strings should contain only ASCII characters' + raise ValueError(msg) from e + + def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isodate(dt_str_ascii) # type: ignore + values = typing.cast(typing.Tuple[typing.List[int], int], values) + components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) + pos = values[1] + return components, pos + + def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isotime(dt_str_ascii) # type: ignore + components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore + return components + + def parse_isodatetime(self, dt_str: str) -> datetime.datetime: + date_components, pos = self.__parse_isodate(dt_str) + if len(dt_str) <= pos: + # len(components) <= 3 + raise ValueError('Value is not a datetime') + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) + if hour == 24: + hour = 0 + components = (*date_components, hour, minute, second, microsecond, tzinfo) + return datetime.datetime(*components) + datetime.timedelta(days=1) + else: + components = (*date_components, hour, minute, second, microsecond, tzinfo) + else: + raise ValueError('String contains unknown ISO components') + + return datetime.datetime(*components) + + def parse_isodate_str(self, datestr: str) -> datetime.date: + components, pos = self.__parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return datetime.date(*components) + +DEFAULT_ISOPARSER = CustomIsoparser() + +@functools.lru_cache() +def as_date(arg: str) -> datetime.date: + """ + type = "string" + format = "date" + """ + return DEFAULT_ISOPARSER.parse_isodate_str(arg) + +@functools.lru_cache() +def as_datetime(arg: str) -> datetime.datetime: + """ + type = "string" + format = "date-time" + """ + return DEFAULT_ISOPARSER.parse_isodatetime(arg) + +@functools.lru_cache() +def as_decimal(arg: str) -> decimal.Decimal: + """ + Applicable when storing decimals that are sent over the wire as strings + type = "string" + format = "number" + """ + return decimal.Decimal(arg) + +@functools.lru_cache() +def as_uuid(arg: str) -> uuid.UUID: + """ + type = "string" + format = "uuid" + """ + return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py new file mode 100644 index 00000000000..3897e140a4a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py @@ -0,0 +1,97 @@ +""" +MIT License + +Copyright (c) 2020 Corentin Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +from __future__ import annotations +import typing +import typing_extensions + +_K = typing.TypeVar("_K") +_V = typing.TypeVar("_V", covariant=True) + + +class immutabledict(typing.Mapping[_K, _V]): + """ + An immutable wrapper around dictionaries that implements + the complete :py:class:`collections.Mapping` interface. + It can be used as a drop-in replacement for dictionaries + where immutability is desired. + + Note: custom version of this class made to remove __init__ + """ + + dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict + _dict: typing.Dict[_K, _V] + _hash: typing.Optional[int] + + @classmethod + def fromkeys( + cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None + ) -> "immutabledict[_K, _V]": + return cls(dict.fromkeys(seq, value)) + + def __new__(cls, *args: typing.Any) -> typing_extensions.Self: + inst = super().__new__(cls) + setattr(inst, '_dict', cls.dict_cls(*args)) + setattr(inst, '_hash', None) + return inst + + def __getitem__(self, key: _K) -> _V: + return self._dict[key] + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def __iter__(self) -> typing.Iterator[_K]: + return iter(self._dict) + + def __len__(self) -> int: + return len(self._dict) + + def __repr__(self) -> str: + return "%s(%r)" % (self.__class__.__name__, self._dict) + + def __hash__(self) -> int: + if self._hash is None: + h = 0 + for key, value in self.items(): + h ^= hash((key, value)) + self._hash = h + + return self._hash + + def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(self) + new.update(other) + return self.__class__(new) + + def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(other) + new.update(self) + return new + + def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: + raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py new file mode 100644 index 00000000000..18cacd94c6c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py @@ -0,0 +1,729 @@ +from __future__ import annotations +import datetime +import dataclasses +import io +import types +import typing +import uuid + +import functools +import typing_extensions + +from unit_test_api import exceptions +from unit_test_api.configurations import schema_configuration + +from . import validation + +_T_co = typing.TypeVar("_T_co", covariant=True) + + +class SequenceNotStr(typing.Protocol[_T_co]): + """ + if a Protocol would define the interface of Sequence, this protocol + would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence + methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection + """ + def __contains__(self, value: object, /) -> bool: + raise NotImplementedError + + def __getitem__(self, index, /): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __iter__(self) -> typing.Iterator[_T_co]: + raise NotImplementedError + + def __reversed__(self, /) -> typing.Iterator[_T_co]: + raise NotImplementedError + +none_type_ = type(None) +T = typing.TypeVar('T', bound=typing.Mapping) +U = typing.TypeVar('U', bound=SequenceNotStr) +W = typing.TypeVar('W') + + +class SchemaTyped: + additional_properties: typing.Type[Schema] + all_of: typing.Tuple[typing.Type[Schema], ...] + any_of: typing.Tuple[typing.Type[Schema], ...] + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] + default: typing.Union[str, int, float, bool, None] + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] + exclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + format: str + inclusive_maximum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + items: typing.Type[Schema] + max_items: int + max_length: int + max_properties: int + min_items: int + min_length: int + min_properties: int + multiple_of: typing.Union[int, float] + not_: typing.Type[Schema] + one_of: typing.Tuple[typing.Type[Schema], ...] + pattern: validation.PatternInfo + properties: typing.Mapping[str, typing.Type[Schema]] + required: typing.FrozenSet[str] + types: typing.FrozenSet[typing.Type] + unique_items: bool + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') + arg.close() + inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore + super(FileIO, inst).__init__(arg.name) + return inst + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') + + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + """ + Needed for instantiation when passing in arguments of the above type + """ + pass + + +class classproperty(typing.Generic[W]): + def __init__(self, method: typing.Callable[..., W]): + self.__method = method + functools.update_wrapper(self, method) # type: ignore + + def __get__(self, obj, cls=None) -> W: + if cls is None: + cls = type(obj) + return self.__method(cls) + + +class Bool: + _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} + """ + This class is needed to replace bool during validation processing + json schema requires that 0 != False and 1 != True + python implementation defines 0 == False and 1 == True + To meet the json schema requirements, all bool instances are replaced with Bool singletons + during validation only, and then bool values are returned from validation + """ + + def __new__(cls, arg_: bool, **kwargs): + """ + Method that implements singleton + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, arg_) + if key not in cls._instances: + inst = super().__new__(cls) + cls._instances[key] = inst + return cls._instances[key] + + def __repr__(self): + if bool(self): + return f'' + return f'' + + @classproperty + def TRUE(cls): + return cls(True) # type: ignore + + @classproperty + def FALSE(cls): + return cls(False) # type: ignore + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +def cast_to_allowed_types( + arg: typing.Union[ + dict, + validation.immutabledict, + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + ], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] +) -> typing.Union[ + validation.immutabledict, + tuple, + float, + int, + str, + bytes, + Bool, + None, + FileIO +]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + path_to_type[path_to_item] = str + return str(arg) + elif isinstance(arg, (dict, validation.immutabledict)): + path_to_type[path_to_item] = validation.immutabledict + return validation.immutabledict( + { + key: cast_to_allowed_types( + val, + from_server, + validated_path_to_schemas, + path_to_item + (key,), + path_to_type, + ) + for key, val in arg.items() + } + ) + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + path_to_type[path_to_item] = Bool + if arg: + return Bool.TRUE + return Bool.FALSE + elif isinstance(arg, int): + path_to_type[path_to_item] = int + return arg + elif isinstance(arg, float): + path_to_type[path_to_item] = float + return arg + elif isinstance(arg, (tuple, list)): + path_to_type[path_to_item] = tuple + return tuple( + [ + cast_to_allowed_types( + item, + from_server, + validated_path_to_schemas, + path_to_item + (i,), + path_to_type, + ) + for i, item in enumerate(arg) + ] + ) + elif arg is None: + path_to_type[path_to_item] = type(None) + return None + elif isinstance(arg, (datetime.date, datetime.datetime)): + path_to_type[path_to_item] = str + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + path_to_type[path_to_item] = str + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, bytes): + path_to_type[path_to_item] = bytes + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + path_to_type[path_to_item] = FileIO + return FileIO(arg) + raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class SingletonMeta(type): + """ + A singleton class for schemas + Schemas are frozen classes that are never instantiated with init args + All args come from defaults + """ + _instances: typing.Dict[type, typing.Any] = {} + + def __call__(cls, *args, **kwargs): + if cls not in cls._instances: + cls._instances[cls] = super().__call__(*args, **kwargs) + return cls._instances[cls] + + +class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): + + @classmethod + def __get_path_to_schemas( + cls, + arg, + validation_metadata: validation.ValidationMetadata, + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: + """ + Run all validations in the json schema and return a dict of + json schema to tuple of validated schemas + """ + _path_to_schemas: validation.PathToSchemasType = {} + if validation_metadata.validation_ran_earlier(cls): + validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) + validation.update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} + for path, schema_classes in _path_to_schemas.items(): + schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) + path_to_schemas[path] = schema + """ + For locations that validation did not check + the code still needs to store type + schema information for instantiation + All of those schemas will be UnsetAnyTypeSchema + """ + missing_paths = path_to_type.keys() - path_to_schemas.keys() + for missing_path in missing_paths: + path_to_schemas[missing_path] = UnsetAnyTypeSchema + + return path_to_schemas + + @staticmethod + def __get_items( + arg: tuple, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + ''' + Schema __get_items + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return tuple(cast_items) + + @staticmethod + def __get_properties( + arg: validation.immutabledict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + """ + Schema __get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return validation.immutabledict(dict_items) + + @classmethod + def _get_new_instance_without_conversion( + cls, + arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + # We have a Dynamic class and we are making an instance of it + if isinstance(arg, validation.immutabledict): + used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) + elif isinstance(arg, tuple): + used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) + elif isinstance(arg, Bool): + return bool(arg) + else: + """ + str, int, float, FileIO, bytes + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return arg + arg_type = type(arg) + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is None: + return used_arg + if arg_type not in type_to_output_cls: + return used_arg + output_cls = type_to_output_cls[arg_type] + if arg_type is tuple: + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(U, inst) + return inst + assert issubclass(output_cls, validation.immutabledict) + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(T, inst) + return inst + + @typing.overload + @classmethod + def validate_base( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate_base( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + """ + Schema validate_base + + Args: + arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + like minItems, minLength etc + """ + if isinstance(arg, (tuple, validation.immutabledict)): + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is not None: + for output_cls in type_to_output_cls.values(): + if isinstance(arg, output_cls): + # U + T use case, don't run validations twice + return arg + + from_server = False + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] + ] = {} + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} + cast_arg = cast_to_allowed_types( + arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) + validation_metadata = validation.ValidationMetadata( + path_to_item=('args[0]',), + configuration=configuration or schema_configuration.SchemaConfiguration(), + validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) + ) + path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) + return cls._get_new_instance_without_conversion( + cast_arg, + validation_metadata.path_to_item, + path_to_schemas, + ) + + @classmethod + def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: + type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) + type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) + return type_to_output_cls + + +def get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[Schema]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + return item_cls._evaluate(None, local_namespace) + raise ValueError('invalid class value passed in') + + +@dataclasses.dataclass(frozen=True) +class AnyTypeSchema(Schema[T, U]): + # Python representation of a schema defined as true or {} + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return cls.validate_base( + arg, + configuration=configuration + ) + +class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + +INPUT_TYPES_ALL = typing.Union[ + dict, + validation.immutabledict, + typing.Mapping[str, object], # for TypedDict + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + FileIO +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py new file mode 100644 index 00000000000..e79646f0acd --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import datetime +import dataclasses +import io +import typing +import uuid + +import typing_extensions + +from unit_test_api.configurations import schema_configuration + +from . import schema, validation + + +@dataclasses.dataclass(frozen=True) +class ListSchema(schema.Schema[validation.immutabledict, tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schema.INPUT_TYPES_ALL], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Tuple[schema.INPUT_TYPES_ALL, ...], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NoneSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) + + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NumberSchema(schema.Schema): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + types: typing.FrozenSet[typing.Type] = frozenset({float, int}) + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class IntSchema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int' + + +@dataclasses.dataclass(frozen=True) +class Int32Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int32' + + +@dataclasses.dataclass(frozen=True) +class Int64Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int64' + + +@dataclasses.dataclass(frozen=True) +class Float32Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'float' + + +@dataclasses.dataclass(frozen=True) +class Float64Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'double' + + +@dataclasses.dataclass(frozen=True) +class StrSchema(schema.Schema): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + types: typing.FrozenSet[typing.Type] = frozenset({str}) + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class UUIDSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'uuid' + + @classmethod + def validate( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateTimeSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date-time' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DecimalSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'number' + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class BytesSchema(schema.Schema): + """ + this class will subclass bytes and is immutable + """ + types: typing.FrozenSet[typing.Type] = frozenset({bytes}) + + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class FileSchema(schema.Schema): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.FileIO: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BinarySchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) + format: str = 'binary' + + one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( + BytesSchema, + FileSchema, + ) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[schema.FileIO, bytes]: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BoolSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NotAnyTypeSchema(schema.AnyTypeSchema): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + not_: typing.Type[schema.Schema] = schema.AnyTypeSchema + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return super().validate_base(arg, configuration=configuration) + +OUTPUT_BASE_TYPES = typing.Union[ + validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], + str, + int, + float, + bool, + schema.none_type_, + typing.Tuple['OUTPUT_BASE_TYPES', ...], + bytes, + schema.FileIO +] + + +@dataclasses.dataclass(frozen=True) +class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) + + @typing.overload + @classmethod + def validate( + cls, + arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: + return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py new file mode 100644 index 00000000000..7f2d1d58545 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py @@ -0,0 +1,1446 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import collections +import dataclasses +import decimal +import re +import sys +import types +import typing +import uuid + +import typing_extensions + +from unit_test_api import exceptions +from unit_test_api.configurations import schema_configuration + +from . import format, original_immutabledict + +immutabledict = original_immutabledict.immutabledict + + +@dataclasses.dataclass +class ValidationMetadata: + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + path_to_item: typing.Tuple[typing.Union[str, int], ...] + configuration: schema_configuration.SchemaConfiguration + validated_path_to_schemas: typing.Mapping[ + typing.Tuple[typing.Union[str, int], ...], + typing.Mapping[type, None] + ] = dataclasses.field(default_factory=dict) + seen_classes: typing.FrozenSet[type] = frozenset() + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) + if validated_schemas and cls in validated_schemas: + return True + if cls in self.seen_classes: + return True + return False + +def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise exceptions.ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class SchemaValidator: + __excluded_cls_properties = { + '__module__', + '__dict__', + '__weakref__', + '__doc__', + '__annotations__', + 'default', # excluded because it has no impact on validation + 'type_to_output_cls', # used to pluck the output class for instantiation + } + + @classmethod + def _validate( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> PathToSchemasType: + """ + SchemaValidator validate + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + """ + cls_schema = cls() + json_schema_data = { + k: v + for k, v in vars(cls_schema).items() + if k not in cls.__excluded_cls_properties + and k + not in validation_metadata.configuration.disabled_json_schema_python_keywords + } + contains_path_to_schemas = [] + path_to_schemas: PathToSchemasType = {} + if 'contains' in vars(cls_schema): + contains_path_to_schemas = _get_contains_path_to_schemas( + arg, + vars(cls_schema)['contains'], + validation_metadata, + path_to_schemas + ) + if_path_to_schemas = None + if 'if_' in vars(cls_schema): + if_path_to_schemas = _get_if_path_to_schemas( + arg, + vars(cls_schema)['if_'], + validation_metadata, + ) + validated_pattern_properties: typing.Optional[PathToSchemasType] = None + if 'pattern_properties' in vars(cls_schema): + validated_pattern_properties = _get_validated_pattern_properties( + arg, + vars(cls_schema)['pattern_properties'], + cls, + validation_metadata + ) + prefix_items_length = 0 + if 'prefix_items' in vars(cls_schema): + prefix_items_length = len(vars(cls_schema)['prefix_items']) + for keyword, val in json_schema_data.items(): + used_val: typing.Any + if keyword in {'contains', 'min_contains', 'max_contains'}: + used_val = (val, contains_path_to_schemas) + elif keyword == 'items': + used_val = (val, prefix_items_length) + elif keyword in {'unevaluated_items', 'unevaluated_properties'}: + used_val = (val, path_to_schemas) + elif keyword in {'types'}: + format: typing.Optional[str] = vars(cls_schema).get('format', None) + used_val = (val, format) + elif keyword in {'pattern_properties', 'additional_properties'}: + used_val = (val, validated_pattern_properties) + elif keyword in {'if_', 'then', 'else_'}: + used_val = (val, if_path_to_schemas) + else: + used_val = val + validator = json_schema_keyword_to_validator[keyword] + + other_path_to_schemas = validator( + arg, + used_val, + cls, + validation_metadata, + ) + if other_path_to_schemas: + update(path_to_schemas, other_path_to_schemas) + + base_class = type(arg) + if validation_metadata.path_to_item not in path_to_schemas: + path_to_schemas[validation_metadata.path_to_item] = dict() + path_to_schemas[validation_metadata.path_to_item][base_class] = None + path_to_schemas[validation_metadata.path_to_item][cls] = None + return path_to_schemas + +PathToSchemasType = typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Dict[ + typing.Union[ + typing.Type[SchemaValidator], + typing.Type[str], + typing.Type[int], + typing.Type[float], + typing.Type[bool], + typing.Type[None], + typing.Type[immutabledict], + typing.Type[tuple] + ], + None + ] +] + +def _get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[SchemaValidator]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + if sys.version_info < (3, 9): + return item_cls._evaluate(None, local_namespace) + return item_cls._evaluate(None, local_namespace, set()) + raise ValueError('invalid class value passed in') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is collections.defaultdict(dict) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k].update(v) + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def __type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = __get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + +def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = __type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return exceptions.ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternInfo: + pattern: str + flags: typing.Optional[re.RegexFlag] = None + + +def validate_types( + arg: typing.Any, + allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + allowed_types = allowed_types_format[0] + if type(arg) not in allowed_types: + raise __get_type_error( + arg, + validation_metadata.path_to_item, + allowed_types, + key_type=False, + ) + if isinstance(arg, bool) or not isinstance(arg, (int, float)): + return None + format = allowed_types_format[1] + if format and format == 'int' and arg != int(arg): + # there is a json schema test where 1.0 validates as an integer + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + return None + + +def validate_enum( + arg: typing.Any, + enum_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in enum_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) + return None + + +def validate_unique_items( + arg: typing.Any, + unique_items_value: bool, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not unique_items_value or not isinstance(arg, tuple): + return None + if len(arg) == len(set(arg)): + return None + _raise_validation_error_message( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + +def validate_min_items( + arg: typing.Any, + min_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) < min_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=min_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_items( + arg: typing.Any, + max_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) > max_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=max_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_properties( + arg: typing.Any, + min_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) < min_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=min_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_properties( + arg: typing.Any, + max_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) > max_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=max_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_length( + arg: typing.Any, + min_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) < min_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=min_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_length( + arg: typing.Any, + max_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) > max_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=max_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_minimum( + arg: typing.Any, + inclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg < inclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_minimum( + arg: typing.Any, + exclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg <= exclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=exclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_maximum( + arg: typing.Any, + inclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg > inclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_maximum( + arg: typing.Any, + exclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg >= exclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than", + constraint_value=exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + +def validate_multiple_of( + arg: typing.Any, + multiple_of: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if (not (float(arg) / multiple_of).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + _raise_validation_error_message( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_pattern( + arg: typing.Any, + pattern_info: PatternInfo, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item + ) + return None + + +__int32_inclusive_minimum = -2147483648 +__int32_inclusive_maximum = 2147483647 +__int64_inclusive_minimum = -9223372036854775808 +__int64_inclusive_maximum = 9223372036854775807 +__float_inclusive_minimum = -3.4028234663852886e+38 +__float_inclusive_maximum = 3.4028234663852886e+38 +__double_inclusive_minimum = -1.7976931348623157E+308 +__double_inclusive_maximum = 1.7976931348623157E+308 + +def __validate_numeric_format( + arg: typing.Union[int, float], + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value[:3] == 'int': + # there is a json schema test where 1.0 validates as an integer + if arg != int(arg): + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + if format_value == 'int32': + if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + elif format_value == 'int64': + if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + elif format_value in {'float', 'double'}: + if format_value == 'float': + if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + return None + # double + if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + + +def __validate_string_format( + arg: str, + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value == 'uuid': + try: + uuid.UUID(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'number': + try: + decimal.Decimal(arg) + return None + except decimal.InvalidOperation: + raise exceptions.ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date': + try: + format.DEFAULT_ISOPARSER.parse_isodate_str(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date-time': + try: + format.DEFAULT_ISOPARSER.parse_isodatetime(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + return None + + +def validate_format( + arg: typing.Union[str, int, float], + format_value: str, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + # formats work for strings + numbers + if isinstance(arg, (int, float)): + return __validate_numeric_format( + arg, + format_value, + validation_metadata + ) + elif isinstance(arg, str): + return __validate_string_format( + arg, + format_value, + validation_metadata + ) + return None + + +def validate_required( + arg: typing.Any, + required: typing.Set[str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + missing_req_args = required - arg.keys() + if missing_req_args: + missing_required_arguments = list(missing_req_args) + missing_required_arguments.sort() + raise exceptions.ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + return None + + +def validate_items( + arg: typing.Any, + item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + item_cls = _get_class(item_cls_prefix_items_length[0]) + prefix_items_length = item_cls_prefix_items_length[1] + path_to_schemas: PathToSchemasType = {} + for i in range(prefix_items_length, len(arg)): + value = arg[i] + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_properties( + arg: typing.Any, + properties: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + present_properties = {k: v for k, v, in arg.items() if k in properties} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, value in present_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + schema = properties[property_name] + schema = _get_class(schema, module_namespace) + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_additional_properties( + arg: typing.Any, + additional_properties_cls_val_pprops: typing.Tuple[ + typing.Type[SchemaValidator], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + schema = _get_class(additional_properties_cls_val_pprops[0]) + path_to_schemas: PathToSchemasType = {} + cls_schema = cls() + properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} + present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} + validated_pattern_properties = additional_properties_cls_val_pprops[1] + for property_name, value in present_additional_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if validated_pattern_properties and path_to_item in validated_pattern_properties: + continue + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_one_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + oneof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(schema) + continue + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + oneof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + oneof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate oneof_classes + continue + oneof_classes.append(schema) + if not oneof_classes: + raise exceptions.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: + raise exceptions.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 + + +def validate_any_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + anyof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + module_namespace = vars(sys.modules[cls.__module__]) + for schema in classes: + schema = _get_class(schema, module_namespace) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + anyof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + anyof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate anyof_classes + continue + anyof_classes.append(schema) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise exceptions.ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + +def validate_all_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + continue + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_not( + arg: typing.Any, + not_cls: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + not_schema = _get_class(not_cls) + other_path_to_schemas = None + not_exception = exceptions.ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_schema.__name__, + ) + ) + if validation_metadata.validation_ran_earlier(not_schema): + raise not_exception + + try: + other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + return None + + +def __ensure_discriminator_value_present( + disc_property_name: str, + validation_metadata: ValidationMetadata, + arg +): + if disc_property_name not in arg: + # The input data does not contain the discriminator property + raise exceptions.ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + +def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + cls_schema = cls() + if not hasattr(cls_schema, 'discriminator'): + return None + disc = cls_schema.discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not ( + hasattr(cls_schema, 'all_of') or + hasattr(cls_schema, 'one_of') or + hasattr(cls_schema, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls_schema, 'all_of'): + for allof_cls in cls_schema.all_of: + discriminated_cls = __get_discriminated_class( + allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'one_of'): + for oneof_cls in cls_schema.one_of: + discriminated_cls = __get_discriminated_class( + oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'any_of'): + for anyof_cls in cls_schema.any_of: + discriminated_cls = __get_discriminated_class( + anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +def validate_discriminator( + arg: typing.Any, + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + disc_prop_name = list(discriminator.keys())[0] + __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) + discriminated_cls = __get_discriminated_class( + cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ) + if discriminated_cls is None: + raise exceptions.ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls is cls: + """ + Optimistically assume that cls will pass validation + If the code invoked _validate on cls it would infinitely recurse + """ + return None + if validation_metadata.validation_ran_earlier(discriminated_cls): + path_to_schemas: PathToSchemasType = {} + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + return path_to_schemas + updated_vm = ValidationMetadata( + path_to_item=validation_metadata.path_to_item, + configuration=validation_metadata.configuration, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + return discriminated_cls._validate(arg, validation_metadata=updated_vm) + + +def _get_if_path_to_schemas( + arg: typing.Any, + if_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + if_cls = _get_class(if_cls) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = if_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, other_path_to_schemas) + except exceptions.OpenApiException: + pass + return these_path_to_schemas + + +def validate_if( + arg: typing.Any, + if_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = if_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + + if true, then true -> true for whole schema + so validate_then will add if_path_to_schemas data to path_to_schemas + """ + return None + + +def validate_then( + arg: typing.Any, + then_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = then_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + """ + if not if_path_to_schemas: + return None + then_cls = _get_class(then_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = then_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # then False case + raise ex + + +def validate_else( + arg: typing.Any, + else_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = else_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + if if_path_to_schemas: + # skip validation if if_path_to_schemas was true + return None + """ + if is false use case + if_path_to_schemas == {} + """ + else_cls = _get_class(else_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = else_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # else False case + raise ex + + +def _get_contains_path_to_schemas( + arg: typing.Any, + contains_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, + path_to_schemas: PathToSchemasType +) -> typing.List[PathToSchemasType]: + if not isinstance(arg, tuple): + return [] + contains_cls = _get_class(contains_cls) + contains_path_to_schemas = [] + for i, value in enumerate(arg): + these_path_to_schemas: PathToSchemasType = {} + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(contains_cls): + add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) + contains_path_to_schemas.append(these_path_to_schemas) + continue + try: + other_path_to_schemas = contains_cls._validate( + value, validation_metadata=item_validation_metadata) + contains_path_to_schemas.append(other_path_to_schemas) + except exceptions.OpenApiException: + pass + return contains_path_to_schemas + + +def validate_contains( + arg: typing.Any, + contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + many_path_to_schemas = contains_cls_path_to_schemas[1] + if not many_path_to_schemas: + raise exceptions.ApiValueError( + "Validation failed for contains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + these_path_to_schemas: PathToSchemasType = {} + for other_path_to_schema in many_path_to_schemas: + update(these_path_to_schemas, other_path_to_schema) + return these_path_to_schemas + + +def validate_min_contains( + arg: typing.Any, + min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + min_contains = min_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) < min_contains: + raise exceptions.ApiValueError( + "Validation failed for minContains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_max_contains( + arg: typing.Any, + max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + max_contains = max_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) > max_contains: + raise exceptions.ApiValueError( + "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " + "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_const( + arg: typing.Any, + const_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in const_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) + return None + + +def validate_dependent_required( + arg: typing.Any, + dependent_required: typing.Mapping[str, typing.Set[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + for key, keys_that_must_exist in dependent_required.items(): + if key not in arg: + continue + missing_keys = keys_that_must_exist - arg.keys() + if missing_keys: + raise exceptions.ApiValueError( + f"Validation failed for dependentRequired because these_keys={missing_keys} are " + f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" + ) + return None + + +def validate_dependent_schemas( + arg: typing.Any, + dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for key, schema in dependent_schemas.items(): + if key not in arg: + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_property_names( + arg: typing.Any, + property_names_schema: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + module_namespace = vars(sys.modules[cls.__module__]) + property_names_schema = _get_class(property_names_schema, module_namespace) + for key in arg.keys(): + path_to_item = validation_metadata.path_to_item + (key,) + key_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + property_names_schema._validate(key, validation_metadata=key_validation_metadata) + return None + + +def _get_validated_pattern_properties( + arg: typing.Any, + pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, property_value in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + for pattern_info, schema in pattern_properties.items(): + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, property_name, flags=flags): + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_pattern_properties( + arg: typing.Any, + pattern_properties_validation_results: typing.Tuple[ + typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + validation_results = pattern_properties_validation_results[1] + return validation_results + + +def validate_prefix_items( + arg: typing.Any, + prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for i, val in enumerate(arg): + if i >= len(prefix_items): + break + schema = _get_class(prefix_items[i], module_namespace) + path_to_item = validation_metadata.path_to_item + (i,) + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_items( + arg: typing.Any, + unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] + for i, val in enumerate(arg): + path_to_item = validation_metadata.path_to_item + (i,) + if path_to_item in validated_path_to_schemas: + continue + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_properties( + arg: typing.Any, + unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] + for property_name, val in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if path_to_item in validated_path_to_schemas: + continue + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] +json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { + 'types': validate_types, + 'enum_value_to_name': validate_enum, + 'unique_items': validate_unique_items, + 'min_items': validate_min_items, + 'max_items': validate_max_items, + 'min_properties': validate_min_properties, + 'max_properties': validate_max_properties, + 'min_length': validate_min_length, + 'max_length': validate_max_length, + 'inclusive_minimum': validate_inclusive_minimum, + 'exclusive_minimum': validate_exclusive_minimum, + 'inclusive_maximum': validate_inclusive_maximum, + 'exclusive_maximum': validate_exclusive_maximum, + 'multiple_of': validate_multiple_of, + 'pattern': validate_pattern, + 'format': validate_format, + 'required': validate_required, + 'items': validate_items, + 'properties': validate_properties, + 'additional_properties': validate_additional_properties, + 'one_of': validate_one_of, + 'any_of': validate_any_of, + 'all_of': validate_all_of, + 'not_': validate_not, + 'discriminator': validate_discriminator, + 'contains': validate_contains, + 'min_contains': validate_min_contains, + 'max_contains': validate_max_contains, + 'const_value_to_name': validate_const, + 'dependent_required': validate_dependent_required, + 'dependent_schemas': validate_dependent_schemas, + 'property_names': validate_property_names, + 'pattern_properties': validate_pattern_properties, + 'prefix_items': validate_prefix_items, + 'unevaluated_items': validate_unevaluated_items, + 'unevaluated_properties': validate_unevaluated_properties, + 'if_': validate_if, + 'then': validate_then, + 'else_': validate_else +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py new file mode 100644 index 00000000000..91fd822fe1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py @@ -0,0 +1,227 @@ +# coding: utf-8 +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import abc +import base64 +import dataclasses +import enum +import typing +import typing_extensions + +from urllib3 import _collections + + +class SecuritySchemeType(enum.Enum): + API_KEY = 'apiKey' + HTTP = 'http' + MUTUAL_TLS = 'mutualTLS' + OAUTH_2 = 'oauth2' + OPENID_CONNECT = 'openIdConnect' + + +class ApiKeyInLocation(enum.Enum): + QUERY = 'query' + HEADER = 'header' + COOKIE = 'cookie' + + +class __SecuritySchemeBase(metaclass=abc.ABCMeta): + @abc.abstractmethod + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + pass + + +@dataclasses.dataclass +class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): + api_key: str # this must be set by the developer + name: str = '' + in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY + type: SecuritySchemeType = SecuritySchemeType.API_KEY + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + if self.in_location is ApiKeyInLocation.COOKIE: + headers.add('Cookie', self.api_key) + elif self.in_location is ApiKeyInLocation.HEADER: + headers.add(self.name, self.api_key) + elif self.in_location is ApiKeyInLocation.QUERY: + # todo add query handling + raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") + return + + +class HTTPSchemeType(enum.Enum): + BASIC = 'basic' + BEARER = 'bearer' + DIGEST = 'digest' + SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + + +@dataclasses.dataclass +class HTTPBasicSecurityScheme(__SecuritySchemeBase): + user_id: str # user name + password: str + scheme: HTTPSchemeType = HTTPSchemeType.BASIC + encoding: str = 'utf-8' + type: SecuritySchemeType = SecuritySchemeType.HTTP + """ + https://www.rfc-editor.org/rfc/rfc7617.html + """ + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + user_pass = f"{self.user_id}:{self.password}" + b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) + headers.add('Authorization', f"Basic {b64_user_pass.decode()}") + + +@dataclasses.dataclass +class HTTPBearerSecurityScheme(__SecuritySchemeBase): + access_token: str + bearer_format: typing.Optional[str] = None + scheme: HTTPSchemeType = HTTPSchemeType.BEARER + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + headers.add('Authorization', f"Bearer {self.access_token}") + + +@dataclasses.dataclass +class HTTPDigestSecurityScheme(__SecuritySchemeBase): + scheme: HTTPSchemeType = HTTPSchemeType.DIGEST + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class MutualTLSSecurityScheme(__SecuritySchemeBase): + type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class ImplicitOAuthFlow: + authorization_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class TokenUrlOauthFlow: + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class AuthorizationCodeOauthFlow: + authorization_url: str + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class OAuthFlows: + implicit: typing.Optional[ImplicitOAuthFlow] = None + password: typing.Optional[TokenUrlOauthFlow] = None + client_credentials: typing.Optional[TokenUrlOauthFlow] = None + authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None + + +class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): + flows: OAuthFlows + type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OAuth2SecurityScheme not yet implemented") + + +class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): + openid_connect_url: str + type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") + +""" +Key is the Security scheme class +Value is the list of scopes +""" +SecurityRequirementObject = typing.TypedDict( + 'SecurityRequirementObject', + { + }, + total=False +) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py new file mode 100644 index 00000000000..a079ee31bcb --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py @@ -0,0 +1,34 @@ +# coding: utf-8 +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import dataclasses +import typing + +from unit_test_api.schemas import validation, schema + + +@dataclasses.dataclass +class ServerWithoutVariables(abc.ABC): + url: str + + +@dataclasses.dataclass +class ServerWithVariables(abc.ABC): + _url: str + variables: validation.immutabledict[str, str] + variables_schema: typing.Type[schema.Schema] + url: str = dataclasses.field(init=False) + + def __post_init__(self): + url = self._url + assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) + for (key, value) in self.variables.items(): + url = url.replace("{" + key + "}", value) + self.url = url diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py new file mode 100644 index 00000000000..f24c0278335 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "https://someserver.com/v1" diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py new file mode 100644 index 00000000000..5374be6472e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py @@ -0,0 +1,15 @@ +import decimal +import io +import typing +import typing_extensions + +from unit_test_api import api_client, schemas + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'api_client', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py new file mode 100644 index 00000000000..55bcea40b80 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py @@ -0,0 +1,18 @@ +import datetime +import decimal +import io +import typing +import typing_extensions +import uuid + +from unit_test_api import schemas, api_response + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py new file mode 100644 index 00000000000..ebe9120bd08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py @@ -0,0 +1,25 @@ +import dataclasses +import datetime +import decimal +import io +import typing +import uuid + +import typing_extensions +import urllib3 + +from unit_test_api import api_client, schemas, api_response + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'typing', + 'uuid', + 'typing_extensions', + 'urllib3', + 'api_client', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py new file mode 100644 index 00000000000..c7b3d6440f2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py @@ -0,0 +1,28 @@ +import dataclasses +import datetime +import decimal +import io +import numbers +import re +import typing +import typing_extensions +import uuid + +from unit_test_api import schemas +from unit_test_api.configurations import schema_configuration + +U = typing.TypeVar('U') + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'numbers', + 're', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'schema_configuration' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py new file mode 100644 index 00000000000..8156260e9b3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py @@ -0,0 +1,12 @@ +import dataclasses +import typing +import typing_extensions + +from unit_test_api import security_schemes + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'security_schemes' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py new file mode 100644 index 00000000000..9fe6c950a11 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py @@ -0,0 +1,13 @@ +import dataclasses +import typing +import typing_extensions + +from unit_test_api import server, schemas + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'server', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py b/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py new file mode 100644 index 00000000000..617c2dc964a --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import unittest + +import openapi_client +from openapi_client.components.schema.not import Not +from openapi_client.configurations import schema_configuration + + +class TestNot(unittest.TestCase): + """Not unit test stubs""" + configuration = schema_configuration.SchemaConfiguration( + disabled_json_schema_keywords={'format'} + ) + + def test_allowed_passes(self): + # allowed + Not.validate( + "foo", + configuration=self.configuration + ) + + def test_disallowed_fails(self): + # disallowed + with self.assertRaises((openapi_client.ApiValueError, openapi_client.ApiTypeError)): + Not.validate( + 1, + configuration=self.configuration + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES index 4fbf59f04af..9a2ace04f5d 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES @@ -14,55 +14,55 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/this_package/__init__.py -src/this_package/api_client.py -src/this_package/api_response.py -src/this_package/apis/__init__.py -src/this_package/apis/path_to_api.py -src/this_package/apis/paths/__init__.py -src/this_package/apis/paths/operators.py -src/this_package/apis/tag_to_api.py -src/this_package/apis/tags/__init__.py -src/this_package/apis/tags/default_api.py -src/this_package/components/__init__.py -src/this_package/components/schema/__init__.py -src/this_package/components/schema/addition_operator.py -src/this_package/components/schema/operator.py -src/this_package/components/schema/subtraction_operator.py -src/this_package/components/schemas/__init__.py -src/this_package/configurations/__init__.py -src/this_package/configurations/api_configuration.py -src/this_package/configurations/schema_configuration.py -src/this_package/exceptions.py -src/this_package/paths/__init__.py -src/this_package/paths/operators/__init__.py -src/this_package/paths/operators/post/__init__.py -src/this_package/paths/operators/post/operation.py -src/this_package/paths/operators/post/request_body/__init__.py -src/this_package/paths/operators/post/request_body/content/__init__.py -src/this_package/paths/operators/post/request_body/content/application_json/__init__.py -src/this_package/paths/operators/post/request_body/content/application_json/schema.py -src/this_package/paths/operators/post/responses/__init__.py -src/this_package/paths/operators/post/responses/response_200/__init__.py -src/this_package/py.typed -src/this_package/rest.py -src/this_package/schemas/__init__.py -src/this_package/schemas/format.py -src/this_package/schemas/original_immutabledict.py -src/this_package/schemas/schema.py -src/this_package/schemas/schemas.py -src/this_package/schemas/validation.py -src/this_package/security_schemes.py -src/this_package/server.py -src/this_package/servers/__init__.py -src/this_package/servers/server_0.py -src/this_package/shared_imports/__init__.py -src/this_package/shared_imports/header_imports.py -src/this_package/shared_imports/operation_imports.py -src/this_package/shared_imports/response_imports.py -src/this_package/shared_imports/schema_imports.py -src/this_package/shared_imports/security_scheme_imports.py -src/this_package/shared_imports/server_imports.py +src/openapi_client/__init__.py +src/openapi_client/api_client.py +src/openapi_client/api_response.py +src/openapi_client/apis/__init__.py +src/openapi_client/apis/path_to_api.py +src/openapi_client/apis/paths/__init__.py +src/openapi_client/apis/paths/operators.py +src/openapi_client/apis/tag_to_api.py +src/openapi_client/apis/tags/__init__.py +src/openapi_client/apis/tags/default_api.py +src/openapi_client/components/__init__.py +src/openapi_client/components/schema/__init__.py +src/openapi_client/components/schema/addition_operator.py +src/openapi_client/components/schema/operator.py +src/openapi_client/components/schema/subtraction_operator.py +src/openapi_client/components/schemas/__init__.py +src/openapi_client/configurations/__init__.py +src/openapi_client/configurations/api_configuration.py +src/openapi_client/configurations/schema_configuration.py +src/openapi_client/exceptions.py +src/openapi_client/paths/__init__.py +src/openapi_client/paths/operators/__init__.py +src/openapi_client/paths/operators/post/__init__.py +src/openapi_client/paths/operators/post/operation.py +src/openapi_client/paths/operators/post/request_body/__init__.py +src/openapi_client/paths/operators/post/request_body/content/__init__.py +src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py +src/openapi_client/paths/operators/post/responses/__init__.py +src/openapi_client/paths/operators/post/responses/response_200/__init__.py +src/openapi_client/py.typed +src/openapi_client/rest.py +src/openapi_client/schemas/__init__.py +src/openapi_client/schemas/format.py +src/openapi_client/schemas/original_immutabledict.py +src/openapi_client/schemas/schema.py +src/openapi_client/schemas/schemas.py +src/openapi_client/schemas/validation.py +src/openapi_client/security_schemes.py +src/openapi_client/server.py +src/openapi_client/servers/__init__.py +src/openapi_client/servers/server_0.py +src/openapi_client/shared_imports/__init__.py +src/openapi_client/shared_imports/header_imports.py +src/openapi_client/shared_imports/operation_imports.py +src/openapi_client/shared_imports/response_imports.py +src/openapi_client/shared_imports/schema_imports.py +src/openapi_client/shared_imports/security_scheme_imports.py +src/openapi_client/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md index 1a571429a50..c0e502bd11b 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md @@ -1,4 +1,4 @@ -# this-package +# openapi-client No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md index a904558e9db..73b52e88e65 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -this_package.apis.tags.default_api +openapi_client.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md index e482eac5635..481c814664b 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md @@ -1,5 +1,5 @@ # AdditionOperator -this_package.components.schema.addition_operator +openapi_client.components.schema.addition_operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md index 0d42674bd37..994925dcd3b 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md @@ -1,5 +1,5 @@ # Operator -this_package.components.schema.operator +openapi_client.components.schema.operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md index 32505391662..a5d8f290213 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md @@ -1,5 +1,5 @@ # SubtractionOperator -this_package.components.schema.subtraction_operator +openapi_client.components.schema.subtraction_operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md index ffee73202fe..12de2175689 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md @@ -1,4 +1,4 @@ -this_package.paths.operators.operation +openapi_client.paths.operators.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import this_package -from this_package.configurations import api_configuration -from this_package.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with this_package.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -106,7 +106,7 @@ with this_package.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except this_package.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->post_operators: %s\n" % e) ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md index a749b8eb2fd..9d20441dd7f 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -this_package.servers.server_0 +openapi_client.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml index 78f774ae638..e14d49e00f0 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "this_package" = ["py.typed"] [project] -name = "this-package" +name = "openapi-client" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py new file mode 100644 index 00000000000..0c3f6f3e684 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +# flake8: noqa + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +__version__ = "1.0.0" + +# import ApiClient +from this_package.api_client import ApiClient + +# import Configuration +from this_package.configurations.api_configuration import ApiConfiguration + +# import exceptions +from this_package.exceptions import OpenApiException +from this_package.exceptions import ApiAttributeError +from this_package.exceptions import ApiTypeError +from this_package.exceptions import ApiValueError +from this_package.exceptions import ApiKeyError +from this_package.exceptions import ApiException diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py new file mode 100644 index 00000000000..138593b9740 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py @@ -0,0 +1,1402 @@ +# coding: utf-8 +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import datetime +import dataclasses +import decimal +import enum +import email +import json +import os +import io +import atexit +from multiprocessing import pool +import re +import tempfile +import typing +import typing_extensions +from urllib import parse +import urllib3 +from urllib3 import _collections, fields + + +from this_package import exceptions, rest, schemas, security_schemes, api_response +from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj: typing.Any): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return obj + elif isinstance(obj, bool): + # must be before int check + return obj + elif isinstance(obj, int): + return obj + elif obj is None: + return None + elif isinstance(obj, (dict, schemas.immutabledict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +@dataclasses.dataclass +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + prefix: str + separator: str + first: bool = True + item_separator: str = dataclasses.field(init=False) + + def __post_init__(self): + self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return parse.quote(str(in_data)) + return str(in_data) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + @classmethod + def _serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + @classmethod + def _deserialize_simple( + cls, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +class Encoding: + content_type: str + headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None + style: typing.Optional[ParameterStyle] = None + explode: bool = False + allow_reserved: bool = False + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[schemas.Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +class ParameterBase(JSONDetector): + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[schemas.Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] + + _json_encoder = JSONEncoder() + + def __init_subclass__(cls, **kwargs): + if cls.explode is None: + if cls.style is ParameterStyle.FORM: + cls.explode = True + else: + cls.explode = False + + @classmethod + def _serialize_json( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=cls._json_encoder.compact_separators) + return json.dumps(in_data) + +_SERIALIZE_TYPES = typing.Union[ + int, + float, + str, + datetime.date, + datetime.datetime, + None, + bool, + list, + tuple, + dict, + schemas.immutabledict +] + +_JSON_TYPES = typing.Union[ + int, + float, + str, + None, + bool, + typing.Tuple['_JSON_TYPES', ...], + schemas.immutabledict[str, '_JSON_TYPES'], +] + +@dataclasses.dataclass +class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.PATH + style: ParameterStyle = ParameterStyle.SIMPLE + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_label( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_matrix( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = cls._serialize_simple( + in_data=in_data, + name=cls.name, + explode=cls.explode, + percent_encode=True + ) + return cls._to_dict(cls.name, value) + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if cls.style: + if cls.style is ParameterStyle.SIMPLE: + return cls.__serialize_simple(cast_in_data) + elif cls.style is ParameterStyle.LABEL: + return cls.__serialize_label(cast_in_data) + elif cls.style is ParameterStyle.MATRIX: + return cls.__serialize_matrix(cast_in_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class QueryParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.QUERY + style: ParameterStyle = ParameterStyle.FORM + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_space_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_pipe_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._serialize_form( + in_data, + name=cls.name, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: + if cls.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + raise ValueError(f'No iterator possible for style={cls.style}') + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if cls.style: + # TODO update query ones to omit setting values when [] {} or None is input + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + if cls.style is ParameterStyle.FORM: + return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) + return cls._to_dict( + cls.name, + next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) + ) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class CookieParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.FORM + in_type: ParameterInType = ParameterInType.COOKIE + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if cls.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + value = cls._serialize_form( + cast_in_data, + explode=explode, + name=cls.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return cls._to_dict(cls.name, value) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): + style: ParameterStyle = ParameterStyle.SIMPLE + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + explode: bool = False + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = _collections.HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + @classmethod + def serialize_with_name( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + value = cls._serialize_simple(cast_in_data, name, cls.explode, False) + return cls.__to_headers(((name, value),)) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls.__to_headers(((name, value),)) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + @classmethod + def deserialize( + cls, + in_data: str, + name: str + ): + if cls.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) + return cls.schema.validate_base(extracted_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + if cls._content_type_is_json(content_type): + cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) + assert media_type.schema is not None + return media_type.schema.validate_base(cast_in_data) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class HeaderParameterWithoutName(__HeaderParameterBase): + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + name, + skip_validation=skip_validation + ) + + +class HeaderParameter(__HeaderParameterBase): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + cls.name, + skip_validation=skip_validation + ) + +T = typing.TypeVar("T", bound=api_response.ApiResponse) + + +class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None + headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None + + @classmethod + @abc.abstractmethod + def get_response(cls, response, headers, body) -> T: ... + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = parse.urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + + @classmethod + def __deserialize_application_octet_stream( + cls, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or cls.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as write_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + write_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + @classmethod + def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: + content_type = response.headers.get('content-type') + deserialized_body = schemas.unset + streamed = response.supports_chunked_reads() + + deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset + if cls.headers is not None and cls.headers_schema is not None: + deserialized_headers = {} + for header_name, header_param in cls.headers.items(): + header_value = response.headers.get(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value + deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) + + if cls.content is not None: + if content_type not in cls.content: + raise exceptions.ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" + ) + body_schema = cls.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return cls.get_response( + response=response, + headers=deserialized_headers, + body=schemas.unset + ) + + if cls._content_type_is_json(content_type): + body_data = cls.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = cls.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = cls.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + elif content_type == 'application/x-pem-file': + body_data = response.data.decode() + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = schemas.get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema.validate_base(body_data) + else: + deserialized_body = body_schema.validate_base( + body_data, configuration=configuration) + elif streamed: + response.release_conn() + + return cls.get_response( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +@dataclasses.dataclass +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param configuration: api_configuration.ApiConfiguration object for this client + :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client + :param default_headers: any default headers to include when making calls to the API. + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + configuration: api_configuration.ApiConfiguration = dataclasses.field( + default_factory=lambda: api_configuration.ApiConfiguration()) + schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( + default_factory=lambda: schema_configuration_.SchemaConfiguration()) + default_headers: _collections.HTTPHeaderDict = dataclasses.field( + default_factory=lambda: _collections.HTTPHeaderDict()) + pool_threads: int = 1 + user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' + rest_client: rest.RESTClientObject = dataclasses.field(init=False) + + def __post_init__(self): + self._pool = None + self.rest_client = rest.RESTClientObject(self.configuration) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = pool.ThreadPool(self.pool_threads) + return self._pool + + def set_default_header(self, header_name: str, header_value: str): + self.default_headers[header_name] = header_value + + def call_api( + self, + resource_path: str, + method: str, + host: str, + query_params_suffix: typing.Optional[str] = None, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + body: typing.Union[str, bytes, None] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data` + :param security_requirement_object: The security requirement object, used to apply auth when making the call + :param async_req: execute request asynchronously + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the schemas.BinarySchema + instance will also inherit from FileSchema and schemas.FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + the method will return the response directly. + """ + # header parameters + used_headers = _collections.HTTPHeaderDict(self.default_headers) + user_agent_key = 'User-Agent' + if user_agent_key not in used_headers and self.user_agent: + used_headers[user_agent_key] = self.user_agent + + # auth setting + self.update_params_for_auth( + used_headers, + security_requirement_object, + resource_path, + method, + body, + query_params_suffix + ) + + # must happen after auth setting in case user is overriding those + if headers: + used_headers.update(headers) + + # request url + url = host + resource_path + if query_params_suffix: + url += query_params_suffix + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def request( + self, + method: str, + url: str, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + body: typing.Union[str, bytes, None] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "get": + return self.rest_client.get(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "head": + return self.rest_client.head(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "options": + return self.rest_client.options(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "post": + return self.rest_client.post(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "put": + return self.rest_client.put(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "patch": + return self.rest_client.patch(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "delete": + return self.rest_client.delete(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise exceptions.ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth( + self, + headers: _collections.HTTPHeaderDict, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], + resource_path: str, + method: str, + body: typing.Union[str, bytes, None] = None, + query_params_suffix: typing.Optional[str] = None + ): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param security_requirement_object: the openapi security requirement object + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + return + +@dataclasses.dataclass +class Api: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) + + @staticmethod + def _get_used_path( + used_path: str, + path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), + path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), + query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + skip_validation: bool = False + ) -> typing.Tuple[str, str]: + used_path_params = {} + if path_params is not None: + for path_parameter in path_parameters: + parameter_data = path_params.get(path_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) + used_path_params.update(serialized_data) + + for k, v in used_path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + query_params_suffix = "" + if query_params is not None: + prefix_separator_iterator = None + for query_parameter in query_parameters: + parameter_data = query_params.get(query_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = query_parameter.serialize( + parameter_data, + prefix_separator_iterator=prefix_separator_iterator, + skip_validation=skip_validation + ) + for serialized_value in serialized_data.values(): + query_params_suffix += serialized_value + return used_path, query_params_suffix + + @staticmethod + def _get_headers( + header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), + header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + accept_content_types: typing.Tuple[str, ...] = (), + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + headers = _collections.HTTPHeaderDict() + if header_params is not None: + for parameter in header_parameters: + parameter_data = header_params.get(parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) + headers.extend(serialized_data) + if accept_content_types: + for accept_content_type in accept_content_types: + headers.add('Accept', accept_content_type) + return headers + + def _get_fields_and_body( + self, + request_body: typing.Type[RequestBody], + body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], + content_type: str, + headers: _collections.HTTPHeaderDict + ): + if request_body.required and body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + + if isinstance(body, schemas.Unset): + return None, None + + serialized_fields = None + serialized_body = None + serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) + headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + serialized_fields = serialized_data['fields'] + elif 'body' in serialized_data: + serialized_body = serialized_data['body'] + return serialized_fields, serialized_body + + @staticmethod + def _verify_response_status(response: api_response.ApiResponse): + if not 200 <= response.response.status <= 399: + raise exceptions.ApiException( + status=response.response.status, + reason=response.response.reason, + api_response=response + ) + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[rest.RequestField, ...] + + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType schemas.Schema info + """ + __json_encoder = JSONEncoder() + __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} + content: typing.Dict[str, typing.Type[MediaType]] + required: bool = False + + @classmethod + def __serialize_json( + cls, + in_data: _JSON_TYPES + ) -> SerializedRequestBody: + in_data = cls.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return {'body': json_str} + + @staticmethod + def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: + return {'body': str(in_data)} + + @classmethod + def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: + json_value = cls.__json_encoder.default(value) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + @classmethod + def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: + if isinstance(value, str): + request_field = rest.RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = rest.RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, schemas.FileIO): + # TODO use content.encoding to limit allowed content types if they are present + urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, urllib3_request_field) + value.close() + else: + request_field = cls.__multipart_json_item(key=key, value=value) + return request_field + + @classmethod + def __serialize_multipart_form_data( + cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] + ) -> SerializedRequestBody: + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a rest.RequestField for each item with name=key + for item in value: + request_field = cls.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore + fields.append(request_field) + else: + request_field = cls.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return {'fields': tuple(fields)} + + @staticmethod + def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: + if isinstance(in_data, bytes): + return {'body': in_data} + # schemas.FileIO type + used_in_data = in_data.read() + in_data.close() + return {'body': used_in_data} + + @classmethod + def __serialize_application_x_www_form_data( + cls, in_data: schemas.immutabledict[str, _JSON_TYPES] + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + cast_in_data = cls.__json_encoder.default(in_data) + value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return {'body': value} + + @classmethod + def serialize( + cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = cls.content[content_type] + assert media_type.schema is not None + schema = schemas.get_class(media_type.schema) + used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() + cast_in_data = schema.validate_base(in_data, configuration=used_configuration) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if cls._content_type_is_json(content_type): + if isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") + return cls.__serialize_json(cast_in_data) + elif content_type in cls.__plain_txt_content_types: + if not isinstance(cast_in_data, (int, float, str)): + raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") + return cls.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") + return cls.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError( + f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") + return cls.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + if not isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") + return cls.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py new file mode 100644 index 00000000000..a59826524c2 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py @@ -0,0 +1,28 @@ +# coding: utf-8 +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +import urllib3 + +from this_package import schemas + + +@dataclasses.dataclass(frozen=True) +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] + headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] + + +@dataclasses.dataclass(frozen=True) +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py new file mode 100644 index 00000000000..7840f7726f6 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py new file mode 100644 index 00000000000..00cc9b99d82 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py @@ -0,0 +1,17 @@ +import typing +import typing_extensions + +from openapi_client.apis.paths.operators import Operators + +PathToApi = typing.TypedDict( + 'PathToApi', + { + "/operators": typing.Type[Operators], + } +) + +path_to_api = PathToApi( + { + "/operators": Operators, + } +) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py new file mode 100644 index 00000000000..cf241d055c1 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py new file mode 100644 index 00000000000..22ed5dc9343 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.operators.post.operation import ApiForPost + + +class Operators( + ApiForPost, +): + pass diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py new file mode 100644 index 00000000000..00e34b097d3 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py @@ -0,0 +1,17 @@ +import typing +import typing_extensions + +from openapi_client.apis.tags.default_api import DefaultApi + +TagToApi = typing.TypedDict( + 'TagToApi', + { + "default": typing.Type[DefaultApi], + } +) + +tag_to_api = TagToApi( + { + "default": DefaultApi, + } +) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py new file mode 100644 index 00000000000..f3c38f014ce --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py new file mode 100644 index 00000000000..aeab3e99b95 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.operators.post.operation import PostOperators + + +class DefaultApi( + PostOperators, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py new file mode 100644 index 00000000000..e3edab2dc1c --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py new file mode 100644 index 00000000000..dcbd682095a --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +A: typing_extensions.TypeAlias = schemas.Float64Schema +B: typing_extensions.TypeAlias = schemas.Float64Schema + + +@dataclasses.dataclass(frozen=True) +class OperatorId( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["ADD"] = "ADD" +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + "b": typing.Type[B], + "operator_id": typing.Type[OperatorId], + } +) + + +class AdditionOperatorDict(schemas.immutabledict[str, typing.Union[ + str, + typing.Union[int, float], +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "a", + "b", + "operator_id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + a: typing.Union[ + int, + float + ], + b: typing.Union[ + int, + float + ], + operator_id: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "a": a, + "b": b, + "operator_id": operator_id, + } + used_arg_ = typing.cast(AdditionOperatorDictInput, arg_) + return AdditionOperator.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionOperatorDictInput, + AdditionOperatorDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionOperatorDict: + return AdditionOperator.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("a") + ) + + @property + def b(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("b") + ) + + @property + def operator_id(self) -> str: + return typing.cast( + str, + self.__getitem__("operator_id") + ) +AdditionOperatorDictInput = typing.TypedDict( + 'AdditionOperatorDictInput', + { + "a": typing.Union[ + int, + float + ], + "b": typing.Union[ + int, + float + ], + "operator_id": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class AdditionOperator( + schemas.Schema[AdditionOperatorDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "a", + "b", + "operator_id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionOperatorDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionOperatorDictInput, + AdditionOperatorDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionOperatorDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py new file mode 100644 index 00000000000..2829b3fd60e --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import addition_operator +from openapi_client.components.schema import subtraction_operator +OneOf = typing.Tuple[ + typing.Type[addition_operator.AdditionOperator], + typing.Type[subtraction_operator.SubtractionOperator], +] + + +@dataclasses.dataclass(frozen=True) +class Operator( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'operator_id': { + 'ADD': addition_operator.AdditionOperator, + 'AdditionOperator': addition_operator.AdditionOperator, + 'SUB': subtraction_operator.SubtractionOperator, + 'SubtractionOperator': subtraction_operator.SubtractionOperator, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py new file mode 100644 index 00000000000..90f4e1c236a --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +A: typing_extensions.TypeAlias = schemas.Float64Schema +B: typing_extensions.TypeAlias = schemas.Float64Schema + + +@dataclasses.dataclass(frozen=True) +class OperatorId( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["SUB"] = "SUB" +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + "b": typing.Type[B], + "operator_id": typing.Type[OperatorId], + } +) + + +class SubtractionOperatorDict(schemas.immutabledict[str, typing.Union[ + str, + typing.Union[int, float], +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "a", + "b", + "operator_id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + a: typing.Union[ + int, + float + ], + b: typing.Union[ + int, + float + ], + operator_id: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "a": a, + "b": b, + "operator_id": operator_id, + } + used_arg_ = typing.cast(SubtractionOperatorDictInput, arg_) + return SubtractionOperator.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SubtractionOperatorDictInput, + SubtractionOperatorDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SubtractionOperatorDict: + return SubtractionOperator.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("a") + ) + + @property + def b(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("b") + ) + + @property + def operator_id(self) -> str: + return typing.cast( + str, + self.__getitem__("operator_id") + ) +SubtractionOperatorDictInput = typing.TypedDict( + 'SubtractionOperatorDictInput', + { + "a": typing.Union[ + int, + float + ], + "b": typing.Union[ + int, + float + ], + "operator_id": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class SubtractionOperator( + schemas.Schema[SubtractionOperatorDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "a", + "b", + "operator_id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SubtractionOperatorDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SubtractionOperatorDictInput, + SubtractionOperatorDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SubtractionOperatorDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py new file mode 100644 index 00000000000..755e18164fb --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from this_package.components.schema.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from this_package.components.schema.addition_operator import AdditionOperator +from this_package.components.schema.operator import Operator +from this_package.components.schema.subtraction_operator import SubtractionOperator diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py new file mode 100644 index 00000000000..ee66a00c502 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py @@ -0,0 +1,281 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import copy +from http import client as http_client +import logging +import multiprocessing +import sys +import typing +import typing_extensions + +import urllib3 + +from this_package import exceptions +from this_package.servers import server_0 + +# the server to use at each openapi document json path +ServerInfo = typing.TypedDict( + 'ServerInfo', + { + 'servers/0': server_0.Server0, + }, + total=False +) + + +class ServerIndexInfoRequired(typing.TypedDict): + servers: typing.Literal[0] + +ServerIndexInfoOptional = typing.TypedDict( + 'ServerIndexInfoOptional', + { + }, + total=False +) + + +class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): + """ + the default server_index to use at each openapi document json path + the fallback value is stored in the 'servers' key + """ + + +class ApiConfiguration(object): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param server_info: the servers that can be used to make endpoint calls + :param server_index_info: index to servers configuration + """ + + def __init__( + self, + server_info: typing.Optional[ServerInfo] = None, + server_index_info: typing.Optional[ServerIndexInfo] = None, + ): + """Constructor + """ + # Authentication Settings + self.security_scheme_info: typing.Dict[str, typing.Any] = {} + self.security_index_info = {'security': 0} + # Server Info + self.server_info: ServerInfo = server_info or { + 'servers/0': server_0.Server0(), + } + self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("this_package") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_server_url( + self, + key_prefix: typing.Literal[ + "servers", + ], + index: typing.Optional[int], + ) -> str: + """Gets host URL based on the index + :param index: array index of the host settings + :return: URL based on host settings + """ + if index: + used_index = index + else: + try: + used_index = self.server_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.server_index_info.get("servers", 0) + server_info_key = typing.cast( + typing.Literal[ + "servers/0", + ], + f"{key_prefix}/{used_index}" + ) + try: + server = self.server_info[server_info_key] + except KeyError as ex: + raise ex + return server.url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py new file mode 100644 index 00000000000..d2247791360 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +from this_package import exceptions + + +PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { + 'additional_properties': 'additionalProperties', + 'all_of': 'allOf', + 'any_of': 'anyOf', + 'const_value_to_name': 'const', + 'contains': 'contains', + 'dependent_required': 'dependentRequired', + 'dependent_schemas': 'dependentSchemas', + 'discriminator': 'discriminator', + # default omitted because it has no validation impact + 'else_': 'else', + 'enum_value_to_name': 'enum', + 'exclusive_maximum': 'exclusiveMaximum', + 'exclusive_minimum': 'exclusiveMinimum', + 'format': 'format', + 'if_': 'if', + 'inclusive_maximum': 'maximum', + 'inclusive_minimum': 'minimum', + 'items': 'items', + 'max_contains': 'maxContains', + 'max_items': 'maxItems', + 'max_length': 'maxLength', + 'max_properties': 'maxProperties', + 'min_contains': 'minContains', + 'min_items': 'minItems', + 'min_length': 'minLength', + 'min_properties': 'minProperties', + 'multiple_of': 'multipleOf', + 'not_': 'not', + 'one_of': 'oneOf', + 'pattern': 'pattern', + 'pattern_properties': 'patternProperties', + 'prefix_items': 'prefixItems', + 'properties': 'properties', + 'property_names': 'propertyNames', + 'required': 'required', + 'then': 'then', + 'types': 'type', + 'unique_items': 'uniqueItems', + 'unevaluated_items': 'unevaluatedItems', + 'unevaluated_properties': 'unevaluatedProperties' +} + +class SchemaConfiguration: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param disabled_json_schema_keywords (set): Set of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_json_schema_keywords is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + """ + + def __init__( + self, + disabled_json_schema_keywords = set(), + ): + """Constructor + """ + self.disabled_json_schema_keywords = disabled_json_schema_keywords + + @property + def disabled_json_schema_python_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_python_keywords + + @property + def disabled_json_schema_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_keywords + + @disabled_json_schema_keywords.setter + def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): + disabled_json_schema_keywords = set() + disabled_json_schema_python_keywords = set() + for k in json_keywords: + python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} + if not python_keywords: + raise exceptions.ApiValueError( + "Invalid keyword: '{0}''".format(k)) + disabled_json_schema_keywords.add(k) + disabled_json_schema_python_keywords.update(python_keywords) + self.__disabled_json_schema_keywords = disabled_json_schema_keywords + self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py new file mode 100644 index 00000000000..ac02439dd07 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +from this_package import api_response + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + +T = typing.TypeVar('T', bound=api_response.ApiResponse) + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: typing.Optional[str] = None + api_response: typing.Optional[T] = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.api_response: + if self.api_response.response.headers: + error_message += "HTTP response headers: {0}\n".format( + self.api_response.response.headers) + if self.api_response.response.data: + error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) + + return error_message diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py new file mode 100644 index 00000000000..2c2c9cc4bdc --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis import path_to_api diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py new file mode 100644 index 00000000000..4794ead8e40 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.operators import Operators + +path = "/operators" \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py new file mode 100644 index 00000000000..6a741c539e2 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import operator + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_operators( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_operators( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_operators( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostOperators(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_operators = BaseApi._post_operators + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_operators diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py new file mode 100644 index 00000000000..53b58771dd6 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..36de00ea18a --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import operator +Schema: typing_extensions.TypeAlias = operator.Operator diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..f06624da9d4 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py new file mode 100644 index 00000000000..c96b510600e --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi # type: ignore[import] +import urllib3 +from urllib3 import fields +from urllib3 import exceptions as urllib3_exceptions +from urllib3._collections import HTTPHeaderDict + +from this_package import exceptions + + +logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise exceptions.ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + headers = headers or HTTPHeaderDict() + + used_timeout: typing.Optional[urllib3.Timeout] = None + if timeout: + if isinstance(timeout, (int, float)): + used_timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: + if 'Content-Type' not in headers and body is None: + r = self.pool_manager.request( + method, + url, + preload_content=not stream, + timeout=used_timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + body=body, + encode_multipart=False, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise exceptions.ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + except urllib3_exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise exceptions.ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def get(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def head(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def options(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def delete(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def post(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def put(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def patch(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py new file mode 100644 index 00000000000..1df56a1a180 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +import typing_extensions + +from .schema import ( + get_class, + none_type_, + classproperty, + Bool, + FileIO, + Schema, + SingletonMeta, + AnyTypeSchema, + UnsetAnyTypeSchema, + INPUT_TYPES_ALL +) + +from .schemas import ( + ListSchema, + NoneSchema, + NumberSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + StrSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BytesSchema, + FileSchema, + BinarySchema, + BoolSchema, + NotAnyTypeSchema, + OUTPUT_BASE_TYPES, + DictSchema +) +from .validation import ( + PatternInfo, + ValidationMetadata, + immutabledict +) +from .format import ( + as_date, + as_datetime, + as_decimal, + as_uuid +) + +def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore + res = {} + for key, val in t_dict.__annotations__.items(): + if isinstance(val, typing._GenericAlias): # type: ignore + # typing.Type[W] -> W + val_cls = typing.get_args(val)[0] + res[key] = val_cls + return res + +X = typing.TypeVar('X', bound=typing.Tuple) + +def tuple_to_instance(tup: typing.Type[X]) -> X: + res = [] + for arg in typing.get_args(tup): + if isinstance(arg, typing._GenericAlias): # type: ignore + # typing.Type[Schema] -> Schema + arg_cls = typing.get_args(arg)[0] + res.append(arg_cls) + return tuple(res) # type: ignore + + +class Unset: + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset: Unset = Unset() + +def key_unknown_error_msg(key: str) -> str: + return (f"Invalid key. The key {key} is not a known key in this payload. " + "If this key is an additional property, use get_additional_property_" + ) + +def raise_if_key_known( + key: str, + required_keys: typing.FrozenSet[str], + optional_keys: typing.FrozenSet[str] +): + if key in required_keys or key in optional_keys: + raise ValueError(f"The key {key} is a known property, use get_property to access its value") + +__all__ = [ + 'get_class', + 'none_type_', + 'classproperty', + 'Bool', + 'FileIO', + 'Schema', + 'SingletonMeta', + 'AnyTypeSchema', + 'UnsetAnyTypeSchema', + 'INPUT_TYPES_ALL', + 'ListSchema', + 'NoneSchema', + 'NumberSchema', + 'IntSchema', + 'Int32Schema', + 'Int64Schema', + 'Float32Schema', + 'Float64Schema', + 'StrSchema', + 'UUIDSchema', + 'DateSchema', + 'DateTimeSchema', + 'DecimalSchema', + 'BytesSchema', + 'FileSchema', + 'BinarySchema', + 'BoolSchema', + 'NotAnyTypeSchema', + 'OUTPUT_BASE_TYPES', + 'DictSchema', + 'PatternInfo', + 'ValidationMetadata', + 'immutabledict', + 'as_date', + 'as_datetime', + 'as_decimal', + 'as_uuid', + 'typed_dict_to_instance', + 'tuple_to_instance', + 'Unset', + 'unset', + 'key_unknown_error_msg', + 'raise_if_key_known' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py new file mode 100644 index 00000000000..bb614903b82 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py @@ -0,0 +1,115 @@ +import datetime +import decimal +import functools +import typing +import uuid + +from dateutil import parser, tz + + +class CustomIsoparser(parser.isoparser): + def __init__(self, sep: typing.Optional[str] = None): + """ + :param sep: + A single character that separates date and time portions. If + ``None``, the parser will accept any single character. + For strict ISO-8601 adherence, pass ``'T'``. + """ + if sep is not None: + if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): + raise ValueError('Separator must be a single, non-numeric ' + + 'ASCII character') + + used_sep = sep.encode('ascii') + else: + used_sep = None + + self._sep = used_sep + + @staticmethod + def __get_ascii_bytes(str_in: str) -> bytes: + # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII + # ASCII is the same in UTF-8 + try: + return str_in.encode('ascii') + except UnicodeEncodeError as e: + msg = 'ISO-8601 strings should contain only ASCII characters' + raise ValueError(msg) from e + + def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isodate(dt_str_ascii) # type: ignore + values = typing.cast(typing.Tuple[typing.List[int], int], values) + components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) + pos = values[1] + return components, pos + + def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isotime(dt_str_ascii) # type: ignore + components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore + return components + + def parse_isodatetime(self, dt_str: str) -> datetime.datetime: + date_components, pos = self.__parse_isodate(dt_str) + if len(dt_str) <= pos: + # len(components) <= 3 + raise ValueError('Value is not a datetime') + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) + if hour == 24: + hour = 0 + components = (*date_components, hour, minute, second, microsecond, tzinfo) + return datetime.datetime(*components) + datetime.timedelta(days=1) + else: + components = (*date_components, hour, minute, second, microsecond, tzinfo) + else: + raise ValueError('String contains unknown ISO components') + + return datetime.datetime(*components) + + def parse_isodate_str(self, datestr: str) -> datetime.date: + components, pos = self.__parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return datetime.date(*components) + +DEFAULT_ISOPARSER = CustomIsoparser() + +@functools.lru_cache() +def as_date(arg: str) -> datetime.date: + """ + type = "string" + format = "date" + """ + return DEFAULT_ISOPARSER.parse_isodate_str(arg) + +@functools.lru_cache() +def as_datetime(arg: str) -> datetime.datetime: + """ + type = "string" + format = "date-time" + """ + return DEFAULT_ISOPARSER.parse_isodatetime(arg) + +@functools.lru_cache() +def as_decimal(arg: str) -> decimal.Decimal: + """ + Applicable when storing decimals that are sent over the wire as strings + type = "string" + format = "number" + """ + return decimal.Decimal(arg) + +@functools.lru_cache() +def as_uuid(arg: str) -> uuid.UUID: + """ + type = "string" + format = "uuid" + """ + return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py new file mode 100644 index 00000000000..3897e140a4a --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py @@ -0,0 +1,97 @@ +""" +MIT License + +Copyright (c) 2020 Corentin Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +from __future__ import annotations +import typing +import typing_extensions + +_K = typing.TypeVar("_K") +_V = typing.TypeVar("_V", covariant=True) + + +class immutabledict(typing.Mapping[_K, _V]): + """ + An immutable wrapper around dictionaries that implements + the complete :py:class:`collections.Mapping` interface. + It can be used as a drop-in replacement for dictionaries + where immutability is desired. + + Note: custom version of this class made to remove __init__ + """ + + dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict + _dict: typing.Dict[_K, _V] + _hash: typing.Optional[int] + + @classmethod + def fromkeys( + cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None + ) -> "immutabledict[_K, _V]": + return cls(dict.fromkeys(seq, value)) + + def __new__(cls, *args: typing.Any) -> typing_extensions.Self: + inst = super().__new__(cls) + setattr(inst, '_dict', cls.dict_cls(*args)) + setattr(inst, '_hash', None) + return inst + + def __getitem__(self, key: _K) -> _V: + return self._dict[key] + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def __iter__(self) -> typing.Iterator[_K]: + return iter(self._dict) + + def __len__(self) -> int: + return len(self._dict) + + def __repr__(self) -> str: + return "%s(%r)" % (self.__class__.__name__, self._dict) + + def __hash__(self) -> int: + if self._hash is None: + h = 0 + for key, value in self.items(): + h ^= hash((key, value)) + self._hash = h + + return self._hash + + def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(self) + new.update(other) + return self.__class__(new) + + def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(other) + new.update(self) + return new + + def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: + raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py new file mode 100644 index 00000000000..e593c90b1d7 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py @@ -0,0 +1,729 @@ +from __future__ import annotations +import datetime +import dataclasses +import io +import types +import typing +import uuid + +import functools +import typing_extensions + +from this_package import exceptions +from this_package.configurations import schema_configuration + +from . import validation + +_T_co = typing.TypeVar("_T_co", covariant=True) + + +class SequenceNotStr(typing.Protocol[_T_co]): + """ + if a Protocol would define the interface of Sequence, this protocol + would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence + methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection + """ + def __contains__(self, value: object, /) -> bool: + raise NotImplementedError + + def __getitem__(self, index, /): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __iter__(self) -> typing.Iterator[_T_co]: + raise NotImplementedError + + def __reversed__(self, /) -> typing.Iterator[_T_co]: + raise NotImplementedError + +none_type_ = type(None) +T = typing.TypeVar('T', bound=typing.Mapping) +U = typing.TypeVar('U', bound=SequenceNotStr) +W = typing.TypeVar('W') + + +class SchemaTyped: + additional_properties: typing.Type[Schema] + all_of: typing.Tuple[typing.Type[Schema], ...] + any_of: typing.Tuple[typing.Type[Schema], ...] + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] + default: typing.Union[str, int, float, bool, None] + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] + exclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + format: str + inclusive_maximum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + items: typing.Type[Schema] + max_items: int + max_length: int + max_properties: int + min_items: int + min_length: int + min_properties: int + multiple_of: typing.Union[int, float] + not_: typing.Type[Schema] + one_of: typing.Tuple[typing.Type[Schema], ...] + pattern: validation.PatternInfo + properties: typing.Mapping[str, typing.Type[Schema]] + required: typing.FrozenSet[str] + types: typing.FrozenSet[typing.Type] + unique_items: bool + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') + arg.close() + inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore + super(FileIO, inst).__init__(arg.name) + return inst + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') + + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + """ + Needed for instantiation when passing in arguments of the above type + """ + pass + + +class classproperty(typing.Generic[W]): + def __init__(self, method: typing.Callable[..., W]): + self.__method = method + functools.update_wrapper(self, method) # type: ignore + + def __get__(self, obj, cls=None) -> W: + if cls is None: + cls = type(obj) + return self.__method(cls) + + +class Bool: + _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} + """ + This class is needed to replace bool during validation processing + json schema requires that 0 != False and 1 != True + python implementation defines 0 == False and 1 == True + To meet the json schema requirements, all bool instances are replaced with Bool singletons + during validation only, and then bool values are returned from validation + """ + + def __new__(cls, arg_: bool, **kwargs): + """ + Method that implements singleton + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, arg_) + if key not in cls._instances: + inst = super().__new__(cls) + cls._instances[key] = inst + return cls._instances[key] + + def __repr__(self): + if bool(self): + return f'' + return f'' + + @classproperty + def TRUE(cls): + return cls(True) # type: ignore + + @classproperty + def FALSE(cls): + return cls(False) # type: ignore + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +def cast_to_allowed_types( + arg: typing.Union[ + dict, + validation.immutabledict, + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + ], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] +) -> typing.Union[ + validation.immutabledict, + tuple, + float, + int, + str, + bytes, + Bool, + None, + FileIO +]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + path_to_type[path_to_item] = str + return str(arg) + elif isinstance(arg, (dict, validation.immutabledict)): + path_to_type[path_to_item] = validation.immutabledict + return validation.immutabledict( + { + key: cast_to_allowed_types( + val, + from_server, + validated_path_to_schemas, + path_to_item + (key,), + path_to_type, + ) + for key, val in arg.items() + } + ) + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + path_to_type[path_to_item] = Bool + if arg: + return Bool.TRUE + return Bool.FALSE + elif isinstance(arg, int): + path_to_type[path_to_item] = int + return arg + elif isinstance(arg, float): + path_to_type[path_to_item] = float + return arg + elif isinstance(arg, (tuple, list)): + path_to_type[path_to_item] = tuple + return tuple( + [ + cast_to_allowed_types( + item, + from_server, + validated_path_to_schemas, + path_to_item + (i,), + path_to_type, + ) + for i, item in enumerate(arg) + ] + ) + elif arg is None: + path_to_type[path_to_item] = type(None) + return None + elif isinstance(arg, (datetime.date, datetime.datetime)): + path_to_type[path_to_item] = str + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + path_to_type[path_to_item] = str + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, bytes): + path_to_type[path_to_item] = bytes + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + path_to_type[path_to_item] = FileIO + return FileIO(arg) + raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class SingletonMeta(type): + """ + A singleton class for schemas + Schemas are frozen classes that are never instantiated with init args + All args come from defaults + """ + _instances: typing.Dict[type, typing.Any] = {} + + def __call__(cls, *args, **kwargs): + if cls not in cls._instances: + cls._instances[cls] = super().__call__(*args, **kwargs) + return cls._instances[cls] + + +class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): + + @classmethod + def __get_path_to_schemas( + cls, + arg, + validation_metadata: validation.ValidationMetadata, + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: + """ + Run all validations in the json schema and return a dict of + json schema to tuple of validated schemas + """ + _path_to_schemas: validation.PathToSchemasType = {} + if validation_metadata.validation_ran_earlier(cls): + validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) + validation.update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} + for path, schema_classes in _path_to_schemas.items(): + schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) + path_to_schemas[path] = schema + """ + For locations that validation did not check + the code still needs to store type + schema information for instantiation + All of those schemas will be UnsetAnyTypeSchema + """ + missing_paths = path_to_type.keys() - path_to_schemas.keys() + for missing_path in missing_paths: + path_to_schemas[missing_path] = UnsetAnyTypeSchema + + return path_to_schemas + + @staticmethod + def __get_items( + arg: tuple, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + ''' + Schema __get_items + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return tuple(cast_items) + + @staticmethod + def __get_properties( + arg: validation.immutabledict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + """ + Schema __get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return validation.immutabledict(dict_items) + + @classmethod + def _get_new_instance_without_conversion( + cls, + arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + # We have a Dynamic class and we are making an instance of it + if isinstance(arg, validation.immutabledict): + used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) + elif isinstance(arg, tuple): + used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) + elif isinstance(arg, Bool): + return bool(arg) + else: + """ + str, int, float, FileIO, bytes + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return arg + arg_type = type(arg) + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is None: + return used_arg + if arg_type not in type_to_output_cls: + return used_arg + output_cls = type_to_output_cls[arg_type] + if arg_type is tuple: + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(U, inst) + return inst + assert issubclass(output_cls, validation.immutabledict) + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(T, inst) + return inst + + @typing.overload + @classmethod + def validate_base( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate_base( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + """ + Schema validate_base + + Args: + arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + like minItems, minLength etc + """ + if isinstance(arg, (tuple, validation.immutabledict)): + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is not None: + for output_cls in type_to_output_cls.values(): + if isinstance(arg, output_cls): + # U + T use case, don't run validations twice + return arg + + from_server = False + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] + ] = {} + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} + cast_arg = cast_to_allowed_types( + arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) + validation_metadata = validation.ValidationMetadata( + path_to_item=('args[0]',), + configuration=configuration or schema_configuration.SchemaConfiguration(), + validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) + ) + path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) + return cls._get_new_instance_without_conversion( + cast_arg, + validation_metadata.path_to_item, + path_to_schemas, + ) + + @classmethod + def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: + type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) + type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) + return type_to_output_cls + + +def get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[Schema]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + return item_cls._evaluate(None, local_namespace) + raise ValueError('invalid class value passed in') + + +@dataclasses.dataclass(frozen=True) +class AnyTypeSchema(Schema[T, U]): + # Python representation of a schema defined as true or {} + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return cls.validate_base( + arg, + configuration=configuration + ) + +class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + +INPUT_TYPES_ALL = typing.Union[ + dict, + validation.immutabledict, + typing.Mapping[str, object], # for TypedDict + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + FileIO +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py new file mode 100644 index 00000000000..df48b61b43d --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import datetime +import dataclasses +import io +import typing +import uuid + +import typing_extensions + +from this_package.configurations import schema_configuration + +from . import schema, validation + + +@dataclasses.dataclass(frozen=True) +class ListSchema(schema.Schema[validation.immutabledict, tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schema.INPUT_TYPES_ALL], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Tuple[schema.INPUT_TYPES_ALL, ...], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NoneSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) + + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NumberSchema(schema.Schema): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + types: typing.FrozenSet[typing.Type] = frozenset({float, int}) + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class IntSchema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int' + + +@dataclasses.dataclass(frozen=True) +class Int32Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int32' + + +@dataclasses.dataclass(frozen=True) +class Int64Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int64' + + +@dataclasses.dataclass(frozen=True) +class Float32Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'float' + + +@dataclasses.dataclass(frozen=True) +class Float64Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'double' + + +@dataclasses.dataclass(frozen=True) +class StrSchema(schema.Schema): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + types: typing.FrozenSet[typing.Type] = frozenset({str}) + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class UUIDSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'uuid' + + @classmethod + def validate( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateTimeSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date-time' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DecimalSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'number' + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class BytesSchema(schema.Schema): + """ + this class will subclass bytes and is immutable + """ + types: typing.FrozenSet[typing.Type] = frozenset({bytes}) + + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class FileSchema(schema.Schema): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.FileIO: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BinarySchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) + format: str = 'binary' + + one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( + BytesSchema, + FileSchema, + ) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[schema.FileIO, bytes]: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BoolSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NotAnyTypeSchema(schema.AnyTypeSchema): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + not_: typing.Type[schema.Schema] = schema.AnyTypeSchema + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return super().validate_base(arg, configuration=configuration) + +OUTPUT_BASE_TYPES = typing.Union[ + validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], + str, + int, + float, + bool, + schema.none_type_, + typing.Tuple['OUTPUT_BASE_TYPES', ...], + bytes, + schema.FileIO +] + + +@dataclasses.dataclass(frozen=True) +class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) + + @typing.overload + @classmethod + def validate( + cls, + arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: + return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py new file mode 100644 index 00000000000..f0868711eba --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py @@ -0,0 +1,1537 @@ +# coding: utf-8 + +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import collections +import dataclasses +import decimal +import re +import sys +import types +import typing +import uuid + +import typing_extensions + +from this_package import exceptions +from this_package.configurations import schema_configuration + +from . import format, original_immutabledict + +immutabledict = original_immutabledict.immutabledict + + +@dataclasses.dataclass +class ValidationMetadata: + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + path_to_item: typing.Tuple[typing.Union[str, int], ...] + configuration: schema_configuration.SchemaConfiguration + validated_path_to_schemas: typing.Mapping[ + typing.Tuple[typing.Union[str, int], ...], + typing.Mapping[type, None] + ] = dataclasses.field(default_factory=dict) + seen_classes: typing.FrozenSet[type] = frozenset() + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) + if validated_schemas and cls in validated_schemas: + return True + if cls in self.seen_classes: + return True + return False + +def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise exceptions.ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class SchemaValidator: + __excluded_cls_properties = { + '__module__', + '__dict__', + '__weakref__', + '__doc__', + '__annotations__', + 'default', # excluded because it has no impact on validation + 'type_to_output_cls', # used to pluck the output class for instantiation + } + + @classmethod + def _validate( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> PathToSchemasType: + """ + SchemaValidator validate + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + """ + cls_schema = cls() + json_schema_data = { + k: v + for k, v in vars(cls_schema).items() + if k not in cls.__excluded_cls_properties + and k + not in validation_metadata.configuration.disabled_json_schema_python_keywords + } + kwargs = {} + if 'discriminator' in json_schema_data: + discriminated_cls, ensure_discriminator_value_present_exc = _get_discriminated_class_and_exception( + arg, + cls, + validation_metadata + ) + kwargs = { + 'discriminated_cls': discriminated_cls, + 'ensure_discriminator_value_present_exc': ensure_discriminator_value_present_exc + } + contains_path_to_schemas = [] + path_to_schemas: PathToSchemasType = {} + if 'contains' in vars(cls_schema): + contains_path_to_schemas = _get_contains_path_to_schemas( + arg, + vars(cls_schema)['contains'], + validation_metadata, + path_to_schemas + ) + if_path_to_schemas = None + if 'if_' in vars(cls_schema): + if_path_to_schemas = _get_if_path_to_schemas( + arg, + vars(cls_schema)['if_'], + validation_metadata, + ) + validated_pattern_properties: typing.Optional[PathToSchemasType] = None + if 'pattern_properties' in vars(cls_schema): + validated_pattern_properties = _get_validated_pattern_properties( + arg, + vars(cls_schema)['pattern_properties'], + cls, + validation_metadata + ) + prefix_items_length = 0 + if 'prefix_items' in vars(cls_schema): + prefix_items_length = len(vars(cls_schema)['prefix_items']) + for keyword, val in json_schema_data.items(): + used_val: typing.Any + if keyword in {'contains', 'min_contains', 'max_contains'}: + used_val = (val, contains_path_to_schemas) + elif keyword == 'items': + used_val = (val, prefix_items_length) + elif keyword in {'unevaluated_items', 'unevaluated_properties'}: + used_val = (val, path_to_schemas) + elif keyword in {'types'}: + format: typing.Optional[str] = vars(cls_schema).get('format', None) + used_val = (val, format) + elif keyword in {'pattern_properties', 'additional_properties'}: + used_val = (val, validated_pattern_properties) + elif keyword in {'if_', 'then', 'else_'}: + used_val = (val, if_path_to_schemas) + else: + used_val = val + validator = json_schema_keyword_to_validator[keyword] + + other_path_to_schemas = validator( + arg, + used_val, + cls, + validation_metadata, + **kwargs + ) + if other_path_to_schemas: + update(path_to_schemas, other_path_to_schemas) + + base_class = type(arg) + if validation_metadata.path_to_item not in path_to_schemas: + path_to_schemas[validation_metadata.path_to_item] = dict() + path_to_schemas[validation_metadata.path_to_item][base_class] = None + path_to_schemas[validation_metadata.path_to_item][cls] = None + return path_to_schemas + +PathToSchemasType = typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Dict[ + typing.Union[ + typing.Type[SchemaValidator], + typing.Type[str], + typing.Type[int], + typing.Type[float], + typing.Type[bool], + typing.Type[None], + typing.Type[immutabledict], + typing.Type[tuple] + ], + None + ] +] + +def _get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[SchemaValidator]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + if sys.version_info < (3, 9): + return item_cls._evaluate(None, local_namespace) + return item_cls._evaluate(None, local_namespace, set()) + raise ValueError('invalid class value passed in') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is collections.defaultdict(dict) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k].update(v) + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def __type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = __get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + +def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = __type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return exceptions.ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternInfo: + pattern: str + flags: typing.Optional[re.RegexFlag] = None + + +def validate_types( + arg: typing.Any, + allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + allowed_types = allowed_types_format[0] + if type(arg) not in allowed_types: + raise __get_type_error( + arg, + validation_metadata.path_to_item, + allowed_types, + key_type=False, + ) + if isinstance(arg, bool) or not isinstance(arg, (int, float)): + return None + format = allowed_types_format[1] + if format and format == 'int' and arg != int(arg): + # there is a json schema test where 1.0 validates as an integer + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + return None + + +def validate_enum( + arg: typing.Any, + enum_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if arg not in enum_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) + return None + + +def validate_unique_items( + arg: typing.Any, + unique_items_value: bool, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not unique_items_value or not isinstance(arg, tuple): + return None + if len(arg) == len(set(arg)): + return None + _raise_validation_error_message( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + +def validate_min_items( + arg: typing.Any, + min_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) < min_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=min_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_items( + arg: typing.Any, + max_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) > max_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=max_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_properties( + arg: typing.Any, + min_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) < min_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=min_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_properties( + arg: typing.Any, + max_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) > max_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=max_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_length( + arg: typing.Any, + min_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, str): + return None + if len(arg) < min_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=min_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_length( + arg: typing.Any, + max_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, str): + return None + if len(arg) > max_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=max_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_minimum( + arg: typing.Any, + inclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg < inclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_minimum( + arg: typing.Any, + exclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg <= exclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=exclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_maximum( + arg: typing.Any, + inclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg > inclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_maximum( + arg: typing.Any, + exclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg >= exclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than", + constraint_value=exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + +def validate_multiple_of( + arg: typing.Any, + multiple_of: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, (int, float)): + return None + if (not (float(arg) / multiple_of).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + _raise_validation_error_message( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_pattern( + arg: typing.Any, + pattern_info: PatternInfo, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, str): + return None + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item + ) + return None + + +__int32_inclusive_minimum = -2147483648 +__int32_inclusive_maximum = 2147483647 +__int64_inclusive_minimum = -9223372036854775808 +__int64_inclusive_maximum = 9223372036854775807 +__float_inclusive_minimum = -3.4028234663852886e+38 +__float_inclusive_maximum = 3.4028234663852886e+38 +__double_inclusive_minimum = -1.7976931348623157E+308 +__double_inclusive_maximum = 1.7976931348623157E+308 + +def __validate_numeric_format( + arg: typing.Union[int, float], + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value[:3] == 'int': + # there is a json schema test where 1.0 validates as an integer + if arg != int(arg): + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + if format_value == 'int32': + if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + elif format_value == 'int64': + if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + elif format_value in {'float', 'double'}: + if format_value == 'float': + if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + return None + # double + if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + + +def __validate_string_format( + arg: str, + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value == 'uuid': + try: + uuid.UUID(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'number': + try: + decimal.Decimal(arg) + return None + except decimal.InvalidOperation: + raise exceptions.ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date': + try: + format.DEFAULT_ISOPARSER.parse_isodate_str(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date-time': + try: + format.DEFAULT_ISOPARSER.parse_isodatetime(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + return None + + +def validate_format( + arg: typing.Union[str, int, float], + format_value: str, + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + # formats work for strings + numbers + if isinstance(arg, (int, float)): + return __validate_numeric_format( + arg, + format_value, + validation_metadata + ) + elif isinstance(arg, str): + return __validate_string_format( + arg, + format_value, + validation_metadata + ) + return None + + +def validate_required( + arg: typing.Any, + required: typing.Set[str], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, immutabledict): + return None + missing_req_args = required - arg.keys() + if missing_req_args: + missing_required_arguments = list(missing_req_args) + missing_required_arguments.sort() + raise exceptions.ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + return None + + +def validate_items( + arg: typing.Any, + item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + item_cls = _get_class(item_cls_prefix_items_length[0]) + prefix_items_length = item_cls_prefix_items_length[1] + path_to_schemas: PathToSchemasType = {} + for i in range(prefix_items_length, len(arg)): + value = arg[i] + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_properties( + arg: typing.Any, + properties: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + present_properties = {k: v for k, v, in arg.items() if k in properties} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, value in present_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + schema = properties[property_name] + schema = _get_class(schema, module_namespace) + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_additional_properties( + arg: typing.Any, + additional_properties_cls_val_pprops: typing.Tuple[ + typing.Type[SchemaValidator], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + schema = _get_class(additional_properties_cls_val_pprops[0]) + path_to_schemas: PathToSchemasType = {} + cls_schema = cls() + properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} + present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} + validated_pattern_properties = additional_properties_cls_val_pprops[1] + for property_name, value in present_additional_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if validated_pattern_properties and path_to_item in validated_pattern_properties: + continue + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_one_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, + discriminated_cls: typing.Optional[SchemaValidator], + **kwargs +) -> PathToSchemasType: + oneof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(schema) + continue + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + oneof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + oneof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate oneof_classes + continue + oneof_classes.append(schema) + if not oneof_classes: + if discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + raise exceptions.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 discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + raise exceptions.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 + + +def validate_any_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, + discriminated_cls: typing.Optional[SchemaValidator], + **kwargs +) -> PathToSchemasType: + anyof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + module_namespace = vars(sys.modules[cls.__module__]) + for schema in classes: + schema = _get_class(schema, module_namespace) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + anyof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + anyof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate anyof_classes + continue + anyof_classes.append(schema) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + if discriminated_cls: + """ + return without exception because code was generated with + nonCompliantUseDiscriminatorIfCompositionFails=true + """ + return {} + raise exceptions.ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + +def validate_all_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> PathToSchemasType: + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + continue + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_not( + arg: typing.Any, + not_cls: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + not_schema = _get_class(not_cls) + other_path_to_schemas = None + not_exception = exceptions.ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_schema.__name__, + ) + ) + if validation_metadata.validation_ran_earlier(not_schema): + raise not_exception + + try: + other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + return None + + +def __ensure_discriminator_value_present( + disc_property_name: str, + validation_metadata: ValidationMetadata, + arg +): + if disc_property_name not in arg: + # The input data does not contain the discriminator property + raise exceptions.ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + +def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + cls_schema = cls() + if not hasattr(cls_schema, 'discriminator'): + return None + disc = cls_schema.discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not ( + hasattr(cls_schema, 'all_of') or + hasattr(cls_schema, 'one_of') or + hasattr(cls_schema, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls_schema, 'all_of'): + for allof_cls in cls_schema.all_of: + discriminated_cls = __get_discriminated_class( + allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'one_of'): + for oneof_cls in cls_schema.one_of: + discriminated_cls = __get_discriminated_class( + oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'any_of'): + for anyof_cls in cls_schema.any_of: + discriminated_cls = __get_discriminated_class( + anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + +def _get_discriminated_class_and_exception( + arg: typing.Any, + cls: typing.Type, + validation_metadata: ValidationMetadata +) -> typing.Tuple[typing.Optional[SchemaValidator], typing.Optional[Exception]]: + if not isinstance(arg, immutabledict): + return None, None + cls_schema = cls() + discriminator = cls_schema.discriminator + disc_prop_name = list(discriminator.keys())[0] + try: + __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) + except exceptions.ApiValueError as ex: + return None, ex + return ( + __get_discriminated_class( + cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ), + None + ) + + +def validate_discriminator( + arg: typing.Any, + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + discriminated_cls: typing.Optional[SchemaValidator], + ensure_discriminator_value_present_exc: typing.Optional[Exception], +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + disc_prop_name = list(discriminator.keys())[0] + if ensure_discriminator_value_present_exc: + raise ensure_discriminator_value_present_exc + if discriminated_cls is None: + raise exceptions.ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls is cls: + """ + Optimistically assume that cls will pass validation + If the code invoked _validate on cls it would infinitely recurse + """ + return None + if validation_metadata.validation_ran_earlier(discriminated_cls): + path_to_schemas: PathToSchemasType = {} + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + return path_to_schemas + updated_vm = ValidationMetadata( + path_to_item=validation_metadata.path_to_item, + configuration=validation_metadata.configuration, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + return discriminated_cls._validate(arg, validation_metadata=updated_vm) + + +def _get_if_path_to_schemas( + arg: typing.Any, + if_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + if_cls = _get_class(if_cls) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = if_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, other_path_to_schemas) + except exceptions.OpenApiException: + pass + return these_path_to_schemas + + +def validate_if( + arg: typing.Any, + if_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = if_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + + if true, then true -> true for whole schema + so validate_then will add if_path_to_schemas data to path_to_schemas + """ + return None + + +def validate_then( + arg: typing.Any, + then_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = then_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + """ + if not if_path_to_schemas: + return None + then_cls = _get_class(then_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = then_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # then False case + raise ex + + +def validate_else( + arg: typing.Any, + else_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = else_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + if if_path_to_schemas: + # skip validation if if_path_to_schemas was true + return None + """ + if is false use case + if_path_to_schemas == {} + """ + else_cls = _get_class(else_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = else_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # else False case + raise ex + + +def _get_contains_path_to_schemas( + arg: typing.Any, + contains_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, + path_to_schemas: PathToSchemasType +) -> typing.List[PathToSchemasType]: + if not isinstance(arg, tuple): + return [] + contains_cls = _get_class(contains_cls) + contains_path_to_schemas = [] + for i, value in enumerate(arg): + these_path_to_schemas: PathToSchemasType = {} + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(contains_cls): + add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) + contains_path_to_schemas.append(these_path_to_schemas) + continue + try: + other_path_to_schemas = contains_cls._validate( + value, validation_metadata=item_validation_metadata) + contains_path_to_schemas.append(other_path_to_schemas) + except exceptions.OpenApiException: + pass + return contains_path_to_schemas + + +def validate_contains( + arg: typing.Any, + contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + many_path_to_schemas = contains_cls_path_to_schemas[1] + if not many_path_to_schemas: + raise exceptions.ApiValueError( + "Validation failed for contains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + these_path_to_schemas: PathToSchemasType = {} + for other_path_to_schema in many_path_to_schemas: + update(these_path_to_schemas, other_path_to_schema) + return these_path_to_schemas + + +def validate_min_contains( + arg: typing.Any, + min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + min_contains = min_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) < min_contains: + raise exceptions.ApiValueError( + "Validation failed for minContains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_max_contains( + arg: typing.Any, + max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + max_contains = max_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) > max_contains: + raise exceptions.ApiValueError( + "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " + "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_const( + arg: typing.Any, + const_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if arg not in const_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) + return None + + +def validate_dependent_required( + arg: typing.Any, + dependent_required: typing.Mapping[str, typing.Set[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, immutabledict): + return None + for key, keys_that_must_exist in dependent_required.items(): + if key not in arg: + continue + missing_keys = keys_that_must_exist - arg.keys() + if missing_keys: + raise exceptions.ApiValueError( + f"Validation failed for dependentRequired because these_keys={missing_keys} are " + f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" + ) + return None + + +def validate_dependent_schemas( + arg: typing.Any, + dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for key, schema in dependent_schemas.items(): + if key not in arg: + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_property_names( + arg: typing.Any, + property_names_schema: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> None: + if not isinstance(arg, immutabledict): + return None + module_namespace = vars(sys.modules[cls.__module__]) + property_names_schema = _get_class(property_names_schema, module_namespace) + for key in arg.keys(): + path_to_item = validation_metadata.path_to_item + (key,) + key_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + property_names_schema._validate(key, validation_metadata=key_validation_metadata) + return None + + +def _get_validated_pattern_properties( + arg: typing.Any, + pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, property_value in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + for pattern_info, schema in pattern_properties.items(): + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, property_name, flags=flags): + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_pattern_properties( + arg: typing.Any, + pattern_properties_validation_results: typing.Tuple[ + typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + validation_results = pattern_properties_validation_results[1] + return validation_results + + +def validate_prefix_items( + arg: typing.Any, + prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for i, val in enumerate(arg): + if i >= len(prefix_items): + break + schema = _get_class(prefix_items[i], module_namespace) + path_to_item = validation_metadata.path_to_item + (i,) + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_items( + arg: typing.Any, + unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] + for i, val in enumerate(arg): + path_to_item = validation_metadata.path_to_item + (i,) + if path_to_item in validated_path_to_schemas: + continue + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_properties( + arg: typing.Any, + unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, + **kwargs +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] + for property_name, val in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if path_to_item in validated_path_to_schemas: + continue + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] +json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { + 'types': validate_types, + 'enum_value_to_name': validate_enum, + 'unique_items': validate_unique_items, + 'min_items': validate_min_items, + 'max_items': validate_max_items, + 'min_properties': validate_min_properties, + 'max_properties': validate_max_properties, + 'min_length': validate_min_length, + 'max_length': validate_max_length, + 'inclusive_minimum': validate_inclusive_minimum, + 'exclusive_minimum': validate_exclusive_minimum, + 'inclusive_maximum': validate_inclusive_maximum, + 'exclusive_maximum': validate_exclusive_maximum, + 'multiple_of': validate_multiple_of, + 'pattern': validate_pattern, + 'format': validate_format, + 'required': validate_required, + 'items': validate_items, + 'properties': validate_properties, + 'additional_properties': validate_additional_properties, + 'one_of': validate_one_of, + 'any_of': validate_any_of, + 'all_of': validate_all_of, + 'not_': validate_not, + 'discriminator': validate_discriminator, + 'contains': validate_contains, + 'min_contains': validate_min_contains, + 'max_contains': validate_max_contains, + 'const_value_to_name': validate_const, + 'dependent_required': validate_dependent_required, + 'dependent_schemas': validate_dependent_schemas, + 'property_names': validate_property_names, + 'pattern_properties': validate_pattern_properties, + 'prefix_items': validate_prefix_items, + 'unevaluated_items': validate_unevaluated_items, + 'unevaluated_properties': validate_unevaluated_properties, + 'if_': validate_if, + 'then': validate_then, + 'else_': validate_else +} \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py new file mode 100644 index 00000000000..15b1c7d2af9 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py @@ -0,0 +1,227 @@ +# coding: utf-8 +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import abc +import base64 +import dataclasses +import enum +import typing +import typing_extensions + +from urllib3 import _collections + + +class SecuritySchemeType(enum.Enum): + API_KEY = 'apiKey' + HTTP = 'http' + MUTUAL_TLS = 'mutualTLS' + OAUTH_2 = 'oauth2' + OPENID_CONNECT = 'openIdConnect' + + +class ApiKeyInLocation(enum.Enum): + QUERY = 'query' + HEADER = 'header' + COOKIE = 'cookie' + + +class __SecuritySchemeBase(metaclass=abc.ABCMeta): + @abc.abstractmethod + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + pass + + +@dataclasses.dataclass +class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): + api_key: str # this must be set by the developer + name: str = '' + in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY + type: SecuritySchemeType = SecuritySchemeType.API_KEY + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + if self.in_location is ApiKeyInLocation.COOKIE: + headers.add('Cookie', self.api_key) + elif self.in_location is ApiKeyInLocation.HEADER: + headers.add(self.name, self.api_key) + elif self.in_location is ApiKeyInLocation.QUERY: + # todo add query handling + raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") + return + + +class HTTPSchemeType(enum.Enum): + BASIC = 'basic' + BEARER = 'bearer' + DIGEST = 'digest' + SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + + +@dataclasses.dataclass +class HTTPBasicSecurityScheme(__SecuritySchemeBase): + user_id: str # user name + password: str + scheme: HTTPSchemeType = HTTPSchemeType.BASIC + encoding: str = 'utf-8' + type: SecuritySchemeType = SecuritySchemeType.HTTP + """ + https://www.rfc-editor.org/rfc/rfc7617.html + """ + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + user_pass = f"{self.user_id}:{self.password}" + b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) + headers.add('Authorization', f"Basic {b64_user_pass.decode()}") + + +@dataclasses.dataclass +class HTTPBearerSecurityScheme(__SecuritySchemeBase): + access_token: str + bearer_format: typing.Optional[str] = None + scheme: HTTPSchemeType = HTTPSchemeType.BEARER + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + headers.add('Authorization', f"Bearer {self.access_token}") + + +@dataclasses.dataclass +class HTTPDigestSecurityScheme(__SecuritySchemeBase): + scheme: HTTPSchemeType = HTTPSchemeType.DIGEST + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class MutualTLSSecurityScheme(__SecuritySchemeBase): + type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class ImplicitOAuthFlow: + authorization_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class TokenUrlOauthFlow: + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class AuthorizationCodeOauthFlow: + authorization_url: str + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class OAuthFlows: + implicit: typing.Optional[ImplicitOAuthFlow] = None + password: typing.Optional[TokenUrlOauthFlow] = None + client_credentials: typing.Optional[TokenUrlOauthFlow] = None + authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None + + +class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): + flows: OAuthFlows + type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OAuth2SecurityScheme not yet implemented") + + +class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): + openid_connect_url: str + type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") + +""" +Key is the Security scheme class +Value is the list of scopes +""" +SecurityRequirementObject = typing.TypedDict( + 'SecurityRequirementObject', + { + }, + total=False +) \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py new file mode 100644 index 00000000000..8e8a8052f43 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py @@ -0,0 +1,34 @@ +# coding: utf-8 +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import dataclasses +import typing + +from this_package.schemas import validation, schema + + +@dataclasses.dataclass +class ServerWithoutVariables(abc.ABC): + url: str + + +@dataclasses.dataclass +class ServerWithVariables(abc.ABC): + _url: str + variables: validation.immutabledict[str, str] + variables_schema: typing.Type[schema.Schema] + url: str = dataclasses.field(init=False) + + def __post_init__(self): + url = self._url + assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) + for (key, value) in self.variables.items(): + url = url.replace("{" + key + "}", value) + self.url = url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py new file mode 100644 index 00000000000..752d9cc7c2b --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + discriminator-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "http://localhost:3000" diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py new file mode 100644 index 00000000000..8358a4052d4 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py @@ -0,0 +1,15 @@ +import decimal +import io +import typing +import typing_extensions + +from this_package import api_client, schemas + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'api_client', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py new file mode 100644 index 00000000000..9abf48185ca --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py @@ -0,0 +1,18 @@ +import datetime +import decimal +import io +import typing +import typing_extensions +import uuid + +from this_package import schemas, api_response + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py new file mode 100644 index 00000000000..0526a2a1c52 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py @@ -0,0 +1,25 @@ +import dataclasses +import datetime +import decimal +import io +import typing +import uuid + +import typing_extensions +import urllib3 + +from this_package import api_client, schemas, api_response + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'typing', + 'uuid', + 'typing_extensions', + 'urllib3', + 'api_client', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py new file mode 100644 index 00000000000..01b3da50dc5 --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py @@ -0,0 +1,28 @@ +import dataclasses +import datetime +import decimal +import io +import numbers +import re +import typing +import typing_extensions +import uuid + +from this_package import schemas +from this_package.configurations import schema_configuration + +U = typing.TypeVar('U') + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'numbers', + 're', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'schema_configuration' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py new file mode 100644 index 00000000000..8bc2580eaec --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py @@ -0,0 +1,12 @@ +import dataclasses +import typing +import typing_extensions + +from this_package import security_schemes + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'security_schemes' +] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py new file mode 100644 index 00000000000..5a77ec9124f --- /dev/null +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py @@ -0,0 +1,13 @@ +import dataclasses +import typing +import typing_extensions + +from this_package import server, schemas + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'server', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/.openapi-generator/FILES b/samples/client/openapi_features/security/python/.openapi-generator/FILES index 3e196248266..b99a6594298 100644 --- a/samples/client/openapi_features/security/python/.openapi-generator/FILES +++ b/samples/client/openapi_features/security/python/.openapi-generator/FILES @@ -16,78 +16,78 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/this_package/__init__.py -src/this_package/api_client.py -src/this_package/api_response.py -src/this_package/apis/__init__.py -src/this_package/apis/path_to_api.py -src/this_package/apis/paths/__init__.py -src/this_package/apis/paths/path_with_no_explicit_security.py -src/this_package/apis/paths/path_with_one_explicit_security.py -src/this_package/apis/paths/path_with_security_from_root.py -src/this_package/apis/paths/path_with_two_explicit_security.py -src/this_package/apis/tag_to_api.py -src/this_package/apis/tags/__init__.py -src/this_package/apis/tags/default_api.py -src/this_package/components/schemas/__init__.py -src/this_package/components/security_schemes/__init__.py -src/this_package/components/security_schemes/security_scheme_api_key.py -src/this_package/components/security_schemes/security_scheme_bearer_test.py -src/this_package/components/security_schemes/security_scheme_http_basic_test.py -src/this_package/configurations/__init__.py -src/this_package/configurations/api_configuration.py -src/this_package/configurations/schema_configuration.py -src/this_package/exceptions.py -src/this_package/paths/__init__.py -src/this_package/paths/path_with_no_explicit_security/__init__.py -src/this_package/paths/path_with_no_explicit_security/get/__init__.py -src/this_package/paths/path_with_no_explicit_security/get/operation.py -src/this_package/paths/path_with_no_explicit_security/get/responses/__init__.py -src/this_package/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py -src/this_package/paths/path_with_one_explicit_security/__init__.py -src/this_package/paths/path_with_one_explicit_security/get/__init__.py -src/this_package/paths/path_with_one_explicit_security/get/operation.py -src/this_package/paths/path_with_one_explicit_security/get/responses/__init__.py -src/this_package/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py -src/this_package/paths/path_with_one_explicit_security/get/security/__init__.py -src/this_package/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py -src/this_package/paths/path_with_security_from_root/__init__.py -src/this_package/paths/path_with_security_from_root/get/__init__.py -src/this_package/paths/path_with_security_from_root/get/operation.py -src/this_package/paths/path_with_security_from_root/get/responses/__init__.py -src/this_package/paths/path_with_security_from_root/get/responses/response_200/__init__.py -src/this_package/paths/path_with_two_explicit_security/__init__.py -src/this_package/paths/path_with_two_explicit_security/get/__init__.py -src/this_package/paths/path_with_two_explicit_security/get/operation.py -src/this_package/paths/path_with_two_explicit_security/get/responses/__init__.py -src/this_package/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py -src/this_package/paths/path_with_two_explicit_security/get/security/__init__.py -src/this_package/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py -src/this_package/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py -src/this_package/py.typed -src/this_package/rest.py -src/this_package/schemas/__init__.py -src/this_package/schemas/format.py -src/this_package/schemas/original_immutabledict.py -src/this_package/schemas/schema.py -src/this_package/schemas/schemas.py -src/this_package/schemas/validation.py -src/this_package/security/__init__.py -src/this_package/security/security_requirement_object_0.py -src/this_package/security/security_requirement_object_1.py -src/this_package/security/security_requirement_object_2.py -src/this_package/security/security_requirement_object_3.py -src/this_package/security_schemes.py -src/this_package/server.py -src/this_package/servers/__init__.py -src/this_package/servers/server_0.py -src/this_package/shared_imports/__init__.py -src/this_package/shared_imports/header_imports.py -src/this_package/shared_imports/operation_imports.py -src/this_package/shared_imports/response_imports.py -src/this_package/shared_imports/schema_imports.py -src/this_package/shared_imports/security_scheme_imports.py -src/this_package/shared_imports/server_imports.py +src/openapi_client/__init__.py +src/openapi_client/api_client.py +src/openapi_client/api_response.py +src/openapi_client/apis/__init__.py +src/openapi_client/apis/path_to_api.py +src/openapi_client/apis/paths/__init__.py +src/openapi_client/apis/paths/path_with_no_explicit_security.py +src/openapi_client/apis/paths/path_with_one_explicit_security.py +src/openapi_client/apis/paths/path_with_security_from_root.py +src/openapi_client/apis/paths/path_with_two_explicit_security.py +src/openapi_client/apis/tag_to_api.py +src/openapi_client/apis/tags/__init__.py +src/openapi_client/apis/tags/default_api.py +src/openapi_client/components/schemas/__init__.py +src/openapi_client/components/security_schemes/__init__.py +src/openapi_client/components/security_schemes/security_scheme_api_key.py +src/openapi_client/components/security_schemes/security_scheme_bearer_test.py +src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py +src/openapi_client/configurations/__init__.py +src/openapi_client/configurations/api_configuration.py +src/openapi_client/configurations/schema_configuration.py +src/openapi_client/exceptions.py +src/openapi_client/paths/__init__.py +src/openapi_client/paths/path_with_no_explicit_security/__init__.py +src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py +src/openapi_client/paths/path_with_no_explicit_security/get/operation.py +src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py +src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/get/operation.py +src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py +src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py +src/openapi_client/paths/path_with_security_from_root/__init__.py +src/openapi_client/paths/path_with_security_from_root/get/__init__.py +src/openapi_client/paths/path_with_security_from_root/get/operation.py +src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py +src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/get/operation.py +src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py +src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py +src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py +src/openapi_client/py.typed +src/openapi_client/rest.py +src/openapi_client/schemas/__init__.py +src/openapi_client/schemas/format.py +src/openapi_client/schemas/original_immutabledict.py +src/openapi_client/schemas/schema.py +src/openapi_client/schemas/schemas.py +src/openapi_client/schemas/validation.py +src/openapi_client/security/__init__.py +src/openapi_client/security/security_requirement_object_0.py +src/openapi_client/security/security_requirement_object_1.py +src/openapi_client/security/security_requirement_object_2.py +src/openapi_client/security/security_requirement_object_3.py +src/openapi_client/security_schemes.py +src/openapi_client/server.py +src/openapi_client/servers/__init__.py +src/openapi_client/servers/server_0.py +src/openapi_client/shared_imports/__init__.py +src/openapi_client/shared_imports/header_imports.py +src/openapi_client/shared_imports/operation_imports.py +src/openapi_client/shared_imports/response_imports.py +src/openapi_client/shared_imports/schema_imports.py +src/openapi_client/shared_imports/security_scheme_imports.py +src/openapi_client/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/openapi_features/security/python/README.md b/samples/client/openapi_features/security/python/README.md index 78c0f8f6ce1..fc7d98cfb00 100644 --- a/samples/client/openapi_features/security/python/README.md +++ b/samples/client/openapi_features/security/python/README.md @@ -1,4 +1,4 @@ -# this-package +# openapi-client No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md b/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md index 69b36c71e96..2b2dc9a3732 100644 --- a/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md +++ b/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -this_package.apis.tags.default_api +openapi_client.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md index b8f6bac1672..e5feae7c833 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md @@ -1,4 +1,4 @@ -this_package.components.security_schemes.security_scheme_api_key +openapi_client.components.security_schemes.security_scheme_api_key # SecurityScheme ApiKey ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md index 2897c986598..c21e0b7558e 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md @@ -1,4 +1,4 @@ -this_package.components.security_schemes.security_scheme_bearer_test +openapi_client.components.security_schemes.security_scheme_bearer_test # SecurityScheme BearerTest ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md index ceb34bb0f00..13f7e6f62ff 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md @@ -1,4 +1,4 @@ -this_package.components.security_schemes.security_scheme_http_basic_test +openapi_client.components.security_schemes.security_scheme_http_basic_test # SecurityScheme HttpBasicTest ## Description diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md index 63d1b549db8..d33ff294441 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md @@ -1,4 +1,4 @@ -this_package.paths.path_with_no_explicit_security.operation +openapi_client.paths.path_with_no_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -64,14 +64,14 @@ server_index | Class | Description ## Code Sample ```python -import this_package -from this_package.configurations import api_configuration -from this_package.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with this_package.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -80,7 +80,7 @@ with this_package.ApiClient(used_configuration) as api_client: # path with no explicit security api_response = api_instance.path_with_no_explicit_security() pprint(api_response) - except this_package.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->path_with_no_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md index c52ddcbb129..04ca7ddb3f5 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md @@ -1,4 +1,4 @@ -this_package.paths.path_with_one_explicit_security.operation +openapi_client.paths.path_with_one_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -80,12 +80,12 @@ server_index | Class | Description ## Code Sample ```python -import this_package -from this_package.configurations import api_configuration -from this_package.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint # security_index 0 -from this_package.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -98,7 +98,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with this_package.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -107,7 +107,7 @@ with this_package.ApiClient(used_configuration) as api_client: # path with one explicit security api_response = api_instance.path_with_one_explicit_security() pprint(api_response) - except this_package.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->path_with_one_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md index ef70a11f053..05cf1048b2c 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md @@ -1,4 +1,4 @@ -this_package.paths.path_with_security_from_root.operation +openapi_client.paths.path_with_security_from_root.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,17 +83,17 @@ server_index | Class | Description ## Code Sample ```python -import this_package -from this_package.configurations import api_configuration -from this_package.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint # security_index 0 -from this_package.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from this_package.components.security_schemes import security_scheme_http_basic_test +from openapi_client.components.security_schemes import security_scheme_http_basic_test # security_index 3 -from this_package.components.security_schemes import security_scheme_http_basic_test -from this_package.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_http_basic_test +from openapi_client.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -140,7 +140,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with this_package.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -149,7 +149,7 @@ with this_package.ApiClient(used_configuration) as api_client: # path with security from root api_response = api_instance.path_with_security_from_root() pprint(api_response) - except this_package.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->path_with_security_from_root: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md index 4690217ed7d..0d24f53f10b 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md @@ -1,4 +1,4 @@ -this_package.paths.path_with_two_explicit_security.operation +openapi_client.paths.path_with_two_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -81,14 +81,14 @@ server_index | Class | Description ## Code Sample ```python -import this_package -from this_package.configurations import api_configuration -from this_package.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint # security_index 0 -from this_package.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from this_package.components.security_schemes import security_scheme_bearer_test +from openapi_client.components.security_schemes import security_scheme_bearer_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -115,7 +115,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with this_package.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -124,7 +124,7 @@ with this_package.ApiClient(used_configuration) as api_client: # path with two explicit security api_response = api_instance.path_with_two_explicit_security() pprint(api_response) - except this_package.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->path_with_two_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/servers/server_0.md b/samples/client/openapi_features/security/python/docs/servers/server_0.md index a749b8eb2fd..9d20441dd7f 100644 --- a/samples/client/openapi_features/security/python/docs/servers/server_0.md +++ b/samples/client/openapi_features/security/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -this_package.servers.server_0 +openapi_client.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/openapi_features/security/python/pyproject.toml b/samples/client/openapi_features/security/python/pyproject.toml index f506911beb6..d9af369938c 100644 --- a/samples/client/openapi_features/security/python/pyproject.toml +++ b/samples/client/openapi_features/security/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "this_package" = ["py.typed"] [project] -name = "this-package" +name = "openapi-client" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/openapi_features/security/python/src/openapi_client/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/__init__.py new file mode 100644 index 00000000000..75f976d15f6 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/__init__.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +# flake8: noqa + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +__version__ = "1.0.0" + +# import ApiClient +from this_package.api_client import ApiClient + +# import Configuration +from this_package.configurations.api_configuration import ApiConfiguration + +# import exceptions +from this_package.exceptions import OpenApiException +from this_package.exceptions import ApiAttributeError +from this_package.exceptions import ApiTypeError +from this_package.exceptions import ApiValueError +from this_package.exceptions import ApiKeyError +from this_package.exceptions import ApiException diff --git a/samples/client/openapi_features/security/python/src/openapi_client/api_client.py b/samples/client/openapi_features/security/python/src/openapi_client/api_client.py new file mode 100644 index 00000000000..2397c06f5cf --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/api_client.py @@ -0,0 +1,1425 @@ +# coding: utf-8 +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import datetime +import dataclasses +import decimal +import enum +import email +import json +import os +import io +import atexit +from multiprocessing import pool +import re +import tempfile +import typing +import typing_extensions +from urllib import parse +import urllib3 +from urllib3 import _collections, fields + + +from this_package import exceptions, rest, schemas, security_schemes, api_response +from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj: typing.Any): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return obj + elif isinstance(obj, bool): + # must be before int check + return obj + elif isinstance(obj, int): + return obj + elif obj is None: + return None + elif isinstance(obj, (dict, schemas.immutabledict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +@dataclasses.dataclass +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + prefix: str + separator: str + first: bool = True + item_separator: str = dataclasses.field(init=False) + + def __post_init__(self): + self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return parse.quote(str(in_data)) + return str(in_data) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + @classmethod + def _serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + @classmethod + def _deserialize_simple( + cls, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +class Encoding: + content_type: str + headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None + style: typing.Optional[ParameterStyle] = None + explode: bool = False + allow_reserved: bool = False + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[schemas.Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +class ParameterBase(JSONDetector): + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[schemas.Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] + + _json_encoder = JSONEncoder() + + def __init_subclass__(cls, **kwargs): + if cls.explode is None: + if cls.style is ParameterStyle.FORM: + cls.explode = True + else: + cls.explode = False + + @classmethod + def _serialize_json( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=cls._json_encoder.compact_separators) + return json.dumps(in_data) + +_SERIALIZE_TYPES = typing.Union[ + int, + float, + str, + datetime.date, + datetime.datetime, + None, + bool, + list, + tuple, + dict, + schemas.immutabledict +] + +_JSON_TYPES = typing.Union[ + int, + float, + str, + None, + bool, + typing.Tuple['_JSON_TYPES', ...], + schemas.immutabledict[str, '_JSON_TYPES'], +] + +@dataclasses.dataclass +class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.PATH + style: ParameterStyle = ParameterStyle.SIMPLE + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_label( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_matrix( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = cls._serialize_simple( + in_data=in_data, + name=cls.name, + explode=cls.explode, + percent_encode=True + ) + return cls._to_dict(cls.name, value) + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if cls.style: + if cls.style is ParameterStyle.SIMPLE: + return cls.__serialize_simple(cast_in_data) + elif cls.style is ParameterStyle.LABEL: + return cls.__serialize_label(cast_in_data) + elif cls.style is ParameterStyle.MATRIX: + return cls.__serialize_matrix(cast_in_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class QueryParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.QUERY + style: ParameterStyle = ParameterStyle.FORM + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_space_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_pipe_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._serialize_form( + in_data, + name=cls.name, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: + if cls.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + raise ValueError(f'No iterator possible for style={cls.style}') + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if cls.style: + # TODO update query ones to omit setting values when [] {} or None is input + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + if cls.style is ParameterStyle.FORM: + return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) + return cls._to_dict( + cls.name, + next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) + ) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class CookieParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.FORM + in_type: ParameterInType = ParameterInType.COOKIE + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if cls.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + value = cls._serialize_form( + cast_in_data, + explode=explode, + name=cls.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return cls._to_dict(cls.name, value) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): + style: ParameterStyle = ParameterStyle.SIMPLE + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + explode: bool = False + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = _collections.HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + @classmethod + def serialize_with_name( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + value = cls._serialize_simple(cast_in_data, name, cls.explode, False) + return cls.__to_headers(((name, value),)) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls.__to_headers(((name, value),)) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + @classmethod + def deserialize( + cls, + in_data: str, + name: str + ): + if cls.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) + return cls.schema.validate_base(extracted_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + if cls._content_type_is_json(content_type): + cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) + assert media_type.schema is not None + return media_type.schema.validate_base(cast_in_data) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class HeaderParameterWithoutName(__HeaderParameterBase): + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + name, + skip_validation=skip_validation + ) + + +class HeaderParameter(__HeaderParameterBase): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + cls.name, + skip_validation=skip_validation + ) + +T = typing.TypeVar("T", bound=api_response.ApiResponse) + + +class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None + headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None + + @classmethod + @abc.abstractmethod + def get_response(cls, response, headers, body) -> T: ... + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = parse.urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + + @classmethod + def __deserialize_application_octet_stream( + cls, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or cls.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as write_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + write_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + @classmethod + def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: + content_type = response.headers.get('content-type') + deserialized_body = schemas.unset + streamed = response.supports_chunked_reads() + + deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset + if cls.headers is not None and cls.headers_schema is not None: + deserialized_headers = {} + for header_name, header_param in cls.headers.items(): + header_value = response.headers.get(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value + deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) + + if cls.content is not None: + if content_type not in cls.content: + raise exceptions.ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" + ) + body_schema = cls.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return cls.get_response( + response=response, + headers=deserialized_headers, + body=schemas.unset + ) + + if cls._content_type_is_json(content_type): + body_data = cls.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = cls.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = cls.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + elif content_type == 'application/x-pem-file': + body_data = response.data.decode() + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = schemas.get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema.validate_base(body_data) + else: + deserialized_body = body_schema.validate_base( + body_data, configuration=configuration) + elif streamed: + response.release_conn() + + return cls.get_response( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +@dataclasses.dataclass +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param configuration: api_configuration.ApiConfiguration object for this client + :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client + :param default_headers: any default headers to include when making calls to the API. + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + configuration: api_configuration.ApiConfiguration = dataclasses.field( + default_factory=lambda: api_configuration.ApiConfiguration()) + schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( + default_factory=lambda: schema_configuration_.SchemaConfiguration()) + default_headers: _collections.HTTPHeaderDict = dataclasses.field( + default_factory=lambda: _collections.HTTPHeaderDict()) + pool_threads: int = 1 + user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' + rest_client: rest.RESTClientObject = dataclasses.field(init=False) + + def __post_init__(self): + self._pool = None + self.rest_client = rest.RESTClientObject(self.configuration) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = pool.ThreadPool(self.pool_threads) + return self._pool + + def set_default_header(self, header_name: str, header_value: str): + self.default_headers[header_name] = header_value + + def call_api( + self, + resource_path: str, + method: str, + host: str, + query_params_suffix: typing.Optional[str] = None, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + body: typing.Union[str, bytes, None] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data` + :param security_requirement_object: The security requirement object, used to apply auth when making the call + :param async_req: execute request asynchronously + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the schemas.BinarySchema + instance will also inherit from FileSchema and schemas.FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + the method will return the response directly. + """ + # header parameters + used_headers = _collections.HTTPHeaderDict(self.default_headers) + user_agent_key = 'User-Agent' + if user_agent_key not in used_headers and self.user_agent: + used_headers[user_agent_key] = self.user_agent + + # auth setting + self.update_params_for_auth( + used_headers, + security_requirement_object, + resource_path, + method, + body, + query_params_suffix + ) + + # must happen after auth setting in case user is overriding those + if headers: + used_headers.update(headers) + + # request url + url = host + resource_path + if query_params_suffix: + url += query_params_suffix + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def request( + self, + method: str, + url: str, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + body: typing.Union[str, bytes, None] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "get": + return self.rest_client.get(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "head": + return self.rest_client.head(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "options": + return self.rest_client.options(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "post": + return self.rest_client.post(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "put": + return self.rest_client.put(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "patch": + return self.rest_client.patch(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "delete": + return self.rest_client.delete(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise exceptions.ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth( + self, + headers: _collections.HTTPHeaderDict, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], + resource_path: str, + method: str, + body: typing.Union[str, bytes, None] = None, + query_params_suffix: typing.Optional[str] = None + ): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param security_requirement_object: the openapi security requirement object + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not security_requirement_object: + # optional auth cause, use no auth + return + for security_scheme_component_name, scope_names in security_requirement_object.items(): + scope_names = typing.cast(typing.Tuple[str, ...], scope_names) + security_scheme_component_name = typing.cast(typing.Literal[ + 'api_key', + 'bearer_test', + 'http_basic_test', + ], + security_scheme_component_name + ) + try: + security_scheme_instance = self.configuration.security_scheme_info[security_scheme_component_name] + security_scheme_instance.apply_auth( + headers, + resource_path, + method, + body, + query_params_suffix, + scope_names + ) + except KeyError as ex: + raise ex + +@dataclasses.dataclass +class Api: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) + + @staticmethod + def _get_used_path( + used_path: str, + path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), + path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), + query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + skip_validation: bool = False + ) -> typing.Tuple[str, str]: + used_path_params = {} + if path_params is not None: + for path_parameter in path_parameters: + parameter_data = path_params.get(path_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) + used_path_params.update(serialized_data) + + for k, v in used_path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + query_params_suffix = "" + if query_params is not None: + prefix_separator_iterator = None + for query_parameter in query_parameters: + parameter_data = query_params.get(query_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = query_parameter.serialize( + parameter_data, + prefix_separator_iterator=prefix_separator_iterator, + skip_validation=skip_validation + ) + for serialized_value in serialized_data.values(): + query_params_suffix += serialized_value + return used_path, query_params_suffix + + @staticmethod + def _get_headers( + header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), + header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + accept_content_types: typing.Tuple[str, ...] = (), + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + headers = _collections.HTTPHeaderDict() + if header_params is not None: + for parameter in header_parameters: + parameter_data = header_params.get(parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) + headers.extend(serialized_data) + if accept_content_types: + for accept_content_type in accept_content_types: + headers.add('Accept', accept_content_type) + return headers + + def _get_fields_and_body( + self, + request_body: typing.Type[RequestBody], + body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], + content_type: str, + headers: _collections.HTTPHeaderDict + ): + if request_body.required and body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + + if isinstance(body, schemas.Unset): + return None, None + + serialized_fields = None + serialized_body = None + serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) + headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + serialized_fields = serialized_data['fields'] + elif 'body' in serialized_data: + serialized_body = serialized_data['body'] + return serialized_fields, serialized_body + + @staticmethod + def _verify_response_status(response: api_response.ApiResponse): + if not 200 <= response.response.status <= 399: + raise exceptions.ApiException( + status=response.response.status, + reason=response.response.reason, + api_response=response + ) + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[rest.RequestField, ...] + + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType schemas.Schema info + """ + __json_encoder = JSONEncoder() + __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} + content: typing.Dict[str, typing.Type[MediaType]] + required: bool = False + + @classmethod + def __serialize_json( + cls, + in_data: _JSON_TYPES + ) -> SerializedRequestBody: + in_data = cls.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return {'body': json_str} + + @staticmethod + def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: + return {'body': str(in_data)} + + @classmethod + def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: + json_value = cls.__json_encoder.default(value) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + @classmethod + def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: + if isinstance(value, str): + request_field = rest.RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = rest.RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, schemas.FileIO): + # TODO use content.encoding to limit allowed content types if they are present + urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, urllib3_request_field) + value.close() + else: + request_field = cls.__multipart_json_item(key=key, value=value) + return request_field + + @classmethod + def __serialize_multipart_form_data( + cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] + ) -> SerializedRequestBody: + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a rest.RequestField for each item with name=key + for item in value: + request_field = cls.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore + fields.append(request_field) + else: + request_field = cls.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return {'fields': tuple(fields)} + + @staticmethod + def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: + if isinstance(in_data, bytes): + return {'body': in_data} + # schemas.FileIO type + used_in_data = in_data.read() + in_data.close() + return {'body': used_in_data} + + @classmethod + def __serialize_application_x_www_form_data( + cls, in_data: schemas.immutabledict[str, _JSON_TYPES] + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + cast_in_data = cls.__json_encoder.default(in_data) + value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return {'body': value} + + @classmethod + def serialize( + cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = cls.content[content_type] + assert media_type.schema is not None + schema = schemas.get_class(media_type.schema) + used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() + cast_in_data = schema.validate_base(in_data, configuration=used_configuration) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if cls._content_type_is_json(content_type): + if isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") + return cls.__serialize_json(cast_in_data) + elif content_type in cls.__plain_txt_content_types: + if not isinstance(cast_in_data, (int, float, str)): + raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") + return cls.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") + return cls.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError( + f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") + return cls.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + if not isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") + return cls.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/api_response.py b/samples/client/openapi_features/security/python/src/openapi_client/api_response.py new file mode 100644 index 00000000000..049176b5b07 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/api_response.py @@ -0,0 +1,28 @@ +# coding: utf-8 +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +import urllib3 + +from this_package import schemas + + +@dataclasses.dataclass(frozen=True) +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] + headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] + + +@dataclasses.dataclass(frozen=True) +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py new file mode 100644 index 00000000000..7840f7726f6 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py new file mode 100644 index 00000000000..548a81961cc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py @@ -0,0 +1,26 @@ +import typing +import typing_extensions + +from openapi_client.apis.paths.path_with_no_explicit_security import PathWithNoExplicitSecurity +from openapi_client.apis.paths.path_with_one_explicit_security import PathWithOneExplicitSecurity +from openapi_client.apis.paths.path_with_security_from_root import PathWithSecurityFromRoot +from openapi_client.apis.paths.path_with_two_explicit_security import PathWithTwoExplicitSecurity + +PathToApi = typing.TypedDict( + 'PathToApi', + { + "/pathWithNoExplicitSecurity": typing.Type[PathWithNoExplicitSecurity], + "/pathWithOneExplicitSecurity": typing.Type[PathWithOneExplicitSecurity], + "/pathWithSecurityFromRoot": typing.Type[PathWithSecurityFromRoot], + "/pathWithTwoExplicitSecurity": typing.Type[PathWithTwoExplicitSecurity], + } +) + +path_to_api = PathToApi( + { + "/pathWithNoExplicitSecurity": PathWithNoExplicitSecurity, + "/pathWithOneExplicitSecurity": PathWithOneExplicitSecurity, + "/pathWithSecurityFromRoot": PathWithSecurityFromRoot, + "/pathWithTwoExplicitSecurity": PathWithTwoExplicitSecurity, + } +) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py new file mode 100644 index 00000000000..cf241d055c1 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py new file mode 100644 index 00000000000..7161d98bdd4 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.path_with_no_explicit_security.get.operation import ApiForGet + + +class PathWithNoExplicitSecurity( + ApiForGet, +): + pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py new file mode 100644 index 00000000000..32583ac9253 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.path_with_one_explicit_security.get.operation import ApiForGet + + +class PathWithOneExplicitSecurity( + ApiForGet, +): + pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py new file mode 100644 index 00000000000..0371b1e8dcd --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.path_with_security_from_root.get.operation import ApiForGet + + +class PathWithSecurityFromRoot( + ApiForGet, +): + pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py new file mode 100644 index 00000000000..180a7ff058f --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.path_with_two_explicit_security.get.operation import ApiForGet + + +class PathWithTwoExplicitSecurity( + ApiForGet, +): + pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py new file mode 100644 index 00000000000..00e34b097d3 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py @@ -0,0 +1,17 @@ +import typing +import typing_extensions + +from openapi_client.apis.tags.default_api import DefaultApi + +TagToApi = typing.TypedDict( + 'TagToApi', + { + "default": typing.Type[DefaultApi], + } +) + +tag_to_api = TagToApi( + { + "default": DefaultApi, + } +) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py new file mode 100644 index 00000000000..f3c38f014ce --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py new file mode 100644 index 00000000000..50f432dbc18 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.path_with_security_from_root.get.operation import PathWithSecurityFromRoot +from openapi_client.paths.path_with_two_explicit_security.get.operation import PathWithTwoExplicitSecurity +from openapi_client.paths.path_with_one_explicit_security.get.operation import PathWithOneExplicitSecurity +from openapi_client.paths.path_with_no_explicit_security.get.operation import PathWithNoExplicitSecurity + + +class DefaultApi( + PathWithSecurityFromRoot, + PathWithTwoExplicitSecurity, + PathWithOneExplicitSecurity, + PathWithNoExplicitSecurity, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py new file mode 100644 index 00000000000..31197d997c1 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from this_package.components.schema.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py new file mode 100644 index 00000000000..36ecd2a56f5 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py @@ -0,0 +1,18 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class ApiKey(security_schemes.ApiKeySecurityScheme): + ''' + apiKey in header + ''' + name: str = "api_key" + in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.HEADER diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py new file mode 100644 index 00000000000..5c04e9ea955 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class BearerTest(security_schemes.HTTPBearerSecurityScheme): + ''' + http bearer with JWT bearer format + ''' + bearer_format = "JWT" diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py new file mode 100644 index 00000000000..206b6a78ee3 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class HttpBasicTest(security_schemes.HTTPBasicSecurityScheme): + ''' + http basic + ''' diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py new file mode 100644 index 00000000000..2a6fb032a55 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import copy +from http import client as http_client +import logging +import multiprocessing +import sys +import typing +import typing_extensions + +import urllib3 + +from this_package import exceptions +from this_package import security_schemes +from this_package.components.security_schemes import security_scheme_api_key +from this_package.components.security_schemes import security_scheme_bearer_test +from this_package.components.security_schemes import security_scheme_http_basic_test +from this_package.servers import server_0 + +# security scheme key identifier to security scheme instance +SecuritySchemeInfo = typing.TypedDict( + 'SecuritySchemeInfo', + { + "api_key": security_scheme_api_key.ApiKey, + "bearer_test": security_scheme_bearer_test.BearerTest, + "http_basic_test": security_scheme_http_basic_test.HttpBasicTest, + }, + total=False +) + + +class SecurityIndexInfoRequired(typing.TypedDict): + security: typing.Literal[0, 1, 2, 3] + +SecurityIndexInfoOptional = typing.TypedDict( + 'SecurityIndexInfoOptional', + { + "paths//pathWithOneExplicitSecurity/get/security": typing.Literal[0], + "paths//pathWithTwoExplicitSecurity/get/security": typing.Literal[0, 1], + }, + total=False +) + + +class SecurityIndexInfo(SecurityIndexInfoRequired, SecurityIndexInfoOptional): + """ + the default security_index to use at each openapi document json path + the fallback value is stored in the 'security' key + """ + +# the server to use at each openapi document json path +ServerInfo = typing.TypedDict( + 'ServerInfo', + { + 'servers/0': server_0.Server0, + }, + total=False +) + + +class ServerIndexInfoRequired(typing.TypedDict): + servers: typing.Literal[0] + +ServerIndexInfoOptional = typing.TypedDict( + 'ServerIndexInfoOptional', + { + }, + total=False +) + + +class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): + """ + the default server_index to use at each openapi document json path + the fallback value is stored in the 'servers' key + """ + + +class ApiConfiguration(object): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param security_scheme_info: the security scheme auth info that can be used when calling endpoints + The key is a string that identifies the component security scheme that one is adding auth info for + The value is an instance of the component security scheme class for that security scheme + See the SecuritySchemeInfo TypedDict definition + :param security_index_info: path to security_index information + :param server_info: the servers that can be used to make endpoint calls + :param server_index_info: index to servers configuration + """ + + def __init__( + self, + security_scheme_info: typing.Optional[SecuritySchemeInfo] = None, + security_index_info: typing.Optional[SecurityIndexInfo] = None, + server_info: typing.Optional[ServerInfo] = None, + server_index_info: typing.Optional[ServerIndexInfo] = None, + ): + """Constructor + """ + # Authentication Settings + self.security_scheme_info: SecuritySchemeInfo = security_scheme_info or SecuritySchemeInfo() + self.security_index_info: SecurityIndexInfo = security_index_info or {'security': 0} + # Server Info + self.server_info: ServerInfo = server_info or { + 'servers/0': server_0.Server0(), + } + self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("this_package") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_server_url( + self, + key_prefix: typing.Literal[ + "servers", + ], + index: typing.Optional[int], + ) -> str: + """Gets host URL based on the index + :param index: array index of the host settings + :return: URL based on host settings + """ + if index: + used_index = index + else: + try: + used_index = self.server_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.server_index_info.get("servers", 0) + server_info_key = typing.cast( + typing.Literal[ + "servers/0", + ], + f"{key_prefix}/{used_index}" + ) + try: + server = self.server_info[server_info_key] + except KeyError as ex: + raise ex + return server.url + + def get_security_requirement_object( + self, + key_prefix: typing.Literal[ + "security", + "paths//pathWithOneExplicitSecurity/get/security", + "paths//pathWithTwoExplicitSecurity/get/security", + ], + security_requirement_objects: typing.List[security_schemes.SecurityRequirementObject], + index: typing.Optional[int], + ) -> security_schemes.SecurityRequirementObject: + """Gets security_schemes.SecurityRequirementObject based on the index + :param index: array index of the SecurityRequirementObject + :return: the selected security_schemes.SecurityRequirementObject + """ + if index: + used_index = index + else: + try: + used_index = self.security_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.security_index_info.get("security", 0) + return security_requirement_objects[used_index] diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py new file mode 100644 index 00000000000..6cccef59809 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +from this_package import exceptions + + +PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { + 'additional_properties': 'additionalProperties', + 'all_of': 'allOf', + 'any_of': 'anyOf', + 'const_value_to_name': 'const', + 'contains': 'contains', + 'dependent_required': 'dependentRequired', + 'dependent_schemas': 'dependentSchemas', + 'discriminator': 'discriminator', + # default omitted because it has no validation impact + 'else_': 'else', + 'enum_value_to_name': 'enum', + 'exclusive_maximum': 'exclusiveMaximum', + 'exclusive_minimum': 'exclusiveMinimum', + 'format': 'format', + 'if_': 'if', + 'inclusive_maximum': 'maximum', + 'inclusive_minimum': 'minimum', + 'items': 'items', + 'max_contains': 'maxContains', + 'max_items': 'maxItems', + 'max_length': 'maxLength', + 'max_properties': 'maxProperties', + 'min_contains': 'minContains', + 'min_items': 'minItems', + 'min_length': 'minLength', + 'min_properties': 'minProperties', + 'multiple_of': 'multipleOf', + 'not_': 'not', + 'one_of': 'oneOf', + 'pattern': 'pattern', + 'pattern_properties': 'patternProperties', + 'prefix_items': 'prefixItems', + 'properties': 'properties', + 'property_names': 'propertyNames', + 'required': 'required', + 'then': 'then', + 'types': 'type', + 'unique_items': 'uniqueItems', + 'unevaluated_items': 'unevaluatedItems', + 'unevaluated_properties': 'unevaluatedProperties' +} + +class SchemaConfiguration: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param disabled_json_schema_keywords (set): Set of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_json_schema_keywords is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + """ + + def __init__( + self, + disabled_json_schema_keywords = set(), + ): + """Constructor + """ + self.disabled_json_schema_keywords = disabled_json_schema_keywords + + @property + def disabled_json_schema_python_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_python_keywords + + @property + def disabled_json_schema_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_keywords + + @disabled_json_schema_keywords.setter + def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): + disabled_json_schema_keywords = set() + disabled_json_schema_python_keywords = set() + for k in json_keywords: + python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} + if not python_keywords: + raise exceptions.ApiValueError( + "Invalid keyword: '{0}''".format(k)) + disabled_json_schema_keywords.add(k) + disabled_json_schema_python_keywords.update(python_keywords) + self.__disabled_json_schema_keywords = disabled_json_schema_keywords + self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py b/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py new file mode 100644 index 00000000000..c3cc97e49c5 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +from this_package import api_response + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + +T = typing.TypeVar('T', bound=api_response.ApiResponse) + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: typing.Optional[str] = None + api_response: typing.Optional[T] = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.api_response: + if self.api_response.response.headers: + error_message += "HTTP response headers: {0}\n".format( + self.api_response.response.headers) + if self.api_response.response.data: + error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) + + return error_message diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py new file mode 100644 index 00000000000..2c2c9cc4bdc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis import path_to_api diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py new file mode 100644 index 00000000000..119b3694283 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.path_with_no_explicit_security import PathWithNoExplicitSecurity + +path = "/pathWithNoExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py new file mode 100644 index 00000000000..4ab6ba787c4 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _path_with_no_explicit_security( + self, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _path_with_no_explicit_security( + self, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _path_with_no_explicit_security( + self, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + path with no explicit security + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PathWithNoExplicitSecurity(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + path_with_no_explicit_security = BaseApi._path_with_no_explicit_security + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._path_with_no_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..aab0cfbdecc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py new file mode 100644 index 00000000000..895c607d7a3 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.path_with_one_explicit_security import PathWithOneExplicitSecurity + +path = "/pathWithOneExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py new file mode 100644 index 00000000000..3f699f63bb1 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .security import security_requirement_object_0 + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _path_with_one_explicit_security( + self, + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _path_with_one_explicit_security( + self, + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _path_with_one_explicit_security( + self, + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + path with one explicit security + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pathWithOneExplicitSecurity/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PathWithOneExplicitSecurity(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + path_with_one_explicit_security = BaseApi._path_with_one_explicit_security + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._path_with_one_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..aab0cfbdecc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..825bd466db0 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py new file mode 100644 index 00000000000..b0b9b9143f5 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.path_with_security_from_root import PathWithSecurityFromRoot + +path = "/pathWithSecurityFromRoot" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py new file mode 100644 index 00000000000..14090a6ffd2 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from openapi_client.security import ( + security_requirement_object_0, + security_requirement_object_1, + security_requirement_object_2, + security_requirement_object_3, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, + security_requirement_object_2.security_requirement_object, + security_requirement_object_3.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _path_with_security_from_root( + self, + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _path_with_security_from_root( + self, + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _path_with_security_from_root( + self, + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + path with security from root + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PathWithSecurityFromRoot(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + path_with_security_from_root = BaseApi._path_with_security_from_root + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._path_with_security_from_root diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..aab0cfbdecc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py new file mode 100644 index 00000000000..acc37036200 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.path_with_two_explicit_security import PathWithTwoExplicitSecurity + +path = "/pathWithTwoExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py new file mode 100644 index 00000000000..5c7ba4b8f39 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .security import ( + security_requirement_object_0, + security_requirement_object_1, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _path_with_two_explicit_security( + self, + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _path_with_two_explicit_security( + self, + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _path_with_two_explicit_security( + self, + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + path with two explicit security + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pathWithTwoExplicitSecurity/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PathWithTwoExplicitSecurity(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + path_with_two_explicit_security = BaseApi._path_with_two_explicit_security + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._path_with_two_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..aab0cfbdecc --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..825bd466db0 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py new file mode 100644 index 00000000000..43650240018 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "bearer_test": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/py.typed b/samples/client/openapi_features/security/python/src/openapi_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/rest.py b/samples/client/openapi_features/security/python/src/openapi_client/rest.py new file mode 100644 index 00000000000..bae5ccf2b84 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/rest.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi # type: ignore[import] +import urllib3 +from urllib3 import fields +from urllib3 import exceptions as urllib3_exceptions +from urllib3._collections import HTTPHeaderDict + +from this_package import exceptions + + +logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise exceptions.ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + headers = headers or HTTPHeaderDict() + + used_timeout: typing.Optional[urllib3.Timeout] = None + if timeout: + if isinstance(timeout, (int, float)): + used_timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: + if 'Content-Type' not in headers and body is None: + r = self.pool_manager.request( + method, + url, + preload_content=not stream, + timeout=used_timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + body=body, + encode_multipart=False, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise exceptions.ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + except urllib3_exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise exceptions.ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def get(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def head(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def options(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def delete(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def post(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def put(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def patch(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py new file mode 100644 index 00000000000..5b34ff5718e --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +import typing_extensions + +from .schema import ( + get_class, + none_type_, + classproperty, + Bool, + FileIO, + Schema, + SingletonMeta, + AnyTypeSchema, + UnsetAnyTypeSchema, + INPUT_TYPES_ALL +) + +from .schemas import ( + ListSchema, + NoneSchema, + NumberSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + StrSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BytesSchema, + FileSchema, + BinarySchema, + BoolSchema, + NotAnyTypeSchema, + OUTPUT_BASE_TYPES, + DictSchema +) +from .validation import ( + PatternInfo, + ValidationMetadata, + immutabledict +) +from .format import ( + as_date, + as_datetime, + as_decimal, + as_uuid +) + +def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore + res = {} + for key, val in t_dict.__annotations__.items(): + if isinstance(val, typing._GenericAlias): # type: ignore + # typing.Type[W] -> W + val_cls = typing.get_args(val)[0] + res[key] = val_cls + return res + +X = typing.TypeVar('X', bound=typing.Tuple) + +def tuple_to_instance(tup: typing.Type[X]) -> X: + res = [] + for arg in typing.get_args(tup): + if isinstance(arg, typing._GenericAlias): # type: ignore + # typing.Type[Schema] -> Schema + arg_cls = typing.get_args(arg)[0] + res.append(arg_cls) + return tuple(res) # type: ignore + + +class Unset: + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset: Unset = Unset() + +def key_unknown_error_msg(key: str) -> str: + return (f"Invalid key. The key {key} is not a known key in this payload. " + "If this key is an additional property, use get_additional_property_" + ) + +def raise_if_key_known( + key: str, + required_keys: typing.FrozenSet[str], + optional_keys: typing.FrozenSet[str] +): + if key in required_keys or key in optional_keys: + raise ValueError(f"The key {key} is a known property, use get_property to access its value") + +__all__ = [ + 'get_class', + 'none_type_', + 'classproperty', + 'Bool', + 'FileIO', + 'Schema', + 'SingletonMeta', + 'AnyTypeSchema', + 'UnsetAnyTypeSchema', + 'INPUT_TYPES_ALL', + 'ListSchema', + 'NoneSchema', + 'NumberSchema', + 'IntSchema', + 'Int32Schema', + 'Int64Schema', + 'Float32Schema', + 'Float64Schema', + 'StrSchema', + 'UUIDSchema', + 'DateSchema', + 'DateTimeSchema', + 'DecimalSchema', + 'BytesSchema', + 'FileSchema', + 'BinarySchema', + 'BoolSchema', + 'NotAnyTypeSchema', + 'OUTPUT_BASE_TYPES', + 'DictSchema', + 'PatternInfo', + 'ValidationMetadata', + 'immutabledict', + 'as_date', + 'as_datetime', + 'as_decimal', + 'as_uuid', + 'typed_dict_to_instance', + 'tuple_to_instance', + 'Unset', + 'unset', + 'key_unknown_error_msg', + 'raise_if_key_known' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py new file mode 100644 index 00000000000..bb614903b82 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py @@ -0,0 +1,115 @@ +import datetime +import decimal +import functools +import typing +import uuid + +from dateutil import parser, tz + + +class CustomIsoparser(parser.isoparser): + def __init__(self, sep: typing.Optional[str] = None): + """ + :param sep: + A single character that separates date and time portions. If + ``None``, the parser will accept any single character. + For strict ISO-8601 adherence, pass ``'T'``. + """ + if sep is not None: + if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): + raise ValueError('Separator must be a single, non-numeric ' + + 'ASCII character') + + used_sep = sep.encode('ascii') + else: + used_sep = None + + self._sep = used_sep + + @staticmethod + def __get_ascii_bytes(str_in: str) -> bytes: + # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII + # ASCII is the same in UTF-8 + try: + return str_in.encode('ascii') + except UnicodeEncodeError as e: + msg = 'ISO-8601 strings should contain only ASCII characters' + raise ValueError(msg) from e + + def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isodate(dt_str_ascii) # type: ignore + values = typing.cast(typing.Tuple[typing.List[int], int], values) + components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) + pos = values[1] + return components, pos + + def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isotime(dt_str_ascii) # type: ignore + components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore + return components + + def parse_isodatetime(self, dt_str: str) -> datetime.datetime: + date_components, pos = self.__parse_isodate(dt_str) + if len(dt_str) <= pos: + # len(components) <= 3 + raise ValueError('Value is not a datetime') + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) + if hour == 24: + hour = 0 + components = (*date_components, hour, minute, second, microsecond, tzinfo) + return datetime.datetime(*components) + datetime.timedelta(days=1) + else: + components = (*date_components, hour, minute, second, microsecond, tzinfo) + else: + raise ValueError('String contains unknown ISO components') + + return datetime.datetime(*components) + + def parse_isodate_str(self, datestr: str) -> datetime.date: + components, pos = self.__parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return datetime.date(*components) + +DEFAULT_ISOPARSER = CustomIsoparser() + +@functools.lru_cache() +def as_date(arg: str) -> datetime.date: + """ + type = "string" + format = "date" + """ + return DEFAULT_ISOPARSER.parse_isodate_str(arg) + +@functools.lru_cache() +def as_datetime(arg: str) -> datetime.datetime: + """ + type = "string" + format = "date-time" + """ + return DEFAULT_ISOPARSER.parse_isodatetime(arg) + +@functools.lru_cache() +def as_decimal(arg: str) -> decimal.Decimal: + """ + Applicable when storing decimals that are sent over the wire as strings + type = "string" + format = "number" + """ + return decimal.Decimal(arg) + +@functools.lru_cache() +def as_uuid(arg: str) -> uuid.UUID: + """ + type = "string" + format = "uuid" + """ + return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py new file mode 100644 index 00000000000..3897e140a4a --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py @@ -0,0 +1,97 @@ +""" +MIT License + +Copyright (c) 2020 Corentin Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +from __future__ import annotations +import typing +import typing_extensions + +_K = typing.TypeVar("_K") +_V = typing.TypeVar("_V", covariant=True) + + +class immutabledict(typing.Mapping[_K, _V]): + """ + An immutable wrapper around dictionaries that implements + the complete :py:class:`collections.Mapping` interface. + It can be used as a drop-in replacement for dictionaries + where immutability is desired. + + Note: custom version of this class made to remove __init__ + """ + + dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict + _dict: typing.Dict[_K, _V] + _hash: typing.Optional[int] + + @classmethod + def fromkeys( + cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None + ) -> "immutabledict[_K, _V]": + return cls(dict.fromkeys(seq, value)) + + def __new__(cls, *args: typing.Any) -> typing_extensions.Self: + inst = super().__new__(cls) + setattr(inst, '_dict', cls.dict_cls(*args)) + setattr(inst, '_hash', None) + return inst + + def __getitem__(self, key: _K) -> _V: + return self._dict[key] + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def __iter__(self) -> typing.Iterator[_K]: + return iter(self._dict) + + def __len__(self) -> int: + return len(self._dict) + + def __repr__(self) -> str: + return "%s(%r)" % (self.__class__.__name__, self._dict) + + def __hash__(self) -> int: + if self._hash is None: + h = 0 + for key, value in self.items(): + h ^= hash((key, value)) + self._hash = h + + return self._hash + + def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(self) + new.update(other) + return self.__class__(new) + + def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(other) + new.update(self) + return new + + def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: + raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py new file mode 100644 index 00000000000..e593c90b1d7 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py @@ -0,0 +1,729 @@ +from __future__ import annotations +import datetime +import dataclasses +import io +import types +import typing +import uuid + +import functools +import typing_extensions + +from this_package import exceptions +from this_package.configurations import schema_configuration + +from . import validation + +_T_co = typing.TypeVar("_T_co", covariant=True) + + +class SequenceNotStr(typing.Protocol[_T_co]): + """ + if a Protocol would define the interface of Sequence, this protocol + would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence + methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection + """ + def __contains__(self, value: object, /) -> bool: + raise NotImplementedError + + def __getitem__(self, index, /): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __iter__(self) -> typing.Iterator[_T_co]: + raise NotImplementedError + + def __reversed__(self, /) -> typing.Iterator[_T_co]: + raise NotImplementedError + +none_type_ = type(None) +T = typing.TypeVar('T', bound=typing.Mapping) +U = typing.TypeVar('U', bound=SequenceNotStr) +W = typing.TypeVar('W') + + +class SchemaTyped: + additional_properties: typing.Type[Schema] + all_of: typing.Tuple[typing.Type[Schema], ...] + any_of: typing.Tuple[typing.Type[Schema], ...] + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] + default: typing.Union[str, int, float, bool, None] + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] + exclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + format: str + inclusive_maximum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + items: typing.Type[Schema] + max_items: int + max_length: int + max_properties: int + min_items: int + min_length: int + min_properties: int + multiple_of: typing.Union[int, float] + not_: typing.Type[Schema] + one_of: typing.Tuple[typing.Type[Schema], ...] + pattern: validation.PatternInfo + properties: typing.Mapping[str, typing.Type[Schema]] + required: typing.FrozenSet[str] + types: typing.FrozenSet[typing.Type] + unique_items: bool + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') + arg.close() + inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore + super(FileIO, inst).__init__(arg.name) + return inst + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') + + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + """ + Needed for instantiation when passing in arguments of the above type + """ + pass + + +class classproperty(typing.Generic[W]): + def __init__(self, method: typing.Callable[..., W]): + self.__method = method + functools.update_wrapper(self, method) # type: ignore + + def __get__(self, obj, cls=None) -> W: + if cls is None: + cls = type(obj) + return self.__method(cls) + + +class Bool: + _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} + """ + This class is needed to replace bool during validation processing + json schema requires that 0 != False and 1 != True + python implementation defines 0 == False and 1 == True + To meet the json schema requirements, all bool instances are replaced with Bool singletons + during validation only, and then bool values are returned from validation + """ + + def __new__(cls, arg_: bool, **kwargs): + """ + Method that implements singleton + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, arg_) + if key not in cls._instances: + inst = super().__new__(cls) + cls._instances[key] = inst + return cls._instances[key] + + def __repr__(self): + if bool(self): + return f'' + return f'' + + @classproperty + def TRUE(cls): + return cls(True) # type: ignore + + @classproperty + def FALSE(cls): + return cls(False) # type: ignore + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +def cast_to_allowed_types( + arg: typing.Union[ + dict, + validation.immutabledict, + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + ], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] +) -> typing.Union[ + validation.immutabledict, + tuple, + float, + int, + str, + bytes, + Bool, + None, + FileIO +]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + path_to_type[path_to_item] = str + return str(arg) + elif isinstance(arg, (dict, validation.immutabledict)): + path_to_type[path_to_item] = validation.immutabledict + return validation.immutabledict( + { + key: cast_to_allowed_types( + val, + from_server, + validated_path_to_schemas, + path_to_item + (key,), + path_to_type, + ) + for key, val in arg.items() + } + ) + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + path_to_type[path_to_item] = Bool + if arg: + return Bool.TRUE + return Bool.FALSE + elif isinstance(arg, int): + path_to_type[path_to_item] = int + return arg + elif isinstance(arg, float): + path_to_type[path_to_item] = float + return arg + elif isinstance(arg, (tuple, list)): + path_to_type[path_to_item] = tuple + return tuple( + [ + cast_to_allowed_types( + item, + from_server, + validated_path_to_schemas, + path_to_item + (i,), + path_to_type, + ) + for i, item in enumerate(arg) + ] + ) + elif arg is None: + path_to_type[path_to_item] = type(None) + return None + elif isinstance(arg, (datetime.date, datetime.datetime)): + path_to_type[path_to_item] = str + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + path_to_type[path_to_item] = str + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, bytes): + path_to_type[path_to_item] = bytes + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + path_to_type[path_to_item] = FileIO + return FileIO(arg) + raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class SingletonMeta(type): + """ + A singleton class for schemas + Schemas are frozen classes that are never instantiated with init args + All args come from defaults + """ + _instances: typing.Dict[type, typing.Any] = {} + + def __call__(cls, *args, **kwargs): + if cls not in cls._instances: + cls._instances[cls] = super().__call__(*args, **kwargs) + return cls._instances[cls] + + +class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): + + @classmethod + def __get_path_to_schemas( + cls, + arg, + validation_metadata: validation.ValidationMetadata, + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: + """ + Run all validations in the json schema and return a dict of + json schema to tuple of validated schemas + """ + _path_to_schemas: validation.PathToSchemasType = {} + if validation_metadata.validation_ran_earlier(cls): + validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) + validation.update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} + for path, schema_classes in _path_to_schemas.items(): + schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) + path_to_schemas[path] = schema + """ + For locations that validation did not check + the code still needs to store type + schema information for instantiation + All of those schemas will be UnsetAnyTypeSchema + """ + missing_paths = path_to_type.keys() - path_to_schemas.keys() + for missing_path in missing_paths: + path_to_schemas[missing_path] = UnsetAnyTypeSchema + + return path_to_schemas + + @staticmethod + def __get_items( + arg: tuple, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + ''' + Schema __get_items + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return tuple(cast_items) + + @staticmethod + def __get_properties( + arg: validation.immutabledict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + """ + Schema __get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return validation.immutabledict(dict_items) + + @classmethod + def _get_new_instance_without_conversion( + cls, + arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + # We have a Dynamic class and we are making an instance of it + if isinstance(arg, validation.immutabledict): + used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) + elif isinstance(arg, tuple): + used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) + elif isinstance(arg, Bool): + return bool(arg) + else: + """ + str, int, float, FileIO, bytes + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return arg + arg_type = type(arg) + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is None: + return used_arg + if arg_type not in type_to_output_cls: + return used_arg + output_cls = type_to_output_cls[arg_type] + if arg_type is tuple: + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(U, inst) + return inst + assert issubclass(output_cls, validation.immutabledict) + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(T, inst) + return inst + + @typing.overload + @classmethod + def validate_base( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate_base( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + """ + Schema validate_base + + Args: + arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + like minItems, minLength etc + """ + if isinstance(arg, (tuple, validation.immutabledict)): + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is not None: + for output_cls in type_to_output_cls.values(): + if isinstance(arg, output_cls): + # U + T use case, don't run validations twice + return arg + + from_server = False + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] + ] = {} + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} + cast_arg = cast_to_allowed_types( + arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) + validation_metadata = validation.ValidationMetadata( + path_to_item=('args[0]',), + configuration=configuration or schema_configuration.SchemaConfiguration(), + validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) + ) + path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) + return cls._get_new_instance_without_conversion( + cast_arg, + validation_metadata.path_to_item, + path_to_schemas, + ) + + @classmethod + def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: + type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) + type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) + return type_to_output_cls + + +def get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[Schema]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + return item_cls._evaluate(None, local_namespace) + raise ValueError('invalid class value passed in') + + +@dataclasses.dataclass(frozen=True) +class AnyTypeSchema(Schema[T, U]): + # Python representation of a schema defined as true or {} + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return cls.validate_base( + arg, + configuration=configuration + ) + +class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + +INPUT_TYPES_ALL = typing.Union[ + dict, + validation.immutabledict, + typing.Mapping[str, object], # for TypedDict + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + FileIO +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py new file mode 100644 index 00000000000..27a275a6247 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import datetime +import dataclasses +import io +import typing +import uuid + +import typing_extensions + +from this_package.configurations import schema_configuration + +from . import schema, validation + + +@dataclasses.dataclass(frozen=True) +class ListSchema(schema.Schema[validation.immutabledict, tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schema.INPUT_TYPES_ALL], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Tuple[schema.INPUT_TYPES_ALL, ...], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NoneSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) + + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NumberSchema(schema.Schema): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + types: typing.FrozenSet[typing.Type] = frozenset({float, int}) + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class IntSchema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int' + + +@dataclasses.dataclass(frozen=True) +class Int32Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int32' + + +@dataclasses.dataclass(frozen=True) +class Int64Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int64' + + +@dataclasses.dataclass(frozen=True) +class Float32Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'float' + + +@dataclasses.dataclass(frozen=True) +class Float64Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'double' + + +@dataclasses.dataclass(frozen=True) +class StrSchema(schema.Schema): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + types: typing.FrozenSet[typing.Type] = frozenset({str}) + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class UUIDSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'uuid' + + @classmethod + def validate( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateTimeSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date-time' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DecimalSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'number' + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class BytesSchema(schema.Schema): + """ + this class will subclass bytes and is immutable + """ + types: typing.FrozenSet[typing.Type] = frozenset({bytes}) + + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class FileSchema(schema.Schema): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.FileIO: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BinarySchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) + format: str = 'binary' + + one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( + BytesSchema, + FileSchema, + ) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[schema.FileIO, bytes]: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BoolSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NotAnyTypeSchema(schema.AnyTypeSchema): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + not_: typing.Type[schema.Schema] = schema.AnyTypeSchema + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return super().validate_base(arg, configuration=configuration) + +OUTPUT_BASE_TYPES = typing.Union[ + validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], + str, + int, + float, + bool, + schema.none_type_, + typing.Tuple['OUTPUT_BASE_TYPES', ...], + bytes, + schema.FileIO +] + + +@dataclasses.dataclass(frozen=True) +class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) + + @typing.overload + @classmethod + def validate( + cls, + arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: + return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py new file mode 100644 index 00000000000..8cba8662fdd --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py @@ -0,0 +1,1446 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import collections +import dataclasses +import decimal +import re +import sys +import types +import typing +import uuid + +import typing_extensions + +from this_package import exceptions +from this_package.configurations import schema_configuration + +from . import format, original_immutabledict + +immutabledict = original_immutabledict.immutabledict + + +@dataclasses.dataclass +class ValidationMetadata: + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + path_to_item: typing.Tuple[typing.Union[str, int], ...] + configuration: schema_configuration.SchemaConfiguration + validated_path_to_schemas: typing.Mapping[ + typing.Tuple[typing.Union[str, int], ...], + typing.Mapping[type, None] + ] = dataclasses.field(default_factory=dict) + seen_classes: typing.FrozenSet[type] = frozenset() + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) + if validated_schemas and cls in validated_schemas: + return True + if cls in self.seen_classes: + return True + return False + +def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise exceptions.ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class SchemaValidator: + __excluded_cls_properties = { + '__module__', + '__dict__', + '__weakref__', + '__doc__', + '__annotations__', + 'default', # excluded because it has no impact on validation + 'type_to_output_cls', # used to pluck the output class for instantiation + } + + @classmethod + def _validate( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> PathToSchemasType: + """ + SchemaValidator validate + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + """ + cls_schema = cls() + json_schema_data = { + k: v + for k, v in vars(cls_schema).items() + if k not in cls.__excluded_cls_properties + and k + not in validation_metadata.configuration.disabled_json_schema_python_keywords + } + contains_path_to_schemas = [] + path_to_schemas: PathToSchemasType = {} + if 'contains' in vars(cls_schema): + contains_path_to_schemas = _get_contains_path_to_schemas( + arg, + vars(cls_schema)['contains'], + validation_metadata, + path_to_schemas + ) + if_path_to_schemas = None + if 'if_' in vars(cls_schema): + if_path_to_schemas = _get_if_path_to_schemas( + arg, + vars(cls_schema)['if_'], + validation_metadata, + ) + validated_pattern_properties: typing.Optional[PathToSchemasType] = None + if 'pattern_properties' in vars(cls_schema): + validated_pattern_properties = _get_validated_pattern_properties( + arg, + vars(cls_schema)['pattern_properties'], + cls, + validation_metadata + ) + prefix_items_length = 0 + if 'prefix_items' in vars(cls_schema): + prefix_items_length = len(vars(cls_schema)['prefix_items']) + for keyword, val in json_schema_data.items(): + used_val: typing.Any + if keyword in {'contains', 'min_contains', 'max_contains'}: + used_val = (val, contains_path_to_schemas) + elif keyword == 'items': + used_val = (val, prefix_items_length) + elif keyword in {'unevaluated_items', 'unevaluated_properties'}: + used_val = (val, path_to_schemas) + elif keyword in {'types'}: + format: typing.Optional[str] = vars(cls_schema).get('format', None) + used_val = (val, format) + elif keyword in {'pattern_properties', 'additional_properties'}: + used_val = (val, validated_pattern_properties) + elif keyword in {'if_', 'then', 'else_'}: + used_val = (val, if_path_to_schemas) + else: + used_val = val + validator = json_schema_keyword_to_validator[keyword] + + other_path_to_schemas = validator( + arg, + used_val, + cls, + validation_metadata, + ) + if other_path_to_schemas: + update(path_to_schemas, other_path_to_schemas) + + base_class = type(arg) + if validation_metadata.path_to_item not in path_to_schemas: + path_to_schemas[validation_metadata.path_to_item] = dict() + path_to_schemas[validation_metadata.path_to_item][base_class] = None + path_to_schemas[validation_metadata.path_to_item][cls] = None + return path_to_schemas + +PathToSchemasType = typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Dict[ + typing.Union[ + typing.Type[SchemaValidator], + typing.Type[str], + typing.Type[int], + typing.Type[float], + typing.Type[bool], + typing.Type[None], + typing.Type[immutabledict], + typing.Type[tuple] + ], + None + ] +] + +def _get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[SchemaValidator]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + if sys.version_info < (3, 9): + return item_cls._evaluate(None, local_namespace) + return item_cls._evaluate(None, local_namespace, set()) + raise ValueError('invalid class value passed in') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is collections.defaultdict(dict) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k].update(v) + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def __type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = __get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + +def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = __type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return exceptions.ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternInfo: + pattern: str + flags: typing.Optional[re.RegexFlag] = None + + +def validate_types( + arg: typing.Any, + allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + allowed_types = allowed_types_format[0] + if type(arg) not in allowed_types: + raise __get_type_error( + arg, + validation_metadata.path_to_item, + allowed_types, + key_type=False, + ) + if isinstance(arg, bool) or not isinstance(arg, (int, float)): + return None + format = allowed_types_format[1] + if format and format == 'int' and arg != int(arg): + # there is a json schema test where 1.0 validates as an integer + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + return None + + +def validate_enum( + arg: typing.Any, + enum_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in enum_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) + return None + + +def validate_unique_items( + arg: typing.Any, + unique_items_value: bool, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not unique_items_value or not isinstance(arg, tuple): + return None + if len(arg) == len(set(arg)): + return None + _raise_validation_error_message( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + +def validate_min_items( + arg: typing.Any, + min_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) < min_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=min_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_items( + arg: typing.Any, + max_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) > max_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=max_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_properties( + arg: typing.Any, + min_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) < min_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=min_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_properties( + arg: typing.Any, + max_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) > max_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=max_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_length( + arg: typing.Any, + min_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) < min_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=min_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_length( + arg: typing.Any, + max_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) > max_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=max_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_minimum( + arg: typing.Any, + inclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg < inclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_minimum( + arg: typing.Any, + exclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg <= exclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=exclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_maximum( + arg: typing.Any, + inclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg > inclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_maximum( + arg: typing.Any, + exclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg >= exclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than", + constraint_value=exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + +def validate_multiple_of( + arg: typing.Any, + multiple_of: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if (not (float(arg) / multiple_of).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + _raise_validation_error_message( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_pattern( + arg: typing.Any, + pattern_info: PatternInfo, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item + ) + return None + + +__int32_inclusive_minimum = -2147483648 +__int32_inclusive_maximum = 2147483647 +__int64_inclusive_minimum = -9223372036854775808 +__int64_inclusive_maximum = 9223372036854775807 +__float_inclusive_minimum = -3.4028234663852886e+38 +__float_inclusive_maximum = 3.4028234663852886e+38 +__double_inclusive_minimum = -1.7976931348623157E+308 +__double_inclusive_maximum = 1.7976931348623157E+308 + +def __validate_numeric_format( + arg: typing.Union[int, float], + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value[:3] == 'int': + # there is a json schema test where 1.0 validates as an integer + if arg != int(arg): + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + if format_value == 'int32': + if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + elif format_value == 'int64': + if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + elif format_value in {'float', 'double'}: + if format_value == 'float': + if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + return None + # double + if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + + +def __validate_string_format( + arg: str, + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value == 'uuid': + try: + uuid.UUID(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'number': + try: + decimal.Decimal(arg) + return None + except decimal.InvalidOperation: + raise exceptions.ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date': + try: + format.DEFAULT_ISOPARSER.parse_isodate_str(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date-time': + try: + format.DEFAULT_ISOPARSER.parse_isodatetime(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + return None + + +def validate_format( + arg: typing.Union[str, int, float], + format_value: str, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + # formats work for strings + numbers + if isinstance(arg, (int, float)): + return __validate_numeric_format( + arg, + format_value, + validation_metadata + ) + elif isinstance(arg, str): + return __validate_string_format( + arg, + format_value, + validation_metadata + ) + return None + + +def validate_required( + arg: typing.Any, + required: typing.Set[str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + missing_req_args = required - arg.keys() + if missing_req_args: + missing_required_arguments = list(missing_req_args) + missing_required_arguments.sort() + raise exceptions.ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + return None + + +def validate_items( + arg: typing.Any, + item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + item_cls = _get_class(item_cls_prefix_items_length[0]) + prefix_items_length = item_cls_prefix_items_length[1] + path_to_schemas: PathToSchemasType = {} + for i in range(prefix_items_length, len(arg)): + value = arg[i] + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_properties( + arg: typing.Any, + properties: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + present_properties = {k: v for k, v, in arg.items() if k in properties} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, value in present_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + schema = properties[property_name] + schema = _get_class(schema, module_namespace) + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_additional_properties( + arg: typing.Any, + additional_properties_cls_val_pprops: typing.Tuple[ + typing.Type[SchemaValidator], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + schema = _get_class(additional_properties_cls_val_pprops[0]) + path_to_schemas: PathToSchemasType = {} + cls_schema = cls() + properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} + present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} + validated_pattern_properties = additional_properties_cls_val_pprops[1] + for property_name, value in present_additional_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if validated_pattern_properties and path_to_item in validated_pattern_properties: + continue + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_one_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + oneof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(schema) + continue + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + oneof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + oneof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate oneof_classes + continue + oneof_classes.append(schema) + if not oneof_classes: + raise exceptions.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: + raise exceptions.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 + + +def validate_any_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + anyof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + module_namespace = vars(sys.modules[cls.__module__]) + for schema in classes: + schema = _get_class(schema, module_namespace) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + anyof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + anyof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate anyof_classes + continue + anyof_classes.append(schema) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise exceptions.ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + +def validate_all_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + continue + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_not( + arg: typing.Any, + not_cls: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + not_schema = _get_class(not_cls) + other_path_to_schemas = None + not_exception = exceptions.ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_schema.__name__, + ) + ) + if validation_metadata.validation_ran_earlier(not_schema): + raise not_exception + + try: + other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + return None + + +def __ensure_discriminator_value_present( + disc_property_name: str, + validation_metadata: ValidationMetadata, + arg +): + if disc_property_name not in arg: + # The input data does not contain the discriminator property + raise exceptions.ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + +def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + cls_schema = cls() + if not hasattr(cls_schema, 'discriminator'): + return None + disc = cls_schema.discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not ( + hasattr(cls_schema, 'all_of') or + hasattr(cls_schema, 'one_of') or + hasattr(cls_schema, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls_schema, 'all_of'): + for allof_cls in cls_schema.all_of: + discriminated_cls = __get_discriminated_class( + allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'one_of'): + for oneof_cls in cls_schema.one_of: + discriminated_cls = __get_discriminated_class( + oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'any_of'): + for anyof_cls in cls_schema.any_of: + discriminated_cls = __get_discriminated_class( + anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +def validate_discriminator( + arg: typing.Any, + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + disc_prop_name = list(discriminator.keys())[0] + __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) + discriminated_cls = __get_discriminated_class( + cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ) + if discriminated_cls is None: + raise exceptions.ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls is cls: + """ + Optimistically assume that cls will pass validation + If the code invoked _validate on cls it would infinitely recurse + """ + return None + if validation_metadata.validation_ran_earlier(discriminated_cls): + path_to_schemas: PathToSchemasType = {} + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + return path_to_schemas + updated_vm = ValidationMetadata( + path_to_item=validation_metadata.path_to_item, + configuration=validation_metadata.configuration, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + return discriminated_cls._validate(arg, validation_metadata=updated_vm) + + +def _get_if_path_to_schemas( + arg: typing.Any, + if_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + if_cls = _get_class(if_cls) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = if_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, other_path_to_schemas) + except exceptions.OpenApiException: + pass + return these_path_to_schemas + + +def validate_if( + arg: typing.Any, + if_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = if_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + + if true, then true -> true for whole schema + so validate_then will add if_path_to_schemas data to path_to_schemas + """ + return None + + +def validate_then( + arg: typing.Any, + then_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = then_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + """ + if not if_path_to_schemas: + return None + then_cls = _get_class(then_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = then_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # then False case + raise ex + + +def validate_else( + arg: typing.Any, + else_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = else_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + if if_path_to_schemas: + # skip validation if if_path_to_schemas was true + return None + """ + if is false use case + if_path_to_schemas == {} + """ + else_cls = _get_class(else_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = else_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # else False case + raise ex + + +def _get_contains_path_to_schemas( + arg: typing.Any, + contains_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, + path_to_schemas: PathToSchemasType +) -> typing.List[PathToSchemasType]: + if not isinstance(arg, tuple): + return [] + contains_cls = _get_class(contains_cls) + contains_path_to_schemas = [] + for i, value in enumerate(arg): + these_path_to_schemas: PathToSchemasType = {} + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(contains_cls): + add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) + contains_path_to_schemas.append(these_path_to_schemas) + continue + try: + other_path_to_schemas = contains_cls._validate( + value, validation_metadata=item_validation_metadata) + contains_path_to_schemas.append(other_path_to_schemas) + except exceptions.OpenApiException: + pass + return contains_path_to_schemas + + +def validate_contains( + arg: typing.Any, + contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + many_path_to_schemas = contains_cls_path_to_schemas[1] + if not many_path_to_schemas: + raise exceptions.ApiValueError( + "Validation failed for contains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + these_path_to_schemas: PathToSchemasType = {} + for other_path_to_schema in many_path_to_schemas: + update(these_path_to_schemas, other_path_to_schema) + return these_path_to_schemas + + +def validate_min_contains( + arg: typing.Any, + min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + min_contains = min_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) < min_contains: + raise exceptions.ApiValueError( + "Validation failed for minContains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_max_contains( + arg: typing.Any, + max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + max_contains = max_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) > max_contains: + raise exceptions.ApiValueError( + "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " + "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_const( + arg: typing.Any, + const_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in const_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) + return None + + +def validate_dependent_required( + arg: typing.Any, + dependent_required: typing.Mapping[str, typing.Set[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + for key, keys_that_must_exist in dependent_required.items(): + if key not in arg: + continue + missing_keys = keys_that_must_exist - arg.keys() + if missing_keys: + raise exceptions.ApiValueError( + f"Validation failed for dependentRequired because these_keys={missing_keys} are " + f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" + ) + return None + + +def validate_dependent_schemas( + arg: typing.Any, + dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for key, schema in dependent_schemas.items(): + if key not in arg: + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_property_names( + arg: typing.Any, + property_names_schema: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + module_namespace = vars(sys.modules[cls.__module__]) + property_names_schema = _get_class(property_names_schema, module_namespace) + for key in arg.keys(): + path_to_item = validation_metadata.path_to_item + (key,) + key_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + property_names_schema._validate(key, validation_metadata=key_validation_metadata) + return None + + +def _get_validated_pattern_properties( + arg: typing.Any, + pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, property_value in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + for pattern_info, schema in pattern_properties.items(): + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, property_name, flags=flags): + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_pattern_properties( + arg: typing.Any, + pattern_properties_validation_results: typing.Tuple[ + typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + validation_results = pattern_properties_validation_results[1] + return validation_results + + +def validate_prefix_items( + arg: typing.Any, + prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for i, val in enumerate(arg): + if i >= len(prefix_items): + break + schema = _get_class(prefix_items[i], module_namespace) + path_to_item = validation_metadata.path_to_item + (i,) + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_items( + arg: typing.Any, + unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] + for i, val in enumerate(arg): + path_to_item = validation_metadata.path_to_item + (i,) + if path_to_item in validated_path_to_schemas: + continue + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_properties( + arg: typing.Any, + unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] + for property_name, val in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if path_to_item in validated_path_to_schemas: + continue + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] +json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { + 'types': validate_types, + 'enum_value_to_name': validate_enum, + 'unique_items': validate_unique_items, + 'min_items': validate_min_items, + 'max_items': validate_max_items, + 'min_properties': validate_min_properties, + 'max_properties': validate_max_properties, + 'min_length': validate_min_length, + 'max_length': validate_max_length, + 'inclusive_minimum': validate_inclusive_minimum, + 'exclusive_minimum': validate_exclusive_minimum, + 'inclusive_maximum': validate_inclusive_maximum, + 'exclusive_maximum': validate_exclusive_maximum, + 'multiple_of': validate_multiple_of, + 'pattern': validate_pattern, + 'format': validate_format, + 'required': validate_required, + 'items': validate_items, + 'properties': validate_properties, + 'additional_properties': validate_additional_properties, + 'one_of': validate_one_of, + 'any_of': validate_any_of, + 'all_of': validate_all_of, + 'not_': validate_not, + 'discriminator': validate_discriminator, + 'contains': validate_contains, + 'min_contains': validate_min_contains, + 'max_contains': validate_max_contains, + 'const_value_to_name': validate_const, + 'dependent_required': validate_dependent_required, + 'dependent_schemas': validate_dependent_schemas, + 'property_names': validate_property_names, + 'pattern_properties': validate_pattern_properties, + 'prefix_items': validate_prefix_items, + 'unevaluated_items': validate_unevaluated_items, + 'unevaluated_properties': validate_unevaluated_properties, + 'if_': validate_if, + 'then': validate_then, + 'else_': validate_else +} \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py new file mode 100644 index 00000000000..825bd466db0 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py new file mode 100644 index 00000000000..8c7acf580b2 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_basic_test": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py new file mode 100644 index 00000000000..bb588d341e4 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py new file mode 100644 index 00000000000..e264ffe0348 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py @@ -0,0 +1,15 @@ +# coding: utf-8 + +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_basic_test": (), + "api_key": (), +} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py b/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py new file mode 100644 index 00000000000..995189ffe58 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py @@ -0,0 +1,230 @@ +# coding: utf-8 +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import abc +import base64 +import dataclasses +import enum +import typing +import typing_extensions + +from urllib3 import _collections + + +class SecuritySchemeType(enum.Enum): + API_KEY = 'apiKey' + HTTP = 'http' + MUTUAL_TLS = 'mutualTLS' + OAUTH_2 = 'oauth2' + OPENID_CONNECT = 'openIdConnect' + + +class ApiKeyInLocation(enum.Enum): + QUERY = 'query' + HEADER = 'header' + COOKIE = 'cookie' + + +class __SecuritySchemeBase(metaclass=abc.ABCMeta): + @abc.abstractmethod + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + pass + + +@dataclasses.dataclass +class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): + api_key: str # this must be set by the developer + name: str = '' + in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY + type: SecuritySchemeType = SecuritySchemeType.API_KEY + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + if self.in_location is ApiKeyInLocation.COOKIE: + headers.add('Cookie', self.api_key) + elif self.in_location is ApiKeyInLocation.HEADER: + headers.add(self.name, self.api_key) + elif self.in_location is ApiKeyInLocation.QUERY: + # todo add query handling + raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") + return + + +class HTTPSchemeType(enum.Enum): + BASIC = 'basic' + BEARER = 'bearer' + DIGEST = 'digest' + SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + + +@dataclasses.dataclass +class HTTPBasicSecurityScheme(__SecuritySchemeBase): + user_id: str # user name + password: str + scheme: HTTPSchemeType = HTTPSchemeType.BASIC + encoding: str = 'utf-8' + type: SecuritySchemeType = SecuritySchemeType.HTTP + """ + https://www.rfc-editor.org/rfc/rfc7617.html + """ + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + user_pass = f"{self.user_id}:{self.password}" + b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) + headers.add('Authorization', f"Basic {b64_user_pass.decode()}") + + +@dataclasses.dataclass +class HTTPBearerSecurityScheme(__SecuritySchemeBase): + access_token: str + bearer_format: typing.Optional[str] = None + scheme: HTTPSchemeType = HTTPSchemeType.BEARER + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + headers.add('Authorization', f"Bearer {self.access_token}") + + +@dataclasses.dataclass +class HTTPDigestSecurityScheme(__SecuritySchemeBase): + scheme: HTTPSchemeType = HTTPSchemeType.DIGEST + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class MutualTLSSecurityScheme(__SecuritySchemeBase): + type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class ImplicitOAuthFlow: + authorization_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class TokenUrlOauthFlow: + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class AuthorizationCodeOauthFlow: + authorization_url: str + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class OAuthFlows: + implicit: typing.Optional[ImplicitOAuthFlow] = None + password: typing.Optional[TokenUrlOauthFlow] = None + client_credentials: typing.Optional[TokenUrlOauthFlow] = None + authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None + + +class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): + flows: OAuthFlows + type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OAuth2SecurityScheme not yet implemented") + + +class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): + openid_connect_url: str + type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") + +""" +Key is the Security scheme class +Value is the list of scopes +""" +SecurityRequirementObject = typing.TypedDict( + 'SecurityRequirementObject', + { + 'api_key': typing.Tuple[str, ...], + 'bearer_test': typing.Tuple[str, ...], + 'http_basic_test': typing.Tuple[str, ...], + }, + total=False +) \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/server.py b/samples/client/openapi_features/security/python/src/openapi_client/server.py new file mode 100644 index 00000000000..ed9566b28c3 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/server.py @@ -0,0 +1,34 @@ +# coding: utf-8 +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import dataclasses +import typing + +from this_package.schemas import validation, schema + + +@dataclasses.dataclass +class ServerWithoutVariables(abc.ABC): + url: str + + +@dataclasses.dataclass +class ServerWithVariables(abc.ABC): + _url: str + variables: validation.immutabledict[str, str] + variables_schema: typing.Type[schema.Schema] + url: str = dataclasses.field(init=False) + + def __post_init__(self): + url = self._url + assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) + for (key, value) in self.variables.items(): + url = url.replace("{" + key + "}", value) + self.url = url diff --git a/samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py b/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py new file mode 100644 index 00000000000..163695d7390 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + security-test + No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 + The version of the OpenAPI document: 1.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "http://localhost:3000" diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py new file mode 100644 index 00000000000..8358a4052d4 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py @@ -0,0 +1,15 @@ +import decimal +import io +import typing +import typing_extensions + +from this_package import api_client, schemas + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'api_client', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py new file mode 100644 index 00000000000..9abf48185ca --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py @@ -0,0 +1,18 @@ +import datetime +import decimal +import io +import typing +import typing_extensions +import uuid + +from this_package import schemas, api_response + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py new file mode 100644 index 00000000000..0526a2a1c52 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py @@ -0,0 +1,25 @@ +import dataclasses +import datetime +import decimal +import io +import typing +import uuid + +import typing_extensions +import urllib3 + +from this_package import api_client, schemas, api_response + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'typing', + 'uuid', + 'typing_extensions', + 'urllib3', + 'api_client', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py new file mode 100644 index 00000000000..01b3da50dc5 --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py @@ -0,0 +1,28 @@ +import dataclasses +import datetime +import decimal +import io +import numbers +import re +import typing +import typing_extensions +import uuid + +from this_package import schemas +from this_package.configurations import schema_configuration + +U = typing.TypeVar('U') + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'numbers', + 're', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'schema_configuration' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py new file mode 100644 index 00000000000..8bc2580eaec --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py @@ -0,0 +1,12 @@ +import dataclasses +import typing +import typing_extensions + +from this_package import security_schemes + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'security_schemes' +] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py new file mode 100644 index 00000000000..5a77ec9124f --- /dev/null +++ b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py @@ -0,0 +1,13 @@ +import dataclasses +import typing +import typing_extensions + +from this_package import server, schemas + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'server', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index 8ee910d207d..f3ecf886ee8 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -114,7 +114,7 @@ docs/components/schemas/Animal.md docs/components/schemas/AnimalFarm.md docs/components/schemas/AnyTypeAndFormat.md docs/components/schemas/AnyTypeNotString.md -docs/components/schemas/ApiResponseSchema.md +docs/components/schemas/ApiResponse.md docs/components/schemas/Apple.md docs/components/schemas/AppleReq.md docs/components/schemas/ArrayHoldingAnyType.md @@ -127,8 +127,8 @@ docs/components/schemas/Banana.md docs/components/schemas/BananaReq.md docs/components/schemas/Bar.md docs/components/schemas/BasquePig.md +docs/components/schemas/Boolean.md docs/components/schemas/BooleanEnum.md -docs/components/schemas/BooleanSchema.md docs/components/schemas/Capitalization.md docs/components/schemas/Cat.md docs/components/schemas/Category.md @@ -191,8 +191,8 @@ docs/components/schemas/NoAdditionalProperties.md docs/components/schemas/NullableClass.md docs/components/schemas/NullableShape.md docs/components/schemas/NullableString.md +docs/components/schemas/Number.md docs/components/schemas/NumberOnly.md -docs/components/schemas/NumberSchema.md docs/components/schemas/NumberWithExclusiveMinMax.md docs/components/schemas/NumberWithValidations.md docs/components/schemas/ObjWithRequiredProps.md @@ -224,7 +224,7 @@ docs/components/schemas/RefPet.md docs/components/schemas/ReqPropsFromExplicitAddProps.md docs/components/schemas/ReqPropsFromTrueAddProps.md docs/components/schemas/ReqPropsFromUnsetAddProps.md -docs/components/schemas/ReturnSchema.md +docs/components/schemas/Return.md docs/components/schemas/ScaleneTriangle.md docs/components/schemas/Schema200Response.md docs/components/schemas/SelfReferencingArrayModel.md @@ -234,10 +234,10 @@ docs/components/schemas/ShapeOrNull.md docs/components/schemas/SimpleQuadrilateral.md docs/components/schemas/SomeObject.md docs/components/schemas/SpecialModelname.md +docs/components/schemas/String.md docs/components/schemas/StringBooleanMap.md docs/components/schemas/StringEnum.md docs/components/schemas/StringEnumWithDefaultValue.md -docs/components/schemas/StringSchema.md docs/components/schemas/StringWithValidation.md docs/components/schemas/Tag.md docs/components/schemas/Triangle.md @@ -878,7 +878,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java -src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java @@ -891,8 +891,8 @@ src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java +src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java -src/main/java/org/openapijsonschematools/client/components/schemas/BooleanSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java src/main/java/org/openapijsonschematools/client/components/schemas/Category.java @@ -955,8 +955,8 @@ src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalP src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java +src/main/java/org/openapijsonschematools/client/components/schemas/Number.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java -src/main/java/org/openapijsonschematools/client/components/schemas/NumberSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java @@ -988,7 +988,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/RefPet.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java -src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/Return.java src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java @@ -998,10 +998,10 @@ src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.j src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java +src/main/java/org/openapijsonschematools/client/components/schemas/String.java src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java -src/main/java/org/openapijsonschematools/client/components/schemas/StringSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java @@ -1825,6 +1825,9 @@ src/main/java/org/openapijsonschematools/client/servers/ServerWithVariables.java src/main/java/org/openapijsonschematools/client/servers/ServerWithoutVariables.java src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java +src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java +src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/header/ContentHeaderTest.java src/test/java/org/openapijsonschematools/client/header/SchemaHeaderTest.java diff --git a/samples/client/petstore/java/README.md b/samples/client/petstore/java/README.md index 5a29bf2142b..53770b76b62 100644 --- a/samples/client/petstore/java/README.md +++ b/samples/client/petstore/java/README.md @@ -273,13 +273,13 @@ All URIs are relative to the selected server | /fake/refObjInQuery **get** | [Fake.refObjectInQuery](docs/apis/tags/Fake.md#refobjectinquery) [Fakerefobjinquery.get](docs/apis/paths/Fakerefobjinquery.md#get) [FakerefobjinqueryGet.Get.get](docs/paths/fakerefobjinquery/FakerefobjinqueryGet.md#get) | user list | | /fake/refs/array-of-enums **post** | [Fake.arrayOfEnums](docs/apis/tags/Fake.md#arrayofenums) [Fakerefsarrayofenums.post](docs/apis/paths/Fakerefsarrayofenums.md#post) [FakerefsarrayofenumsPost.Post.post](docs/paths/fakerefsarrayofenums/FakerefsarrayofenumsPost.md#post) | Array of Enums | | /fake/refs/arraymodel **post** | [Fake.arrayModel](docs/apis/tags/Fake.md#arraymodel) [Fakerefsarraymodel.post](docs/apis/paths/Fakerefsarraymodel.md#post) [FakerefsarraymodelPost.Post.post](docs/paths/fakerefsarraymodel/FakerefsarraymodelPost.md#post) | | -| /fake/refs/boolean **post** | [Fake.modelBoolean](docs/apis/tags/Fake.md#modelboolean) [Fakerefsboolean.post](docs/apis/paths/Fakerefsboolean.md#post) [FakerefsbooleanPost.Post.post](docs/paths/fakerefsboolean/FakerefsbooleanPost.md#post) | | +| /fake/refs/boolean **post** | [Fake.boolean](docs/apis/tags/Fake.md#boolean) [Fakerefsboolean.post](docs/apis/paths/Fakerefsboolean.md#post) [FakerefsbooleanPost.Post.post](docs/paths/fakerefsboolean/FakerefsbooleanPost.md#post) | | | /fake/refs/composed_one_of_number_with_validations **post** | [Fake.composedOneOfDifferentTypes](docs/apis/tags/Fake.md#composedoneofdifferenttypes) [Fakerefscomposedoneofnumberwithvalidations.post](docs/apis/paths/Fakerefscomposedoneofnumberwithvalidations.md#post) [FakerefscomposedoneofnumberwithvalidationsPost.Post.post](docs/paths/fakerefscomposedoneofnumberwithvalidations/FakerefscomposedoneofnumberwithvalidationsPost.md#post) | | | /fake/refs/enum **post** | [Fake.stringEnum](docs/apis/tags/Fake.md#stringenum) [Fakerefsenum.post](docs/apis/paths/Fakerefsenum.md#post) [FakerefsenumPost.Post.post](docs/paths/fakerefsenum/FakerefsenumPost.md#post) | | | /fake/refs/mammal **post** | [Fake.mammal](docs/apis/tags/Fake.md#mammal) [Fakerefsmammal.post](docs/apis/paths/Fakerefsmammal.md#post) [FakerefsmammalPost.Post.post](docs/paths/fakerefsmammal/FakerefsmammalPost.md#post) | | | /fake/refs/number **post** | [Fake.numberWithValidations](docs/apis/tags/Fake.md#numberwithvalidations) [Fakerefsnumber.post](docs/apis/paths/Fakerefsnumber.md#post) [FakerefsnumberPost.Post.post](docs/paths/fakerefsnumber/FakerefsnumberPost.md#post) | | | /fake/refs/object_model_with_ref_props **post** | [Fake.objectModelWithRefProps](docs/apis/tags/Fake.md#objectmodelwithrefprops) [Fakerefsobjectmodelwithrefprops.post](docs/apis/paths/Fakerefsobjectmodelwithrefprops.md#post) [FakerefsobjectmodelwithrefpropsPost.Post.post](docs/paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#post) | | -| /fake/refs/string **post** | [Fake.modelString](docs/apis/tags/Fake.md#modelstring) [Fakerefsstring.post](docs/apis/paths/Fakerefsstring.md#post) [FakerefsstringPost.Post.post](docs/paths/fakerefsstring/FakerefsstringPost.md#post) | | +| /fake/refs/string **post** | [Fake.string](docs/apis/tags/Fake.md#string) [Fakerefsstring.post](docs/apis/paths/Fakerefsstring.md#post) [FakerefsstringPost.Post.post](docs/paths/fakerefsstring/FakerefsstringPost.md#post) | | | /fake/responseWithoutSchema **get** | [Fake.responseWithoutSchema](docs/apis/tags/Fake.md#responsewithoutschema) [Fakeresponsewithoutschema.get](docs/apis/paths/Fakeresponsewithoutschema.md#get) [FakeresponsewithoutschemaGet.Get.get](docs/paths/fakeresponsewithoutschema/FakeresponsewithoutschemaGet.md#get) | receives a response without schema | | /fake/test-query-paramters **put** | [Fake.queryParameterCollectionFormat](docs/apis/tags/Fake.md#queryparametercollectionformat) [Faketestqueryparamters.put](docs/apis/paths/Faketestqueryparamters.md#put) [FaketestqueryparamtersPut.Put.put](docs/paths/faketestqueryparamters/FaketestqueryparamtersPut.md#put) | | | /fake/uploadDownloadFile **post** | [Fake.uploadDownloadFile](docs/apis/tags/Fake.md#uploaddownloadfile) [Fakeuploaddownloadfile.post](docs/apis/paths/Fakeuploaddownloadfile.md#post) [FakeuploaddownloadfilePost.Post.post](docs/paths/fakeuploaddownloadfile/FakeuploaddownloadfilePost.md#post) | uploads a file and downloads a file using application/octet-stream | @@ -323,7 +323,7 @@ All URIs are relative to the selected server | [AnimalFarm.AnimalFarm1](docs/components/schemas/AnimalFarm.md#animalfarm1) | | | [AnyTypeAndFormat.AnyTypeAndFormat1](docs/components/schemas/AnyTypeAndFormat.md#anytypeandformat1) | | | [AnyTypeNotString.AnyTypeNotString1](docs/components/schemas/AnyTypeNotString.md#anytypenotstring1) | | -| [ApiResponseSchema.ApiResponseSchema1](docs/components/schemas/ApiResponseSchema.md#apiresponseschema1) | | +| [ApiResponse.ApiResponse1](docs/components/schemas/ApiResponse.md#apiresponse1) | | | [ArrayHoldingAnyType.ArrayHoldingAnyType1](docs/components/schemas/ArrayHoldingAnyType.md#arrayholdinganytype1) | | | [ArrayOfArrayOfNumberOnly.ArrayOfArrayOfNumberOnly1](docs/components/schemas/ArrayOfArrayOfNumberOnly.md#arrayofarrayofnumberonly1) | | | [ArrayOfEnums.ArrayOfEnums1](docs/components/schemas/ArrayOfEnums.md#arrayofenums1) | | @@ -332,7 +332,7 @@ All URIs are relative to the selected server | [ArrayWithValidationsInItems.ArrayWithValidationsInItems1](docs/components/schemas/ArrayWithValidationsInItems.md#arraywithvalidationsinitems1) | | | [Bar.Bar1](docs/components/schemas/Bar.md#bar1) | | | [BasquePig.BasquePig1](docs/components/schemas/BasquePig.md#basquepig1) | | -| [BooleanSchema.BooleanSchema1](docs/components/schemas/BooleanSchema.md#booleanschema1) | | +| [Boolean.Boolean1](docs/components/schemas/Boolean.md#boolean1) | | | [BooleanEnum.BooleanEnum1](docs/components/schemas/BooleanEnum.md#booleanenum1) | | | [Capitalization.Capitalization1](docs/components/schemas/Capitalization.md#capitalization1) | | | [Cat.Cat1](docs/components/schemas/Cat.md#cat1) | | @@ -391,7 +391,7 @@ All URIs are relative to the selected server | [NullableClass.NullableClass1](docs/components/schemas/NullableClass.md#nullableclass1) | | | [NullableShape.NullableShape1](docs/components/schemas/NullableShape.md#nullableshape1) | The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) | | [NullableString.NullableString1](docs/components/schemas/NullableString.md#nullablestring1) | | -| [NumberSchema.NumberSchema1](docs/components/schemas/NumberSchema.md#numberschema1) | | +| [Number.Number1](docs/components/schemas/Number.md#number1) | | | [NumberOnly.NumberOnly1](docs/components/schemas/NumberOnly.md#numberonly1) | | | [NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1](docs/components/schemas/NumberWithExclusiveMinMax.md#numberwithexclusiveminmax1) | | | [NumberWithValidations.NumberWithValidations1](docs/components/schemas/NumberWithValidations.md#numberwithvalidations1) | | @@ -424,7 +424,7 @@ All URIs are relative to the selected server | [ReqPropsFromExplicitAddProps.ReqPropsFromExplicitAddProps1](docs/components/schemas/ReqPropsFromExplicitAddProps.md#reqpropsfromexplicitaddprops1) | | | [ReqPropsFromTrueAddProps.ReqPropsFromTrueAddProps1](docs/components/schemas/ReqPropsFromTrueAddProps.md#reqpropsfromtrueaddprops1) | | | [ReqPropsFromUnsetAddProps.ReqPropsFromUnsetAddProps1](docs/components/schemas/ReqPropsFromUnsetAddProps.md#reqpropsfromunsetaddprops1) | | -| [ReturnSchema.ReturnSchema1](docs/components/schemas/ReturnSchema.md#returnschema1) | Model for testing reserved words | +| [Return.Return1](docs/components/schemas/Return.md#return1) | Model for testing reserved words | | [ScaleneTriangle.ScaleneTriangle1](docs/components/schemas/ScaleneTriangle.md#scalenetriangle1) | | | [SelfReferencingArrayModel.SelfReferencingArrayModel1](docs/components/schemas/SelfReferencingArrayModel.md#selfreferencingarraymodel1) | | | [SelfReferencingObjectModel.SelfReferencingObjectModel1](docs/components/schemas/SelfReferencingObjectModel.md#selfreferencingobjectmodel1) | | @@ -432,7 +432,7 @@ All URIs are relative to the selected server | [ShapeOrNull.ShapeOrNull1](docs/components/schemas/ShapeOrNull.md#shapeornull1) | The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. | | [SimpleQuadrilateral.SimpleQuadrilateral1](docs/components/schemas/SimpleQuadrilateral.md#simplequadrilateral1) | | | [SomeObject.SomeObject1](docs/components/schemas/SomeObject.md#someobject1) | | -| [StringSchema.StringSchema1](docs/components/schemas/StringSchema.md#stringschema1) | | +| [String.String1](docs/components/schemas/String.md#string1) | | | [StringBooleanMap.StringBooleanMap1](docs/components/schemas/StringBooleanMap.md#stringbooleanmap1) | | | [StringEnum.StringEnum1](docs/components/schemas/StringEnum.md#stringenum1) | | | [StringEnumWithDefaultValue.StringEnumWithDefaultValue1](docs/components/schemas/StringEnumWithDefaultValue.md#stringenumwithdefaultvalue1) | | diff --git a/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md b/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md index 08d970ada80..93ec3379427 100644 --- a/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md +++ b/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md @@ -42,7 +42,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.BooleanSchema; +import org.openapijsonschematools.client.components.schemas.Boolean; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md b/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md index c7875ab8678..45a68b0e7c7 100644 --- a/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md +++ b/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md @@ -42,7 +42,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.StringSchema; +import org.openapijsonschematools.client.components.schemas.String; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/apis/tags/Fake.md b/samples/client/petstore/java/docs/apis/tags/Fake.md index 69b4c83b6d9..4c083bc42e9 100644 --- a/samples/client/petstore/java/docs/apis/tags/Fake.md +++ b/samples/client/petstore/java/docs/apis/tags/Fake.md @@ -26,11 +26,11 @@ public class Fake extends extends ApiClient implements [FakerefsobjectmodelwithrefpropsPost.ObjectModelWithRefPropsOperation](../../paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#objectmodelwithrefpropsoperation), [FakepemcontenttypeGet.PemContentTypeOperation](../../paths/fakepemcontenttype/FakepemcontenttypeGet.md#pemcontenttypeoperation), [FakerefsnumberPost.NumberWithValidationsOperation](../../paths/fakerefsnumber/FakerefsnumberPost.md#numberwithvalidationsoperation), -[FakerefsstringPost.ModelStringOperation](../../paths/fakerefsstring/FakerefsstringPost.md#modelstringoperation), +[FakerefsstringPost.StringOperation](../../paths/fakerefsstring/FakerefsstringPost.md#stringoperation), [FakeinlineadditionalpropertiesPost.InlineAdditionalPropertiesOperation](../../paths/fakeinlineadditionalproperties/FakeinlineadditionalpropertiesPost.md#inlineadditionalpropertiesoperation), [FakerefsmammalPost.MammalOperation](../../paths/fakerefsmammal/FakerefsmammalPost.md#mammaloperation), [SolidusGet.SlashRouteOperation](../../paths/solidus/SolidusGet.md#slashrouteoperation), -[FakerefsbooleanPost.ModelBooleanOperation](../../paths/fakerefsboolean/FakerefsbooleanPost.md#modelbooleanoperation), +[FakerefsbooleanPost.BooleanOperation](../../paths/fakerefsboolean/FakerefsbooleanPost.md#booleanoperation), [FakejsonformdataGet.JsonFormDataOperation](../../paths/fakejsonformdata/FakejsonformdataGet.md#jsonformdataoperation), [Fakeparametercollisions1ababselfabPost.ParameterCollisionsOperation](../../paths/fakeparametercollisions1ababselfab/Fakeparametercollisions1ababselfabPost.md#parametercollisionsoperation), [FakequeryparamwithjsoncontenttypeGet.QueryParamWithJsonContentTypeOperation](../../paths/fakequeryparamwithjsoncontenttype/FakequeryparamwithjsoncontenttypeGet.md#queryparamwithjsoncontenttypeoperation), @@ -75,11 +75,11 @@ an api client class which contains all the routes for tag="fake" | [FakerefsobjectmodelwithrefpropsPostResponses.EndpointResponse](../../paths/fakerefsobjectmodelwithrefprops/post/FakerefsobjectmodelwithrefpropsPostResponses.md#endpointresponse) | [objectModelWithRefProps](#objectmodelwithrefprops)([FakerefsobjectmodelwithrefpropsPost.PostRequest](../../paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#postrequest) request)
          Test serialization of object with $refed properties | | [FakepemcontenttypeGetResponses.EndpointResponse](../../paths/fakepemcontenttype/get/FakepemcontenttypeGetResponses.md#endpointresponse) | [pemContentType](#pemcontenttype)([FakepemcontenttypeGet.GetRequest](../../paths/fakepemcontenttype/FakepemcontenttypeGet.md#getrequest) request) | | [FakerefsnumberPostResponses.EndpointResponse](../../paths/fakerefsnumber/post/FakerefsnumberPostResponses.md#endpointresponse) | [numberWithValidations](#numberwithvalidations)([FakerefsnumberPost.PostRequest](../../paths/fakerefsnumber/FakerefsnumberPost.md#postrequest) request)
          Test serialization of outer number types | -| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | [modelString](#modelstring)([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request)
          Test serialization of outer string types | +| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | [string](#string)([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request)
          Test serialization of outer string types | | [FakeinlineadditionalpropertiesPostResponses.EndpointResponse](../../paths/fakeinlineadditionalproperties/post/FakeinlineadditionalpropertiesPostResponses.md#endpointresponse) | [inlineAdditionalProperties](#inlineadditionalproperties)([FakeinlineadditionalpropertiesPost.PostRequest](../../paths/fakeinlineadditionalproperties/FakeinlineadditionalpropertiesPost.md#postrequest) request)
          | | [FakerefsmammalPostResponses.EndpointResponse](../../paths/fakerefsmammal/post/FakerefsmammalPostResponses.md#endpointresponse) | [mammal](#mammal)([FakerefsmammalPost.PostRequest](../../paths/fakerefsmammal/FakerefsmammalPost.md#postrequest) request)
          Test serialization of mammals | | [SolidusGetResponses.EndpointResponse](../../paths/solidus/get/SolidusGetResponses.md#endpointresponse) | [slashRoute](#slashroute)([SolidusGet.GetRequest](../../paths/solidus/SolidusGet.md#getrequest) request) | -| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | [modelBoolean](#modelboolean)([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request)
          Test serialization of outer boolean types | +| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | [boolean](#boolean)([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request)
          Test serialization of outer boolean types | | [FakejsonformdataGetResponses.EndpointResponse](../../paths/fakejsonformdata/get/FakejsonformdataGetResponses.md#endpointresponse) | [jsonFormData](#jsonformdata)([FakejsonformdataGet.GetRequest](../../paths/fakejsonformdata/FakejsonformdataGet.md#getrequest) request)
          | | [Fakeparametercollisions1ababselfabPostResponses.EndpointResponse](../../paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostResponses.md#endpointresponse) | [parameterCollisions](#parametercollisions)([Fakeparametercollisions1ababselfabPost.PostRequest](../../paths/fakeparametercollisions1ababselfab/Fakeparametercollisions1ababselfabPost.md#postrequest) request) | | [FakequeryparamwithjsoncontenttypeGetResponses.EndpointResponse](../../paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetResponses.md#endpointresponse) | [queryParamWithJsonContentType](#queryparamwithjsoncontenttype)([FakequeryparamwithjsoncontenttypeGet.GetRequest](../../paths/fakequeryparamwithjsoncontenttype/FakequeryparamwithjsoncontenttypeGet.md#getrequest) request) | @@ -2555,8 +2555,8 @@ FakerefsnumberPostResponses.EndpointFakerefsnumberPostCode200Response castRespon FakerefsnumberPostCode200Response.ApplicationjsonResponseBody deserializedBody = (FakerefsnumberPostCode200Response.ApplicationjsonResponseBody) castResponse.body; // handle deserialized body here ``` -### modelString -public [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) modelString([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request) +### string +public [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) string([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request) Test serialization of outer string types @@ -2585,7 +2585,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.StringSchema; +import org.openapijsonschematools.client.components.schemas.String; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -2930,8 +2930,8 @@ try { } SolidusGetResponses.EndpointSolidusGetCode200Response castResponse = (SolidusGetResponses.EndpointSolidusGetCode200Response) response; ``` -### modelBoolean -public [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) modelBoolean([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request) +### boolean +public [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) boolean([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request) Test serialization of outer boolean types @@ -2960,7 +2960,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.BooleanSchema; +import org.openapijsonschematools.client.components.schemas.Boolean; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md b/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md index 9c2ac509e44..a3a31972a37 100644 --- a/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md +++ b/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md @@ -59,12 +59,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponse1Boxed](../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | ## SuccessWithJsonApiResponse1 public static class SuccessWithJsonApiResponse1
          diff --git a/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md index a340ff691f7..9509b66a669 100644 --- a/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponseSchema1](../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) +extends [ApiResponse1](../../../../../components/schemas/ApiResponse.md#apiresponse) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponseSchema.ApiResponseSchema1](../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) +extends [ApiResponse.ApiResponse1](../../../../../components/schemas/ApiResponse.md#apiresponse1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md index d5040963ffc..222ada78836 100644 --- a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md +++ b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md @@ -17,22 +17,22 @@ A class that contains necessary nested | static class | [AnyTypeAndFormat.AnyTypeAndFormat1](#anytypeandformat1)
          schema class | | static class | [AnyTypeAndFormat.AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder)
          builder for Map payloads | | static class | [AnyTypeAndFormat.AnyTypeAndFormatMap](#anytypeandformatmap)
          output class for Map payloads | -| sealed interface | [AnyTypeAndFormat.FloatSchemaBoxed](#floatschemaboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedVoid](#floatschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedBoolean](#floatschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedNumber](#floatschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedString](#floatschemaboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedList](#floatschemaboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.FloatSchemaBoxedMap](#floatschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.FloatSchema](#floatschema)
          schema class | -| sealed interface | [AnyTypeAndFormat.DoubleSchemaBoxed](#doubleschemaboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedVoid](#doubleschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedNumber](#doubleschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedString](#doubleschemaboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedList](#doubleschemaboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.DoubleSchemaBoxedMap](#doubleschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.DoubleSchema](#doubleschema)
          schema class | +| sealed interface | [AnyTypeAndFormat.FloatBoxed](#floatboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.FloatBoxedVoid](#floatboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.FloatBoxedBoolean](#floatboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.FloatBoxedNumber](#floatboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.FloatBoxedString](#floatboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.FloatBoxedList](#floatboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.FloatBoxedMap](#floatboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.Float](#float)
          schema class | +| sealed interface | [AnyTypeAndFormat.DoubleBoxed](#doubleboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.DoubleBoxedVoid](#doubleboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.DoubleBoxedBoolean](#doubleboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.DoubleBoxedNumber](#doubleboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.DoubleBoxedString](#doubleboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.DoubleBoxedList](#doubleboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.DoubleBoxedMap](#doubleboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.Double](#double)
          schema class | | sealed interface | [AnyTypeAndFormat.Int64Boxed](#int64boxed)
          sealed interface for validated payloads | | record | [AnyTypeAndFormat.Int64BoxedVoid](#int64boxedvoid)
          boxed class to store validated null payloads | | record | [AnyTypeAndFormat.Int64BoxedBoolean](#int64boxedboolean)
          boxed class to store validated boolean payloads | @@ -57,14 +57,14 @@ A class that contains necessary nested | record | [AnyTypeAndFormat.BinaryBoxedList](#binaryboxedlist)
          boxed class to store validated List payloads | | record | [AnyTypeAndFormat.BinaryBoxedMap](#binaryboxedmap)
          boxed class to store validated Map payloads | | static class | [AnyTypeAndFormat.Binary](#binary)
          schema class | -| sealed interface | [AnyTypeAndFormat.NumberSchemaBoxed](#numberschemaboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedVoid](#numberschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedBoolean](#numberschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedNumber](#numberschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedString](#numberschemaboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedList](#numberschemaboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.NumberSchemaBoxedMap](#numberschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.NumberSchema](#numberschema)
          schema class | +| sealed interface | [AnyTypeAndFormat.NumberBoxed](#numberboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.NumberBoxedVoid](#numberboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.NumberBoxedBoolean](#numberboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.NumberBoxedNumber](#numberboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.NumberBoxedString](#numberboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.NumberBoxedList](#numberboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.NumberBoxedMap](#numberboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.Number](#number)
          schema class | | sealed interface | [AnyTypeAndFormat.DatetimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [AnyTypeAndFormat.DatetimeBoxedVoid](#datetimeboxedvoid)
          boxed class to store validated null payloads | | record | [AnyTypeAndFormat.DatetimeBoxedBoolean](#datetimeboxedboolean)
          boxed class to store validated boolean payloads | @@ -81,14 +81,14 @@ A class that contains necessary nested | record | [AnyTypeAndFormat.DateBoxedList](#dateboxedlist)
          boxed class to store validated List payloads | | record | [AnyTypeAndFormat.DateBoxedMap](#dateboxedmap)
          boxed class to store validated Map payloads | | static class | [AnyTypeAndFormat.Date](#date)
          schema class | -| sealed interface | [AnyTypeAndFormat.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedVoid](#uuidschemaboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedBoolean](#uuidschemaboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedNumber](#uuidschemaboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedList](#uuidschemaboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.UuidSchemaBoxedMap](#uuidschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.UuidSchema](#uuidschema)
          schema class | +| sealed interface | [AnyTypeAndFormat.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.UuidBoxedVoid](#uuidboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.UuidBoxedBoolean](#uuidboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.UuidBoxedNumber](#uuidboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.UuidBoxedList](#uuidboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.UuidBoxedMap](#uuidboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.Uuid](#uuid)
          schema class | ## AnyTypeAndFormat1Boxed public sealed interface AnyTypeAndFormat1Boxed
          @@ -149,7 +149,7 @@ AnyTypeAndFormat.AnyTypeAndFormatMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("date-time", [Datetime.class](#datetime))),
              new PropertyEntry("number", [NumberSchema.class](#numberschema))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
              new PropertyEntry("float", [FloatSchema.class](#floatschema)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("date-time", [Datetime.class](#datetime))),
              new PropertyEntry("number", [Number.class](#number))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("double", [Double.class](#double))),
              new PropertyEntry("float", [Float.class](#float)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -174,15 +174,15 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(String value) | @@ -201,15 +201,15 @@ A class that builds the Map input type | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(double value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(List value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(String value) | @@ -237,24 +237,24 @@ A class that builds the Map input type | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(double value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(List value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, String value) | @@ -275,35 +275,39 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [AnyTypeAndFormatMap](#anytypeandformatmap) | of([Map](#anytypeandformatmapbuilder) arg, SchemaConfiguration configuration) | +| @Nullable Object | uuid()
          [optional] value must be a uuid | | @Nullable Object | date()
          [optional] value must conform to RFC-3339 full-date YYYY-MM-DD | +| @Nullable Object | number()
          [optional] value must be int or float numeric | | @Nullable Object | binary()
          [optional] | | @Nullable Object | int32()
          [optional] value must be a 32 bit integer | | @Nullable Object | int64()
          [optional] value must be a 64 bit integer | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["uuid"], instance["date-time"], instance["number"], instance["double"], instance["float"], | +| @Nullable Object | double()
          [optional] value must be a 64 bit float | +| @Nullable Object | float()
          [optional] value must be a 32 bit float | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["date-time"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## FloatSchemaBoxed -public sealed interface FloatSchemaBoxed
          +## FloatBoxed +public sealed interface FloatBoxed
          permits
          -[FloatSchemaBoxedVoid](#floatschemaboxedvoid), -[FloatSchemaBoxedBoolean](#floatschemaboxedboolean), -[FloatSchemaBoxedNumber](#floatschemaboxednumber), -[FloatSchemaBoxedString](#floatschemaboxedstring), -[FloatSchemaBoxedList](#floatschemaboxedlist), -[FloatSchemaBoxedMap](#floatschemaboxedmap) +[FloatBoxedVoid](#floatboxedvoid), +[FloatBoxedBoolean](#floatboxedboolean), +[FloatBoxedNumber](#floatboxednumber), +[FloatBoxedString](#floatboxedstring), +[FloatBoxedList](#floatboxedlist), +[FloatBoxedMap](#floatboxedmap) sealed interface that stores validated payloads using boxed classes -## FloatSchemaBoxedVoid -public record FloatSchemaBoxedVoid
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedVoid +public record FloatBoxedVoid
          +implements [FloatBoxed](#floatboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| FloatBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -311,16 +315,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchemaBoxedBoolean -public record FloatSchemaBoxedBoolean
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedBoolean +public record FloatBoxedBoolean
          +implements [FloatBoxed](#floatboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| FloatBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -328,16 +332,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchemaBoxedNumber -public record FloatSchemaBoxedNumber
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedNumber +public record FloatBoxedNumber
          +implements [FloatBoxed](#floatboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| FloatBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -345,16 +349,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchemaBoxedString -public record FloatSchemaBoxedString
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedString +public record FloatBoxedString
          +implements [FloatBoxed](#floatboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedString(String data)
          Creates an instance, private visibility | +| FloatBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -362,16 +366,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchemaBoxedList -public record FloatSchemaBoxedList
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedList +public record FloatBoxedList
          +implements [FloatBoxed](#floatboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| FloatBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -379,16 +383,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchemaBoxedMap -public record FloatSchemaBoxedMap
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedMap +public record FloatBoxedMap
          +implements [FloatBoxed](#floatboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| FloatBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -396,8 +400,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchema -public static class FloatSchema
          +## Float +public static class Float
          extends JsonSchema A schema class that validates payloads @@ -420,37 +424,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedString](#floatschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedVoid](#floatschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedNumber](#floatschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedBoolean](#floatschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedMap](#floatschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedList](#floatschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxed](#floatschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [FloatBoxedString](#floatboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [FloatBoxedVoid](#floatboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [FloatBoxedNumber](#floatboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [FloatBoxedBoolean](#floatboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [FloatBoxedMap](#floatboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [FloatBoxedList](#floatboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [FloatBoxed](#floatboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## DoubleSchemaBoxed -public sealed interface DoubleSchemaBoxed
          +## DoubleBoxed +public sealed interface DoubleBoxed
          permits
          -[DoubleSchemaBoxedVoid](#doubleschemaboxedvoid), -[DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean), -[DoubleSchemaBoxedNumber](#doubleschemaboxednumber), -[DoubleSchemaBoxedString](#doubleschemaboxedstring), -[DoubleSchemaBoxedList](#doubleschemaboxedlist), -[DoubleSchemaBoxedMap](#doubleschemaboxedmap) +[DoubleBoxedVoid](#doubleboxedvoid), +[DoubleBoxedBoolean](#doubleboxedboolean), +[DoubleBoxedNumber](#doubleboxednumber), +[DoubleBoxedString](#doubleboxedstring), +[DoubleBoxedList](#doubleboxedlist), +[DoubleBoxedMap](#doubleboxedmap) sealed interface that stores validated payloads using boxed classes -## DoubleSchemaBoxedVoid -public record DoubleSchemaBoxedVoid
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedVoid +public record DoubleBoxedVoid
          +implements [DoubleBoxed](#doubleboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| DoubleBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -458,16 +462,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchemaBoxedBoolean -public record DoubleSchemaBoxedBoolean
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedBoolean +public record DoubleBoxedBoolean
          +implements [DoubleBoxed](#doubleboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| DoubleBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -475,16 +479,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchemaBoxedNumber -public record DoubleSchemaBoxedNumber
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedNumber +public record DoubleBoxedNumber
          +implements [DoubleBoxed](#doubleboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| DoubleBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -492,16 +496,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchemaBoxedString -public record DoubleSchemaBoxedString
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedString +public record DoubleBoxedString
          +implements [DoubleBoxed](#doubleboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedString(String data)
          Creates an instance, private visibility | +| DoubleBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -509,16 +513,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchemaBoxedList -public record DoubleSchemaBoxedList
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedList +public record DoubleBoxedList
          +implements [DoubleBoxed](#doubleboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| DoubleBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -526,16 +530,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchemaBoxedMap -public record DoubleSchemaBoxedMap
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedMap +public record DoubleBoxedMap
          +implements [DoubleBoxed](#doubleboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| DoubleBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -543,8 +547,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchema -public static class DoubleSchema
          +## Double +public static class Double
          extends JsonSchema A schema class that validates payloads @@ -567,13 +571,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedString](#doubleschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedVoid](#doubleschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedNumber](#doubleschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedMap](#doubleschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedList](#doubleschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxed](#doubleschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [DoubleBoxedString](#doubleboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [DoubleBoxedVoid](#doubleboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [DoubleBoxedNumber](#doubleboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [DoubleBoxedBoolean](#doubleboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [DoubleBoxedMap](#doubleboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [DoubleBoxedList](#doubleboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [DoubleBoxed](#doubleboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Int64Boxed @@ -1017,28 +1021,28 @@ A schema class that validates payloads | [BinaryBoxed](#binaryboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## NumberSchemaBoxed -public sealed interface NumberSchemaBoxed
          +## NumberBoxed +public sealed interface NumberBoxed
          permits
          -[NumberSchemaBoxedVoid](#numberschemaboxedvoid), -[NumberSchemaBoxedBoolean](#numberschemaboxedboolean), -[NumberSchemaBoxedNumber](#numberschemaboxednumber), -[NumberSchemaBoxedString](#numberschemaboxedstring), -[NumberSchemaBoxedList](#numberschemaboxedlist), -[NumberSchemaBoxedMap](#numberschemaboxedmap) +[NumberBoxedVoid](#numberboxedvoid), +[NumberBoxedBoolean](#numberboxedboolean), +[NumberBoxedNumber](#numberboxednumber), +[NumberBoxedString](#numberboxedstring), +[NumberBoxedList](#numberboxedlist), +[NumberBoxedMap](#numberboxedmap) sealed interface that stores validated payloads using boxed classes -## NumberSchemaBoxedVoid -public record NumberSchemaBoxedVoid
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedVoid +public record NumberBoxedVoid
          +implements [NumberBoxed](#numberboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| NumberBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1046,16 +1050,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchemaBoxedBoolean -public record NumberSchemaBoxedBoolean
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedBoolean +public record NumberBoxedBoolean
          +implements [NumberBoxed](#numberboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| NumberBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1063,16 +1067,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchemaBoxedNumber -public record NumberSchemaBoxedNumber
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedNumber +public record NumberBoxedNumber
          +implements [NumberBoxed](#numberboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| NumberBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1080,16 +1084,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchemaBoxedString -public record NumberSchemaBoxedString
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedString +public record NumberBoxedString
          +implements [NumberBoxed](#numberboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedString(String data)
          Creates an instance, private visibility | +| NumberBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1097,16 +1101,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchemaBoxedList -public record NumberSchemaBoxedList
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedList +public record NumberBoxedList
          +implements [NumberBoxed](#numberboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| NumberBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1114,16 +1118,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchemaBoxedMap -public record NumberSchemaBoxedMap
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedMap +public record NumberBoxedMap
          +implements [NumberBoxed](#numberboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| NumberBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1131,8 +1135,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchema -public static class NumberSchema
          +## Number +public static class Number
          extends JsonSchema A schema class that validates payloads @@ -1155,13 +1159,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedString](#numberschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedVoid](#numberschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedNumber](#numberschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedBoolean](#numberschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedMap](#numberschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedList](#numberschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxed](#numberschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [NumberBoxedString](#numberboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [NumberBoxedVoid](#numberboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [NumberBoxedNumber](#numberboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [NumberBoxedBoolean](#numberboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [NumberBoxedMap](#numberboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [NumberBoxedList](#numberboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [NumberBoxed](#numberboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## DatetimeBoxed @@ -1458,28 +1462,28 @@ A schema class that validates payloads | [DateBoxed](#dateboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## UuidSchemaBoxed -public sealed interface UuidSchemaBoxed
          +## UuidBoxed +public sealed interface UuidBoxed
          permits
          -[UuidSchemaBoxedVoid](#uuidschemaboxedvoid), -[UuidSchemaBoxedBoolean](#uuidschemaboxedboolean), -[UuidSchemaBoxedNumber](#uuidschemaboxednumber), -[UuidSchemaBoxedString](#uuidschemaboxedstring), -[UuidSchemaBoxedList](#uuidschemaboxedlist), -[UuidSchemaBoxedMap](#uuidschemaboxedmap) +[UuidBoxedVoid](#uuidboxedvoid), +[UuidBoxedBoolean](#uuidboxedboolean), +[UuidBoxedNumber](#uuidboxednumber), +[UuidBoxedString](#uuidboxedstring), +[UuidBoxedList](#uuidboxedlist), +[UuidBoxedMap](#uuidboxedmap) sealed interface that stores validated payloads using boxed classes -## UuidSchemaBoxedVoid -public record UuidSchemaBoxedVoid
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedVoid +public record UuidBoxedVoid
          +implements [UuidBoxed](#uuidboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | +| UuidBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1487,16 +1491,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchemaBoxedBoolean -public record UuidSchemaBoxedBoolean
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedBoolean +public record UuidBoxedBoolean
          +implements [UuidBoxed](#uuidboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| UuidBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1504,16 +1508,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchemaBoxedNumber -public record UuidSchemaBoxedNumber
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedNumber +public record UuidBoxedNumber
          +implements [UuidBoxed](#uuidboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| UuidBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1521,16 +1525,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchemaBoxedString -public record UuidSchemaBoxedString
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedString +public record UuidBoxedString
          +implements [UuidBoxed](#uuidboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | +| UuidBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1538,16 +1542,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchemaBoxedList -public record UuidSchemaBoxedList
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedList +public record UuidBoxedList
          +implements [UuidBoxed](#uuidboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| UuidBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1555,16 +1559,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchemaBoxedMap -public record UuidSchemaBoxedMap
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedMap +public record UuidBoxedMap
          +implements [UuidBoxed](#uuidboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| UuidBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1572,8 +1576,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchema -public static class UuidSchema
          +## Uuid +public static class Uuid
          extends JsonSchema A schema class that validates payloads @@ -1596,13 +1600,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedString](#uuidschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedVoid](#uuidschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedNumber](#uuidschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedBoolean](#uuidschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedMap](#uuidschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxedList](#uuidschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [UuidSchemaBoxed](#uuidschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [UuidBoxedString](#uuidboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [UuidBoxedVoid](#uuidboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [UuidBoxedNumber](#uuidboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [UuidBoxedBoolean](#uuidboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [UuidBoxedMap](#uuidboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [UuidBoxedList](#uuidboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [UuidBoxed](#uuidboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/ApiResponse.md b/samples/client/petstore/java/docs/components/schemas/ApiResponse.md new file mode 100644 index 00000000000..2c04cf5601c --- /dev/null +++ b/samples/client/petstore/java/docs/components/schemas/ApiResponse.md @@ -0,0 +1,254 @@ +# ApiResponse +org.openapijsonschematools.client.components.schemas.ApiResponse.java +public class ApiResponse
          + +A class that contains necessary nested +- schema classes (which validate payloads), extends JsonSchema +- sealed interfaces which store validated payloads, java version of a sum type +- boxed classes which store validated payloads, sealed permits class implementations +- classes to store validated map payloads, extends FrozenMap +- classes to build inputs for map payloads + +## Nested Class Summary +| Modifier and Type | Class and Description | +| ----------------- | ---------------------- | +| sealed interface | [ApiResponse.ApiResponse1Boxed](#apiresponse1boxed)
          sealed interface for validated payloads | +| record | [ApiResponse.ApiResponse1BoxedMap](#apiresponse1boxedmap)
          boxed class to store validated Map payloads | +| static class | [ApiResponse.ApiResponse1](#apiresponse1)
          schema class | +| static class | [ApiResponse.ApiResponseMapBuilder](#apiresponsemapbuilder)
          builder for Map payloads | +| static class | [ApiResponse.ApiResponseMap](#apiresponsemap)
          output class for Map payloads | +| sealed interface | [ApiResponse.MessageBoxed](#messageboxed)
          sealed interface for validated payloads | +| record | [ApiResponse.MessageBoxedString](#messageboxedstring)
          boxed class to store validated String payloads | +| static class | [ApiResponse.Message](#message)
          schema class | +| sealed interface | [ApiResponse.TypeBoxed](#typeboxed)
          sealed interface for validated payloads | +| record | [ApiResponse.TypeBoxedString](#typeboxedstring)
          boxed class to store validated String payloads | +| static class | [ApiResponse.Type](#type)
          schema class | +| sealed interface | [ApiResponse.CodeBoxed](#codeboxed)
          sealed interface for validated payloads | +| record | [ApiResponse.CodeBoxedNumber](#codeboxednumber)
          boxed class to store validated Number payloads | +| static class | [ApiResponse.Code](#code)
          schema class | + +## ApiResponse1Boxed +public sealed interface ApiResponse1Boxed
          +permits
          +[ApiResponse1BoxedMap](#apiresponse1boxedmap) + +sealed interface that stores validated payloads using boxed classes + +## ApiResponse1BoxedMap +public record ApiResponse1BoxedMap
          +implements [ApiResponse1Boxed](#apiresponse1boxed) + +record that stores validated Map payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| ApiResponse1BoxedMap([ApiResponseMap](#apiresponsemap) data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| [ApiResponseMap](#apiresponsemap) | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## ApiResponse1 +public static class ApiResponse1
          +extends JsonSchema + +A schema class that validates payloads + +### Code Sample +``` +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.ApiResponse; + +import java.util.Arrays; +import java.util.List; +import java.util.AbstractMap; + +static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + +// Map validation +ApiResponse.ApiResponseMap validatedPayload = + ApiResponse.ApiResponse1.validate( + new ApiResponse.ApiResponseMapBuilder() + .code(1) + + .type("a") + + .message("a") + + .build(), + configuration +); +``` + +### Field Summary +| Modifier and Type | Field and Description | +| ----------------- | ---------------------- | +| Set> | type = Set.of(Map.class) | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("code", [Code.class](#code))),
              new PropertyEntry("type", [Type.class](#type))),
              new PropertyEntry("message", [Message.class](#message)))
          )
          | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| [ApiResponseMap](#apiresponsemap) | validate([Map<?, ?>](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | +| [ApiResponse1BoxedMap](#apiresponse1boxedmap) | validateAndBox([Map<?, ?>](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | +| [ApiResponse1Boxed](#apiresponse1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | + +## ApiResponseMapBuilder +public class ApiResponseMapBuilder
          +builder for `Map` + +A class that builds the Map input type + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| ApiResponseMapBuilder()
          Creates a builder that contains an empty map | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Map | build()
          Returns map input that should be used with Schema.validate | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | code(int value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | code(float value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | type(String value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | message(String value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, Void value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, boolean value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, String value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, int value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, float value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, long value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, double value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, List value) | +| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, Map value) | + +## ApiResponseMap +public static class ApiResponseMap
          +extends FrozenMap + +A class to store validated Map payloads + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| static [ApiResponseMap](#apiresponsemap) | of([Map](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | +| Number | code()
          [optional] value must be a 32 bit integer | +| String | type()
          [optional] | +| String | message()
          [optional] | +| @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | + +## MessageBoxed +public sealed interface MessageBoxed
          +permits
          +[MessageBoxedString](#messageboxedstring) + +sealed interface that stores validated payloads using boxed classes + +## MessageBoxedString +public record MessageBoxedString
          +implements [MessageBoxed](#messageboxed) + +record that stores validated String payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| MessageBoxedString(String data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| String | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Message +public static class Message
          +extends StringJsonSchema.StringJsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +## TypeBoxed +public sealed interface TypeBoxed
          +permits
          +[TypeBoxedString](#typeboxedstring) + +sealed interface that stores validated payloads using boxed classes + +## TypeBoxedString +public record TypeBoxedString
          +implements [TypeBoxed](#typeboxed) + +record that stores validated String payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| TypeBoxedString(String data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| String | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Type +public static class Type
          +extends StringJsonSchema.StringJsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +## CodeBoxed +public sealed interface CodeBoxed
          +permits
          +[CodeBoxedNumber](#codeboxednumber) + +sealed interface that stores validated payloads using boxed classes + +## CodeBoxedNumber +public record CodeBoxedNumber
          +implements [CodeBoxed](#codeboxed) + +record that stores validated Number payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| CodeBoxedNumber(Number data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Number | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Code +public static class Code
          +extends Int32JsonSchema.Int32JsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/Boolean.md b/samples/client/petstore/java/docs/components/schemas/Boolean.md new file mode 100644 index 00000000000..b1352de61ca --- /dev/null +++ b/samples/client/petstore/java/docs/components/schemas/Boolean.md @@ -0,0 +1,52 @@ +# Boolean +org.openapijsonschematools.client.components.schemas.Boolean.java +public class Boolean
          + +A class that contains necessary nested +- schema classes (which validate payloads), extends JsonSchema +- sealed interfaces which store validated payloads, java version of a sum type +- boxed classes which store validated payloads, sealed permits class implementations + +## Nested Class Summary +| Modifier and Type | Class and Description | +| ----------------- | ---------------------- | +| sealed interface | [Boolean.Boolean1Boxed](#boolean1boxed)
          sealed interface for validated payloads | +| record | [Boolean.Boolean1BoxedBoolean](#boolean1boxedboolean)
          boxed class to store validated boolean payloads | +| static class | [Boolean.Boolean1](#boolean1)
          schema class | + +## Boolean1Boxed +public sealed interface Boolean1Boxed
          +permits
          +[Boolean1BoxedBoolean](#boolean1boxedboolean) + +sealed interface that stores validated payloads using boxed classes + +## Boolean1BoxedBoolean +public record Boolean1BoxedBoolean
          +implements [Boolean1Boxed](#boolean1boxed) + +record that stores validated boolean payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Boolean1BoxedBoolean(boolean data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| boolean | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Boolean1 +public static class Boolean1
          +extends BooleanJsonSchema.BooleanJsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/ClassModel.md b/samples/client/petstore/java/docs/components/schemas/ClassModel.md index f73c00b29b0..2b13c142395 100644 --- a/samples/client/petstore/java/docs/components/schemas/ClassModel.md +++ b/samples/client/petstore/java/docs/components/schemas/ClassModel.md @@ -22,9 +22,9 @@ A class that contains necessary nested | static class | [ClassModel.ClassModel1](#classmodel1)
          schema class | | static class | [ClassModel.ClassModelMapBuilder](#classmodelmapbuilder)
          builder for Map payloads | | static class | [ClassModel.ClassModelMap](#classmodelmap)
          output class for Map payloads | -| sealed interface | [ClassModel.ClassSchemaBoxed](#classschemaboxed)
          sealed interface for validated payloads | -| record | [ClassModel.ClassSchemaBoxedString](#classschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [ClassModel.ClassSchema](#classschema)
          schema class | +| sealed interface | [ClassModel.ClassBoxed](#classboxed)
          sealed interface for validated payloads | +| record | [ClassModel.ClassBoxedString](#classboxedstring)
          boxed class to store validated String payloads | +| static class | [ClassModel.Class](#class)
          schema class | ## ClassModel1Boxed public sealed interface ClassModel1Boxed
          @@ -152,7 +152,7 @@ Model for testing model with "_class" property ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("_class", [ClassSchema.class](#classschema)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("_class", [Class.class](#class)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -215,23 +215,23 @@ A class to store validated Map payloads | @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["_class"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## ClassSchemaBoxed -public sealed interface ClassSchemaBoxed
          +## ClassBoxed +public sealed interface ClassBoxed
          permits
          -[ClassSchemaBoxedString](#classschemaboxedstring) +[ClassBoxedString](#classboxedstring) sealed interface that stores validated payloads using boxed classes -## ClassSchemaBoxedString -public record ClassSchemaBoxedString
          -implements [ClassSchemaBoxed](#classschemaboxed) +## ClassBoxedString +public record ClassBoxedString
          +implements [ClassBoxed](#classboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ClassSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ClassBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,8 +239,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ClassSchema -public static class ClassSchema
          +## Class +public static class Class
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/FormatTest.md b/samples/client/petstore/java/docs/components/schemas/FormatTest.md index 1d986b4ed3c..fb49c6e5d18 100644 --- a/samples/client/petstore/java/docs/components/schemas/FormatTest.md +++ b/samples/client/petstore/java/docs/components/schemas/FormatTest.md @@ -34,9 +34,9 @@ A class that contains necessary nested | sealed interface | [FormatTest.UuidNoExampleBoxed](#uuidnoexampleboxed)
          sealed interface for validated payloads | | record | [FormatTest.UuidNoExampleBoxedString](#uuidnoexampleboxedstring)
          boxed class to store validated String payloads | | static class | [FormatTest.UuidNoExample](#uuidnoexample)
          schema class | -| sealed interface | [FormatTest.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.UuidSchema](#uuidschema)
          schema class | +| sealed interface | [FormatTest.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | +| record | [FormatTest.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.Uuid](#uuid)
          schema class | | sealed interface | [FormatTest.DateTimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [FormatTest.DateTimeBoxedString](#datetimeboxedstring)
          boxed class to store validated String payloads | | static class | [FormatTest.DateTime](#datetime)
          schema class | @@ -45,12 +45,12 @@ A class that contains necessary nested | static class | [FormatTest.Date](#date)
          schema class | | sealed interface | [FormatTest.BinaryBoxed](#binaryboxed)
          sealed interface for validated payloads | | static class | [FormatTest.Binary](#binary)
          schema class | -| sealed interface | [FormatTest.ByteSchemaBoxed](#byteschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.ByteSchemaBoxedString](#byteschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.ByteSchema](#byteschema)
          schema class | -| sealed interface | [FormatTest.StringSchemaBoxed](#stringschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.StringSchemaBoxedString](#stringschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.StringSchema](#stringschema)
          schema class | +| sealed interface | [FormatTest.ByteBoxed](#byteboxed)
          sealed interface for validated payloads | +| record | [FormatTest.ByteBoxedString](#byteboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.Byte](#byte)
          schema class | +| sealed interface | [FormatTest.StringBoxed](#stringboxed)
          sealed interface for validated payloads | +| record | [FormatTest.StringBoxedString](#stringboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.String](#string)
          schema class | | sealed interface | [FormatTest.ArrayWithUniqueItemsBoxed](#arraywithuniqueitemsboxed)
          sealed interface for validated payloads | | record | [FormatTest.ArrayWithUniqueItemsBoxedList](#arraywithuniqueitemsboxedlist)
          boxed class to store validated List payloads | | static class | [FormatTest.ArrayWithUniqueItems](#arraywithuniqueitems)
          schema class | @@ -62,18 +62,18 @@ A class that contains necessary nested | sealed interface | [FormatTest.Float64Boxed](#float64boxed)
          sealed interface for validated payloads | | record | [FormatTest.Float64BoxedNumber](#float64boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Float64](#float64)
          schema class | -| sealed interface | [FormatTest.DoubleSchemaBoxed](#doubleschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.DoubleSchemaBoxedNumber](#doubleschemaboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.DoubleSchema](#doubleschema)
          schema class | +| sealed interface | [FormatTest.DoubleBoxed](#doubleboxed)
          sealed interface for validated payloads | +| record | [FormatTest.DoubleBoxedNumber](#doubleboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.Double](#double)
          schema class | | sealed interface | [FormatTest.Float32Boxed](#float32boxed)
          sealed interface for validated payloads | | record | [FormatTest.Float32BoxedNumber](#float32boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Float32](#float32)
          schema class | -| sealed interface | [FormatTest.FloatSchemaBoxed](#floatschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.FloatSchemaBoxedNumber](#floatschemaboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.FloatSchema](#floatschema)
          schema class | -| sealed interface | [FormatTest.NumberSchemaBoxed](#numberschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.NumberSchemaBoxedNumber](#numberschemaboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.NumberSchema](#numberschema)
          schema class | +| sealed interface | [FormatTest.FloatBoxed](#floatboxed)
          sealed interface for validated payloads | +| record | [FormatTest.FloatBoxedNumber](#floatboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.Float](#float)
          schema class | +| sealed interface | [FormatTest.NumberBoxed](#numberboxed)
          sealed interface for validated payloads | +| record | [FormatTest.NumberBoxedNumber](#numberboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.Number](#number)
          schema class | | sealed interface | [FormatTest.Int64Boxed](#int64boxed)
          sealed interface for validated payloads | | record | [FormatTest.Int64BoxedNumber](#int64boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Int64](#int64)
          schema class | @@ -83,9 +83,9 @@ A class that contains necessary nested | sealed interface | [FormatTest.Int32Boxed](#int32boxed)
          sealed interface for validated payloads | | record | [FormatTest.Int32BoxedNumber](#int32boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Int32](#int32)
          schema class | -| sealed interface | [FormatTest.IntegerSchemaBoxed](#integerschemaboxed)
          sealed interface for validated payloads | -| record | [FormatTest.IntegerSchemaBoxedNumber](#integerschemaboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.IntegerSchema](#integerschema)
          schema class | +| sealed interface | [FormatTest.IntegerBoxed](#integerboxed)
          sealed interface for validated payloads | +| record | [FormatTest.IntegerBoxedNumber](#integerboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.Integer](#integer)
          schema class | ## FormatTest1Boxed public sealed interface FormatTest1Boxed
          @@ -137,15 +137,15 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso FormatTest.FormatTestMap validatedPayload = FormatTest.FormatTest1.validate( new FormatTest.FormatTestMapBuilder() - .setByte("a") + .byte("a") .date("2020-12-13") - .setNumber(1) + .number(1) .password("a") - .setInteger(1) + .integer(1) .int32(1) @@ -153,11 +153,11 @@ FormatTest.FormatTestMap validatedPayload = .int64(1L) - .setFloat(3.14f) + .float(3.14f) .float32(3.14f) - .setDouble(3.14d) + .double(3.14d) .float64(3.14d) @@ -166,13 +166,13 @@ FormatTest.FormatTestMap validatedPayload = 1 ) ) - .setString("A") + .string("A") .binary("a") .dateTime("1970-01-01T00:00:00.00Z") - .setUuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") + .uuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") .uuidNoExample("046b6c7f-0b8a-43b9-b35d-6489e6daee91") @@ -191,7 +191,7 @@ FormatTest.FormatTestMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("number", [NumberSchema.class](#numberschema))),
              new PropertyEntry("float", [FloatSchema.class](#floatschema))),
              new PropertyEntry("float32", [Float32.class](#float32))),
              new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
              new PropertyEntry("float64", [Float64.class](#float64))),
              new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
              new PropertyEntry("string", [StringSchema.class](#stringschema))),
              new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
              new PropertyEntry("password", [Password.class](#password))),
              new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
              new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
              new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("integer", [Integer.class](#integer))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("number", [Number.class](#number))),
              new PropertyEntry("float", [Float.class](#float))),
              new PropertyEntry("float32", [Float32.class](#float32))),
              new PropertyEntry("double", [Double.class](#double))),
              new PropertyEntry("float64", [Float64.class](#float64))),
              new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
              new PropertyEntry("string", [String.class](#string))),
              new PropertyEntry("byte", [Byte.class](#byte))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
              new PropertyEntry("password", [Password.class](#password))),
              new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
              new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
              new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
          )
          | | Set | required = Set.of(
              "byte",
              "date",
              "number",
              "password"
          )
          | ### Method Summary @@ -217,10 +217,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32withValidations(int value) | @@ -229,27 +229,27 @@ A class that builds the Map input type | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(double value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | float(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | float(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | float(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | float(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(double value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | double(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | double(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | double(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | double(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | arrayWithUniqueItems(List value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setString(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | string(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | binary(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | dateTime(String value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setUuid(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | uuid(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | uuidNoExample(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | pattern_with_digits(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | pattern_with_digits_and_delimiter(String value) | @@ -294,10 +294,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | number(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | number(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | number(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | number(double value) | ## FormatTestMap0011Builder public class FormatTestMap0011Builder
          @@ -313,10 +313,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(int value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(float value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(long value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(double value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | number(int value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | number(float value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | number(long value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | number(double value) | | [FormatTestMap0010Builder](#formattestmap0010builder) | password(String value) | ## FormatTestMap0100Builder @@ -367,10 +367,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [FormatTestMap0010Builder](#formattestmap0010builder) | date(String value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(int value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(float value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(long value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(double value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | number(int value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | number(float value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | number(long value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | number(double value) | ## FormatTestMap0111Builder public class FormatTestMap0111Builder
          @@ -387,10 +387,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [FormatTestMap0011Builder](#formattestmap0011builder) | date(String value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(int value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(float value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(long value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(double value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | number(int value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | number(float value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | number(long value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | number(double value) | | [FormatTestMap0110Builder](#formattestmap0110builder) | password(String value) | ## FormatTestMap1000Builder @@ -407,7 +407,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0000Builder](#formattestmap0000builder) | setByte(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | byte(String value) | ## FormatTestMap1001Builder public class FormatTestMap1001Builder
          @@ -423,7 +423,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0001Builder](#formattestmap0001builder) | setByte(String value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | byte(String value) | | [FormatTestMap1000Builder](#formattestmap1000builder) | password(String value) | ## FormatTestMap1010Builder @@ -440,11 +440,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0010Builder](#formattestmap0010builder) | setByte(String value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(int value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(float value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(long value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(double value) | +| [FormatTestMap0010Builder](#formattestmap0010builder) | byte(String value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | number(int value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | number(float value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | number(long value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | number(double value) | ## FormatTestMap1011Builder public class FormatTestMap1011Builder
          @@ -460,11 +460,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0011Builder](#formattestmap0011builder) | setByte(String value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(int value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(float value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(long value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(double value) | +| [FormatTestMap0011Builder](#formattestmap0011builder) | byte(String value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | number(int value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | number(float value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | number(long value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | number(double value) | | [FormatTestMap1010Builder](#formattestmap1010builder) | password(String value) | ## FormatTestMap1100Builder @@ -481,7 +481,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0100Builder](#formattestmap0100builder) | setByte(String value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | byte(String value) | | [FormatTestMap1000Builder](#formattestmap1000builder) | date(String value) | ## FormatTestMap1101Builder @@ -498,7 +498,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0101Builder](#formattestmap0101builder) | setByte(String value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | byte(String value) | | [FormatTestMap1001Builder](#formattestmap1001builder) | date(String value) | | [FormatTestMap1100Builder](#formattestmap1100builder) | password(String value) | @@ -516,12 +516,12 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0110Builder](#formattestmap0110builder) | setByte(String value) | +| [FormatTestMap0110Builder](#formattestmap0110builder) | byte(String value) | | [FormatTestMap1010Builder](#formattestmap1010builder) | date(String value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(int value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(float value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(long value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(double value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | number(int value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | number(float value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | number(long value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | number(double value) | ## FormatTestMapBuilder public class FormatTestMapBuilder
          @@ -537,12 +537,12 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0111Builder](#formattestmap0111builder) | setByte(String value) | +| [FormatTestMap0111Builder](#formattestmap0111builder) | byte(String value) | | [FormatTestMap1011Builder](#formattestmap1011builder) | date(String value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(int value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(float value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(long value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(double value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | number(int value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | number(float value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | number(long value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | number(double value) | | [FormatTestMap1110Builder](#formattestmap1110builder) | password(String value) | ## FormatTestMap @@ -555,21 +555,27 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [FormatTestMap](#formattestmap) | of([Map](#formattestmapbuilder) arg, SchemaConfiguration configuration) | +| String | byte()
          | | String | date()
          value must conform to RFC-3339 full-date YYYY-MM-DD | +| Number | number()
          | | String | password()
          | +| Number | integer()
          [optional] | | Number | int32()
          [optional] value must be a 32 bit integer | | Number | int32withValidations()
          [optional] value must be a 32 bit integer | | Number | int64()
          [optional] value must be a 64 bit integer | +| Number | float()
          [optional] value must be a 32 bit float | | Number | float32()
          [optional] value must be a 32 bit float | +| Number | double()
          [optional] value must be a 64 bit float | | Number | float64()
          [optional] value must be a 64 bit float | | [ArrayWithUniqueItemsList](#arraywithuniqueitemslist) | arrayWithUniqueItems()
          [optional] | +| String | string()
          [optional] | | String | binary()
          [optional] | | String | dateTime()
          [optional] value must conform to RFC-3339 date-time | +| String | uuid()
          [optional] value must be a uuid | | String | uuidNoExample()
          [optional] value must be a uuid | | String | pattern_with_digits()
          [optional] | | String | pattern_with_digits_and_delimiter()
          [optional] | | Void | noneProp()
          [optional] | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["byte"], instance["number"], instance["integer"], instance["float"], instance["double"], instance["string"], instance["uuid"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## NonePropBoxed @@ -851,23 +857,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## UuidSchemaBoxed -public sealed interface UuidSchemaBoxed
          +## UuidBoxed +public sealed interface UuidBoxed
          permits
          -[UuidSchemaBoxedString](#uuidschemaboxedstring) +[UuidBoxedString](#uuidboxedstring) sealed interface that stores validated payloads using boxed classes -## UuidSchemaBoxedString -public record UuidSchemaBoxedString
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedString +public record UuidBoxedString
          +implements [UuidBoxed](#uuidboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | +| UuidBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -875,8 +881,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchema -public static class UuidSchema
          +## Uuid +public static class Uuid
          extends UuidJsonSchema.UuidJsonSchema1 A schema class that validates payloads @@ -968,23 +974,23 @@ extends JsonSchema A schema class that validates payloads -## ByteSchemaBoxed -public sealed interface ByteSchemaBoxed
          +## ByteBoxed +public sealed interface ByteBoxed
          permits
          -[ByteSchemaBoxedString](#byteschemaboxedstring) +[ByteBoxedString](#byteboxedstring) sealed interface that stores validated payloads using boxed classes -## ByteSchemaBoxedString -public record ByteSchemaBoxedString
          -implements [ByteSchemaBoxed](#byteschemaboxed) +## ByteBoxedString +public record ByteBoxedString
          +implements [ByteBoxed](#byteboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ByteSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ByteBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -992,29 +998,29 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ByteSchema -public static class ByteSchema
          +## Byte +public static class Byte
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -## StringSchemaBoxed -public sealed interface StringSchemaBoxed
          +## StringBoxed +public sealed interface StringBoxed
          permits
          -[StringSchemaBoxedString](#stringschemaboxedstring) +[StringBoxedString](#stringboxedstring) sealed interface that stores validated payloads using boxed classes -## StringSchemaBoxedString -public record StringSchemaBoxedString
          -implements [StringSchemaBoxed](#stringschemaboxed) +## StringBoxedString +public record StringBoxedString
          +implements [StringBoxed](#stringboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| StringSchemaBoxedString(String data)
          Creates an instance, private visibility | +| StringBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1022,8 +1028,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## StringSchema -public static class StringSchema
          +## String +public static class String
          extends JsonSchema A schema class that validates payloads @@ -1045,7 +1051,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // String validation -String validatedPayload = FormatTest.StringSchema.validate( +String validatedPayload = FormatTest.String.validate( "A", configuration ); @@ -1061,8 +1067,8 @@ String validatedPayload = FormatTest.StringSchema.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | String | validate(String arg, SchemaConfiguration configuration) | -| [StringSchemaBoxedString](#stringschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [StringSchemaBoxed](#stringschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [StringBoxedString](#stringboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [StringBoxed](#stringboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## ArrayWithUniqueItemsBoxed @@ -1239,23 +1245,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## DoubleSchemaBoxed -public sealed interface DoubleSchemaBoxed
          +## DoubleBoxed +public sealed interface DoubleBoxed
          permits
          -[DoubleSchemaBoxedNumber](#doubleschemaboxednumber) +[DoubleBoxedNumber](#doubleboxednumber) sealed interface that stores validated payloads using boxed classes -## DoubleSchemaBoxedNumber -public record DoubleSchemaBoxedNumber
          -implements [DoubleSchemaBoxed](#doubleschemaboxed) +## DoubleBoxedNumber +public record DoubleBoxedNumber
          +implements [DoubleBoxed](#doubleboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| DoubleBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1263,8 +1269,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleSchema -public static class DoubleSchema
          +## Double +public static class Double
          extends JsonSchema A schema class that validates payloads @@ -1286,7 +1292,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // double validation -double validatedPayload = FormatTest.DoubleSchema.validate( +double validatedPayload = FormatTest.Double.validate( 3.14d, configuration ); @@ -1304,8 +1310,8 @@ double validatedPayload = FormatTest.DoubleSchema.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | double | validate(double arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxedNumber](#doubleschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [DoubleSchemaBoxed](#doubleschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [DoubleBoxedNumber](#doubleboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [DoubleBoxed](#doubleboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Float32Boxed @@ -1343,23 +1349,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## FloatSchemaBoxed -public sealed interface FloatSchemaBoxed
          +## FloatBoxed +public sealed interface FloatBoxed
          permits
          -[FloatSchemaBoxedNumber](#floatschemaboxednumber) +[FloatBoxedNumber](#floatboxednumber) sealed interface that stores validated payloads using boxed classes -## FloatSchemaBoxedNumber -public record FloatSchemaBoxedNumber
          -implements [FloatSchemaBoxed](#floatschemaboxed) +## FloatBoxedNumber +public record FloatBoxedNumber
          +implements [FloatBoxed](#floatboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| FloatBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1367,8 +1373,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatSchema -public static class FloatSchema
          +## Float +public static class Float
          extends JsonSchema A schema class that validates payloads @@ -1393,7 +1399,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // float validation -float validatedPayload = FormatTest.FloatSchema.validate( +float validatedPayload = FormatTest.Float.validate( 3.14f, configuration ); @@ -1411,27 +1417,27 @@ float validatedPayload = FormatTest.FloatSchema.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | float | validate(float arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxedNumber](#floatschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [FloatSchemaBoxed](#floatschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [FloatBoxedNumber](#floatboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [FloatBoxed](#floatboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## NumberSchemaBoxed -public sealed interface NumberSchemaBoxed
          +## NumberBoxed +public sealed interface NumberBoxed
          permits
          -[NumberSchemaBoxedNumber](#numberschemaboxednumber) +[NumberBoxedNumber](#numberboxednumber) sealed interface that stores validated payloads using boxed classes -## NumberSchemaBoxedNumber -public record NumberSchemaBoxedNumber
          -implements [NumberSchemaBoxed](#numberschemaboxed) +## NumberBoxedNumber +public record NumberBoxedNumber
          +implements [NumberBoxed](#numberboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| NumberBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1439,8 +1445,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberSchema -public static class NumberSchema
          +## Number +public static class Number
          extends JsonSchema A schema class that validates payloads @@ -1462,7 +1468,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // int validation -int validatedPayload = FormatTest.NumberSchema.validate( +int validatedPayload = FormatTest.Number.validate( 1, configuration ); @@ -1480,8 +1486,8 @@ int validatedPayload = FormatTest.NumberSchema.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Number | validate(Number arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxedNumber](#numberschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [NumberSchemaBoxed](#numberschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [NumberBoxedNumber](#numberboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [NumberBoxed](#numberboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Int64Boxed @@ -1623,23 +1629,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## IntegerSchemaBoxed -public sealed interface IntegerSchemaBoxed
          +## IntegerBoxed +public sealed interface IntegerBoxed
          permits
          -[IntegerSchemaBoxedNumber](#integerschemaboxednumber) +[IntegerBoxedNumber](#integerboxednumber) sealed interface that stores validated payloads using boxed classes -## IntegerSchemaBoxedNumber -public record IntegerSchemaBoxedNumber
          -implements [IntegerSchemaBoxed](#integerschemaboxed) +## IntegerBoxedNumber +public record IntegerBoxedNumber
          +implements [IntegerBoxed](#integerboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IntegerSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | +| IntegerBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1647,8 +1653,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IntegerSchema -public static class IntegerSchema
          +## Integer +public static class Integer
          extends JsonSchema A schema class that validates payloads @@ -1670,7 +1676,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // int validation -int validatedPayload = FormatTest.IntegerSchema.validate( +int validatedPayload = FormatTest.Integer.validate( 1L, configuration ); @@ -1689,8 +1695,8 @@ int validatedPayload = FormatTest.IntegerSchema.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | long | validate(long arg, SchemaConfiguration configuration) | -| [IntegerSchemaBoxedNumber](#integerschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IntegerSchemaBoxed](#integerschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IntegerBoxedNumber](#integerboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IntegerBoxed](#integerboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md index 3f4b18423cc..9a687b2c483 100644 --- a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md @@ -17,17 +17,17 @@ A class that contains necessary nested | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClass1](#mixedpropertiesandadditionalpropertiesclass1)
          schema class | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder)
          builder for Map payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMap](#mixedpropertiesandadditionalpropertiesclassmap)
          output class for Map payloads | -| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.MapSchemaBoxed](#mapschemaboxed)
          sealed interface for validated payloads | -| record | [MixedPropertiesAndAdditionalPropertiesClass.MapSchemaBoxedMap](#mapschemaboxedmap)
          boxed class to store validated Map payloads | -| static class | [MixedPropertiesAndAdditionalPropertiesClass.MapSchema](#mapschema)
          schema class | +| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.MapBoxed](#mapboxed)
          sealed interface for validated payloads | +| record | [MixedPropertiesAndAdditionalPropertiesClass.MapBoxedMap](#mapboxedmap)
          boxed class to store validated Map payloads | +| static class | [MixedPropertiesAndAdditionalPropertiesClass.Map](#map)
          schema class | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MapMapBuilder](#mapmapbuilder)
          builder for Map payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MapMap](#mapmap)
          output class for Map payloads | | sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.DateTimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [MixedPropertiesAndAdditionalPropertiesClass.DateTimeBoxedString](#datetimeboxedstring)
          boxed class to store validated String payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.DateTime](#datetime)
          schema class | -| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | -| record | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchema](#uuidschema)
          schema class | +| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | +| record | [MixedPropertiesAndAdditionalPropertiesClass.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | +| static class | [MixedPropertiesAndAdditionalPropertiesClass.Uuid](#uuid)
          schema class | ## MixedPropertiesAndAdditionalPropertiesClass1Boxed public sealed interface MixedPropertiesAndAdditionalPropertiesClass1Boxed
          @@ -79,11 +79,11 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMap validatedPayload = MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClass1.validate( new MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMapBuilder() - .setUuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") + .uuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") .dateTime("1970-01-01T00:00:00.00Z") - .setMap( + .map( MapUtils.makeMap( new AbstractMap.SimpleEntry>( "someAdditionalProperty", @@ -109,7 +109,7 @@ MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalProperti | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("map", [MapSchema.class](#mapschema)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("map", [Map.class](#map)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -134,9 +134,9 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | setUuid(String value) | +| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | uuid(String value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | dateTime(String value) | -| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | setMap(Map> value) | +| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | map(Map> value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, Void value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, boolean value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, String value) | @@ -157,27 +157,28 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [MixedPropertiesAndAdditionalPropertiesClassMap](#mixedpropertiesandadditionalpropertiesclassmap) | of([Map](#mixedpropertiesandadditionalpropertiesclassmapbuilder) arg, SchemaConfiguration configuration) | +| String | uuid()
          [optional] value must be a uuid | | String | dateTime()
          [optional] value must conform to RFC-3339 date-time | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["uuid"], instance["map"], | +| [MapMap](#mapmap) | map()
          [optional] | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## MapSchemaBoxed -public sealed interface MapSchemaBoxed
          +## MapBoxed +public sealed interface MapBoxed
          permits
          -[MapSchemaBoxedMap](#mapschemaboxedmap) +[MapBoxedMap](#mapboxedmap) sealed interface that stores validated payloads using boxed classes -## MapSchemaBoxedMap -public record MapSchemaBoxedMap
          -implements [MapSchemaBoxed](#mapschemaboxed) +## MapBoxedMap +public record MapBoxedMap
          +implements [MapBoxed](#mapboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| MapSchemaBoxedMap([MapMap](#mapmap) data)
          Creates an instance, private visibility | +| MapBoxedMap([MapMap](#mapmap) data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -185,8 +186,8 @@ record that stores validated Map payloads, sealed permits implementation | [MapMap](#mapmap) | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## MapSchema -public static class MapSchema
          +## Map +public static class Map
          extends JsonSchema A schema class that validates payloads @@ -209,7 +210,7 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso // Map validation MixedPropertiesAndAdditionalPropertiesClass.MapMap validatedPayload = - MixedPropertiesAndAdditionalPropertiesClass.MapSchema.validate( + MixedPropertiesAndAdditionalPropertiesClass.Map.validate( new MixedPropertiesAndAdditionalPropertiesClass.MapMapBuilder() .additionalProperty( "someAdditionalProperty", @@ -239,8 +240,8 @@ MixedPropertiesAndAdditionalPropertiesClass.MapMap validatedPayload = | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [MapMap](#mapmap) | validate([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | -| [MapSchemaBoxedMap](#mapschemaboxedmap) | validateAndBox([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | -| [MapSchemaBoxed](#mapschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [MapBoxedMap](#mapboxedmap) | validateAndBox([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | +| [MapBoxed](#mapboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## MapMapBuilder @@ -307,23 +308,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## UuidSchemaBoxed -public sealed interface UuidSchemaBoxed
          +## UuidBoxed +public sealed interface UuidBoxed
          permits
          -[UuidSchemaBoxedString](#uuidschemaboxedstring) +[UuidBoxedString](#uuidboxedstring) sealed interface that stores validated payloads using boxed classes -## UuidSchemaBoxedString -public record UuidSchemaBoxedString
          -implements [UuidSchemaBoxed](#uuidschemaboxed) +## UuidBoxedString +public record UuidBoxedString
          +implements [UuidBoxed](#uuidboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | +| UuidBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -331,8 +332,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidSchema -public static class UuidSchema
          +## Uuid +public static class Uuid
          extends UuidJsonSchema.UuidJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/Number.md b/samples/client/petstore/java/docs/components/schemas/Number.md new file mode 100644 index 00000000000..4c145b268c4 --- /dev/null +++ b/samples/client/petstore/java/docs/components/schemas/Number.md @@ -0,0 +1,52 @@ +# Number +org.openapijsonschematools.client.components.schemas.Number.java +public class Number
          + +A class that contains necessary nested +- schema classes (which validate payloads), extends JsonSchema +- sealed interfaces which store validated payloads, java version of a sum type +- boxed classes which store validated payloads, sealed permits class implementations + +## Nested Class Summary +| Modifier and Type | Class and Description | +| ----------------- | ---------------------- | +| sealed interface | [Number.Number1Boxed](#number1boxed)
          sealed interface for validated payloads | +| record | [Number.Number1BoxedNumber](#number1boxednumber)
          boxed class to store validated Number payloads | +| static class | [Number.Number1](#number1)
          schema class | + +## Number1Boxed +public sealed interface Number1Boxed
          +permits
          +[Number1BoxedNumber](#number1boxednumber) + +sealed interface that stores validated payloads using boxed classes + +## Number1BoxedNumber +public record Number1BoxedNumber
          +implements [Number1Boxed](#number1boxed) + +record that stores validated Number payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Number1BoxedNumber(Number data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Number | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Number1 +public static class Number1
          +extends NumberJsonSchema.NumberJsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md index e4a3c0b56ca..1e8e670ef61 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md @@ -80,7 +80,7 @@ ObjectModelWithRefProps.ObjectModelWithRefPropsMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
              new PropertyEntry("myString", [StringSchema.StringSchema1.class](../../components/schemas/StringSchema.md#stringschema1)),
              new PropertyEntry("myBoolean", [BooleanSchema.BooleanSchema1.class](../../components/schemas/BooleanSchema.md#booleanschema1))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
              new PropertyEntry("myString", [String.String1.class](../../components/schemas/String.md#string1)),
              new PropertyEntry("myBoolean", [Boolean.Boolean1.class](../../components/schemas/Boolean.md#boolean1))
          )
          | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Return.md b/samples/client/petstore/java/docs/components/schemas/Return.md new file mode 100644 index 00000000000..7aa9d8cb899 --- /dev/null +++ b/samples/client/petstore/java/docs/components/schemas/Return.md @@ -0,0 +1,257 @@ +# Return +org.openapijsonschematools.client.components.schemas.Return.java +public class Return
          + +A class that contains necessary nested +- schema classes (which validate payloads), extends JsonSchema +- sealed interfaces which store validated payloads, java version of a sum type +- boxed classes which store validated payloads, sealed permits class implementations +- classes to store validated map payloads, extends FrozenMap +- classes to build inputs for map payloads + +## Nested Class Summary +| Modifier and Type | Class and Description | +| ----------------- | ---------------------- | +| sealed interface | [Return.Return1Boxed](#return1boxed)
          sealed interface for validated payloads | +| record | [Return.Return1BoxedVoid](#return1boxedvoid)
          boxed class to store validated null payloads | +| record | [Return.Return1BoxedBoolean](#return1boxedboolean)
          boxed class to store validated boolean payloads | +| record | [Return.Return1BoxedNumber](#return1boxednumber)
          boxed class to store validated Number payloads | +| record | [Return.Return1BoxedString](#return1boxedstring)
          boxed class to store validated String payloads | +| record | [Return.Return1BoxedList](#return1boxedlist)
          boxed class to store validated List payloads | +| record | [Return.Return1BoxedMap](#return1boxedmap)
          boxed class to store validated Map payloads | +| static class | [Return.Return1](#return1)
          schema class | +| static class | [Return.ReturnMapBuilder1](#returnmapbuilder1)
          builder for Map payloads | +| static class | [Return.ReturnMap](#returnmap)
          output class for Map payloads | +| sealed interface | [Return.Return2Boxed](#return2boxed)
          sealed interface for validated payloads | +| record | [Return.Return2BoxedNumber](#return2boxednumber)
          boxed class to store validated Number payloads | +| static class | [Return.Return2](#return2)
          schema class | + +## Return1Boxed +public sealed interface Return1Boxed
          +permits
          +[Return1BoxedVoid](#return1boxedvoid), +[Return1BoxedBoolean](#return1boxedboolean), +[Return1BoxedNumber](#return1boxednumber), +[Return1BoxedString](#return1boxedstring), +[Return1BoxedList](#return1boxedlist), +[Return1BoxedMap](#return1boxedmap) + +sealed interface that stores validated payloads using boxed classes + +## Return1BoxedVoid +public record Return1BoxedVoid
          +implements [Return1Boxed](#return1boxed) + +record that stores validated null payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedVoid(Void data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Void | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1BoxedBoolean +public record Return1BoxedBoolean
          +implements [Return1Boxed](#return1boxed) + +record that stores validated boolean payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedBoolean(boolean data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| boolean | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1BoxedNumber +public record Return1BoxedNumber
          +implements [Return1Boxed](#return1boxed) + +record that stores validated Number payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedNumber(Number data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Number | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1BoxedString +public record Return1BoxedString
          +implements [Return1Boxed](#return1boxed) + +record that stores validated String payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedString(String data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| String | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1BoxedList +public record Return1BoxedList
          +implements [Return1Boxed](#return1boxed) + +record that stores validated List payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| FrozenList<@Nullable Object> | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1BoxedMap +public record Return1BoxedMap
          +implements [Return1Boxed](#return1boxed) + +record that stores validated Map payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return1BoxedMap([ReturnMap](#returnmap) data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| [ReturnMap](#returnmap) | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return1 +public static class Return1
          +extends JsonSchema + +A schema class that validates payloads + +## Description +Model for testing reserved words + +### Field Summary +| Modifier and Type | Field and Description | +| ----------------- | ---------------------- | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("return", [Return2.class](#return2)))
          )
          | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| String | validate(String arg, SchemaConfiguration configuration) | +| Void | validate(Void arg, SchemaConfiguration configuration) | +| int | validate(int arg, SchemaConfiguration configuration) | +| long | validate(long arg, SchemaConfiguration configuration) | +| float | validate(float arg, SchemaConfiguration configuration) | +| double | validate(double arg, SchemaConfiguration configuration) | +| Number | validate(Number arg, SchemaConfiguration configuration) | +| boolean | validate(boolean arg, SchemaConfiguration configuration) | +| [ReturnMap](#returnmap) | validate([Map<?, ?>](#returnmapbuilder1) arg, SchemaConfiguration configuration) | +| FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | +| [Return1BoxedString](#return1boxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [Return1BoxedVoid](#return1boxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [Return1BoxedNumber](#return1boxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [Return1BoxedBoolean](#return1boxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [Return1BoxedMap](#return1boxedmap) | validateAndBox([Map<?, ?>](#returnmapbuilder1) arg, SchemaConfiguration configuration) | +| [Return1BoxedList](#return1boxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [Return1Boxed](#return1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | + +## ReturnMapBuilder1 +public class ReturnMapBuilder1
          +builder for `Map` + +A class that builds the Map input type + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| ReturnMapBuilder1()
          Creates a builder that contains an empty map | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Map | build()
          Returns map input that should be used with Schema.validate | +| [ReturnMapBuilder1](#returnmapbuilder1) | return(int value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | return(float value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, Void value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, boolean value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, String value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, int value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, float value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, long value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, double value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, List value) | +| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, Map value) | + +## ReturnMap +public static class ReturnMap
          +extends FrozenMap + +A class to store validated Map payloads + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| static [ReturnMap](#returnmap) | of([Map](#returnmapbuilder1) arg, SchemaConfiguration configuration) | +| Number | return()
          [optional] value must be a 32 bit integer | +| @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | + +## Return2Boxed +public sealed interface Return2Boxed
          +permits
          +[Return2BoxedNumber](#return2boxednumber) + +sealed interface that stores validated payloads using boxed classes + +## Return2BoxedNumber +public record Return2BoxedNumber
          +implements [Return2Boxed](#return2boxed) + +record that stores validated Number payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| Return2BoxedNumber(Number data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| Number | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## Return2 +public static class Return2
          +extends Int32JsonSchema.Int32JsonSchema1 + +A schema class that validates payloads + +## Description +this is a reserved python keyword + +| Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md index e5f2df3e162..53d81aa13b0 100644 --- a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md +++ b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md @@ -22,9 +22,9 @@ A class that contains necessary nested | static class | [Schema200Response.Schema200Response1](#schema200response1)
          schema class | | static class | [Schema200Response.Schema200ResponseMapBuilder](#schema200responsemapbuilder)
          builder for Map payloads | | static class | [Schema200Response.Schema200ResponseMap](#schema200responsemap)
          output class for Map payloads | -| sealed interface | [Schema200Response.ClassSchemaBoxed](#classschemaboxed)
          sealed interface for validated payloads | -| record | [Schema200Response.ClassSchemaBoxedString](#classschemaboxedstring)
          boxed class to store validated String payloads | -| static class | [Schema200Response.ClassSchema](#classschema)
          schema class | +| sealed interface | [Schema200Response.ClassBoxed](#classboxed)
          sealed interface for validated payloads | +| record | [Schema200Response.ClassBoxedString](#classboxedstring)
          boxed class to store validated String payloads | +| static class | [Schema200Response.Class](#class)
          schema class | | sealed interface | [Schema200Response.NameBoxed](#nameboxed)
          sealed interface for validated payloads | | record | [Schema200Response.NameBoxedNumber](#nameboxednumber)
          boxed class to store validated Number payloads | | static class | [Schema200Response.Name](#name)
          schema class | @@ -155,7 +155,7 @@ model with an invalid class name for python, starts with a number ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("name", [Name.class](#name))),
              new PropertyEntry("class", [ClassSchema.class](#classschema)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("name", [Name.class](#name))),
              new PropertyEntry("class", [Class.class](#class)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -196,7 +196,7 @@ A class that builds the Map input type | Map | build()
          Returns map input that should be used with Schema.validate | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | name(int value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | name(float value) | -| [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | setClass(String value) | +| [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | class(String value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, Void value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, boolean value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, String value) | @@ -218,26 +218,26 @@ A class to store validated Map payloads | ----------------- | ---------------------- | | static [Schema200ResponseMap](#schema200responsemap) | of([Map](#schema200responsemapbuilder) arg, SchemaConfiguration configuration) | | Number | name()
          [optional] value must be a 32 bit integer | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["class"], | +| String | class()
          [optional] | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## ClassSchemaBoxed -public sealed interface ClassSchemaBoxed
          +## ClassBoxed +public sealed interface ClassBoxed
          permits
          -[ClassSchemaBoxedString](#classschemaboxedstring) +[ClassBoxedString](#classboxedstring) sealed interface that stores validated payloads using boxed classes -## ClassSchemaBoxedString -public record ClassSchemaBoxedString
          -implements [ClassSchemaBoxed](#classschemaboxed) +## ClassBoxedString +public record ClassBoxedString
          +implements [ClassBoxed](#classboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ClassSchemaBoxedString(String data)
          Creates an instance, private visibility | +| ClassBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -245,8 +245,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ClassSchema -public static class ClassSchema
          +## Class +public static class Class
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/String.md b/samples/client/petstore/java/docs/components/schemas/String.md new file mode 100644 index 00000000000..454448d675e --- /dev/null +++ b/samples/client/petstore/java/docs/components/schemas/String.md @@ -0,0 +1,52 @@ +# String +org.openapijsonschematools.client.components.schemas.String.java +public class String
          + +A class that contains necessary nested +- schema classes (which validate payloads), extends JsonSchema +- sealed interfaces which store validated payloads, java version of a sum type +- boxed classes which store validated payloads, sealed permits class implementations + +## Nested Class Summary +| Modifier and Type | Class and Description | +| ----------------- | ---------------------- | +| sealed interface | [String.String1Boxed](#string1boxed)
          sealed interface for validated payloads | +| record | [String.String1BoxedString](#string1boxedstring)
          boxed class to store validated String payloads | +| static class | [String.String1](#string1)
          schema class | + +## String1Boxed +public sealed interface String1Boxed
          +permits
          +[String1BoxedString](#string1boxedstring) + +sealed interface that stores validated payloads using boxed classes + +## String1BoxedString +public record String1BoxedString
          +implements [String1Boxed](#string1boxed) + +record that stores validated String payloads, sealed permits implementation + +### Constructor Summary +| Constructor and Description | +| --------------------------- | +| String1BoxedString(String data)
          Creates an instance, private visibility | + +### Method Summary +| Modifier and Type | Method and Description | +| ----------------- | ---------------------- | +| String | data()
          validated payload | +| @Nullable Object | getData()
          validated payload | + +## String1 +public static class String1
          +extends StringJsonSchema.StringJsonSchema1 + +A schema class that validates payloads + +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| ------------------------------------------------------------------ | +| validate | +| validateAndBox | + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md index 5075ea7d3c7..dcc30ca5a02 100644 --- a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md +++ b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md @@ -108,23 +108,23 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchemaMap validatedPayload = ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchema1.validate( new ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchemaMapBuilder() - .setByte("a") + .byte("a") - .setDouble(3.14d) + .double(3.14d) - .setNumber(1) + .number(1) .pattern_without_delimiter("AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>") - .setInteger(1) + .integer(1) .int32(1) .int64(1L) - .setFloat(3.14f) + .float(3.14f) - .setString("A") + .string("A") .binary("a") @@ -171,21 +171,21 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(double value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int32(int value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int32(float value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(int value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(float value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(long value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setString(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | string(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | binary(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | date(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | dateTime(String value) | @@ -231,10 +231,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(double value) | ## ApplicationxwwwformurlencodedSchemaMap0011Builder public class ApplicationxwwwformurlencodedSchemaMap0011Builder
          @@ -250,10 +250,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(double value) | | [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap0100Builder @@ -270,10 +270,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(double value) | ## ApplicationxwwwformurlencodedSchemaMap0101Builder public class ApplicationxwwwformurlencodedSchemaMap0101Builder
          @@ -289,10 +289,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(double value) | | [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap0110Builder @@ -309,14 +309,14 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(double value) | ## ApplicationxwwwformurlencodedSchemaMap0111Builder public class ApplicationxwwwformurlencodedSchemaMap0111Builder
          @@ -332,14 +332,14 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(double value) | | [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1000Builder @@ -356,7 +356,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | byte(String value) | ## ApplicationxwwwformurlencodedSchemaMap1001Builder public class ApplicationxwwwformurlencodedSchemaMap1001Builder
          @@ -372,7 +372,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | byte(String value) | | [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1010Builder @@ -389,11 +389,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(double value) | ## ApplicationxwwwformurlencodedSchemaMap1011Builder public class ApplicationxwwwformurlencodedSchemaMap1011Builder
          @@ -409,11 +409,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(double value) | | [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1100Builder @@ -430,11 +430,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(double value) | ## ApplicationxwwwformurlencodedSchemaMap1101Builder public class ApplicationxwwwformurlencodedSchemaMap1101Builder
          @@ -450,11 +450,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(double value) | | [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1110Builder @@ -471,15 +471,15 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(double value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(double value) | ## ApplicationxwwwformurlencodedSchemaMapBuilder public class ApplicationxwwwformurlencodedSchemaMapBuilder
          @@ -495,15 +495,15 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0111Builder](#applicationxwwwformurlencodedschemamap0111builder) | setByte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(double value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0111Builder](#applicationxwwwformurlencodedschemamap0111builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(double value) | | [ApplicationxwwwformurlencodedSchemaMap1110Builder](#applicationxwwwformurlencodedschemamap1110builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap @@ -516,15 +516,20 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [ApplicationxwwwformurlencodedSchemaMap](#applicationxwwwformurlencodedschemamap) | of([Map](#applicationxwwwformurlencodedschemamapbuilder) arg, SchemaConfiguration configuration) | +| String | byte()
          | +| Number | double()
          value must be a 64 bit float | +| Number | number()
          | | String | pattern_without_delimiter()
          | +| Number | integer()
          [optional] | | Number | int32()
          [optional] value must be a 32 bit integer | | Number | int64()
          [optional] value must be a 64 bit integer | +| Number | float()
          [optional] value must be a 32 bit float | +| String | string()
          [optional] | | String | binary()
          [optional] | | String | date()
          [optional] value must conform to RFC-3339 full-date YYYY-MM-DD | | String | dateTime()
          [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time | | String | password()
          [optional] | | String | callback()
          [optional] | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["byte"], instance["double"], instance["number"], instance["integer"], instance["float"], instance["string"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## ApplicationxwwwformurlencodedCallbackBoxed diff --git a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md index fecda0a9b1d..bc11af6fd18 100644 --- a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | ## FakepetiduploadimagewithrequiredfilePostCode200Response1 public static class FakepetiduploadimagewithrequiredfilePostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index bb60c5776fb..f52c617c14b 100644 --- a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) +extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) +extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md index e24e63e6ee3..f82e5061f56 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md @@ -12,7 +12,7 @@ A class that contains necessary endpoint classes | Modifier and Type | Class and Description | | ----------------- | --------------------- | | static class | [Post](#post)
          The class that has a post method to call the endpoint | -| interface | [ModelBooleanOperation](#modelbooleanoperation)
          The interface that has a modelBoolean method to call the endpoint | +| interface | [BooleanOperation](#booleanoperation)
          The interface that has a boolean method to call the endpoint | | static class | [PostRequest](#postrequest)
          The request inputs class | | static class | [PostRequestBuilder](#postrequestbuilder)
          A builder for the request input class | @@ -33,7 +33,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.BooleanSchema; +import org.openapijsonschematools.client.components.schemas.Boolean; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -105,15 +105,15 @@ FakerefsbooleanPostCode200Response.ApplicationjsonResponseBody deserializedBody | ----------------- | ---------------------- | | [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | post([PostRequest](#postrequest) request) | -## ModelBooleanOperation -public interface ModelBooleanOperation
          +## BooleanOperation +public interface BooleanOperation
          -an interface that allows one to call the endpoint using a method named modelBoolean by the operationId +an interface that allows one to call the endpoint using a method named boolean by the operationId ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | modelBoolean([PostRequest](#postrequest) request) | +| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | boolean([PostRequest](#postrequest) request) | ## PostRequest public static class PostRequest
          diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md index d0446d3d804..9584c679c16 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [BooleanSchema1](../../../../../../components/schemas/BooleanSchema.md#booleanschema) +extends [Boolean1](../../../../../../components/schemas/Boolean.md#boolean) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [BooleanSchema.BooleanSchema1](../../../../../../components/schemas/BooleanSchema.md#booleanschema1) +extends [Boolean.Boolean1](../../../../../../components/schemas/Boolean.md#boolean1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index 1694ac4a00a..8c9446ef380 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [BooleanSchema1](../../../../../../../components/schemas/BooleanSchema.md#booleanschema) +extends [Boolean1](../../../../../../../components/schemas/Boolean.md#boolean) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [BooleanSchema.BooleanSchema1](../../../../../../../components/schemas/BooleanSchema.md#booleanschema1) +extends [Boolean.Boolean1](../../../../../../../components/schemas/Boolean.md#boolean1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md b/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md index 0a83e8e30bd..e7cfc88741d 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md @@ -12,7 +12,7 @@ A class that contains necessary endpoint classes | Modifier and Type | Class and Description | | ----------------- | --------------------- | | static class | [Post](#post)
          The class that has a post method to call the endpoint | -| interface | [ModelStringOperation](#modelstringoperation)
          The interface that has a modelString method to call the endpoint | +| interface | [StringOperation](#stringoperation)
          The interface that has a string method to call the endpoint | | static class | [PostRequest](#postrequest)
          The request inputs class | | static class | [PostRequestBuilder](#postrequestbuilder)
          A builder for the request input class | @@ -33,7 +33,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.StringSchema; +import org.openapijsonschematools.client.components.schemas.String; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -105,15 +105,15 @@ FakerefsstringPostCode200Response.ApplicationjsonResponseBody deserializedBody = | ----------------- | ---------------------- | | [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | post([PostRequest](#postrequest) request) | -## ModelStringOperation -public interface ModelStringOperation
          +## StringOperation +public interface StringOperation
          -an interface that allows one to call the endpoint using a method named modelString by the operationId +an interface that allows one to call the endpoint using a method named string by the operationId ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | modelString([PostRequest](#postrequest) request) | +| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | string([PostRequest](#postrequest) request) | ## PostRequest public static class PostRequest
          diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md index abe4f0713c9..37761de0d18 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [StringSchema1](../../../../../../components/schemas/StringSchema.md#stringschema) +extends [String1](../../../../../../components/schemas/String.md#string) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [StringSchema.StringSchema1](../../../../../../components/schemas/StringSchema.md#stringschema1) +extends [String.String1](../../../../../../components/schemas/String.md#string1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index 8fadd779761..bff0c0aed91 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [StringSchema1](../../../../../../../components/schemas/StringSchema.md#stringschema) +extends [String1](../../../../../../../components/schemas/String.md#string) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [StringSchema.StringSchema1](../../../../../../../components/schemas/StringSchema.md#stringschema1) +extends [String.String1](../../../../../../../components/schemas/String.md#string1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md index 9d6a4abeeb9..a004a7be8c5 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | ## FakeuploadfilePostCode200Response1 public static class FakeuploadfilePostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index bb60c5776fb..f52c617c14b 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) +extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) +extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md index 995bbba0333..6ac7b8f442e 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | ## FakeuploadfilesPostCode200Response1 public static class FakeuploadfilesPostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index bb60c5776fb..f52c617c14b 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) +extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) +extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md index e7695fd64d2..1a19fcaf83b 100644 --- a/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md @@ -67,7 +67,7 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso ApplicationjsonSchema.ApplicationjsonSchemaMap validatedPayload = ApplicationjsonSchema.ApplicationjsonSchema1.validate( new ApplicationjsonSchema.ApplicationjsonSchemaMapBuilder() - .setString( + .string( MapUtils.makeMap( new AbstractMap.SimpleEntry( "bar", @@ -109,7 +109,7 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | setString(Map value) | +| [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | string(Map value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, Void value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, boolean value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, String value) | @@ -130,5 +130,5 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [ApplicationjsonSchemaMap](#applicationjsonschemamap) | of([Map](#applicationjsonschemamapbuilder) arg, SchemaConfiguration configuration) | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["string"], | +| [Foo.FooMap](../../../../../../../components/schemas/Foo.md#foomap) | string()
          [optional] | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java index 2694e40d4c0..b67ecd28e10 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java @@ -73,11 +73,11 @@ public class Fake extends ApiClient implements FakerefsobjectmodelwithrefpropsPost.ObjectModelWithRefPropsOperation, FakepemcontenttypeGet.PemContentTypeOperation, FakerefsnumberPost.NumberWithValidationsOperation, - FakerefsstringPost.ModelStringOperation, + FakerefsstringPost.StringOperation, FakeinlineadditionalpropertiesPost.InlineAdditionalPropertiesOperation, FakerefsmammalPost.MammalOperation, SolidusGet.SlashRouteOperation, - FakerefsbooleanPost.ModelBooleanOperation, + FakerefsbooleanPost.BooleanOperation, FakejsonformdataGet.JsonFormDataOperation, Fakeparametercollisions1ababselfabPost.ParameterCollisionsOperation, FakequeryparamwithjsoncontenttypeGet.QueryParamWithJsonContentTypeOperation, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java index e48fd69140e..8cc5d0b585d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java @@ -29,7 +29,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } public static class SuccessWithJsonApiResponse1 extends ResponseDeserializer { public SuccessWithJsonApiResponse1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java index cc291e51828..40a729c54a3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java index 239beb71bb8..2e6d42b58ac 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java index 230de7a475d..e0341e16b15 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java index b8f8b6efa4a..111bf2914cc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.components.responses.successwithjsonapiresponse.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; +import org.openapijsonschematools.client.components.schemas.ApiResponse; -public class ApplicationjsonSchema extends ApiResponseSchema { +public class ApplicationjsonSchema extends ApiResponse { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { + public static class ApplicationjsonSchema1 extends ApiResponse1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java index bdbdb6c4a0c..090f606f6b4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java @@ -1,6 +1,4 @@ package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -9,28 +7,18 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalPropertiesSchema { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java index c848804a745..33410b0aef0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java @@ -36,46 +36,46 @@ public class AnyTypeAndFormat { // nest classes so all schemas and input/output classes can be public - public sealed interface UuidSchemaBoxed permits UuidSchemaBoxedVoid, UuidSchemaBoxedBoolean, UuidSchemaBoxedNumber, UuidSchemaBoxedString, UuidSchemaBoxedList, UuidSchemaBoxedMap { + public sealed interface UuidBoxed permits UuidBoxedVoid, UuidBoxedBoolean, UuidBoxedNumber, UuidBoxedString, UuidBoxedList, UuidBoxedMap { @Nullable Object getData(); } - public record UuidSchemaBoxedVoid(Void data) implements UuidSchemaBoxed { + public record UuidBoxedVoid(Void data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidSchemaBoxedBoolean(boolean data) implements UuidSchemaBoxed { + public record UuidBoxedBoolean(boolean data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidSchemaBoxedNumber(Number data) implements UuidSchemaBoxed { + public record UuidBoxedNumber(Number data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidSchemaBoxedString(String data) implements UuidSchemaBoxed { + public record UuidBoxedString(String data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidSchemaBoxedList(FrozenList<@Nullable Object> data) implements UuidSchemaBoxed { + public record UuidBoxedList(FrozenList<@Nullable Object> data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements UuidSchemaBoxed { + public record UuidBoxedMap(FrozenMap<@Nullable Object> data) implements UuidBoxed { @Override public @Nullable Object getData() { return data; @@ -83,18 +83,18 @@ public record UuidSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements Uu } - public static class UuidSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidSchemaBoxedList>, MapSchemaValidator, UuidSchemaBoxedMap> { - private static @Nullable UuidSchema instance = null; + public static class Uuid extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidBoxedList>, MapSchemaValidator, UuidBoxedMap> { + private static @Nullable Uuid instance = null; - protected UuidSchema() { + protected Uuid() { super(new JsonSchemaInfo() .format("uuid") ); } - public static UuidSchema getInstance() { + public static Uuid getInstance() { if (instance == null) { - instance = new UuidSchema(); + instance = new Uuid(); } return instance; } @@ -277,31 +277,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public UuidSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedVoid(validate(arg, configuration)); + public UuidBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedVoid(validate(arg, configuration)); } @Override - public UuidSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedBoolean(validate(arg, configuration)); + public UuidBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedBoolean(validate(arg, configuration)); } @Override - public UuidSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedNumber(validate(arg, configuration)); + public UuidBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedNumber(validate(arg, configuration)); } @Override - public UuidSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedString(validate(arg, configuration)); + public UuidBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedString(validate(arg, configuration)); } @Override - public UuidSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedList(validate(arg, configuration)); + public UuidBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedList(validate(arg, configuration)); } @Override - public UuidSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidSchemaBoxedMap(validate(arg, configuration)); + public UuidBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidBoxedMap(validate(arg, configuration)); } @Override - public UuidSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public UuidBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -891,46 +891,46 @@ public DatetimeBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration co } } - public sealed interface NumberSchemaBoxed permits NumberSchemaBoxedVoid, NumberSchemaBoxedBoolean, NumberSchemaBoxedNumber, NumberSchemaBoxedString, NumberSchemaBoxedList, NumberSchemaBoxedMap { + public sealed interface NumberBoxed permits NumberBoxedVoid, NumberBoxedBoolean, NumberBoxedNumber, NumberBoxedString, NumberBoxedList, NumberBoxedMap { @Nullable Object getData(); } - public record NumberSchemaBoxedVoid(Void data) implements NumberSchemaBoxed { + public record NumberBoxedVoid(Void data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberSchemaBoxedBoolean(boolean data) implements NumberSchemaBoxed { + public record NumberBoxedBoolean(boolean data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberSchemaBoxedNumber(Number data) implements NumberSchemaBoxed { + public record NumberBoxedNumber(Number data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberSchemaBoxedString(String data) implements NumberSchemaBoxed { + public record NumberBoxedString(String data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberSchemaBoxedList(FrozenList<@Nullable Object> data) implements NumberSchemaBoxed { + public record NumberBoxedList(FrozenList<@Nullable Object> data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements NumberSchemaBoxed { + public record NumberBoxedMap(FrozenMap<@Nullable Object> data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; @@ -938,18 +938,18 @@ public record NumberSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements } - public static class NumberSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NumberSchemaBoxedList>, MapSchemaValidator, NumberSchemaBoxedMap> { - private static @Nullable NumberSchema instance = null; + public static class Number extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NumberBoxedList>, MapSchemaValidator, NumberBoxedMap> { + private static @Nullable Number instance = null; - protected NumberSchema() { + protected Number() { super(new JsonSchemaInfo() .format("number") ); } - public static NumberSchema getInstance() { + public static Number getInstance() { if (instance == null) { - instance = new NumberSchema(); + instance = new Number(); } return instance; } @@ -1132,31 +1132,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public NumberSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedVoid(validate(arg, configuration)); + public NumberBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedVoid(validate(arg, configuration)); } @Override - public NumberSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedBoolean(validate(arg, configuration)); + public NumberBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedBoolean(validate(arg, configuration)); } @Override - public NumberSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedNumber(validate(arg, configuration)); + public NumberBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedNumber(validate(arg, configuration)); } @Override - public NumberSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedString(validate(arg, configuration)); + public NumberBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedString(validate(arg, configuration)); } @Override - public NumberSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedList(validate(arg, configuration)); + public NumberBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedList(validate(arg, configuration)); } @Override - public NumberSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedMap(validate(arg, configuration)); + public NumberBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedMap(validate(arg, configuration)); } @Override - public NumberSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public NumberBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2031,46 +2031,46 @@ public Int64Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration confi } } - public sealed interface DoubleSchemaBoxed permits DoubleSchemaBoxedVoid, DoubleSchemaBoxedBoolean, DoubleSchemaBoxedNumber, DoubleSchemaBoxedString, DoubleSchemaBoxedList, DoubleSchemaBoxedMap { + public sealed interface DoubleBoxed permits DoubleBoxedVoid, DoubleBoxedBoolean, DoubleBoxedNumber, DoubleBoxedString, DoubleBoxedList, DoubleBoxedMap { @Nullable Object getData(); } - public record DoubleSchemaBoxedVoid(Void data) implements DoubleSchemaBoxed { + public record DoubleBoxedVoid(Void data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleSchemaBoxedBoolean(boolean data) implements DoubleSchemaBoxed { + public record DoubleBoxedBoolean(boolean data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleSchemaBoxedNumber(Number data) implements DoubleSchemaBoxed { + public record DoubleBoxedNumber(Number data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleSchemaBoxedString(String data) implements DoubleSchemaBoxed { + public record DoubleBoxedString(String data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleSchemaBoxedList(FrozenList<@Nullable Object> data) implements DoubleSchemaBoxed { + public record DoubleBoxedList(FrozenList<@Nullable Object> data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements DoubleSchemaBoxed { + public record DoubleBoxedMap(FrozenMap<@Nullable Object> data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; @@ -2078,18 +2078,18 @@ public record DoubleSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements } - public static class DoubleSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DoubleSchemaBoxedList>, MapSchemaValidator, DoubleSchemaBoxedMap> { - private static @Nullable DoubleSchema instance = null; + public static class Double extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DoubleBoxedList>, MapSchemaValidator, DoubleBoxedMap> { + private static @Nullable Double instance = null; - protected DoubleSchema() { + protected Double() { super(new JsonSchemaInfo() .format("double") ); } - public static DoubleSchema getInstance() { + public static Double getInstance() { if (instance == null) { - instance = new DoubleSchema(); + instance = new Double(); } return instance; } @@ -2272,31 +2272,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public DoubleSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedVoid(validate(arg, configuration)); + public DoubleBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedVoid(validate(arg, configuration)); } @Override - public DoubleSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedBoolean(validate(arg, configuration)); + public DoubleBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedBoolean(validate(arg, configuration)); } @Override - public DoubleSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedNumber(validate(arg, configuration)); + public DoubleBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedNumber(validate(arg, configuration)); } @Override - public DoubleSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedString(validate(arg, configuration)); + public DoubleBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedString(validate(arg, configuration)); } @Override - public DoubleSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedList(validate(arg, configuration)); + public DoubleBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedList(validate(arg, configuration)); } @Override - public DoubleSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedMap(validate(arg, configuration)); + public DoubleBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedMap(validate(arg, configuration)); } @Override - public DoubleSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public DoubleBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2316,46 +2316,46 @@ public DoubleSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguratio } } - public sealed interface FloatSchemaBoxed permits FloatSchemaBoxedVoid, FloatSchemaBoxedBoolean, FloatSchemaBoxedNumber, FloatSchemaBoxedString, FloatSchemaBoxedList, FloatSchemaBoxedMap { + public sealed interface FloatBoxed permits FloatBoxedVoid, FloatBoxedBoolean, FloatBoxedNumber, FloatBoxedString, FloatBoxedList, FloatBoxedMap { @Nullable Object getData(); } - public record FloatSchemaBoxedVoid(Void data) implements FloatSchemaBoxed { + public record FloatBoxedVoid(Void data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatSchemaBoxedBoolean(boolean data) implements FloatSchemaBoxed { + public record FloatBoxedBoolean(boolean data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatSchemaBoxedNumber(Number data) implements FloatSchemaBoxed { + public record FloatBoxedNumber(Number data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatSchemaBoxedString(String data) implements FloatSchemaBoxed { + public record FloatBoxedString(String data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatSchemaBoxedList(FrozenList<@Nullable Object> data) implements FloatSchemaBoxed { + public record FloatBoxedList(FrozenList<@Nullable Object> data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements FloatSchemaBoxed { + public record FloatBoxedMap(FrozenMap<@Nullable Object> data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; @@ -2363,18 +2363,18 @@ public record FloatSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements F } - public static class FloatSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FloatSchemaBoxedList>, MapSchemaValidator, FloatSchemaBoxedMap> { - private static @Nullable FloatSchema instance = null; + public static class Float extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FloatBoxedList>, MapSchemaValidator, FloatBoxedMap> { + private static @Nullable Float instance = null; - protected FloatSchema() { + protected Float() { super(new JsonSchemaInfo() .format("float") ); } - public static FloatSchema getInstance() { + public static Float getInstance() { if (instance == null) { - instance = new FloatSchema(); + instance = new Float(); } return instance; } @@ -2557,31 +2557,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public FloatSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedVoid(validate(arg, configuration)); + public FloatBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedVoid(validate(arg, configuration)); } @Override - public FloatSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedBoolean(validate(arg, configuration)); + public FloatBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedBoolean(validate(arg, configuration)); } @Override - public FloatSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedNumber(validate(arg, configuration)); + public FloatBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedNumber(validate(arg, configuration)); } @Override - public FloatSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedString(validate(arg, configuration)); + public FloatBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedString(validate(arg, configuration)); } @Override - public FloatSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedList(validate(arg, configuration)); + public FloatBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedList(validate(arg, configuration)); } @Override - public FloatSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedMap(validate(arg, configuration)); + public FloatBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedMap(validate(arg, configuration)); } @Override - public FloatSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public FloatBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2621,10 +2621,18 @@ public static AnyTypeAndFormatMap of(Map arg return AnyTypeAndFormat1.getInstance().validate(arg, configuration); } + public @Nullable Object uuid() throws UnsetPropertyException { + return getOrThrow("uuid"); + } + public @Nullable Object date() throws UnsetPropertyException { return getOrThrow("date"); } + public @Nullable Object number() throws UnsetPropertyException { + return getOrThrow("number"); + } + public @Nullable Object binary() throws UnsetPropertyException { return getOrThrow("binary"); } @@ -2637,6 +2645,14 @@ public static AnyTypeAndFormatMap of(Map arg return getOrThrow("int64"); } + public @Nullable Object double() throws UnsetPropertyException { + return getOrThrow("double"); + } + + public @Nullable Object float() throws UnsetPropertyException { + return getOrThrow("float"); + } + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -2644,62 +2660,62 @@ public static AnyTypeAndFormatMap of(Map arg } } - public interface SetterForUuidSchema { + public interface SetterForUuid { Map getInstance(); - T getBuilderAfterUuidSchema(Map instance); + T getBuilderAfterUuid(Map instance); - default T setUuid(Void value) { + default T uuid(Void value) { var instance = getInstance(); instance.put("uuid", null); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(boolean value) { + default T uuid(boolean value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(String value) { + default T uuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(int value) { + default T uuid(int value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(float value) { + default T uuid(float value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(long value) { + default T uuid(long value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(double value) { + default T uuid(double value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(List value) { + default T uuid(List value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } - default T setUuid(Map value) { + default T uuid(Map value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } } @@ -2821,62 +2837,62 @@ default T dateHyphenMinusTime(Map value) { } } - public interface SetterForNumberSchema { + public interface SetterForNumber { Map getInstance(); - T getBuilderAfterNumberSchema(Map instance); + T getBuilderAfterNumber(Map instance); - default T setNumber(Void value) { + default T number(Void value) { var instance = getInstance(); instance.put("number", null); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(boolean value) { + default T number(boolean value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(String value) { + default T number(String value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(int value) { + default T number(int value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(float value) { + default T number(float value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(long value) { + default T number(long value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(double value) { + default T number(double value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(List value) { + default T number(List value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(Map value) { + default T number(Map value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } } @@ -3057,125 +3073,125 @@ default T int64(Map value) { } } - public interface SetterForDoubleSchema { + public interface SetterForDouble { Map getInstance(); - T getBuilderAfterDoubleSchema(Map instance); + T getBuilderAfterDouble(Map instance); - default T setDouble(Void value) { + default T double(Void value) { var instance = getInstance(); instance.put("double", null); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(boolean value) { + default T double(boolean value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(String value) { + default T double(String value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(int value) { + default T double(int value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(float value) { + default T double(float value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(long value) { + default T double(long value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(double value) { + default T double(double value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(List value) { + default T double(List value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(Map value) { + default T double(Map value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } } - public interface SetterForFloatSchema { + public interface SetterForFloat { Map getInstance(); - T getBuilderAfterFloatSchema(Map instance); + T getBuilderAfterFloat(Map instance); - default T setFloat(Void value) { + default T float(Void value) { var instance = getInstance(); instance.put("float", null); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(boolean value) { + default T float(boolean value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(String value) { + default T float(String value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(int value) { + default T float(int value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(float value) { + default T float(float value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(long value) { + default T float(long value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(double value) { + default T float(double value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(List value) { + default T float(List value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(Map value) { + default T float(Map value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } } - public static class AnyTypeAndFormatMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuidSchema, SetterForDate, SetterForDatetime, SetterForNumberSchema, SetterForBinary, SetterForInt32, SetterForInt64, SetterForDoubleSchema, SetterForFloatSchema { + public static class AnyTypeAndFormatMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuid, SetterForDate, SetterForDatetime, SetterForNumber, SetterForBinary, SetterForInt32, SetterForInt64, SetterForDouble, SetterForFloat { private final Map instance; private static final Set knownKeys = Set.of( "uuid", @@ -3200,7 +3216,7 @@ public AnyTypeAndFormatMapBuilder() { public Map getInstance() { return instance; } - public AnyTypeAndFormatMapBuilder getBuilderAfterUuidSchema(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterUuid(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterDate(Map instance) { @@ -3209,7 +3225,7 @@ public AnyTypeAndFormatMapBuilder getBuilderAfterDate(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterNumberSchema(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterNumber(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterBinary(Map instance) { @@ -3221,10 +3237,10 @@ public AnyTypeAndFormatMapBuilder getBuilderAfterInt32(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterDoubleSchema(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterDouble(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterFloatSchema(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterFloat(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -3258,15 +3274,15 @@ protected AnyTypeAndFormat1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("uuid", UuidSchema.class), + new PropertyEntry("uuid", Uuid.class), new PropertyEntry("date", Date.class), new PropertyEntry("date-time", Datetime.class), - new PropertyEntry("number", NumberSchema.class), + new PropertyEntry("number", Number.class), new PropertyEntry("binary", Binary.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int64", Int64.class), - new PropertyEntry("double", DoubleSchema.class), - new PropertyEntry("float", FloatSchema.class) + new PropertyEntry("double", Double.class), + new PropertyEntry("float", Float.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java index f6359fa6a6b..568ff777664 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java new file mode 100644 index 00000000000..f0ffa015ebf --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java @@ -0,0 +1,289 @@ +package org.openapijsonschematools.client.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.Int32JsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; + +public class ApiResponse { + // nest classes so all schemas and input/output classes can be public + + + public static class Code extends Int32JsonSchema.Int32JsonSchema1 { + private static @Nullable Code instance = null; + public static Code getInstance() { + if (instance == null) { + instance = new Code(); + } + return instance; + } + } + + + public static class Type extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Type instance = null; + public static Type getInstance() { + if (instance == null) { + instance = new Type(); + } + return instance; + } + } + + + public static class Message extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Message instance = null; + public static Message getInstance() { + if (instance == null) { + instance = new Message(); + } + return instance; + } + } + + + public static class ApiResponseMap extends FrozenMap<@Nullable Object> { + protected ApiResponseMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "code", + "type", + "message" + ); + public static ApiResponseMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return ApiResponse1.getInstance().validate(arg, configuration); + } + + public Number code() throws UnsetPropertyException { + String key = "code"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for code"); + } + return (Number) value; + } + + public String type() throws UnsetPropertyException { + String key = "type"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for type"); + } + return (String) value; + } + + public String message() throws UnsetPropertyException { + String key = "message"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for message"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForCode { + Map getInstance(); + T getBuilderAfterCode(Map instance); + + default T code(int value) { + var instance = getInstance(); + instance.put("code", value); + return getBuilderAfterCode(instance); + } + + default T code(float value) { + var instance = getInstance(); + instance.put("code", value); + return getBuilderAfterCode(instance); + } + } + + public interface SetterForType { + Map getInstance(); + T getBuilderAfterType(Map instance); + + default T type(String value) { + var instance = getInstance(); + instance.put("type", value); + return getBuilderAfterType(instance); + } + } + + public interface SetterForMessage { + Map getInstance(); + T getBuilderAfterMessage(Map instance); + + default T message(String value) { + var instance = getInstance(); + instance.put("message", value); + return getBuilderAfterMessage(instance); + } + } + + public static class ApiResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForCode, SetterForType, SetterForMessage { + private final Map instance; + private static final Set knownKeys = Set.of( + "code", + "type", + "message" + ); + public Set getKnownKeys() { + return knownKeys; + } + public ApiResponseMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public ApiResponseMapBuilder getBuilderAfterCode(Map instance) { + return this; + } + public ApiResponseMapBuilder getBuilderAfterType(Map instance) { + return this; + } + public ApiResponseMapBuilder getBuilderAfterMessage(Map instance) { + return this; + } + public ApiResponseMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface ApiResponse1Boxed permits ApiResponse1BoxedMap { + @Nullable Object getData(); + } + + public record ApiResponse1BoxedMap(ApiResponseMap data) implements ApiResponse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ApiResponse1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ApiResponse1 instance = null; + + protected ApiResponse1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("code", Code.class), + new PropertyEntry("type", Type.class), + new PropertyEntry("message", Message.class) + )) + ); + } + + public static ApiResponse1 getInstance() { + if (instance == null) { + instance = new ApiResponse1(); + } + return instance; + } + + public ApiResponseMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new ApiResponseMap(castProperties); + } + + public ApiResponseMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ApiResponse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ApiResponse1BoxedMap(validate(arg, configuration)); + } + @Override + public ApiResponse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java index 78bd0f9b51f..d7fe4969111 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java index 4eb9b17c467..ee1f0ff1dd1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java new file mode 100644 index 00000000000..ae055a342a8 --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java @@ -0,0 +1,19 @@ +package org.openapijsonschematools.client.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.openapijsonschematools.client.schemas.BooleanJsonSchema; + +public class Boolean extends BooleanJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Boolean1 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Boolean1 instance = null; + public static Boolean1 getInstance() { + if (instance == null) { + instance = new Boolean1(); + } + return instance; + } + } + +} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java index 4179781a6db..c4aa25e19d7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.BooleanJsonSchema; -import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java index 4ccac34248a..5acbe2f8f96 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java index 7dce00fc68c..501fa39e92f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java @@ -37,11 +37,11 @@ public class ClassModel { // nest classes so all schemas and input/output classes can be public - public static class ClassSchema extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable ClassSchema instance = null; - public static ClassSchema getInstance() { + public static class Class extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Class instance = null; + public static Class getInstance() { if (instance == null) { - instance = new ClassSchema(); + instance = new Class(); } return instance; } @@ -67,18 +67,18 @@ public static ClassModelMap of(Map arg, Sche } } - public interface SetterForClassSchema { + public interface SetterForClass { Map getInstance(); - T getBuilderAfterClassSchema(Map instance); + T getBuilderAfterClass(Map instance); default T lowLineClass(String value) { var instance = getInstance(); instance.put("_class", value); - return getBuilderAfterClassSchema(instance); + return getBuilderAfterClass(instance); } } - public static class ClassModelMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForClassSchema { + public static class ClassModelMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForClass { private final Map instance; private static final Set knownKeys = Set.of( "_class" @@ -95,7 +95,7 @@ public ClassModelMapBuilder() { public Map getInstance() { return instance; } - public ClassModelMapBuilder getBuilderAfterClassSchema(Map instance) { + public ClassModelMapBuilder getBuilderAfterClass(Map instance) { return this; } public ClassModelMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -165,7 +165,7 @@ public static class ClassModel1 extends JsonSchema implements protected ClassModel1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( - new PropertyEntry("_class", ClassSchema.class) + new PropertyEntry("_class", Class.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java index fd093488cbd..cb97fa5b4b4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,10 +27,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComplexQuadrilateral { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java index aaf28dcaed1..bcd8ad3ac43 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java @@ -16,19 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.BooleanJsonSchema; -import org.openapijsonschematools.client.schemas.DateJsonSchema; -import org.openapijsonschematools.client.schemas.DateTimeJsonSchema; -import org.openapijsonschematools.client.schemas.DoubleJsonSchema; -import org.openapijsonschematools.client.schemas.FloatJsonSchema; -import org.openapijsonschematools.client.schemas.Int32JsonSchema; -import org.openapijsonschematools.client.schemas.Int64JsonSchema; -import org.openapijsonschematools.client.schemas.IntJsonSchema; -import org.openapijsonschematools.client.schemas.MapJsonSchema; -import org.openapijsonschematools.client.schemas.NullJsonSchema; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java index 6e3fc408ed7..9ef2a4f9dcd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java @@ -8,7 +8,6 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java index 1cf5c72941d..c71651c745e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java @@ -8,7 +8,6 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java index 44bb713e4de..fd63d70525f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java @@ -8,7 +8,6 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java index 77d4eaa3c95..536bad5e41c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java index fc81432334a..702a4da219d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java @@ -10,16 +10,12 @@ import java.util.Objects; import java.util.Set; import java.util.UUID; -import java.util.regex.Pattern; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; -import org.openapijsonschematools.client.schemas.DateJsonSchema; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java index 73214362cf6..a5ebe9f0e72 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java @@ -8,7 +8,6 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java index 9b469609eee..142e3e1f314 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java index f5699c5e806..2a7db518c9d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,10 +27,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EquilateralTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java index a45071394a6..4f66c8e036c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java @@ -43,11 +43,11 @@ public class FormatTest { // nest classes so all schemas and input/output classes can be public - public sealed interface IntegerSchemaBoxed permits IntegerSchemaBoxedNumber { + public sealed interface IntegerBoxed permits IntegerBoxedNumber { @Nullable Object getData(); } - public record IntegerSchemaBoxedNumber(Number data) implements IntegerSchemaBoxed { + public record IntegerBoxedNumber(Number data) implements IntegerBoxed { @Override public @Nullable Object getData() { return data; @@ -56,10 +56,10 @@ public record IntegerSchemaBoxedNumber(Number data) implements IntegerSchemaBoxe - public static class IntegerSchema extends JsonSchema implements NumberSchemaValidator { - private static @Nullable IntegerSchema instance = null; + public static class Integer extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Integer instance = null; - protected IntegerSchema() { + protected Integer() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -74,9 +74,9 @@ protected IntegerSchema() { ); } - public static IntegerSchema getInstance() { + public static Integer getInstance() { if (instance == null) { - instance = new IntegerSchema(); + instance = new Integer(); } return instance; } @@ -123,11 +123,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IntegerSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IntegerSchemaBoxedNumber(validate(arg, configuration)); + public IntegerBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IntegerBoxedNumber(validate(arg, configuration)); } @Override - public IntegerSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IntegerBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -240,11 +240,11 @@ public static Int64 getInstance() { } - public sealed interface NumberSchemaBoxed permits NumberSchemaBoxedNumber { + public sealed interface NumberBoxed permits NumberBoxedNumber { @Nullable Object getData(); } - public record NumberSchemaBoxedNumber(Number data) implements NumberSchemaBoxed { + public record NumberBoxedNumber(Number data) implements NumberBoxed { @Override public @Nullable Object getData() { return data; @@ -253,10 +253,10 @@ public record NumberSchemaBoxedNumber(Number data) implements NumberSchemaBoxed - public static class NumberSchema extends JsonSchema implements NumberSchemaValidator { - private static @Nullable NumberSchema instance = null; + public static class Number extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Number instance = null; - protected NumberSchema() { + protected Number() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -270,9 +270,9 @@ protected NumberSchema() { ); } - public static NumberSchema getInstance() { + public static Number getInstance() { if (instance == null) { - instance = new NumberSchema(); + instance = new Number(); } return instance; } @@ -319,11 +319,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public NumberSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberSchemaBoxedNumber(validate(arg, configuration)); + public NumberBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberBoxedNumber(validate(arg, configuration)); } @Override - public NumberSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public NumberBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -331,11 +331,11 @@ public NumberSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguratio } } - public sealed interface FloatSchemaBoxed permits FloatSchemaBoxedNumber { + public sealed interface FloatBoxed permits FloatBoxedNumber { @Nullable Object getData(); } - public record FloatSchemaBoxedNumber(Number data) implements FloatSchemaBoxed { + public record FloatBoxedNumber(Number data) implements FloatBoxed { @Override public @Nullable Object getData() { return data; @@ -344,10 +344,10 @@ public record FloatSchemaBoxedNumber(Number data) implements FloatSchemaBoxed { - public static class FloatSchema extends JsonSchema implements NumberSchemaValidator { - private static @Nullable FloatSchema instance = null; + public static class Float extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Float instance = null; - protected FloatSchema() { + protected Float() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -361,9 +361,9 @@ protected FloatSchema() { ); } - public static FloatSchema getInstance() { + public static Float getInstance() { if (instance == null) { - instance = new FloatSchema(); + instance = new Float(); } return instance; } @@ -397,11 +397,11 @@ public float validate(float arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public FloatSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatSchemaBoxedNumber(validate(arg, configuration)); + public FloatBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatBoxedNumber(validate(arg, configuration)); } @Override - public FloatSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public FloatBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -420,11 +420,11 @@ public static Float32 getInstance() { } - public sealed interface DoubleSchemaBoxed permits DoubleSchemaBoxedNumber { + public sealed interface DoubleBoxed permits DoubleBoxedNumber { @Nullable Object getData(); } - public record DoubleSchemaBoxedNumber(Number data) implements DoubleSchemaBoxed { + public record DoubleBoxedNumber(Number data) implements DoubleBoxed { @Override public @Nullable Object getData() { return data; @@ -433,10 +433,10 @@ public record DoubleSchemaBoxedNumber(Number data) implements DoubleSchemaBoxed - public static class DoubleSchema extends JsonSchema implements NumberSchemaValidator { - private static @Nullable DoubleSchema instance = null; + public static class Double extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Double instance = null; - protected DoubleSchema() { + protected Double() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -450,9 +450,9 @@ protected DoubleSchema() { ); } - public static DoubleSchema getInstance() { + public static Double getInstance() { if (instance == null) { - instance = new DoubleSchema(); + instance = new Double(); } return instance; } @@ -486,11 +486,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public DoubleSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleSchemaBoxedNumber(validate(arg, configuration)); + public DoubleBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleBoxedNumber(validate(arg, configuration)); } @Override - public DoubleSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public DoubleBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -658,11 +658,11 @@ public ArrayWithUniqueItemsBoxed validateAndBox(@Nullable Object arg, SchemaConf } } - public sealed interface StringSchemaBoxed permits StringSchemaBoxedString { + public sealed interface StringBoxed permits StringBoxedString { @Nullable Object getData(); } - public record StringSchemaBoxedString(String data) implements StringSchemaBoxed { + public record StringBoxedString(String data) implements StringBoxed { @Override public @Nullable Object getData() { return data; @@ -671,10 +671,10 @@ public record StringSchemaBoxedString(String data) implements StringSchemaBoxed - public static class StringSchema extends JsonSchema implements StringSchemaValidator { - private static @Nullable StringSchema instance = null; + public static class String extends JsonSchema implements StringSchemaValidator { + private static @Nullable String instance = null; - protected StringSchema() { + protected String() { super(new JsonSchemaInfo() .type(Set.of( String.class @@ -686,9 +686,9 @@ protected StringSchema() { ); } - public static StringSchema getInstance() { + public static String getInstance() { if (instance == null) { - instance = new StringSchema(); + instance = new String(); } return instance; } @@ -719,11 +719,11 @@ public String validate(String arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public StringSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new StringSchemaBoxedString(validate(arg, configuration)); + public StringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new StringBoxedString(validate(arg, configuration)); } @Override - public StringSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public StringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof String castArg) { return validateAndBox(castArg, configuration); } @@ -731,11 +731,11 @@ public StringSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguratio } } - public static class ByteSchema extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable ByteSchema instance = null; - public static ByteSchema getInstance() { + public static class Byte extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Byte instance = null; + public static Byte getInstance() { if (instance == null) { - instance = new ByteSchema(); + instance = new Byte(); } return instance; } @@ -776,11 +776,11 @@ public static DateTime getInstance() { } - public static class UuidSchema extends UuidJsonSchema.UuidJsonSchema1 { - private static @Nullable UuidSchema instance = null; - public static UuidSchema getInstance() { + public static class Uuid extends UuidJsonSchema.UuidJsonSchema1 { + private static @Nullable Uuid instance = null; + public static Uuid getInstance() { if (instance == null) { - instance = new UuidSchema(); + instance = new Uuid(); } return instance; } @@ -1059,6 +1059,14 @@ public static FormatTestMap of(Map arg, Sche return FormatTest1.getInstance().validate(arg, configuration); } + public String byte() { + @Nullable Object value = get("byte"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for byte"); + } + return (String) value; + } + public String date() { @Nullable Object value = get("date"); if (!(value instanceof String)) { @@ -1067,6 +1075,14 @@ public String date() { return (String) value; } + public Number number() { + @Nullable Object value = get("number"); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for number"); + } + return (Number) value; + } + public String password() { @Nullable Object value = get("password"); if (!(value instanceof String)) { @@ -1075,6 +1091,16 @@ public String password() { return (String) value; } + public Number integer() throws UnsetPropertyException { + String key = "integer"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for integer"); + } + return (Number) value; + } + public Number int32() throws UnsetPropertyException { String key = "int32"; throwIfKeyNotPresent(key); @@ -1105,6 +1131,16 @@ public Number int64() throws UnsetPropertyException { return (Number) value; } + public Number float() throws UnsetPropertyException { + String key = "float"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for float"); + } + return (Number) value; + } + public Number float32() throws UnsetPropertyException { String key = "float32"; throwIfKeyNotPresent(key); @@ -1115,6 +1151,16 @@ public Number float32() throws UnsetPropertyException { return (Number) value; } + public Number double() throws UnsetPropertyException { + String key = "double"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for double"); + } + return (Number) value; + } + public Number float64() throws UnsetPropertyException { String key = "float64"; throwIfKeyNotPresent(key); @@ -1135,6 +1181,16 @@ public ArrayWithUniqueItemsList arrayWithUniqueItems() throws UnsetPropertyExcep return (ArrayWithUniqueItemsList) value; } + public String string() throws UnsetPropertyException { + String key = "string"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for string"); + } + return (String) value; + } + public String binary() throws UnsetPropertyException { String key = "binary"; throwIfKeyNotPresent(key); @@ -1155,6 +1211,16 @@ public String dateTime() throws UnsetPropertyException { return (String) value; } + public String uuid() throws UnsetPropertyException { + String key = "uuid"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for uuid"); + } + return (String) value; + } + public String uuidNoExample() throws UnsetPropertyException { String key = "uuidNoExample"; throwIfKeyNotPresent(key); @@ -1202,14 +1268,14 @@ public Void noneProp() throws UnsetPropertyException { } } - public interface SetterForByteSchema { + public interface SetterForByte { Map getInstance(); - T getBuilderAfterByteSchema(Map instance); + T getBuilderAfterByte(Map instance); - default T setByte(String value) { + default T byte(String value) { var instance = getInstance(); instance.put("byte", value); - return getBuilderAfterByteSchema(instance); + return getBuilderAfterByte(instance); } } @@ -1224,32 +1290,32 @@ default T date(String value) { } } - public interface SetterForNumberSchema { + public interface SetterForNumber { Map getInstance(); - T getBuilderAfterNumberSchema(Map instance); + T getBuilderAfterNumber(Map instance); - default T setNumber(int value) { + default T number(int value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(float value) { + default T number(float value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(long value) { + default T number(long value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } - default T setNumber(double value) { + default T number(double value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumberSchema(instance); + return getBuilderAfterNumber(instance); } } @@ -1264,32 +1330,32 @@ default T password(String value) { } } - public interface SetterForIntegerSchema { + public interface SetterForInteger { Map getInstance(); - T getBuilderAfterIntegerSchema(Map instance); + T getBuilderAfterInteger(Map instance); - default T setInteger(int value) { + default T integer(int value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterIntegerSchema(instance); + return getBuilderAfterInteger(instance); } - default T setInteger(float value) { + default T integer(float value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterIntegerSchema(instance); + return getBuilderAfterInteger(instance); } - default T setInteger(long value) { + default T integer(long value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterIntegerSchema(instance); + return getBuilderAfterInteger(instance); } - default T setInteger(double value) { + default T integer(double value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterIntegerSchema(instance); + return getBuilderAfterInteger(instance); } } @@ -1356,32 +1422,32 @@ default T int64(double value) { } } - public interface SetterForFloatSchema { + public interface SetterForFloat { Map getInstance(); - T getBuilderAfterFloatSchema(Map instance); + T getBuilderAfterFloat(Map instance); - default T setFloat(int value) { + default T float(int value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(float value) { + default T float(float value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(long value) { + default T float(long value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } - default T setFloat(double value) { + default T float(double value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloatSchema(instance); + return getBuilderAfterFloat(instance); } } @@ -1414,32 +1480,32 @@ default T float32(double value) { } } - public interface SetterForDoubleSchema { + public interface SetterForDouble { Map getInstance(); - T getBuilderAfterDoubleSchema(Map instance); + T getBuilderAfterDouble(Map instance); - default T setDouble(int value) { + default T double(int value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(float value) { + default T double(float value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(long value) { + default T double(long value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } - default T setDouble(double value) { + default T double(double value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDoubleSchema(instance); + return getBuilderAfterDouble(instance); } } @@ -1483,14 +1549,14 @@ default T arrayWithUniqueItems(List value) { } } - public interface SetterForStringSchema { + public interface SetterForString { Map getInstance(); - T getBuilderAfterStringSchema(Map instance); + T getBuilderAfterString(Map instance); - default T setString(String value) { + default T string(String value) { var instance = getInstance(); instance.put("string", value); - return getBuilderAfterStringSchema(instance); + return getBuilderAfterString(instance); } } @@ -1516,14 +1582,14 @@ default T dateTime(String value) { } } - public interface SetterForUuidSchema { + public interface SetterForUuid { Map getInstance(); - T getBuilderAfterUuidSchema(Map instance); + T getBuilderAfterUuid(Map instance); - default T setUuid(String value) { + default T uuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } } @@ -1571,7 +1637,7 @@ default T noneProp(Void value) { } } - public static class FormatTestMap0000Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForIntegerSchema, SetterForInt32, SetterForInt32withValidations, SetterForInt64, SetterForFloatSchema, SetterForFloat32, SetterForDoubleSchema, SetterForFloat64, SetterForArrayWithUniqueItems, SetterForStringSchema, SetterForBinary, SetterForDateTime, SetterForUuidSchema, SetterForUuidNoExample, SetterForPatternWithDigits, SetterForPatternWithDigitsAndDelimiter, SetterForNoneProp { + public static class FormatTestMap0000Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForInteger, SetterForInt32, SetterForInt32withValidations, SetterForInt64, SetterForFloat, SetterForFloat32, SetterForDouble, SetterForFloat64, SetterForArrayWithUniqueItems, SetterForString, SetterForBinary, SetterForDateTime, SetterForUuid, SetterForUuidNoExample, SetterForPatternWithDigits, SetterForPatternWithDigitsAndDelimiter, SetterForNoneProp { private final Map instance; private static final Set knownKeys = Set.of( "byte", @@ -1608,7 +1674,7 @@ public FormatTestMap0000Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterIntegerSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterInteger(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterInt32(Map instance) { @@ -1620,13 +1686,13 @@ public FormatTestMap0000Builder getBuilderAfterInt32withValidations(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterFloatSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterFloat(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterFloat32(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterDoubleSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterDouble(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterFloat64(Map instance) { @@ -1635,7 +1701,7 @@ public FormatTestMap0000Builder getBuilderAfterFloat64(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterStringSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterString(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterBinary(Map instance) { @@ -1644,7 +1710,7 @@ public FormatTestMap0000Builder getBuilderAfterBinary(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterUuidSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterUuid(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterUuidNoExample(Map instance) { @@ -1677,7 +1743,7 @@ public FormatTestMap0000Builder getBuilderAfterPassword(Map { + public static class FormatTestMap0010Builder implements SetterForNumber { private final Map instance; public FormatTestMap0010Builder(Map instance) { this.instance = instance; @@ -1685,12 +1751,12 @@ public FormatTestMap0010Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap0000Builder(instance); } } - public static class FormatTestMap0011Builder implements SetterForNumberSchema, SetterForPassword { + public static class FormatTestMap0011Builder implements SetterForNumber, SetterForPassword { private final Map instance; public FormatTestMap0011Builder(Map instance) { this.instance = instance; @@ -1698,7 +1764,7 @@ public FormatTestMap0011Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0001Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap0001Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap0001Builder(instance); } public FormatTestMap0010Builder getBuilderAfterPassword(Map instance) { @@ -1735,7 +1801,7 @@ public FormatTestMap0100Builder getBuilderAfterPassword(Map, SetterForNumberSchema { + public static class FormatTestMap0110Builder implements SetterForDate, SetterForNumber { private final Map instance; public FormatTestMap0110Builder(Map instance) { this.instance = instance; @@ -1746,12 +1812,12 @@ public FormatTestMap0110Builder(Map instance) { public FormatTestMap0010Builder getBuilderAfterDate(Map instance) { return new FormatTestMap0010Builder(instance); } - public FormatTestMap0100Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap0100Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap0100Builder(instance); } } - public static class FormatTestMap0111Builder implements SetterForDate, SetterForNumberSchema, SetterForPassword { + public static class FormatTestMap0111Builder implements SetterForDate, SetterForNumber, SetterForPassword { private final Map instance; public FormatTestMap0111Builder(Map instance) { this.instance = instance; @@ -1762,7 +1828,7 @@ public FormatTestMap0111Builder(Map instance) { public FormatTestMap0011Builder getBuilderAfterDate(Map instance) { return new FormatTestMap0011Builder(instance); } - public FormatTestMap0101Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap0101Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap0101Builder(instance); } public FormatTestMap0110Builder getBuilderAfterPassword(Map instance) { @@ -1770,7 +1836,7 @@ public FormatTestMap0110Builder getBuilderAfterPassword(Map { + public static class FormatTestMap1000Builder implements SetterForByte { private final Map instance; public FormatTestMap1000Builder(Map instance) { this.instance = instance; @@ -1778,12 +1844,12 @@ public FormatTestMap1000Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0000Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0000Builder(instance); } } - public static class FormatTestMap1001Builder implements SetterForByteSchema, SetterForPassword { + public static class FormatTestMap1001Builder implements SetterForByte, SetterForPassword { private final Map instance; public FormatTestMap1001Builder(Map instance) { this.instance = instance; @@ -1791,7 +1857,7 @@ public FormatTestMap1001Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0001Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0001Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0001Builder(instance); } public FormatTestMap1000Builder getBuilderAfterPassword(Map instance) { @@ -1799,7 +1865,7 @@ public FormatTestMap1000Builder getBuilderAfterPassword(Map, SetterForNumberSchema { + public static class FormatTestMap1010Builder implements SetterForByte, SetterForNumber { private final Map instance; public FormatTestMap1010Builder(Map instance) { this.instance = instance; @@ -1807,15 +1873,15 @@ public FormatTestMap1010Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0010Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0010Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0010Builder(instance); } - public FormatTestMap1000Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap1000Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap1000Builder(instance); } } - public static class FormatTestMap1011Builder implements SetterForByteSchema, SetterForNumberSchema, SetterForPassword { + public static class FormatTestMap1011Builder implements SetterForByte, SetterForNumber, SetterForPassword { private final Map instance; public FormatTestMap1011Builder(Map instance) { this.instance = instance; @@ -1823,10 +1889,10 @@ public FormatTestMap1011Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0011Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0011Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0011Builder(instance); } - public FormatTestMap1001Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap1001Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap1001Builder(instance); } public FormatTestMap1010Builder getBuilderAfterPassword(Map instance) { @@ -1834,7 +1900,7 @@ public FormatTestMap1010Builder getBuilderAfterPassword(Map, SetterForDate { + public static class FormatTestMap1100Builder implements SetterForByte, SetterForDate { private final Map instance; public FormatTestMap1100Builder(Map instance) { this.instance = instance; @@ -1842,7 +1908,7 @@ public FormatTestMap1100Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0100Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0100Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0100Builder(instance); } public FormatTestMap1000Builder getBuilderAfterDate(Map instance) { @@ -1850,7 +1916,7 @@ public FormatTestMap1000Builder getBuilderAfterDate(Map, SetterForDate, SetterForPassword { + public static class FormatTestMap1101Builder implements SetterForByte, SetterForDate, SetterForPassword { private final Map instance; public FormatTestMap1101Builder(Map instance) { this.instance = instance; @@ -1858,7 +1924,7 @@ public FormatTestMap1101Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0101Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0101Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0101Builder(instance); } public FormatTestMap1001Builder getBuilderAfterDate(Map instance) { @@ -1869,7 +1935,7 @@ public FormatTestMap1100Builder getBuilderAfterPassword(Map, SetterForDate, SetterForNumberSchema { + public static class FormatTestMap1110Builder implements SetterForByte, SetterForDate, SetterForNumber { private final Map instance; public FormatTestMap1110Builder(Map instance) { this.instance = instance; @@ -1877,18 +1943,18 @@ public FormatTestMap1110Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0110Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0110Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0110Builder(instance); } public FormatTestMap1010Builder getBuilderAfterDate(Map instance) { return new FormatTestMap1010Builder(instance); } - public FormatTestMap1100Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap1100Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap1100Builder(instance); } } - public static class FormatTestMapBuilder implements SetterForByteSchema, SetterForDate, SetterForNumberSchema, SetterForPassword { + public static class FormatTestMapBuilder implements SetterForByte, SetterForDate, SetterForNumber, SetterForPassword { private final Map instance; public FormatTestMapBuilder() { this.instance = new LinkedHashMap<>(); @@ -1896,13 +1962,13 @@ public FormatTestMapBuilder() { public Map getInstance() { return instance; } - public FormatTestMap0111Builder getBuilderAfterByteSchema(Map instance) { + public FormatTestMap0111Builder getBuilderAfterByte(Map instance) { return new FormatTestMap0111Builder(instance); } public FormatTestMap1011Builder getBuilderAfterDate(Map instance) { return new FormatTestMap1011Builder(instance); } - public FormatTestMap1101Builder getBuilderAfterNumberSchema(Map instance) { + public FormatTestMap1101Builder getBuilderAfterNumber(Map instance) { return new FormatTestMap1101Builder(instance); } public FormatTestMap1110Builder getBuilderAfterPassword(Map instance) { @@ -1936,22 +2002,22 @@ protected FormatTest1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("integer", IntegerSchema.class), + new PropertyEntry("integer", Integer.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int32withValidations", Int32withValidations.class), new PropertyEntry("int64", Int64.class), - new PropertyEntry("number", NumberSchema.class), - new PropertyEntry("float", FloatSchema.class), + new PropertyEntry("number", Number.class), + new PropertyEntry("float", Float.class), new PropertyEntry("float32", Float32.class), - new PropertyEntry("double", DoubleSchema.class), + new PropertyEntry("double", Double.class), new PropertyEntry("float64", Float64.class), new PropertyEntry("arrayWithUniqueItems", ArrayWithUniqueItems.class), - new PropertyEntry("string", StringSchema.class), - new PropertyEntry("byte", ByteSchema.class), + new PropertyEntry("string", String.class), + new PropertyEntry("byte", Byte.class), new PropertyEntry("binary", Binary.class), new PropertyEntry("date", Date.class), new PropertyEntry("dateTime", DateTime.class), - new PropertyEntry("uuid", UuidSchema.class), + new PropertyEntry("uuid", Uuid.class), new PropertyEntry("uuidNoExample", UuidNoExample.class), new PropertyEntry("password", Password.class), new PropertyEntry("pattern_with_digits", PatternWithDigits.class), diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java index a1720d94d2a..2ef24b11071 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java index 0e6b7c0a3b6..212c7601506 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,10 +27,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IsoscelesTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java index d44c2b8b87a..6b7776e0231 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java index 5268a23c3d3..0b06f5405b2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java index d80e56f8f70..a7c67f60728 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java @@ -30,11 +30,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass { // nest classes so all schemas and input/output classes can be public - public static class UuidSchema extends UuidJsonSchema.UuidJsonSchema1 { - private static @Nullable UuidSchema instance = null; - public static UuidSchema getInstance() { + public static class Uuid extends UuidJsonSchema.UuidJsonSchema1 { + private static @Nullable Uuid instance = null; + public static Uuid getInstance() { if (instance == null) { - instance = new UuidSchema(); + instance = new Uuid(); } return instance; } @@ -59,7 +59,7 @@ protected MapMap(FrozenMap m) { public static final Set requiredKeys = Set.of(); public static final Set optionalKeys = Set.of(); public static MapMap of(Map> arg, SchemaConfiguration configuration) throws ValidationException { - return MapSchema.getInstance().validate(arg, configuration); + return Map.getInstance().validate(arg, configuration); } public Animal.AnimalMap getAdditionalProperty(String name) throws UnsetPropertyException { @@ -101,11 +101,11 @@ public MapMapBuilder getBuilderAfterAdditionalProperty(Map implements MapSchemaValidator { - private static @Nullable MapSchema instance = null; + public static class Map extends JsonSchema implements MapSchemaValidator { + private static @Nullable Map instance = null; - protected MapSchema() { + protected Map() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .additionalProperties(Animal.Animal1.class) ); } - public static MapSchema getInstance() { + public static Map getInstance() { if (instance == null) { - instance = new MapSchema(); + instance = new Map(); } return instance; } @@ -182,11 +182,11 @@ public MapMap validate(Map arg, SchemaConfiguration configuration) throws throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public MapSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MapSchemaBoxedMap(validate(arg, configuration)); + public MapBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MapBoxedMap(validate(arg, configuration)); } @Override - public MapSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public MapBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Map castArg) { return validateAndBox(castArg, configuration); } @@ -209,6 +209,16 @@ public static MixedPropertiesAndAdditionalPropertiesClassMap of(Map { + public interface SetterForUuid { Map getInstance(); - T getBuilderAfterUuidSchema(Map instance); + T getBuilderAfterUuid(Map instance); - default T setUuid(String value) { + default T uuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuidSchema(instance); + return getBuilderAfterUuid(instance); } } @@ -248,18 +268,18 @@ default T dateTime(String value) { } } - public interface SetterForMapSchema { + public interface SetterForMap { Map getInstance(); - T getBuilderAfterMapSchema(Map instance); + T getBuilderAfterMap(Map instance); - default T setMap(Map> value) { + default T map(Map> value) { var instance = getInstance(); instance.put("map", value); - return getBuilderAfterMapSchema(instance); + return getBuilderAfterMap(instance); } } - public static class MixedPropertiesAndAdditionalPropertiesClassMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuidSchema, SetterForDateTime, SetterForMapSchema { + public static class MixedPropertiesAndAdditionalPropertiesClassMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuid, SetterForDateTime, SetterForMap { private final Map instance; private static final Set knownKeys = Set.of( "uuid", @@ -278,13 +298,13 @@ public MixedPropertiesAndAdditionalPropertiesClassMapBuilder() { public Map getInstance() { return instance; } - public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterUuidSchema(Map instance) { + public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterUuid(Map instance) { return this; } public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterDateTime(Map instance) { return this; } - public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterMapSchema(Map instance) { + public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterMap(Map instance) { return this; } public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -318,9 +338,9 @@ protected MixedPropertiesAndAdditionalPropertiesClass1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("uuid", UuidSchema.class), + new PropertyEntry("uuid", Uuid.class), new PropertyEntry("dateTime", DateTime.class), - new PropertyEntry("map", MapSchema.class) + new PropertyEntry("map", Map.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java index cb104f6ed20..2a63a1c5366 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.DecimalJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java index b8ebf95ee51..91f4dc99bcf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.Int32JsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java index 60550891650..b239431412f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UuidJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java index cd4697afb7d..7775c183045 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java index f27a0c68104..40e499ef269 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java new file mode 100644 index 00000000000..cc684fd4aa0 --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java @@ -0,0 +1,19 @@ +package org.openapijsonschematools.client.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; + +public class Number extends NumberJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Number1 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Number1 instance = null; + public static Number1 getInstance() { + if (instance == null) { + instance = new Number1(); + } + return instance; + } + } + +} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java index aeadbe04628..8697a0285f2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java @@ -191,8 +191,8 @@ protected ObjectModelWithRefProps1() { .type(Set.of(Map.class)) .properties(Map.ofEntries( new PropertyEntry("myNumber", NumberWithValidations.NumberWithValidations1.class), - new PropertyEntry("myString", StringSchema.StringSchema1.class), - new PropertyEntry("myBoolean", BooleanSchema.BooleanSchema1.class) + new PropertyEntry("myString", String.String1.class), + new PropertyEntry("myBoolean", Boolean.Boolean1.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java index 6ad9540bcde..1131157be30 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,7 +27,6 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java index 8acf3e09db6..7862426918b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java index 008eec6ea65..c16f59ebd3e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java new file mode 100644 index 00000000000..9b1bf6cfc5c --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java @@ -0,0 +1,417 @@ +package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.Int32JsonSchema; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.schemas.validation.JsonSchema; +import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; + +public class Return { + // nest classes so all schemas and input/output classes can be public + + + public static class Return2 extends Int32JsonSchema.Int32JsonSchema1 { + private static @Nullable Return2 instance = null; + public static Return2 getInstance() { + if (instance == null) { + instance = new Return2(); + } + return instance; + } + } + + + public static class ReturnMap extends FrozenMap<@Nullable Object> { + protected ReturnMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "return" + ); + public static ReturnMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Return1.getInstance().validate(arg, configuration); + } + + public Number return() throws UnsetPropertyException { + String key = "return"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for return"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForReturn2 { + Map getInstance(); + T getBuilderAfterReturn2(Map instance); + + default T return(int value) { + var instance = getInstance(); + instance.put("return", value); + return getBuilderAfterReturn2(instance); + } + + default T return(float value) { + var instance = getInstance(); + instance.put("return", value); + return getBuilderAfterReturn2(instance); + } + } + + public static class ReturnMapBuilder1 extends UnsetAddPropsSetter implements GenericBuilder>, SetterForReturn2 { + private final Map instance; + private static final Set knownKeys = Set.of( + "return" + ); + public Set getKnownKeys() { + return knownKeys; + } + public ReturnMapBuilder1() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public ReturnMapBuilder1 getBuilderAfterReturn2(Map instance) { + return this; + } + public ReturnMapBuilder1 getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface Return1Boxed permits Return1BoxedVoid, Return1BoxedBoolean, Return1BoxedNumber, Return1BoxedString, Return1BoxedList, Return1BoxedMap { + @Nullable Object getData(); + } + + public record Return1BoxedVoid(Void data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Return1BoxedBoolean(boolean data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Return1BoxedNumber(Number data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Return1BoxedString(String data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Return1BoxedList(FrozenList<@Nullable Object> data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Return1BoxedMap(ReturnMap data) implements Return1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Return1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Return1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Model for testing reserved words + */ + private static @Nullable Return1 instance = null; + + protected Return1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("return", Return2.class) + )) + ); + } + + public static Return1 getInstance() { + if (instance == null) { + instance = new Return1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ReturnMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new ReturnMap(castProperties); + } + + public ReturnMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Return1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedVoid(validate(arg, configuration)); + } + @Override + public Return1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Return1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedNumber(validate(arg, configuration)); + } + @Override + public Return1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedString(validate(arg, configuration)); + } + @Override + public Return1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedList(validate(arg, configuration)); + } + @Override + public Return1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Return1BoxedMap(validate(arg, configuration)); + } + @Override + public Return1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java index d4f0af142dc..cc4a53ba472 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,10 +27,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ScaleneTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java index e6139c4da81..986358566e1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java @@ -49,11 +49,11 @@ public static Name getInstance() { } - public static class ClassSchema extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable ClassSchema instance = null; - public static ClassSchema getInstance() { + public static class Class extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Class instance = null; + public static Class getInstance() { if (instance == null) { - instance = new ClassSchema(); + instance = new Class(); } return instance; } @@ -83,6 +83,16 @@ public Number name() throws UnsetPropertyException { return (Number) value; } + public String class() throws UnsetPropertyException { + String key = "class"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for class"); + } + return (String) value; + } + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -107,18 +117,18 @@ default T name(float value) { } } - public interface SetterForClassSchema { + public interface SetterForClass { Map getInstance(); - T getBuilderAfterClassSchema(Map instance); + T getBuilderAfterClass(Map instance); - default T setClass(String value) { + default T class(String value) { var instance = getInstance(); instance.put("class", value); - return getBuilderAfterClassSchema(instance); + return getBuilderAfterClass(instance); } } - public static class Schema200ResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForName, SetterForClassSchema { + public static class Schema200ResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForName, SetterForClass { private final Map instance; private static final Set knownKeys = Set.of( "name", @@ -139,7 +149,7 @@ public Schema200ResponseMapBuilder() { public Schema200ResponseMapBuilder getBuilderAfterName(Map instance) { return this; } - public Schema200ResponseMapBuilder getBuilderAfterClassSchema(Map instance) { + public Schema200ResponseMapBuilder getBuilderAfterClass(Map instance) { return this; } public Schema200ResponseMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -210,7 +220,7 @@ protected Schema200Response1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("name", Name.class), - new PropertyEntry("class", ClassSchema.class) + new PropertyEntry("class", Class.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java index 388bc3c5804..5f2bc1be314 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java index e0e76218a64..aaabd725f98 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java @@ -16,8 +16,6 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -29,10 +27,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SimpleQuadrilateral { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java new file mode 100644 index 00000000000..6bbe281bfe5 --- /dev/null +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java @@ -0,0 +1,19 @@ +package org.openapijsonschematools.client.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.openapijsonschematools.client.schemas.StringJsonSchema; + +public class String extends StringJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class String1 extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable String1 instance = null; + public static String1 getInstance() { + if (instance == null) { + instance = new String1(); + } + return instance; + } + } + +} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java index e799c5ef168..31785ecac55 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java @@ -21,7 +21,6 @@ import org.openapijsonschematools.client.schemas.Int32JsonSchema; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.MapJsonSchema; -import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java index c54c33bc4bb..206182606a8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.delete.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java index e45331271e1..05c6f7de7e9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.delete.parameters.parameter1.Schema1; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java index 6f36aeb9763..b0929b0705c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.parameters.routeparameter0.RouteParamSchema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java index 23c81934321..a352d5fac83 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java index d800414c7de..264a3996489 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.post.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java index def8072055c..9d8161b54c7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.parameters.routeparameter0.RouteParamSchema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java index e9bde480d1f..71610662542 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java @@ -14,7 +14,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter1.Schema1; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter4.Schema4; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java index f5036456013..6b66038337c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter5.Schema5; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java index 4ac48925b27..a5bc9a282eb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java @@ -14,7 +14,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter1.Schema1; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java index 90bb2fbb2a0..310f7f82c54 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.paths.fake.get.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter4.Schema4; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter5.Schema5; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java index 06108b5c1e0..7f53e9f2fcf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java @@ -830,6 +830,30 @@ public static ApplicationxwwwformurlencodedSchemaMap of(Map { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedByte(Map instance); - default T setByte(String value) { + default T byte(String value) { var instance = getInstance(); instance.put("byte", value); return getBuilderAfterApplicationxwwwformurlencodedByte(instance); @@ -930,25 +984,25 @@ public interface SetterForApplicationxwwwformurlencodedDouble { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedDouble(Map instance); - default T setDouble(int value) { + default T double(int value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T setDouble(float value) { + default T double(float value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T setDouble(long value) { + default T double(long value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T setDouble(double value) { + default T double(double value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); @@ -959,25 +1013,25 @@ public interface SetterForApplicationxwwwformurlencodedNumber { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedNumber(Map instance); - default T setNumber(int value) { + default T number(int value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T setNumber(float value) { + default T number(float value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T setNumber(long value) { + default T number(long value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T setNumber(double value) { + default T number(double value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); @@ -999,25 +1053,25 @@ public interface SetterForApplicationxwwwformurlencodedInteger { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedInteger(Map instance); - default T setInteger(int value) { + default T integer(int value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T setInteger(float value) { + default T integer(float value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T setInteger(long value) { + default T integer(long value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T setInteger(double value) { + default T integer(double value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); @@ -1074,25 +1128,25 @@ public interface SetterForApplicationxwwwformurlencodedFloat { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedFloat(Map instance); - default T setFloat(int value) { + default T float(int value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T setFloat(float value) { + default T float(float value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T setFloat(long value) { + default T float(long value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T setFloat(double value) { + default T float(double value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); @@ -1103,7 +1157,7 @@ public interface SetterForApplicationxwwwformurlencodedString { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedString(Map instance); - default T setString(String value) { + default T string(String value) { var instance = getInstance(); instance.put("string", value); return getBuilderAfterApplicationxwwwformurlencodedString(instance); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java index e2e28ed10d7..19e5490ae8d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakebodywithqueryparams.put.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java index 67958cf44dd..45cb87aacd8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java @@ -15,7 +15,6 @@ import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter1.Schema1; import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter2.Schema2; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java index b2171bdfaf0..dba19df786e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakedeletecoffeeid.delete.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java index c4529070458..4311ac77cac 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java @@ -14,7 +14,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakeinlinecomposition.post.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fakeinlinecomposition.post.parameters.parameter1.Schema1; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java index bd8b2045e9c..4efa995a625 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakeobjinquery.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java index 1fde72f7396..2e8a084b127 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter16.Schema16; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter17.Schema17; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter18.Schema18; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java index ab6e94846b2..f01fa286e4d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java @@ -16,7 +16,6 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter6.Schema6; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter7.Schema7; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter8.Schema8; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java index 15c92f81def..6de2537846c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter12.Schema12; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter13.Schema13; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter9.Schema9; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java index 2336817442d..32ae30a04e2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter4.Schema4; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java index caf128e85f0..3959e3610dd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakepetiduploadimagewithrequiredfile.post.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java index 6cd3b657919..bc2c3e1e81a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } public static class FakepetiduploadimagewithrequiredfilePostCode200Response1 extends ResponseDeserializer { public FakepetiduploadimagewithrequiredfilePostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 42e57377e16..6305ff6a241 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakepetiduploadimagewithrequiredfile.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; +import org.openapijsonschematools.client.components.schemas.ApiResponse; -public class ApplicationjsonSchema extends ApiResponseSchema { +public class ApplicationjsonSchema extends ApiResponse { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { + public static class ApplicationjsonSchema1 extends ApiResponse1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java index e9336753ff1..30f5dfcf7d4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakequeryparamwithjsoncontenttype.get.parameters.parameter0.content.applicationjson.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java index 8fd0df37aa2..56a0f8335e6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java index 48e40534184..ed2766fafab 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java @@ -71,11 +71,11 @@ default FakerefsbooleanPostResponses.EndpointResponse post(PostRequest request) } } - public interface ModelBooleanOperation { + public interface BooleanOperation { ApiConfiguration getApiConfiguration(); SchemaConfiguration getSchemaConfiguration(); HttpClient getClient(); - default FakerefsbooleanPostResponses.EndpointResponse modelBoolean(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { + default FakerefsbooleanPostResponses.EndpointResponse boolean(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { return PostProvider.post(request, getApiConfiguration(), getSchemaConfiguration(), getClient()); } } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java index 6c465dba460..c58fa42e1fc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsboolean.post.requestbody.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.BooleanSchema; +import org.openapijsonschematools.client.components.schemas.Boolean; -public class ApplicationjsonSchema extends BooleanSchema { +public class ApplicationjsonSchema extends Boolean { // $refed class - public static class ApplicationjsonSchema1 extends BooleanSchema1 { + public static class ApplicationjsonSchema1 extends Boolean1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 064050b09bf..eb66a7305cb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsboolean.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.BooleanSchema; +import org.openapijsonschematools.client.components.schemas.Boolean; -public class ApplicationjsonSchema extends BooleanSchema { +public class ApplicationjsonSchema extends Boolean { // $refed class - public static class ApplicationjsonSchema1 extends BooleanSchema1 { + public static class ApplicationjsonSchema1 extends Boolean1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java index adc7818a1fa..ff866fdb975 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java @@ -71,11 +71,11 @@ default FakerefsstringPostResponses.EndpointResponse post(PostRequest request) t } } - public interface ModelStringOperation { + public interface StringOperation { ApiConfiguration getApiConfiguration(); SchemaConfiguration getSchemaConfiguration(); HttpClient getClient(); - default FakerefsstringPostResponses.EndpointResponse modelString(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { + default FakerefsstringPostResponses.EndpointResponse string(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { return PostProvider.post(request, getApiConfiguration(), getSchemaConfiguration(), getClient()); } } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java index 7ebeea7dcd3..a17b34126c0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsstring.post.requestbody.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.StringSchema; +import org.openapijsonschematools.client.components.schemas.String; -public class ApplicationjsonSchema extends StringSchema { +public class ApplicationjsonSchema extends String { // $refed class - public static class ApplicationjsonSchema1 extends StringSchema1 { + public static class ApplicationjsonSchema1 extends String1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 9f140dc31c3..046d0344e2f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsstring.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.StringSchema; +import org.openapijsonschematools.client.components.schemas.String; -public class ApplicationjsonSchema extends StringSchema { +public class ApplicationjsonSchema extends String { // $refed class - public static class ApplicationjsonSchema1 extends StringSchema1 { + public static class ApplicationjsonSchema1 extends String1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java index 91dbcc45d71..a2846f9dda9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java @@ -18,7 +18,6 @@ import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter4.Schema4; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java index 19ee4cb8e6b..01c9d7ab1e1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } public static class FakeuploadfilePostCode200Response1 extends ResponseDeserializer { public FakeuploadfilePostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index efbbe4fc405..2d0523a5fd4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakeuploadfile.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; +import org.openapijsonschematools.client.components.schemas.ApiResponse; -public class ApplicationjsonSchema extends ApiResponseSchema { +public class ApplicationjsonSchema extends ApiResponse { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { + public static class ApplicationjsonSchema1 extends ApiResponse1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java index b2d4ff90442..567b5b5054b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } public static class FakeuploadfilesPostCode200Response1 extends ResponseDeserializer { public FakeuploadfilesPostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index df28450acdb..594a56ed5d9 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakeuploadfiles.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; +import org.openapijsonschematools.client.components.schemas.ApiResponse; -public class ApplicationjsonSchema extends ApiResponseSchema { +public class ApplicationjsonSchema extends ApiResponse { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { + public static class ApplicationjsonSchema1 extends ApiResponse1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java index 8c8442fee2b..dcd05ae1066 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java @@ -40,6 +40,16 @@ public static ApplicationjsonSchemaMap of(Map { Map getInstance(); T getBuilderAfterApplicationjsonString(Map instance); - default T setString(Map value) { + default T string(Map value) { var instance = getInstance(); instance.put("string", value); return getBuilderAfterApplicationjsonString(instance); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java index 35368a77bd1..2d0062b67c3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java index 903dcda7c49..a2b9b294ae1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petfindbystatus.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java index 73133822702..b7c7c966e67 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java index 39aba0ed1c6..95bde4cc713 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petfindbytags.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java index 3bdf3b1f609..434de1dab78 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.delete.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java index 217bc3b8e83..57a0ce458fb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.delete.parameters.parameter1.Schema1; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java index 498b007f37a..a86ecdd788d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java index 28daa3aee1a..6739d83a409 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.post.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java index 29b957c98cd..967f8cf0cbd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetiduploadimage.post.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java index 333df7667ee..2902f42453f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.storeorderorderid.delete.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java index b103bb5c279..811e3aff78d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.storeorderorderid.get.parameters.parameter0.Schema0; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java index c42b97df5ca..e3ba2024c26 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java @@ -14,7 +14,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.userlogin.get.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.userlogin.get.parameters.parameter1.Schema1; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java index 49828653caa..3e77269c9d2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java @@ -17,7 +17,6 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.userlogin.get.responses.code200response.headers.xexpiresafter.XExpiresAfterSchema; import org.openapijsonschematools.client.paths.userlogin.get.responses.code200response.headers.xratelimit.content.applicationjson.XRateLimitSchema; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java index 4d8cbc3a337..b19aacf329a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java index c1a9b62fb37..dc2cecfd9d4 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java index f5c674bac20..1c4fb2a9040 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java @@ -13,7 +13,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java index f8f7eac2b21..0690caa9505 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java index 6204a0b7cff..e4564f47d41 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java @@ -12,7 +12,6 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java new file mode 100644 index 00000000000..44817a6fa76 --- /dev/null +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java @@ -0,0 +1,18 @@ +package org.openapijsonschematools.client.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ApiResponseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); +} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java new file mode 100644 index 00000000000..3aee7fc2264 --- /dev/null +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java @@ -0,0 +1,18 @@ +package org.openapijsonschematools.client.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class BooleanTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); +} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java new file mode 100644 index 00000000000..0932f510463 --- /dev/null +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java @@ -0,0 +1,18 @@ +package org.openapijsonschematools.client.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NumberTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); +} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java new file mode 100644 index 00000000000..c163e0a4f54 --- /dev/null +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java @@ -0,0 +1,18 @@ +package org.openapijsonschematools.client.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ReturnTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); +} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java new file mode 100644 index 00000000000..7ef1533e8cb --- /dev/null +++ b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java @@ -0,0 +1,18 @@ +package org.openapijsonschematools.client.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class StringTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); +} diff --git a/samples/client/petstore/python/.openapi-generator/FILES b/samples/client/petstore/python/.openapi-generator/FILES index 1a383c7c6d8..a493183ff23 100644 --- a/samples/client/petstore/python/.openapi-generator/FILES +++ b/samples/client/petstore/python/.openapi-generator/FILES @@ -52,7 +52,6 @@ docs/components/responses/response_successful_xml_and_json_array_of_pet.md docs/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.md docs/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.md docs/components/schema/_200_response.md -docs/components/schema/_return.md docs/components/schema/abstract_step_message.md docs/components/schema/additional_properties_class.md docs/components/schema/additional_properties_schema.md @@ -172,6 +171,7 @@ docs/components/schema/ref_pet.md docs/components/schema/req_props_from_explicit_add_props.md docs/components/schema/req_props_from_true_add_props.md docs/components/schema/req_props_from_unset_add_props.md +docs/components/schema/return.md docs/components/schema/scalene_triangle.md docs/components/schema/self_referencing_array_model.md docs/components/schema/self_referencing_object_model.md @@ -423,1201 +423,1201 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/petstore_api/__init__.py -src/petstore_api/api_client.py -src/petstore_api/api_response.py -src/petstore_api/apis/__init__.py -src/petstore_api/apis/path_to_api.py -src/petstore_api/apis/paths/__init__.py -src/petstore_api/apis/paths/another_fake_dummy.py -src/petstore_api/apis/paths/common_param_sub_dir.py -src/petstore_api/apis/paths/fake.py -src/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py -src/petstore_api/apis/paths/fake_body_with_file_schema.py -src/petstore_api/apis/paths/fake_body_with_query_params.py -src/petstore_api/apis/paths/fake_case_sensitive_params.py -src/petstore_api/apis/paths/fake_classname_test.py -src/petstore_api/apis/paths/fake_delete_coffee_id.py -src/petstore_api/apis/paths/fake_health.py -src/petstore_api/apis/paths/fake_inline_additional_properties.py -src/petstore_api/apis/paths/fake_inline_composition.py -src/petstore_api/apis/paths/fake_json_form_data.py -src/petstore_api/apis/paths/fake_json_patch.py -src/petstore_api/apis/paths/fake_json_with_charset.py -src/petstore_api/apis/paths/fake_multiple_request_body_content_types.py -src/petstore_api/apis/paths/fake_multiple_response_bodies.py -src/petstore_api/apis/paths/fake_multiple_securities.py -src/petstore_api/apis/paths/fake_obj_in_query.py -src/petstore_api/apis/paths/fake_parameter_collisions1_abab_self_ab.py -src/petstore_api/apis/paths/fake_pem_content_type.py -src/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py -src/petstore_api/apis/paths/fake_query_param_with_json_content_type.py -src/petstore_api/apis/paths/fake_redirection.py -src/petstore_api/apis/paths/fake_ref_obj_in_query.py -src/petstore_api/apis/paths/fake_refs_array_of_enums.py -src/petstore_api/apis/paths/fake_refs_arraymodel.py -src/petstore_api/apis/paths/fake_refs_boolean.py -src/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py -src/petstore_api/apis/paths/fake_refs_enum.py -src/petstore_api/apis/paths/fake_refs_mammal.py -src/petstore_api/apis/paths/fake_refs_number.py -src/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py -src/petstore_api/apis/paths/fake_refs_string.py -src/petstore_api/apis/paths/fake_response_without_schema.py -src/petstore_api/apis/paths/fake_test_query_paramters.py -src/petstore_api/apis/paths/fake_upload_download_file.py -src/petstore_api/apis/paths/fake_upload_file.py -src/petstore_api/apis/paths/fake_upload_files.py -src/petstore_api/apis/paths/fake_wild_card_responses.py -src/petstore_api/apis/paths/foo.py -src/petstore_api/apis/paths/pet.py -src/petstore_api/apis/paths/pet_find_by_status.py -src/petstore_api/apis/paths/pet_find_by_tags.py -src/petstore_api/apis/paths/pet_pet_id.py -src/petstore_api/apis/paths/pet_pet_id_upload_image.py -src/petstore_api/apis/paths/solidus.py -src/petstore_api/apis/paths/store_inventory.py -src/petstore_api/apis/paths/store_order.py -src/petstore_api/apis/paths/store_order_order_id.py -src/petstore_api/apis/paths/user.py -src/petstore_api/apis/paths/user_create_with_array.py -src/petstore_api/apis/paths/user_create_with_list.py -src/petstore_api/apis/paths/user_login.py -src/petstore_api/apis/paths/user_logout.py -src/petstore_api/apis/paths/user_username.py -src/petstore_api/apis/tag_to_api.py -src/petstore_api/apis/tags/__init__.py -src/petstore_api/apis/tags/another_fake_api.py -src/petstore_api/apis/tags/default_api.py -src/petstore_api/apis/tags/fake_api.py -src/petstore_api/apis/tags/fake_classname_tags123_api.py -src/petstore_api/apis/tags/pet_api.py -src/petstore_api/apis/tags/store_api.py -src/petstore_api/apis/tags/user_api.py -src/petstore_api/components/__init__.py -src/petstore_api/components/headers/__init__.py -src/petstore_api/components/headers/header_int32_json_content_type_header/__init__.py -src/petstore_api/components/headers/header_int32_json_content_type_header/content/__init__.py -src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py -src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py -src/petstore_api/components/headers/header_number_header/__init__.py -src/petstore_api/components/headers/header_number_header/schema.py -src/petstore_api/components/headers/header_ref_content_schema_header/__init__.py -src/petstore_api/components/headers/header_ref_content_schema_header/content/__init__.py -src/petstore_api/components/headers/header_ref_content_schema_header/content/application_json/__init__.py -src/petstore_api/components/headers/header_ref_content_schema_header/content/application_json/schema.py -src/petstore_api/components/headers/header_ref_schema_header/__init__.py -src/petstore_api/components/headers/header_ref_schema_header/schema.py -src/petstore_api/components/headers/header_ref_string_header/__init__.py -src/petstore_api/components/headers/header_string_header/__init__.py -src/petstore_api/components/headers/header_string_header/schema.py -src/petstore_api/components/parameters/__init__.py -src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py -src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py -src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py -src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py -src/petstore_api/components/parameters/parameter_path_user_name/__init__.py -src/petstore_api/components/parameters/parameter_path_user_name/schema.py -src/petstore_api/components/parameters/parameter_ref_path_user_name/__init__.py -src/petstore_api/components/parameters/parameter_ref_schema_string_with_validation/__init__.py -src/petstore_api/components/parameters/parameter_ref_schema_string_with_validation/schema.py -src/petstore_api/components/request_bodies/__init__.py -src/petstore_api/components/request_bodies/request_body_client/__init__.py -src/petstore_api/components/request_bodies/request_body_client/content/__init__.py -src/petstore_api/components/request_bodies/request_body_client/content/application_json/__init__.py -src/petstore_api/components/request_bodies/request_body_client/content/application_json/schema.py -src/petstore_api/components/request_bodies/request_body_pet/__init__.py -src/petstore_api/components/request_bodies/request_body_pet/content/__init__.py -src/petstore_api/components/request_bodies/request_body_pet/content/application_json/__init__.py -src/petstore_api/components/request_bodies/request_body_pet/content/application_json/schema.py -src/petstore_api/components/request_bodies/request_body_pet/content/application_xml/__init__.py -src/petstore_api/components/request_bodies/request_body_pet/content/application_xml/schema.py -src/petstore_api/components/request_bodies/request_body_ref_user_array/__init__.py -src/petstore_api/components/request_bodies/request_body_user_array/__init__.py -src/petstore_api/components/request_bodies/request_body_user_array/content/__init__.py -src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/__init__.py -src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py -src/petstore_api/components/responses/__init__.py -src/petstore_api/components/responses/response_headers_with_no_body/__init__.py -src/petstore_api/components/responses/response_headers_with_no_body/header_parameters.py -src/petstore_api/components/responses/response_headers_with_no_body/headers/__init__.py -src/petstore_api/components/responses/response_headers_with_no_body/headers/header_location/__init__.py -src/petstore_api/components/responses/response_headers_with_no_body/headers/header_location/schema.py -src/petstore_api/components/responses/response_ref_success_description_only/__init__.py -src/petstore_api/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py -src/petstore_api/components/responses/response_success_description_only/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/content/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py -src/petstore_api/components/responses/response_success_inline_content_and_header/header_parameters.py -src/petstore_api/components/responses/response_success_inline_content_and_header/headers/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py -src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py -src/petstore_api/components/responses/response_success_with_json_api_response/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/content/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/content/application_json/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/content/application_json/schema.py -src/petstore_api/components/responses/response_success_with_json_api_response/header_parameters.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py -src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py -src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py -src/petstore_api/components/schema/_200_response.py -src/petstore_api/components/schema/__init__.py -src/petstore_api/components/schema/_return.py -src/petstore_api/components/schema/abstract_step_message.py -src/petstore_api/components/schema/additional_properties_class.py -src/petstore_api/components/schema/additional_properties_schema.py -src/petstore_api/components/schema/additional_properties_with_array_of_enums.py -src/petstore_api/components/schema/address.py -src/petstore_api/components/schema/animal.py -src/petstore_api/components/schema/animal_farm.py -src/petstore_api/components/schema/any_type_and_format.py -src/petstore_api/components/schema/any_type_not_string.py -src/petstore_api/components/schema/api_response.py -src/petstore_api/components/schema/apple.py -src/petstore_api/components/schema/apple_req.py -src/petstore_api/components/schema/array_holding_any_type.py -src/petstore_api/components/schema/array_of_array_of_number_only.py -src/petstore_api/components/schema/array_of_enums.py -src/petstore_api/components/schema/array_of_number_only.py -src/petstore_api/components/schema/array_test.py -src/petstore_api/components/schema/array_with_validations_in_items.py -src/petstore_api/components/schema/banana.py -src/petstore_api/components/schema/banana_req.py -src/petstore_api/components/schema/bar.py -src/petstore_api/components/schema/basque_pig.py -src/petstore_api/components/schema/boolean.py -src/petstore_api/components/schema/boolean_enum.py -src/petstore_api/components/schema/capitalization.py -src/petstore_api/components/schema/cat.py -src/petstore_api/components/schema/category.py -src/petstore_api/components/schema/child_cat.py -src/petstore_api/components/schema/class_model.py -src/petstore_api/components/schema/client.py -src/petstore_api/components/schema/complex_quadrilateral.py -src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py -src/petstore_api/components/schema/composed_array.py -src/petstore_api/components/schema/composed_bool.py -src/petstore_api/components/schema/composed_none.py -src/petstore_api/components/schema/composed_number.py -src/petstore_api/components/schema/composed_object.py -src/petstore_api/components/schema/composed_one_of_different_types.py -src/petstore_api/components/schema/composed_string.py -src/petstore_api/components/schema/currency.py -src/petstore_api/components/schema/danish_pig.py -src/petstore_api/components/schema/date_time_test.py -src/petstore_api/components/schema/date_time_with_validations.py -src/petstore_api/components/schema/date_with_validations.py -src/petstore_api/components/schema/decimal_payload.py -src/petstore_api/components/schema/dog.py -src/petstore_api/components/schema/drawing.py -src/petstore_api/components/schema/enum_arrays.py -src/petstore_api/components/schema/enum_class.py -src/petstore_api/components/schema/enum_test.py -src/petstore_api/components/schema/equilateral_triangle.py -src/petstore_api/components/schema/file.py -src/petstore_api/components/schema/file_schema_test_class.py -src/petstore_api/components/schema/foo.py -src/petstore_api/components/schema/format_test.py -src/petstore_api/components/schema/from_schema.py -src/petstore_api/components/schema/fruit.py -src/petstore_api/components/schema/fruit_req.py -src/petstore_api/components/schema/gm_fruit.py -src/petstore_api/components/schema/grandparent_animal.py -src/petstore_api/components/schema/has_only_read_only.py -src/petstore_api/components/schema/health_check_result.py -src/petstore_api/components/schema/integer_enum.py -src/petstore_api/components/schema/integer_enum_big.py -src/petstore_api/components/schema/integer_enum_one_value.py -src/petstore_api/components/schema/integer_enum_with_default_value.py -src/petstore_api/components/schema/integer_max10.py -src/petstore_api/components/schema/integer_min15.py -src/petstore_api/components/schema/isosceles_triangle.py -src/petstore_api/components/schema/items.py -src/petstore_api/components/schema/items_schema.py -src/petstore_api/components/schema/json_patch_request.py -src/petstore_api/components/schema/json_patch_request_add_replace_test.py -src/petstore_api/components/schema/json_patch_request_move_copy.py -src/petstore_api/components/schema/json_patch_request_remove.py -src/petstore_api/components/schema/mammal.py -src/petstore_api/components/schema/map_test.py -src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py -src/petstore_api/components/schema/money.py -src/petstore_api/components/schema/multi_properties_schema.py -src/petstore_api/components/schema/my_object_dto.py -src/petstore_api/components/schema/name.py -src/petstore_api/components/schema/no_additional_properties.py -src/petstore_api/components/schema/nullable_class.py -src/petstore_api/components/schema/nullable_shape.py -src/petstore_api/components/schema/nullable_string.py -src/petstore_api/components/schema/number.py -src/petstore_api/components/schema/number_only.py -src/petstore_api/components/schema/number_with_exclusive_min_max.py -src/petstore_api/components/schema/number_with_validations.py -src/petstore_api/components/schema/obj_with_required_props.py -src/petstore_api/components/schema/obj_with_required_props_base.py -src/petstore_api/components/schema/object_interface.py -src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py -src/petstore_api/components/schema/object_model_with_ref_props.py -src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py -src/petstore_api/components/schema/object_with_colliding_properties.py -src/petstore_api/components/schema/object_with_decimal_properties.py -src/petstore_api/components/schema/object_with_difficultly_named_props.py -src/petstore_api/components/schema/object_with_inline_composition_property.py -src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py -src/petstore_api/components/schema/object_with_non_intersecting_values.py -src/petstore_api/components/schema/object_with_only_optional_props.py -src/petstore_api/components/schema/object_with_optional_test_prop.py -src/petstore_api/components/schema/object_with_validations.py -src/petstore_api/components/schema/order.py -src/petstore_api/components/schema/paginated_result_my_object_dto.py -src/petstore_api/components/schema/parent_pet.py -src/petstore_api/components/schema/pet.py -src/petstore_api/components/schema/pig.py -src/petstore_api/components/schema/player.py -src/petstore_api/components/schema/public_key.py -src/petstore_api/components/schema/quadrilateral.py -src/petstore_api/components/schema/quadrilateral_interface.py -src/petstore_api/components/schema/read_only_first.py -src/petstore_api/components/schema/ref_pet.py -src/petstore_api/components/schema/req_props_from_explicit_add_props.py -src/petstore_api/components/schema/req_props_from_true_add_props.py -src/petstore_api/components/schema/req_props_from_unset_add_props.py -src/petstore_api/components/schema/scalene_triangle.py -src/petstore_api/components/schema/self_referencing_array_model.py -src/petstore_api/components/schema/self_referencing_object_model.py -src/petstore_api/components/schema/shape.py -src/petstore_api/components/schema/shape_or_null.py -src/petstore_api/components/schema/simple_quadrilateral.py -src/petstore_api/components/schema/some_object.py -src/petstore_api/components/schema/special_model_name.py -src/petstore_api/components/schema/string.py -src/petstore_api/components/schema/string_boolean_map.py -src/petstore_api/components/schema/string_enum.py -src/petstore_api/components/schema/string_enum_with_default_value.py -src/petstore_api/components/schema/string_with_validation.py -src/petstore_api/components/schema/tag.py -src/petstore_api/components/schema/triangle.py -src/petstore_api/components/schema/triangle_interface.py -src/petstore_api/components/schema/user.py -src/petstore_api/components/schema/uuid_string.py -src/petstore_api/components/schema/whale.py -src/petstore_api/components/schema/zebra.py -src/petstore_api/components/schemas/__init__.py -src/petstore_api/components/security_schemes/__init__.py -src/petstore_api/components/security_schemes/security_scheme_api_key.py -src/petstore_api/components/security_schemes/security_scheme_api_key_query.py -src/petstore_api/components/security_schemes/security_scheme_bearer_test.py -src/petstore_api/components/security_schemes/security_scheme_http_basic_test.py -src/petstore_api/components/security_schemes/security_scheme_http_signature_test.py -src/petstore_api/components/security_schemes/security_scheme_open_id_connect_test.py -src/petstore_api/components/security_schemes/security_scheme_petstore_auth.py -src/petstore_api/configurations/__init__.py -src/petstore_api/configurations/api_configuration.py -src/petstore_api/configurations/schema_configuration.py -src/petstore_api/exceptions.py -src/petstore_api/paths/__init__.py -src/petstore_api/paths/another_fake_dummy/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/operation.py -src/petstore_api/paths/another_fake_dummy/patch/request_body/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/responses/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/common_param_sub_dir/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/header_parameters.py -src/petstore_api/paths/common_param_sub_dir/delete/operation.py -src/petstore_api/paths/common_param_sub_dir/delete/parameters/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py -src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py -src/petstore_api/paths/common_param_sub_dir/delete/path_parameters.py -src/petstore_api/paths/common_param_sub_dir/delete/responses/__init__.py -src/petstore_api/paths/common_param_sub_dir/delete/responses/response_200/__init__.py -src/petstore_api/paths/common_param_sub_dir/get/__init__.py -src/petstore_api/paths/common_param_sub_dir/get/operation.py -src/petstore_api/paths/common_param_sub_dir/get/parameters/__init__.py -src/petstore_api/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py -src/petstore_api/paths/common_param_sub_dir/get/path_parameters.py -src/petstore_api/paths/common_param_sub_dir/get/query_parameters.py -src/petstore_api/paths/common_param_sub_dir/get/responses/__init__.py -src/petstore_api/paths/common_param_sub_dir/get/responses/response_200/__init__.py -src/petstore_api/paths/common_param_sub_dir/parameters/__init__.py -src/petstore_api/paths/common_param_sub_dir/parameters/parameter_0/__init__.py -src/petstore_api/paths/common_param_sub_dir/parameters/parameter_0/schema.py -src/petstore_api/paths/common_param_sub_dir/post/__init__.py -src/petstore_api/paths/common_param_sub_dir/post/header_parameters.py -src/petstore_api/paths/common_param_sub_dir/post/operation.py -src/petstore_api/paths/common_param_sub_dir/post/parameters/__init__.py -src/petstore_api/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py -src/petstore_api/paths/common_param_sub_dir/post/path_parameters.py -src/petstore_api/paths/common_param_sub_dir/post/responses/__init__.py -src/petstore_api/paths/common_param_sub_dir/post/responses/response_200/__init__.py -src/petstore_api/paths/fake/__init__.py -src/petstore_api/paths/fake/delete/__init__.py -src/petstore_api/paths/fake/delete/header_parameters.py -src/petstore_api/paths/fake/delete/operation.py -src/petstore_api/paths/fake/delete/parameters/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py -src/petstore_api/paths/fake/delete/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py -src/petstore_api/paths/fake/delete/parameters/parameter_2/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py -src/petstore_api/paths/fake/delete/parameters/parameter_3/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py -src/petstore_api/paths/fake/delete/parameters/parameter_4/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py -src/petstore_api/paths/fake/delete/parameters/parameter_5/__init__.py -src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py -src/petstore_api/paths/fake/delete/query_parameters.py -src/petstore_api/paths/fake/delete/responses/__init__.py -src/petstore_api/paths/fake/delete/responses/response_200/__init__.py -src/petstore_api/paths/fake/delete/security/__init__.py -src/petstore_api/paths/fake/delete/security/security_requirement_object_0.py -src/petstore_api/paths/fake/get/__init__.py -src/petstore_api/paths/fake/get/header_parameters.py -src/petstore_api/paths/fake/get/operation.py -src/petstore_api/paths/fake/get/parameters/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py -src/petstore_api/paths/fake/get/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py -src/petstore_api/paths/fake/get/parameters/parameter_2/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py -src/petstore_api/paths/fake/get/parameters/parameter_3/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py -src/petstore_api/paths/fake/get/parameters/parameter_4/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py -src/petstore_api/paths/fake/get/parameters/parameter_5/__init__.py -src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py -src/petstore_api/paths/fake/get/query_parameters.py -src/petstore_api/paths/fake/get/request_body/__init__.py -src/petstore_api/paths/fake/get/request_body/content/__init__.py -src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py -src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py -src/petstore_api/paths/fake/get/responses/__init__.py -src/petstore_api/paths/fake/get/responses/response_200/__init__.py -src/petstore_api/paths/fake/get/responses/response_404/__init__.py -src/petstore_api/paths/fake/get/responses/response_404/content/__init__.py -src/petstore_api/paths/fake/get/responses/response_404/content/application_json/__init__.py -src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py -src/petstore_api/paths/fake/patch/__init__.py -src/petstore_api/paths/fake/patch/operation.py -src/petstore_api/paths/fake/patch/request_body/__init__.py -src/petstore_api/paths/fake/patch/responses/__init__.py -src/petstore_api/paths/fake/patch/responses/response_200/__init__.py -src/petstore_api/paths/fake/patch/responses/response_200/content/__init__.py -src/petstore_api/paths/fake/patch/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake/patch/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake/post/__init__.py -src/petstore_api/paths/fake/post/operation.py -src/petstore_api/paths/fake/post/request_body/__init__.py -src/petstore_api/paths/fake/post/request_body/content/__init__.py -src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py -src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py -src/petstore_api/paths/fake/post/responses/__init__.py -src/petstore_api/paths/fake/post/responses/response_200/__init__.py -src/petstore_api/paths/fake/post/responses/response_404/__init__.py -src/petstore_api/paths/fake/post/security/__init__.py -src/petstore_api/paths/fake/post/security/security_requirement_object_0.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_body_with_file_schema/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/operation.py -src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_body_with_file_schema/put/responses/__init__.py -src/petstore_api/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py -src/petstore_api/paths/fake_body_with_query_params/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/operation.py -src/petstore_api/paths/fake_body_with_query_params/put/parameters/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_body_with_query_params/put/query_parameters.py -src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_body_with_query_params/put/responses/__init__.py -src/petstore_api/paths/fake_body_with_query_params/put/responses/response_200/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/operation.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py -src/petstore_api/paths/fake_case_sensitive_params/put/query_parameters.py -src/petstore_api/paths/fake_case_sensitive_params/put/responses/__init__.py -src/petstore_api/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py -src/petstore_api/paths/fake_classname_test/__init__.py -src/petstore_api/paths/fake_classname_test/patch/__init__.py -src/petstore_api/paths/fake_classname_test/patch/operation.py -src/petstore_api/paths/fake_classname_test/patch/request_body/__init__.py -src/petstore_api/paths/fake_classname_test/patch/responses/__init__.py -src/petstore_api/paths/fake_classname_test/patch/responses/response_200/__init__.py -src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_classname_test/patch/security/__init__.py -src/petstore_api/paths/fake_classname_test/patch/security/security_requirement_object_0.py -src/petstore_api/paths/fake_delete_coffee_id/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py -src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_delete_coffee_id/delete/path_parameters.py -src/petstore_api/paths/fake_delete_coffee_id/delete/responses/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py -src/petstore_api/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py -src/petstore_api/paths/fake_health/__init__.py -src/petstore_api/paths/fake_health/get/__init__.py -src/petstore_api/paths/fake_health/get/operation.py -src/petstore_api/paths/fake_health/get/responses/__init__.py -src/petstore_api/paths/fake_health/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_health/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_health/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_health/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_inline_additional_properties/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/operation.py -src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_inline_additional_properties/post/responses/__init__.py -src/petstore_api/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_inline_composition/__init__.py -src/petstore_api/paths/fake_inline_composition/post/__init__.py -src/petstore_api/paths/fake_inline_composition/post/operation.py -src/petstore_api/paths/fake_inline_composition/post/parameters/__init__.py -src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py -src/petstore_api/paths/fake_inline_composition/post/query_parameters.py -src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py -src/petstore_api/paths/fake_inline_composition/post/request_body/content/__init__.py -src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_inline_composition/post/responses/__init__.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_json_form_data/__init__.py -src/petstore_api/paths/fake_json_form_data/get/__init__.py -src/petstore_api/paths/fake_json_form_data/get/operation.py -src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py -src/petstore_api/paths/fake_json_form_data/get/request_body/content/__init__.py -src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py -src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py -src/petstore_api/paths/fake_json_form_data/get/responses/__init__.py -src/petstore_api/paths/fake_json_form_data/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_json_patch/__init__.py -src/petstore_api/paths/fake_json_patch/patch/__init__.py -src/petstore_api/paths/fake_json_patch/patch/operation.py -src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py -src/petstore_api/paths/fake_json_patch/patch/request_body/content/__init__.py -src/petstore_api/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py -src/petstore_api/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py -src/petstore_api/paths/fake_json_patch/patch/responses/__init__.py -src/petstore_api/paths/fake_json_patch/patch/responses/response_200/__init__.py -src/petstore_api/paths/fake_json_with_charset/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/operation.py -src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/request_body/content/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py -src/petstore_api/paths/fake_json_with_charset/post/responses/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py -src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py -src/petstore_api/paths/fake_multiple_request_body_content_types/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/operation.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_multiple_response_bodies/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py -src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py -src/petstore_api/paths/fake_multiple_securities/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/operation.py -src/petstore_api/paths/fake_multiple_securities/get/responses/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_multiple_securities/get/security/__init__.py -src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_0.py -src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_1.py -src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_2.py -src/petstore_api/paths/fake_obj_in_query/__init__.py -src/petstore_api/paths/fake_obj_in_query/get/__init__.py -src/petstore_api/paths/fake_obj_in_query/get/operation.py -src/petstore_api/paths/fake_obj_in_query/get/parameters/__init__.py -src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_obj_in_query/get/query_parameters.py -src/petstore_api/paths/fake_obj_in_query/get/responses/__init__.py -src/petstore_api/paths/fake_obj_in_query/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_pem_content_type/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/operation.py -src/petstore_api/paths/fake_pem_content_type/get/request_body/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/request_body/content/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py -src/petstore_api/paths/fake_pem_content_type/get/responses/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py -src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py -src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py -src/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/query_parameters.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_redirection/__init__.py -src/petstore_api/paths/fake_redirection/get/__init__.py -src/petstore_api/paths/fake_redirection/get/operation.py -src/petstore_api/paths/fake_redirection/get/responses/__init__.py -src/petstore_api/paths/fake_redirection/get/responses/response_303/__init__.py -src/petstore_api/paths/fake_redirection/get/responses/response_3xx/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py -src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_ref_obj_in_query/get/query_parameters.py -src/petstore_api/paths/fake_ref_obj_in_query/get/responses/__init__.py -src/petstore_api/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py -src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_array_of_enums/post/responses/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_arraymodel/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/operation.py -src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_arraymodel/post/responses/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_boolean/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/operation.py -src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_boolean/post/responses/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_enum/__init__.py -src/petstore_api/paths/fake_refs_enum/post/__init__.py -src/petstore_api/paths/fake_refs_enum/post/operation.py -src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_enum/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_enum/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_enum/post/responses/__init__.py -src/petstore_api/paths/fake_refs_enum/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_mammal/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/operation.py -src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_mammal/post/responses/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_number/__init__.py -src/petstore_api/paths/fake_refs_number/post/__init__.py -src/petstore_api/paths/fake_refs_number/post/operation.py -src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_number/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_number/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_number/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_number/post/responses/__init__.py -src/petstore_api/paths/fake_refs_number/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_refs_string/__init__.py -src/petstore_api/paths/fake_refs_string/post/__init__.py -src/petstore_api/paths/fake_refs_string/post/operation.py -src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py -src/petstore_api/paths/fake_refs_string/post/request_body/content/__init__.py -src/petstore_api/paths/fake_refs_string/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_string/post/request_body/content/application_json/schema.py -src/petstore_api/paths/fake_refs_string/post/responses/__init__.py -src/petstore_api/paths/fake_refs_string/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_response_without_schema/__init__.py -src/petstore_api/paths/fake_response_without_schema/get/__init__.py -src/petstore_api/paths/fake_response_without_schema/get/operation.py -src/petstore_api/paths/fake_response_without_schema/get/responses/__init__.py -src/petstore_api/paths/fake_response_without_schema/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_test_query_paramters/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/operation.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py -src/petstore_api/paths/fake_test_query_paramters/put/query_parameters.py -src/petstore_api/paths/fake_test_query_paramters/put/responses/__init__.py -src/petstore_api/paths/fake_test_query_paramters/put/responses/response_200/__init__.py -src/petstore_api/paths/fake_upload_download_file/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/operation.py -src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/request_body/content/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py -src/petstore_api/paths/fake_upload_download_file/post/responses/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py -src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py -src/petstore_api/paths/fake_upload_file/__init__.py -src/petstore_api/paths/fake_upload_file/post/__init__.py -src/petstore_api/paths/fake_upload_file/post/operation.py -src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py -src/petstore_api/paths/fake_upload_file/post/request_body/content/__init__.py -src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_upload_file/post/responses/__init__.py -src/petstore_api/paths/fake_upload_file/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_upload_files/__init__.py -src/petstore_api/paths/fake_upload_files/post/__init__.py -src/petstore_api/paths/fake_upload_files/post/operation.py -src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py -src/petstore_api/paths/fake_upload_files/post/request_body/content/__init__.py -src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/fake_upload_files/post/responses/__init__.py -src/petstore_api/paths/fake_upload_files/post/responses/response_200/__init__.py -src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/operation.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py -src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py -src/petstore_api/paths/foo/__init__.py -src/petstore_api/paths/foo/get/__init__.py -src/petstore_api/paths/foo/get/operation.py -src/petstore_api/paths/foo/get/responses/__init__.py -src/petstore_api/paths/foo/get/responses/response_default/__init__.py -src/petstore_api/paths/foo/get/responses/response_default/content/__init__.py -src/petstore_api/paths/foo/get/responses/response_default/content/application_json/__init__.py -src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py -src/petstore_api/paths/foo/get/servers/__init__.py -src/petstore_api/paths/foo/get/servers/server_0.py -src/petstore_api/paths/foo/get/servers/server_1.py -src/petstore_api/paths/pet/__init__.py -src/petstore_api/paths/pet/post/__init__.py -src/petstore_api/paths/pet/post/operation.py -src/petstore_api/paths/pet/post/request_body/__init__.py -src/petstore_api/paths/pet/post/responses/__init__.py -src/petstore_api/paths/pet/post/responses/response_200/__init__.py -src/petstore_api/paths/pet/post/responses/response_405/__init__.py -src/petstore_api/paths/pet/post/security/__init__.py -src/petstore_api/paths/pet/post/security/security_requirement_object_0.py -src/petstore_api/paths/pet/post/security/security_requirement_object_1.py -src/petstore_api/paths/pet/post/security/security_requirement_object_2.py -src/petstore_api/paths/pet/put/__init__.py -src/petstore_api/paths/pet/put/operation.py -src/petstore_api/paths/pet/put/request_body/__init__.py -src/petstore_api/paths/pet/put/responses/__init__.py -src/petstore_api/paths/pet/put/responses/response_400/__init__.py -src/petstore_api/paths/pet/put/responses/response_404/__init__.py -src/petstore_api/paths/pet/put/responses/response_405/__init__.py -src/petstore_api/paths/pet/put/security/__init__.py -src/petstore_api/paths/pet/put/security/security_requirement_object_0.py -src/petstore_api/paths/pet/put/security/security_requirement_object_1.py -src/petstore_api/paths/pet_find_by_status/__init__.py -src/petstore_api/paths/pet_find_by_status/get/__init__.py -src/petstore_api/paths/pet_find_by_status/get/operation.py -src/petstore_api/paths/pet_find_by_status/get/parameters/__init__.py -src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_find_by_status/get/query_parameters.py -src/petstore_api/paths/pet_find_by_status/get/responses/__init__.py -src/petstore_api/paths/pet_find_by_status/get/responses/response_200/__init__.py -src/petstore_api/paths/pet_find_by_status/get/responses/response_400/__init__.py -src/petstore_api/paths/pet_find_by_status/get/security/__init__.py -src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_0.py -src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_1.py -src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_2.py -src/petstore_api/paths/pet_find_by_status/servers/__init__.py -src/petstore_api/paths/pet_find_by_status/servers/server_0.py -src/petstore_api/paths/pet_find_by_status/servers/server_1.py -src/petstore_api/paths/pet_find_by_tags/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/operation.py -src/petstore_api/paths/pet_find_by_tags/get/parameters/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_find_by_tags/get/query_parameters.py -src/petstore_api/paths/pet_find_by_tags/get/responses/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/responses/response_200/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/responses/response_400/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/security/__init__.py -src/petstore_api/paths/pet_find_by_tags/get/security/security_requirement_object_0.py -src/petstore_api/paths/pet_find_by_tags/get/security/security_requirement_object_1.py -src/petstore_api/paths/pet_pet_id/__init__.py -src/petstore_api/paths/pet_pet_id/delete/__init__.py -src/petstore_api/paths/pet_pet_id/delete/header_parameters.py -src/petstore_api/paths/pet_pet_id/delete/operation.py -src/petstore_api/paths/pet_pet_id/delete/parameters/__init__.py -src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py -src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py -src/petstore_api/paths/pet_pet_id/delete/path_parameters.py -src/petstore_api/paths/pet_pet_id/delete/responses/__init__.py -src/petstore_api/paths/pet_pet_id/delete/responses/response_400/__init__.py -src/petstore_api/paths/pet_pet_id/delete/security/__init__.py -src/petstore_api/paths/pet_pet_id/delete/security/security_requirement_object_0.py -src/petstore_api/paths/pet_pet_id/delete/security/security_requirement_object_1.py -src/petstore_api/paths/pet_pet_id/get/__init__.py -src/petstore_api/paths/pet_pet_id/get/operation.py -src/petstore_api/paths/pet_pet_id/get/parameters/__init__.py -src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_pet_id/get/path_parameters.py -src/petstore_api/paths/pet_pet_id/get/responses/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py -src/petstore_api/paths/pet_pet_id/get/responses/response_400/__init__.py -src/petstore_api/paths/pet_pet_id/get/responses/response_404/__init__.py -src/petstore_api/paths/pet_pet_id/get/security/__init__.py -src/petstore_api/paths/pet_pet_id/get/security/security_requirement_object_0.py -src/petstore_api/paths/pet_pet_id/post/__init__.py -src/petstore_api/paths/pet_pet_id/post/operation.py -src/petstore_api/paths/pet_pet_id/post/parameters/__init__.py -src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_pet_id/post/path_parameters.py -src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py -src/petstore_api/paths/pet_pet_id/post/request_body/content/__init__.py -src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py -src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py -src/petstore_api/paths/pet_pet_id/post/responses/__init__.py -src/petstore_api/paths/pet_pet_id/post/responses/response_405/__init__.py -src/petstore_api/paths/pet_pet_id/post/security/__init__.py -src/petstore_api/paths/pet_pet_id/post/security/security_requirement_object_0.py -src/petstore_api/paths/pet_pet_id/post/security/security_requirement_object_1.py -src/petstore_api/paths/pet_pet_id_upload_image/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py -src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py -src/petstore_api/paths/pet_pet_id_upload_image/post/path_parameters.py -src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py -src/petstore_api/paths/pet_pet_id_upload_image/post/responses/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/security/__init__.py -src/petstore_api/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py -src/petstore_api/paths/solidus/__init__.py -src/petstore_api/paths/solidus/get/__init__.py -src/petstore_api/paths/solidus/get/operation.py -src/petstore_api/paths/solidus/get/responses/__init__.py -src/petstore_api/paths/solidus/get/responses/response_200/__init__.py -src/petstore_api/paths/store_inventory/__init__.py -src/petstore_api/paths/store_inventory/get/__init__.py -src/petstore_api/paths/store_inventory/get/operation.py -src/petstore_api/paths/store_inventory/get/responses/__init__.py -src/petstore_api/paths/store_inventory/get/responses/response_200/__init__.py -src/petstore_api/paths/store_inventory/get/security/__init__.py -src/petstore_api/paths/store_inventory/get/security/security_requirement_object_0.py -src/petstore_api/paths/store_order/__init__.py -src/petstore_api/paths/store_order/post/__init__.py -src/petstore_api/paths/store_order/post/operation.py -src/petstore_api/paths/store_order/post/request_body/__init__.py -src/petstore_api/paths/store_order/post/request_body/content/__init__.py -src/petstore_api/paths/store_order/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/store_order/post/request_body/content/application_json/schema.py -src/petstore_api/paths/store_order/post/responses/__init__.py -src/petstore_api/paths/store_order/post/responses/response_200/__init__.py -src/petstore_api/paths/store_order/post/responses/response_200/content/__init__.py -src/petstore_api/paths/store_order/post/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/store_order/post/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/store_order/post/responses/response_200/content/application_xml/__init__.py -src/petstore_api/paths/store_order/post/responses/response_200/content/application_xml/schema.py -src/petstore_api/paths/store_order/post/responses/response_400/__init__.py -src/petstore_api/paths/store_order_order_id/__init__.py -src/petstore_api/paths/store_order_order_id/delete/__init__.py -src/petstore_api/paths/store_order_order_id/delete/operation.py -src/petstore_api/paths/store_order_order_id/delete/parameters/__init__.py -src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py -src/petstore_api/paths/store_order_order_id/delete/path_parameters.py -src/petstore_api/paths/store_order_order_id/delete/responses/__init__.py -src/petstore_api/paths/store_order_order_id/delete/responses/response_400/__init__.py -src/petstore_api/paths/store_order_order_id/delete/responses/response_404/__init__.py -src/petstore_api/paths/store_order_order_id/get/__init__.py -src/petstore_api/paths/store_order_order_id/get/operation.py -src/petstore_api/paths/store_order_order_id/get/parameters/__init__.py -src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py -src/petstore_api/paths/store_order_order_id/get/path_parameters.py -src/petstore_api/paths/store_order_order_id/get/responses/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py -src/petstore_api/paths/store_order_order_id/get/responses/response_400/__init__.py -src/petstore_api/paths/store_order_order_id/get/responses/response_404/__init__.py -src/petstore_api/paths/user/__init__.py -src/petstore_api/paths/user/post/__init__.py -src/petstore_api/paths/user/post/operation.py -src/petstore_api/paths/user/post/request_body/__init__.py -src/petstore_api/paths/user/post/request_body/content/__init__.py -src/petstore_api/paths/user/post/request_body/content/application_json/__init__.py -src/petstore_api/paths/user/post/request_body/content/application_json/schema.py -src/petstore_api/paths/user/post/responses/__init__.py -src/petstore_api/paths/user/post/responses/response_default/__init__.py -src/petstore_api/paths/user_create_with_array/__init__.py -src/petstore_api/paths/user_create_with_array/post/__init__.py -src/petstore_api/paths/user_create_with_array/post/operation.py -src/petstore_api/paths/user_create_with_array/post/request_body/__init__.py -src/petstore_api/paths/user_create_with_array/post/responses/__init__.py -src/petstore_api/paths/user_create_with_array/post/responses/response_default/__init__.py -src/petstore_api/paths/user_create_with_list/__init__.py -src/petstore_api/paths/user_create_with_list/post/__init__.py -src/petstore_api/paths/user_create_with_list/post/operation.py -src/petstore_api/paths/user_create_with_list/post/request_body/__init__.py -src/petstore_api/paths/user_create_with_list/post/responses/__init__.py -src/petstore_api/paths/user_create_with_list/post/responses/response_default/__init__.py -src/petstore_api/paths/user_login/__init__.py -src/petstore_api/paths/user_login/get/__init__.py -src/petstore_api/paths/user_login/get/operation.py -src/petstore_api/paths/user_login/get/parameters/__init__.py -src/petstore_api/paths/user_login/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py -src/petstore_api/paths/user_login/get/parameters/parameter_1/__init__.py -src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py -src/petstore_api/paths/user_login/get/query_parameters.py -src/petstore_api/paths/user_login/get/responses/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/content/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py -src/petstore_api/paths/user_login/get/responses/response_200/header_parameters.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py -src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py -src/petstore_api/paths/user_login/get/responses/response_400/__init__.py -src/petstore_api/paths/user_logout/__init__.py -src/petstore_api/paths/user_logout/get/__init__.py -src/petstore_api/paths/user_logout/get/operation.py -src/petstore_api/paths/user_logout/get/responses/__init__.py -src/petstore_api/paths/user_logout/get/responses/response_default/__init__.py -src/petstore_api/paths/user_username/__init__.py -src/petstore_api/paths/user_username/delete/__init__.py -src/petstore_api/paths/user_username/delete/operation.py -src/petstore_api/paths/user_username/delete/parameters/__init__.py -src/petstore_api/paths/user_username/delete/parameters/parameter_0/__init__.py -src/petstore_api/paths/user_username/delete/path_parameters.py -src/petstore_api/paths/user_username/delete/responses/__init__.py -src/petstore_api/paths/user_username/delete/responses/response_200/__init__.py -src/petstore_api/paths/user_username/delete/responses/response_404/__init__.py -src/petstore_api/paths/user_username/get/__init__.py -src/petstore_api/paths/user_username/get/operation.py -src/petstore_api/paths/user_username/get/parameters/__init__.py -src/petstore_api/paths/user_username/get/parameters/parameter_0/__init__.py -src/petstore_api/paths/user_username/get/path_parameters.py -src/petstore_api/paths/user_username/get/responses/__init__.py -src/petstore_api/paths/user_username/get/responses/response_200/__init__.py -src/petstore_api/paths/user_username/get/responses/response_200/content/__init__.py -src/petstore_api/paths/user_username/get/responses/response_200/content/application_json/__init__.py -src/petstore_api/paths/user_username/get/responses/response_200/content/application_json/schema.py -src/petstore_api/paths/user_username/get/responses/response_200/content/application_xml/__init__.py -src/petstore_api/paths/user_username/get/responses/response_200/content/application_xml/schema.py -src/petstore_api/paths/user_username/get/responses/response_400/__init__.py -src/petstore_api/paths/user_username/get/responses/response_404/__init__.py -src/petstore_api/paths/user_username/put/__init__.py -src/petstore_api/paths/user_username/put/operation.py -src/petstore_api/paths/user_username/put/parameters/__init__.py -src/petstore_api/paths/user_username/put/parameters/parameter_0/__init__.py -src/petstore_api/paths/user_username/put/path_parameters.py -src/petstore_api/paths/user_username/put/request_body/__init__.py -src/petstore_api/paths/user_username/put/request_body/content/__init__.py -src/petstore_api/paths/user_username/put/request_body/content/application_json/__init__.py -src/petstore_api/paths/user_username/put/request_body/content/application_json/schema.py -src/petstore_api/paths/user_username/put/responses/__init__.py -src/petstore_api/paths/user_username/put/responses/response_400/__init__.py -src/petstore_api/paths/user_username/put/responses/response_404/__init__.py -src/petstore_api/py.typed -src/petstore_api/rest.py -src/petstore_api/schemas/__init__.py -src/petstore_api/schemas/format.py -src/petstore_api/schemas/original_immutabledict.py -src/petstore_api/schemas/schema.py -src/petstore_api/schemas/schemas.py -src/petstore_api/schemas/validation.py -src/petstore_api/security_schemes.py -src/petstore_api/server.py -src/petstore_api/servers/__init__.py -src/petstore_api/servers/server_0.py -src/petstore_api/servers/server_1.py -src/petstore_api/servers/server_2.py -src/petstore_api/shared_imports/__init__.py -src/petstore_api/shared_imports/header_imports.py -src/petstore_api/shared_imports/operation_imports.py -src/petstore_api/shared_imports/response_imports.py -src/petstore_api/shared_imports/schema_imports.py -src/petstore_api/shared_imports/security_scheme_imports.py -src/petstore_api/shared_imports/server_imports.py -src/petstore_api/signing.py +src/openapi_client/__init__.py +src/openapi_client/api_client.py +src/openapi_client/api_response.py +src/openapi_client/apis/__init__.py +src/openapi_client/apis/path_to_api.py +src/openapi_client/apis/paths/__init__.py +src/openapi_client/apis/paths/another_fake_dummy.py +src/openapi_client/apis/paths/common_param_sub_dir.py +src/openapi_client/apis/paths/fake.py +src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py +src/openapi_client/apis/paths/fake_body_with_file_schema.py +src/openapi_client/apis/paths/fake_body_with_query_params.py +src/openapi_client/apis/paths/fake_case_sensitive_params.py +src/openapi_client/apis/paths/fake_classname_test.py +src/openapi_client/apis/paths/fake_delete_coffee_id.py +src/openapi_client/apis/paths/fake_health.py +src/openapi_client/apis/paths/fake_inline_additional_properties.py +src/openapi_client/apis/paths/fake_inline_composition.py +src/openapi_client/apis/paths/fake_json_form_data.py +src/openapi_client/apis/paths/fake_json_patch.py +src/openapi_client/apis/paths/fake_json_with_charset.py +src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py +src/openapi_client/apis/paths/fake_multiple_response_bodies.py +src/openapi_client/apis/paths/fake_multiple_securities.py +src/openapi_client/apis/paths/fake_obj_in_query.py +src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py +src/openapi_client/apis/paths/fake_pem_content_type.py +src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py +src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py +src/openapi_client/apis/paths/fake_redirection.py +src/openapi_client/apis/paths/fake_ref_obj_in_query.py +src/openapi_client/apis/paths/fake_refs_array_of_enums.py +src/openapi_client/apis/paths/fake_refs_arraymodel.py +src/openapi_client/apis/paths/fake_refs_boolean.py +src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py +src/openapi_client/apis/paths/fake_refs_enum.py +src/openapi_client/apis/paths/fake_refs_mammal.py +src/openapi_client/apis/paths/fake_refs_number.py +src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py +src/openapi_client/apis/paths/fake_refs_string.py +src/openapi_client/apis/paths/fake_response_without_schema.py +src/openapi_client/apis/paths/fake_test_query_paramters.py +src/openapi_client/apis/paths/fake_upload_download_file.py +src/openapi_client/apis/paths/fake_upload_file.py +src/openapi_client/apis/paths/fake_upload_files.py +src/openapi_client/apis/paths/fake_wild_card_responses.py +src/openapi_client/apis/paths/foo.py +src/openapi_client/apis/paths/pet.py +src/openapi_client/apis/paths/pet_find_by_status.py +src/openapi_client/apis/paths/pet_find_by_tags.py +src/openapi_client/apis/paths/pet_pet_id.py +src/openapi_client/apis/paths/pet_pet_id_upload_image.py +src/openapi_client/apis/paths/solidus.py +src/openapi_client/apis/paths/store_inventory.py +src/openapi_client/apis/paths/store_order.py +src/openapi_client/apis/paths/store_order_order_id.py +src/openapi_client/apis/paths/user.py +src/openapi_client/apis/paths/user_create_with_array.py +src/openapi_client/apis/paths/user_create_with_list.py +src/openapi_client/apis/paths/user_login.py +src/openapi_client/apis/paths/user_logout.py +src/openapi_client/apis/paths/user_username.py +src/openapi_client/apis/tag_to_api.py +src/openapi_client/apis/tags/__init__.py +src/openapi_client/apis/tags/another_fake_api.py +src/openapi_client/apis/tags/default_api.py +src/openapi_client/apis/tags/fake_api.py +src/openapi_client/apis/tags/fake_classname_tags123_api.py +src/openapi_client/apis/tags/pet_api.py +src/openapi_client/apis/tags/store_api.py +src/openapi_client/apis/tags/user_api.py +src/openapi_client/components/__init__.py +src/openapi_client/components/headers/__init__.py +src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py +src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py +src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py +src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py +src/openapi_client/components/headers/header_number_header/__init__.py +src/openapi_client/components/headers/header_number_header/schema.py +src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py +src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py +src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py +src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py +src/openapi_client/components/headers/header_ref_schema_header/__init__.py +src/openapi_client/components/headers/header_ref_schema_header/schema.py +src/openapi_client/components/headers/header_ref_string_header/__init__.py +src/openapi_client/components/headers/header_string_header/__init__.py +src/openapi_client/components/headers/header_string_header/schema.py +src/openapi_client/components/parameters/__init__.py +src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py +src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py +src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py +src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py +src/openapi_client/components/parameters/parameter_path_user_name/__init__.py +src/openapi_client/components/parameters/parameter_path_user_name/schema.py +src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py +src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py +src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py +src/openapi_client/components/request_bodies/__init__.py +src/openapi_client/components/request_bodies/request_body_client/__init__.py +src/openapi_client/components/request_bodies/request_body_client/content/__init__.py +src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py +src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py +src/openapi_client/components/request_bodies/request_body_pet/__init__.py +src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py +src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py +src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py +src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py +src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py +src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py +src/openapi_client/components/request_bodies/request_body_user_array/__init__.py +src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py +src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py +src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py +src/openapi_client/components/responses/__init__.py +src/openapi_client/components/responses/response_headers_with_no_body/__init__.py +src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py +src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py +src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py +src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py +src/openapi_client/components/responses/response_ref_success_description_only/__init__.py +src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py +src/openapi_client/components/responses/response_success_description_only/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py +src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py +src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py +src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py +src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py +src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py +src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +src/openapi_client/components/schema/_200_response.py +src/openapi_client/components/schema/__init__.py +src/openapi_client/components/schema/abstract_step_message.py +src/openapi_client/components/schema/additional_properties_class.py +src/openapi_client/components/schema/additional_properties_schema.py +src/openapi_client/components/schema/additional_properties_with_array_of_enums.py +src/openapi_client/components/schema/address.py +src/openapi_client/components/schema/animal.py +src/openapi_client/components/schema/animal_farm.py +src/openapi_client/components/schema/any_type_and_format.py +src/openapi_client/components/schema/any_type_not_string.py +src/openapi_client/components/schema/api_response.py +src/openapi_client/components/schema/apple.py +src/openapi_client/components/schema/apple_req.py +src/openapi_client/components/schema/array_holding_any_type.py +src/openapi_client/components/schema/array_of_array_of_number_only.py +src/openapi_client/components/schema/array_of_enums.py +src/openapi_client/components/schema/array_of_number_only.py +src/openapi_client/components/schema/array_test.py +src/openapi_client/components/schema/array_with_validations_in_items.py +src/openapi_client/components/schema/banana.py +src/openapi_client/components/schema/banana_req.py +src/openapi_client/components/schema/bar.py +src/openapi_client/components/schema/basque_pig.py +src/openapi_client/components/schema/boolean.py +src/openapi_client/components/schema/boolean_enum.py +src/openapi_client/components/schema/capitalization.py +src/openapi_client/components/schema/cat.py +src/openapi_client/components/schema/category.py +src/openapi_client/components/schema/child_cat.py +src/openapi_client/components/schema/class_model.py +src/openapi_client/components/schema/client.py +src/openapi_client/components/schema/complex_quadrilateral.py +src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py +src/openapi_client/components/schema/composed_array.py +src/openapi_client/components/schema/composed_bool.py +src/openapi_client/components/schema/composed_none.py +src/openapi_client/components/schema/composed_number.py +src/openapi_client/components/schema/composed_object.py +src/openapi_client/components/schema/composed_one_of_different_types.py +src/openapi_client/components/schema/composed_string.py +src/openapi_client/components/schema/currency.py +src/openapi_client/components/schema/danish_pig.py +src/openapi_client/components/schema/date_time_test.py +src/openapi_client/components/schema/date_time_with_validations.py +src/openapi_client/components/schema/date_with_validations.py +src/openapi_client/components/schema/decimal_payload.py +src/openapi_client/components/schema/dog.py +src/openapi_client/components/schema/drawing.py +src/openapi_client/components/schema/enum_arrays.py +src/openapi_client/components/schema/enum_class.py +src/openapi_client/components/schema/enum_test.py +src/openapi_client/components/schema/equilateral_triangle.py +src/openapi_client/components/schema/file.py +src/openapi_client/components/schema/file_schema_test_class.py +src/openapi_client/components/schema/foo.py +src/openapi_client/components/schema/format_test.py +src/openapi_client/components/schema/from_schema.py +src/openapi_client/components/schema/fruit.py +src/openapi_client/components/schema/fruit_req.py +src/openapi_client/components/schema/gm_fruit.py +src/openapi_client/components/schema/grandparent_animal.py +src/openapi_client/components/schema/has_only_read_only.py +src/openapi_client/components/schema/health_check_result.py +src/openapi_client/components/schema/integer_enum.py +src/openapi_client/components/schema/integer_enum_big.py +src/openapi_client/components/schema/integer_enum_one_value.py +src/openapi_client/components/schema/integer_enum_with_default_value.py +src/openapi_client/components/schema/integer_max10.py +src/openapi_client/components/schema/integer_min15.py +src/openapi_client/components/schema/isosceles_triangle.py +src/openapi_client/components/schema/items.py +src/openapi_client/components/schema/items_schema.py +src/openapi_client/components/schema/json_patch_request.py +src/openapi_client/components/schema/json_patch_request_add_replace_test.py +src/openapi_client/components/schema/json_patch_request_move_copy.py +src/openapi_client/components/schema/json_patch_request_remove.py +src/openapi_client/components/schema/mammal.py +src/openapi_client/components/schema/map_test.py +src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py +src/openapi_client/components/schema/money.py +src/openapi_client/components/schema/multi_properties_schema.py +src/openapi_client/components/schema/my_object_dto.py +src/openapi_client/components/schema/name.py +src/openapi_client/components/schema/no_additional_properties.py +src/openapi_client/components/schema/nullable_class.py +src/openapi_client/components/schema/nullable_shape.py +src/openapi_client/components/schema/nullable_string.py +src/openapi_client/components/schema/number.py +src/openapi_client/components/schema/number_only.py +src/openapi_client/components/schema/number_with_exclusive_min_max.py +src/openapi_client/components/schema/number_with_validations.py +src/openapi_client/components/schema/obj_with_required_props.py +src/openapi_client/components/schema/obj_with_required_props_base.py +src/openapi_client/components/schema/object_interface.py +src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py +src/openapi_client/components/schema/object_model_with_ref_props.py +src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +src/openapi_client/components/schema/object_with_colliding_properties.py +src/openapi_client/components/schema/object_with_decimal_properties.py +src/openapi_client/components/schema/object_with_difficultly_named_props.py +src/openapi_client/components/schema/object_with_inline_composition_property.py +src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py +src/openapi_client/components/schema/object_with_non_intersecting_values.py +src/openapi_client/components/schema/object_with_only_optional_props.py +src/openapi_client/components/schema/object_with_optional_test_prop.py +src/openapi_client/components/schema/object_with_validations.py +src/openapi_client/components/schema/order.py +src/openapi_client/components/schema/paginated_result_my_object_dto.py +src/openapi_client/components/schema/parent_pet.py +src/openapi_client/components/schema/pet.py +src/openapi_client/components/schema/pig.py +src/openapi_client/components/schema/player.py +src/openapi_client/components/schema/public_key.py +src/openapi_client/components/schema/quadrilateral.py +src/openapi_client/components/schema/quadrilateral_interface.py +src/openapi_client/components/schema/read_only_first.py +src/openapi_client/components/schema/ref_pet.py +src/openapi_client/components/schema/req_props_from_explicit_add_props.py +src/openapi_client/components/schema/req_props_from_true_add_props.py +src/openapi_client/components/schema/req_props_from_unset_add_props.py +src/openapi_client/components/schema/return.py +src/openapi_client/components/schema/scalene_triangle.py +src/openapi_client/components/schema/self_referencing_array_model.py +src/openapi_client/components/schema/self_referencing_object_model.py +src/openapi_client/components/schema/shape.py +src/openapi_client/components/schema/shape_or_null.py +src/openapi_client/components/schema/simple_quadrilateral.py +src/openapi_client/components/schema/some_object.py +src/openapi_client/components/schema/special_model_name.py +src/openapi_client/components/schema/string.py +src/openapi_client/components/schema/string_boolean_map.py +src/openapi_client/components/schema/string_enum.py +src/openapi_client/components/schema/string_enum_with_default_value.py +src/openapi_client/components/schema/string_with_validation.py +src/openapi_client/components/schema/tag.py +src/openapi_client/components/schema/triangle.py +src/openapi_client/components/schema/triangle_interface.py +src/openapi_client/components/schema/user.py +src/openapi_client/components/schema/uuid_string.py +src/openapi_client/components/schema/whale.py +src/openapi_client/components/schema/zebra.py +src/openapi_client/components/schemas/__init__.py +src/openapi_client/components/security_schemes/__init__.py +src/openapi_client/components/security_schemes/security_scheme_api_key.py +src/openapi_client/components/security_schemes/security_scheme_api_key_query.py +src/openapi_client/components/security_schemes/security_scheme_bearer_test.py +src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py +src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py +src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py +src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py +src/openapi_client/configurations/__init__.py +src/openapi_client/configurations/api_configuration.py +src/openapi_client/configurations/schema_configuration.py +src/openapi_client/exceptions.py +src/openapi_client/paths/__init__.py +src/openapi_client/paths/another_fake_dummy/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/operation.py +src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/common_param_sub_dir/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py +src/openapi_client/paths/common_param_sub_dir/delete/operation.py +src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py +src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py +src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py +src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py +src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py +src/openapi_client/paths/common_param_sub_dir/get/__init__.py +src/openapi_client/paths/common_param_sub_dir/get/operation.py +src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py +src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py +src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py +src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py +src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py +src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py +src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py +src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py +src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py +src/openapi_client/paths/common_param_sub_dir/post/__init__.py +src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py +src/openapi_client/paths/common_param_sub_dir/post/operation.py +src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py +src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py +src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py +src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py +src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py +src/openapi_client/paths/fake/__init__.py +src/openapi_client/paths/fake/delete/__init__.py +src/openapi_client/paths/fake/delete/header_parameters.py +src/openapi_client/paths/fake/delete/operation.py +src/openapi_client/paths/fake/delete/parameters/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py +src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py +src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py +src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py +src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py +src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py +src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py +src/openapi_client/paths/fake/delete/query_parameters.py +src/openapi_client/paths/fake/delete/responses/__init__.py +src/openapi_client/paths/fake/delete/responses/response_200/__init__.py +src/openapi_client/paths/fake/delete/security/__init__.py +src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py +src/openapi_client/paths/fake/get/__init__.py +src/openapi_client/paths/fake/get/header_parameters.py +src/openapi_client/paths/fake/get/operation.py +src/openapi_client/paths/fake/get/parameters/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py +src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py +src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py +src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py +src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py +src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py +src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py +src/openapi_client/paths/fake/get/query_parameters.py +src/openapi_client/paths/fake/get/request_body/__init__.py +src/openapi_client/paths/fake/get/request_body/content/__init__.py +src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py +src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +src/openapi_client/paths/fake/get/responses/__init__.py +src/openapi_client/paths/fake/get/responses/response_200/__init__.py +src/openapi_client/paths/fake/get/responses/response_404/__init__.py +src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py +src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py +src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py +src/openapi_client/paths/fake/patch/__init__.py +src/openapi_client/paths/fake/patch/operation.py +src/openapi_client/paths/fake/patch/request_body/__init__.py +src/openapi_client/paths/fake/patch/responses/__init__.py +src/openapi_client/paths/fake/patch/responses/response_200/__init__.py +src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py +src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake/post/__init__.py +src/openapi_client/paths/fake/post/operation.py +src/openapi_client/paths/fake/post/request_body/__init__.py +src/openapi_client/paths/fake/post/request_body/content/__init__.py +src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py +src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +src/openapi_client/paths/fake/post/responses/__init__.py +src/openapi_client/paths/fake/post/responses/response_200/__init__.py +src/openapi_client/paths/fake/post/responses/response_404/__init__.py +src/openapi_client/paths/fake/post/security/__init__.py +src/openapi_client/paths/fake/post/security/security_requirement_object_0.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_body_with_file_schema/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/operation.py +src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py +src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py +src/openapi_client/paths/fake_body_with_query_params/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/operation.py +src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py +src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py +src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/operation.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py +src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py +src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py +src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py +src/openapi_client/paths/fake_classname_test/__init__.py +src/openapi_client/paths/fake_classname_test/patch/__init__.py +src/openapi_client/paths/fake_classname_test/patch/operation.py +src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py +src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py +src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py +src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_classname_test/patch/security/__init__.py +src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py +src/openapi_client/paths/fake_delete_coffee_id/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py +src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py +src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py +src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py +src/openapi_client/paths/fake_health/__init__.py +src/openapi_client/paths/fake_health/get/__init__.py +src/openapi_client/paths/fake_health/get/operation.py +src/openapi_client/paths/fake_health/get/responses/__init__.py +src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_inline_additional_properties/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/operation.py +src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py +src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_inline_composition/__init__.py +src/openapi_client/paths/fake_inline_composition/post/__init__.py +src/openapi_client/paths/fake_inline_composition/post/operation.py +src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py +src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +src/openapi_client/paths/fake_inline_composition/post/query_parameters.py +src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py +src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py +src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_json_form_data/__init__.py +src/openapi_client/paths/fake_json_form_data/get/__init__.py +src/openapi_client/paths/fake_json_form_data/get/operation.py +src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py +src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py +src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py +src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py +src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_json_patch/__init__.py +src/openapi_client/paths/fake_json_patch/patch/__init__.py +src/openapi_client/paths/fake_json_patch/patch/operation.py +src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py +src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py +src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py +src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py +src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py +src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py +src/openapi_client/paths/fake_json_with_charset/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/operation.py +src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py +src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_multiple_response_bodies/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py +src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +src/openapi_client/paths/fake_multiple_securities/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/operation.py +src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py +src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py +src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py +src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py +src/openapi_client/paths/fake_obj_in_query/__init__.py +src/openapi_client/paths/fake_obj_in_query/get/__init__.py +src/openapi_client/paths/fake_obj_in_query/get/operation.py +src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py +src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py +src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py +src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_pem_content_type/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/operation.py +src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py +src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py +src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py +src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py +src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_redirection/__init__.py +src/openapi_client/paths/fake_redirection/get/__init__.py +src/openapi_client/paths/fake_redirection/get/operation.py +src/openapi_client/paths/fake_redirection/get/responses/__init__.py +src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py +src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py +src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py +src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py +src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py +src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_arraymodel/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/operation.py +src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_boolean/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/operation.py +src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_enum/__init__.py +src/openapi_client/paths/fake_refs_enum/post/__init__.py +src/openapi_client/paths/fake_refs_enum/post/operation.py +src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py +src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_mammal/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/operation.py +src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_number/__init__.py +src/openapi_client/paths/fake_refs_number/post/__init__.py +src/openapi_client/paths/fake_refs_number/post/operation.py +src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_number/post/responses/__init__.py +src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_refs_string/__init__.py +src/openapi_client/paths/fake_refs_string/post/__init__.py +src/openapi_client/paths/fake_refs_string/post/operation.py +src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py +src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py +src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py +src/openapi_client/paths/fake_refs_string/post/responses/__init__.py +src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_response_without_schema/__init__.py +src/openapi_client/paths/fake_response_without_schema/get/__init__.py +src/openapi_client/paths/fake_response_without_schema/get/operation.py +src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py +src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_test_query_paramters/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/operation.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py +src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py +src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py +src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py +src/openapi_client/paths/fake_upload_download_file/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/operation.py +src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py +src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py +src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py +src/openapi_client/paths/fake_upload_file/__init__.py +src/openapi_client/paths/fake_upload_file/post/__init__.py +src/openapi_client/paths/fake_upload_file/post/operation.py +src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py +src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py +src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_upload_file/post/responses/__init__.py +src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_upload_files/__init__.py +src/openapi_client/paths/fake_upload_files/post/__init__.py +src/openapi_client/paths/fake_upload_files/post/operation.py +src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py +src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py +src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/fake_upload_files/post/responses/__init__.py +src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py +src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/operation.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py +src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +src/openapi_client/paths/foo/__init__.py +src/openapi_client/paths/foo/get/__init__.py +src/openapi_client/paths/foo/get/operation.py +src/openapi_client/paths/foo/get/responses/__init__.py +src/openapi_client/paths/foo/get/responses/response_default/__init__.py +src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py +src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py +src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py +src/openapi_client/paths/foo/get/servers/__init__.py +src/openapi_client/paths/foo/get/servers/server_0.py +src/openapi_client/paths/foo/get/servers/server_1.py +src/openapi_client/paths/pet/__init__.py +src/openapi_client/paths/pet/post/__init__.py +src/openapi_client/paths/pet/post/operation.py +src/openapi_client/paths/pet/post/request_body/__init__.py +src/openapi_client/paths/pet/post/responses/__init__.py +src/openapi_client/paths/pet/post/responses/response_200/__init__.py +src/openapi_client/paths/pet/post/responses/response_405/__init__.py +src/openapi_client/paths/pet/post/security/__init__.py +src/openapi_client/paths/pet/post/security/security_requirement_object_0.py +src/openapi_client/paths/pet/post/security/security_requirement_object_1.py +src/openapi_client/paths/pet/post/security/security_requirement_object_2.py +src/openapi_client/paths/pet/put/__init__.py +src/openapi_client/paths/pet/put/operation.py +src/openapi_client/paths/pet/put/request_body/__init__.py +src/openapi_client/paths/pet/put/responses/__init__.py +src/openapi_client/paths/pet/put/responses/response_400/__init__.py +src/openapi_client/paths/pet/put/responses/response_404/__init__.py +src/openapi_client/paths/pet/put/responses/response_405/__init__.py +src/openapi_client/paths/pet/put/security/__init__.py +src/openapi_client/paths/pet/put/security/security_requirement_object_0.py +src/openapi_client/paths/pet/put/security/security_requirement_object_1.py +src/openapi_client/paths/pet_find_by_status/__init__.py +src/openapi_client/paths/pet_find_by_status/get/__init__.py +src/openapi_client/paths/pet_find_by_status/get/operation.py +src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py +src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_find_by_status/get/query_parameters.py +src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py +src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py +src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py +src/openapi_client/paths/pet_find_by_status/get/security/__init__.py +src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py +src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py +src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py +src/openapi_client/paths/pet_find_by_status/servers/__init__.py +src/openapi_client/paths/pet_find_by_status/servers/server_0.py +src/openapi_client/paths/pet_find_by_status/servers/server_1.py +src/openapi_client/paths/pet_find_by_tags/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/operation.py +src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py +src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py +src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py +src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py +src/openapi_client/paths/pet_pet_id/__init__.py +src/openapi_client/paths/pet_pet_id/delete/__init__.py +src/openapi_client/paths/pet_pet_id/delete/header_parameters.py +src/openapi_client/paths/pet_pet_id/delete/operation.py +src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py +src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py +src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py +src/openapi_client/paths/pet_pet_id/delete/path_parameters.py +src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py +src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py +src/openapi_client/paths/pet_pet_id/delete/security/__init__.py +src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py +src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py +src/openapi_client/paths/pet_pet_id/get/__init__.py +src/openapi_client/paths/pet_pet_id/get/operation.py +src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py +src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_pet_id/get/path_parameters.py +src/openapi_client/paths/pet_pet_id/get/responses/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py +src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py +src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py +src/openapi_client/paths/pet_pet_id/get/security/__init__.py +src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py +src/openapi_client/paths/pet_pet_id/post/__init__.py +src/openapi_client/paths/pet_pet_id/post/operation.py +src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py +src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_pet_id/post/path_parameters.py +src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py +src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py +src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py +src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +src/openapi_client/paths/pet_pet_id/post/responses/__init__.py +src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py +src/openapi_client/paths/pet_pet_id/post/security/__init__.py +src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py +src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py +src/openapi_client/paths/pet_pet_id_upload_image/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py +src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py +src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py +src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py +src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py +src/openapi_client/paths/solidus/__init__.py +src/openapi_client/paths/solidus/get/__init__.py +src/openapi_client/paths/solidus/get/operation.py +src/openapi_client/paths/solidus/get/responses/__init__.py +src/openapi_client/paths/solidus/get/responses/response_200/__init__.py +src/openapi_client/paths/store_inventory/__init__.py +src/openapi_client/paths/store_inventory/get/__init__.py +src/openapi_client/paths/store_inventory/get/operation.py +src/openapi_client/paths/store_inventory/get/responses/__init__.py +src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py +src/openapi_client/paths/store_inventory/get/security/__init__.py +src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py +src/openapi_client/paths/store_order/__init__.py +src/openapi_client/paths/store_order/post/__init__.py +src/openapi_client/paths/store_order/post/operation.py +src/openapi_client/paths/store_order/post/request_body/__init__.py +src/openapi_client/paths/store_order/post/request_body/content/__init__.py +src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py +src/openapi_client/paths/store_order/post/responses/__init__.py +src/openapi_client/paths/store_order/post/responses/response_200/__init__.py +src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py +src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py +src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py +src/openapi_client/paths/store_order/post/responses/response_400/__init__.py +src/openapi_client/paths/store_order_order_id/__init__.py +src/openapi_client/paths/store_order_order_id/delete/__init__.py +src/openapi_client/paths/store_order_order_id/delete/operation.py +src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py +src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py +src/openapi_client/paths/store_order_order_id/delete/path_parameters.py +src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py +src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py +src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py +src/openapi_client/paths/store_order_order_id/get/__init__.py +src/openapi_client/paths/store_order_order_id/get/operation.py +src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py +src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py +src/openapi_client/paths/store_order_order_id/get/path_parameters.py +src/openapi_client/paths/store_order_order_id/get/responses/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py +src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py +src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py +src/openapi_client/paths/user/__init__.py +src/openapi_client/paths/user/post/__init__.py +src/openapi_client/paths/user/post/operation.py +src/openapi_client/paths/user/post/request_body/__init__.py +src/openapi_client/paths/user/post/request_body/content/__init__.py +src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py +src/openapi_client/paths/user/post/request_body/content/application_json/schema.py +src/openapi_client/paths/user/post/responses/__init__.py +src/openapi_client/paths/user/post/responses/response_default/__init__.py +src/openapi_client/paths/user_create_with_array/__init__.py +src/openapi_client/paths/user_create_with_array/post/__init__.py +src/openapi_client/paths/user_create_with_array/post/operation.py +src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py +src/openapi_client/paths/user_create_with_array/post/responses/__init__.py +src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py +src/openapi_client/paths/user_create_with_list/__init__.py +src/openapi_client/paths/user_create_with_list/post/__init__.py +src/openapi_client/paths/user_create_with_list/post/operation.py +src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py +src/openapi_client/paths/user_create_with_list/post/responses/__init__.py +src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py +src/openapi_client/paths/user_login/__init__.py +src/openapi_client/paths/user_login/get/__init__.py +src/openapi_client/paths/user_login/get/operation.py +src/openapi_client/paths/user_login/get/parameters/__init__.py +src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py +src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py +src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py +src/openapi_client/paths/user_login/get/query_parameters.py +src/openapi_client/paths/user_login/get/responses/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py +src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py +src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py +src/openapi_client/paths/user_login/get/responses/response_400/__init__.py +src/openapi_client/paths/user_logout/__init__.py +src/openapi_client/paths/user_logout/get/__init__.py +src/openapi_client/paths/user_logout/get/operation.py +src/openapi_client/paths/user_logout/get/responses/__init__.py +src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py +src/openapi_client/paths/user_username/__init__.py +src/openapi_client/paths/user_username/delete/__init__.py +src/openapi_client/paths/user_username/delete/operation.py +src/openapi_client/paths/user_username/delete/parameters/__init__.py +src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py +src/openapi_client/paths/user_username/delete/path_parameters.py +src/openapi_client/paths/user_username/delete/responses/__init__.py +src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py +src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py +src/openapi_client/paths/user_username/get/__init__.py +src/openapi_client/paths/user_username/get/operation.py +src/openapi_client/paths/user_username/get/parameters/__init__.py +src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py +src/openapi_client/paths/user_username/get/path_parameters.py +src/openapi_client/paths/user_username/get/responses/__init__.py +src/openapi_client/paths/user_username/get/responses/response_200/__init__.py +src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py +src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py +src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py +src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py +src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py +src/openapi_client/paths/user_username/get/responses/response_400/__init__.py +src/openapi_client/paths/user_username/get/responses/response_404/__init__.py +src/openapi_client/paths/user_username/put/__init__.py +src/openapi_client/paths/user_username/put/operation.py +src/openapi_client/paths/user_username/put/parameters/__init__.py +src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py +src/openapi_client/paths/user_username/put/path_parameters.py +src/openapi_client/paths/user_username/put/request_body/__init__.py +src/openapi_client/paths/user_username/put/request_body/content/__init__.py +src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py +src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py +src/openapi_client/paths/user_username/put/responses/__init__.py +src/openapi_client/paths/user_username/put/responses/response_400/__init__.py +src/openapi_client/paths/user_username/put/responses/response_404/__init__.py +src/openapi_client/py.typed +src/openapi_client/rest.py +src/openapi_client/schemas/__init__.py +src/openapi_client/schemas/format.py +src/openapi_client/schemas/original_immutabledict.py +src/openapi_client/schemas/schema.py +src/openapi_client/schemas/schemas.py +src/openapi_client/schemas/validation.py +src/openapi_client/security_schemes.py +src/openapi_client/server.py +src/openapi_client/servers/__init__.py +src/openapi_client/servers/server_0.py +src/openapi_client/servers/server_1.py +src/openapi_client/servers/server_2.py +src/openapi_client/shared_imports/__init__.py +src/openapi_client/shared_imports/header_imports.py +src/openapi_client/shared_imports/operation_imports.py +src/openapi_client/shared_imports/response_imports.py +src/openapi_client/shared_imports/schema_imports.py +src/openapi_client/shared_imports/security_scheme_imports.py +src/openapi_client/shared_imports/server_imports.py +src/openapi_client/signing.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index b2797133f3d..a552cdcf34a 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -1,4 +1,4 @@ -# petstore-api +# openapi-client This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: @@ -353,7 +353,7 @@ Class | Description [ReqPropsFromExplicitAddProps](docs/components/schema/req_props_from_explicit_add_props.md) | [ReqPropsFromTrueAddProps](docs/components/schema/req_props_from_true_add_props.md) | [ReqPropsFromUnsetAddProps](docs/components/schema/req_props_from_unset_add_props.md) | -[_Return](docs/components/schema/_return.md) | Model for testing reserved words +[Return](docs/components/schema/return.md) | Model for testing reserved words [ScaleneTriangle](docs/components/schema/scalene_triangle.md) | [SelfReferencingArrayModel](docs/components/schema/self_referencing_array_model.md) | [SelfReferencingObjectModel](docs/components/schema/self_referencing_object_model.md) | diff --git a/samples/client/petstore/python/docs/apis/tags/another_fake_api.md b/samples/client/petstore/python/docs/apis/tags/another_fake_api.md index d08e53b4b38..ba82bfe60ba 100644 --- a/samples/client/petstore/python/docs/apis/tags/another_fake_api.md +++ b/samples/client/petstore/python/docs/apis/tags/another_fake_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.another_fake_api +openapi_client.apis.tags.another_fake_api # AnotherFakeApi All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/default_api.md b/samples/client/petstore/python/docs/apis/tags/default_api.md index f5cff3da626..c1cf374829e 100644 --- a/samples/client/petstore/python/docs/apis/tags/default_api.md +++ b/samples/client/petstore/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.default_api +openapi_client.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/fake_api.md b/samples/client/petstore/python/docs/apis/tags/fake_api.md index b9192a237a8..28b58cb8339 100644 --- a/samples/client/petstore/python/docs/apis/tags/fake_api.md +++ b/samples/client/petstore/python/docs/apis/tags/fake_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.fake_api +openapi_client.apis.tags.fake_api # FakeApi All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md b/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md index 03a78ae2221..fb9ec1d1e85 100644 --- a/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md +++ b/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.fake_classname_tags123_api +openapi_client.apis.tags.fake_classname_tags123_api # FakeClassnameTags123Api All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/pet_api.md b/samples/client/petstore/python/docs/apis/tags/pet_api.md index 712c3394921..5c74df89bda 100644 --- a/samples/client/petstore/python/docs/apis/tags/pet_api.md +++ b/samples/client/petstore/python/docs/apis/tags/pet_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.pet_api +openapi_client.apis.tags.pet_api # PetApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/store_api.md b/samples/client/petstore/python/docs/apis/tags/store_api.md index 2b031a628e1..a674b7467fc 100644 --- a/samples/client/petstore/python/docs/apis/tags/store_api.md +++ b/samples/client/petstore/python/docs/apis/tags/store_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.store_api +openapi_client.apis.tags.store_api # StoreApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/user_api.md b/samples/client/petstore/python/docs/apis/tags/user_api.md index 55b7c628c58..4a249ab8645 100644 --- a/samples/client/petstore/python/docs/apis/tags/user_api.md +++ b/samples/client/petstore/python/docs/apis/tags/user_api.md @@ -1,5 +1,5 @@ -petstore_api.apis.tags.user_api +openapi_client.apis.tags.user_api # UserApi ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md b/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md index 1b978ad4f3c..cb20a98128b 100644 --- a/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_int32_json_content_type_header +openapi_client.components.headers.header_int32_json_content_type_header # Header Int32JsonContentTypeHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_number_header.md b/samples/client/petstore/python/docs/components/headers/header_number_header.md index aa02f7f336f..66aecf6fb59 100644 --- a/samples/client/petstore/python/docs/components/headers/header_number_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_number_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_number_header +openapi_client.components.headers.header_number_header # Header NumberHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md index bf3d0f37392..26b0817a684 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_ref_content_schema_header +openapi_client.components.headers.header_ref_content_schema_header # Header RefContentSchemaHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md index 6f48d244ecd..bcf3281d8d7 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_ref_schema_header +openapi_client.components.headers.header_ref_schema_header # Header RefSchemaHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md index 3fb984d2c04..30857d068a6 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_ref_string_header +openapi_client.components.headers.header_ref_string_header # Header RefStringHeader ## Schema Ref Class | Input Type | Accessed Type | Description diff --git a/samples/client/petstore/python/docs/components/headers/header_string_header.md b/samples/client/petstore/python/docs/components/headers/header_string_header.md index 5f1a49b5f0d..b05f54f6197 100644 --- a/samples/client/petstore/python/docs/components/headers/header_string_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_string_header.md @@ -1,4 +1,4 @@ -petstore_api.components.headers.header_string_header +openapi_client.components.headers.header_string_header # Header StringHeader ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md b/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md index b0bb13f0d3f..93a207567ba 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md @@ -1,4 +1,4 @@ -petstore_api.components.parameters.parameter_component_ref_schema_string_with_validation +openapi_client.components.parameters.parameter_component_ref_schema_string_with_validation # Parameter ComponentRefSchemaStringWithValidation ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md b/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md index c3360983d53..35d2f275b2e 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md @@ -1,4 +1,4 @@ -petstore_api.components.parameters.parameter_path_user_name +openapi_client.components.parameters.parameter_path_user_name # Parameter PathUserName ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md b/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md index a4521372033..724fa9ebfc2 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md @@ -1,4 +1,4 @@ -petstore_api.components.parameters.parameter_ref_path_user_name +openapi_client.components.parameters.parameter_ref_path_user_name # Parameter RefPathUserName ## Schema Ref Class | Input Type | Accessed Type | Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md b/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md index aa23b11207b..911249af97d 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md @@ -1,4 +1,4 @@ -petstore_api.components.parameters.parameter_ref_schema_string_with_validation +openapi_client.components.parameters.parameter_ref_schema_string_with_validation # Parameter RefSchemaStringWithValidation ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md index 8b00d2187d8..8bcc36ea7ae 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md @@ -1,4 +1,4 @@ -petstore_api.components.request_bodies.request_body_client +openapi_client.components.request_bodies.request_body_client # RequestBody Client ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md index 058f8e8d59c..9f2cb22fa8f 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md @@ -1,4 +1,4 @@ -petstore_api.components.request_bodies.request_body_pet +openapi_client.components.request_bodies.request_body_pet # RequestBody Pet ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md index 5af92bc4e39..b10ba2fc3e6 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md @@ -1,4 +1,4 @@ -petstore_api.components.request_bodies.request_body_ref_user_array +openapi_client.components.request_bodies.request_body_ref_user_array # RequestBody RefUserArray ## Content Type To Schema diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md index ba1a3a1564f..03139078d3a 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md @@ -1,4 +1,4 @@ -petstore_api.components.request_bodies.request_body_user_array +openapi_client.components.request_bodies.request_body_user_array # RequestBody UserArray ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md b/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md index b76ad6085a5..383b3ac8ddd 100644 --- a/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md +++ b/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_headers_with_no_body +openapi_client.components.responses.response_headers_with_no_body # Response HeadersWithNoBody ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md b/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md index 4038c216465..4affabc1fea 100644 --- a/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md +++ b/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_ref_success_description_only +openapi_client.components.responses.response_ref_success_description_only # Response RefSuccessDescriptionOnly ## Ref Response Info diff --git a/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md b/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md index 8ff2326d27c..048be1f0b0f 100644 --- a/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md +++ b/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_ref_successful_xml_and_json_array_of_pet +openapi_client.components.responses.response_ref_successful_xml_and_json_array_of_pet # Response RefSuccessfulXmlAndJsonArrayOfPet ## Ref Response Info diff --git a/samples/client/petstore/python/docs/components/responses/response_success_description_only.md b/samples/client/petstore/python/docs/components/responses/response_success_description_only.md index 5e6c16e4426..a819f2b1a0f 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_description_only.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_description_only.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_success_description_only +openapi_client.components.responses.response_success_description_only # Response SuccessDescriptionOnly ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md b/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md index 562bbfec4dd..7d299e088af 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_success_inline_content_and_header +openapi_client.components.responses.response_success_inline_content_and_header # Response SuccessInlineContentAndHeader ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md b/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md index bb4299094c0..065029a37f9 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_success_with_json_api_response +openapi_client.components.responses.response_success_with_json_api_response # Response SuccessWithJsonApiResponse ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md b/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md index 329c510e5aa..d86d89279ad 100644 --- a/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md +++ b/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md @@ -1,4 +1,4 @@ -petstore_api.components.responses.response_successful_xml_and_json_array_of_pet +openapi_client.components.responses.response_successful_xml_and_json_array_of_pet # Response SuccessfulXmlAndJsonArrayOfPet ## Description diff --git a/samples/client/petstore/python/docs/components/schema/_200_response.md b/samples/client/petstore/python/docs/components/schema/_200_response.md index 47f532c521c..647fb8b0085 100644 --- a/samples/client/petstore/python/docs/components/schema/_200_response.md +++ b/samples/client/petstore/python/docs/components/schema/_200_response.md @@ -1,5 +1,5 @@ # _200Response -petstore_api.components.schema._200_response +openapi_client.components.schema._200_response ``` type: schemas.Schema ``` @@ -31,18 +31,19 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **name** | int, schemas.Unset | | [optional] value must be a 32 bit integer +**class** | str, schemas.Unset | this is a reserved python keyword | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type model with an invalid class name for python, starts with a number | [optional] typed value is accessed with the get_additional_property_ method ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **name** | int, schemas.Unset | | [optional] value must be a 32 bit integer +**class** | str, schemas.Unset | this is a reserved python keyword | [optional] ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [_200ResponseDictInput](#_200responsedictinput), [_200ResponseDict](#_200responsedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [_200ResponseDict](#_200responsedict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["class"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/abstract_step_message.md b/samples/client/petstore/python/docs/components/schema/abstract_step_message.md index dbc033f8176..80b53959c32 100644 --- a/samples/client/petstore/python/docs/components/schema/abstract_step_message.md +++ b/samples/client/petstore/python/docs/components/schema/abstract_step_message.md @@ -1,5 +1,5 @@ # AbstractStepMessage -petstore_api.components.schema.abstract_step_message +openapi_client.components.schema.abstract_step_message ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_class.md b/samples/client/petstore/python/docs/components/schema/additional_properties_class.md index 5b2203429e2..fdcb59c0583 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_class.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_class.md @@ -1,5 +1,5 @@ # AdditionalPropertiesClass -petstore_api.components.schema.additional_properties_class +openapi_client.components.schema.additional_properties_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md b/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md index 6f2e5f0e400..4d792070ea4 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md @@ -1,5 +1,5 @@ # AdditionalPropertiesSchema -petstore_api.components.schema.additional_properties_schema +openapi_client.components.schema.additional_properties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md b/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md index 68f0717112d..2f4f11b2430 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md @@ -1,5 +1,5 @@ # AdditionalPropertiesWithArrayOfEnums -petstore_api.components.schema.additional_properties_with_array_of_enums +openapi_client.components.schema.additional_properties_with_array_of_enums ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/address.md b/samples/client/petstore/python/docs/components/schema/address.md index bb7eac2953b..bbacdc586e9 100644 --- a/samples/client/petstore/python/docs/components/schema/address.md +++ b/samples/client/petstore/python/docs/components/schema/address.md @@ -1,5 +1,5 @@ # Address -petstore_api.components.schema.address +openapi_client.components.schema.address ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/animal.md b/samples/client/petstore/python/docs/components/schema/animal.md index 43532fdd761..356727213e4 100644 --- a/samples/client/petstore/python/docs/components/schema/animal.md +++ b/samples/client/petstore/python/docs/components/schema/animal.md @@ -1,5 +1,5 @@ # Animal -petstore_api.components.schema.animal +openapi_client.components.schema.animal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/animal_farm.md b/samples/client/petstore/python/docs/components/schema/animal_farm.md index 6adbff13d86..4591149bd68 100644 --- a/samples/client/petstore/python/docs/components/schema/animal_farm.md +++ b/samples/client/petstore/python/docs/components/schema/animal_farm.md @@ -1,5 +1,5 @@ # AnimalFarm -petstore_api.components.schema.animal_farm +openapi_client.components.schema.animal_farm ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md index 5a26a5f883c..c7d01a55178 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md @@ -1,5 +1,5 @@ # AnyTypeAndFormat -petstore_api.components.schema.any_type_and_format +openapi_client.components.schema.any_type_and_format ``` type: schemas.Schema ``` @@ -41,6 +41,7 @@ Keyword Argument | Type | Description | Notes **int32** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 64 bit integer **double** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 64 bit float +**float** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 32 bit float **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method ### properties @@ -53,12 +54,13 @@ Property | Type | Description | Notes **int32** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 64 bit integer **double** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 64 bit float +**float** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 32 bit float ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [AnyTypeAndFormatDictInput](#anytypeandformatdictinput), [AnyTypeAndFormatDict](#anytypeandformatdict) | [AnyTypeAndFormatDict](#anytypeandformatdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["date-time"], instance["float"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["date-time"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md index 6c3f844159d..1c3f0ae3c5d 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md @@ -1,5 +1,5 @@ # AnyTypeNotString -petstore_api.components.schema.any_type_not_string +openapi_client.components.schema.any_type_not_string ``` type: schemas.Schema ``` @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | str | str +[Not](#not) | str | str -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/api_response.md b/samples/client/petstore/python/docs/components/schema/api_response.md index cb42e6a8666..26a7cfde6ab 100644 --- a/samples/client/petstore/python/docs/components/schema/api_response.md +++ b/samples/client/petstore/python/docs/components/schema/api_response.md @@ -1,5 +1,5 @@ # ApiResponse -petstore_api.components.schema.api_response +openapi_client.components.schema.api_response ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/apple.md b/samples/client/petstore/python/docs/components/schema/apple.md index a0a7d573d07..d3b158466b6 100644 --- a/samples/client/petstore/python/docs/components/schema/apple.md +++ b/samples/client/petstore/python/docs/components/schema/apple.md @@ -1,5 +1,5 @@ # Apple -petstore_api.components.schema.apple +openapi_client.components.schema.apple ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/apple_req.md b/samples/client/petstore/python/docs/components/schema/apple_req.md index 74d5cb5210b..83fc059ae5e 100644 --- a/samples/client/petstore/python/docs/components/schema/apple_req.md +++ b/samples/client/petstore/python/docs/components/schema/apple_req.md @@ -1,5 +1,5 @@ # AppleReq -petstore_api.components.schema.apple_req +openapi_client.components.schema.apple_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md b/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md index 0fe55e78dc0..45e41624c7a 100644 --- a/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md +++ b/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md @@ -1,5 +1,5 @@ # ArrayHoldingAnyType -petstore_api.components.schema.array_holding_any_type +openapi_client.components.schema.array_holding_any_type ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md b/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md index 8b5762700bf..15b666b2d37 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md @@ -1,5 +1,5 @@ # ArrayOfArrayOfNumberOnly -petstore_api.components.schema.array_of_array_of_number_only +openapi_client.components.schema.array_of_array_of_number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_enums.md b/samples/client/petstore/python/docs/components/schema/array_of_enums.md index 7835598c777..f058f29b304 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_enums.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_enums.md @@ -1,5 +1,5 @@ # ArrayOfEnums -petstore_api.components.schema.array_of_enums +openapi_client.components.schema.array_of_enums ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_number_only.md b/samples/client/petstore/python/docs/components/schema/array_of_number_only.md index a846a691434..00bf02a05c3 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_number_only.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_number_only.md @@ -1,5 +1,5 @@ # ArrayOfNumberOnly -petstore_api.components.schema.array_of_number_only +openapi_client.components.schema.array_of_number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_test.md b/samples/client/petstore/python/docs/components/schema/array_test.md index a05d2382114..9ce8630795f 100644 --- a/samples/client/petstore/python/docs/components/schema/array_test.md +++ b/samples/client/petstore/python/docs/components/schema/array_test.md @@ -1,5 +1,5 @@ # ArrayTest -petstore_api.components.schema.array_test +openapi_client.components.schema.array_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md b/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md index 5bd844991ff..32ad4f6e27e 100644 --- a/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md +++ b/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md @@ -1,5 +1,5 @@ # ArrayWithValidationsInItems -petstore_api.components.schema.array_with_validations_in_items +openapi_client.components.schema.array_with_validations_in_items ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/banana.md b/samples/client/petstore/python/docs/components/schema/banana.md index edfe3cf79e3..946cf92cd2f 100644 --- a/samples/client/petstore/python/docs/components/schema/banana.md +++ b/samples/client/petstore/python/docs/components/schema/banana.md @@ -1,5 +1,5 @@ # Banana -petstore_api.components.schema.banana +openapi_client.components.schema.banana ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/banana_req.md b/samples/client/petstore/python/docs/components/schema/banana_req.md index d49311e1232..e1238548eec 100644 --- a/samples/client/petstore/python/docs/components/schema/banana_req.md +++ b/samples/client/petstore/python/docs/components/schema/banana_req.md @@ -1,5 +1,5 @@ # BananaReq -petstore_api.components.schema.banana_req +openapi_client.components.schema.banana_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/bar.md b/samples/client/petstore/python/docs/components/schema/bar.md index eec9891b091..428b0eb7a0a 100644 --- a/samples/client/petstore/python/docs/components/schema/bar.md +++ b/samples/client/petstore/python/docs/components/schema/bar.md @@ -1,5 +1,5 @@ # Bar -petstore_api.components.schema.bar +openapi_client.components.schema.bar ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/basque_pig.md b/samples/client/petstore/python/docs/components/schema/basque_pig.md index 688d13222c2..2d95dca52e6 100644 --- a/samples/client/petstore/python/docs/components/schema/basque_pig.md +++ b/samples/client/petstore/python/docs/components/schema/basque_pig.md @@ -1,5 +1,5 @@ # BasquePig -petstore_api.components.schema.basque_pig +openapi_client.components.schema.basque_pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/boolean.md b/samples/client/petstore/python/docs/components/schema/boolean.md index 32ce64556a5..c7cee78cf81 100644 --- a/samples/client/petstore/python/docs/components/schema/boolean.md +++ b/samples/client/petstore/python/docs/components/schema/boolean.md @@ -1,5 +1,5 @@ # Boolean -petstore_api.components.schema.boolean +openapi_client.components.schema.boolean ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/boolean_enum.md b/samples/client/petstore/python/docs/components/schema/boolean_enum.md index 9f3c5a6e43c..21092c8996a 100644 --- a/samples/client/petstore/python/docs/components/schema/boolean_enum.md +++ b/samples/client/petstore/python/docs/components/schema/boolean_enum.md @@ -1,5 +1,5 @@ # BooleanEnum -petstore_api.components.schema.boolean_enum +openapi_client.components.schema.boolean_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/capitalization.md b/samples/client/petstore/python/docs/components/schema/capitalization.md index e920943cb6b..f343ca4b4be 100644 --- a/samples/client/petstore/python/docs/components/schema/capitalization.md +++ b/samples/client/petstore/python/docs/components/schema/capitalization.md @@ -1,5 +1,5 @@ # Capitalization -petstore_api.components.schema.capitalization +openapi_client.components.schema.capitalization ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/cat.md b/samples/client/petstore/python/docs/components/schema/cat.md index fcd521f540a..323467ceaca 100644 --- a/samples/client/petstore/python/docs/components/schema/cat.md +++ b/samples/client/petstore/python/docs/components/schema/cat.md @@ -1,5 +1,5 @@ # Cat -petstore_api.components.schema.cat +openapi_client.components.schema.cat ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/category.md b/samples/client/petstore/python/docs/components/schema/category.md index 187fac89191..0c2477e5bbc 100644 --- a/samples/client/petstore/python/docs/components/schema/category.md +++ b/samples/client/petstore/python/docs/components/schema/category.md @@ -1,5 +1,5 @@ # Category -petstore_api.components.schema.category +openapi_client.components.schema.category ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/child_cat.md b/samples/client/petstore/python/docs/components/schema/child_cat.md index 128b20b1073..24df917481a 100644 --- a/samples/client/petstore/python/docs/components/schema/child_cat.md +++ b/samples/client/petstore/python/docs/components/schema/child_cat.md @@ -1,5 +1,5 @@ # ChildCat -petstore_api.components.schema.child_cat +openapi_client.components.schema.child_cat ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/class_model.md b/samples/client/petstore/python/docs/components/schema/class_model.md index 61728d4145c..01f24044952 100644 --- a/samples/client/petstore/python/docs/components/schema/class_model.md +++ b/samples/client/petstore/python/docs/components/schema/class_model.md @@ -1,5 +1,5 @@ # ClassModel -petstore_api.components.schema.class_model +openapi_client.components.schema.class_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/client.md b/samples/client/petstore/python/docs/components/schema/client.md index 449d3ff41df..3620f092577 100644 --- a/samples/client/petstore/python/docs/components/schema/client.md +++ b/samples/client/petstore/python/docs/components/schema/client.md @@ -1,5 +1,5 @@ # Client -petstore_api.components.schema.client +openapi_client.components.schema.client ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md b/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md index bde4710ec75..3fbf911f82d 100644 --- a/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md @@ -1,5 +1,5 @@ # ComplexQuadrilateral -petstore_api.components.schema.complex_quadrilateral +openapi_client.components.schema.complex_quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md b/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md index e60eb71ee82..21d1aca80af 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md +++ b/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md @@ -1,5 +1,5 @@ # ComposedAnyOfDifferentTypesNoValidations -petstore_api.components.schema.composed_any_of_different_types_no_validations +openapi_client.components.schema.composed_any_of_different_types_no_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_array.md b/samples/client/petstore/python/docs/components/schema/composed_array.md index 2c872864bbe..0e5e7290b93 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_array.md +++ b/samples/client/petstore/python/docs/components/schema/composed_array.md @@ -1,5 +1,5 @@ # ComposedArray -petstore_api.components.schema.composed_array +openapi_client.components.schema.composed_array ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_bool.md b/samples/client/petstore/python/docs/components/schema/composed_bool.md index f8d8bd0099e..1906b920024 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_bool.md +++ b/samples/client/petstore/python/docs/components/schema/composed_bool.md @@ -1,5 +1,5 @@ # ComposedBool -petstore_api.components.schema.composed_bool +openapi_client.components.schema.composed_bool ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_none.md b/samples/client/petstore/python/docs/components/schema/composed_none.md index 55ad6cc9cd0..8a5855db568 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_none.md +++ b/samples/client/petstore/python/docs/components/schema/composed_none.md @@ -1,5 +1,5 @@ # ComposedNone -petstore_api.components.schema.composed_none +openapi_client.components.schema.composed_none ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_number.md b/samples/client/petstore/python/docs/components/schema/composed_number.md index b93e3bdc15d..2dd7e08e70f 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_number.md +++ b/samples/client/petstore/python/docs/components/schema/composed_number.md @@ -1,5 +1,5 @@ # ComposedNumber -petstore_api.components.schema.composed_number +openapi_client.components.schema.composed_number ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_object.md b/samples/client/petstore/python/docs/components/schema/composed_object.md index aa5ed2a4c01..f0a2c64ba8d 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_object.md +++ b/samples/client/petstore/python/docs/components/schema/composed_object.md @@ -1,5 +1,5 @@ # ComposedObject -petstore_api.components.schema.composed_object +openapi_client.components.schema.composed_object ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md b/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md index 4ac0f5ef2f9..c0c2cbf30d0 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md +++ b/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md @@ -1,5 +1,5 @@ # ComposedOneOfDifferentTypes -petstore_api.components.schema.composed_one_of_different_types +openapi_client.components.schema.composed_one_of_different_types ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_string.md b/samples/client/petstore/python/docs/components/schema/composed_string.md index e7569a46d78..0a66012b27f 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_string.md +++ b/samples/client/petstore/python/docs/components/schema/composed_string.md @@ -1,5 +1,5 @@ # ComposedString -petstore_api.components.schema.composed_string +openapi_client.components.schema.composed_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/currency.md b/samples/client/petstore/python/docs/components/schema/currency.md index c4296b73ab3..ad232ad4b9f 100644 --- a/samples/client/petstore/python/docs/components/schema/currency.md +++ b/samples/client/petstore/python/docs/components/schema/currency.md @@ -1,5 +1,5 @@ # Currency -petstore_api.components.schema.currency +openapi_client.components.schema.currency ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/danish_pig.md b/samples/client/petstore/python/docs/components/schema/danish_pig.md index b7befa395ad..50d091f65fa 100644 --- a/samples/client/petstore/python/docs/components/schema/danish_pig.md +++ b/samples/client/petstore/python/docs/components/schema/danish_pig.md @@ -1,5 +1,5 @@ # DanishPig -petstore_api.components.schema.danish_pig +openapi_client.components.schema.danish_pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_time_test.md b/samples/client/petstore/python/docs/components/schema/date_time_test.md index 5c84dad86d2..e00a47af72e 100644 --- a/samples/client/petstore/python/docs/components/schema/date_time_test.md +++ b/samples/client/petstore/python/docs/components/schema/date_time_test.md @@ -1,5 +1,5 @@ # DateTimeTest -petstore_api.components.schema.date_time_test +openapi_client.components.schema.date_time_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md b/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md index ba4f801aeb4..b73e7d0a382 100644 --- a/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md @@ -1,5 +1,5 @@ # DateTimeWithValidations -petstore_api.components.schema.date_time_with_validations +openapi_client.components.schema.date_time_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_with_validations.md b/samples/client/petstore/python/docs/components/schema/date_with_validations.md index e79df95a8d6..74c476926c5 100644 --- a/samples/client/petstore/python/docs/components/schema/date_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/date_with_validations.md @@ -1,5 +1,5 @@ # DateWithValidations -petstore_api.components.schema.date_with_validations +openapi_client.components.schema.date_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/decimal_payload.md b/samples/client/petstore/python/docs/components/schema/decimal_payload.md index 76a35c95f6a..c56e3a811cd 100644 --- a/samples/client/petstore/python/docs/components/schema/decimal_payload.md +++ b/samples/client/petstore/python/docs/components/schema/decimal_payload.md @@ -1,5 +1,5 @@ # DecimalPayload -petstore_api.components.schema.decimal_payload +openapi_client.components.schema.decimal_payload ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/dog.md b/samples/client/petstore/python/docs/components/schema/dog.md index c4dc448957b..948fca8d88e 100644 --- a/samples/client/petstore/python/docs/components/schema/dog.md +++ b/samples/client/petstore/python/docs/components/schema/dog.md @@ -1,5 +1,5 @@ # Dog -petstore_api.components.schema.dog +openapi_client.components.schema.dog ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/drawing.md b/samples/client/petstore/python/docs/components/schema/drawing.md index 0e2003d6f00..d9449a53829 100644 --- a/samples/client/petstore/python/docs/components/schema/drawing.md +++ b/samples/client/petstore/python/docs/components/schema/drawing.md @@ -1,5 +1,5 @@ # Drawing -petstore_api.components.schema.drawing +openapi_client.components.schema.drawing ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_arrays.md b/samples/client/petstore/python/docs/components/schema/enum_arrays.md index 92856af6d52..4e5cea87096 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_arrays.md +++ b/samples/client/petstore/python/docs/components/schema/enum_arrays.md @@ -1,5 +1,5 @@ # EnumArrays -petstore_api.components.schema.enum_arrays +openapi_client.components.schema.enum_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_class.md b/samples/client/petstore/python/docs/components/schema/enum_class.md index a50535ce3bd..35e89e3ad3b 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_class.md +++ b/samples/client/petstore/python/docs/components/schema/enum_class.md @@ -1,5 +1,5 @@ # EnumClass -petstore_api.components.schema.enum_class +openapi_client.components.schema.enum_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_test.md b/samples/client/petstore/python/docs/components/schema/enum_test.md index ba35a7e172b..1747501f7fd 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_test.md +++ b/samples/client/petstore/python/docs/components/schema/enum_test.md @@ -1,5 +1,5 @@ # EnumTest -petstore_api.components.schema.enum_test +openapi_client.components.schema.enum_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md b/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md index feb518e21b8..3df44f8255c 100644 --- a/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md @@ -1,5 +1,5 @@ # EquilateralTriangle -petstore_api.components.schema.equilateral_triangle +openapi_client.components.schema.equilateral_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/file.md b/samples/client/petstore/python/docs/components/schema/file.md index 1f61e2e7323..8d95649054e 100644 --- a/samples/client/petstore/python/docs/components/schema/file.md +++ b/samples/client/petstore/python/docs/components/schema/file.md @@ -1,5 +1,5 @@ # File -petstore_api.components.schema.file +openapi_client.components.schema.file ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md b/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md index e2e908abc85..3d3b6ec5a86 100644 --- a/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md +++ b/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md @@ -1,5 +1,5 @@ # FileSchemaTestClass -petstore_api.components.schema.file_schema_test_class +openapi_client.components.schema.file_schema_test_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/foo.md b/samples/client/petstore/python/docs/components/schema/foo.md index 4a03319cf4a..67511c7867c 100644 --- a/samples/client/petstore/python/docs/components/schema/foo.md +++ b/samples/client/petstore/python/docs/components/schema/foo.md @@ -1,5 +1,5 @@ # Foo -petstore_api.components.schema.foo +openapi_client.components.schema.foo ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/format_test.md b/samples/client/petstore/python/docs/components/schema/format_test.md index 6882f72e0dc..e6ffca7f85b 100644 --- a/samples/client/petstore/python/docs/components/schema/format_test.md +++ b/samples/client/petstore/python/docs/components/schema/format_test.md @@ -1,5 +1,5 @@ # FormatTest -petstore_api.components.schema.format_test +openapi_client.components.schema.format_test ``` type: schemas.Schema ``` @@ -54,6 +54,7 @@ Keyword Argument | Type | Description | Notes **int32** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int32withValidations** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit float **float32** | float, int, schemas.Unset | | [optional] value must be a 32 bit float **double** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **float64** | float, int, schemas.Unset | | [optional] value must be a 64 bit float @@ -79,6 +80,7 @@ Property | Type | Description | Notes **int32** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int32withValidations** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit float **float32** | float, int, schemas.Unset | | [optional] value must be a 32 bit float **double** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **float64** | float, int, schemas.Unset | | [optional] value must be a 64 bit float @@ -96,7 +98,6 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [FormatTestDictInput](#formattestdictinput), [FormatTestDict](#formattestdict) | [FormatTestDict](#formattestdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties # ArrayWithUniqueItems diff --git a/samples/client/petstore/python/docs/components/schema/from_schema.md b/samples/client/petstore/python/docs/components/schema/from_schema.md index e7e18e0a4ff..bf28c4bc3a8 100644 --- a/samples/client/petstore/python/docs/components/schema/from_schema.md +++ b/samples/client/petstore/python/docs/components/schema/from_schema.md @@ -1,5 +1,5 @@ # FromSchema -petstore_api.components.schema.from_schema +openapi_client.components.schema.from_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/fruit.md b/samples/client/petstore/python/docs/components/schema/fruit.md index 65e0fd938c3..ba03d92f483 100644 --- a/samples/client/petstore/python/docs/components/schema/fruit.md +++ b/samples/client/petstore/python/docs/components/schema/fruit.md @@ -1,5 +1,5 @@ # Fruit -petstore_api.components.schema.fruit +openapi_client.components.schema.fruit ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/fruit_req.md b/samples/client/petstore/python/docs/components/schema/fruit_req.md index 37e4344efe2..7773decf7b9 100644 --- a/samples/client/petstore/python/docs/components/schema/fruit_req.md +++ b/samples/client/petstore/python/docs/components/schema/fruit_req.md @@ -1,5 +1,5 @@ # FruitReq -petstore_api.components.schema.fruit_req +openapi_client.components.schema.fruit_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/gm_fruit.md b/samples/client/petstore/python/docs/components/schema/gm_fruit.md index 4747abc5f6c..41b78ca747e 100644 --- a/samples/client/petstore/python/docs/components/schema/gm_fruit.md +++ b/samples/client/petstore/python/docs/components/schema/gm_fruit.md @@ -1,5 +1,5 @@ # GmFruit -petstore_api.components.schema.gm_fruit +openapi_client.components.schema.gm_fruit ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/grandparent_animal.md b/samples/client/petstore/python/docs/components/schema/grandparent_animal.md index c0b831eca21..edcf27efd42 100644 --- a/samples/client/petstore/python/docs/components/schema/grandparent_animal.md +++ b/samples/client/petstore/python/docs/components/schema/grandparent_animal.md @@ -1,5 +1,5 @@ # GrandparentAnimal -petstore_api.components.schema.grandparent_animal +openapi_client.components.schema.grandparent_animal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/has_only_read_only.md b/samples/client/petstore/python/docs/components/schema/has_only_read_only.md index f02de6a97cd..ac8577b4f1e 100644 --- a/samples/client/petstore/python/docs/components/schema/has_only_read_only.md +++ b/samples/client/petstore/python/docs/components/schema/has_only_read_only.md @@ -1,5 +1,5 @@ # HasOnlyReadOnly -petstore_api.components.schema.has_only_read_only +openapi_client.components.schema.has_only_read_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/health_check_result.md b/samples/client/petstore/python/docs/components/schema/health_check_result.md index ffa5973315c..b36756231f2 100644 --- a/samples/client/petstore/python/docs/components/schema/health_check_result.md +++ b/samples/client/petstore/python/docs/components/schema/health_check_result.md @@ -1,5 +1,5 @@ # HealthCheckResult -petstore_api.components.schema.health_check_result +openapi_client.components.schema.health_check_result ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum.md b/samples/client/petstore/python/docs/components/schema/integer_enum.md index 2709f384821..64769c22370 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum.md @@ -1,5 +1,5 @@ # IntegerEnum -petstore_api.components.schema.integer_enum +openapi_client.components.schema.integer_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_big.md b/samples/client/petstore/python/docs/components/schema/integer_enum_big.md index e366417b908..281d5a650de 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_big.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_big.md @@ -1,5 +1,5 @@ # IntegerEnumBig -petstore_api.components.schema.integer_enum_big +openapi_client.components.schema.integer_enum_big ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md b/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md index 207ae3b942a..ee8b61a971d 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md @@ -1,5 +1,5 @@ # IntegerEnumOneValue -petstore_api.components.schema.integer_enum_one_value +openapi_client.components.schema.integer_enum_one_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md b/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md index 0426b8ecc40..aee2cf0415e 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md @@ -1,5 +1,5 @@ # IntegerEnumWithDefaultValue -petstore_api.components.schema.integer_enum_with_default_value +openapi_client.components.schema.integer_enum_with_default_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_max10.md b/samples/client/petstore/python/docs/components/schema/integer_max10.md index 5fe0d0984ed..28adc7df2f4 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_max10.md +++ b/samples/client/petstore/python/docs/components/schema/integer_max10.md @@ -1,5 +1,5 @@ # IntegerMax10 -petstore_api.components.schema.integer_max10 +openapi_client.components.schema.integer_max10 ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_min15.md b/samples/client/petstore/python/docs/components/schema/integer_min15.md index cebf163e07c..44857fefa79 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_min15.md +++ b/samples/client/petstore/python/docs/components/schema/integer_min15.md @@ -1,5 +1,5 @@ # IntegerMin15 -petstore_api.components.schema.integer_min15 +openapi_client.components.schema.integer_min15 ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md b/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md index af3293dca87..71c8c2469f1 100644 --- a/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md @@ -1,5 +1,5 @@ # IsoscelesTriangle -petstore_api.components.schema.isosceles_triangle +openapi_client.components.schema.isosceles_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/items.md b/samples/client/petstore/python/docs/components/schema/items.md index 9527e318e1f..268c826751d 100644 --- a/samples/client/petstore/python/docs/components/schema/items.md +++ b/samples/client/petstore/python/docs/components/schema/items.md @@ -1,5 +1,5 @@ # Items -petstore_api.components.schema.items +openapi_client.components.schema.items ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/items_schema.md b/samples/client/petstore/python/docs/components/schema/items_schema.md index 5bac34fbb5b..ea676f0e5fa 100644 --- a/samples/client/petstore/python/docs/components/schema/items_schema.md +++ b/samples/client/petstore/python/docs/components/schema/items_schema.md @@ -1,5 +1,5 @@ # ItemsSchema -petstore_api.components.schema.items_schema +openapi_client.components.schema.items_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request.md b/samples/client/petstore/python/docs/components/schema/json_patch_request.md index 28e37d801d2..56e197b5aa5 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request.md @@ -1,5 +1,5 @@ # JSONPatchRequest -petstore_api.components.schema.json_patch_request +openapi_client.components.schema.json_patch_request ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md index 32b8543f6c4..2c8471cd26a 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md @@ -1,5 +1,5 @@ # JSONPatchRequestAddReplaceTest -petstore_api.components.schema.json_patch_request_add_replace_test +openapi_client.components.schema.json_patch_request_add_replace_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md index fcf768c474a..a3e38f99ef9 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md @@ -1,5 +1,5 @@ # JSONPatchRequestMoveCopy -petstore_api.components.schema.json_patch_request_move_copy +openapi_client.components.schema.json_patch_request_move_copy ``` type: schemas.Schema ``` @@ -27,12 +27,14 @@ base class: schemas.immutabledict[str, str] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- +**from** | str | A JSON Pointer path. | **op** | typing.Literal["move", "copy"] | The operation to perform. | must be one of ["move", "copy"] **path** | str | A JSON Pointer path. | ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- +**from** | str | A JSON Pointer path. | **op** | typing.Literal["move", "copy"] | The operation to perform. | must be one of ["move", "copy"] **path** | str | A JSON Pointer path. | @@ -40,6 +42,5 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [JSONPatchRequestMoveCopyDictInput](#jsonpatchrequestmovecopydictinput), [JSONPatchRequestMoveCopyDict](#jsonpatchrequestmovecopydict) | [JSONPatchRequestMoveCopyDict](#jsonpatchrequestmovecopydict) | a constructor -__getitem__ | str | str | This model has invalid python names so this method is used under the hood when you access instance["from"], [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md index e0c29c95521..e8652c31eff 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md @@ -1,5 +1,5 @@ # JSONPatchRequestRemove -petstore_api.components.schema.json_patch_request_remove +openapi_client.components.schema.json_patch_request_remove ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/mammal.md b/samples/client/petstore/python/docs/components/schema/mammal.md index 978df2c09e7..d4b93334109 100644 --- a/samples/client/petstore/python/docs/components/schema/mammal.md +++ b/samples/client/petstore/python/docs/components/schema/mammal.md @@ -1,5 +1,5 @@ # Mammal -petstore_api.components.schema.mammal +openapi_client.components.schema.mammal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/map_test.md b/samples/client/petstore/python/docs/components/schema/map_test.md index 3d8b54924ee..a1848fb22ff 100644 --- a/samples/client/petstore/python/docs/components/schema/map_test.md +++ b/samples/client/petstore/python/docs/components/schema/map_test.md @@ -1,5 +1,5 @@ # MapTest -petstore_api.components.schema.map_test +openapi_client.components.schema.map_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md index eb234501433..64a92e59a3e 100644 --- a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md +++ b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md @@ -1,5 +1,5 @@ # MixedPropertiesAndAdditionalPropertiesClass -petstore_api.components.schema.mixed_properties_and_additional_properties_class +openapi_client.components.schema.mixed_properties_and_additional_properties_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/money.md b/samples/client/petstore/python/docs/components/schema/money.md index ae3c28c835a..a466517456e 100644 --- a/samples/client/petstore/python/docs/components/schema/money.md +++ b/samples/client/petstore/python/docs/components/schema/money.md @@ -1,5 +1,5 @@ # Money -petstore_api.components.schema.money +openapi_client.components.schema.money ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md b/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md index 30e17c80ac0..a8c94453689 100644 --- a/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md +++ b/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md @@ -1,5 +1,5 @@ # MultiPropertiesSchema -petstore_api.components.schema.multi_properties_schema +openapi_client.components.schema.multi_properties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/my_object_dto.md b/samples/client/petstore/python/docs/components/schema/my_object_dto.md index 334bb9058e5..9a2cf0d7702 100644 --- a/samples/client/petstore/python/docs/components/schema/my_object_dto.md +++ b/samples/client/petstore/python/docs/components/schema/my_object_dto.md @@ -1,5 +1,5 @@ # MyObjectDto -petstore_api.components.schema.my_object_dto +openapi_client.components.schema.my_object_dto ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/name.md b/samples/client/petstore/python/docs/components/schema/name.md index 8aaeedc84e8..23a7cbdff48 100644 --- a/samples/client/petstore/python/docs/components/schema/name.md +++ b/samples/client/petstore/python/docs/components/schema/name.md @@ -1,5 +1,5 @@ # Name -petstore_api.components.schema.name +openapi_client.components.schema.name ``` type: schemas.Schema ``` @@ -33,6 +33,7 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **name** | int | | value must be a 32 bit integer **snake_case** | int, schemas.Unset | | [optional] value must be a 32 bit integer +**property** | str, schemas.Unset | this is a reserved python keyword | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type Model for testing model name same as property name | [optional] typed value is accessed with the get_additional_property_ method ### properties @@ -40,12 +41,12 @@ Property | Type | Description | Notes -------- | ---- | ----------- | ----- **name** | int | | value must be a 32 bit integer **snake_case** | int, schemas.Unset | | [optional] value must be a 32 bit integer +**property** | str, schemas.Unset | this is a reserved python keyword | [optional] ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [NameDictInput](#namedictinput), [NameDict](#namedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [NameDict](#namedict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["property"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/no_additional_properties.md b/samples/client/petstore/python/docs/components/schema/no_additional_properties.md index b9f222b520e..d9c25f18680 100644 --- a/samples/client/petstore/python/docs/components/schema/no_additional_properties.md +++ b/samples/client/petstore/python/docs/components/schema/no_additional_properties.md @@ -1,5 +1,5 @@ # NoAdditionalProperties -petstore_api.components.schema.no_additional_properties +openapi_client.components.schema.no_additional_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_class.md b/samples/client/petstore/python/docs/components/schema/nullable_class.md index f1479964eb4..927836b840c 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_class.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_class.md @@ -1,5 +1,5 @@ # NullableClass -petstore_api.components.schema.nullable_class +openapi_client.components.schema.nullable_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_shape.md b/samples/client/petstore/python/docs/components/schema/nullable_shape.md index d0e4137307a..a3bbaa4c937 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_shape.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_shape.md @@ -1,5 +1,5 @@ # NullableShape -petstore_api.components.schema.nullable_shape +openapi_client.components.schema.nullable_shape ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_string.md b/samples/client/petstore/python/docs/components/schema/nullable_string.md index 7dbad1ff6f1..bf698903d9e 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_string.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_string.md @@ -1,5 +1,5 @@ # NullableString -petstore_api.components.schema.nullable_string +openapi_client.components.schema.nullable_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number.md b/samples/client/petstore/python/docs/components/schema/number.md index 919a8fccd3f..5b566072350 100644 --- a/samples/client/petstore/python/docs/components/schema/number.md +++ b/samples/client/petstore/python/docs/components/schema/number.md @@ -1,5 +1,5 @@ # Number -petstore_api.components.schema.number +openapi_client.components.schema.number ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_only.md b/samples/client/petstore/python/docs/components/schema/number_only.md index 6a0d19c8e96..9f07eae5358 100644 --- a/samples/client/petstore/python/docs/components/schema/number_only.md +++ b/samples/client/petstore/python/docs/components/schema/number_only.md @@ -1,5 +1,5 @@ # NumberOnly -petstore_api.components.schema.number_only +openapi_client.components.schema.number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md b/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md index 114a1f4d3c9..89f62c77544 100644 --- a/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md +++ b/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md @@ -1,5 +1,5 @@ # NumberWithExclusiveMinMax -petstore_api.components.schema.number_with_exclusive_min_max +openapi_client.components.schema.number_with_exclusive_min_max ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_with_validations.md b/samples/client/petstore/python/docs/components/schema/number_with_validations.md index 51080993035..b54759e6821 100644 --- a/samples/client/petstore/python/docs/components/schema/number_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/number_with_validations.md @@ -1,5 +1,5 @@ # NumberWithValidations -petstore_api.components.schema.number_with_validations +openapi_client.components.schema.number_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md b/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md index 960b5e1310b..d876ec0085b 100644 --- a/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md +++ b/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md @@ -1,5 +1,5 @@ # ObjWithRequiredProps -petstore_api.components.schema.obj_with_required_props +openapi_client.components.schema.obj_with_required_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md b/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md index 483048d8d46..3c7164ff3cd 100644 --- a/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md +++ b/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md @@ -1,5 +1,5 @@ # ObjWithRequiredPropsBase -petstore_api.components.schema.obj_with_required_props_base +openapi_client.components.schema.obj_with_required_props_base ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_interface.md b/samples/client/petstore/python/docs/components/schema/object_interface.md index 3025af14e03..d67fb3bcf7f 100644 --- a/samples/client/petstore/python/docs/components/schema/object_interface.md +++ b/samples/client/petstore/python/docs/components/schema/object_interface.md @@ -1,5 +1,5 @@ # ObjectInterface -petstore_api.components.schema.object_interface +openapi_client.components.schema.object_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md b/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md index 503397d4e3e..50c2614ad02 100644 --- a/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md @@ -1,5 +1,5 @@ # ObjectModelWithArgAndArgsProperties -petstore_api.components.schema.object_model_with_arg_and_args_properties +openapi_client.components.schema.object_model_with_arg_and_args_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md b/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md index f5464e8dd35..40ae8c17373 100644 --- a/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md @@ -1,5 +1,5 @@ # ObjectModelWithRefProps -petstore_api.components.schema.object_model_with_ref_props +openapi_client.components.schema.object_model_with_ref_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md b/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md index 5f232526416..575c3c1a5a8 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md @@ -1,5 +1,5 @@ # ObjectWithAllOfWithReqTestPropFromUnsetAddProp -petstore_api.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop +openapi_client.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md index b2558b19f3d..6587af7940b 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md @@ -1,5 +1,5 @@ # ObjectWithCollidingProperties -petstore_api.components.schema.object_with_colliding_properties +openapi_client.components.schema.object_with_colliding_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md index cef05f650be..67cc4e9cfa5 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md @@ -1,5 +1,5 @@ # ObjectWithDecimalProperties -petstore_api.components.schema.object_with_decimal_properties +openapi_client.components.schema.object_with_decimal_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md b/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md index ed758de7ef0..7b89922613b 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md @@ -1,5 +1,5 @@ # ObjectWithDifficultlyNamedProps -petstore_api.components.schema.object_with_difficultly_named_props +openapi_client.components.schema.object_with_difficultly_named_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md b/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md index f899d271ea3..81cbeabd687 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md @@ -1,5 +1,5 @@ # ObjectWithInlineCompositionProperty -petstore_api.components.schema.object_with_inline_composition_property +openapi_client.components.schema.object_with_inline_composition_property ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md index aae0ac5ca90..161026dd4bf 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md @@ -1,5 +1,5 @@ # ObjectWithInvalidNamedRefedProperties -petstore_api.components.schema.object_with_invalid_named_refed_properties +openapi_client.components.schema.object_with_invalid_named_refed_properties ``` type: schemas.Schema ``` @@ -27,13 +27,19 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- +**from** | [from_schema.FromSchemaDictInput](../../components/schema/from_schema.md#fromschemadictinput), [from_schema.FromSchemaDict](../../components/schema/from_schema.md#fromschemadict) | | **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method +### properties +Property | Type | Description | Notes +-------- | ---- | ----------- | ----- +**from** | [from_schema.FromSchemaDict](../../components/schema/from_schema.md#fromschemadict) | | + ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [ObjectWithInvalidNamedRefedPropertiesDictInput](#objectwithinvalidnamedrefedpropertiesdictinput), [ObjectWithInvalidNamedRefedPropertiesDict](#objectwithinvalidnamedrefedpropertiesdict) | [ObjectWithInvalidNamedRefedPropertiesDict](#objectwithinvalidnamedrefedpropertiesdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["!reference"], instance["from"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["!reference"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md b/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md index f8bbb84a318..55e3c84bdba 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md @@ -1,5 +1,5 @@ # ObjectWithNonIntersectingValues -petstore_api.components.schema.object_with_non_intersecting_values +openapi_client.components.schema.object_with_non_intersecting_values ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md b/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md index 310bcac93a4..4bfc71b31e8 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md @@ -1,5 +1,5 @@ # ObjectWithOnlyOptionalProps -petstore_api.components.schema.object_with_only_optional_props +openapi_client.components.schema.object_with_only_optional_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md b/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md index fae41d328a5..a1c94dce232 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md @@ -1,5 +1,5 @@ # ObjectWithOptionalTestProp -petstore_api.components.schema.object_with_optional_test_prop +openapi_client.components.schema.object_with_optional_test_prop ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_validations.md b/samples/client/petstore/python/docs/components/schema/object_with_validations.md index 0086f84666a..5b603818a83 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_validations.md @@ -1,5 +1,5 @@ # ObjectWithValidations -petstore_api.components.schema.object_with_validations +openapi_client.components.schema.object_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/order.md b/samples/client/petstore/python/docs/components/schema/order.md index dac9d0c33b1..1eba2eb6b04 100644 --- a/samples/client/petstore/python/docs/components/schema/order.md +++ b/samples/client/petstore/python/docs/components/schema/order.md @@ -1,5 +1,5 @@ # Order -petstore_api.components.schema.order +openapi_client.components.schema.order ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md b/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md index f9ac316bb95..ed3f10187de 100644 --- a/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md +++ b/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md @@ -1,5 +1,5 @@ # PaginatedResultMyObjectDto -petstore_api.components.schema.paginated_result_my_object_dto +openapi_client.components.schema.paginated_result_my_object_dto ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/parent_pet.md b/samples/client/petstore/python/docs/components/schema/parent_pet.md index 433e417c783..90ea25f9a22 100644 --- a/samples/client/petstore/python/docs/components/schema/parent_pet.md +++ b/samples/client/petstore/python/docs/components/schema/parent_pet.md @@ -1,5 +1,5 @@ # ParentPet -petstore_api.components.schema.parent_pet +openapi_client.components.schema.parent_pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/pet.md b/samples/client/petstore/python/docs/components/schema/pet.md index c40ad38467f..4f884b49d3d 100644 --- a/samples/client/petstore/python/docs/components/schema/pet.md +++ b/samples/client/petstore/python/docs/components/schema/pet.md @@ -1,5 +1,5 @@ # Pet -petstore_api.components.schema.pet +openapi_client.components.schema.pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/pig.md b/samples/client/petstore/python/docs/components/schema/pig.md index 303ddeb6e28..7043fc6b3cb 100644 --- a/samples/client/petstore/python/docs/components/schema/pig.md +++ b/samples/client/petstore/python/docs/components/schema/pig.md @@ -1,5 +1,5 @@ # Pig -petstore_api.components.schema.pig +openapi_client.components.schema.pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/player.md b/samples/client/petstore/python/docs/components/schema/player.md index 0f7d3476fa1..1d8d20b00b4 100644 --- a/samples/client/petstore/python/docs/components/schema/player.md +++ b/samples/client/petstore/python/docs/components/schema/player.md @@ -1,5 +1,5 @@ # Player -petstore_api.components.schema.player +openapi_client.components.schema.player ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/public_key.md b/samples/client/petstore/python/docs/components/schema/public_key.md index da98a048424..a11c124bf16 100644 --- a/samples/client/petstore/python/docs/components/schema/public_key.md +++ b/samples/client/petstore/python/docs/components/schema/public_key.md @@ -1,5 +1,5 @@ # PublicKey -petstore_api.components.schema.public_key +openapi_client.components.schema.public_key ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/quadrilateral.md b/samples/client/petstore/python/docs/components/schema/quadrilateral.md index 1fdc04ea503..9c14b91a430 100644 --- a/samples/client/petstore/python/docs/components/schema/quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/quadrilateral.md @@ -1,5 +1,5 @@ # Quadrilateral -petstore_api.components.schema.quadrilateral +openapi_client.components.schema.quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md b/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md index bb1ce4208b7..59526c6501c 100644 --- a/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md +++ b/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md @@ -1,5 +1,5 @@ # QuadrilateralInterface -petstore_api.components.schema.quadrilateral_interface +openapi_client.components.schema.quadrilateral_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/read_only_first.md b/samples/client/petstore/python/docs/components/schema/read_only_first.md index 8ad5a1b9bfa..9a9d0865ed1 100644 --- a/samples/client/petstore/python/docs/components/schema/read_only_first.md +++ b/samples/client/petstore/python/docs/components/schema/read_only_first.md @@ -1,5 +1,5 @@ # ReadOnlyFirst -petstore_api.components.schema.read_only_first +openapi_client.components.schema.read_only_first ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/ref_pet.md b/samples/client/petstore/python/docs/components/schema/ref_pet.md index 5f1a548c787..f92cca37473 100644 --- a/samples/client/petstore/python/docs/components/schema/ref_pet.md +++ b/samples/client/petstore/python/docs/components/schema/ref_pet.md @@ -1,5 +1,5 @@ # RefPet -petstore_api.components.schema.ref_pet +openapi_client.components.schema.ref_pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md index d335c5ef030..27f7e813df8 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromExplicitAddProps -petstore_api.components.schema.req_props_from_explicit_add_props +openapi_client.components.schema.req_props_from_explicit_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md index 48d1fd4519b..035521fb15a 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromTrueAddProps -petstore_api.components.schema.req_props_from_true_add_props +openapi_client.components.schema.req_props_from_true_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md index 7bd7d223201..81490d71e44 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromUnsetAddProps -petstore_api.components.schema.req_props_from_unset_add_props +openapi_client.components.schema.req_props_from_unset_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/return.md b/samples/client/petstore/python/docs/components/schema/return.md new file mode 100644 index 00000000000..319c2789f0f --- /dev/null +++ b/samples/client/petstore/python/docs/components/schema/return.md @@ -0,0 +1,46 @@ +# Return +openapi_client.components.schema.return +``` +type: schemas.Schema +``` + +## Description +Model for testing reserved words + +## validate method +Input Type | Return Type | Notes +------------ | ------------- | ------------- +[ReturnDictInput](#returndictinput), [ReturnDict](#returndict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [ReturnDict](#returndict), str, float, int, bool, None, tuple, bytes, io.FileIO | + +## ReturnDictInput +``` +type: typing.Mapping[str, schemas.INPUT_TYPES_ALL] +``` +Key | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return** | int | this is a reserved python keyword | [optional] value must be a 32 bit integer +**any_string_name** | dict, schemas.immutabledict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] + +## ReturnDict +``` +base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + +``` +### __new__ method +Keyword Argument | Type | Description | Notes +---------------- | ---- | ----------- | ----- +**return** | int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit integer +**kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type Model for testing reserved words | [optional] typed value is accessed with the get_additional_property_ method + +### properties +Property | Type | Description | Notes +-------- | ---- | ----------- | ----- +**return** | int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit integer + +### methods +Method | Input Type | Return Type | Notes +------ | ---------- | ----------- | ------ +from_dict_ | [ReturnDictInput](#returndictinput), [ReturnDict](#returndict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [ReturnDict](#returndict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor +get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties + +[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/scalene_triangle.md b/samples/client/petstore/python/docs/components/schema/scalene_triangle.md index 27b9558634c..3f0aea46a37 100644 --- a/samples/client/petstore/python/docs/components/schema/scalene_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/scalene_triangle.md @@ -1,5 +1,5 @@ # ScaleneTriangle -petstore_api.components.schema.scalene_triangle +openapi_client.components.schema.scalene_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md b/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md index e7a99fc1bbe..d822f40548e 100644 --- a/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md +++ b/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md @@ -1,5 +1,5 @@ # SelfReferencingArrayModel -petstore_api.components.schema.self_referencing_array_model +openapi_client.components.schema.self_referencing_array_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md b/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md index bdd112449c0..2a1cc465e63 100644 --- a/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md +++ b/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md @@ -1,5 +1,5 @@ # SelfReferencingObjectModel -petstore_api.components.schema.self_referencing_object_model +openapi_client.components.schema.self_referencing_object_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/shape.md b/samples/client/petstore/python/docs/components/schema/shape.md index 9abc71808a0..41db0b86f7e 100644 --- a/samples/client/petstore/python/docs/components/schema/shape.md +++ b/samples/client/petstore/python/docs/components/schema/shape.md @@ -1,5 +1,5 @@ # Shape -petstore_api.components.schema.shape +openapi_client.components.schema.shape ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/shape_or_null.md b/samples/client/petstore/python/docs/components/schema/shape_or_null.md index 2cffe975a62..c9b7fef5a2c 100644 --- a/samples/client/petstore/python/docs/components/schema/shape_or_null.md +++ b/samples/client/petstore/python/docs/components/schema/shape_or_null.md @@ -1,5 +1,5 @@ # ShapeOrNull -petstore_api.components.schema.shape_or_null +openapi_client.components.schema.shape_or_null ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md b/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md index f2428c57321..30307faf864 100644 --- a/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md @@ -1,5 +1,5 @@ # SimpleQuadrilateral -petstore_api.components.schema.simple_quadrilateral +openapi_client.components.schema.simple_quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/some_object.md b/samples/client/petstore/python/docs/components/schema/some_object.md index f1af08d0620..8aa25d28642 100644 --- a/samples/client/petstore/python/docs/components/schema/some_object.md +++ b/samples/client/petstore/python/docs/components/schema/some_object.md @@ -1,5 +1,5 @@ # SomeObject -petstore_api.components.schema.some_object +openapi_client.components.schema.some_object ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/special_model_name.md b/samples/client/petstore/python/docs/components/schema/special_model_name.md index 63a107d9f1a..99c2e08ae1d 100644 --- a/samples/client/petstore/python/docs/components/schema/special_model_name.md +++ b/samples/client/petstore/python/docs/components/schema/special_model_name.md @@ -1,5 +1,5 @@ # SpecialModelName -petstore_api.components.schema.special_model_name +openapi_client.components.schema.special_model_name ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string.md b/samples/client/petstore/python/docs/components/schema/string.md index 83e463b6e03..ce1ecec02ad 100644 --- a/samples/client/petstore/python/docs/components/schema/string.md +++ b/samples/client/petstore/python/docs/components/schema/string.md @@ -1,5 +1,5 @@ # String -petstore_api.components.schema.string +openapi_client.components.schema.string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_boolean_map.md b/samples/client/petstore/python/docs/components/schema/string_boolean_map.md index babe9df01bb..df99dc39a31 100644 --- a/samples/client/petstore/python/docs/components/schema/string_boolean_map.md +++ b/samples/client/petstore/python/docs/components/schema/string_boolean_map.md @@ -1,5 +1,5 @@ # StringBooleanMap -petstore_api.components.schema.string_boolean_map +openapi_client.components.schema.string_boolean_map ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_enum.md b/samples/client/petstore/python/docs/components/schema/string_enum.md index 8fdf85e41ae..fa49482fe60 100644 --- a/samples/client/petstore/python/docs/components/schema/string_enum.md +++ b/samples/client/petstore/python/docs/components/schema/string_enum.md @@ -1,5 +1,5 @@ # StringEnum -petstore_api.components.schema.string_enum +openapi_client.components.schema.string_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md b/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md index 3c66d6c3f37..5721e846c60 100644 --- a/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md +++ b/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md @@ -1,5 +1,5 @@ # StringEnumWithDefaultValue -petstore_api.components.schema.string_enum_with_default_value +openapi_client.components.schema.string_enum_with_default_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_with_validation.md b/samples/client/petstore/python/docs/components/schema/string_with_validation.md index 3b33aa99049..d124442cc59 100644 --- a/samples/client/petstore/python/docs/components/schema/string_with_validation.md +++ b/samples/client/petstore/python/docs/components/schema/string_with_validation.md @@ -1,5 +1,5 @@ # StringWithValidation -petstore_api.components.schema.string_with_validation +openapi_client.components.schema.string_with_validation ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/tag.md b/samples/client/petstore/python/docs/components/schema/tag.md index 159fb6473ee..5d85acfd38e 100644 --- a/samples/client/petstore/python/docs/components/schema/tag.md +++ b/samples/client/petstore/python/docs/components/schema/tag.md @@ -1,5 +1,5 @@ # Tag -petstore_api.components.schema.tag +openapi_client.components.schema.tag ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/triangle.md b/samples/client/petstore/python/docs/components/schema/triangle.md index 066f81543d1..441b7f97bd3 100644 --- a/samples/client/petstore/python/docs/components/schema/triangle.md +++ b/samples/client/petstore/python/docs/components/schema/triangle.md @@ -1,5 +1,5 @@ # Triangle -petstore_api.components.schema.triangle +openapi_client.components.schema.triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/triangle_interface.md b/samples/client/petstore/python/docs/components/schema/triangle_interface.md index c741e44221c..abb08cbfee7 100644 --- a/samples/client/petstore/python/docs/components/schema/triangle_interface.md +++ b/samples/client/petstore/python/docs/components/schema/triangle_interface.md @@ -1,5 +1,5 @@ # TriangleInterface -petstore_api.components.schema.triangle_interface +openapi_client.components.schema.triangle_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/user.md b/samples/client/petstore/python/docs/components/schema/user.md index 9176682d41c..117458302a6 100644 --- a/samples/client/petstore/python/docs/components/schema/user.md +++ b/samples/client/petstore/python/docs/components/schema/user.md @@ -1,5 +1,5 @@ # User -petstore_api.components.schema.user +openapi_client.components.schema.user ``` type: schemas.Schema ``` @@ -119,9 +119,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[_Not](#_not) | None | None +[Not](#not) | None | None -# _Not +# Not ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/uuid_string.md b/samples/client/petstore/python/docs/components/schema/uuid_string.md index 1a87bee45be..b2ffdd2427e 100644 --- a/samples/client/petstore/python/docs/components/schema/uuid_string.md +++ b/samples/client/petstore/python/docs/components/schema/uuid_string.md @@ -1,5 +1,5 @@ # UUIDString -petstore_api.components.schema.uuid_string +openapi_client.components.schema.uuid_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/whale.md b/samples/client/petstore/python/docs/components/schema/whale.md index 0f026622eca..97a05e31530 100644 --- a/samples/client/petstore/python/docs/components/schema/whale.md +++ b/samples/client/petstore/python/docs/components/schema/whale.md @@ -1,5 +1,5 @@ # Whale -petstore_api.components.schema.whale +openapi_client.components.schema.whale ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/zebra.md b/samples/client/petstore/python/docs/components/schema/zebra.md index 95855c47e94..d8c71308f49 100644 --- a/samples/client/petstore/python/docs/components/schema/zebra.md +++ b/samples/client/petstore/python/docs/components/schema/zebra.md @@ -1,5 +1,5 @@ # Zebra -petstore_api.components.schema.zebra +openapi_client.components.schema.zebra ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md index f11daf9fe69..e5feae7c833 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_api_key +openapi_client.components.security_schemes.security_scheme_api_key # SecurityScheme ApiKey ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md index 8a6f218c97a..1358e9b4f85 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_api_key_query +openapi_client.components.security_schemes.security_scheme_api_key_query # SecurityScheme ApiKeyQuery ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md index 335a24ff2ce..c21e0b7558e 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_bearer_test +openapi_client.components.security_schemes.security_scheme_bearer_test # SecurityScheme BearerTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md index 471590e65aa..13f7e6f62ff 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_http_basic_test +openapi_client.components.security_schemes.security_scheme_http_basic_test # SecurityScheme HttpBasicTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md index f1eb69567f1..d72d5db1e96 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_http_signature_test +openapi_client.components.security_schemes.security_scheme_http_signature_test # SecurityScheme HttpSignatureTest ## Description @@ -13,6 +13,6 @@ security_schemes.HTTPSchemeType.SIGNATURE ## signing_info Type | Notes ---- | ------ -petstore_api.signing.HttpSigningConfiguration | Set by the developer +openapi_client.signing.HttpSigningConfiguration | Set by the developer [[Back to top]](#top) [[Back to Component Security Schemes]](../../../README.md#Component-SecuritySchemes) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md index dbe8f7d5d6e..463526a3a63 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_open_id_connect_test +openapi_client.components.security_schemes.security_scheme_open_id_connect_test # SecurityScheme OpenIdConnectTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md index 3f97e58236b..8b731ba942e 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md @@ -1,4 +1,4 @@ -petstore_api.components.security_schemes.security_scheme_petstore_auth +openapi_client.components.security_schemes.security_scheme_petstore_auth # SecurityScheme PetstoreAuth ## Description diff --git a/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md b/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md index 58a747d1167..7a46fd326e8 100644 --- a/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md +++ b/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md @@ -1,4 +1,4 @@ -petstore_api.paths.another_fake_dummy.operation +openapi_client.paths.another_fake_dummy.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -86,14 +86,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import another_fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import another_fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = another_fake_api.AnotherFakeApi(api_client) @@ -107,7 +107,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling AnotherFakeApi->call_123_test__special_tags: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md index a1024c62215..7af09ca5a83 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.common_param_sub_dir.operation +openapi_client.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -132,15 +132,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.common_param_sub_dir.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.common_param_sub_dir.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -156,7 +156,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->delete_common_param: %s\n" % e) # example passing only optional values @@ -172,7 +172,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->delete_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md index c7693de1576..fdd1a8dd91e 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.common_param_sub_dir.operation +openapi_client.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -131,15 +131,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.common_param_sub_dir.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.common_param_sub_dir.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -155,7 +155,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->get_common_param: %s\n" % e) # example passing only optional values @@ -171,7 +171,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->get_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md index 0aca46efb67..b38f12f2a79 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.common_param_sub_dir.operation +openapi_client.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -131,15 +131,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.common_param_sub_dir.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.common_param_sub_dir.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -155,7 +155,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->post_common_param: %s\n" % e) # example passing only optional values @@ -171,7 +171,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->post_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/delete.md b/samples/client/petstore/python/docs/paths/fake/delete.md index c0fbc575c0e..995fb60cbb1 100644 --- a/samples/client/petstore/python/docs/paths/fake/delete.md +++ b/samples/client/petstore/python/docs/paths/fake/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake.operation +openapi_client.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -161,13 +161,13 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake.delete import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_bearer_test +from openapi_client.components.security_schemes import security_scheme_bearer_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -180,7 +180,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -199,7 +199,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->group_parameters: %s\n" % e) # example passing only optional values @@ -220,7 +220,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->group_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/get.md b/samples/client/petstore/python/docs/paths/fake/get.md index dd57e17108f..38cb891bb41 100644 --- a/samples/client/petstore/python/docs/paths/fake/get.md +++ b/samples/client/petstore/python/docs/paths/fake/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake.operation +openapi_client.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -281,15 +281,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -322,7 +322,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->enum_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/patch.md b/samples/client/petstore/python/docs/paths/fake/patch.md index 5506e8fa02a..9f13dbbb3b8 100644 --- a/samples/client/petstore/python/docs/paths/fake/patch.md +++ b/samples/client/petstore/python/docs/paths/fake/patch.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake.operation +openapi_client.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -86,14 +86,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -107,7 +107,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->client_model: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/post.md b/samples/client/petstore/python/docs/paths/fake/post.md index 27d2e95afdd..4e8a3aacffe 100644 --- a/samples/client/petstore/python/docs/paths/fake/post.md +++ b/samples/client/petstore/python/docs/paths/fake/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake.operation +openapi_client.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -89,6 +89,7 @@ Keyword Argument | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, io.BufferedReader, schemas.Unset | None | [optional] **date** | str, datetime.date, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD @@ -107,6 +108,7 @@ Property | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, schemas.Unset | None | [optional] **date** | str, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD @@ -118,7 +120,6 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [SchemaDictInput](#requestbody-content-applicationxwwwformurlencoded-schema-schemadictinput), [SchemaDict](#requestbody-content-applicationxwwwformurlencoded-schema-schemadict) | [SchemaDict](#requestbody-content-applicationxwwwformurlencoded-schema-schemadict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties ## Return Types @@ -172,12 +173,12 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_http_basic_test +from openapi_client.components.security_schemes import security_scheme_http_basic_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -191,7 +192,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -201,7 +202,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "int32": 20, "int64": 1, "number": 32.1, - "_float": 3.14, + "float": 3.14, "double": 67.8, "string": "A", "pattern_without_delimiter": "AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", @@ -218,7 +219,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md b/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md index a23bacb0924..cce61f789c8 100644 --- a/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md +++ b/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md @@ -45,6 +45,7 @@ Keyword Argument | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, io.BufferedReader, schemas.Unset | None | [optional] **date** | str, datetime.date, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD @@ -63,6 +64,7 @@ Property | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer +**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, schemas.Unset | None | [optional] **date** | str, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD @@ -74,5 +76,4 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [SchemaDictInput](#schemadictinput), [SchemaDict](#schemadict) | [SchemaDict](#schemadict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties diff --git a/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md b/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md index a9173252b9e..4c1f492c0a4 100644 --- a/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md +++ b/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_additional_properties_with_array_of_enums.operation +openapi_client.paths.fake_additional_properties_with_array_of_enums.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->additional_properties_with_array_of_enums: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md b/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md index 81cbf0dfba7..b0f75525171 100644 --- a/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md +++ b/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_body_with_file_schema.operation +openapi_client.paths.fake_body_with_file_schema.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -73,14 +73,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -98,7 +98,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->body_with_file_schema: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md b/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md index 3af6d64856e..de9f38e7566 100644 --- a/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md +++ b/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_body_with_query_params.operation +openapi_client.paths.fake_body_with_query_params.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -111,15 +111,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_body_with_query_params.put import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_body_with_query_params.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -148,7 +148,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->body_with_query_params: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md b/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md index 6a4fa34f5a5..09ad7194542 100644 --- a/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md +++ b/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_case_sensitive_params.operation +openapi_client.paths.fake_case_sensitive_params.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -99,15 +99,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_case_sensitive_params.put import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_case_sensitive_params.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -122,7 +122,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->case_sensitive_params: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md b/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md index e6099219fd4..b397fc1cb59 100644 --- a/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md +++ b/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_classname_test.operation +openapi_client.paths.fake_classname_test.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,12 +102,12 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_classname_tags123_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_classname_tags123_api from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key_query +from openapi_client.components.security_schemes import security_scheme_api_key_query # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -120,7 +120,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_classname_tags123_api.FakeClassnameTags123Api(api_client) @@ -134,7 +134,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeClassnameTags123Api->classname: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md b/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md index aacac0882ae..3217eb55cc0 100644 --- a/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md +++ b/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_delete_coffee_id.operation +openapi_client.paths.fake_delete_coffee_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -107,15 +107,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_delete_coffee_id.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_delete_coffee_id.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -129,7 +129,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->delete_coffee: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_health/get.md b/samples/client/petstore/python/docs/paths/fake_health/get.md index 4213bf03309..04da62ebc7c 100644 --- a/samples/client/petstore/python/docs/paths/fake_health/get.md +++ b/samples/client/petstore/python/docs/paths/fake_health/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_health.operation +openapi_client.paths.fake_health.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -99,7 +99,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # Health check endpoint api_response = api_instance.fake_health_get() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->fake_health_get: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md b/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md index dbc15b5bb98..b5e4cffd384 100644 --- a/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md +++ b/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_inline_additional_properties.operation +openapi_client.paths.fake_inline_additional_properties.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -104,14 +104,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -125,7 +125,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->inline_additional_properties: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md b/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md index 3373d45a7f6..5269480a57c 100644 --- a/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md +++ b/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_inline_composition.operation +openapi_client.paths.fake_inline_composition.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -314,15 +314,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_inline_composition.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_inline_composition.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -341,7 +341,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->inline_composition: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md b/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md index 6b0410e2a85..357143da885 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md +++ b/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_json_form_data.operation +openapi_client.paths.fake_json_form_data.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -108,14 +108,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -130,7 +130,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->json_form_data: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md b/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md index c1fa8d5b041..6c4b4b3e6c7 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md +++ b/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_json_patch.operation +openapi_client.paths.fake_json_patch.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -74,14 +74,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -95,7 +95,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->json_patch: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md b/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md index a6f98a60380..73dbe2e1771 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md +++ b/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_json_with_charset.operation +openapi_client.paths.fake_json_with_charset.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,14 +102,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -121,7 +121,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->json_with_charset: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md b/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md index abaabd2b682..ceb77afc7c3 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_multiple_request_body_content_types.operation +openapi_client.paths.fake_multiple_request_body_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -178,14 +178,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -199,7 +199,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->multiple_request_body_content_types: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md b/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md index a9556cc4a5e..2d7d575777a 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_multiple_response_bodies.operation +openapi_client.paths.fake_multiple_response_bodies.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -112,14 +112,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # multiple responses have response bodies api_response = api_instance.multiple_response_bodies() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->multiple_response_bodies: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md b/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md index 118e0fa7d39..d621181d4e7 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_multiple_securities.operation +openapi_client.paths.fake_multiple_securities.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -101,15 +101,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint # security_index 1 -from petstore_api.components.security_schemes import security_scheme_http_basic_test -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_http_basic_test +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 2 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 # no auth required for this security_index @@ -145,7 +145,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -154,7 +154,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # multiple security requirements api_response = api_instance.multiple_securities() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->multiple_securities: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md b/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md index 68301cf4b67..2d0f70d6b0d 100644 --- a/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md +++ b/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_obj_in_query.operation +openapi_client.paths.fake_obj_in_query.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -93,15 +93,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_obj_in_query.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_obj_in_query.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -117,7 +117,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->object_in_query: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md index 83475935410..69eab7e863b 100644 --- a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md +++ b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_parameter_collisions1_abab_self_ab.operation +openapi_client.paths.fake_parameter_collisions1_abab_self_ab.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -86,18 +86,20 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [QueryParametersDictInput](#queryparameters-queryparametersdictinput), [QueryParametersDict](#queryparameters-queryparametersdict) | [QueryParametersDict](#queryparameters-queryparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], ### header_params ### HeaderParameters ``` @@ -129,17 +131,19 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [HeaderParametersDictInput](#headerparameters-headerparametersdictinput), [HeaderParametersDict](#headerparameters-headerparametersdict) | [HeaderParametersDict](#headerparameters-headerparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], ### path_params ### PathParameters ``` @@ -173,18 +177,20 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **Ab** | str | | **aB** | str | | +**self** | str | | ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **Ab** | str | | **aB** | str | | +**self** | str | | ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [PathParametersDictInput](#pathparameters-pathparametersdictinput), [PathParametersDict](#pathparameters-pathparametersdict) | [PathParametersDict](#pathparameters-pathparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], ### cookie_params ### CookieParameters ``` @@ -218,18 +224,20 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] +**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [CookieParametersDictInput](#cookieparameters-cookieparametersdictinput), [CookieParametersDict](#cookieparameters-cookieparametersdict) | [CookieParametersDict](#cookieparameters-cookieparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], ## Return Types @@ -283,15 +291,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_parameter_collisions1_abab_self_ab.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -318,7 +326,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: cookie_params=cookie_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) # example passing only optional values @@ -360,7 +368,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md b/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md index 0b1746b70e1..50ad0bd5bc1 100644 --- a/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md +++ b/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_pem_content_type.operation +openapi_client.paths.fake_pem_content_type.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,14 +102,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -121,7 +121,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->pem_content_type: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md b/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md index 4baff46fd05..83b8b44669d 100644 --- a/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_pet_id_upload_image_with_required_file.operation +openapi_client.paths.fake_pet_id_upload_image_with_required_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -192,13 +192,13 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.fake_pet_id_upload_image_with_required_file.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -210,7 +210,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -224,7 +224,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) # example passing only optional values @@ -242,7 +242,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md b/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md index 70f104cd9bb..3195ce22429 100644 --- a/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md +++ b/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_query_param_with_json_content_type.operation +openapi_client.paths.fake_query_param_with_json_content_type.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -122,15 +122,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_query_param_with_json_content_type.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_query_param_with_json_content_type.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -144,7 +144,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->query_param_with_json_content_type: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_redirection/get.md b/samples/client/petstore/python/docs/paths/fake_redirection/get.md index 418b86edcca..2d634de303a 100644 --- a/samples/client/petstore/python/docs/paths/fake_redirection/get.md +++ b/samples/client/petstore/python/docs/paths/fake_redirection/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_redirection.operation +openapi_client.paths.fake_redirection.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -79,14 +79,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -95,7 +95,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # operation with redirection responses api_response = api_instance.redirection() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->redirection: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md b/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md index 8f35466f152..16a3968a4f0 100644 --- a/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md +++ b/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_ref_obj_in_query.operation +openapi_client.paths.fake_ref_obj_in_query.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -93,15 +93,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_ref_obj_in_query.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_ref_obj_in_query.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -117,7 +117,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->ref_object_in_query: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md b/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md index f1d5536aa60..0231bd37c88 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_array_of_enums.operation +openapi_client.paths.fake_refs_array_of_enums.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -126,7 +126,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->array_of_enums: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md b/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md index c5e0196a03e..f619737f97d 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_arraymodel.operation +openapi_client.paths.fake_refs_arraymodel.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -125,7 +125,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->array_model: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md b/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md index 033481de2b7..efe780ed7d0 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_boolean.operation +openapi_client.paths.fake_refs_boolean.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->boolean: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md b/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md index e045047eb47..4fa8083d6da 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_composed_one_of_number_with_validations.operation +openapi_client.paths.fake_refs_composed_one_of_number_with_validations.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->composed_one_of_different_types: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md b/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md index d50ecd9f64d..bbca3049ad5 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_enum.operation +openapi_client.paths.fake_refs_enum.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->string_enum: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md b/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md index 45acd604f69..f5c80ed9a29 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_mammal.operation +openapi_client.paths.fake_refs_mammal.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -127,7 +127,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->mammal: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_number/post.md b/samples/client/petstore/python/docs/paths/fake_refs_number/post.md index 0862ed4ebc5..554002a0f5b 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_number/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_number/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_number.operation +openapi_client.paths.fake_refs_number.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->number_with_validations: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md b/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md index 1b5c443ba6e..4b134f2ebe4 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_object_model_with_ref_props.operation +openapi_client.paths.fake_refs_object_model_with_ref_props.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -127,7 +127,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_string/post.md b/samples/client/petstore/python/docs/paths/fake_refs_string/post.md index e45328433c3..2b124e8d04f 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_string/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_string/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_refs_string.operation +openapi_client.paths.fake_refs_string.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->string: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md b/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md index 6801c62550f..e0de46dfecd 100644 --- a/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md +++ b/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_response_without_schema.operation +openapi_client.paths.fake_response_without_schema.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -73,14 +73,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -89,7 +89,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # receives a response without schema api_response = api_instance.response_without_schema() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->response_without_schema: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md b/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md index 6b544e4e5e9..b0891526bc4 100644 --- a/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md +++ b/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_test_query_paramters.operation +openapi_client.paths.fake_test_query_paramters.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -108,15 +108,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api -from petstore_api.paths.fake_test_query_paramters.put import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api +from openapi_client.paths.fake_test_query_paramters.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -144,7 +144,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->query_parameter_collection_format: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md b/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md index 81e91e16c35..a0934e6d328 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_upload_download_file.operation +openapi_client.paths.fake_upload_download_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -109,14 +109,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->upload_download_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_file/post.md b/samples/client/petstore/python/docs/paths/fake_upload_file/post.md index 0642b8d2948..8a5373f97c2 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_file/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_upload_file.operation +openapi_client.paths.fake_upload_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -137,14 +137,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -159,7 +159,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->upload_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_files/post.md b/samples/client/petstore/python/docs/paths/fake_upload_files/post.md index d0cb6963199..8d76cec80f2 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_files/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_files/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_upload_files.operation +openapi_client.paths.fake_upload_files.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -188,14 +188,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -211,7 +211,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->upload_files: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md b/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md index 5bd370c211b..574f93596de 100644 --- a/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md +++ b/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.fake_wild_card_responses.operation +openapi_client.paths.fake_wild_card_responses.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -228,14 +228,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -244,7 +244,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # operation with wildcard responses api_response = api_instance.wild_card_responses() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->wild_card_responses: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/foo/get.md b/samples/client/petstore/python/docs/paths/foo/get.md index 970b8c2d7af..452fb7b8350 100644 --- a/samples/client/petstore/python/docs/paths/foo/get.md +++ b/samples/client/petstore/python/docs/paths/foo/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.foo.operation +openapi_client.paths.foo.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -127,14 +127,14 @@ Key | Type | Description | Notes ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import default_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -142,7 +142,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: try: api_response = api_instance.foo_get() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling DefaultApi->foo_get: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet/post.md b/samples/client/petstore/python/docs/paths/pet/post.md index d5aa1b2489c..b0c3209cfdb 100644 --- a/samples/client/petstore/python/docs/paths/pet/post.md +++ b/samples/client/petstore/python/docs/paths/pet/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet.operation +openapi_client.paths.pet.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -88,16 +88,16 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from petstore_api.components.security_schemes import security_scheme_http_signature_test +from openapi_client.components.security_schemes import security_scheme_http_signature_test # security_index 2 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -110,18 +110,18 @@ security_scheme_info: api_configuration.SecuritySchemeInfo = { # security_scheme_info for security_index 1 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=petstore_api.signing.HttpSigningConfiguration( + signing_info=openapi_client.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=petstore_api.signing.SCHEME_HS2019, - signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=openapi_client.signing.SCHEME_HS2019, + signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, + openapi_client.signing.HEADER_REQUEST_TARGET, + openapi_client.signing.HEADER_CREATED, + openapi_client.signing.HEADER_EXPIRES, + openapi_client.signing.HEADER_HOST, + openapi_client.signing.HEADER_DATE, + openapi_client.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -149,7 +149,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -178,7 +178,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->add_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet/put.md b/samples/client/petstore/python/docs/paths/pet/put.md index 05fc84e576b..cfc7e81031d 100644 --- a/samples/client/petstore/python/docs/paths/pet/put.md +++ b/samples/client/petstore/python/docs/paths/pet/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet.operation +openapi_client.paths.pet.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -112,30 +112,30 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_http_signature_test +from openapi_client.components.security_schemes import security_scheme_http_signature_test # security_index 1 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=petstore_api.signing.HttpSigningConfiguration( + signing_info=openapi_client.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=petstore_api.signing.SCHEME_HS2019, - signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=openapi_client.signing.SCHEME_HS2019, + signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, + openapi_client.signing.HEADER_REQUEST_TARGET, + openapi_client.signing.HEADER_CREATED, + openapi_client.signing.HEADER_EXPIRES, + openapi_client.signing.HEADER_HOST, + openapi_client.signing.HEADER_DATE, + openapi_client.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -162,7 +162,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -191,7 +191,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->update_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md b/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md index d7dee242c11..5b3de522c58 100644 --- a/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md +++ b/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_find_by_status.operation +openapi_client.paths.pet_find_by_status.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -140,17 +140,17 @@ Key | Type | Description | Notes ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_find_by_status.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_find_by_status.get import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from petstore_api.components.security_schemes import security_scheme_http_signature_test +from openapi_client.components.security_schemes import security_scheme_http_signature_test # security_index 2 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -163,18 +163,18 @@ security_scheme_info: api_configuration.SecuritySchemeInfo = { # security_scheme_info for security_index 1 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=petstore_api.signing.HttpSigningConfiguration( + signing_info=openapi_client.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=petstore_api.signing.SCHEME_HS2019, - signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=openapi_client.signing.SCHEME_HS2019, + signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, + openapi_client.signing.HEADER_REQUEST_TARGET, + openapi_client.signing.HEADER_CREATED, + openapi_client.signing.HEADER_EXPIRES, + openapi_client.signing.HEADER_HOST, + openapi_client.signing.HEADER_DATE, + openapi_client.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -202,7 +202,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -218,7 +218,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md b/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md index 5d8f11595d3..3113ebd8f80 100644 --- a/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md +++ b/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_find_by_tags.operation +openapi_client.paths.pet_find_by_tags.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -124,31 +124,31 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_find_by_tags.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_find_by_tags.get import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_http_signature_test +from openapi_client.components.security_schemes import security_scheme_http_signature_test # security_index 1 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=petstore_api.signing.HttpSigningConfiguration( + signing_info=openapi_client.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=petstore_api.signing.SCHEME_HS2019, - signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=openapi_client.signing.SCHEME_HS2019, + signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, + openapi_client.signing.HEADER_REQUEST_TARGET, + openapi_client.signing.HEADER_CREATED, + openapi_client.signing.HEADER_EXPIRES, + openapi_client.signing.HEADER_HOST, + openapi_client.signing.HEADER_DATE, + openapi_client.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -175,7 +175,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -191,7 +191,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md b/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md index 6f1117bff1f..f1d5828d11a 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_pet_id.operation +openapi_client.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -162,15 +162,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_pet_id.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_pet_id.delete import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -196,7 +196,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -213,7 +213,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->delete_pet: %s\n" % e) # example passing only optional values @@ -230,7 +230,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/get.md b/samples/client/petstore/python/docs/paths/pet_pet_id/get.md index e487d3fcdfc..09abcb08914 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/get.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_pet_id.operation +openapi_client.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -175,13 +175,13 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_pet_id.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_pet_id.get import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -194,7 +194,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -208,7 +208,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/post.md b/samples/client/petstore/python/docs/paths/pet_pet_id/post.md index 2cab9581000..960ff18c115 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/post.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_pet_id.operation +openapi_client.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -176,15 +176,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_pet_id.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_pet_id.post import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_index 1 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -210,7 +210,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -224,7 +224,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) # example passing only optional values @@ -242,7 +242,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md b/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md index e45bac9a88d..6ffcaaa3517 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.pet_pet_id_upload_image.operation +openapi_client.paths.pet_pet_id_upload_image.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -164,13 +164,13 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import pet_api -from petstore_api.paths.pet_pet_id_upload_image.post import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import pet_api +from openapi_client.paths.pet_pet_id_upload_image.post import operation from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_petstore_auth +from openapi_client.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -182,7 +182,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -196,7 +196,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) # example passing only optional values @@ -214,7 +214,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/solidus/get.md b/samples/client/petstore/python/docs/paths/solidus/get.md index 320d4b48f26..2e6ca104561 100644 --- a/samples/client/petstore/python/docs/paths/solidus/get.md +++ b/samples/client/petstore/python/docs/paths/solidus/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.solidus.operation +openapi_client.paths.solidus.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -54,14 +54,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import fake_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -70,7 +70,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # slash route api_response = api_instance.slash_route() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling FakeApi->slash_route: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_inventory/get.md b/samples/client/petstore/python/docs/paths/store_inventory/get.md index 131a61faf2f..97374bd3e77 100644 --- a/samples/client/petstore/python/docs/paths/store_inventory/get.md +++ b/samples/client/petstore/python/docs/paths/store_inventory/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.store_inventory.operation +openapi_client.paths.store_inventory.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -72,12 +72,12 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import store_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import store_api from pprint import pprint # security_index 0 -from petstore_api.components.security_schemes import security_scheme_api_key +from openapi_client.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -90,7 +90,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -99,7 +99,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # Returns pet inventories by status api_response = api_instance.get_inventory() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order/post.md b/samples/client/petstore/python/docs/paths/store_order/post.md index 10f72272cbf..10845a1a884 100644 --- a/samples/client/petstore/python/docs/paths/store_order/post.md +++ b/samples/client/petstore/python/docs/paths/store_order/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.store_order.operation +openapi_client.paths.store_order.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -129,14 +129,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import store_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import store_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -155,7 +155,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling StoreApi->place_order: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md b/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md index b6e7e8d744f..3789001c19e 100644 --- a/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md +++ b/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.store_order_order_id.operation +openapi_client.paths.store_order_order_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -119,15 +119,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import store_api -from petstore_api.paths.store_order_order_id.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import store_api +from openapi_client.paths.store_order_order_id.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -141,7 +141,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order_order_id/get.md b/samples/client/petstore/python/docs/paths/store_order_order_id/get.md index e4340f5e357..969c6600b45 100644 --- a/samples/client/petstore/python/docs/paths/store_order_order_id/get.md +++ b/samples/client/petstore/python/docs/paths/store_order_order_id/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.store_order_order_id.operation +openapi_client.paths.store_order_order_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -159,15 +159,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import store_api -from petstore_api.paths.store_order_order_id.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import store_api +from openapi_client.paths.store_order_order_id.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -181,7 +181,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user/post.md b/samples/client/petstore/python/docs/paths/user/post.md index 26bafa37cbb..47770a31475 100644 --- a/samples/client/petstore/python/docs/paths/user/post.md +++ b/samples/client/petstore/python/docs/paths/user/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.user.operation +openapi_client.paths.user.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -89,14 +89,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -122,7 +122,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->create_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_create_with_array/post.md b/samples/client/petstore/python/docs/paths/user_create_with_array/post.md index df31ceecb84..49513e2873d 100644 --- a/samples/client/petstore/python/docs/paths/user_create_with_array/post.md +++ b/samples/client/petstore/python/docs/paths/user_create_with_array/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_create_with_array.operation +openapi_client.paths.user_create_with_array.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -69,14 +69,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -104,7 +104,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_create_with_list/post.md b/samples/client/petstore/python/docs/paths/user_create_with_list/post.md index 17fa406f72d..ec374a60f93 100644 --- a/samples/client/petstore/python/docs/paths/user_create_with_list/post.md +++ b/samples/client/petstore/python/docs/paths/user_create_with_list/post.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_create_with_list.operation +openapi_client.paths.user_create_with_list.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -69,14 +69,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -104,7 +104,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_login/get.md b/samples/client/petstore/python/docs/paths/user_login/get.md index e16d0929cd8..7f818ef2460 100644 --- a/samples/client/petstore/python/docs/paths/user_login/get.md +++ b/samples/client/petstore/python/docs/paths/user_login/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_login.operation +openapi_client.paths.user_login.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -230,15 +230,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api -from petstore_api.paths.user_login.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api +from openapi_client.paths.user_login.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -253,7 +253,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->login_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_logout/get.md b/samples/client/petstore/python/docs/paths/user_logout/get.md index 01679b46385..cd9d2ab6e1b 100644 --- a/samples/client/petstore/python/docs/paths/user_logout/get.md +++ b/samples/client/petstore/python/docs/paths/user_logout/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_logout.operation +openapi_client.paths.user_logout.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -55,14 +55,14 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -71,7 +71,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: # Logs out current logged in user session api_response = api_instance.logout_user() pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->logout_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/delete.md b/samples/client/petstore/python/docs/paths/user_username/delete.md index a0cb520b2d7..92a2f71938d 100644 --- a/samples/client/petstore/python/docs/paths/user_username/delete.md +++ b/samples/client/petstore/python/docs/paths/user_username/delete.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_username.operation +openapi_client.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -107,15 +107,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api -from petstore_api.paths.user_username.delete import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api +from openapi_client.paths.user_username.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -129,7 +129,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->delete_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/get.md b/samples/client/petstore/python/docs/paths/user_username/get.md index 475fdba6faa..87490fc2659 100644 --- a/samples/client/petstore/python/docs/paths/user_username/get.md +++ b/samples/client/petstore/python/docs/paths/user_username/get.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_username.operation +openapi_client.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -159,15 +159,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api -from petstore_api.paths.user_username.get import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api +from openapi_client.paths.user_username.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -181,7 +181,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/put.md b/samples/client/petstore/python/docs/paths/user_username/put.md index dfa103c39bb..4ab78840586 100644 --- a/samples/client/petstore/python/docs/paths/user_username/put.md +++ b/samples/client/petstore/python/docs/paths/user_username/put.md @@ -1,4 +1,4 @@ -petstore_api.paths.user_username.operation +openapi_client.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -141,15 +141,15 @@ server_index | Class | Description ## Code Sample ```python -import petstore_api -from petstore_api.configurations import api_configuration -from petstore_api.apis.tags import user_api -from petstore_api.paths.user_username.put import operation +import openapi_client +from openapi_client.configurations import api_configuration +from openapi_client.apis.tags import user_api +from openapi_client.paths.user_username.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with petstore_api.ApiClient(used_configuration) as api_client: +with openapi_client.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -179,7 +179,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except petstore_api.ApiException as e: + except openapi_client.ApiException as e: print("Exception when calling UserApi->update_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/servers/server_0.md b/samples/client/petstore/python/docs/servers/server_0.md index bf27bacb919..daf6dc3f0bb 100644 --- a/samples/client/petstore/python/docs/servers/server_0.md +++ b/samples/client/petstore/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -petstore_api.servers.server_0 +openapi_client.servers.server_0 # Server Server0 ## Description diff --git a/samples/client/petstore/python/docs/servers/server_1.md b/samples/client/petstore/python/docs/servers/server_1.md index 4fe13818cd6..9f094dec36e 100644 --- a/samples/client/petstore/python/docs/servers/server_1.md +++ b/samples/client/petstore/python/docs/servers/server_1.md @@ -1,4 +1,4 @@ -petstore_api.servers.server_1 +openapi_client.servers.server_1 # Server Server1 ## Description diff --git a/samples/client/petstore/python/docs/servers/server_2.md b/samples/client/petstore/python/docs/servers/server_2.md index 25c19fc0f6e..8fd1fbd31dd 100644 --- a/samples/client/petstore/python/docs/servers/server_2.md +++ b/samples/client/petstore/python/docs/servers/server_2.md @@ -1,4 +1,4 @@ -petstore_api.servers.server_2 +openapi_client.servers.server_2 # Server Server2 ## Description diff --git a/samples/client/petstore/python/pyproject.toml b/samples/client/petstore/python/pyproject.toml index 8d08bccb62b..4142c3541d9 100644 --- a/samples/client/petstore/python/pyproject.toml +++ b/samples/client/petstore/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "petstore_api" = ["py.typed"] [project] -name = "petstore-api" +name = "openapi-client" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/petstore/python/src/openapi_client/__init__.py b/samples/client/petstore/python/src/openapi_client/__init__.py new file mode 100644 index 00000000000..687c4c538e1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/__init__.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +# flake8: noqa + +""" + OpenAPI Petstore + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +__version__ = "1.0.0" + +# import ApiClient +from petstore_api.api_client import ApiClient + +# import Configuration +from petstore_api.configurations.api_configuration import ApiConfiguration +from petstore_api.signing import HttpSigningConfiguration + +# import exceptions +from petstore_api.exceptions import OpenApiException +from petstore_api.exceptions import ApiAttributeError +from petstore_api.exceptions import ApiTypeError +from petstore_api.exceptions import ApiValueError +from petstore_api.exceptions import ApiKeyError +from petstore_api.exceptions import ApiException + +__import__('sys').setrecursionlimit(1234) diff --git a/samples/client/petstore/python/src/openapi_client/api_client.py b/samples/client/petstore/python/src/openapi_client/api_client.py new file mode 100644 index 00000000000..6b21b4f48e4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/api_client.py @@ -0,0 +1,1429 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import datetime +import dataclasses +import decimal +import enum +import email +import json +import os +import io +import atexit +from multiprocessing import pool +import re +import tempfile +import typing +import typing_extensions +from urllib import parse +import urllib3 +from urllib3 import _collections, fields + + +from petstore_api import exceptions, rest, schemas, security_schemes, api_response +from petstore_api.configurations import api_configuration, schema_configuration as schema_configuration_ + + +class JSONEncoder(json.JSONEncoder): + compact_separators = (',', ':') + + def default(self, obj: typing.Any): + if isinstance(obj, str): + return str(obj) + elif isinstance(obj, float): + return obj + elif isinstance(obj, bool): + # must be before int check + return obj + elif isinstance(obj, int): + return obj + elif obj is None: + return None + elif isinstance(obj, (dict, schemas.immutabledict)): + return {key: self.default(val) for key, val in obj.items()} + elif isinstance(obj, (list, tuple)): + return [self.default(item) for item in obj] + raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + +class ParameterInType(enum.Enum): + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' + + +class ParameterStyle(enum.Enum): + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' + + +@dataclasses.dataclass +class PrefixSeparatorIterator: + # A class to store prefixes and separators for rfc6570 expansions + prefix: str + separator: str + first: bool = True + item_separator: str = dataclasses.field(init=False) + + def __post_init__(self): + self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' + + def __iter__(self): + return self + + def __next__(self): + if self.first: + self.first = False + return self.prefix + return self.separator + + +class ParameterSerializerBase: + @staticmethod + def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): + """ + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + """ + if type(in_data) in {str, float, int}: + if percent_encode: + return parse.quote(str(in_data)) + return str(in_data) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, list) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + elif isinstance(in_data, dict) and not in_data: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return None + raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + + @staticmethod + def _to_dict(name: str, value: str): + return {name: value} + + @classmethod + def __ref6570_str_float_int_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_value = cls.__ref6570_item_value(in_data, percent_encode) + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals = '=' if named_parameter_expansion else '' + return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value + + @classmethod + def __ref6570_list_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] + item_values = [v for v in item_values if v is not None] + if not item_values: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [var_name_piece + value_pair_equals + val for val in item_values] + ) + + @classmethod + def __ref6570_dict_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator, + var_name_piece: str, + named_parameter_expansion: bool + ) -> str: + in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} + in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} + if not in_data_transformed: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + value_pair_equals = '=' if named_parameter_expansion else '' + if not explode: + return ( + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() + ) + ) + # exploded + return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( + [key + '=' + val for key, val in in_data_transformed.items()] + ) + + @classmethod + def _ref6570_expansion( + cls, + variable_name: str, + in_data: typing.Any, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: PrefixSeparatorIterator + ) -> str: + """ + Separator is for separate variables like dict with explode true, not for array item separation + """ + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' + if type(in_data) in {str, float, int}: + return cls.__ref6570_str_float_int_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif in_data is None: + # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return "" + elif isinstance(in_data, list): + return cls.__ref6570_list_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + elif isinstance(in_data, dict): + return cls.__ref6570_dict_expansion( + variable_name, + in_data, + explode, + percent_encode, + prefix_separator_iterator, + var_name_piece, + named_parameter_expansion + ) + # bool, bytes, etc + raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + + +class StyleFormSerializer(ParameterSerializerBase): + @classmethod + def _serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + ) -> str: + if prefix_separator_iterator is None: + prefix_separator_iterator = PrefixSeparatorIterator('', '&') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + +class StyleSimpleSerializer(ParameterSerializerBase): + + @classmethod + def _serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + name: str, + explode: bool, + percent_encode: bool + ) -> str: + prefix_separator_iterator = PrefixSeparatorIterator('', ',') + return cls._ref6570_expansion( + variable_name=name, + in_data=in_data, + explode=explode, + percent_encode=percent_encode, + prefix_separator_iterator=prefix_separator_iterator + ) + + @classmethod + def _deserialize_simple( + cls, + in_data: str, + name: str, + explode: bool, + percent_encode: bool + ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: + raise NotImplementedError( + "Deserialization of style=simple has not yet been added. " + "If you need this how about you submit a PR adding it?" + ) + + +class JSONDetector: + """ + Works for: + application/json + application/json; charset=UTF-8 + application/json-patch+json + application/geo+json + """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") + + @classmethod + def _content_type_is_json(cls, content_type: str) -> bool: + if cls.__json_content_type_pattern.match(content_type): + return True + return False + + +class Encoding: + content_type: str + headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None + style: typing.Optional[ParameterStyle] = None + explode: bool = False + allow_reserved: bool = False + + +class MediaType: + """ + Used to store request and response body schema information + encoding: + A map between a property name and its encoding information. + The key, being the property name, MUST exist in the schema as a property. + The encoding object SHALL only apply to requestBody objects when the media type is + multipart or application/x-www-form-urlencoded. + """ + schema: typing.Optional[typing.Type[schemas.Schema]] = None + encoding: typing.Optional[typing.Dict[str, Encoding]] = None + + +class ParameterBase(JSONDetector): + in_type: ParameterInType + required: bool + style: typing.Optional[ParameterStyle] + explode: typing.Optional[bool] + allow_reserved: typing.Optional[bool] + schema: typing.Optional[typing.Type[schemas.Schema]] + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] + + _json_encoder = JSONEncoder() + + def __init_subclass__(cls, **kwargs): + if cls.explode is None: + if cls.style is ParameterStyle.FORM: + cls.explode = True + else: + cls.explode = False + + @classmethod + def _serialize_json( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + eliminate_whitespace: bool = False + ) -> str: + if eliminate_whitespace: + return json.dumps(in_data, separators=cls._json_encoder.compact_separators) + return json.dumps(in_data) + +_SERIALIZE_TYPES = typing.Union[ + int, + float, + str, + datetime.date, + datetime.datetime, + None, + bool, + list, + tuple, + dict, + schemas.immutabledict +] + +_JSON_TYPES = typing.Union[ + int, + float, + str, + None, + bool, + typing.Tuple['_JSON_TYPES', ...], + schemas.immutabledict[str, '_JSON_TYPES'], +] + +@dataclasses.dataclass +class PathParameter(ParameterBase, StyleSimpleSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.PATH + style: ParameterStyle = ParameterStyle.SIMPLE + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_label( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_matrix( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list] + ) -> typing.Dict[str, str]: + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=cls.explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_simple( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + ) -> typing.Dict[str, str]: + value = cls._serialize_simple( + in_data=in_data, + name=cls.name, + explode=cls.explode, + percent_encode=True + ) + return cls._to_dict(cls.name, value) + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> path + path: + returns path_params: dict + label -> path + returns path_params + matrix -> path + returns path_params + """ + if cls.style: + if cls.style is ParameterStyle.SIMPLE: + return cls.__serialize_simple(cast_in_data) + elif cls.style is ParameterStyle.LABEL: + return cls.__serialize_label(cast_in_data) + elif cls.style is ParameterStyle.MATRIX: + return cls.__serialize_matrix(cast_in_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class QueryParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + in_type: ParameterInType = ParameterInType.QUERY + style: ParameterStyle = ParameterStyle.FORM + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def __serialize_space_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_pipe_delimited( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._ref6570_expansion( + variable_name=cls.name, + in_data=in_data, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def __serialize_form( + cls, + in_data: typing.Union[None, int, float, str, bool, dict, list], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + explode: bool + ) -> typing.Dict[str, str]: + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + value = cls._serialize_form( + in_data, + name=cls.name, + explode=explode, + percent_encode=True, + prefix_separator_iterator=prefix_separator_iterator + ) + return cls._to_dict(cls.name, value) + + @classmethod + def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: + if cls.style is ParameterStyle.FORM: + return PrefixSeparatorIterator('?', '&') + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return PrefixSeparatorIterator('', '%20') + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return PrefixSeparatorIterator('', '|') + raise ValueError(f'No iterator possible for style={cls.style}') + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> query + query: + - GET/HEAD/DELETE: could use fields + - PUT/POST: must use urlencode to send parameters + returns fields: tuple + spaceDelimited -> query + returns fields + pipeDelimited -> query + returns fields + deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 + returns fields + """ + if cls.style: + # TODO update query ones to omit setting values when [] {} or None is input + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + if cls.style is ParameterStyle.FORM: + return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.SPACE_DELIMITED: + return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) + elif cls.style is ParameterStyle.PIPE_DELIMITED: + return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) + if prefix_separator_iterator is None: + prefix_separator_iterator = cls.get_prefix_separator_iterator() + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) + return cls._to_dict( + cls.name, + next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) + ) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +@dataclasses.dataclass +class CookieParameter(ParameterBase, StyleFormSerializer): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.FORM + in_type: ParameterInType = ParameterInType.COOKIE + explode: typing.Optional[bool] = None + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> typing.Dict[str, str]: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + form -> cookie + returns fields: tuple + """ + if cls.style: + """ + TODO add escaping of comma, space, equals + or turn encoding on + """ + explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM + value = cls._serialize_form( + cast_in_data, + explode=explode, + name=cls.name, + percent_encode=False, + prefix_separator_iterator=PrefixSeparatorIterator('', '&') + ) + return cls._to_dict(cls.name, value) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls._to_dict(cls.name, value) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): + style: ParameterStyle = ParameterStyle.SIMPLE + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + explode: bool = False + + @staticmethod + def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: + data = tuple(t for t in in_data if t) + headers = _collections.HTTPHeaderDict() + if not data: + return headers + headers.extend(data) + return headers + + @classmethod + def serialize_with_name( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + if cls.schema: + cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + value = cls._serialize_simple(cast_in_data, name, cls.explode, False) + return cls.__to_headers(((name, value),)) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + assert media_type.schema is not None + cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) + cast_in_data = cls._json_encoder.default(cast_in_data) + if cls._content_type_is_json(content_type): + value = cls._serialize_json(cast_in_data) + return cls.__to_headers(((name, value),)) + else: + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + @classmethod + def deserialize( + cls, + in_data: str, + name: str + ): + if cls.schema: + """ + simple -> header + headers: PoolManager needs a mapping, tuple is close + returns headers: dict + """ + if cls.style: + extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) + return cls.schema.validate_base(extracted_data) + assert cls.content is not None + for content_type, media_type in cls.content.items(): + if cls._content_type_is_json(content_type): + cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) + assert media_type.schema is not None + return media_type.schema.validate_base(cast_in_data) + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') + + +class HeaderParameterWithoutName(__HeaderParameterBase): + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + name: str, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + name, + skip_validation=skip_validation + ) + + +class HeaderParameter(__HeaderParameterBase): + name: str + required: bool = False + style: ParameterStyle = ParameterStyle.SIMPLE + in_type: ParameterInType = ParameterInType.HEADER + explode: bool = False + allow_reserved: typing.Optional[bool] = None + schema: typing.Optional[typing.Type[schemas.Schema]] = None + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + + @classmethod + def serialize( + cls, + in_data: _SERIALIZE_TYPES, + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + return cls.serialize_with_name( + in_data, + cls.name, + skip_validation=skip_validation + ) + +T = typing.TypeVar("T", bound=api_response.ApiResponse) + + +class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): + __filename_content_disposition_pattern = re.compile('filename="(.+?)"') + content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None + headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None + headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None + + @classmethod + @abc.abstractmethod + def get_response(cls, response, headers, body) -> T: ... + + @staticmethod + def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: + # python must be >= 3.9 so we can pass in bytes into json.loads + return json.loads(response.data) + + @staticmethod + def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: + if response_url is None: + return None + url_path = parse.urlparse(response_url).path + if url_path: + path_basename = os.path.basename(url_path) + if path_basename: + _filename, ext = os.path.splitext(path_basename) + if ext: + return path_basename + return None + + @classmethod + def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: + if content_disposition is None: + return None + match = cls.__filename_content_disposition_pattern.search(content_disposition) + if not match: + return None + return match.group(1) + + @classmethod + def __deserialize_application_octet_stream( + cls, response: urllib3.HTTPResponse + ) -> typing.Union[bytes, io.BufferedReader]: + """ + urllib3 use cases: + 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned + 2. when preload_content=False (stream=True) then supports_chunked_reads is True and + a file will be written and returned + """ + if response.supports_chunked_reads(): + file_name = ( + cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or cls.__file_name_from_response_url(response.geturl()) + ) + + if file_name is None: + _fd, path = tempfile.mkstemp() + else: + path = os.path.join(tempfile.gettempdir(), file_name) + + with open(path, 'wb') as write_file: + chunk_size = 1024 + while True: + data = response.read(chunk_size) + if not data: + break + write_file.write(data) + # release_conn is needed for streaming connections only + response.release_conn() + new_file = open(path, 'rb') + return new_file + else: + return response.data + + @staticmethod + def __deserialize_multipart_form_data( + response: urllib3.HTTPResponse + ) -> typing.Dict[str, typing.Any]: + msg = email.message_from_bytes(response.data) + return { + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) + if part.get_content_charset() + else part.get_payload() + for part in msg.get_payload() + } + + @classmethod + def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: + content_type = response.headers.get('content-type') + deserialized_body = schemas.unset + streamed = response.supports_chunked_reads() + + deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset + if cls.headers is not None and cls.headers_schema is not None: + deserialized_headers = {} + for header_name, header_param in cls.headers.items(): + header_value = response.headers.get(header_name) + if header_value is None: + continue + header_value = header_param.deserialize(header_value, header_name) + deserialized_headers[header_name] = header_value + deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) + + if cls.content is not None: + if content_type not in cls.content: + raise exceptions.ApiValueError( + f"Invalid content_type returned. Content_type='{content_type}' was returned " + f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" + ) + body_schema = cls.content[content_type].schema + if body_schema is None: + # some specs do not define response content media type schemas + return cls.get_response( + response=response, + headers=deserialized_headers, + body=schemas.unset + ) + + if cls._content_type_is_json(content_type): + body_data = cls.__deserialize_json(response) + elif content_type == 'application/octet-stream': + body_data = cls.__deserialize_application_octet_stream(response) + elif content_type.startswith('multipart/form-data'): + body_data = cls.__deserialize_multipart_form_data(response) + content_type = 'multipart/form-data' + elif content_type == 'application/x-pem-file': + body_data = response.data.decode() + else: + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + body_schema = schemas.get_class(body_schema) + if body_schema is schemas.BinarySchema: + deserialized_body = body_schema.validate_base(body_data) + else: + deserialized_body = body_schema.validate_base( + body_data, configuration=configuration) + elif streamed: + response.release_conn() + + return cls.get_response( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) + + +@dataclasses.dataclass +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param configuration: api_configuration.ApiConfiguration object for this client + :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client + :param default_headers: any default headers to include when making calls to the API. + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + configuration: api_configuration.ApiConfiguration = dataclasses.field( + default_factory=lambda: api_configuration.ApiConfiguration()) + schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( + default_factory=lambda: schema_configuration_.SchemaConfiguration()) + default_headers: _collections.HTTPHeaderDict = dataclasses.field( + default_factory=lambda: _collections.HTTPHeaderDict()) + pool_threads: int = 1 + user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' + rest_client: rest.RESTClientObject = dataclasses.field(init=False) + + def __post_init__(self): + self._pool = None + self.rest_client = rest.RESTClientObject(self.configuration) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = pool.ThreadPool(self.pool_threads) + return self._pool + + def set_default_header(self, header_name: str, header_value: str): + self.default_headers[header_name] = header_value + + def call_api( + self, + resource_path: str, + method: str, + host: str, + query_params_suffix: typing.Optional[str] = None, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + body: typing.Union[str, bytes, None] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request (synchronous) and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param headers: Header parameters to be + placed in the request header. + :param body: Request body. + :param fields: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data` + :param security_requirement_object: The security requirement object, used to apply auth when making the call + :param async_req: execute request asynchronously + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Also when True, if the openapi spec describes a file download, + the data will be written to a local filesystem file and the schemas.BinarySchema + instance will also inherit from FileSchema and schemas.FileIO + Default is False. + :type stream: bool, optional + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param host: api endpoint host + :return: + the method will return the response directly. + """ + # header parameters + used_headers = _collections.HTTPHeaderDict(self.default_headers) + user_agent_key = 'User-Agent' + if user_agent_key not in used_headers and self.user_agent: + used_headers[user_agent_key] = self.user_agent + + # auth setting + self.update_params_for_auth( + used_headers, + security_requirement_object, + resource_path, + method, + body, + query_params_suffix + ) + + # must happen after auth setting in case user is overriding those + if headers: + used_headers.update(headers) + + # request url + url = host + resource_path + if query_params_suffix: + url += query_params_suffix + + # perform request and return response + response = self.request( + method, + url, + headers=used_headers, + fields=fields, + body=body, + stream=stream, + timeout=timeout, + ) + return response + + def request( + self, + method: str, + url: str, + headers: typing.Optional[_collections.HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, + body: typing.Union[str, bytes, None] = None, + stream: bool = False, + timeout: typing.Union[int, float, typing.Tuple, None] = None, + ) -> urllib3.HTTPResponse: + """Makes the HTTP request using RESTClient.""" + if method == "get": + return self.rest_client.get(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "head": + return self.rest_client.head(url, + stream=stream, + timeout=timeout, + headers=headers) + elif method == "options": + return self.rest_client.options(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "post": + return self.rest_client.post(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "put": + return self.rest_client.put(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "patch": + return self.rest_client.patch(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) + elif method == "delete": + return self.rest_client.delete(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) + else: + raise exceptions.ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def update_params_for_auth( + self, + headers: _collections.HTTPHeaderDict, + security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], + resource_path: str, + method: str, + body: typing.Union[str, bytes, None] = None, + query_params_suffix: typing.Optional[str] = None + ): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param security_requirement_object: the openapi security requirement object + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not security_requirement_object: + # optional auth cause, use no auth + return + for security_scheme_component_name, scope_names in security_requirement_object.items(): + scope_names = typing.cast(typing.Tuple[str, ...], scope_names) + security_scheme_component_name = typing.cast(typing.Literal[ + 'api_key', + 'api_key_query', + 'bearer_test', + 'http_basic_test', + 'http_signature_test', + 'openIdConnect_test', + 'petstore_auth', + ], + security_scheme_component_name + ) + try: + security_scheme_instance = self.configuration.security_scheme_info[security_scheme_component_name] + security_scheme_instance.apply_auth( + headers, + resource_path, + method, + body, + query_params_suffix, + scope_names + ) + except KeyError as ex: + raise ex + +@dataclasses.dataclass +class Api: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) + + @staticmethod + def _get_used_path( + used_path: str, + path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), + path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), + query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + skip_validation: bool = False + ) -> typing.Tuple[str, str]: + used_path_params = {} + if path_params is not None: + for path_parameter in path_parameters: + parameter_data = path_params.get(path_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) + used_path_params.update(serialized_data) + + for k, v in used_path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + query_params_suffix = "" + if query_params is not None: + prefix_separator_iterator = None + for query_parameter in query_parameters: + parameter_data = query_params.get(query_parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = query_parameter.serialize( + parameter_data, + prefix_separator_iterator=prefix_separator_iterator, + skip_validation=skip_validation + ) + for serialized_value in serialized_data.values(): + query_params_suffix += serialized_value + return used_path, query_params_suffix + + @staticmethod + def _get_headers( + header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), + header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, + accept_content_types: typing.Tuple[str, ...] = (), + skip_validation: bool = False + ) -> _collections.HTTPHeaderDict: + headers = _collections.HTTPHeaderDict() + if header_params is not None: + for parameter in header_parameters: + parameter_data = header_params.get(parameter.name, schemas.unset) + if isinstance(parameter_data, schemas.Unset): + continue + assert not isinstance(parameter_data, (bytes, schemas.FileIO)) + serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) + headers.extend(serialized_data) + if accept_content_types: + for accept_content_type in accept_content_types: + headers.add('Accept', accept_content_type) + return headers + + def _get_fields_and_body( + self, + request_body: typing.Type[RequestBody], + body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], + content_type: str, + headers: _collections.HTTPHeaderDict + ): + if request_body.required and body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + + if isinstance(body, schemas.Unset): + return None, None + + serialized_fields = None + serialized_body = None + serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) + headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + serialized_fields = serialized_data['fields'] + elif 'body' in serialized_data: + serialized_body = serialized_data['body'] + return serialized_fields, serialized_body + + @staticmethod + def _verify_response_status(response: api_response.ApiResponse): + if not 200 <= response.response.status <= 399: + raise exceptions.ApiException( + status=response.response.status, + reason=response.response.reason, + api_response=response + ) + + +class SerializedRequestBody(typing.TypedDict, total=False): + body: typing.Union[str, bytes] + fields: typing.Tuple[rest.RequestField, ...] + + +class RequestBody(StyleFormSerializer, JSONDetector): + """ + A request body parameter + content: content_type to MediaType schemas.Schema info + """ + __json_encoder = JSONEncoder() + __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} + content: typing.Dict[str, typing.Type[MediaType]] + required: bool = False + + @classmethod + def __serialize_json( + cls, + in_data: _JSON_TYPES + ) -> SerializedRequestBody: + in_data = cls.__json_encoder.default(in_data) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) + return {'body': json_str} + + @staticmethod + def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: + return {'body': str(in_data)} + + @classmethod + def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: + json_value = cls.__json_encoder.default(value) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) + request_field.make_multipart(content_type='application/json') + return request_field + + @classmethod + def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: + if isinstance(value, str): + request_field = rest.RequestField(name=key, data=str(value)) + request_field.make_multipart(content_type='text/plain') + elif isinstance(value, bytes): + request_field = rest.RequestField(name=key, data=value) + request_field.make_multipart(content_type='application/octet-stream') + elif isinstance(value, schemas.FileIO): + # TODO use content.encoding to limit allowed content types if they are present + urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, urllib3_request_field) + value.close() + else: + request_field = cls.__multipart_json_item(key=key, value=value) + return request_field + + @classmethod + def __serialize_multipart_form_data( + cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] + ) -> SerializedRequestBody: + """ + In a multipart/form-data request body, each schema property, or each element of a schema array property, + takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy + for each property of a multipart/form-data request body can be specified in an associated Encoding Object. + + When passing in multipart types, boundaries MAY be used to separate sections of the content being + transferred – thus, the following default Content-Types are defined for multipart: + + If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain + If the property is complex, or an array of complex values, the default Content-Type is application/json + Question: how is the array of primitives encoded? + If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream + """ + fields = [] + for key, value in in_data.items(): + if isinstance(value, tuple): + if value: + # values use explode = True, so the code makes a rest.RequestField for each item with name=key + for item in value: + request_field = cls.__multipart_form_item(key=key, value=item) + fields.append(request_field) + else: + # send an empty array as json because exploding will not send it + request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore + fields.append(request_field) + else: + request_field = cls.__multipart_form_item(key=key, value=value) + fields.append(request_field) + + return {'fields': tuple(fields)} + + @staticmethod + def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: + if isinstance(in_data, bytes): + return {'body': in_data} + # schemas.FileIO type + used_in_data = in_data.read() + in_data.close() + return {'body': used_in_data} + + @classmethod + def __serialize_application_x_www_form_data( + cls, in_data: schemas.immutabledict[str, _JSON_TYPES] + ) -> SerializedRequestBody: + """ + POST submission of form data in body + """ + cast_in_data = cls.__json_encoder.default(in_data) + value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + return {'body': value} + + @classmethod + def serialize( + cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None + ) -> SerializedRequestBody: + """ + If a str is returned then the result will be assigned to data when making the request + If a tuple is returned then the result will be used as fields input in encode_multipart_formdata + Return a tuple of + + The key of the return dict is + - body for application/json + - encode_multipart and fields for multipart/form-data + """ + media_type = cls.content[content_type] + assert media_type.schema is not None + schema = schemas.get_class(media_type.schema) + used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() + cast_in_data = schema.validate_base(in_data, configuration=used_configuration) + # TODO check for and use encoding if it exists + # and content_type is multipart or application/x-www-form-urlencoded + if cls._content_type_is_json(content_type): + if isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") + return cls.__serialize_json(cast_in_data) + elif content_type in cls.__plain_txt_content_types: + if not isinstance(cast_in_data, (int, float, str)): + raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") + return cls.__serialize_text_plain(cast_in_data) + elif content_type == 'multipart/form-data': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") + return cls.__serialize_multipart_form_data(cast_in_data) + elif content_type == 'application/x-www-form-urlencoded': + if not isinstance(cast_in_data, schemas.immutabledict): + raise ValueError( + f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") + return cls.__serialize_application_x_www_form_data(cast_in_data) + elif content_type == 'application/octet-stream': + if not isinstance(cast_in_data, (schemas.FileIO, bytes)): + raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") + return cls.__serialize_application_octet_stream(cast_in_data) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/petstore/python/src/openapi_client/api_response.py b/samples/client/petstore/python/src/openapi_client/api_response.py new file mode 100644 index 00000000000..8cfed7e3ff9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/api_response.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +import urllib3 + +from petstore_api import schemas + + +@dataclasses.dataclass(frozen=True) +class ApiResponse: + response: urllib3.HTTPResponse + body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] + headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] + + +@dataclasses.dataclass(frozen=True) +class ApiResponseWithoutDeserialization(ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/client/petstore/python/src/openapi_client/apis/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/__init__.py new file mode 100644 index 00000000000..7840f7726f6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints then import them from +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py b/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py new file mode 100644 index 00000000000..8c25c2a703f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py @@ -0,0 +1,182 @@ +import typing +import typing_extensions + +from openapi_client.apis.paths.solidus import Solidus +from openapi_client.apis.paths.another_fake_dummy import AnotherFakeDummy +from openapi_client.apis.paths.common_param_sub_dir import CommonParamSubDir +from openapi_client.apis.paths.fake import Fake +from openapi_client.apis.paths.fake_additional_properties_with_array_of_enums import FakeAdditionalPropertiesWithArrayOfEnums +from openapi_client.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema +from openapi_client.apis.paths.fake_body_with_query_params import FakeBodyWithQueryParams +from openapi_client.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams +from openapi_client.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId +from openapi_client.apis.paths.fake_health import FakeHealth +from openapi_client.apis.paths.fake_inline_additional_properties import FakeInlineAdditionalProperties +from openapi_client.apis.paths.fake_inline_composition import FakeInlineComposition +from openapi_client.apis.paths.fake_json_form_data import FakeJsonFormData +from openapi_client.apis.paths.fake_json_patch import FakeJsonPatch +from openapi_client.apis.paths.fake_json_with_charset import FakeJsonWithCharset +from openapi_client.apis.paths.fake_multiple_request_body_content_types import FakeMultipleRequestBodyContentTypes +from openapi_client.apis.paths.fake_multiple_response_bodies import FakeMultipleResponseBodies +from openapi_client.apis.paths.fake_multiple_securities import FakeMultipleSecurities +from openapi_client.apis.paths.fake_obj_in_query import FakeObjInQuery +from openapi_client.apis.paths.fake_parameter_collisions1_abab_self_ab import FakeParameterCollisions1AbabSelfAb +from openapi_client.apis.paths.fake_pem_content_type import FakePemContentType +from openapi_client.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType +from openapi_client.apis.paths.fake_redirection import FakeRedirection +from openapi_client.apis.paths.fake_ref_obj_in_query import FakeRefObjInQuery +from openapi_client.apis.paths.fake_refs_array_of_enums import FakeRefsArrayOfEnums +from openapi_client.apis.paths.fake_refs_arraymodel import FakeRefsArraymodel +from openapi_client.apis.paths.fake_refs_boolean import FakeRefsBoolean +from openapi_client.apis.paths.fake_refs_composed_one_of_number_with_validations import FakeRefsComposedOneOfNumberWithValidations +from openapi_client.apis.paths.fake_refs_enum import FakeRefsEnum +from openapi_client.apis.paths.fake_refs_mammal import FakeRefsMammal +from openapi_client.apis.paths.fake_refs_number import FakeRefsNumber +from openapi_client.apis.paths.fake_refs_object_model_with_ref_props import FakeRefsObjectModelWithRefProps +from openapi_client.apis.paths.fake_refs_string import FakeRefsString +from openapi_client.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema +from openapi_client.apis.paths.fake_test_query_paramters import FakeTestQueryParamters +from openapi_client.apis.paths.fake_upload_download_file import FakeUploadDownloadFile +from openapi_client.apis.paths.fake_upload_file import FakeUploadFile +from openapi_client.apis.paths.fake_upload_files import FakeUploadFiles +from openapi_client.apis.paths.fake_wild_card_responses import FakeWildCardResponses +from openapi_client.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile +from openapi_client.apis.paths.fake_classname_test import FakeClassnameTest +from openapi_client.apis.paths.foo import Foo +from openapi_client.apis.paths.pet import Pet +from openapi_client.apis.paths.pet_find_by_status import PetFindByStatus +from openapi_client.apis.paths.pet_find_by_tags import PetFindByTags +from openapi_client.apis.paths.pet_pet_id import PetPetId +from openapi_client.apis.paths.pet_pet_id_upload_image import PetPetIdUploadImage +from openapi_client.apis.paths.store_inventory import StoreInventory +from openapi_client.apis.paths.store_order import StoreOrder +from openapi_client.apis.paths.store_order_order_id import StoreOrderOrderId +from openapi_client.apis.paths.user import User +from openapi_client.apis.paths.user_create_with_array import UserCreateWithArray +from openapi_client.apis.paths.user_create_with_list import UserCreateWithList +from openapi_client.apis.paths.user_login import UserLogin +from openapi_client.apis.paths.user_logout import UserLogout +from openapi_client.apis.paths.user_username import UserUsername + +PathToApi = typing.TypedDict( + 'PathToApi', + { + "/": typing.Type[Solidus], + "/another-fake/dummy": typing.Type[AnotherFakeDummy], + "/commonParam/{subDir}/": typing.Type[CommonParamSubDir], + "/fake": typing.Type[Fake], + "/fake/additional-properties-with-array-of-enums": typing.Type[FakeAdditionalPropertiesWithArrayOfEnums], + "/fake/body-with-file-schema": typing.Type[FakeBodyWithFileSchema], + "/fake/body-with-query-params": typing.Type[FakeBodyWithQueryParams], + "/fake/case-sensitive-params": typing.Type[FakeCaseSensitiveParams], + "/fake/deleteCoffee/{id}": typing.Type[FakeDeleteCoffeeId], + "/fake/health": typing.Type[FakeHealth], + "/fake/inline-additionalProperties": typing.Type[FakeInlineAdditionalProperties], + "/fake/inlineComposition/": typing.Type[FakeInlineComposition], + "/fake/jsonFormData": typing.Type[FakeJsonFormData], + "/fake/jsonPatch": typing.Type[FakeJsonPatch], + "/fake/jsonWithCharset": typing.Type[FakeJsonWithCharset], + "/fake/multipleRequestBodyContentTypes/": typing.Type[FakeMultipleRequestBodyContentTypes], + "/fake/multipleResponseBodies": typing.Type[FakeMultipleResponseBodies], + "/fake/multipleSecurities": typing.Type[FakeMultipleSecurities], + "/fake/objInQuery": typing.Type[FakeObjInQuery], + "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/": typing.Type[FakeParameterCollisions1AbabSelfAb], + "/fake/pemContentType": typing.Type[FakePemContentType], + "/fake/queryParamWithJsonContentType": typing.Type[FakeQueryParamWithJsonContentType], + "/fake/redirection": typing.Type[FakeRedirection], + "/fake/refObjInQuery": typing.Type[FakeRefObjInQuery], + "/fake/refs/array-of-enums": typing.Type[FakeRefsArrayOfEnums], + "/fake/refs/arraymodel": typing.Type[FakeRefsArraymodel], + "/fake/refs/boolean": typing.Type[FakeRefsBoolean], + "/fake/refs/composed_one_of_number_with_validations": typing.Type[FakeRefsComposedOneOfNumberWithValidations], + "/fake/refs/enum": typing.Type[FakeRefsEnum], + "/fake/refs/mammal": typing.Type[FakeRefsMammal], + "/fake/refs/number": typing.Type[FakeRefsNumber], + "/fake/refs/object_model_with_ref_props": typing.Type[FakeRefsObjectModelWithRefProps], + "/fake/refs/string": typing.Type[FakeRefsString], + "/fake/responseWithoutSchema": typing.Type[FakeResponseWithoutSchema], + "/fake/test-query-paramters": typing.Type[FakeTestQueryParamters], + "/fake/uploadDownloadFile": typing.Type[FakeUploadDownloadFile], + "/fake/uploadFile": typing.Type[FakeUploadFile], + "/fake/uploadFiles": typing.Type[FakeUploadFiles], + "/fake/wildCardResponses": typing.Type[FakeWildCardResponses], + "/fake/{petId}/uploadImageWithRequiredFile": typing.Type[FakePetIdUploadImageWithRequiredFile], + "/fake_classname_test": typing.Type[FakeClassnameTest], + "/foo": typing.Type[Foo], + "/pet": typing.Type[Pet], + "/pet/findByStatus": typing.Type[PetFindByStatus], + "/pet/findByTags": typing.Type[PetFindByTags], + "/pet/{petId}": typing.Type[PetPetId], + "/pet/{petId}/uploadImage": typing.Type[PetPetIdUploadImage], + "/store/inventory": typing.Type[StoreInventory], + "/store/order": typing.Type[StoreOrder], + "/store/order/{order_id}": typing.Type[StoreOrderOrderId], + "/user": typing.Type[User], + "/user/createWithArray": typing.Type[UserCreateWithArray], + "/user/createWithList": typing.Type[UserCreateWithList], + "/user/login": typing.Type[UserLogin], + "/user/logout": typing.Type[UserLogout], + "/user/{username}": typing.Type[UserUsername], + } +) + +path_to_api = PathToApi( + { + "/": Solidus, + "/another-fake/dummy": AnotherFakeDummy, + "/commonParam/{subDir}/": CommonParamSubDir, + "/fake": Fake, + "/fake/additional-properties-with-array-of-enums": FakeAdditionalPropertiesWithArrayOfEnums, + "/fake/body-with-file-schema": FakeBodyWithFileSchema, + "/fake/body-with-query-params": FakeBodyWithQueryParams, + "/fake/case-sensitive-params": FakeCaseSensitiveParams, + "/fake/deleteCoffee/{id}": FakeDeleteCoffeeId, + "/fake/health": FakeHealth, + "/fake/inline-additionalProperties": FakeInlineAdditionalProperties, + "/fake/inlineComposition/": FakeInlineComposition, + "/fake/jsonFormData": FakeJsonFormData, + "/fake/jsonPatch": FakeJsonPatch, + "/fake/jsonWithCharset": FakeJsonWithCharset, + "/fake/multipleRequestBodyContentTypes/": FakeMultipleRequestBodyContentTypes, + "/fake/multipleResponseBodies": FakeMultipleResponseBodies, + "/fake/multipleSecurities": FakeMultipleSecurities, + "/fake/objInQuery": FakeObjInQuery, + "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/": FakeParameterCollisions1AbabSelfAb, + "/fake/pemContentType": FakePemContentType, + "/fake/queryParamWithJsonContentType": FakeQueryParamWithJsonContentType, + "/fake/redirection": FakeRedirection, + "/fake/refObjInQuery": FakeRefObjInQuery, + "/fake/refs/array-of-enums": FakeRefsArrayOfEnums, + "/fake/refs/arraymodel": FakeRefsArraymodel, + "/fake/refs/boolean": FakeRefsBoolean, + "/fake/refs/composed_one_of_number_with_validations": FakeRefsComposedOneOfNumberWithValidations, + "/fake/refs/enum": FakeRefsEnum, + "/fake/refs/mammal": FakeRefsMammal, + "/fake/refs/number": FakeRefsNumber, + "/fake/refs/object_model_with_ref_props": FakeRefsObjectModelWithRefProps, + "/fake/refs/string": FakeRefsString, + "/fake/responseWithoutSchema": FakeResponseWithoutSchema, + "/fake/test-query-paramters": FakeTestQueryParamters, + "/fake/uploadDownloadFile": FakeUploadDownloadFile, + "/fake/uploadFile": FakeUploadFile, + "/fake/uploadFiles": FakeUploadFiles, + "/fake/wildCardResponses": FakeWildCardResponses, + "/fake/{petId}/uploadImageWithRequiredFile": FakePetIdUploadImageWithRequiredFile, + "/fake_classname_test": FakeClassnameTest, + "/foo": Foo, + "/pet": Pet, + "/pet/findByStatus": PetFindByStatus, + "/pet/findByTags": PetFindByTags, + "/pet/{petId}": PetPetId, + "/pet/{petId}/uploadImage": PetPetIdUploadImage, + "/store/inventory": StoreInventory, + "/store/order": StoreOrder, + "/store/order/{order_id}": StoreOrderOrderId, + "/user": User, + "/user/createWithArray": UserCreateWithArray, + "/user/createWithList": UserCreateWithList, + "/user/login": UserLogin, + "/user/logout": UserLogout, + "/user/{username}": UserUsername, + } +) diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py new file mode 100644 index 00000000000..cf241d055c1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py b/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py new file mode 100644 index 00000000000..9c1052c855c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.another_fake_dummy.patch.operation import ApiForPatch + + +class AnotherFakeDummy( + ApiForPatch, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py b/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py new file mode 100644 index 00000000000..2d231b5d148 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.common_param_sub_dir.delete.operation import ApiForDelete +from openapi_client.paths.common_param_sub_dir.get.operation import ApiForGet +from openapi_client.paths.common_param_sub_dir.post.operation import ApiForPost + + +class CommonParamSubDir( + ApiForDelete, + ApiForGet, + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py new file mode 100644 index 00000000000..8f0a84856d0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake.delete.operation import ApiForDelete +from openapi_client.paths.fake.get.operation import ApiForGet +from openapi_client.paths.fake.patch.operation import ApiForPatch +from openapi_client.paths.fake.post.operation import ApiForPost + + +class Fake( + ApiForDelete, + ApiForGet, + ApiForPatch, + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py new file mode 100644 index 00000000000..69686a9b026 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_additional_properties_with_array_of_enums.get.operation import ApiForGet + + +class FakeAdditionalPropertiesWithArrayOfEnums( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py new file mode 100644 index 00000000000..82f480a021b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_body_with_file_schema.put.operation import ApiForPut + + +class FakeBodyWithFileSchema( + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py new file mode 100644 index 00000000000..1947070c3da --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_body_with_query_params.put.operation import ApiForPut + + +class FakeBodyWithQueryParams( + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py new file mode 100644 index 00000000000..86a9eca0578 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_case_sensitive_params.put.operation import ApiForPut + + +class FakeCaseSensitiveParams( + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py new file mode 100644 index 00000000000..a34df8557a5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_classname_test.patch.operation import ApiForPatch + + +class FakeClassnameTest( + ApiForPatch, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py new file mode 100644 index 00000000000..cd4e891e784 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_delete_coffee_id.delete.operation import ApiForDelete + + +class FakeDeleteCoffeeId( + ApiForDelete, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py new file mode 100644 index 00000000000..b7cbc526126 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_health.get.operation import ApiForGet + + +class FakeHealth( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py new file mode 100644 index 00000000000..319d64e6607 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_inline_additional_properties.post.operation import ApiForPost + + +class FakeInlineAdditionalProperties( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py new file mode 100644 index 00000000000..f9c609a9320 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_inline_composition.post.operation import ApiForPost + + +class FakeInlineComposition( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py new file mode 100644 index 00000000000..c5ef9fab228 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_json_form_data.get.operation import ApiForGet + + +class FakeJsonFormData( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py new file mode 100644 index 00000000000..a74915e355b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_json_patch.patch.operation import ApiForPatch + + +class FakeJsonPatch( + ApiForPatch, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py new file mode 100644 index 00000000000..b3f029fdec4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_json_with_charset.post.operation import ApiForPost + + +class FakeJsonWithCharset( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py new file mode 100644 index 00000000000..e97a8ae7542 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_multiple_request_body_content_types.post.operation import ApiForPost + + +class FakeMultipleRequestBodyContentTypes( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py new file mode 100644 index 00000000000..2133676cad3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_multiple_response_bodies.get.operation import ApiForGet + + +class FakeMultipleResponseBodies( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py new file mode 100644 index 00000000000..9ad99cdac53 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_multiple_securities.get.operation import ApiForGet + + +class FakeMultipleSecurities( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py new file mode 100644 index 00000000000..eedc7fd2da8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_obj_in_query.get.operation import ApiForGet + + +class FakeObjInQuery( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py new file mode 100644 index 00000000000..92ea3b1983d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.operation import ApiForPost + + +class FakeParameterCollisions1AbabSelfAb( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py new file mode 100644 index 00000000000..d535d95edfa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_pem_content_type.get.operation import ApiForGet + + +class FakePemContentType( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py new file mode 100644 index 00000000000..ae48a4b4666 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.operation import ApiForPost + + +class FakePetIdUploadImageWithRequiredFile( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py new file mode 100644 index 00000000000..22d3bf14499 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_query_param_with_json_content_type.get.operation import ApiForGet + + +class FakeQueryParamWithJsonContentType( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py new file mode 100644 index 00000000000..1f033300c4d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_redirection.get.operation import ApiForGet + + +class FakeRedirection( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py new file mode 100644 index 00000000000..35b0f890ebc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_ref_obj_in_query.get.operation import ApiForGet + + +class FakeRefObjInQuery( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py new file mode 100644 index 00000000000..19bb7620a00 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_array_of_enums.post.operation import ApiForPost + + +class FakeRefsArrayOfEnums( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py new file mode 100644 index 00000000000..da6d4aa521f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_arraymodel.post.operation import ApiForPost + + +class FakeRefsArraymodel( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py new file mode 100644 index 00000000000..7c54aaa865d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_boolean.post.operation import ApiForPost + + +class FakeRefsBoolean( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py new file mode 100644 index 00000000000..fafaf48c7f4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_composed_one_of_number_with_validations.post.operation import ApiForPost + + +class FakeRefsComposedOneOfNumberWithValidations( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py new file mode 100644 index 00000000000..c8a87d87a4c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_enum.post.operation import ApiForPost + + +class FakeRefsEnum( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py new file mode 100644 index 00000000000..6fdeb019cdb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_mammal.post.operation import ApiForPost + + +class FakeRefsMammal( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py new file mode 100644 index 00000000000..7d19b3d3876 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_number.post.operation import ApiForPost + + +class FakeRefsNumber( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py new file mode 100644 index 00000000000..4fd9f107cf9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_object_model_with_ref_props.post.operation import ApiForPost + + +class FakeRefsObjectModelWithRefProps( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py new file mode 100644 index 00000000000..2875f753c3e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_refs_string.post.operation import ApiForPost + + +class FakeRefsString( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py new file mode 100644 index 00000000000..c6ceeffa2fc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_response_without_schema.get.operation import ApiForGet + + +class FakeResponseWithoutSchema( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py new file mode 100644 index 00000000000..1da24ddd49b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_test_query_paramters.put.operation import ApiForPut + + +class FakeTestQueryParamters( + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py new file mode 100644 index 00000000000..d495f5f53e5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_upload_download_file.post.operation import ApiForPost + + +class FakeUploadDownloadFile( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py new file mode 100644 index 00000000000..c8a9449e8fe --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_upload_file.post.operation import ApiForPost + + +class FakeUploadFile( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py new file mode 100644 index 00000000000..1807076aa53 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_upload_files.post.operation import ApiForPost + + +class FakeUploadFiles( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py new file mode 100644 index 00000000000..8ddefee61bf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_wild_card_responses.get.operation import ApiForGet + + +class FakeWildCardResponses( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py b/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py new file mode 100644 index 00000000000..d8a08bb1cb3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.foo.get.operation import ApiForGet + + +class Foo( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py new file mode 100644 index 00000000000..f426fa02173 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet.post.operation import ApiForPost +from openapi_client.paths.pet.put.operation import ApiForPut + + +class Pet( + ApiForPost, + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py new file mode 100644 index 00000000000..a7c88651abe --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet_find_by_status.get.operation import ApiForGet + + +class PetFindByStatus( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py new file mode 100644 index 00000000000..74a64957608 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet_find_by_tags.get.operation import ApiForGet + + +class PetFindByTags( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py new file mode 100644 index 00000000000..a4063dd4e8e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet_pet_id.delete.operation import ApiForDelete +from openapi_client.paths.pet_pet_id.get.operation import ApiForGet +from openapi_client.paths.pet_pet_id.post.operation import ApiForPost + + +class PetPetId( + ApiForDelete, + ApiForGet, + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py new file mode 100644 index 00000000000..4124c836fbc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet_pet_id_upload_image.post.operation import ApiForPost + + +class PetPetIdUploadImage( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py b/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py new file mode 100644 index 00000000000..19459c5faaa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.solidus.get.operation import ApiForGet + + +class Solidus( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py new file mode 100644 index 00000000000..a8a084555ea --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.store_inventory.get.operation import ApiForGet + + +class StoreInventory( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py new file mode 100644 index 00000000000..1e8631583fd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.store_order.post.operation import ApiForPost + + +class StoreOrder( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py new file mode 100644 index 00000000000..ecbd226629a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.store_order_order_id.delete.operation import ApiForDelete +from openapi_client.paths.store_order_order_id.get.operation import ApiForGet + + +class StoreOrderOrderId( + ApiForDelete, + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user.py new file mode 100644 index 00000000000..9a9184c27ac --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user.post.operation import ApiForPost + + +class User( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py new file mode 100644 index 00000000000..c609573e940 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_create_with_array.post.operation import ApiForPost + + +class UserCreateWithArray( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py new file mode 100644 index 00000000000..9a8e025cf23 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_create_with_list.post.operation import ApiForPost + + +class UserCreateWithList( + ApiForPost, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py new file mode 100644 index 00000000000..1c15ad8a393 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_login.get.operation import ApiForGet + + +class UserLogin( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py new file mode 100644 index 00000000000..0195adba7ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_logout.get.operation import ApiForGet + + +class UserLogout( + ApiForGet, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py new file mode 100644 index 00000000000..54054eeb1a4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_username.delete.operation import ApiForDelete +from openapi_client.paths.user_username.get.operation import ApiForGet +from openapi_client.paths.user_username.put.operation import ApiForPut + + +class UserUsername( + ApiForDelete, + ApiForGet, + ApiForPut, +): + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py b/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py new file mode 100644 index 00000000000..84a15788e60 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py @@ -0,0 +1,35 @@ +import typing +import typing_extensions + +from openapi_client.apis.tags.fake_api import FakeApi +from openapi_client.apis.tags.another_fake_api import AnotherFakeApi +from openapi_client.apis.tags.pet_api import PetApi +from openapi_client.apis.tags.fake_classname_tags123_api import FakeClassnameTags123Api +from openapi_client.apis.tags.default_api import DefaultApi +from openapi_client.apis.tags.store_api import StoreApi +from openapi_client.apis.tags.user_api import UserApi + +TagToApi = typing.TypedDict( + 'TagToApi', + { + "fake": typing.Type[FakeApi], + "$another-fake?": typing.Type[AnotherFakeApi], + "pet": typing.Type[PetApi], + "fake_classname_tags 123#$%^": typing.Type[FakeClassnameTags123Api], + "default": typing.Type[DefaultApi], + "store": typing.Type[StoreApi], + "user": typing.Type[UserApi], + } +) + +tag_to_api = TagToApi( + { + "fake": FakeApi, + "$another-fake?": AnotherFakeApi, + "pet": PetApi, + "fake_classname_tags 123#$%^": FakeClassnameTags123Api, + "default": DefaultApi, + "store": StoreApi, + "user": UserApi, + } +) diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py new file mode 100644 index 00000000000..f3c38f014ce --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py new file mode 100644 index 00000000000..0608716a620 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py @@ -0,0 +1,21 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.another_fake_dummy.patch.operation import _123TestSpecialTags + + +class AnotherFakeApi( + _123TestSpecialTags, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py new file mode 100644 index 00000000000..9890b8e0fd9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py @@ -0,0 +1,21 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.foo.get.operation import FooGet + + +class DefaultApi( + FooGet, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py new file mode 100644 index 00000000000..2f3d2adb2a4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.operation import ParameterCollisions +from openapi_client.paths.fake_obj_in_query.get.operation import ObjectInQuery +from openapi_client.paths.fake_query_param_with_json_content_type.get.operation import QueryParamWithJsonContentType +from openapi_client.paths.fake_json_form_data.get.operation import JsonFormData +from openapi_client.paths.common_param_sub_dir.delete.operation import DeleteCommonParam +from openapi_client.paths.common_param_sub_dir.get.operation import GetCommonParam +from openapi_client.paths.common_param_sub_dir.post.operation import PostCommonParam +from openapi_client.paths.fake_body_with_file_schema.put.operation import BodyWithFileSchema +from openapi_client.paths.fake_json_patch.patch.operation import JsonPatch +from openapi_client.paths.fake_response_without_schema.get.operation import ResponseWithoutSchema +from openapi_client.paths.fake_pem_content_type.get.operation import PemContentType +from openapi_client.paths.fake_refs_boolean.post.operation import Boolean +from openapi_client.paths.fake_refs_string.post.operation import String +from openapi_client.paths.fake_wild_card_responses.get.operation import WildCardResponses +from openapi_client.paths.fake_refs_mammal.post.operation import Mammal +from openapi_client.paths.fake_upload_download_file.post.operation import UploadDownloadFile +from openapi_client.paths.fake_json_with_charset.post.operation import JsonWithCharset +from openapi_client.paths.fake_upload_files.post.operation import UploadFiles +from openapi_client.paths.fake_inline_composition.post.operation import InlineComposition +from openapi_client.paths.fake_refs_array_of_enums.post.operation import ArrayOfEnums +from openapi_client.paths.fake_multiple_request_body_content_types.post.operation import MultipleRequestBodyContentTypes +from openapi_client.paths.solidus.get.operation import SlashRoute +from openapi_client.paths.fake_health.get.operation import FakeHealthGet +from openapi_client.paths.fake_delete_coffee_id.delete.operation import DeleteCoffee +from openapi_client.paths.fake_case_sensitive_params.put.operation import CaseSensitiveParams +from openapi_client.paths.fake_ref_obj_in_query.get.operation import RefObjectInQuery +from openapi_client.paths.fake_test_query_paramters.put.operation import QueryParameterCollectionFormat +from openapi_client.paths.fake_upload_file.post.operation import UploadFile +from openapi_client.paths.fake_refs_arraymodel.post.operation import ArrayModel +from openapi_client.paths.fake_multiple_securities.get.operation import MultipleSecurities +from openapi_client.paths.fake_refs_object_model_with_ref_props.post.operation import ObjectModelWithRefProps +from openapi_client.paths.fake_refs_number.post.operation import NumberWithValidations +from openapi_client.paths.fake_multiple_response_bodies.get.operation import MultipleResponseBodies +from openapi_client.paths.fake_inline_additional_properties.post.operation import InlineAdditionalProperties +from openapi_client.paths.fake_redirection.get.operation import Redirection +from openapi_client.paths.fake_additional_properties_with_array_of_enums.get.operation import AdditionalPropertiesWithArrayOfEnums +from openapi_client.paths.fake_refs_enum.post.operation import StringEnum +from openapi_client.paths.fake.delete.operation import GroupParameters +from openapi_client.paths.fake.get.operation import EnumParameters +from openapi_client.paths.fake.patch.operation import ClientModel +from openapi_client.paths.fake.post.operation import EndpointParameters +from openapi_client.paths.fake_body_with_query_params.put.operation import BodyWithQueryParams +from openapi_client.paths.fake_refs_composed_one_of_number_with_validations.post.operation import ComposedOneOfDifferentTypes + + +class FakeApi( + ParameterCollisions, + ObjectInQuery, + QueryParamWithJsonContentType, + JsonFormData, + DeleteCommonParam, + GetCommonParam, + PostCommonParam, + BodyWithFileSchema, + JsonPatch, + ResponseWithoutSchema, + PemContentType, + Boolean, + String, + WildCardResponses, + Mammal, + UploadDownloadFile, + JsonWithCharset, + UploadFiles, + InlineComposition, + ArrayOfEnums, + MultipleRequestBodyContentTypes, + SlashRoute, + FakeHealthGet, + DeleteCoffee, + CaseSensitiveParams, + RefObjectInQuery, + QueryParameterCollectionFormat, + UploadFile, + ArrayModel, + MultipleSecurities, + ObjectModelWithRefProps, + NumberWithValidations, + MultipleResponseBodies, + InlineAdditionalProperties, + Redirection, + AdditionalPropertiesWithArrayOfEnums, + StringEnum, + GroupParameters, + EnumParameters, + ClientModel, + EndpointParameters, + BodyWithQueryParams, + ComposedOneOfDifferentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py new file mode 100644 index 00000000000..842ec42eede --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py @@ -0,0 +1,21 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.fake_classname_test.patch.operation import Classname + + +class FakeClassnameTags123Api( + Classname, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py new file mode 100644 index 00000000000..d0f66b13a36 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py @@ -0,0 +1,37 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.pet_find_by_status.get.operation import FindPetsByStatus +from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.operation import UploadFileWithRequiredFile +from openapi_client.paths.pet.post.operation import AddPet +from openapi_client.paths.pet.put.operation import UpdatePet +from openapi_client.paths.pet_pet_id.delete.operation import DeletePet +from openapi_client.paths.pet_pet_id.get.operation import GetPetById +from openapi_client.paths.pet_pet_id.post.operation import UpdatePetWithForm +from openapi_client.paths.pet_pet_id_upload_image.post.operation import UploadImage +from openapi_client.paths.pet_find_by_tags.get.operation import FindPetsByTags + + +class PetApi( + FindPetsByStatus, + UploadFileWithRequiredFile, + AddPet, + UpdatePet, + DeletePet, + GetPetById, + UpdatePetWithForm, + UploadImage, + FindPetsByTags, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py new file mode 100644 index 00000000000..c04ff91ddc5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py @@ -0,0 +1,27 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.store_order_order_id.delete.operation import DeleteOrder +from openapi_client.paths.store_order_order_id.get.operation import GetOrderById +from openapi_client.paths.store_order.post.operation import PlaceOrder +from openapi_client.paths.store_inventory.get.operation import GetInventory + + +class StoreApi( + DeleteOrder, + GetOrderById, + PlaceOrder, + GetInventory, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py new file mode 100644 index 00000000000..1f4d8c54c72 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py @@ -0,0 +1,35 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.paths.user_create_with_array.post.operation import CreateUsersWithArrayInput +from openapi_client.paths.user_login.get.operation import LoginUser +from openapi_client.paths.user_username.delete.operation import DeleteUser +from openapi_client.paths.user_username.get.operation import GetUserByName +from openapi_client.paths.user_username.put.operation import UpdateUser +from openapi_client.paths.user_create_with_list.post.operation import CreateUsersWithListInput +from openapi_client.paths.user_logout.get.operation import LogoutUser +from openapi_client.paths.user.post.operation import CreateUser + + +class UserApi( + CreateUsersWithArrayInput, + LoginUser, + DeleteUser, + GetUserByName, + UpdateUser, + CreateUsersWithListInput, + LogoutUser, + CreateUser, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/petstore/python/src/openapi_client/components/__init__.py b/samples/client/petstore/python/src/openapi_client/components/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py new file mode 100644 index 00000000000..36b07403a85 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from .content.application_json import schema as application_json_schema + + +class Int32JsonContentTypeHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py new file mode 100644 index 00000000000..6e99ff53420 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int32Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py new file mode 100644 index 00000000000..ebcb275404d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class NumberHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py new file mode 100644 index 00000000000..8c0cdd67a6c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.DecimalSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py new file mode 100644 index 00000000000..8fec76789bb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from .content.application_json import schema as application_json_schema + + +class RefContentSchemaHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py new file mode 100644 index 00000000000..c85ecf13950 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_with_validation +Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py new file mode 100644 index 00000000000..aaef64c81ee --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class RefSchemaHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py new file mode 100644 index 00000000000..c85ecf13950 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_with_validation +Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py new file mode 100644 index 00000000000..4c4d6ab10e9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_string_header +RefStringHeader = header_string_header.StringHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py new file mode 100644 index 00000000000..5e3e8b4ff53 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class StringHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py new file mode 100644 index 00000000000..88944efe171 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py @@ -0,0 +1,24 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class ComponentRefSchemaStringWithValidation(api_client.PathParameter): + name = "CRSstringWithValidation" + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py new file mode 100644 index 00000000000..c85ecf13950 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_with_validation +Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py new file mode 100644 index 00000000000..03bb3914d15 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class PathUserName(api_client.PathParameter): + name = "username" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py new file mode 100644 index 00000000000..60e6da28931 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.parameters import parameter_path_user_name +RefPathUserName = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py new file mode 100644 index 00000000000..377c2da06a9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class RefSchemaStringWithValidation(api_client.PathParameter): + name = "RSstringWithValidation" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py new file mode 100644 index 00000000000..c85ecf13950 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_with_validation +Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py new file mode 100644 index 00000000000..de6ac29bbc3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class Client(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py new file mode 100644 index 00000000000..c1e1b8bec36 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client +Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py new file mode 100644 index 00000000000..3cc41a0b7bb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py @@ -0,0 +1,29 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .content.application_xml import schema as application_xml_schema + + +class Pet(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + 'application/xml': ApplicationXmlMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py new file mode 100644 index 00000000000..0259ab108b6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pet +Schema: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py new file mode 100644 index 00000000000..926c64496e4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_pet +Schema: typing_extensions.TypeAlias = ref_pet.RefPet diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py new file mode 100644 index 00000000000..51cb22ca765 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_user_array +RefUserArray = request_body_user_array.UserArray diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py new file mode 100644 index 00000000000..65052e82fc5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class UserArray(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py new file mode 100644 index 00000000000..6bc146dd5f5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -0,0 +1,70 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import user + + +class SchemaTuple( + typing.Tuple[ + user.UserDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Union[ + user.UserDictInput, + user.UserDict, + ], + ], + typing.Tuple[ + typing.Union[ + user.UserDictInput, + user.UserDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[user.User] = dataclasses.field(default_factory=lambda: user.User) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py new file mode 100644 index 00000000000..91dadef2df0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py @@ -0,0 +1,30 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .headers import header_location +from . import header_parameters +parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { + 'location': header_location.Location, +} + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + headers: header_parameters.HeadersDict + body: schemas.Unset + + +class HeadersWithNoBody(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + headers=parameters + headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py new file mode 100644 index 00000000000..c70623e07f1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.responses.response_headers_with_no_body.headers.header_location import schema +Properties = typing.TypedDict( + 'Properties', + { + "location": typing.Type[schema.Schema], + } +) + + +class HeadersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "location", + }) + + def __new__( + cls, + *, + location: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("location", location), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeadersDictInput, arg_) + return Headers.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeadersDictInput, + HeadersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return Headers.validate(arg, configuration=configuration) + + @property + def location(self) -> typing.Union[str, schemas.Unset]: + val = self.get("location", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +HeadersDictInput = typing.TypedDict( + 'HeadersDictInput', + { + "location": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class Headers( + schemas.Schema[HeadersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeadersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeadersDictInput, + HeadersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py new file mode 100644 index 00000000000..eb00b8d1525 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Location(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py new file mode 100644 index 00000000000..fdec53da3a7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +RefSuccessDescriptionOnly = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py new file mode 100644 index 00000000000..026392a3540 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_successful_xml_and_json_array_of_pet +RefSuccessfulXmlAndJsonArrayOfPet = response_successful_xml_and_json_array_of_pet.SuccessfulXmlAndJsonArrayOfPet +ApiResponse = response_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py new file mode 100644 index 00000000000..a5647fcb110 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class SuccessDescriptionOnly(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py new file mode 100644 index 00000000000..4b82a657157 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py @@ -0,0 +1,38 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .headers import header_some_header +from . import header_parameters +parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { + 'someHeader': header_some_header.SomeHeader, +} + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.SchemaDict + headers: header_parameters.HeadersDict + + +class SuccessInlineContentAndHeader(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + headers=parameters + headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py new file mode 100644 index 00000000000..f7aac3d1568 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -0,0 +1,83 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.Int32Schema + + +class SchemaDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: int, + ): + used_kwargs = typing.cast(SchemaDictInput, kwargs) + return Schema.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) +SchemaDictInput = typing.Mapping[ + str, + int, +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py new file mode 100644 index 00000000000..759fa696017 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.responses.response_success_inline_content_and_header.headers.header_some_header import schema +Properties = typing.TypedDict( + 'Properties', + { + "someHeader": typing.Type[schema.Schema], + } +) + + +class HeadersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someHeader", + }) + + def __new__( + cls, + *, + someHeader: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someHeader", someHeader), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeadersDictInput, arg_) + return Headers.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeadersDictInput, + HeadersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return Headers.validate(arg, configuration=configuration) + + @property + def someHeader(self) -> typing.Union[str, schemas.Unset]: + val = self.get("someHeader", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +HeadersDictInput = typing.TypedDict( + 'HeadersDictInput', + { + "someHeader": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class Headers( + schemas.Schema[HeadersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeadersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeadersDictInput, + HeadersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py new file mode 100644 index 00000000000..3cd15288de5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class SomeHeader(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py new file mode 100644 index 00000000000..ea2e1f64f29 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py @@ -0,0 +1,46 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .headers import header_ref_schema_header +from .headers import header_int32 +from .headers import header_ref_content_schema_header +from .headers import header_string_header +from .headers import header_number_header +from . import header_parameters +parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { + 'ref-schema-header': header_ref_schema_header.RefSchemaHeader, + 'int32': header_int32.Int32, + 'ref-content-schema-header': header_ref_content_schema_header.RefContentSchemaHeader, + 'stringHeader': header_string_header.StringHeader, + 'numberHeader': header_number_header.NumberHeader, +} + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.api_response.ApiResponseDict + headers: header_parameters.HeadersDict + + +class SuccessWithJsonApiResponse(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + headers=parameters + headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py new file mode 100644 index 00000000000..d3dc5adb905 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import api_response +Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py new file mode 100644 index 00000000000..4f860701310 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py @@ -0,0 +1,157 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.headers.header_int32_json_content_type_header.content.application_json import schema +from openapi_client.components.headers.header_number_header import schema as schema_3 +from openapi_client.components.headers.header_string_header import schema as schema_2 +from openapi_client.components.schema import string_with_validation +Properties = typing.TypedDict( + 'Properties', + { + "ref-schema-header": typing.Type[string_with_validation.StringWithValidation], + "int32": typing.Type[schema.Schema], + "ref-content-schema-header": typing.Type[string_with_validation.StringWithValidation], + "stringHeader": typing.Type[schema_2.Schema], + "numberHeader": typing.Type[schema_3.Schema], + } +) +HeadersRequiredDictInput = typing.TypedDict( + 'HeadersRequiredDictInput', + { + "int32": int, + "ref-content-schema-header": str, + "ref-schema-header": str, + "stringHeader": str, + } +) +HeadersOptionalDictInput = typing.TypedDict( + 'HeadersOptionalDictInput', + { + "numberHeader": str, + }, + total=False +) + + +class HeadersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "int32", + "ref-content-schema-header", + "ref-schema-header", + "stringHeader", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "numberHeader", + }) + + def __new__( + cls, + *, + int32: int, + stringHeader: str, + numberHeader: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "int32": int32, + "stringHeader": stringHeader, + } + for key_, val in ( + ("numberHeader", numberHeader), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeadersDictInput, arg_) + return Headers.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeadersDictInput, + HeadersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return Headers.validate(arg, configuration=configuration) + + @property + def int32(self) -> int: + return typing.cast( + int, + self.__getitem__("int32") + ) + + @property + def stringHeader(self) -> str: + return typing.cast( + str, + self.__getitem__("stringHeader") + ) + + @property + def numberHeader(self) -> typing.Union[str, schemas.Unset]: + val = self.get("numberHeader", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + +class HeadersDictInput(HeadersRequiredDictInput, HeadersOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class Headers( + schemas.Schema[HeadersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "int32", + "ref-content-schema-header", + "ref-schema-header", + "stringHeader", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeadersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeadersDictInput, + HeadersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py new file mode 100644 index 00000000000..661b9f2d216 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_int32_json_content_type_header +Int32 = header_int32_json_content_type_header.Int32JsonContentTypeHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py new file mode 100644 index 00000000000..2fb16e7186a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_number_header +NumberHeader = header_number_header.NumberHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py new file mode 100644 index 00000000000..9d425ecc610 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_ref_content_schema_header +RefContentSchemaHeader = header_ref_content_schema_header.RefContentSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py new file mode 100644 index 00000000000..710ad30499c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_ref_schema_header +RefSchemaHeader = header_ref_schema_header.RefSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py new file mode 100644 index 00000000000..b90033ab2cf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_ref_string_header +StringHeader = header_ref_string_header.RefStringHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py new file mode 100644 index 00000000000..33f79f32a32 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + application_xml_schema.SchemaTuple, + application_json_schema.SchemaTuple, + ] + headers: schemas.Unset + + +class SuccessfulXmlAndJsonArrayOfPet(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py new file mode 100644 index 00000000000..a1393887f15 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -0,0 +1,70 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import ref_pet + + +class SchemaTuple( + typing.Tuple[ + ref_pet.pet.PetDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ref_pet.pet.PetDictInput, + ref_pet.pet.PetDict, + ], + ], + typing.Tuple[ + typing.Union[ + ref_pet.pet.PetDictInput, + ref_pet.pet.PetDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[ref_pet.RefPet] = dataclasses.field(default_factory=lambda: ref_pet.RefPet) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py new file mode 100644 index 00000000000..ca23bfa54a2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -0,0 +1,70 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import pet + + +class SchemaTuple( + typing.Tuple[ + pet.PetDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + ], + typing.Tuple[ + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[pet.Pet] = dataclasses.field(default_factory=lambda: pet.Pet) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py b/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py new file mode 100644 index 00000000000..45c511a8523 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py @@ -0,0 +1,116 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.Int32Schema +Class: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + "class": typing.Type[Class], + } +) + + +class _200ResponseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + "class", + }) + + def __new__( + cls, + *, + name: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + class: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("name", name), + ("class", class), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_200ResponseDictInput, arg_) + return _200Response.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _200ResponseDictInput, + _200ResponseDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _200ResponseDict: + return _200Response.validate(arg, configuration=configuration) + + @property + def name(self) -> typing.Union[int, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def class(self) -> typing.Union[str, schemas.Unset]: + val = self.get("class", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_200ResponseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _200Response( + schemas.AnyTypeSchema[_200ResponseDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + model with an invalid class name for python, starts with a number + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _200ResponseDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py b/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py new file mode 100644 index 00000000000..e3edab2dc1c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py b/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py new file mode 100644 index 00000000000..c8ca03332f3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py @@ -0,0 +1,138 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Discriminator: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "discriminator": typing.Type[Discriminator], + } +) + + +class AbstractStepMessageDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "description", + "discriminator", + "sequenceNumber", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + description: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + discriminator: str, + sequenceNumber: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "description": description, + "discriminator": discriminator, + "sequenceNumber": sequenceNumber, + } + arg_.update(kwargs) + used_arg_ = typing.cast(AbstractStepMessageDictInput, arg_) + return AbstractStepMessage.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AbstractStepMessageDictInput, + AbstractStepMessageDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AbstractStepMessageDict: + return AbstractStepMessage.validate(arg, configuration=configuration) + + @property + def description(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("description") + + @property + def discriminator(self) -> str: + return typing.cast( + str, + self.__getitem__("discriminator") + ) + + @property + def sequenceNumber(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("sequenceNumber") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AbstractStepMessageDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] +AnyOf = typing.Tuple[ + typing.Type['AbstractStepMessage'], +] + + +@dataclasses.dataclass(frozen=True) +class AbstractStepMessage( + schemas.Schema[AbstractStepMessageDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Abstract Step + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "description", + "discriminator", + "sequenceNumber", + }) + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'discriminator': { + 'AbstractStepMessage': AbstractStepMessage, + } + } + ) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AbstractStepMessageDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AbstractStepMessageDictInput, + AbstractStepMessageDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AbstractStepMessageDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py new file mode 100644 index 00000000000..5e0aa6e287f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py @@ -0,0 +1,650 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema + + +class MapPropertyDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + used_kwargs = typing.cast(MapPropertyDictInput, kwargs) + return MapProperty.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapPropertyDictInput, + MapPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapPropertyDict: + return MapProperty.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +MapPropertyDictInput = typing.Mapping[ + str, + str, +] + + +@dataclasses.dataclass(frozen=True) +class MapProperty( + schemas.Schema[MapPropertyDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapPropertyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapPropertyDictInput, + MapPropertyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapPropertyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AdditionalProperties3: typing_extensions.TypeAlias = schemas.StrSchema + + +class AdditionalPropertiesDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + used_kwargs = typing.cast(AdditionalPropertiesDictInput, kwargs) + return AdditionalProperties2.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesDict: + return AdditionalProperties2.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +AdditionalPropertiesDictInput = typing.Mapping[ + str, + str, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties2( + schemas.Schema[AdditionalPropertiesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class MapOfMapPropertyDict(schemas.immutabledict[str, AdditionalPropertiesDict]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], + ): + used_kwargs = typing.cast(MapOfMapPropertyDictInput, kwargs) + return MapOfMapProperty.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapOfMapPropertyDictInput, + MapOfMapPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapOfMapPropertyDict: + return MapOfMapProperty.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesDict, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + AdditionalPropertiesDict, + val + ) +MapOfMapPropertyDictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], +] + + +@dataclasses.dataclass(frozen=True) +class MapOfMapProperty( + schemas.Schema[MapOfMapPropertyDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapOfMapPropertyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapOfMapPropertyDictInput, + MapOfMapPropertyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapOfMapPropertyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +Anytype1: typing_extensions.TypeAlias = schemas.AnyTypeSchema +MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema +MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema +AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class MapWithUndeclaredPropertiesAnytype3Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + used_kwargs = typing.cast(MapWithUndeclaredPropertiesAnytype3DictInput, kwargs) + return MapWithUndeclaredPropertiesAnytype3.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapWithUndeclaredPropertiesAnytype3DictInput, + MapWithUndeclaredPropertiesAnytype3Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapWithUndeclaredPropertiesAnytype3Dict: + return MapWithUndeclaredPropertiesAnytype3.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +MapWithUndeclaredPropertiesAnytype3DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class MapWithUndeclaredPropertiesAnytype3( + schemas.Schema[MapWithUndeclaredPropertiesAnytype3Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapWithUndeclaredPropertiesAnytype3Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapWithUndeclaredPropertiesAnytype3DictInput, + MapWithUndeclaredPropertiesAnytype3Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapWithUndeclaredPropertiesAnytype3Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AdditionalProperties5: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +class EmptyMapDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + # map with no key value pairs + def __new__( + cls, + arg: EmptyMapDictInput, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return EmptyMap.validate(arg, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + EmptyMapDictInput, + EmptyMapDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EmptyMapDict: + return EmptyMap.validate(arg, configuration=configuration) +EmptyMapDictInput = typing.Mapping # mapping must be empty + + +@dataclasses.dataclass(frozen=True) +class EmptyMap( + schemas.Schema[EmptyMapDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties5] = dataclasses.field(default_factory=lambda: AdditionalProperties5) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: EmptyMapDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EmptyMapDictInput, + EmptyMapDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EmptyMapDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AdditionalProperties6: typing_extensions.TypeAlias = schemas.StrSchema + + +class MapWithUndeclaredPropertiesStringDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + used_kwargs = typing.cast(MapWithUndeclaredPropertiesStringDictInput, kwargs) + return MapWithUndeclaredPropertiesString.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapWithUndeclaredPropertiesStringDictInput, + MapWithUndeclaredPropertiesStringDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapWithUndeclaredPropertiesStringDict: + return MapWithUndeclaredPropertiesString.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +MapWithUndeclaredPropertiesStringDictInput = typing.Mapping[ + str, + str, +] + + +@dataclasses.dataclass(frozen=True) +class MapWithUndeclaredPropertiesString( + schemas.Schema[MapWithUndeclaredPropertiesStringDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties6] = dataclasses.field(default_factory=lambda: AdditionalProperties6) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapWithUndeclaredPropertiesStringDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapWithUndeclaredPropertiesStringDictInput, + MapWithUndeclaredPropertiesStringDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapWithUndeclaredPropertiesStringDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +Properties = typing.TypedDict( + 'Properties', + { + "map_property": typing.Type[MapProperty], + "map_of_map_property": typing.Type[MapOfMapProperty], + "anytype_1": typing.Type[Anytype1], + "map_with_undeclared_properties_anytype_1": typing.Type[MapWithUndeclaredPropertiesAnytype1], + "map_with_undeclared_properties_anytype_2": typing.Type[MapWithUndeclaredPropertiesAnytype2], + "map_with_undeclared_properties_anytype_3": typing.Type[MapWithUndeclaredPropertiesAnytype3], + "empty_map": typing.Type[EmptyMap], + "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], + } +) + + +class AdditionalPropertiesClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "map_property", + "map_of_map_property", + "anytype_1", + "map_with_undeclared_properties_anytype_1", + "map_with_undeclared_properties_anytype_2", + "map_with_undeclared_properties_anytype_3", + "empty_map", + "map_with_undeclared_properties_string", + }) + + def __new__( + cls, + *, + map_property: typing.Union[ + MapPropertyDictInput, + MapPropertyDict, + schemas.Unset + ] = schemas.unset, + map_of_map_property: typing.Union[ + MapOfMapPropertyDictInput, + MapOfMapPropertyDict, + schemas.Unset + ] = schemas.unset, + anytype_1: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + map_with_undeclared_properties_anytype_1: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + schemas.Unset + ] = schemas.unset, + map_with_undeclared_properties_anytype_2: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + schemas.Unset + ] = schemas.unset, + map_with_undeclared_properties_anytype_3: typing.Union[ + MapWithUndeclaredPropertiesAnytype3DictInput, + MapWithUndeclaredPropertiesAnytype3Dict, + schemas.Unset + ] = schemas.unset, + empty_map: typing.Union[ + EmptyMapDictInput, + EmptyMapDict, + schemas.Unset + ] = schemas.unset, + map_with_undeclared_properties_string: typing.Union[ + MapWithUndeclaredPropertiesStringDictInput, + MapWithUndeclaredPropertiesStringDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("map_property", map_property), + ("map_of_map_property", map_of_map_property), + ("anytype_1", anytype_1), + ("map_with_undeclared_properties_anytype_1", map_with_undeclared_properties_anytype_1), + ("map_with_undeclared_properties_anytype_2", map_with_undeclared_properties_anytype_2), + ("map_with_undeclared_properties_anytype_3", map_with_undeclared_properties_anytype_3), + ("empty_map", empty_map), + ("map_with_undeclared_properties_string", map_with_undeclared_properties_string), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AdditionalPropertiesClassDictInput, arg_) + return AdditionalPropertiesClass.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalPropertiesClassDictInput, + AdditionalPropertiesClassDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesClassDict: + return AdditionalPropertiesClass.validate(arg, configuration=configuration) + + @property + def map_property(self) -> typing.Union[MapPropertyDict, schemas.Unset]: + val = self.get("map_property", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapPropertyDict, + val + ) + + @property + def map_of_map_property(self) -> typing.Union[MapOfMapPropertyDict, schemas.Unset]: + val = self.get("map_of_map_property", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapOfMapPropertyDict, + val + ) + + @property + def anytype_1(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("anytype_1", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def map_with_undeclared_properties_anytype_1(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("map_with_undeclared_properties_anytype_1", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) + + @property + def map_with_undeclared_properties_anytype_2(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("map_with_undeclared_properties_anytype_2", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) + + @property + def map_with_undeclared_properties_anytype_3(self) -> typing.Union[MapWithUndeclaredPropertiesAnytype3Dict, schemas.Unset]: + val = self.get("map_with_undeclared_properties_anytype_3", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapWithUndeclaredPropertiesAnytype3Dict, + val + ) + + @property + def empty_map(self) -> typing.Union[EmptyMapDict, schemas.Unset]: + val = self.get("empty_map", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + EmptyMapDict, + val + ) + + @property + def map_with_undeclared_properties_string(self) -> typing.Union[MapWithUndeclaredPropertiesStringDict, schemas.Unset]: + val = self.get("map_with_undeclared_properties_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapWithUndeclaredPropertiesStringDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AdditionalPropertiesClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AdditionalPropertiesClass( + schemas.Schema[AdditionalPropertiesClassDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalPropertiesClassDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalPropertiesClassDictInput, + AdditionalPropertiesClassDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesClassDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py new file mode 100644 index 00000000000..96a936ed62e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py @@ -0,0 +1,280 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + used_kwargs = typing.cast(_0DictInput, kwargs) + return _0.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _0DictInput, + _0Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return _0.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.Schema[_0Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _0Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _0DictInput, + _0Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _0Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties2( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + min_length: int = 3 + + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ): + used_kwargs = typing.cast(_1DictInput, kwargs) + return _1.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +_1DictInput = typing.Mapping[ + str, + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], +] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties3( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + max_length: int = 5 + + + +class _2Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ): + used_kwargs = typing.cast(_2DictInput, kwargs) + return _2.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _2DictInput, + _2Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _2Dict: + return _2.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +_2DictInput = typing.Mapping[ + str, + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], +] + + +@dataclasses.dataclass(frozen=True) +class _2( + schemas.Schema[_2Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _2Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _2DictInput, + _2Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _2Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + typing.Type[_2], +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalPropertiesSchema( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py new file mode 100644 index 00000000000..faaa149de05 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py @@ -0,0 +1,157 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import enum_class + + +class AdditionalPropertiesTuple( + typing.Tuple[ + typing.Literal["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M"], + ... + ] +): + + def __new__(cls, arg: typing.Union[AdditionalPropertiesTupleInput, AdditionalPropertiesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return AdditionalProperties.validate(arg, configuration=configuration) +AdditionalPropertiesTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M" + ], + ], + typing.Tuple[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties( + schemas.Schema[schemas.immutabledict, AdditionalPropertiesTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[enum_class.EnumClass] = dataclasses.field(default_factory=lambda: enum_class.EnumClass) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: AdditionalPropertiesTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalPropertiesTupleInput, + AdditionalPropertiesTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class AdditionalPropertiesWithArrayOfEnumsDict(schemas.immutabledict[str, AdditionalPropertiesTuple]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + AdditionalPropertiesTupleInput, + AdditionalPropertiesTuple + ], + ): + used_kwargs = typing.cast(AdditionalPropertiesWithArrayOfEnumsDictInput, kwargs) + return AdditionalPropertiesWithArrayOfEnums.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalPropertiesWithArrayOfEnumsDictInput, + AdditionalPropertiesWithArrayOfEnumsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesWithArrayOfEnumsDict: + return AdditionalPropertiesWithArrayOfEnums.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesTuple, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + AdditionalPropertiesTuple, + val + ) +AdditionalPropertiesWithArrayOfEnumsDictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalPropertiesTupleInput, + AdditionalPropertiesTuple + ], +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalPropertiesWithArrayOfEnums( + schemas.Schema[AdditionalPropertiesWithArrayOfEnumsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalPropertiesWithArrayOfEnumsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalPropertiesWithArrayOfEnumsDictInput, + AdditionalPropertiesWithArrayOfEnumsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesWithArrayOfEnumsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/address.py b/samples/client/petstore/python/src/openapi_client/components/schema/address.py new file mode 100644 index 00000000000..587ee5f7c2e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/address.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema + + +class AddressDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: int, + ): + used_kwargs = typing.cast(AddressDictInput, kwargs) + return Address.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AddressDictInput, + AddressDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AddressDict: + return Address.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) +AddressDictInput = typing.Mapping[ + str, + int, +] + + +@dataclasses.dataclass(frozen=True) +class Address( + schemas.Schema[AddressDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AddressDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AddressDictInput, + AddressDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AddressDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/animal.py b/samples/client/petstore/python/src/openapi_client/components/schema/animal.py new file mode 100644 index 00000000000..3daaf0428b9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/animal.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +ClassName: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class Color( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["red"] = "red" +Properties = typing.TypedDict( + 'Properties', + { + "className": typing.Type[ClassName], + "color": typing.Type[Color], + } +) + + +class AnimalDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "className", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "color", + }) + + def __new__( + cls, + *, + className: str, + color: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "className": className, + } + for key_, val in ( + ("color", color), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AnimalDictInput, arg_) + return Animal.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AnimalDictInput, + AnimalDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AnimalDict: + return Animal.validate(arg, configuration=configuration) + + @property + def className(self) -> str: + return typing.cast( + str, + self.__getitem__("className") + ) + + @property + def color(self) -> typing.Union[str, schemas.Unset]: + val = self.get("color", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AnimalDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Animal( + schemas.Schema[AnimalDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "className", + }) + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'className': { + 'Cat': cat.Cat, + 'Dog': dog.Dog, + } + } + ) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AnimalDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AnimalDictInput, + AnimalDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AnimalDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + +from openapi_client.components.schema import cat +from openapi_client.components.schema import dog diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py b/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py new file mode 100644 index 00000000000..3101c2d6b75 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py @@ -0,0 +1,75 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import animal + + +class AnimalFarmTuple( + typing.Tuple[ + animal.AnimalDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[AnimalFarmTupleInput, AnimalFarmTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return AnimalFarm.validate(arg, configuration=configuration) +AnimalFarmTupleInput = typing.Union[ + typing.List[ + typing.Union[ + animal.AnimalDictInput, + animal.AnimalDict, + ], + ], + typing.Tuple[ + typing.Union[ + animal.AnimalDictInput, + animal.AnimalDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class AnimalFarm( + schemas.Schema[schemas.immutabledict, AnimalFarmTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[animal.Animal] = dataclasses.field(default_factory=lambda: animal.Animal) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: AnimalFarmTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AnimalFarmTupleInput, + AnimalFarmTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AnimalFarmTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py new file mode 100644 index 00000000000..ca84f9d4be2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py @@ -0,0 +1,295 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Uuid( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'uuid' + + + +@dataclasses.dataclass(frozen=True) +class Date( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'date' + + + +@dataclasses.dataclass(frozen=True) +class DateTime( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'date-time' + + + +@dataclasses.dataclass(frozen=True) +class Number( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'number' + + + +@dataclasses.dataclass(frozen=True) +class Binary( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'binary' + + + +@dataclasses.dataclass(frozen=True) +class Int32( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'int32' + + + +@dataclasses.dataclass(frozen=True) +class Int64( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'int64' + + + +@dataclasses.dataclass(frozen=True) +class Double( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'double' + + + +@dataclasses.dataclass(frozen=True) +class Float( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + format: str = 'float' + +Properties = typing.TypedDict( + 'Properties', + { + "uuid": typing.Type[Uuid], + "date": typing.Type[Date], + "date-time": typing.Type[DateTime], + "number": typing.Type[Number], + "binary": typing.Type[Binary], + "int32": typing.Type[Int32], + "int64": typing.Type[Int64], + "double": typing.Type[Double], + "float": typing.Type[Float], + } +) + + +class AnyTypeAndFormatDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "uuid", + "date", + "date-time", + "number", + "binary", + "int32", + "int64", + "double", + "float", + }) + + def __new__( + cls, + *, + uuid: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + date: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + number: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + binary: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + int32: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + int64: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + double: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + float: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("uuid", uuid), + ("date", date), + ("number", number), + ("binary", binary), + ("int32", int32), + ("int64", int64), + ("double", double), + ("float", float), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AnyTypeAndFormatDictInput, arg_) + return AnyTypeAndFormat.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AnyTypeAndFormatDictInput, + AnyTypeAndFormatDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AnyTypeAndFormatDict: + return AnyTypeAndFormat.validate(arg, configuration=configuration) + + @property + def uuid(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("uuid", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def date(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("date", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def number(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("number", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def binary(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("binary", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def int32(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("int32", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def int64(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("int64", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def double(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("double", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def float(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AnyTypeAndFormatDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class AnyTypeAndFormat( + schemas.Schema[AnyTypeAndFormatDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AnyTypeAndFormatDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AnyTypeAndFormatDictInput, + AnyTypeAndFormatDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AnyTypeAndFormatDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py new file mode 100644 index 00000000000..ec62fe2c822 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py @@ -0,0 +1,27 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not: typing_extensions.TypeAlias = schemas.StrSchema + + +@dataclasses.dataclass(frozen=True) +class AnyTypeNotString( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py b/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py new file mode 100644 index 00000000000..833210dd37e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Code: typing_extensions.TypeAlias = schemas.Int32Schema +Type: typing_extensions.TypeAlias = schemas.StrSchema +Message: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "code": typing.Type[Code], + "type": typing.Type[Type], + "message": typing.Type[Message], + } +) + + +class ApiResponseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "code", + "type", + "message", + }) + + def __new__( + cls, + *, + code: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + type: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + message: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("code", code), + ("type", type), + ("message", message), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ApiResponseDictInput, arg_) + return ApiResponse.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ApiResponseDictInput, + ApiResponseDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ApiResponseDict: + return ApiResponse.validate(arg, configuration=configuration) + + @property + def code(self) -> typing.Union[int, schemas.Unset]: + val = self.get("code", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def type(self) -> typing.Union[str, schemas.Unset]: + val = self.get("type", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def message(self) -> typing.Union[str, schemas.Unset]: + val = self.get("message", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ApiResponseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse( + schemas.Schema[ApiResponseDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ApiResponseDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ApiResponseDictInput, + ApiResponseDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ApiResponseDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/apple.py b/samples/client/petstore/python/src/openapi_client/components/schema/apple.py new file mode 100644 index 00000000000..a7e6c5255ba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/apple.py @@ -0,0 +1,166 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Cultivar( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^[a-zA-Z\s]*$' # noqa: E501 + ) + + +@dataclasses.dataclass(frozen=True) +class Origin( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^[A-Z\s]*$', # noqa: E501 + flags=re.I, + ) +Properties = typing.TypedDict( + 'Properties', + { + "cultivar": typing.Type[Cultivar], + "origin": typing.Type[Origin], + } +) + + +class AppleDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "cultivar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "origin", + }) + + def __new__( + cls, + *, + cultivar: str, + origin: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "cultivar": cultivar, + } + for key_, val in ( + ("origin", origin), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(AppleDictInput, arg_) + return Apple.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AppleDictInput, + AppleDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AppleDict: + return Apple.validate(arg, configuration=configuration) + + @property + def cultivar(self) -> str: + return typing.cast( + str, + self.__getitem__("cultivar") + ) + + @property + def origin(self) -> typing.Union[str, schemas.Unset]: + val = self.get("origin", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +AppleDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Apple( + schemas.Schema[AppleDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + required: typing.FrozenSet[str] = frozenset({ + "cultivar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AppleDict, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + AppleDictInput, + AppleDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AppleDict: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py new file mode 100644 index 00000000000..a8b7d3bc0af --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py @@ -0,0 +1,141 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Cultivar: typing_extensions.TypeAlias = schemas.StrSchema +Mealy: typing_extensions.TypeAlias = schemas.BoolSchema +Properties = typing.TypedDict( + 'Properties', + { + "cultivar": typing.Type[Cultivar], + "mealy": typing.Type[Mealy], + } +) +AppleReqRequiredDictInput = typing.TypedDict( + 'AppleReqRequiredDictInput', + { + "cultivar": str, + } +) +AppleReqOptionalDictInput = typing.TypedDict( + 'AppleReqOptionalDictInput', + { + "mealy": bool, + }, + total=False +) + + +class AppleReqDict(schemas.immutabledict[str, typing.Union[ + bool, + str, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "cultivar", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "mealy", + }) + + def __new__( + cls, + *, + cultivar: str, + mealy: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "cultivar": cultivar, + } + for key_, val in ( + ("mealy", mealy), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(AppleReqDictInput, arg_) + return AppleReq.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AppleReqDictInput, + AppleReqDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AppleReqDict: + return AppleReq.validate(arg, configuration=configuration) + + @property + def cultivar(self) -> str: + return typing.cast( + str, + self.__getitem__("cultivar") + ) + + @property + def mealy(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("mealy", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + +class AppleReqDictInput(AppleReqRequiredDictInput, AppleReqOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class AppleReq( + schemas.Schema[AppleReqDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "cultivar", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AppleReqDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AppleReqDictInput, + AppleReqDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AppleReqDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py new file mode 100644 index 00000000000..669a0d92647 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py @@ -0,0 +1,74 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class ArrayHoldingAnyTypeTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayHoldingAnyTypeTupleInput, ArrayHoldingAnyTypeTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayHoldingAnyType.validate(arg, configuration=configuration) +ArrayHoldingAnyTypeTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayHoldingAnyType( + schemas.Schema[schemas.immutabledict, ArrayHoldingAnyTypeTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayHoldingAnyTypeTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayHoldingAnyTypeTupleInput, + ArrayHoldingAnyTypeTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayHoldingAnyTypeTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py new file mode 100644 index 00000000000..de9b1499382 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py @@ -0,0 +1,223 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items2: typing_extensions.TypeAlias = schemas.NumberSchema + + +class ItemsTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items.validate(arg, configuration=configuration) +ItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema[schemas.immutabledict, ItemsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput, + ItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ArrayArrayNumberTuple( + typing.Tuple[ + ItemsTuple, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayArrayNumberTupleInput, ArrayArrayNumberTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayArrayNumber.validate(arg, configuration=configuration) +ArrayArrayNumberTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayArrayNumber( + schemas.Schema[schemas.immutabledict, ArrayArrayNumberTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayArrayNumberTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayArrayNumberTupleInput, + ArrayArrayNumberTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayArrayNumberTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "ArrayArrayNumber": typing.Type[ArrayArrayNumber], + } +) + + +class ArrayOfArrayOfNumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "ArrayArrayNumber", + }) + + def __new__( + cls, + *, + ArrayArrayNumber: typing.Union[ + ArrayArrayNumberTupleInput, + ArrayArrayNumberTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("ArrayArrayNumber", ArrayArrayNumber), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ArrayOfArrayOfNumberOnlyDictInput, arg_) + return ArrayOfArrayOfNumberOnly.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ArrayOfArrayOfNumberOnlyDictInput, + ArrayOfArrayOfNumberOnlyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfArrayOfNumberOnlyDict: + return ArrayOfArrayOfNumberOnly.validate(arg, configuration=configuration) + + @property + def ArrayArrayNumber(self) -> typing.Union[ArrayArrayNumberTuple, schemas.Unset]: + val = self.get("ArrayArrayNumber", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayArrayNumberTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ArrayOfArrayOfNumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ArrayOfArrayOfNumberOnly( + schemas.Schema[ArrayOfArrayOfNumberOnlyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ArrayOfArrayOfNumberOnlyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayOfArrayOfNumberOnlyDictInput, + ArrayOfArrayOfNumberOnlyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfArrayOfNumberOnlyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py new file mode 100644 index 00000000000..a95dfb0802d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py @@ -0,0 +1,92 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import string_enum + + +class ArrayOfEnumsTuple( + typing.Tuple[ + typing.Union[ + None, + typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], + ], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayOfEnumsTupleInput, ArrayOfEnumsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayOfEnums.validate(arg, configuration=configuration) +ArrayOfEnumsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + ], + ], + typing.Tuple[ + typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayOfEnums( + schemas.Schema[schemas.immutabledict, ArrayOfEnumsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[string_enum.StringEnum] = dataclasses.field(default_factory=lambda: string_enum.StringEnum) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayOfEnumsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayOfEnumsTupleInput, + ArrayOfEnumsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfEnumsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py new file mode 100644 index 00000000000..ed3680d02d3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py @@ -0,0 +1,167 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.NumberSchema + + +class ArrayNumberTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayNumberTupleInput, ArrayNumberTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayNumber.validate(arg, configuration=configuration) +ArrayNumberTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayNumber( + schemas.Schema[schemas.immutabledict, ArrayNumberTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayNumberTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayNumberTupleInput, + ArrayNumberTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayNumberTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "ArrayNumber": typing.Type[ArrayNumber], + } +) + + +class ArrayOfNumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "ArrayNumber", + }) + + def __new__( + cls, + *, + ArrayNumber: typing.Union[ + ArrayNumberTupleInput, + ArrayNumberTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("ArrayNumber", ArrayNumber), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ArrayOfNumberOnlyDictInput, arg_) + return ArrayOfNumberOnly.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ArrayOfNumberOnlyDictInput, + ArrayOfNumberOnlyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfNumberOnlyDict: + return ArrayOfNumberOnly.validate(arg, configuration=configuration) + + @property + def ArrayNumber(self) -> typing.Union[ArrayNumberTuple, schemas.Unset]: + val = self.get("ArrayNumber", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayNumberTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ArrayOfNumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ArrayOfNumberOnly( + schemas.Schema[ArrayOfNumberOnlyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ArrayOfNumberOnlyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayOfNumberOnlyDictInput, + ArrayOfNumberOnlyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfNumberOnlyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py new file mode 100644 index 00000000000..3cb1d35f117 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py @@ -0,0 +1,418 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class ArrayOfStringTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayOfStringTupleInput, ArrayOfStringTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayOfString.validate(arg, configuration=configuration) +ArrayOfStringTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayOfString( + schemas.Schema[schemas.immutabledict, ArrayOfStringTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayOfStringTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayOfStringTupleInput, + ArrayOfStringTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayOfStringTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Items3: typing_extensions.TypeAlias = schemas.Int64Schema + + +class ItemsTuple( + typing.Tuple[ + int, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items2.validate(arg, configuration=configuration) +ItemsTupleInput = typing.Union[ + typing.List[ + int, + ], + typing.Tuple[ + int, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items2( + schemas.Schema[schemas.immutabledict, ItemsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput, + ItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ArrayArrayOfIntegerTuple( + typing.Tuple[ + ItemsTuple, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayArrayOfIntegerTupleInput, ArrayArrayOfIntegerTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayArrayOfInteger.validate(arg, configuration=configuration) +ArrayArrayOfIntegerTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput, + ItemsTuple + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayArrayOfInteger( + schemas.Schema[schemas.immutabledict, ArrayArrayOfIntegerTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayArrayOfIntegerTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayArrayOfIntegerTupleInput, + ArrayArrayOfIntegerTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayArrayOfIntegerTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + +from openapi_client.components.schema import read_only_first + + +class ItemsTuple2( + typing.Tuple[ + read_only_first.ReadOnlyFirstDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items4.validate(arg, configuration=configuration) +ItemsTupleInput2 = typing.Union[ + typing.List[ + typing.Union[ + read_only_first.ReadOnlyFirstDictInput, + read_only_first.ReadOnlyFirstDict, + ], + ], + typing.Tuple[ + typing.Union[ + read_only_first.ReadOnlyFirstDictInput, + read_only_first.ReadOnlyFirstDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items4( + schemas.Schema[schemas.immutabledict, ItemsTuple2] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[read_only_first.ReadOnlyFirst] = dataclasses.field(default_factory=lambda: read_only_first.ReadOnlyFirst) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple2 + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput2, + ItemsTuple2, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple2: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class ArrayArrayOfModelTuple( + typing.Tuple[ + ItemsTuple2, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayArrayOfModelTupleInput, ArrayArrayOfModelTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayArrayOfModel.validate(arg, configuration=configuration) +ArrayArrayOfModelTupleInput = typing.Union[ + typing.List[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ], + typing.Tuple[ + typing.Union[ + ItemsTupleInput2, + ItemsTuple2 + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayArrayOfModel( + schemas.Schema[schemas.immutabledict, ArrayArrayOfModelTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayArrayOfModelTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayArrayOfModelTupleInput, + ArrayArrayOfModelTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayArrayOfModelTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "array_of_string": typing.Type[ArrayOfString], + "array_array_of_integer": typing.Type[ArrayArrayOfInteger], + "array_array_of_model": typing.Type[ArrayArrayOfModel], + } +) + + +class ArrayTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "array_of_string", + "array_array_of_integer", + "array_array_of_model", + }) + + def __new__( + cls, + *, + array_of_string: typing.Union[ + ArrayOfStringTupleInput, + ArrayOfStringTuple, + schemas.Unset + ] = schemas.unset, + array_array_of_integer: typing.Union[ + ArrayArrayOfIntegerTupleInput, + ArrayArrayOfIntegerTuple, + schemas.Unset + ] = schemas.unset, + array_array_of_model: typing.Union[ + ArrayArrayOfModelTupleInput, + ArrayArrayOfModelTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("array_of_string", array_of_string), + ("array_array_of_integer", array_array_of_integer), + ("array_array_of_model", array_array_of_model), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ArrayTestDictInput, arg_) + return ArrayTest.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ArrayTestDictInput, + ArrayTestDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayTestDict: + return ArrayTest.validate(arg, configuration=configuration) + + @property + def array_of_string(self) -> typing.Union[ArrayOfStringTuple, schemas.Unset]: + val = self.get("array_of_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayOfStringTuple, + val + ) + + @property + def array_array_of_integer(self) -> typing.Union[ArrayArrayOfIntegerTuple, schemas.Unset]: + val = self.get("array_array_of_integer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayArrayOfIntegerTuple, + val + ) + + @property + def array_array_of_model(self) -> typing.Union[ArrayArrayOfModelTuple, schemas.Unset]: + val = self.get("array_array_of_model", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayArrayOfModelTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ArrayTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ArrayTest( + schemas.Schema[ArrayTestDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ArrayTestDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayTestDictInput, + ArrayTestDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayTestDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py new file mode 100644 index 00000000000..3be8febdf72 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py @@ -0,0 +1,79 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Int64Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int64' + inclusive_maximum: typing.Union[int, float] = 7 + + +class ArrayWithValidationsInItemsTuple( + typing.Tuple[ + int, + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayWithValidationsInItemsTupleInput, ArrayWithValidationsInItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayWithValidationsInItems.validate(arg, configuration=configuration) +ArrayWithValidationsInItemsTupleInput = typing.Union[ + typing.List[ + int, + ], + typing.Tuple[ + int, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayWithValidationsInItems( + schemas.Schema[schemas.immutabledict, ArrayWithValidationsInItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + max_items: int = 2 + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayWithValidationsInItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayWithValidationsInItemsTupleInput, + ArrayWithValidationsInItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayWithValidationsInItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/banana.py b/samples/client/petstore/python/src/openapi_client/components/schema/banana.py new file mode 100644 index 00000000000..3450011c99a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/banana.py @@ -0,0 +1,106 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema +Properties = typing.TypedDict( + 'Properties', + { + "lengthCm": typing.Type[LengthCm], + } +) + + +class BananaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "lengthCm", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + lengthCm: typing.Union[ + int, + float + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "lengthCm": lengthCm, + } + arg_.update(kwargs) + used_arg_ = typing.cast(BananaDictInput, arg_) + return Banana.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + BananaDictInput, + BananaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BananaDict: + return Banana.validate(arg, configuration=configuration) + + @property + def lengthCm(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("lengthCm") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +BananaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Banana( + schemas.Schema[BananaDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "lengthCm", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: BananaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + BananaDictInput, + BananaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BananaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py new file mode 100644 index 00000000000..b9403b8d51a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py @@ -0,0 +1,147 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema +Sweet: typing_extensions.TypeAlias = schemas.BoolSchema +Properties = typing.TypedDict( + 'Properties', + { + "lengthCm": typing.Type[LengthCm], + "sweet": typing.Type[Sweet], + } +) +BananaReqRequiredDictInput = typing.TypedDict( + 'BananaReqRequiredDictInput', + { + "lengthCm": typing.Union[ + int, + float + ], + } +) +BananaReqOptionalDictInput = typing.TypedDict( + 'BananaReqOptionalDictInput', + { + "sweet": bool, + }, + total=False +) + + +class BananaReqDict(schemas.immutabledict[str, typing.Union[ + bool, + typing.Union[int, float], +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "lengthCm", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "sweet", + }) + + def __new__( + cls, + *, + lengthCm: typing.Union[ + int, + float + ], + sweet: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "lengthCm": lengthCm, + } + for key_, val in ( + ("sweet", sweet), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(BananaReqDictInput, arg_) + return BananaReq.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + BananaReqDictInput, + BananaReqDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BananaReqDict: + return BananaReq.validate(arg, configuration=configuration) + + @property + def lengthCm(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("lengthCm") + ) + + @property + def sweet(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("sweet", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + +class BananaReqDictInput(BananaReqRequiredDictInput, BananaReqOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class BananaReq( + schemas.Schema[BananaReqDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "lengthCm", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: BananaReqDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + BananaReqDictInput, + BananaReqDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BananaReqDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/bar.py b/samples/client/petstore/python/src/openapi_client/components/schema/bar.py new file mode 100644 index 00000000000..82a834981c2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/bar.py @@ -0,0 +1,27 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Bar( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["bar"] = "bar" diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py new file mode 100644 index 00000000000..39a3c96a06a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py @@ -0,0 +1,158 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ClassNameEnums: + + @schemas.classproperty + def BASQUE_PIG(cls) -> typing.Literal["BasquePig"]: + return ClassName.validate("BasquePig") + + +@dataclasses.dataclass(frozen=True) +class ClassName( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "BasquePig": "BASQUE_PIG", + } + ) + enums = ClassNameEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["BasquePig"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["BasquePig"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["BasquePig",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "BasquePig", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "BasquePig", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "className": typing.Type[ClassName], + } +) + + +class BasquePigDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "className", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + className: typing.Literal[ + "BasquePig" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "className": className, + } + arg_.update(kwargs) + used_arg_ = typing.cast(BasquePigDictInput, arg_) + return BasquePig.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + BasquePigDictInput, + BasquePigDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BasquePigDict: + return BasquePig.validate(arg, configuration=configuration) + + @property + def className(self) -> typing.Literal["BasquePig"]: + return typing.cast( + typing.Literal["BasquePig"], + self.__getitem__("className") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +BasquePigDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class BasquePig( + schemas.Schema[BasquePigDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "className", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: BasquePigDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + BasquePigDictInput, + BasquePigDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> BasquePigDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py b/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py new file mode 100644 index 00000000000..c25e1c02d57 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Boolean: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py new file mode 100644 index 00000000000..0b735572d6f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py @@ -0,0 +1,71 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class BooleanEnumEnums: + + @schemas.classproperty + def TRUE(cls) -> typing.Literal[True]: + return BooleanEnum.validate(True) + + +@dataclasses.dataclass(frozen=True) +class BooleanEnum( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + schemas.Bool.TRUE: "TRUE", + } + ) + enums = BooleanEnumEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + True, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + True, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py b/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py new file mode 100644 index 00000000000..0cae531b32e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py @@ -0,0 +1,200 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +SmallCamel: typing_extensions.TypeAlias = schemas.StrSchema +CapitalCamel: typing_extensions.TypeAlias = schemas.StrSchema +SmallSnake: typing_extensions.TypeAlias = schemas.StrSchema +CapitalSnake: typing_extensions.TypeAlias = schemas.StrSchema +SCAETHFlowPoints: typing_extensions.TypeAlias = schemas.StrSchema +ATTNAME: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "smallCamel": typing.Type[SmallCamel], + "CapitalCamel": typing.Type[CapitalCamel], + "small_Snake": typing.Type[SmallSnake], + "Capital_Snake": typing.Type[CapitalSnake], + "SCA_ETH_Flow_Points": typing.Type[SCAETHFlowPoints], + "ATT_NAME": typing.Type[ATTNAME], + } +) + + +class CapitalizationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "smallCamel", + "CapitalCamel", + "small_Snake", + "Capital_Snake", + "SCA_ETH_Flow_Points", + "ATT_NAME", + }) + + def __new__( + cls, + *, + smallCamel: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + CapitalCamel: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + small_Snake: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + Capital_Snake: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + SCA_ETH_Flow_Points: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + ATT_NAME: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("smallCamel", smallCamel), + ("CapitalCamel", CapitalCamel), + ("small_Snake", small_Snake), + ("Capital_Snake", Capital_Snake), + ("SCA_ETH_Flow_Points", SCA_ETH_Flow_Points), + ("ATT_NAME", ATT_NAME), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(CapitalizationDictInput, arg_) + return Capitalization.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + CapitalizationDictInput, + CapitalizationDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CapitalizationDict: + return Capitalization.validate(arg, configuration=configuration) + + @property + def smallCamel(self) -> typing.Union[str, schemas.Unset]: + val = self.get("smallCamel", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def CapitalCamel(self) -> typing.Union[str, schemas.Unset]: + val = self.get("CapitalCamel", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def small_Snake(self) -> typing.Union[str, schemas.Unset]: + val = self.get("small_Snake", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def Capital_Snake(self) -> typing.Union[str, schemas.Unset]: + val = self.get("Capital_Snake", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def SCA_ETH_Flow_Points(self) -> typing.Union[str, schemas.Unset]: + val = self.get("SCA_ETH_Flow_Points", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def ATT_NAME(self) -> typing.Union[str, schemas.Unset]: + val = self.get("ATT_NAME", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +CapitalizationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Capitalization( + schemas.Schema[CapitalizationDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: CapitalizationDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + CapitalizationDictInput, + CapitalizationDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CapitalizationDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/cat.py b/samples/client/petstore/python/src/openapi_client/components/schema/cat.py new file mode 100644 index 00000000000..d6cdba17fe0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/cat.py @@ -0,0 +1,123 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Declawed: typing_extensions.TypeAlias = schemas.BoolSchema +Properties = typing.TypedDict( + 'Properties', + { + "declawed": typing.Type[Declawed], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "declawed", + }) + + def __new__( + cls, + *, + declawed: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("declawed", declawed), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def declawed(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("declawed", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[animal.Animal], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Cat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/category.py b/samples/client/petstore/python/src/openapi_client/components/schema/category.py new file mode 100644 index 00000000000..f7fae09737f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/category.py @@ -0,0 +1,135 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Id: typing_extensions.TypeAlias = schemas.Int64Schema + + +@dataclasses.dataclass(frozen=True) +class Name( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["default-name"] = "default-name" +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "name": typing.Type[Name], + } +) + + +class CategoryDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "name", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + }) + + def __new__( + cls, + *, + name: str, + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "name": name, + } + for key_, val in ( + ("id", id), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(CategoryDictInput, arg_) + return Category.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + CategoryDictInput, + CategoryDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CategoryDict: + return Category.validate(arg, configuration=configuration) + + @property + def name(self) -> str: + return typing.cast( + str, + self.__getitem__("name") + ) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +CategoryDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Category( + schemas.Schema[CategoryDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "name", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: CategoryDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + CategoryDictInput, + CategoryDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CategoryDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py b/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py new file mode 100644 index 00000000000..7a3d03af662 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py @@ -0,0 +1,123 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + }) + + def __new__( + cls, + *, + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("name", name), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[parent_pet.ParentPet], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class ChildCat( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/class_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/class_model.py new file mode 100644 index 00000000000..e21f53fea5a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/class_model.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Class: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "_class": typing.Type[Class], + } +) + + +class ClassModelDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "_class", + }) + + def __new__( + cls, + *, + _class: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("_class", _class), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ClassModelDictInput, arg_) + return ClassModel.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ClassModelDictInput, + ClassModelDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ClassModelDict: + return ClassModel.validate(arg, configuration=configuration) + + @property + def _class(self) -> typing.Union[str, schemas.Unset]: + val = self.get("_class", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ClassModelDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ClassModel( + schemas.AnyTypeSchema[ClassModelDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Model for testing model with "_class" property + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ClassModelDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/client.py b/samples/client/petstore/python/src/openapi_client/components/schema/client.py new file mode 100644 index 00000000000..fb8f129a071 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/client.py @@ -0,0 +1,110 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Client2: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "client": typing.Type[Client2], + } +) + + +class ClientDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "client", + }) + + def __new__( + cls, + *, + client: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("client", client), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ClientDictInput, arg_) + return Client.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ClientDictInput, + ClientDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ClientDict: + return Client.validate(arg, configuration=configuration) + + @property + def client(self) -> typing.Union[str, schemas.Unset]: + val = self.get("client", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ClientDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Client( + schemas.Schema[ClientDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ClientDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ClientDictInput, + ClientDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ClientDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py new file mode 100644 index 00000000000..3b5534c17a7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py @@ -0,0 +1,178 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class QuadrilateralTypeEnums: + + @schemas.classproperty + def COMPLEX_QUADRILATERAL(cls) -> typing.Literal["ComplexQuadrilateral"]: + return QuadrilateralType.validate("ComplexQuadrilateral") + + +@dataclasses.dataclass(frozen=True) +class QuadrilateralType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "ComplexQuadrilateral": "COMPLEX_QUADRILATERAL", + } + ) + enums = QuadrilateralTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["ComplexQuadrilateral"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["ComplexQuadrilateral"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["ComplexQuadrilateral",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "ComplexQuadrilateral", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "ComplexQuadrilateral", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "quadrilateralType": typing.Type[QuadrilateralType], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "quadrilateralType", + }) + + def __new__( + cls, + *, + quadrilateralType: typing.Union[ + typing.Literal[ + "ComplexQuadrilateral" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("quadrilateralType", quadrilateralType), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def quadrilateralType(self) -> typing.Union[typing.Literal["ComplexQuadrilateral"], schemas.Unset]: + val = self.get("quadrilateralType", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["ComplexQuadrilateral"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[quadrilateral_interface.QuadrilateralInterface], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class ComplexQuadrilateral( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py new file mode 100644 index 00000000000..6c7dd559314 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py @@ -0,0 +1,116 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.DictSchema +_1: typing_extensions.TypeAlias = schemas.DateSchema +_2: typing_extensions.TypeAlias = schemas.DateTimeSchema +_3: typing_extensions.TypeAlias = schemas.BinarySchema +_4: typing_extensions.TypeAlias = schemas.StrSchema +_5: typing_extensions.TypeAlias = schemas.StrSchema +_6: typing_extensions.TypeAlias = schemas.DictSchema +_7: typing_extensions.TypeAlias = schemas.BoolSchema +_8: typing_extensions.TypeAlias = schemas.NoneSchema +Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class _9Tuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[_9TupleInput, _9Tuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return _9.validate(arg, configuration=configuration) +_9TupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class _9( + schemas.Schema[schemas.immutabledict, _9Tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: _9Tuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _9TupleInput, + _9Tuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _9Tuple: + return super().validate_base( + arg, + configuration=configuration, + ) +_10: typing_extensions.TypeAlias = schemas.NumberSchema +_11: typing_extensions.TypeAlias = schemas.Float32Schema +_12: typing_extensions.TypeAlias = schemas.Float64Schema +_13: typing_extensions.TypeAlias = schemas.IntSchema +_14: typing_extensions.TypeAlias = schemas.Int32Schema +_15: typing_extensions.TypeAlias = schemas.Int64Schema +AnyOf = typing.Tuple[ + typing.Type[_0], + typing.Type[_1], + typing.Type[_2], + typing.Type[_3], + typing.Type[_4], + typing.Type[_5], + typing.Type[_6], + typing.Type[_7], + typing.Type[_8], + typing.Type[_9], + typing.Type[_10], + typing.Type[_11], + typing.Type[_12], + typing.Type[_13], + typing.Type[_14], + typing.Type[_15], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedAnyOfDifferentTypesNoValidations( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py new file mode 100644 index 00000000000..4e7cbe09efd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py @@ -0,0 +1,74 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class ComposedArrayTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ComposedArrayTupleInput, ComposedArrayTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ComposedArray.validate(arg, configuration=configuration) +ComposedArrayTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ComposedArray( + schemas.Schema[schemas.immutabledict, ComposedArrayTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ComposedArrayTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ComposedArrayTupleInput, + ComposedArrayTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ComposedArrayTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py new file mode 100644 index 00000000000..30109a4921e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedBool( + schemas.BoolSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + schemas.Bool, + }) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py new file mode 100644 index 00000000000..e14ab0e5173 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py @@ -0,0 +1,32 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedNone( + schemas.NoneSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + }) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py new file mode 100644 index 00000000000..30bf62b62e0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py @@ -0,0 +1,32 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedNumber( + schemas.NumberSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py new file mode 100644 index 00000000000..21ee542d153 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py @@ -0,0 +1,41 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedObject( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py new file mode 100644 index 00000000000..3509b805cf0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_2: typing_extensions.TypeAlias = schemas.NoneSchema +_3: typing_extensions.TypeAlias = schemas.DateSchema + + +@dataclasses.dataclass(frozen=True) +class _4( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + max_properties: int = 4 + min_properties: int = 4 + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + +Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class _5Tuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[_5TupleInput, _5Tuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return _5.validate(arg, configuration=configuration) +_5TupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class _5( + schemas.Schema[schemas.immutabledict, _5Tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + max_items: int = 4 + min_items: int = 4 + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: _5Tuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _5TupleInput, + _5Tuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _5Tuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +@dataclasses.dataclass(frozen=True) +class _6( + schemas.DateTimeSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'date-time' + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^2020.*' # noqa: E501 + ) +OneOf = typing.Tuple[ + typing.Type[number_with_validations.NumberWithValidations], + typing.Type[animal.Animal], + typing.Type[_2], + typing.Type[_3], + typing.Type[_4], + typing.Type[_5], + typing.Type[_6], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedOneOfDifferentTypes( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + this is a model that allows payloads of type object or number + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py new file mode 100644 index 00000000000..3c7731aed1d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class ComposedString( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/currency.py b/samples/client/petstore/python/src/openapi_client/components/schema/currency.py new file mode 100644 index 00000000000..6f87503ad0b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/currency.py @@ -0,0 +1,85 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class CurrencyEnums: + + @schemas.classproperty + def EUR(cls) -> typing.Literal["eur"]: + return Currency.validate("eur") + + @schemas.classproperty + def USD(cls) -> typing.Literal["usd"]: + return Currency.validate("usd") + + +@dataclasses.dataclass(frozen=True) +class Currency( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "eur": "EUR", + "usd": "USD", + } + ) + enums = CurrencyEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["eur"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["eur"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["usd"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["usd"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["eur","usd",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "eur", + "usd", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "eur", + "usd", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py new file mode 100644 index 00000000000..d6d17afe1eb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py @@ -0,0 +1,158 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ClassNameEnums: + + @schemas.classproperty + def DANISH_PIG(cls) -> typing.Literal["DanishPig"]: + return ClassName.validate("DanishPig") + + +@dataclasses.dataclass(frozen=True) +class ClassName( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "DanishPig": "DANISH_PIG", + } + ) + enums = ClassNameEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["DanishPig"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["DanishPig"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["DanishPig",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "DanishPig", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "DanishPig", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "className": typing.Type[ClassName], + } +) + + +class DanishPigDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "className", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + className: typing.Literal[ + "DanishPig" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "className": className, + } + arg_.update(kwargs) + used_arg_ = typing.cast(DanishPigDictInput, arg_) + return DanishPig.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + DanishPigDictInput, + DanishPigDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DanishPigDict: + return DanishPig.validate(arg, configuration=configuration) + + @property + def className(self) -> typing.Literal["DanishPig"]: + return typing.cast( + typing.Literal["DanishPig"], + self.__getitem__("className") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +DanishPigDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class DanishPig( + schemas.Schema[DanishPigDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "className", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: DanishPigDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + DanishPigDictInput, + DanishPigDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DanishPigDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py new file mode 100644 index 00000000000..121afc68898 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateTimeTest( + schemas.DateTimeSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'date-time' + default: typing.Literal["2010-01-01T10:10:10.000111+01:00"] = "2010-01-01T10:10:10.000111+01:00" diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py new file mode 100644 index 00000000000..19b0c354e0e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py @@ -0,0 +1,30 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateTimeWithValidations( + schemas.DateTimeSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'date-time' + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^2020.*' # noqa: E501 + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py new file mode 100644 index 00000000000..f1a03aad7ab --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py @@ -0,0 +1,30 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class DateWithValidations( + schemas.DateSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'date' + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^2020.*' # noqa: E501 + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py b/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py new file mode 100644 index 00000000000..0254a80e7f1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +DecimalPayload: typing_extensions.TypeAlias = schemas.DecimalSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/dog.py b/samples/client/petstore/python/src/openapi_client/components/schema/dog.py new file mode 100644 index 00000000000..3996fe05066 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/dog.py @@ -0,0 +1,123 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Breed: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "breed": typing.Type[Breed], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "breed", + }) + + def __new__( + cls, + *, + breed: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("breed", breed), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def breed(self) -> typing.Union[str, schemas.Unset]: + val = self.get("breed", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[animal.Animal], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class Dog( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py b/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py new file mode 100644 index 00000000000..45022f7e57a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py @@ -0,0 +1,259 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import fruit +from openapi_client.components.schema import nullable_shape +from openapi_client.components.schema import shape +from openapi_client.components.schema import shape_or_null + + +class ShapesTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[ShapesTupleInput, ShapesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Shapes.validate(arg, configuration=configuration) +ShapesTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Shapes( + schemas.Schema[schemas.immutabledict, ShapesTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[shape.Shape] = dataclasses.field(default_factory=lambda: shape.Shape) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ShapesTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ShapesTupleInput, + ShapesTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ShapesTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "mainShape": typing.Type[shape.Shape], + "shapeOrNull": typing.Type[shape_or_null.ShapeOrNull], + "nullableShape": typing.Type[nullable_shape.NullableShape], + "shapes": typing.Type[Shapes], + } +) + + +class DrawingDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "mainShape", + "shapeOrNull", + "nullableShape", + "shapes", + }) + + def __new__( + cls, + *, + mainShape: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + shapeOrNull: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + nullableShape: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + shapes: typing.Union[ + ShapesTupleInput, + ShapesTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("mainShape", mainShape), + ("shapeOrNull", shapeOrNull), + ("nullableShape", nullableShape), + ("shapes", shapes), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(DrawingDictInput, arg_) + return Drawing.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + DrawingDictInput, + DrawingDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DrawingDict: + return Drawing.validate(arg, configuration=configuration) + + @property + def mainShape(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("mainShape", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + @property + def shapeOrNull(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("shapeOrNull", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + @property + def nullableShape(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("nullableShape", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + @property + def shapes(self) -> typing.Union[ShapesTuple, schemas.Unset]: + val = self.get("shapes", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ShapesTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +DrawingDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + ShapesTupleInput, + ShapesTuple + ], + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ] +] + + +@dataclasses.dataclass(frozen=True) +class Drawing( + schemas.Schema[DrawingDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[fruit.Fruit] = dataclasses.field(default_factory=lambda: fruit.Fruit) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: DrawingDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + DrawingDictInput, + DrawingDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DrawingDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py new file mode 100644 index 00000000000..f2aca519745 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py @@ -0,0 +1,322 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class JustSymbolEnums: + + @schemas.classproperty + def GREATER_THAN_SIGN_EQUALS_SIGN(cls) -> typing.Literal[">="]: + return JustSymbol.validate(">=") + + @schemas.classproperty + def DOLLAR_SIGN(cls) -> typing.Literal["$"]: + return JustSymbol.validate("$") + + +@dataclasses.dataclass(frozen=True) +class JustSymbol( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + ">=": "GREATER_THAN_SIGN_EQUALS_SIGN", + "$": "DOLLAR_SIGN", + } + ) + enums = JustSymbolEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[">="], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">="]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["$"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["$"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">=","$",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + ">=", + "$", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + ">=", + "$", + ], + validated_arg + ) + + +class ItemsEnums: + + @schemas.classproperty + def FISH(cls) -> typing.Literal["fish"]: + return Items.validate("fish") + + @schemas.classproperty + def CRAB(cls) -> typing.Literal["crab"]: + return Items.validate("crab") + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "fish": "FISH", + "crab": "CRAB", + } + ) + enums = ItemsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["fish"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["fish"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["crab"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["crab"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["fish","crab",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "fish", + "crab", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "fish", + "crab", + ], + validated_arg + ) + + +class ArrayEnumTuple( + typing.Tuple[ + typing.Literal["fish", "crab"], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayEnumTupleInput, ArrayEnumTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayEnum.validate(arg, configuration=configuration) +ArrayEnumTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + "fish", + "crab" + ], + ], + typing.Tuple[ + typing.Literal[ + "fish", + "crab" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayEnum( + schemas.Schema[schemas.immutabledict, ArrayEnumTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayEnumTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayEnumTupleInput, + ArrayEnumTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayEnumTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "just_symbol": typing.Type[JustSymbol], + "array_enum": typing.Type[ArrayEnum], + } +) + + +class EnumArraysDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "just_symbol", + "array_enum", + }) + + def __new__( + cls, + *, + just_symbol: typing.Union[ + typing.Literal[ + ">=", + "$" + ], + schemas.Unset + ] = schemas.unset, + array_enum: typing.Union[ + ArrayEnumTupleInput, + ArrayEnumTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("just_symbol", just_symbol), + ("array_enum", array_enum), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(EnumArraysDictInput, arg_) + return EnumArrays.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + EnumArraysDictInput, + EnumArraysDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumArraysDict: + return EnumArrays.validate(arg, configuration=configuration) + + @property + def just_symbol(self) -> typing.Union[typing.Literal[">=", "$"], schemas.Unset]: + val = self.get("just_symbol", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[">=", "$"], + val + ) + + @property + def array_enum(self) -> typing.Union[ArrayEnumTuple, schemas.Unset]: + val = self.get("array_enum", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayEnumTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +EnumArraysDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class EnumArrays( + schemas.Schema[EnumArraysDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: EnumArraysDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EnumArraysDictInput, + EnumArraysDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumArraysDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py new file mode 100644 index 00000000000..e8a7a816a82 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumClassEnums: + + @schemas.classproperty + def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: + return EnumClass.validate("_abc") + + @schemas.classproperty + def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: + return EnumClass.validate("-efg") + + @schemas.classproperty + def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: + return EnumClass.validate("(xyz)") + + @schemas.classproperty + def COUNT_1M(cls) -> typing.Literal["COUNT_1M"]: + return EnumClass.validate("COUNT_1M") + + @schemas.classproperty + def COUNT_50M(cls) -> typing.Literal["COUNT_50M"]: + return EnumClass.validate("COUNT_50M") + + +@dataclasses.dataclass(frozen=True) +class EnumClass( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["-efg"] = "-efg" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "_abc": "LOW_LINE_ABC", + "-efg": "HYPHEN_MINUS_EFG", + "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", + "COUNT_1M": "COUNT_1M", + "COUNT_50M": "COUNT_50M", + } + ) + enums = EnumClassEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["_abc"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["-efg"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["-efg"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["(xyz)"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["(xyz)"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["COUNT_1M"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["COUNT_1M"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["COUNT_50M"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["COUNT_50M"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc","-efg","(xyz)","COUNT_1M","COUNT_50M",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py new file mode 100644 index 00000000000..14b84ce607a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py @@ -0,0 +1,563 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class EnumStringEnums: + + @schemas.classproperty + def UPPER(cls) -> typing.Literal["UPPER"]: + return EnumString.validate("UPPER") + + @schemas.classproperty + def LOWER(cls) -> typing.Literal["lower"]: + return EnumString.validate("lower") + + @schemas.classproperty + def EMPTY(cls) -> typing.Literal[""]: + return EnumString.validate("") + + +@dataclasses.dataclass(frozen=True) +class EnumString( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "UPPER": "UPPER", + "lower": "LOWER", + "": "EMPTY", + } + ) + enums = EnumStringEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["UPPER"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["lower"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["lower"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[""], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[""]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER","lower","",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "UPPER", + "lower", + "", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "UPPER", + "lower", + "", + ], + validated_arg + ) + + +class EnumStringRequiredEnums: + + @schemas.classproperty + def UPPER(cls) -> typing.Literal["UPPER"]: + return EnumStringRequired.validate("UPPER") + + @schemas.classproperty + def LOWER(cls) -> typing.Literal["lower"]: + return EnumStringRequired.validate("lower") + + @schemas.classproperty + def EMPTY(cls) -> typing.Literal[""]: + return EnumStringRequired.validate("") + + +@dataclasses.dataclass(frozen=True) +class EnumStringRequired( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "UPPER": "UPPER", + "lower": "LOWER", + "": "EMPTY", + } + ) + enums = EnumStringRequiredEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["UPPER"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["lower"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["lower"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[""], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[""]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER","lower","",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "UPPER", + "lower", + "", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "UPPER", + "lower", + "", + ], + validated_arg + ) + + +class EnumIntegerEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return EnumInteger.validate(1) + + @schemas.classproperty + def NEGATIVE_1(cls) -> typing.Literal[-1]: + return EnumInteger.validate(-1) + + +@dataclasses.dataclass(frozen=True) +class EnumInteger( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int32' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + -1: "NEGATIVE_1", + } + ) + enums = EnumIntegerEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[-1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[-1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,-1,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 1, + -1, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 1, + -1, + ], + validated_arg + ) + + +class EnumNumberEnums: + + @schemas.classproperty + def POSITIVE_1_PT_1(cls) -> typing.Union[int, float]: + return EnumNumber.validate(1.1) + + @schemas.classproperty + def NEGATIVE_1_PT_2(cls) -> typing.Union[int, float]: + return EnumNumber.validate(-1.2) + + +@dataclasses.dataclass(frozen=True) +class EnumNumber( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'double' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1.1: "POSITIVE_1_PT_1", + -1.2: "NEGATIVE_1_PT_2", + } + ) + enums = EnumNumberEnums + + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg + +from openapi_client.components.schema import integer_enum +from openapi_client.components.schema import integer_enum_one_value +from openapi_client.components.schema import integer_enum_with_default_value +from openapi_client.components.schema import string_enum +from openapi_client.components.schema import string_enum_with_default_value +Properties = typing.TypedDict( + 'Properties', + { + "enum_string": typing.Type[EnumString], + "enum_string_required": typing.Type[EnumStringRequired], + "enum_integer": typing.Type[EnumInteger], + "enum_number": typing.Type[EnumNumber], + "stringEnum": typing.Type[string_enum.StringEnum], + "IntegerEnum": typing.Type[integer_enum.IntegerEnum], + "StringEnumWithDefaultValue": typing.Type[string_enum_with_default_value.StringEnumWithDefaultValue], + "IntegerEnumWithDefaultValue": typing.Type[integer_enum_with_default_value.IntegerEnumWithDefaultValue], + "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], + } +) + + +class EnumTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "enum_string_required", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "enum_string", + "enum_integer", + "enum_number", + "stringEnum", + "IntegerEnum", + "StringEnumWithDefaultValue", + "IntegerEnumWithDefaultValue", + "IntegerEnumOneValue", + }) + + def __new__( + cls, + *, + enum_string_required: typing.Literal[ + "UPPER", + "lower", + "" + ], + enum_string: typing.Union[ + typing.Literal[ + "UPPER", + "lower", + "" + ], + schemas.Unset + ] = schemas.unset, + enum_integer: typing.Union[ + typing.Literal[ + 1, + -1 + ], + schemas.Unset + ] = schemas.unset, + enum_number: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + stringEnum: typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + schemas.Unset + ] = schemas.unset, + IntegerEnum: typing.Union[ + typing.Literal[ + 0, + 1, + 2 + ], + schemas.Unset + ] = schemas.unset, + StringEnumWithDefaultValue: typing.Union[ + typing.Literal[ + "placed", + "approved", + "delivered" + ], + schemas.Unset + ] = schemas.unset, + IntegerEnumWithDefaultValue: typing.Union[ + typing.Literal[ + 0, + 1, + 2 + ], + schemas.Unset + ] = schemas.unset, + IntegerEnumOneValue: typing.Union[ + typing.Literal[ + 0 + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "enum_string_required": enum_string_required, + } + for key_, val in ( + ("enum_string", enum_string), + ("enum_integer", enum_integer), + ("enum_number", enum_number), + ("stringEnum", stringEnum), + ("IntegerEnum", IntegerEnum), + ("StringEnumWithDefaultValue", StringEnumWithDefaultValue), + ("IntegerEnumWithDefaultValue", IntegerEnumWithDefaultValue), + ("IntegerEnumOneValue", IntegerEnumOneValue), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(EnumTestDictInput, arg_) + return EnumTest.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + EnumTestDictInput, + EnumTestDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumTestDict: + return EnumTest.validate(arg, configuration=configuration) + + @property + def enum_string_required(self) -> typing.Literal["UPPER", "lower", ""]: + return typing.cast( + typing.Literal["UPPER", "lower", ""], + self.__getitem__("enum_string_required") + ) + + @property + def enum_string(self) -> typing.Union[typing.Literal["UPPER", "lower", ""], schemas.Unset]: + val = self.get("enum_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["UPPER", "lower", ""], + val + ) + + @property + def enum_integer(self) -> typing.Union[typing.Literal[1, -1], schemas.Unset]: + val = self.get("enum_integer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[1, -1], + val + ) + + @property + def enum_number(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("enum_number", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def stringEnum(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], schemas.Unset], + ]: + val = self.get("stringEnum", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], + ], + val + ) + + @property + def IntegerEnum(self) -> typing.Union[typing.Literal[0, 1, 2], schemas.Unset]: + val = self.get("IntegerEnum", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[0, 1, 2], + val + ) + + @property + def StringEnumWithDefaultValue(self) -> typing.Union[typing.Literal["placed", "approved", "delivered"], schemas.Unset]: + val = self.get("StringEnumWithDefaultValue", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["placed", "approved", "delivered"], + val + ) + + @property + def IntegerEnumWithDefaultValue(self) -> typing.Union[typing.Literal[0, 1, 2], schemas.Unset]: + val = self.get("IntegerEnumWithDefaultValue", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[0, 1, 2], + val + ) + + @property + def IntegerEnumOneValue(self) -> typing.Union[typing.Literal[0], schemas.Unset]: + val = self.get("IntegerEnumOneValue", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[0], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +EnumTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class EnumTest( + schemas.Schema[EnumTestDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "enum_string_required", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: EnumTestDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EnumTestDictInput, + EnumTestDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumTestDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py new file mode 100644 index 00000000000..7d0b8184c7f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py @@ -0,0 +1,178 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class TriangleTypeEnums: + + @schemas.classproperty + def EQUILATERAL_TRIANGLE(cls) -> typing.Literal["EquilateralTriangle"]: + return TriangleType.validate("EquilateralTriangle") + + +@dataclasses.dataclass(frozen=True) +class TriangleType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "EquilateralTriangle": "EQUILATERAL_TRIANGLE", + } + ) + enums = TriangleTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["EquilateralTriangle"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["EquilateralTriangle"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["EquilateralTriangle",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "EquilateralTriangle", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "EquilateralTriangle", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "triangleType": typing.Type[TriangleType], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "triangleType", + }) + + def __new__( + cls, + *, + triangleType: typing.Union[ + typing.Literal[ + "EquilateralTriangle" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("triangleType", triangleType), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def triangleType(self) -> typing.Union[typing.Literal["EquilateralTriangle"], schemas.Unset]: + val = self.get("triangleType", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["EquilateralTriangle"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[triangle_interface.TriangleInterface], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class EquilateralTriangle( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/file.py b/samples/client/petstore/python/src/openapi_client/components/schema/file.py new file mode 100644 index 00000000000..6b940fc04dc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/file.py @@ -0,0 +1,112 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +SourceURI: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "sourceURI": typing.Type[SourceURI], + } +) + + +class FileDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "sourceURI", + }) + + def __new__( + cls, + *, + sourceURI: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("sourceURI", sourceURI), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FileDictInput, arg_) + return File.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FileDictInput, + FileDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileDict: + return File.validate(arg, configuration=configuration) + + @property + def sourceURI(self) -> typing.Union[str, schemas.Unset]: + val = self.get("sourceURI", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FileDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class File( + schemas.Schema[FileDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Must be named `File` for test. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FileDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FileDictInput, + FileDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py new file mode 100644 index 00000000000..be24e3474cd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py @@ -0,0 +1,186 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import file + + +class FilesTuple( + typing.Tuple[ + file.FileDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[FilesTupleInput, FilesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Files.validate(arg, configuration=configuration) +FilesTupleInput = typing.Union[ + typing.List[ + typing.Union[ + file.FileDictInput, + file.FileDict, + ], + ], + typing.Tuple[ + typing.Union[ + file.FileDictInput, + file.FileDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Files( + schemas.Schema[schemas.immutabledict, FilesTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[file.File] = dataclasses.field(default_factory=lambda: file.File) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: FilesTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FilesTupleInput, + FilesTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FilesTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "file": typing.Type[file.File], + "files": typing.Type[Files], + } +) + + +class FileSchemaTestClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "file", + "files", + }) + + def __new__( + cls, + *, + file: typing.Union[ + file.FileDictInput, + file.FileDict, + schemas.Unset + ] = schemas.unset, + files: typing.Union[ + FilesTupleInput, + FilesTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("file", file), + ("files", files), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FileSchemaTestClassDictInput, arg_) + return FileSchemaTestClass.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FileSchemaTestClassDictInput, + FileSchemaTestClassDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchemaTestClassDict: + return FileSchemaTestClass.validate(arg, configuration=configuration) + + @property + def file(self) -> typing.Union[file.FileDict, schemas.Unset]: + val = self.get("file", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + file.FileDict, + val + ) + + @property + def files(self) -> typing.Union[FilesTuple, schemas.Unset]: + val = self.get("files", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + FilesTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FileSchemaTestClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class FileSchemaTestClass( + schemas.Schema[FileSchemaTestClassDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FileSchemaTestClassDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FileSchemaTestClassDictInput, + FileSchemaTestClassDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileSchemaTestClassDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/foo.py b/samples/client/petstore/python/src/openapi_client/components/schema/foo.py new file mode 100644 index 00000000000..a072a27b174 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/foo.py @@ -0,0 +1,111 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import bar +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[bar.Bar], + } +) + + +class FooDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + }) + + def __new__( + cls, + *, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("bar", bar), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FooDictInput, arg_) + return Foo.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FooDictInput, + FooDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FooDict: + return Foo.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FooDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Foo( + schemas.Schema[FooDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FooDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FooDictInput, + FooDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FooDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py new file mode 100644 index 00000000000..acb35fe65ad --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py @@ -0,0 +1,632 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Integer( + schemas.IntSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + inclusive_maximum: typing.Union[int, float] = 100 + inclusive_minimum: typing.Union[int, float] = 10 + multiple_of: typing.Union[int, float] = 2 +Int32: typing_extensions.TypeAlias = schemas.Int32Schema + + +@dataclasses.dataclass(frozen=True) +class Int32withValidations( + schemas.Int32Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int32' + inclusive_maximum: typing.Union[int, float] = 200 + inclusive_minimum: typing.Union[int, float] = 20 +Int64: typing_extensions.TypeAlias = schemas.Int64Schema + + +@dataclasses.dataclass(frozen=True) +class Number( + schemas.NumberSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + inclusive_maximum: typing.Union[int, float] = 543.2 + inclusive_minimum: typing.Union[int, float] = 32.1 + multiple_of: typing.Union[int, float] = 32.5 + + +@dataclasses.dataclass(frozen=True) +class Float( + schemas.Float32Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'float' + inclusive_maximum: typing.Union[int, float] = 987.6 + inclusive_minimum: typing.Union[int, float] = 54.3 +Float32: typing_extensions.TypeAlias = schemas.Float32Schema + + +@dataclasses.dataclass(frozen=True) +class Double( + schemas.Float64Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'double' + inclusive_maximum: typing.Union[int, float] = 123.4 + inclusive_minimum: typing.Union[int, float] = 67.8 +Float64: typing_extensions.TypeAlias = schemas.Float64Schema +Items: typing_extensions.TypeAlias = schemas.NumberSchema + + +class ArrayWithUniqueItemsTuple( + typing.Tuple[ + typing.Union[int, float], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayWithUniqueItemsTupleInput, ArrayWithUniqueItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayWithUniqueItems.validate(arg, configuration=configuration) +ArrayWithUniqueItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + int, + float + ], + ], + typing.Tuple[ + typing.Union[ + int, + float + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayWithUniqueItems( + schemas.Schema[schemas.immutabledict, ArrayWithUniqueItemsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + unique_items: bool = True + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayWithUniqueItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayWithUniqueItemsTupleInput, + ArrayWithUniqueItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayWithUniqueItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +@dataclasses.dataclass(frozen=True) +class String( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'[a-z]', # noqa: E501 + flags=re.I, + ) +Byte: typing_extensions.TypeAlias = schemas.StrSchema +Binary: typing_extensions.TypeAlias = schemas.BinarySchema +Date: typing_extensions.TypeAlias = schemas.DateSchema +DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema +Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema +UuidNoExample: typing_extensions.TypeAlias = schemas.UUIDSchema + + +@dataclasses.dataclass(frozen=True) +class Password( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'password' + max_length: int = 64 + min_length: int = 10 + + +@dataclasses.dataclass(frozen=True) +class PatternWithDigits( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^\d{10}$' # noqa: E501 + ) + + +@dataclasses.dataclass(frozen=True) +class PatternWithDigitsAndDelimiter( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^image_\d{1,3}$', # noqa: E501 + flags=re.I, + ) +NoneProp: typing_extensions.TypeAlias = schemas.NoneSchema +Properties = typing.TypedDict( + 'Properties', + { + "integer": typing.Type[Integer], + "int32": typing.Type[Int32], + "int32withValidations": typing.Type[Int32withValidations], + "int64": typing.Type[Int64], + "number": typing.Type[Number], + "float": typing.Type[Float], + "float32": typing.Type[Float32], + "double": typing.Type[Double], + "float64": typing.Type[Float64], + "arrayWithUniqueItems": typing.Type[ArrayWithUniqueItems], + "string": typing.Type[String], + "byte": typing.Type[Byte], + "binary": typing.Type[Binary], + "date": typing.Type[Date], + "dateTime": typing.Type[DateTime], + "uuid": typing.Type[Uuid], + "uuidNoExample": typing.Type[UuidNoExample], + "password": typing.Type[Password], + "pattern_with_digits": typing.Type[PatternWithDigits], + "pattern_with_digits_and_delimiter": typing.Type[PatternWithDigitsAndDelimiter], + "noneProp": typing.Type[NoneProp], + } +) + + +class FormatTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "byte", + "date", + "number", + "password", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "integer", + "int32", + "int32withValidations", + "int64", + "float", + "float32", + "double", + "float64", + "arrayWithUniqueItems", + "string", + "binary", + "dateTime", + "uuid", + "uuidNoExample", + "pattern_with_digits", + "pattern_with_digits_and_delimiter", + "noneProp", + }) + + def __new__( + cls, + *, + byte: str, + date: typing.Union[ + str, + datetime.date + ], + number: typing.Union[ + int, + float + ], + password: str, + integer: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + int32: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + int32withValidations: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + int64: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + float: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + float32: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + double: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + float64: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + arrayWithUniqueItems: typing.Union[ + ArrayWithUniqueItemsTupleInput, + ArrayWithUniqueItemsTuple, + schemas.Unset + ] = schemas.unset, + string: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + binary: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO, + schemas.Unset + ] = schemas.unset, + dateTime: typing.Union[ + str, + datetime.datetime, + schemas.Unset + ] = schemas.unset, + uuid: typing.Union[ + str, + uuid.UUID, + schemas.Unset + ] = schemas.unset, + uuidNoExample: typing.Union[ + str, + uuid.UUID, + schemas.Unset + ] = schemas.unset, + pattern_with_digits: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + pattern_with_digits_and_delimiter: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + noneProp: typing.Union[ + None, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "byte": byte, + "date": date, + "number": number, + "password": password, + } + for key_, val in ( + ("integer", integer), + ("int32", int32), + ("int32withValidations", int32withValidations), + ("int64", int64), + ("float", float), + ("float32", float32), + ("double", double), + ("float64", float64), + ("arrayWithUniqueItems", arrayWithUniqueItems), + ("string", string), + ("binary", binary), + ("dateTime", dateTime), + ("uuid", uuid), + ("uuidNoExample", uuidNoExample), + ("pattern_with_digits", pattern_with_digits), + ("pattern_with_digits_and_delimiter", pattern_with_digits_and_delimiter), + ("noneProp", noneProp), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FormatTestDictInput, arg_) + return FormatTest.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FormatTestDictInput, + FormatTestDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FormatTestDict: + return FormatTest.validate(arg, configuration=configuration) + + @property + def byte(self) -> str: + return typing.cast( + str, + self.__getitem__("byte") + ) + + @property + def date(self) -> str: + return typing.cast( + str, + self.__getitem__("date") + ) + + @property + def number(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("number") + ) + + @property + def password(self) -> str: + return typing.cast( + str, + self.__getitem__("password") + ) + + @property + def integer(self) -> typing.Union[int, schemas.Unset]: + val = self.get("integer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def int32(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int32", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def int32withValidations(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int32withValidations", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def int64(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int64", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def float(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def float32(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float32", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def double(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("double", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def float64(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float64", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def arrayWithUniqueItems(self) -> typing.Union[ArrayWithUniqueItemsTuple, schemas.Unset]: + val = self.get("arrayWithUniqueItems", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayWithUniqueItemsTuple, + val + ) + + @property + def string(self) -> typing.Union[str, schemas.Unset]: + val = self.get("string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def binary(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: + val = self.get("binary", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[bytes, schemas.FileIO], + val + ) + + @property + def dateTime(self) -> typing.Union[str, schemas.Unset]: + val = self.get("dateTime", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def uuid(self) -> typing.Union[str, schemas.Unset]: + val = self.get("uuid", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def uuidNoExample(self) -> typing.Union[str, schemas.Unset]: + val = self.get("uuidNoExample", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def pattern_with_digits(self) -> typing.Union[str, schemas.Unset]: + val = self.get("pattern_with_digits", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def pattern_with_digits_and_delimiter(self) -> typing.Union[str, schemas.Unset]: + val = self.get("pattern_with_digits_and_delimiter", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def noneProp(self) -> typing.Union[None, schemas.Unset]: + val = self.get("noneProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + None, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FormatTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class FormatTest( + schemas.Schema[FormatTestDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "byte", + "date", + "number", + "password", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FormatTestDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FormatTestDictInput, + FormatTestDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FormatTestDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py new file mode 100644 index 00000000000..35ddb4a6213 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Data: typing_extensions.TypeAlias = schemas.StrSchema +Id: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "data": typing.Type[Data], + "id": typing.Type[Id], + } +) + + +class FromSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "data", + "id", + }) + + def __new__( + cls, + *, + data: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("data", data), + ("id", id), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FromSchemaDictInput, arg_) + return FromSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FromSchemaDictInput, + FromSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FromSchemaDict: + return FromSchema.validate(arg, configuration=configuration) + + @property + def data(self) -> typing.Union[str, schemas.Unset]: + val = self.get("data", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FromSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class FromSchema( + schemas.Schema[FromSchemaDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FromSchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FromSchemaDictInput, + FromSchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FromSchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py b/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py new file mode 100644 index 00000000000..94bfd315b6a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py @@ -0,0 +1,101 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Color: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "color": typing.Type[Color], + } +) + + +class FruitDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "color", + }) + + def __new__( + cls, + *, + color: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("color", color), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(FruitDictInput, arg_) + return Fruit.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + FruitDictInput, + FruitDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FruitDict: + return Fruit.validate(arg, configuration=configuration) + + @property + def color(self) -> typing.Union[str, schemas.Unset]: + val = self.get("color", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +FruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] +OneOf = typing.Tuple[ + typing.Type[apple.Apple], + typing.Type[banana.Banana], +] + + +@dataclasses.dataclass(frozen=True) +class Fruit( + schemas.AnyTypeSchema[FruitDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: FruitDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py new file mode 100644 index 00000000000..788b4549c9c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py @@ -0,0 +1,32 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NoneSchema +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[apple_req.AppleReq], + typing.Type[banana_req.BananaReq], +] + + +@dataclasses.dataclass(frozen=True) +class FruitReq( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py b/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py new file mode 100644 index 00000000000..b2711051b4a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py @@ -0,0 +1,101 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Color: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "color": typing.Type[Color], + } +) + + +class GmFruitDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "color", + }) + + def __new__( + cls, + *, + color: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("color", color), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(GmFruitDictInput, arg_) + return GmFruit.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + GmFruitDictInput, + GmFruitDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> GmFruitDict: + return GmFruit.validate(arg, configuration=configuration) + + @property + def color(self) -> typing.Union[str, schemas.Unset]: + val = self.get("color", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +GmFruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] +AnyOf = typing.Tuple[ + typing.Type[apple.Apple], + typing.Type[banana.Banana], +] + + +@dataclasses.dataclass(frozen=True) +class GmFruit( + schemas.AnyTypeSchema[GmFruitDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: GmFruitDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py b/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py new file mode 100644 index 00000000000..f73fa3a5dc7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py @@ -0,0 +1,114 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +PetType: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "pet_type": typing.Type[PetType], + } +) + + +class GrandparentAnimalDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "pet_type", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + pet_type: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "pet_type": pet_type, + } + arg_.update(kwargs) + used_arg_ = typing.cast(GrandparentAnimalDictInput, arg_) + return GrandparentAnimal.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + GrandparentAnimalDictInput, + GrandparentAnimalDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> GrandparentAnimalDict: + return GrandparentAnimal.validate(arg, configuration=configuration) + + @property + def pet_type(self) -> str: + return typing.cast( + str, + self.__getitem__("pet_type") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +GrandparentAnimalDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class GrandparentAnimal( + schemas.Schema[GrandparentAnimalDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "pet_type", + }) + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'pet_type': { + 'ChildCat': child_cat.ChildCat, + 'ParentPet': parent_pet.ParentPet, + } + } + ) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: GrandparentAnimalDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + GrandparentAnimalDictInput, + GrandparentAnimalDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> GrandparentAnimalDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + +from openapi_client.components.schema import child_cat +from openapi_client.components.schema import parent_pet diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py new file mode 100644 index 00000000000..94db8602b9d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.StrSchema +Foo: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + "foo": typing.Type[Foo], + } +) + + +class HasOnlyReadOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + "foo", + }) + + def __new__( + cls, + *, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + foo: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("bar", bar), + ("foo", foo), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(HasOnlyReadOnlyDictInput, arg_) + return HasOnlyReadOnly.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HasOnlyReadOnlyDictInput, + HasOnlyReadOnlyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HasOnlyReadOnlyDict: + return HasOnlyReadOnly.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def foo(self) -> typing.Union[str, schemas.Unset]: + val = self.get("foo", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +HasOnlyReadOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class HasOnlyReadOnly( + schemas.Schema[HasOnlyReadOnlyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HasOnlyReadOnlyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HasOnlyReadOnlyDictInput, + HasOnlyReadOnlyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HasOnlyReadOnlyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py b/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py new file mode 100644 index 00000000000..8f6f2834be6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py @@ -0,0 +1,154 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class NullableMessage( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + +Properties = typing.TypedDict( + 'Properties', + { + "NullableMessage": typing.Type[NullableMessage], + } +) + + +class HealthCheckResultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "NullableMessage", + }) + + def __new__( + cls, + *, + NullableMessage: typing.Union[ + None, + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("NullableMessage", NullableMessage), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(HealthCheckResultDictInput, arg_) + return HealthCheckResult.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HealthCheckResultDictInput, + HealthCheckResultDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HealthCheckResultDict: + return HealthCheckResult.validate(arg, configuration=configuration) + + @property + def NullableMessage(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[str, schemas.Unset], + ]: + val = self.get("NullableMessage", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + str, + ], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +HealthCheckResultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class HealthCheckResult( + schemas.Schema[HealthCheckResultDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HealthCheckResultDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HealthCheckResultDictInput, + HealthCheckResultDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HealthCheckResultDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py new file mode 100644 index 00000000000..032e64c2a00 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py @@ -0,0 +1,100 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class IntegerEnumEnums: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal[0]: + return IntegerEnum.validate(0) + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return IntegerEnum.validate(1) + + @schemas.classproperty + def POSITIVE_2(cls) -> typing.Literal[2]: + return IntegerEnum.validate(2) + + +@dataclasses.dataclass(frozen=True) +class IntegerEnum( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 0: "POSITIVE_0", + 1: "POSITIVE_1", + 2: "POSITIVE_2", + } + ) + enums = IntegerEnumEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[0], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[2], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[2]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0,1,2,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 0, + 1, + 2, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 0, + 1, + 2, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py new file mode 100644 index 00000000000..faf3f6bbd55 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py @@ -0,0 +1,100 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class IntegerEnumBigEnums: + + @schemas.classproperty + def POSITIVE_10(cls) -> typing.Literal[10]: + return IntegerEnumBig.validate(10) + + @schemas.classproperty + def POSITIVE_11(cls) -> typing.Literal[11]: + return IntegerEnumBig.validate(11) + + @schemas.classproperty + def POSITIVE_12(cls) -> typing.Literal[12]: + return IntegerEnumBig.validate(12) + + +@dataclasses.dataclass(frozen=True) +class IntegerEnumBig( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 10: "POSITIVE_10", + 11: "POSITIVE_11", + 12: "POSITIVE_12", + } + ) + enums = IntegerEnumBigEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[10], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[10]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[11], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[11]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[12], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[12]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[10,11,12,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 10, + 11, + 12, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 10, + 11, + 12, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py new file mode 100644 index 00000000000..f11517cfc2e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py @@ -0,0 +1,72 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class IntegerEnumOneValueEnums: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal[0]: + return IntegerEnumOneValue.validate(0) + + +@dataclasses.dataclass(frozen=True) +class IntegerEnumOneValue( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 0: "POSITIVE_0", + } + ) + enums = IntegerEnumOneValueEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[0], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 0, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 0, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py new file mode 100644 index 00000000000..88f3dc6b497 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py @@ -0,0 +1,100 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class IntegerEnumWithDefaultValueEnums: + + @schemas.classproperty + def POSITIVE_0(cls) -> typing.Literal[0]: + return IntegerEnumWithDefaultValue.validate(0) + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return IntegerEnumWithDefaultValue.validate(1) + + @schemas.classproperty + def POSITIVE_2(cls) -> typing.Literal[2]: + return IntegerEnumWithDefaultValue.validate(2) + + +@dataclasses.dataclass(frozen=True) +class IntegerEnumWithDefaultValue( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 0: "POSITIVE_0", + 1: "POSITIVE_1", + 2: "POSITIVE_2", + } + ) + enums = IntegerEnumWithDefaultValueEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[0], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[2], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[2]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[0,1,2,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 0, + 1, + 2, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 0, + 1, + 2, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py new file mode 100644 index 00000000000..cbe7a1b9f80 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IntegerMax10( + schemas.Int64Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int64' + inclusive_maximum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py new file mode 100644 index 00000000000..d85d58eb8d9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class IntegerMin15( + schemas.Int64Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int64' + inclusive_minimum: typing.Union[int, float] = 15 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py new file mode 100644 index 00000000000..b86cdc2d5f1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py @@ -0,0 +1,178 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class TriangleTypeEnums: + + @schemas.classproperty + def ISOSCELES_TRIANGLE(cls) -> typing.Literal["IsoscelesTriangle"]: + return TriangleType.validate("IsoscelesTriangle") + + +@dataclasses.dataclass(frozen=True) +class TriangleType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "IsoscelesTriangle": "ISOSCELES_TRIANGLE", + } + ) + enums = TriangleTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["IsoscelesTriangle"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["IsoscelesTriangle"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["IsoscelesTriangle",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "IsoscelesTriangle", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "IsoscelesTriangle", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "triangleType": typing.Type[TriangleType], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "triangleType", + }) + + def __new__( + cls, + *, + triangleType: typing.Union[ + typing.Literal[ + "IsoscelesTriangle" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("triangleType", triangleType), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def triangleType(self) -> typing.Union[typing.Literal["IsoscelesTriangle"], schemas.Unset]: + val = self.get("triangleType", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["IsoscelesTriangle"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[triangle_interface.TriangleInterface], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class IsoscelesTriangle( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/items.py b/samples/client/petstore/python/src/openapi_client/components/schema/items.py new file mode 100644 index 00000000000..cffe311cb86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/items.py @@ -0,0 +1,76 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items2: typing_extensions.TypeAlias = schemas.DictSchema + + +class ItemsTuple( + typing.Tuple[ + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ... + ] +): + + def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Items.validate(arg, configuration=configuration) +ItemsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + typing.Tuple[ + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema[schemas.immutabledict, ItemsTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + component's name collides with the inner schema name + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ItemsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsTupleInput, + ItemsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py new file mode 100644 index 00000000000..a6a840dbf02 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.StrSchema +SomeProperty: typing_extensions.TypeAlias = schemas.StrSchema +SecondAdditionalProperty: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + "someProperty": typing.Type[SomeProperty], + "secondAdditionalProperty": typing.Type[SecondAdditionalProperty], + } +) + + +class ItemsSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + "someProperty", + "secondAdditionalProperty", + }) + + def __new__( + cls, + *, + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + someProperty: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + secondAdditionalProperty: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("name", name), + ("someProperty", someProperty), + ("secondAdditionalProperty", secondAdditionalProperty), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ItemsSchemaDictInput, arg_) + return ItemsSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ItemsSchemaDictInput, + ItemsSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsSchemaDict: + return ItemsSchema.validate(arg, configuration=configuration) + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def someProperty(self) -> typing.Union[str, schemas.Unset]: + val = self.get("someProperty", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def secondAdditionalProperty(self) -> typing.Union[str, schemas.Unset]: + val = self.get("secondAdditionalProperty", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ItemsSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ItemsSchema( + schemas.Schema[ItemsSchemaDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ItemsSchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ItemsSchemaDictInput, + ItemsSchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ItemsSchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py new file mode 100644 index 00000000000..53134dcca19 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py @@ -0,0 +1,87 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +OneOf = typing.Tuple[ + typing.Type[json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest], + typing.Type[json_patch_request_remove.JSONPatchRequestRemove], + typing.Type[json_patch_request_move_copy.JSONPatchRequestMoveCopy], +] + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + + + +class JSONPatchRequestTuple( + typing.Tuple[ + schemas.OUTPUT_BASE_TYPES, + ... + ] +): + + def __new__(cls, arg: typing.Union[JSONPatchRequestTupleInput, JSONPatchRequestTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return JSONPatchRequest.validate(arg, configuration=configuration) +JSONPatchRequestTupleInput = typing.Union[ + typing.List[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ], + typing.Tuple[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class JSONPatchRequest( + schemas.Schema[schemas.immutabledict, JSONPatchRequestTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: JSONPatchRequestTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + JSONPatchRequestTupleInput, + JSONPatchRequestTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py new file mode 100644 index 00000000000..4ba34865720 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py @@ -0,0 +1,224 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Path: typing_extensions.TypeAlias = schemas.StrSchema +Value: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class OpEnums: + + @schemas.classproperty + def ADD(cls) -> typing.Literal["add"]: + return Op.validate("add") + + @schemas.classproperty + def REPLACE(cls) -> typing.Literal["replace"]: + return Op.validate("replace") + + @schemas.classproperty + def TEST(cls) -> typing.Literal["test"]: + return Op.validate("test") + + +@dataclasses.dataclass(frozen=True) +class Op( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "add": "ADD", + "replace": "REPLACE", + "test": "TEST", + } + ) + enums = OpEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["add"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["add"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["replace"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["replace"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["test"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["test"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["add","replace","test",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "add", + "replace", + "test", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "add", + "replace", + "test", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "path": typing.Type[Path], + "value": typing.Type[Value], + "op": typing.Type[Op], + } +) + + +class JSONPatchRequestAddReplaceTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "op", + "path", + "value", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + op: typing.Literal[ + "add", + "replace", + "test" + ], + path: str, + value: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "op": op, + "path": path, + "value": value, + } + used_arg_ = typing.cast(JSONPatchRequestAddReplaceTestDictInput, arg_) + return JSONPatchRequestAddReplaceTest.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + JSONPatchRequestAddReplaceTestDictInput, + JSONPatchRequestAddReplaceTestDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestAddReplaceTestDict: + return JSONPatchRequestAddReplaceTest.validate(arg, configuration=configuration) + + @property + def op(self) -> typing.Literal["add", "replace", "test"]: + return typing.cast( + typing.Literal["add", "replace", "test"], + self.__getitem__("op") + ) + + @property + def path(self) -> str: + return typing.cast( + str, + self.__getitem__("path") + ) + + @property + def value(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("value") +JSONPatchRequestAddReplaceTestDictInput = typing.TypedDict( + 'JSONPatchRequestAddReplaceTestDictInput', + { + "op": typing.Literal[ + "add", + "replace", + "test" + ], + "path": str, + "value": typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class JSONPatchRequestAddReplaceTest( + schemas.Schema[JSONPatchRequestAddReplaceTestDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "op", + "path", + "value", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: JSONPatchRequestAddReplaceTestDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + JSONPatchRequestAddReplaceTestDictInput, + JSONPatchRequestAddReplaceTestDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestAddReplaceTestDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py new file mode 100644 index 00000000000..a7b7a81acbc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py @@ -0,0 +1,199 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +From: typing_extensions.TypeAlias = schemas.StrSchema +Path: typing_extensions.TypeAlias = schemas.StrSchema + + +class OpEnums: + + @schemas.classproperty + def MOVE(cls) -> typing.Literal["move"]: + return Op.validate("move") + + @schemas.classproperty + def COPY(cls) -> typing.Literal["copy"]: + return Op.validate("copy") + + +@dataclasses.dataclass(frozen=True) +class Op( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "move": "MOVE", + "copy": "COPY", + } + ) + enums = OpEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["move"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["move"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["copy"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["copy"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["move","copy",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "move", + "copy", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "move", + "copy", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "from": typing.Type[From], + "path": typing.Type[Path], + "op": typing.Type[Op], + } +) + + +class JSONPatchRequestMoveCopyDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "from", + "op", + "path", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + from: str, + op: typing.Literal[ + "move", + "copy" + ], + path: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "from": from, + "op": op, + "path": path, + } + used_arg_ = typing.cast(JSONPatchRequestMoveCopyDictInput, arg_) + return JSONPatchRequestMoveCopy.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + JSONPatchRequestMoveCopyDictInput, + JSONPatchRequestMoveCopyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestMoveCopyDict: + return JSONPatchRequestMoveCopy.validate(arg, configuration=configuration) + + @property + def from(self) -> str: + return self.__getitem__("from") + + @property + def op(self) -> typing.Literal["move", "copy"]: + return typing.cast( + typing.Literal["move", "copy"], + self.__getitem__("op") + ) + + @property + def path(self) -> str: + return self.__getitem__("path") +JSONPatchRequestMoveCopyDictInput = typing.TypedDict( + 'JSONPatchRequestMoveCopyDictInput', + { + "from": str, + "op": typing.Literal[ + "move", + "copy" + ], + "path": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class JSONPatchRequestMoveCopy( + schemas.Schema[JSONPatchRequestMoveCopyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "from", + "op", + "path", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: JSONPatchRequestMoveCopyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + JSONPatchRequestMoveCopyDictInput, + JSONPatchRequestMoveCopyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestMoveCopyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py new file mode 100644 index 00000000000..53db226e2de --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py @@ -0,0 +1,172 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Path: typing_extensions.TypeAlias = schemas.StrSchema + + +class OpEnums: + + @schemas.classproperty + def REMOVE(cls) -> typing.Literal["remove"]: + return Op.validate("remove") + + +@dataclasses.dataclass(frozen=True) +class Op( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "remove": "REMOVE", + } + ) + enums = OpEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["remove"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["remove"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["remove",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "remove", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "remove", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "path": typing.Type[Path], + "op": typing.Type[Op], + } +) + + +class JSONPatchRequestRemoveDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "op", + "path", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + op: typing.Literal[ + "remove" + ], + path: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "op": op, + "path": path, + } + used_arg_ = typing.cast(JSONPatchRequestRemoveDictInput, arg_) + return JSONPatchRequestRemove.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + JSONPatchRequestRemoveDictInput, + JSONPatchRequestRemoveDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestRemoveDict: + return JSONPatchRequestRemove.validate(arg, configuration=configuration) + + @property + def op(self) -> typing.Literal["remove"]: + return typing.cast( + typing.Literal["remove"], + self.__getitem__("op") + ) + + @property + def path(self) -> str: + return self.__getitem__("path") +JSONPatchRequestRemoveDictInput = typing.TypedDict( + 'JSONPatchRequestRemoveDictInput', + { + "op": typing.Literal[ + "remove" + ], + "path": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class JSONPatchRequestRemove( + schemas.Schema[JSONPatchRequestRemoveDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "op", + "path", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: JSONPatchRequestRemoveDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + JSONPatchRequestRemoveDictInput, + JSONPatchRequestRemoveDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> JSONPatchRequestRemoveDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py b/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py new file mode 100644 index 00000000000..688e15627a2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py @@ -0,0 +1,44 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import pig +from openapi_client.components.schema import whale +from openapi_client.components.schema import zebra +OneOf = typing.Tuple[ + typing.Type[whale.Whale], + typing.Type[zebra.Zebra], + typing.Type[pig.Pig], +] + + +@dataclasses.dataclass(frozen=True) +class Mammal( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'className': { + 'Pig': pig.Pig, + 'whale': whale.Whale, + 'zebra': zebra.Zebra, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py new file mode 100644 index 00000000000..e2486777e5b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py @@ -0,0 +1,528 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties2: typing_extensions.TypeAlias = schemas.StrSchema + + +class AdditionalPropertiesDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + used_kwargs = typing.cast(AdditionalPropertiesDictInput, kwargs) + return AdditionalProperties.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesDict: + return AdditionalProperties.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +AdditionalPropertiesDictInput = typing.Mapping[ + str, + str, +] + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties( + schemas.Schema[AdditionalPropertiesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: AdditionalPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> AdditionalPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class MapMapOfStringDict(schemas.immutabledict[str, AdditionalPropertiesDict]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], + ): + used_kwargs = typing.cast(MapMapOfStringDictInput, kwargs) + return MapMapOfString.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapMapOfStringDictInput, + MapMapOfStringDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapMapOfStringDict: + return MapMapOfString.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesDict, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + AdditionalPropertiesDict, + val + ) +MapMapOfStringDictInput = typing.Mapping[ + str, + typing.Union[ + AdditionalPropertiesDictInput, + AdditionalPropertiesDict, + ], +] + + +@dataclasses.dataclass(frozen=True) +class MapMapOfString( + schemas.Schema[MapMapOfStringDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapMapOfStringDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapMapOfStringDictInput, + MapMapOfStringDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapMapOfStringDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class AdditionalPropertiesEnums: + + @schemas.classproperty + def UPPER(cls) -> typing.Literal["UPPER"]: + return AdditionalProperties3.validate("UPPER") + + @schemas.classproperty + def LOWER(cls) -> typing.Literal["lower"]: + return AdditionalProperties3.validate("lower") + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties3( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "UPPER": "UPPER", + "lower": "LOWER", + } + ) + enums = AdditionalPropertiesEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["UPPER"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["lower"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["lower"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["UPPER","lower",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "UPPER", + "lower", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "UPPER", + "lower", + ], + validated_arg + ) + + +class MapOfEnumStringDict(schemas.immutabledict[str, typing.Literal["UPPER", "lower"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Literal[ + "UPPER", + "lower" + ], + ): + used_kwargs = typing.cast(MapOfEnumStringDictInput, kwargs) + return MapOfEnumString.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapOfEnumStringDictInput, + MapOfEnumStringDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapOfEnumStringDict: + return MapOfEnumString.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[typing.Literal["UPPER", "lower"], schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["UPPER", "lower"], + val + ) +MapOfEnumStringDictInput = typing.Mapping[ + str, + typing.Literal[ + "UPPER", + "lower" + ], +] + + +@dataclasses.dataclass(frozen=True) +class MapOfEnumString( + schemas.Schema[MapOfEnumStringDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapOfEnumStringDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapOfEnumStringDictInput, + MapOfEnumStringDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapOfEnumStringDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AdditionalProperties4: typing_extensions.TypeAlias = schemas.BoolSchema + + +class DirectMapDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(DirectMapDictInput, kwargs) + return DirectMap.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + DirectMapDictInput, + DirectMapDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DirectMapDict: + return DirectMap.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +DirectMapDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class DirectMap( + schemas.Schema[DirectMapDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: DirectMapDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + DirectMapDictInput, + DirectMapDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DirectMapDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + +from openapi_client.components.schema import string_boolean_map +Properties = typing.TypedDict( + 'Properties', + { + "map_map_of_string": typing.Type[MapMapOfString], + "map_of_enum_string": typing.Type[MapOfEnumString], + "direct_map": typing.Type[DirectMap], + "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], + } +) + + +class MapTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "map_map_of_string", + "map_of_enum_string", + "direct_map", + "indirect_map", + }) + + def __new__( + cls, + *, + map_map_of_string: typing.Union[ + MapMapOfStringDictInput, + MapMapOfStringDict, + schemas.Unset + ] = schemas.unset, + map_of_enum_string: typing.Union[ + MapOfEnumStringDictInput, + MapOfEnumStringDict, + schemas.Unset + ] = schemas.unset, + direct_map: typing.Union[ + DirectMapDictInput, + DirectMapDict, + schemas.Unset + ] = schemas.unset, + indirect_map: typing.Union[ + string_boolean_map.StringBooleanMapDictInput, + string_boolean_map.StringBooleanMapDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("map_map_of_string", map_map_of_string), + ("map_of_enum_string", map_of_enum_string), + ("direct_map", direct_map), + ("indirect_map", indirect_map), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(MapTestDictInput, arg_) + return MapTest.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapTestDictInput, + MapTestDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapTestDict: + return MapTest.validate(arg, configuration=configuration) + + @property + def map_map_of_string(self) -> typing.Union[MapMapOfStringDict, schemas.Unset]: + val = self.get("map_map_of_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapMapOfStringDict, + val + ) + + @property + def map_of_enum_string(self) -> typing.Union[MapOfEnumStringDict, schemas.Unset]: + val = self.get("map_of_enum_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapOfEnumStringDict, + val + ) + + @property + def direct_map(self) -> typing.Union[DirectMapDict, schemas.Unset]: + val = self.get("direct_map", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + DirectMapDict, + val + ) + + @property + def indirect_map(self) -> typing.Union[string_boolean_map.StringBooleanMapDict, schemas.Unset]: + val = self.get("indirect_map", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + string_boolean_map.StringBooleanMapDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +MapTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class MapTest( + schemas.Schema[MapTestDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapTestDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapTestDictInput, + MapTestDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapTestDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py new file mode 100644 index 00000000000..7d5aa2dbd8c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py @@ -0,0 +1,226 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema +DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema + +from openapi_client.components.schema import animal + + +class MapDict(schemas.immutabledict[str, animal.AnimalDict]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + animal.AnimalDictInput, + animal.AnimalDict, + ], + ): + used_kwargs = typing.cast(MapDictInput, kwargs) + return Map.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MapDictInput, + MapDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapDict: + return Map.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[animal.AnimalDict, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + animal.AnimalDict, + val + ) +MapDictInput = typing.Mapping[ + str, + typing.Union[ + animal.AnimalDictInput, + animal.AnimalDict, + ], +] + + +@dataclasses.dataclass(frozen=True) +class Map( + schemas.Schema[MapDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[animal.Animal] = dataclasses.field(default_factory=lambda: animal.Animal) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MapDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MapDictInput, + MapDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MapDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +Properties = typing.TypedDict( + 'Properties', + { + "uuid": typing.Type[Uuid], + "dateTime": typing.Type[DateTime], + "map": typing.Type[Map], + } +) + + +class MixedPropertiesAndAdditionalPropertiesClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "uuid", + "dateTime", + "map", + }) + + def __new__( + cls, + *, + uuid: typing.Union[ + str, + uuid.UUID, + schemas.Unset + ] = schemas.unset, + dateTime: typing.Union[ + str, + datetime.datetime, + schemas.Unset + ] = schemas.unset, + map: typing.Union[ + MapDictInput, + MapDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("uuid", uuid), + ("dateTime", dateTime), + ("map", map), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(MixedPropertiesAndAdditionalPropertiesClassDictInput, arg_) + return MixedPropertiesAndAdditionalPropertiesClass.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MixedPropertiesAndAdditionalPropertiesClassDictInput, + MixedPropertiesAndAdditionalPropertiesClassDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MixedPropertiesAndAdditionalPropertiesClassDict: + return MixedPropertiesAndAdditionalPropertiesClass.validate(arg, configuration=configuration) + + @property + def uuid(self) -> typing.Union[str, schemas.Unset]: + val = self.get("uuid", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def dateTime(self) -> typing.Union[str, schemas.Unset]: + val = self.get("dateTime", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def map(self) -> typing.Union[MapDict, schemas.Unset]: + val = self.get("map", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + MapDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +MixedPropertiesAndAdditionalPropertiesClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class MixedPropertiesAndAdditionalPropertiesClass( + schemas.Schema[MixedPropertiesAndAdditionalPropertiesClassDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MixedPropertiesAndAdditionalPropertiesClassDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MixedPropertiesAndAdditionalPropertiesClassDictInput, + MixedPropertiesAndAdditionalPropertiesClassDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MixedPropertiesAndAdditionalPropertiesClassDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/money.py b/samples/client/petstore/python/src/openapi_client/components/schema/money.py new file mode 100644 index 00000000000..0533edbf3c3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/money.py @@ -0,0 +1,125 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Amount: typing_extensions.TypeAlias = schemas.DecimalSchema + +from openapi_client.components.schema import currency +Properties = typing.TypedDict( + 'Properties', + { + "amount": typing.Type[Amount], + "currency": typing.Type[currency.Currency], + } +) + + +class MoneyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "amount", + "currency", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + amount: str, + currency: typing.Literal[ + "eur", + "usd" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "amount": amount, + "currency": currency, + } + used_arg_ = typing.cast(MoneyDictInput, arg_) + return Money.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MoneyDictInput, + MoneyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MoneyDict: + return Money.validate(arg, configuration=configuration) + + @property + def amount(self) -> str: + return typing.cast( + str, + self.__getitem__("amount") + ) + + @property + def currency(self) -> typing.Literal["eur", "usd"]: + return typing.cast( + typing.Literal["eur", "usd"], + self.__getitem__("currency") + ) +MoneyDictInput = typing.TypedDict( + 'MoneyDictInput', + { + "amount": str, + "currency": typing.Literal[ + "eur", + "usd" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class Money( + schemas.Schema[MoneyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "amount", + "currency", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MoneyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MoneyDictInput, + MoneyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MoneyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py new file mode 100644 index 00000000000..6c356159bc7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py @@ -0,0 +1,222 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Status: typing_extensions.TypeAlias = schemas.Int32Schema +Message: typing_extensions.TypeAlias = schemas.StrSchema +MultiPropertiesSchemaRequiredDictInput = typing.TypedDict( + 'MultiPropertiesSchemaRequiredDictInput', + { + "status": int, + } +) + +from openapi_client.components.schema import items_schema + + +class DataTuple( + typing.Tuple[ + items_schema.ItemsSchemaDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[DataTupleInput, DataTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Data.validate(arg, configuration=configuration) +DataTupleInput = typing.Union[ + typing.List[ + typing.Union[ + items_schema.ItemsSchemaDictInput, + items_schema.ItemsSchemaDict, + ], + ], + typing.Tuple[ + typing.Union[ + items_schema.ItemsSchemaDictInput, + items_schema.ItemsSchemaDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Data( + schemas.Schema[schemas.immutabledict, DataTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[items_schema.ItemsSchema] = dataclasses.field(default_factory=lambda: items_schema.ItemsSchema) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: DataTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + DataTupleInput, + DataTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> DataTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "status": typing.Type[Status], + "data": typing.Type[Data], + "message": typing.Type[Message], + } +) +MultiPropertiesSchemaOptionalDictInput = typing.TypedDict( + 'MultiPropertiesSchemaOptionalDictInput', + { + "data": typing.Union[ + DataTupleInput, + DataTuple + ], + "message": str, + }, + total=False +) + + +class MultiPropertiesSchemaDict(schemas.immutabledict[str, typing.Union[ + str, + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + int, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "status", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "data", + "message", + }) + + def __new__( + cls, + *, + status: int, + data: typing.Union[ + DataTupleInput, + DataTuple, + schemas.Unset + ] = schemas.unset, + message: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "status": status, + } + for key_, val in ( + ("data", data), + ("message", message), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(MultiPropertiesSchemaDictInput, arg_) + return MultiPropertiesSchema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MultiPropertiesSchemaDictInput, + MultiPropertiesSchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MultiPropertiesSchemaDict: + return MultiPropertiesSchema.validate(arg, configuration=configuration) + + @property + def status(self) -> int: + return typing.cast( + int, + self.__getitem__("status") + ) + + @property + def data(self) -> typing.Union[DataTuple, schemas.Unset]: + val = self.get("data", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + DataTuple, + val + ) + + @property + def message(self) -> typing.Union[str, schemas.Unset]: + val = self.get("message", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + +class MultiPropertiesSchemaDictInput(MultiPropertiesSchemaRequiredDictInput, MultiPropertiesSchemaOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class MultiPropertiesSchema( + schemas.Schema[MultiPropertiesSchemaDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "status", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MultiPropertiesSchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MultiPropertiesSchemaDictInput, + MultiPropertiesSchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MultiPropertiesSchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py b/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py new file mode 100644 index 00000000000..6d2a61bf19e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py @@ -0,0 +1,113 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Id: typing_extensions.TypeAlias = schemas.UUIDSchema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + } +) + + +class MyObjectDtoDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + }) + + def __new__( + cls, + *, + id: typing.Union[ + str, + uuid.UUID, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("id", id), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(MyObjectDtoDictInput, arg_) + return MyObjectDto.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + MyObjectDtoDictInput, + MyObjectDtoDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MyObjectDtoDict: + return MyObjectDto.validate(arg, configuration=configuration) + + @property + def id(self) -> typing.Union[str, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +MyObjectDtoDictInput = typing.TypedDict( + 'MyObjectDtoDictInput', + { + "id": typing.Union[ + str, + uuid.UUID + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class MyObjectDto( + schemas.Schema[MyObjectDtoDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: MyObjectDtoDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + MyObjectDtoDictInput, + MyObjectDtoDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> MyObjectDtoDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/name.py b/samples/client/petstore/python/src/openapi_client/components/schema/name.py new file mode 100644 index 00000000000..7030d71b423 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/name.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name2: typing_extensions.TypeAlias = schemas.Int32Schema +SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema +Property: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name2], + "snake_case": typing.Type[SnakeCase], + "property": typing.Type[Property], + } +) + + +class NameDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "name", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "snake_case", + "property", + }) + + def __new__( + cls, + *, + name: int, + snake_case: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + property: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "name": name, + } + for key_, val in ( + ("snake_case", snake_case), + ("property", property), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(NameDictInput, arg_) + return Name.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NameDictInput, + NameDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NameDict: + return Name.validate(arg, configuration=configuration) + + @property + def name(self) -> int: + return typing.cast( + int, + self.__getitem__("name") + ) + + @property + def snake_case(self) -> typing.Union[int, schemas.Unset]: + val = self.get("snake_case", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def property(self) -> typing.Union[str, schemas.Unset]: + val = self.get("property", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +NameDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Name( + schemas.AnyTypeSchema[NameDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Model for testing model name same as property name + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "name", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NameDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py new file mode 100644 index 00000000000..a751b482402 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Id: typing_extensions.TypeAlias = schemas.Int64Schema +PetId: typing_extensions.TypeAlias = schemas.Int64Schema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "petId": typing.Type[PetId], + } +) +NoAdditionalPropertiesRequiredDictInput = typing.TypedDict( + 'NoAdditionalPropertiesRequiredDictInput', + { + "id": int, + } +) +NoAdditionalPropertiesOptionalDictInput = typing.TypedDict( + 'NoAdditionalPropertiesOptionalDictInput', + { + "petId": int, + }, + total=False +) + + +class NoAdditionalPropertiesDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + + def __new__( + cls, + *, + id: int, + petId: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "id": id, + } + for key_, val in ( + ("petId", petId), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(NoAdditionalPropertiesDictInput, arg_) + return NoAdditionalProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NoAdditionalPropertiesDictInput, + NoAdditionalPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoAdditionalPropertiesDict: + return NoAdditionalProperties.validate(arg, configuration=configuration) + + @property + def id(self) -> int: + return self.__getitem__("id") + + @property + def petId(self) -> typing.Union[int, schemas.Unset]: + val = self.get("petId", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + +class NoAdditionalPropertiesDictInput(NoAdditionalPropertiesRequiredDictInput, NoAdditionalPropertiesOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class NoAdditionalProperties( + schemas.Schema[NoAdditionalPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NoAdditionalPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NoAdditionalPropertiesDictInput, + NoAdditionalPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NoAdditionalPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py new file mode 100644 index 00000000000..06e22208f41 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py @@ -0,0 +1,1412 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties4( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class IntegerProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + int, + }) + format: str = 'int' + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class NumberProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + float, + int, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class BooleanProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.Bool, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class StringProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class DateProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + format: str = 'date' + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class DatetimeProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + format: str = 'date-time' + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + +Items: typing_extensions.TypeAlias = schemas.DictSchema + + +class ArrayNullablePropTuple( + typing.Tuple[ + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayNullablePropTupleInput, ArrayNullablePropTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayNullableProp.validate(arg, configuration=configuration) +ArrayNullablePropTupleInput = typing.Union[ + typing.List[ + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + typing.Tuple[ + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayNullableProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayNullablePropTuple], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + tuple, + }) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayNullablePropTuple, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayNullablePropTupleInput, + ArrayNullablePropTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayNullablePropTuple: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class Items2( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class ArrayAndItemsNullablePropTuple( + typing.Tuple[ + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayAndItemsNullablePropTupleInput, ArrayAndItemsNullablePropTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayAndItemsNullableProp.validate(arg, configuration=configuration) +ArrayAndItemsNullablePropTupleInput = typing.Union[ + typing.List[ + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ], + typing.Tuple[ + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayAndItemsNullableProp( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayAndItemsNullablePropTuple], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + tuple, + }) + items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayAndItemsNullablePropTuple, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayAndItemsNullablePropTupleInput, + ArrayAndItemsNullablePropTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayAndItemsNullablePropTuple: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class Items3( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class ArrayItemsNullableTuple( + typing.Tuple[ + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayItemsNullableTupleInput, ArrayItemsNullableTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayItemsNullable.validate(arg, configuration=configuration) +ArrayItemsNullableTupleInput = typing.Union[ + typing.List[ + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ], + typing.Tuple[ + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayItemsNullable( + schemas.Schema[schemas.immutabledict, ArrayItemsNullableTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayItemsNullableTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayItemsNullableTupleInput, + ArrayItemsNullableTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayItemsNullableTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema + + +class ObjectNullablePropDict(schemas.immutabledict[str, schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ): + used_kwargs = typing.cast(ObjectNullablePropDictInput, kwargs) + return ObjectNullableProp.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectNullablePropDictInput, + ObjectNullablePropDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectNullablePropDict: + return ObjectNullableProp.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) +ObjectNullablePropDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], +] + + +@dataclasses.dataclass(frozen=True) +class ObjectNullableProp( + schemas.Schema[ObjectNullablePropDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectNullablePropDict, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectNullablePropDictInput, + ObjectNullablePropDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectNullablePropDict: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties2( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class ObjectAndItemsNullablePropDict(schemas.immutabledict[str, typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ): + used_kwargs = typing.cast(ObjectAndItemsNullablePropDictInput, kwargs) + return ObjectAndItemsNullableProp.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectAndItemsNullablePropDictInput, + ObjectAndItemsNullablePropDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectAndItemsNullablePropDict: + return ObjectAndItemsNullableProp.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], + ]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + val + ) +ObjectAndItemsNullablePropDictInput = typing.Mapping[ + str, + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], +] + + +@dataclasses.dataclass(frozen=True) +class ObjectAndItemsNullableProp( + schemas.Schema[ObjectAndItemsNullablePropDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectAndItemsNullablePropDict, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectAndItemsNullablePropDictInput, + ObjectAndItemsNullablePropDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectAndItemsNullablePropDict: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass(frozen=True) +class AdditionalProperties3( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + + + +class ObjectItemsNullableDict(schemas.immutabledict[str, typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ): + used_kwargs = typing.cast(ObjectItemsNullableDictInput, kwargs) + return ObjectItemsNullable.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectItemsNullableDictInput, + ObjectItemsNullableDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectItemsNullableDict: + return ObjectItemsNullable.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], + ]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + val + ) +ObjectItemsNullableDictInput = typing.Mapping[ + str, + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], +] + + +@dataclasses.dataclass(frozen=True) +class ObjectItemsNullable( + schemas.Schema[ObjectItemsNullableDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectItemsNullableDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectItemsNullableDictInput, + ObjectItemsNullableDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectItemsNullableDict: + return super().validate_base( + arg, + configuration=configuration, + ) + +Properties = typing.TypedDict( + 'Properties', + { + "integer_prop": typing.Type[IntegerProp], + "number_prop": typing.Type[NumberProp], + "boolean_prop": typing.Type[BooleanProp], + "string_prop": typing.Type[StringProp], + "date_prop": typing.Type[DateProp], + "datetime_prop": typing.Type[DatetimeProp], + "array_nullable_prop": typing.Type[ArrayNullableProp], + "array_and_items_nullable_prop": typing.Type[ArrayAndItemsNullableProp], + "array_items_nullable": typing.Type[ArrayItemsNullable], + "object_nullable_prop": typing.Type[ObjectNullableProp], + "object_and_items_nullable_prop": typing.Type[ObjectAndItemsNullableProp], + "object_items_nullable": typing.Type[ObjectItemsNullable], + } +) + + +class NullableClassDict(schemas.immutabledict[str, typing.Union[ + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + None, + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + str, + bool, + typing.Union[int, float], + int, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "integer_prop", + "number_prop", + "boolean_prop", + "string_prop", + "date_prop", + "datetime_prop", + "array_nullable_prop", + "array_and_items_nullable_prop", + "array_items_nullable", + "object_nullable_prop", + "object_and_items_nullable_prop", + "object_items_nullable", + }) + + def __new__( + cls, + *, + integer_prop: typing.Union[ + None, + int, + schemas.Unset + ] = schemas.unset, + number_prop: typing.Union[ + None, + typing.Union[ + int, + float + ], + schemas.Unset + ] = schemas.unset, + boolean_prop: typing.Union[ + None, + bool, + schemas.Unset + ] = schemas.unset, + string_prop: typing.Union[ + None, + str, + schemas.Unset + ] = schemas.unset, + date_prop: typing.Union[ + None, + typing.Union[ + str, + datetime.date + ], + schemas.Unset + ] = schemas.unset, + datetime_prop: typing.Union[ + None, + typing.Union[ + str, + datetime.datetime + ], + schemas.Unset + ] = schemas.unset, + array_nullable_prop: typing.Union[ + None, + typing.Union[ + ArrayNullablePropTupleInput, + ArrayNullablePropTuple + ], + schemas.Unset + ] = schemas.unset, + array_and_items_nullable_prop: typing.Union[ + None, + typing.Union[ + ArrayAndItemsNullablePropTupleInput, + ArrayAndItemsNullablePropTuple + ], + schemas.Unset + ] = schemas.unset, + array_items_nullable: typing.Union[ + ArrayItemsNullableTupleInput, + ArrayItemsNullableTuple, + schemas.Unset + ] = schemas.unset, + object_nullable_prop: typing.Union[ + None, + typing.Union[ + ObjectNullablePropDictInput, + ObjectNullablePropDict, + ], + schemas.Unset + ] = schemas.unset, + object_and_items_nullable_prop: typing.Union[ + None, + typing.Union[ + ObjectAndItemsNullablePropDictInput, + ObjectAndItemsNullablePropDict, + ], + schemas.Unset + ] = schemas.unset, + object_items_nullable: typing.Union[ + ObjectItemsNullableDictInput, + ObjectItemsNullableDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("integer_prop", integer_prop), + ("number_prop", number_prop), + ("boolean_prop", boolean_prop), + ("string_prop", string_prop), + ("date_prop", date_prop), + ("datetime_prop", datetime_prop), + ("array_nullable_prop", array_nullable_prop), + ("array_and_items_nullable_prop", array_and_items_nullable_prop), + ("array_items_nullable", array_items_nullable), + ("object_nullable_prop", object_nullable_prop), + ("object_and_items_nullable_prop", object_and_items_nullable_prop), + ("object_items_nullable", object_items_nullable), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(NullableClassDictInput, arg_) + return NullableClass.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NullableClassDictInput, + NullableClassDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NullableClassDict: + return NullableClass.validate(arg, configuration=configuration) + + @property + def integer_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[int, schemas.Unset], + ]: + val = self.get("integer_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + int, + ], + val + ) + + @property + def number_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[int, float, schemas.Unset], + ]: + val = self.get("number_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + typing.Union[int, float], + ], + val + ) + + @property + def boolean_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[bool, schemas.Unset], + ]: + val = self.get("boolean_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + bool, + ], + val + ) + + @property + def string_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[str, schemas.Unset], + ]: + val = self.get("string_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + str, + ], + val + ) + + @property + def date_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[str, schemas.Unset], + ]: + val = self.get("date_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + str, + ], + val + ) + + @property + def datetime_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[str, schemas.Unset], + ]: + val = self.get("datetime_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + str, + ], + val + ) + + @property + def array_nullable_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[ArrayNullablePropTuple, schemas.Unset], + ]: + val = self.get("array_nullable_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + ArrayNullablePropTuple, + ], + val + ) + + @property + def array_and_items_nullable_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[ArrayAndItemsNullablePropTuple, schemas.Unset], + ]: + val = self.get("array_and_items_nullable_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + ArrayAndItemsNullablePropTuple, + ], + val + ) + + @property + def array_items_nullable(self) -> typing.Union[ArrayItemsNullableTuple, schemas.Unset]: + val = self.get("array_items_nullable", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ArrayItemsNullableTuple, + val + ) + + @property + def object_nullable_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[ObjectNullablePropDict, schemas.Unset], + ]: + val = self.get("object_nullable_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + ObjectNullablePropDict, + ], + val + ) + + @property + def object_and_items_nullable_prop(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[ObjectAndItemsNullablePropDict, schemas.Unset], + ]: + val = self.get("object_and_items_nullable_prop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + ObjectAndItemsNullablePropDict, + ], + val + ) + + @property + def object_items_nullable(self) -> typing.Union[ObjectItemsNullableDict, schemas.Unset]: + val = self.get("object_items_nullable", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + ObjectItemsNullableDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], + ]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + val + ) +NullableClassDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + None, + int, + ], + typing.Union[ + None, + typing.Union[ + int, + float + ], + ], + typing.Union[ + None, + bool, + ], + typing.Union[ + None, + str, + ], + typing.Union[ + None, + typing.Union[ + str, + datetime.date + ], + ], + typing.Union[ + None, + typing.Union[ + str, + datetime.datetime + ], + ], + typing.Union[ + None, + typing.Union[ + ArrayNullablePropTupleInput, + ArrayNullablePropTuple + ], + ], + typing.Union[ + None, + typing.Union[ + ArrayAndItemsNullablePropTupleInput, + ArrayAndItemsNullablePropTuple + ], + ], + typing.Union[ + ArrayItemsNullableTupleInput, + ArrayItemsNullableTuple + ], + typing.Union[ + None, + typing.Union[ + ObjectNullablePropDictInput, + ObjectNullablePropDict, + ], + ], + typing.Union[ + None, + typing.Union[ + ObjectAndItemsNullablePropDictInput, + ObjectAndItemsNullablePropDict, + ], + ], + typing.Union[ + ObjectItemsNullableDictInput, + ObjectItemsNullableDict, + ], + typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + ], + ] +] + + +@dataclasses.dataclass(frozen=True) +class NullableClass( + schemas.Schema[NullableClassDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NullableClassDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NullableClassDictInput, + NullableClassDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NullableClassDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py new file mode 100644 index 00000000000..68376c81c0b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_2: typing_extensions.TypeAlias = schemas.NoneSchema +OneOf = typing.Tuple[ + typing.Type[triangle.Triangle], + typing.Type[quadrilateral.Quadrilateral], + typing.Type[_2], +] + + +@dataclasses.dataclass(frozen=True) +class NullableShape( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) + """ + # any type + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py new file mode 100644 index 00000000000..c263e53376e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py @@ -0,0 +1,53 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class NullableString( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number.py b/samples/client/petstore/python/src/openapi_client/components/schema/number.py new file mode 100644 index 00000000000..1ea05776faa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/number.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Number: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py new file mode 100644 index 00000000000..2f927f8d960 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py @@ -0,0 +1,111 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +JustNumber: typing_extensions.TypeAlias = schemas.NumberSchema +Properties = typing.TypedDict( + 'Properties', + { + "JustNumber": typing.Type[JustNumber], + } +) + + +class NumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "JustNumber", + }) + + def __new__( + cls, + *, + JustNumber: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("JustNumber", JustNumber), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(NumberOnlyDictInput, arg_) + return NumberOnly.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + NumberOnlyDictInput, + NumberOnlyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberOnlyDict: + return NumberOnly.validate(arg, configuration=configuration) + + @property + def JustNumber(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("JustNumber", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +NumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class NumberOnly( + schemas.Schema[NumberOnlyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: NumberOnlyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + NumberOnlyDictInput, + NumberOnlyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> NumberOnlyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py new file mode 100644 index 00000000000..a5bacab32d2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py @@ -0,0 +1,29 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class NumberWithExclusiveMinMax( + schemas.NumberSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + exclusive_maximum: typing.Union[int, float] = 12 + exclusive_minimum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py new file mode 100644 index 00000000000..b8a978621dc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py @@ -0,0 +1,29 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class NumberWithValidations( + schemas.NumberSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + inclusive_maximum: typing.Union[int, float] = 20 + inclusive_minimum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py new file mode 100644 index 00000000000..02540b7788a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py @@ -0,0 +1,107 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +A: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + } +) + + +class ObjWithRequiredPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "a", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + a: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "a": a, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ObjWithRequiredPropsDictInput, arg_) + return ObjWithRequiredProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjWithRequiredPropsDictInput, + ObjWithRequiredPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjWithRequiredPropsDict: + return ObjWithRequiredProps.validate(arg, configuration=configuration) + + @property + def a(self) -> str: + return typing.cast( + str, + self.__getitem__("a") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjWithRequiredPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] +AllOf = typing.Tuple[ + typing.Type[obj_with_required_props_base.ObjWithRequiredPropsBase], +] + + +@dataclasses.dataclass(frozen=True) +class ObjWithRequiredProps( + schemas.Schema[ObjWithRequiredPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "a", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjWithRequiredPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjWithRequiredPropsDictInput, + ObjWithRequiredPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjWithRequiredPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py new file mode 100644 index 00000000000..3009e56b59b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +B: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "b": typing.Type[B], + } +) + + +class ObjWithRequiredPropsBaseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "b", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + b: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "b": b, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ObjWithRequiredPropsBaseDictInput, arg_) + return ObjWithRequiredPropsBase.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjWithRequiredPropsBaseDictInput, + ObjWithRequiredPropsBaseDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjWithRequiredPropsBaseDict: + return ObjWithRequiredPropsBase.validate(arg, configuration=configuration) + + @property + def b(self) -> str: + return typing.cast( + str, + self.__getitem__("b") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjWithRequiredPropsBaseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjWithRequiredPropsBase( + schemas.Schema[ObjWithRequiredPropsBaseDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "b", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjWithRequiredPropsBaseDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjWithRequiredPropsBaseDictInput, + ObjWithRequiredPropsBaseDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjWithRequiredPropsBaseDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py new file mode 100644 index 00000000000..fb9ab4c7c15 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +ObjectInterface: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py new file mode 100644 index 00000000000..cabbb2a3623 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py @@ -0,0 +1,116 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Arg: typing_extensions.TypeAlias = schemas.StrSchema +Args: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "arg": typing.Type[Arg], + "args": typing.Type[Args], + } +) + + +class ObjectModelWithArgAndArgsPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "arg", + "args", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + arg: str, + args: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "arg": arg, + "args": args, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectModelWithArgAndArgsPropertiesDictInput, arg_) + return ObjectModelWithArgAndArgsProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectModelWithArgAndArgsPropertiesDictInput, + ObjectModelWithArgAndArgsPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectModelWithArgAndArgsPropertiesDict: + return ObjectModelWithArgAndArgsProperties.validate(arg, configuration=configuration) + + @property + def arg(self) -> str: + return typing.cast( + str, + self.__getitem__("arg") + ) + + @property + def args(self) -> str: + return typing.cast( + str, + self.__getitem__("args") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectModelWithArgAndArgsPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectModelWithArgAndArgsProperties( + schemas.Schema[ObjectModelWithArgAndArgsPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "arg", + "args", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectModelWithArgAndArgsPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectModelWithArgAndArgsPropertiesDictInput, + ObjectModelWithArgAndArgsPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectModelWithArgAndArgsPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py new file mode 100644 index 00000000000..ed6dfbe5a07 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py @@ -0,0 +1,150 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import boolean +from openapi_client.components.schema import number_with_validations +from openapi_client.components.schema import string +Properties = typing.TypedDict( + 'Properties', + { + "myNumber": typing.Type[number_with_validations.NumberWithValidations], + "myString": typing.Type[string.String], + "myBoolean": typing.Type[boolean.Boolean], + } +) + + +class ObjectModelWithRefPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "myNumber", + "myString", + "myBoolean", + }) + + def __new__( + cls, + *, + myNumber: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + myString: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + myBoolean: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("myNumber", myNumber), + ("myString", myString), + ("myBoolean", myBoolean), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectModelWithRefPropsDictInput, arg_) + return ObjectModelWithRefProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectModelWithRefPropsDictInput, + ObjectModelWithRefPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectModelWithRefPropsDict: + return ObjectModelWithRefProps.validate(arg, configuration=configuration) + + @property + def myNumber(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("myNumber", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def myString(self) -> typing.Union[str, schemas.Unset]: + val = self.get("myString", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def myBoolean(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("myBoolean", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectModelWithRefPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectModelWithRefProps( + schemas.Schema[ObjectModelWithRefPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectModelWithRefPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectModelWithRefPropsDictInput, + ObjectModelWithRefPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectModelWithRefPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py new file mode 100644 index 00000000000..9a74696cd1d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -0,0 +1,137 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "test", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + }) + + def __new__( + cls, + *, + test: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "test": test, + } + for key_, val in ( + ("name", name), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def test(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("test") + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "test", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[object_with_optional_test_prop.ObjectWithOptionalTestProp], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py new file mode 100644 index 00000000000..738c2e61ad2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +SomeProp: typing_extensions.TypeAlias = schemas.DictSchema +Someprop2: typing_extensions.TypeAlias = schemas.DictSchema +Properties = typing.TypedDict( + 'Properties', + { + "someProp": typing.Type[SomeProp], + "someprop": typing.Type[Someprop2], + } +) + + +class ObjectWithCollidingPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someProp", + "someprop", + }) + + def __new__( + cls, + *, + someProp: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + schemas.Unset + ] = schemas.unset, + someprop: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someProp", someProp), + ("someprop", someprop), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithCollidingPropertiesDictInput, arg_) + return ObjectWithCollidingProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithCollidingPropertiesDictInput, + ObjectWithCollidingPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithCollidingPropertiesDict: + return ObjectWithCollidingProperties.validate(arg, configuration=configuration) + + @property + def someProp(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("someProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) + + @property + def someprop(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("someprop", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithCollidingPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithCollidingProperties( + schemas.Schema[ObjectWithCollidingPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + component with properties that have name collisions + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithCollidingPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithCollidingPropertiesDictInput, + ObjectWithCollidingPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithCollidingPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py new file mode 100644 index 00000000000..ff658ab2a64 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py @@ -0,0 +1,148 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Width: typing_extensions.TypeAlias = schemas.DecimalSchema + +from openapi_client.components.schema import decimal_payload +from openapi_client.components.schema import money +Properties = typing.TypedDict( + 'Properties', + { + "length": typing.Type[decimal_payload.DecimalPayload], + "width": typing.Type[Width], + "cost": typing.Type[money.Money], + } +) + + +class ObjectWithDecimalPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "length", + "width", + "cost", + }) + + def __new__( + cls, + *, + length: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + width: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + cost: typing.Union[ + money.MoneyDictInput, + money.MoneyDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("length", length), + ("width", width), + ("cost", cost), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithDecimalPropertiesDictInput, arg_) + return ObjectWithDecimalProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithDecimalPropertiesDictInput, + ObjectWithDecimalPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithDecimalPropertiesDict: + return ObjectWithDecimalProperties.validate(arg, configuration=configuration) + + @property + def length(self) -> typing.Union[str, schemas.Unset]: + val = self.get("length", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def width(self) -> typing.Union[str, schemas.Unset]: + val = self.get("width", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def cost(self) -> typing.Union[money.MoneyDict, schemas.Unset]: + val = self.get("cost", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + money.MoneyDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithDecimalPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithDecimalProperties( + schemas.Schema[ObjectWithDecimalPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithDecimalPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithDecimalPropertiesDictInput, + ObjectWithDecimalPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithDecimalPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py new file mode 100644 index 00000000000..732254311da --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py @@ -0,0 +1,102 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +SpecialPropertyName: typing_extensions.TypeAlias = schemas.Int64Schema +_123List: typing_extensions.TypeAlias = schemas.StrSchema +_123Number: typing_extensions.TypeAlias = schemas.IntSchema +Properties = typing.TypedDict( + 'Properties', + { + "$special[property.name]": typing.Type[SpecialPropertyName], + "123-list": typing.Type[_123List], + "123Number": typing.Type[_123Number], + } +) + + +class ObjectWithDifficultlyNamedPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "123-list", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "$special[property.name]", + "123Number", + }) + + def __new__( + cls, + *, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + } + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithDifficultlyNamedPropsDictInput, arg_) + return ObjectWithDifficultlyNamedProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithDifficultlyNamedPropsDictInput, + ObjectWithDifficultlyNamedPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithDifficultlyNamedPropsDict: + return ObjectWithDifficultlyNamedProps.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithDifficultlyNamedPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithDifficultlyNamedProps( + schemas.Schema[ObjectWithDifficultlyNamedPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + model with properties that have invalid names for python + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "123-list", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithDifficultlyNamedPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithDifficultlyNamedPropsDictInput, + ObjectWithDifficultlyNamedPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithDifficultlyNamedPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py new file mode 100644 index 00000000000..d187881e16e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py @@ -0,0 +1,129 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class SomeProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +Properties = typing.TypedDict( + 'Properties', + { + "someProp": typing.Type[SomeProp], + } +) + + +class ObjectWithInlineCompositionPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someProp", + }) + + def __new__( + cls, + *, + someProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someProp", someProp), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithInlineCompositionPropertyDictInput, arg_) + return ObjectWithInlineCompositionProperty.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithInlineCompositionPropertyDictInput, + ObjectWithInlineCompositionPropertyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithInlineCompositionPropertyDict: + return ObjectWithInlineCompositionProperty.validate(arg, configuration=configuration) + + @property + def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("someProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithInlineCompositionPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithInlineCompositionProperty( + schemas.Schema[ObjectWithInlineCompositionPropertyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithInlineCompositionPropertyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithInlineCompositionPropertyDictInput, + ObjectWithInlineCompositionPropertyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithInlineCompositionPropertyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py new file mode 100644 index 00000000000..328ab930691 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py @@ -0,0 +1,111 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import array_with_validations_in_items +from openapi_client.components.schema import from_schema +Properties = typing.TypedDict( + 'Properties', + { + "from": typing.Type[from_schema.FromSchema], + "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], + } +) + + +class ObjectWithInvalidNamedRefedPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "!reference", + "from", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + from: typing.Union[ + from_schema.FromSchemaDictInput, + from_schema.FromSchemaDict, + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "from": from, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithInvalidNamedRefedPropertiesDictInput, arg_) + return ObjectWithInvalidNamedRefedProperties.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithInvalidNamedRefedPropertiesDictInput, + ObjectWithInvalidNamedRefedPropertiesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithInvalidNamedRefedPropertiesDict: + return ObjectWithInvalidNamedRefedProperties.validate(arg, configuration=configuration) + + @property + def from(self) -> from_schema.FromSchemaDict: + return typing.cast( + from_schema.FromSchemaDict, + self.__getitem__("from") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithInvalidNamedRefedPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithInvalidNamedRefedProperties( + schemas.Schema[ObjectWithInvalidNamedRefedPropertiesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "!reference", + "from", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithInvalidNamedRefedPropertiesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithInvalidNamedRefedPropertiesDictInput, + ObjectWithInvalidNamedRefedPropertiesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithInvalidNamedRefedPropertiesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py new file mode 100644 index 00000000000..7037916edb4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py @@ -0,0 +1,131 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema +A: typing_extensions.TypeAlias = schemas.NumberSchema +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + } +) + + +class ObjectWithNonIntersectingValuesDict(schemas.immutabledict[str, typing.Union[ + typing.Union[int, float], + str, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "a", + }) + + def __new__( + cls, + *, + a: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("a", a), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithNonIntersectingValuesDictInput, arg_) + return ObjectWithNonIntersectingValues.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithNonIntersectingValuesDictInput, + ObjectWithNonIntersectingValuesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithNonIntersectingValuesDict: + return ObjectWithNonIntersectingValues.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("a", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +ObjectWithNonIntersectingValuesDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + int, + float + ], + str, + ] +] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithNonIntersectingValues( + schemas.Schema[ObjectWithNonIntersectingValuesDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithNonIntersectingValuesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithNonIntersectingValuesDictInput, + ObjectWithNonIntersectingValuesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithNonIntersectingValuesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py new file mode 100644 index 00000000000..393fd12fbc5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py @@ -0,0 +1,256 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +A: typing_extensions.TypeAlias = schemas.StrSchema +B: typing_extensions.TypeAlias = schemas.NumberSchema + +from openapi_client.components.schema import enum_class + + +class ArrayPropertyTuple( + typing.Tuple[ + typing.Literal["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M"], + ... + ] +): + + def __new__(cls, arg: typing.Union[ArrayPropertyTupleInput, ArrayPropertyTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return ArrayProperty.validate(arg, configuration=configuration) +ArrayPropertyTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M" + ], + ], + typing.Tuple[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)", + "COUNT_1M", + "COUNT_50M" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class ArrayProperty( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayPropertyTuple], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + tuple, + }) + items: typing.Type[enum_class.EnumClass] = dataclasses.field(default_factory=lambda: enum_class.EnumClass) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ArrayPropertyTuple, + } + ) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + ArrayPropertyTupleInput, + ArrayPropertyTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ArrayPropertyTuple: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + "b": typing.Type[B], + "ArrayProperty": typing.Type[ArrayProperty], + } +) + + +class ObjectWithOnlyOptionalPropsDict(schemas.immutabledict[str, typing.Union[ + None, + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + typing.Union[int, float], + str, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "a", + "b", + "ArrayProperty", + }) + + def __new__( + cls, + *, + a: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + b: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + ArrayProperty: typing.Union[ + None, + typing.Union[ + ArrayPropertyTupleInput, + ArrayPropertyTuple + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("a", a), + ("b", b), + ("ArrayProperty", ArrayProperty), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(ObjectWithOnlyOptionalPropsDictInput, arg_) + return ObjectWithOnlyOptionalProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithOnlyOptionalPropsDictInput, + ObjectWithOnlyOptionalPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithOnlyOptionalPropsDict: + return ObjectWithOnlyOptionalProps.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[str, schemas.Unset]: + val = self.get("a", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def b(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("b", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def ArrayProperty(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[ArrayPropertyTuple, schemas.Unset], + ]: + val = self.get("ArrayProperty", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + ArrayPropertyTuple, + ], + val + ) +ObjectWithOnlyOptionalPropsDictInput = typing.TypedDict( + 'ObjectWithOnlyOptionalPropsDictInput', + { + "a": str, + "b": typing.Union[ + int, + float + ], + "ArrayProperty": typing.Union[ + None, + typing.Union[ + ArrayPropertyTupleInput, + ArrayPropertyTuple + ], + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class ObjectWithOnlyOptionalProps( + schemas.Schema[ObjectWithOnlyOptionalPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithOnlyOptionalPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithOnlyOptionalPropsDictInput, + ObjectWithOnlyOptionalPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithOnlyOptionalPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py new file mode 100644 index 00000000000..3e1be601c8b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py @@ -0,0 +1,110 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Test: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "test": typing.Type[Test], + } +) + + +class ObjectWithOptionalTestPropDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "test", + }) + + def __new__( + cls, + *, + test: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("test", test), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ObjectWithOptionalTestPropDictInput, arg_) + return ObjectWithOptionalTestProp.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ObjectWithOptionalTestPropDictInput, + ObjectWithOptionalTestPropDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithOptionalTestPropDict: + return ObjectWithOptionalTestProp.validate(arg, configuration=configuration) + + @property + def test(self) -> typing.Union[str, schemas.Unset]: + val = self.get("test", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ObjectWithOptionalTestPropDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ObjectWithOptionalTestProp( + schemas.Schema[ObjectWithOptionalTestPropDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ObjectWithOptionalTestPropDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ObjectWithOptionalTestPropDictInput, + ObjectWithOptionalTestPropDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ObjectWithOptionalTestPropDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py new file mode 100644 index 00000000000..a2d8318b89d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py @@ -0,0 +1,37 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ObjectWithValidations( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + min_properties: int = 2 + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/order.py b/samples/client/petstore/python/src/openapi_client/components/schema/order.py new file mode 100644 index 00000000000..8935eea8128 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/order.py @@ -0,0 +1,286 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Id: typing_extensions.TypeAlias = schemas.Int64Schema +PetId: typing_extensions.TypeAlias = schemas.Int64Schema +Quantity: typing_extensions.TypeAlias = schemas.Int32Schema +ShipDate: typing_extensions.TypeAlias = schemas.DateTimeSchema + + +class StatusEnums: + + @schemas.classproperty + def PLACED(cls) -> typing.Literal["placed"]: + return Status.validate("placed") + + @schemas.classproperty + def APPROVED(cls) -> typing.Literal["approved"]: + return Status.validate("approved") + + @schemas.classproperty + def DELIVERED(cls) -> typing.Literal["delivered"]: + return Status.validate("delivered") + + +@dataclasses.dataclass(frozen=True) +class Status( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + } + ) + enums = StatusEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["placed"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["approved"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["approved"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["delivered"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["delivered"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed","approved","delivered",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "placed", + "approved", + "delivered", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "placed", + "approved", + "delivered", + ], + validated_arg + ) +Complete: typing_extensions.TypeAlias = schemas.BoolSchema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "petId": typing.Type[PetId], + "quantity": typing.Type[Quantity], + "shipDate": typing.Type[ShipDate], + "status": typing.Type[Status], + "complete": typing.Type[Complete], + } +) + + +class OrderDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + "petId", + "quantity", + "shipDate", + "status", + "complete", + }) + + def __new__( + cls, + *, + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + petId: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + quantity: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + shipDate: typing.Union[ + str, + datetime.datetime, + schemas.Unset + ] = schemas.unset, + status: typing.Union[ + typing.Literal[ + "placed", + "approved", + "delivered" + ], + schemas.Unset + ] = schemas.unset, + complete: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("id", id), + ("petId", petId), + ("quantity", quantity), + ("shipDate", shipDate), + ("status", status), + ("complete", complete), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(OrderDictInput, arg_) + return Order.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + OrderDictInput, + OrderDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> OrderDict: + return Order.validate(arg, configuration=configuration) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def petId(self) -> typing.Union[int, schemas.Unset]: + val = self.get("petId", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def quantity(self) -> typing.Union[int, schemas.Unset]: + val = self.get("quantity", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def shipDate(self) -> typing.Union[str, schemas.Unset]: + val = self.get("shipDate", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def status(self) -> typing.Union[typing.Literal["placed", "approved", "delivered"], schemas.Unset]: + val = self.get("status", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["placed", "approved", "delivered"], + val + ) + + @property + def complete(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("complete", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +OrderDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Order( + schemas.Schema[OrderDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: OrderDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + OrderDictInput, + OrderDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> OrderDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py b/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py new file mode 100644 index 00000000000..a46ede7f616 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py @@ -0,0 +1,184 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema +Count: typing_extensions.TypeAlias = schemas.IntSchema + +from openapi_client.components.schema import my_object_dto + + +class ResultsTuple( + typing.Tuple[ + my_object_dto.MyObjectDtoDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[ResultsTupleInput, ResultsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Results.validate(arg, configuration=configuration) +ResultsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + my_object_dto.MyObjectDtoDictInput, + my_object_dto.MyObjectDtoDict, + ], + ], + typing.Tuple[ + typing.Union[ + my_object_dto.MyObjectDtoDictInput, + my_object_dto.MyObjectDtoDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Results( + schemas.Schema[schemas.immutabledict, ResultsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[my_object_dto.MyObjectDto] = dataclasses.field(default_factory=lambda: my_object_dto.MyObjectDto) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: ResultsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ResultsTupleInput, + ResultsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ResultsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "count": typing.Type[Count], + "results": typing.Type[Results], + } +) + + +class PaginatedResultMyObjectDtoDict(schemas.immutabledict[str, typing.Union[ + typing.Tuple[schemas.OUTPUT_BASE_TYPES], + int, +]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "count", + "results", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + count: int, + results: typing.Union[ + ResultsTupleInput, + ResultsTuple + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "count": count, + "results": results, + } + used_arg_ = typing.cast(PaginatedResultMyObjectDtoDictInput, arg_) + return PaginatedResultMyObjectDto.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PaginatedResultMyObjectDtoDictInput, + PaginatedResultMyObjectDtoDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PaginatedResultMyObjectDtoDict: + return PaginatedResultMyObjectDto.validate(arg, configuration=configuration) + + @property + def count(self) -> int: + return typing.cast( + int, + self.__getitem__("count") + ) + + @property + def results(self) -> ResultsTuple: + return typing.cast( + ResultsTuple, + self.__getitem__("results") + ) +PaginatedResultMyObjectDtoDictInput = typing.TypedDict( + 'PaginatedResultMyObjectDtoDictInput', + { + "count": int, + "results": typing.Union[ + ResultsTupleInput, + ResultsTuple + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class PaginatedResultMyObjectDto( + schemas.Schema[PaginatedResultMyObjectDtoDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "count", + "results", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PaginatedResultMyObjectDtoDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PaginatedResultMyObjectDtoDictInput, + PaginatedResultMyObjectDtoDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PaginatedResultMyObjectDtoDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py new file mode 100644 index 00000000000..1ccc06b18ae --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py @@ -0,0 +1,49 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import child_cat +AllOf = typing.Tuple[ + typing.Type[grandparent_animal.GrandparentAnimal], +] + + +@dataclasses.dataclass(frozen=True) +class ParentPet( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'pet_type': { + 'ChildCat': child_cat.ChildCat, + } + } + ) + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/pet.py new file mode 100644 index 00000000000..99f95fa2957 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/pet.py @@ -0,0 +1,392 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Id: typing_extensions.TypeAlias = schemas.Int64Schema +Name: typing_extensions.TypeAlias = schemas.StrSchema +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class PhotoUrlsTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[PhotoUrlsTupleInput, PhotoUrlsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return PhotoUrls.validate(arg, configuration=configuration) +PhotoUrlsTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class PhotoUrls( + schemas.Schema[schemas.immutabledict, PhotoUrlsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: PhotoUrlsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PhotoUrlsTupleInput, + PhotoUrlsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PhotoUrlsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class StatusEnums: + + @schemas.classproperty + def AVAILABLE(cls) -> typing.Literal["available"]: + return Status.validate("available") + + @schemas.classproperty + def PENDING(cls) -> typing.Literal["pending"]: + return Status.validate("pending") + + @schemas.classproperty + def SOLD(cls) -> typing.Literal["sold"]: + return Status.validate("sold") + + +@dataclasses.dataclass(frozen=True) +class Status( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "available": "AVAILABLE", + "pending": "PENDING", + "sold": "SOLD", + } + ) + enums = StatusEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["available"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["available"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["pending"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["pending"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["sold"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["sold"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["available","pending","sold",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "available", + "pending", + "sold", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "available", + "pending", + "sold", + ], + validated_arg + ) + +from openapi_client.components.schema import category +from openapi_client.components.schema import tag + + +class TagsTuple( + typing.Tuple[ + tag.TagDict, + ... + ] +): + + def __new__(cls, arg: typing.Union[TagsTupleInput, TagsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Tags.validate(arg, configuration=configuration) +TagsTupleInput = typing.Union[ + typing.List[ + typing.Union[ + tag.TagDictInput, + tag.TagDict, + ], + ], + typing.Tuple[ + typing.Union[ + tag.TagDictInput, + tag.TagDict, + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Tags( + schemas.Schema[schemas.immutabledict, TagsTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[tag.Tag] = dataclasses.field(default_factory=lambda: tag.Tag) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: TagsTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + TagsTupleInput, + TagsTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TagsTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "category": typing.Type[category.Category], + "name": typing.Type[Name], + "photoUrls": typing.Type[PhotoUrls], + "tags": typing.Type[Tags], + "status": typing.Type[Status], + } +) + + +class PetDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "name", + "photoUrls", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + "category", + "tags", + "status", + }) + + def __new__( + cls, + *, + name: str, + photoUrls: typing.Union[ + PhotoUrlsTupleInput, + PhotoUrlsTuple + ], + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + category: typing.Union[ + category.CategoryDictInput, + category.CategoryDict, + schemas.Unset + ] = schemas.unset, + tags: typing.Union[ + TagsTupleInput, + TagsTuple, + schemas.Unset + ] = schemas.unset, + status: typing.Union[ + typing.Literal[ + "available", + "pending", + "sold" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "name": name, + "photoUrls": photoUrls, + } + for key_, val in ( + ("id", id), + ("category", category), + ("tags", tags), + ("status", status), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PetDictInput, arg_) + return Pet.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PetDictInput, + PetDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PetDict: + return Pet.validate(arg, configuration=configuration) + + @property + def name(self) -> str: + return typing.cast( + str, + self.__getitem__("name") + ) + + @property + def photoUrls(self) -> PhotoUrlsTuple: + return typing.cast( + PhotoUrlsTuple, + self.__getitem__("photoUrls") + ) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def category(self) -> typing.Union[category.CategoryDict, schemas.Unset]: + val = self.get("category", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + category.CategoryDict, + val + ) + + @property + def tags(self) -> typing.Union[TagsTuple, schemas.Unset]: + val = self.get("tags", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + TagsTuple, + val + ) + + @property + def status(self) -> typing.Union[typing.Literal["available", "pending", "sold"], schemas.Unset]: + val = self.get("status", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["available", "pending", "sold"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PetDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Pet( + schemas.Schema[PetDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Pet object that needs to be added to the store + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "name", + "photoUrls", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PetDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PetDictInput, + PetDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PetDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/pig.py new file mode 100644 index 00000000000..1cbda2f37ba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/pig.py @@ -0,0 +1,41 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import basque_pig +from openapi_client.components.schema import danish_pig +OneOf = typing.Tuple[ + typing.Type[basque_pig.BasquePig], + typing.Type[danish_pig.DanishPig], +] + + +@dataclasses.dataclass(frozen=True) +class Pig( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'className': { + 'BasquePig': basque_pig.BasquePig, + 'DanishPig': danish_pig.DanishPig, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/player.py b/samples/client/petstore/python/src/openapi_client/components/schema/player.py new file mode 100644 index 00000000000..2dfaae073a3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/player.py @@ -0,0 +1,130 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + "enemyPlayer": typing.Type['Player'], + } +) + + +class PlayerDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + "enemyPlayer", + }) + + def __new__( + cls, + *, + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + enemyPlayer: typing.Union[ + PlayerDictInput, + PlayerDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("name", name), + ("enemyPlayer", enemyPlayer), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PlayerDictInput, arg_) + return Player.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PlayerDictInput, + PlayerDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PlayerDict: + return Player.validate(arg, configuration=configuration) + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def enemyPlayer(self) -> typing.Union[PlayerDict, schemas.Unset]: + val = self.get("enemyPlayer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + PlayerDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PlayerDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Player( + schemas.Schema[PlayerDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + 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 + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PlayerDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PlayerDictInput, + PlayerDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PlayerDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py b/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py new file mode 100644 index 00000000000..60a7eb442a1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py @@ -0,0 +1,112 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Key: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "key": typing.Type[Key], + } +) + + +class PublicKeyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "key", + }) + + def __new__( + cls, + *, + key: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("key", key), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(PublicKeyDictInput, arg_) + return PublicKey.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PublicKeyDictInput, + PublicKeyDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PublicKeyDict: + return PublicKey.validate(arg, configuration=configuration) + + @property + def key(self) -> typing.Union[str, schemas.Unset]: + val = self.get("key", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +PublicKeyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class PublicKey( + schemas.Schema[PublicKeyDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + schema that contains a property named key + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PublicKeyDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PublicKeyDictInput, + PublicKeyDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PublicKeyDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py new file mode 100644 index 00000000000..e2324682f6f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py @@ -0,0 +1,41 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import complex_quadrilateral +from openapi_client.components.schema import simple_quadrilateral +OneOf = typing.Tuple[ + typing.Type[simple_quadrilateral.SimpleQuadrilateral], + typing.Type[complex_quadrilateral.ComplexQuadrilateral], +] + + +@dataclasses.dataclass(frozen=True) +class Quadrilateral( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'quadrilateralType': { + 'ComplexQuadrilateral': complex_quadrilateral.ComplexQuadrilateral, + 'SimpleQuadrilateral': simple_quadrilateral.SimpleQuadrilateral, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py new file mode 100644 index 00000000000..ed3e127c447 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py @@ -0,0 +1,157 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ShapeTypeEnums: + + @schemas.classproperty + def QUADRILATERAL(cls) -> typing.Literal["Quadrilateral"]: + return ShapeType.validate("Quadrilateral") + + +@dataclasses.dataclass(frozen=True) +class ShapeType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "Quadrilateral": "QUADRILATERAL", + } + ) + enums = ShapeTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["Quadrilateral"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["Quadrilateral"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["Quadrilateral",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "Quadrilateral", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "Quadrilateral", + ], + validated_arg + ) +QuadrilateralType: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "shapeType": typing.Type[ShapeType], + "quadrilateralType": typing.Type[QuadrilateralType], + } +) + + +class QuadrilateralInterfaceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "quadrilateralType", + "shapeType", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + quadrilateralType: str, + shapeType: typing.Literal[ + "Quadrilateral" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "quadrilateralType": quadrilateralType, + "shapeType": shapeType, + } + arg_.update(kwargs) + used_arg_ = typing.cast(QuadrilateralInterfaceDictInput, arg_) + return QuadrilateralInterface.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QuadrilateralInterfaceDictInput, + QuadrilateralInterfaceDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QuadrilateralInterfaceDict: + return QuadrilateralInterface.validate(arg, configuration=configuration) + + @property + def quadrilateralType(self) -> str: + return typing.cast( + str, + self.__getitem__("quadrilateralType") + ) + + @property + def shapeType(self) -> typing.Literal["Quadrilateral"]: + return typing.cast( + typing.Literal["Quadrilateral"], + self.__getitem__("shapeType") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +QuadrilateralInterfaceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class QuadrilateralInterface( + schemas.AnyTypeSchema[QuadrilateralInterfaceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "quadrilateralType", + "shapeType", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QuadrilateralInterfaceDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py b/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py new file mode 100644 index 00000000000..8717a6da487 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Bar: typing_extensions.TypeAlias = schemas.StrSchema +Baz: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "bar": typing.Type[Bar], + "baz": typing.Type[Baz], + } +) + + +class ReadOnlyFirstDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "bar", + "baz", + }) + + def __new__( + cls, + *, + bar: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + baz: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("bar", bar), + ("baz", baz), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ReadOnlyFirstDictInput, arg_) + return ReadOnlyFirst.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReadOnlyFirstDictInput, + ReadOnlyFirstDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReadOnlyFirstDict: + return ReadOnlyFirst.validate(arg, configuration=configuration) + + @property + def bar(self) -> typing.Union[str, schemas.Unset]: + val = self.get("bar", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def baz(self) -> typing.Union[str, schemas.Unset]: + val = self.get("baz", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ReadOnlyFirstDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ReadOnlyFirst( + schemas.Schema[ReadOnlyFirstDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReadOnlyFirstDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ReadOnlyFirstDictInput, + ReadOnlyFirstDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReadOnlyFirstDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py new file mode 100644 index 00000000000..72a171a380d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pet +RefPet: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py new file mode 100644 index 00000000000..9dfe2f61a34 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py @@ -0,0 +1,109 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema + + +class ReqPropsFromExplicitAddPropsDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + validName: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + arg_: typing.Dict[str, typing.Any] = { + "validName": validName, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ReqPropsFromExplicitAddPropsDictInput, arg_) + return ReqPropsFromExplicitAddProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReqPropsFromExplicitAddPropsDictInput, + ReqPropsFromExplicitAddPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromExplicitAddPropsDict: + return ReqPropsFromExplicitAddProps.validate(arg, configuration=configuration) + + @property + def validName(self) -> str: + return self.__getitem__("validName") + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +ReqPropsFromExplicitAddPropsDictInput = typing.Mapping[ + str, + typing.Union[ + str, + str, + str, + ] +] + + +@dataclasses.dataclass(frozen=True) +class ReqPropsFromExplicitAddProps( + schemas.Schema[ReqPropsFromExplicitAddPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReqPropsFromExplicitAddPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ReqPropsFromExplicitAddPropsDictInput, + ReqPropsFromExplicitAddPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromExplicitAddPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py new file mode 100644 index 00000000000..4a8892b558c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class ReqPropsFromTrueAddPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + validName: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "validName": validName, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ReqPropsFromTrueAddPropsDictInput, arg_) + return ReqPropsFromTrueAddProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReqPropsFromTrueAddPropsDictInput, + ReqPropsFromTrueAddPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromTrueAddPropsDict: + return ReqPropsFromTrueAddProps.validate(arg, configuration=configuration) + + @property + def validName(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("validName") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +ReqPropsFromTrueAddPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ReqPropsFromTrueAddProps( + schemas.Schema[ReqPropsFromTrueAddPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReqPropsFromTrueAddPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ReqPropsFromTrueAddPropsDictInput, + ReqPropsFromTrueAddPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromTrueAddPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py new file mode 100644 index 00000000000..cf147bb581a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ReqPropsFromUnsetAddPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + validName: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "validName": validName, + } + arg_.update(kwargs) + used_arg_ = typing.cast(ReqPropsFromUnsetAddPropsDictInput, arg_) + return ReqPropsFromUnsetAddProps.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReqPropsFromUnsetAddPropsDictInput, + ReqPropsFromUnsetAddPropsDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromUnsetAddPropsDict: + return ReqPropsFromUnsetAddProps.validate(arg, configuration=configuration) + + @property + def validName(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("validName") + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ReqPropsFromUnsetAddPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class ReqPropsFromUnsetAddProps( + schemas.Schema[ReqPropsFromUnsetAddPropsDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "invalid-name", + "validName", + }) + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReqPropsFromUnsetAddPropsDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ReqPropsFromUnsetAddPropsDictInput, + ReqPropsFromUnsetAddPropsDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReqPropsFromUnsetAddPropsDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/return.py b/samples/client/petstore/python/src/openapi_client/components/schema/return.py new file mode 100644 index 00000000000..1aabce1ba89 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/return.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Return2: typing_extensions.TypeAlias = schemas.Int32Schema +Properties = typing.TypedDict( + 'Properties', + { + "return": typing.Type[Return2], + } +) + + +class ReturnDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "return", + }) + + def __new__( + cls, + *, + return: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("return", return), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ReturnDictInput, arg_) + return Return.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReturnDictInput, + ReturnDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReturnDict: + return Return.validate(arg, configuration=configuration) + + @property + def return(self) -> typing.Union[int, schemas.Unset]: + val = self.get("return", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ReturnDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Return( + schemas.AnyTypeSchema[ReturnDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Model for testing reserved words + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReturnDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py new file mode 100644 index 00000000000..d7fcd7e88e1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py @@ -0,0 +1,178 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class TriangleTypeEnums: + + @schemas.classproperty + def SCALENE_TRIANGLE(cls) -> typing.Literal["ScaleneTriangle"]: + return TriangleType.validate("ScaleneTriangle") + + +@dataclasses.dataclass(frozen=True) +class TriangleType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "ScaleneTriangle": "SCALENE_TRIANGLE", + } + ) + enums = TriangleTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["ScaleneTriangle"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["ScaleneTriangle"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["ScaleneTriangle",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "ScaleneTriangle", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "ScaleneTriangle", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "triangleType": typing.Type[TriangleType], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "triangleType", + }) + + def __new__( + cls, + *, + triangleType: typing.Union[ + typing.Literal[ + "ScaleneTriangle" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("triangleType", triangleType), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def triangleType(self) -> typing.Union[typing.Literal["ScaleneTriangle"], schemas.Unset]: + val = self.get("triangleType", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["ScaleneTriangle"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[triangle_interface.TriangleInterface], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class ScaleneTriangle( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py new file mode 100644 index 00000000000..f7ef803b38a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py @@ -0,0 +1,73 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SelfReferencingArrayModelTuple( + typing.Tuple[ + 'SelfReferencingArrayModelTuple', + ... + ] +): + + def __new__(cls, arg: typing.Union[SelfReferencingArrayModelTupleInput, SelfReferencingArrayModelTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return SelfReferencingArrayModel.validate(arg, configuration=configuration) +SelfReferencingArrayModelTupleInput = typing.Union[ + typing.List[ + typing.Union[ + 'SelfReferencingArrayModelTupleInput', + SelfReferencingArrayModelTuple + ], + ], + typing.Tuple[ + typing.Union[ + 'SelfReferencingArrayModelTupleInput', + SelfReferencingArrayModelTuple + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class SelfReferencingArrayModel( + schemas.Schema[schemas.immutabledict, SelfReferencingArrayModelTuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[SelfReferencingArrayModel] = dataclasses.field(default_factory=lambda: SelfReferencingArrayModel) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SelfReferencingArrayModelTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SelfReferencingArrayModelTupleInput, + SelfReferencingArrayModelTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SelfReferencingArrayModelTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py new file mode 100644 index 00000000000..ba78a936454 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Properties = typing.TypedDict( + 'Properties', + { + "selfRef": typing.Type['SelfReferencingObjectModel'], + } +) + + +class SelfReferencingObjectModelDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "selfRef", + }) + + def __new__( + cls, + *, + selfRef: typing.Union[ + SelfReferencingObjectModelDictInput, + SelfReferencingObjectModelDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: typing.Union[ + SelfReferencingObjectModelDictInput, + SelfReferencingObjectModelDict, + ], + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("selfRef", selfRef), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SelfReferencingObjectModelDictInput, arg_) + return SelfReferencingObjectModel.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SelfReferencingObjectModelDictInput, + SelfReferencingObjectModelDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SelfReferencingObjectModelDict: + return SelfReferencingObjectModel.validate(arg, configuration=configuration) + + @property + def selfRef(self) -> typing.Union[SelfReferencingObjectModelDict, schemas.Unset]: + val = self.get("selfRef", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + SelfReferencingObjectModelDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[SelfReferencingObjectModelDict, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + SelfReferencingObjectModelDict, + val + ) +SelfReferencingObjectModelDictInput = typing.Mapping[ + str, + typing.Union[ + typing.Union[ + 'SelfReferencingObjectModelDictInput', + SelfReferencingObjectModelDict, + ], + typing.Union[ + 'SelfReferencingObjectModelDictInput', + SelfReferencingObjectModelDict, + ], + ] +] + + +@dataclasses.dataclass(frozen=True) +class SelfReferencingObjectModel( + schemas.Schema[SelfReferencingObjectModelDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[SelfReferencingObjectModel] = dataclasses.field(default_factory=lambda: SelfReferencingObjectModel) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SelfReferencingObjectModelDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SelfReferencingObjectModelDictInput, + SelfReferencingObjectModelDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SelfReferencingObjectModelDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/shape.py b/samples/client/petstore/python/src/openapi_client/components/schema/shape.py new file mode 100644 index 00000000000..ced16f850ee --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/shape.py @@ -0,0 +1,41 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import quadrilateral +from openapi_client.components.schema import triangle +OneOf = typing.Tuple[ + typing.Type[triangle.Triangle], + typing.Type[quadrilateral.Quadrilateral], +] + + +@dataclasses.dataclass(frozen=True) +class Shape( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'shapeType': { + 'Quadrilateral': quadrilateral.Quadrilateral, + 'Triangle': triangle.Triangle, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py b/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py new file mode 100644 index 00000000000..a82c46c5225 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py @@ -0,0 +1,45 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +_0: typing_extensions.TypeAlias = schemas.NoneSchema + +from openapi_client.components.schema import quadrilateral +from openapi_client.components.schema import triangle +OneOf = typing.Tuple[ + typing.Type[_0], + typing.Type[triangle.Triangle], + typing.Type[quadrilateral.Quadrilateral], +] + + +@dataclasses.dataclass(frozen=True) +class ShapeOrNull( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'shapeType': { + 'Quadrilateral': quadrilateral.Quadrilateral, + 'Triangle': triangle.Triangle, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py new file mode 100644 index 00000000000..ec979df6533 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py @@ -0,0 +1,178 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class QuadrilateralTypeEnums: + + @schemas.classproperty + def SIMPLE_QUADRILATERAL(cls) -> typing.Literal["SimpleQuadrilateral"]: + return QuadrilateralType.validate("SimpleQuadrilateral") + + +@dataclasses.dataclass(frozen=True) +class QuadrilateralType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "SimpleQuadrilateral": "SIMPLE_QUADRILATERAL", + } + ) + enums = QuadrilateralTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["SimpleQuadrilateral"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["SimpleQuadrilateral"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["SimpleQuadrilateral",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "SimpleQuadrilateral", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "SimpleQuadrilateral", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "quadrilateralType": typing.Type[QuadrilateralType], + } +) + + +class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "quadrilateralType", + }) + + def __new__( + cls, + *, + quadrilateralType: typing.Union[ + typing.Literal[ + "SimpleQuadrilateral" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("quadrilateralType", quadrilateralType), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(_1DictInput, arg_) + return _1.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + _1DictInput, + _1Dict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return _1.validate(arg, configuration=configuration) + + @property + def quadrilateralType(self) -> typing.Union[typing.Literal["SimpleQuadrilateral"], schemas.Unset]: + val = self.get("quadrilateralType", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["SimpleQuadrilateral"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class _1( + schemas.Schema[_1Dict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: _1Dict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + _1DictInput, + _1Dict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> _1Dict: + return super().validate_base( + arg, + configuration=configuration, + ) + +AllOf = typing.Tuple[ + typing.Type[quadrilateral_interface.QuadrilateralInterface], + typing.Type[_1], +] + + +@dataclasses.dataclass(frozen=True) +class SimpleQuadrilateral( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py b/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py new file mode 100644 index 00000000000..47d2dd088f6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py @@ -0,0 +1,29 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AllOf = typing.Tuple[ + typing.Type[object_interface.ObjectInterface], +] + + +@dataclasses.dataclass(frozen=True) +class SomeObject( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py b/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py new file mode 100644 index 00000000000..0861cb66dc7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py @@ -0,0 +1,112 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +A: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + } +) + + +class SpecialModelNameDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "a", + }) + + def __new__( + cls, + *, + a: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("a", a), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SpecialModelNameDictInput, arg_) + return SpecialModelName.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SpecialModelNameDictInput, + SpecialModelNameDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SpecialModelNameDict: + return SpecialModelName.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[str, schemas.Unset]: + val = self.get("a", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SpecialModelNameDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class SpecialModelName( + schemas.Schema[SpecialModelNameDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + model with an invalid class name for python + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SpecialModelNameDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SpecialModelNameDictInput, + SpecialModelNameDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SpecialModelNameDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string.py b/samples/client/petstore/python/src/openapi_client/components/schema/string.py new file mode 100644 index 00000000000..c9b8b25e4fa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/string.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +String: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py new file mode 100644 index 00000000000..3c39700c5ee --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema + + +class StringBooleanMapDict(schemas.immutabledict[str, bool]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: bool, + ): + used_kwargs = typing.cast(StringBooleanMapDictInput, kwargs) + return StringBooleanMap.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + StringBooleanMapDictInput, + StringBooleanMapDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StringBooleanMapDict: + return StringBooleanMap.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) +StringBooleanMapDictInput = typing.Mapping[ + str, + bool, +] + + +@dataclasses.dataclass(frozen=True) +class StringBooleanMap( + schemas.Schema[StringBooleanMapDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: StringBooleanMapDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + StringBooleanMapDictInput, + StringBooleanMapDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> StringBooleanMapDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py new file mode 100644 index 00000000000..5a234676e46 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class StringEnumEnums: + + @schemas.classproperty + def PLACED(cls) -> typing.Literal["placed"]: + return StringEnum.validate("placed") + + @schemas.classproperty + def APPROVED(cls) -> typing.Literal["approved"]: + return StringEnum.validate("approved") + + @schemas.classproperty + def DELIVERED(cls) -> typing.Literal["delivered"]: + return StringEnum.validate("delivered") + + @schemas.classproperty + def SINGLE_QUOTED(cls) -> typing.Literal["single quoted"]: + return StringEnum.validate("single quoted") + + @schemas.classproperty + def MULTIPLE_LINE_FEED_LF_LINES(cls) -> typing.Literal["multiple\nlines"]: + return StringEnum.validate("multiple\nlines") + + @schemas.classproperty + def DOUBLE_QUOTE_LINE_FEED_LF_WITH_NEWLINE(cls) -> typing.Literal["double quote \n with newline"]: + return StringEnum.validate("double quote \n with newline") + + @schemas.classproperty + def NONE(cls) -> typing.Literal[None]: + return StringEnum.validate(None) + + +@dataclasses.dataclass(frozen=True) +class StringEnum( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + "single quoted": "SINGLE_QUOTED", + "multiple\nlines": "MULTIPLE_LINE_FEED_LF_LINES", + "double quote \n with newline": "DOUBLE_QUOTE_LINE_FEED_LF_WITH_NEWLINE", + None: "NONE", + } + ) + enums = StringEnumEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["placed"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["approved"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["approved"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["delivered"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["delivered"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["single quoted"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["single quoted"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["multiple\nlines"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["multiple\nlines"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["double quote \n with newline"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["double quote \n with newline"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed","approved","delivered","single quoted","multiple\nlines","double quote \n with newline",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py new file mode 100644 index 00000000000..affad234da4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py @@ -0,0 +1,100 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class StringEnumWithDefaultValueEnums: + + @schemas.classproperty + def PLACED(cls) -> typing.Literal["placed"]: + return StringEnumWithDefaultValue.validate("placed") + + @schemas.classproperty + def APPROVED(cls) -> typing.Literal["approved"]: + return StringEnumWithDefaultValue.validate("approved") + + @schemas.classproperty + def DELIVERED(cls) -> typing.Literal["delivered"]: + return StringEnumWithDefaultValue.validate("delivered") + + +@dataclasses.dataclass(frozen=True) +class StringEnumWithDefaultValue( + schemas.Schema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["placed"] = "placed" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "placed": "PLACED", + "approved": "APPROVED", + "delivered": "DELIVERED", + } + ) + enums = StringEnumWithDefaultValueEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["placed"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["approved"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["approved"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["delivered"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["delivered"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["placed","approved","delivered",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "placed", + "approved", + "delivered", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "placed", + "approved", + "delivered", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py new file mode 100644 index 00000000000..5080202634e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py @@ -0,0 +1,27 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class StringWithValidation( + schemas.StrSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 7 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/tag.py b/samples/client/petstore/python/src/openapi_client/components/schema/tag.py new file mode 100644 index 00000000000..0ae80cc09e8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/tag.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Id: typing_extensions.TypeAlias = schemas.Int64Schema +Name: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "name": typing.Type[Name], + } +) + + +class TagDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + "name", + }) + + def __new__( + cls, + *, + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("id", id), + ("name", name), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(TagDictInput, arg_) + return Tag.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + TagDictInput, + TagDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TagDict: + return Tag.validate(arg, configuration=configuration) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +TagDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Tag( + schemas.Schema[TagDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: TagDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + TagDictInput, + TagDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TagDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py new file mode 100644 index 00000000000..d399f79f244 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py @@ -0,0 +1,44 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import equilateral_triangle +from openapi_client.components.schema import isosceles_triangle +from openapi_client.components.schema import scalene_triangle +OneOf = typing.Tuple[ + typing.Type[equilateral_triangle.EquilateralTriangle], + typing.Type[isosceles_triangle.IsoscelesTriangle], + typing.Type[scalene_triangle.ScaleneTriangle], +] + + +@dataclasses.dataclass(frozen=True) +class Triangle( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( + default_factory=lambda: { + 'triangleType': { + 'EquilateralTriangle': equilateral_triangle.EquilateralTriangle, + 'IsoscelesTriangle': isosceles_triangle.IsoscelesTriangle, + 'ScaleneTriangle': scalene_triangle.ScaleneTriangle, + } + } + ) + one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py new file mode 100644 index 00000000000..c359c749359 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py @@ -0,0 +1,157 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ShapeTypeEnums: + + @schemas.classproperty + def TRIANGLE(cls) -> typing.Literal["Triangle"]: + return ShapeType.validate("Triangle") + + +@dataclasses.dataclass(frozen=True) +class ShapeType( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "Triangle": "TRIANGLE", + } + ) + enums = ShapeTypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["Triangle"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["Triangle"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["Triangle",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "Triangle", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "Triangle", + ], + validated_arg + ) +TriangleType: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "shapeType": typing.Type[ShapeType], + "triangleType": typing.Type[TriangleType], + } +) + + +class TriangleInterfaceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "shapeType", + "triangleType", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + shapeType: typing.Literal[ + "Triangle" + ], + triangleType: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "shapeType": shapeType, + "triangleType": triangleType, + } + arg_.update(kwargs) + used_arg_ = typing.cast(TriangleInterfaceDictInput, arg_) + return TriangleInterface.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + TriangleInterfaceDictInput, + TriangleInterfaceDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> TriangleInterfaceDict: + return TriangleInterface.validate(arg, configuration=configuration) + + @property + def shapeType(self) -> typing.Literal["Triangle"]: + return typing.cast( + typing.Literal["Triangle"], + self.__getitem__("shapeType") + ) + + @property + def triangleType(self) -> str: + return typing.cast( + str, + self.__getitem__("triangleType") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +TriangleInterfaceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class TriangleInterface( + schemas.AnyTypeSchema[TriangleInterfaceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + required: typing.FrozenSet[str] = frozenset({ + "shapeType", + "triangleType", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: TriangleInterfaceDict, + } + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/user.py b/samples/client/petstore/python/src/openapi_client/components/schema/user.py new file mode 100644 index 00000000000..92cbd04031a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/user.py @@ -0,0 +1,375 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Id: typing_extensions.TypeAlias = schemas.Int64Schema +Username: typing_extensions.TypeAlias = schemas.StrSchema +FirstName: typing_extensions.TypeAlias = schemas.StrSchema +LastName: typing_extensions.TypeAlias = schemas.StrSchema +Email: typing_extensions.TypeAlias = schemas.StrSchema +Password: typing_extensions.TypeAlias = schemas.StrSchema +Phone: typing_extensions.TypeAlias = schemas.StrSchema +UserStatus: typing_extensions.TypeAlias = schemas.Int32Schema +ObjectWithNoDeclaredProps: typing_extensions.TypeAlias = schemas.DictSchema + + +@dataclasses.dataclass(frozen=True) +class ObjectWithNoDeclaredPropsNullable( + schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + types: typing.FrozenSet[typing.Type] = frozenset({ + type(None), + schemas.immutabledict, + }) + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base( + arg, + configuration=configuration, + ) + +AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Not: typing_extensions.TypeAlias = schemas.NoneSchema + + +@dataclasses.dataclass(frozen=True) +class AnyTypeExceptNullProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + +AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[Id], + "username": typing.Type[Username], + "firstName": typing.Type[FirstName], + "lastName": typing.Type[LastName], + "email": typing.Type[Email], + "password": typing.Type[Password], + "phone": typing.Type[Phone], + "userStatus": typing.Type[UserStatus], + "objectWithNoDeclaredProps": typing.Type[ObjectWithNoDeclaredProps], + "objectWithNoDeclaredPropsNullable": typing.Type[ObjectWithNoDeclaredPropsNullable], + "anyTypeProp": typing.Type[AnyTypeProp], + "anyTypeExceptNullProp": typing.Type[AnyTypeExceptNullProp], + "anyTypePropNullable": typing.Type[AnyTypePropNullable], + } +) + + +class UserDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "id", + "username", + "firstName", + "lastName", + "email", + "password", + "phone", + "userStatus", + "objectWithNoDeclaredProps", + "objectWithNoDeclaredPropsNullable", + "anyTypeProp", + "anyTypeExceptNullProp", + "anyTypePropNullable", + }) + + def __new__( + cls, + *, + id: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + username: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + firstName: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + lastName: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + email: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + password: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + phone: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + userStatus: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + objectWithNoDeclaredProps: typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + schemas.Unset + ] = schemas.unset, + objectWithNoDeclaredPropsNullable: typing.Union[ + None, + typing.Union[ + typing.Mapping[str, schemas.INPUT_TYPES_ALL], + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + schemas.Unset + ] = schemas.unset, + anyTypeProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + anyTypeExceptNullProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + anyTypePropNullable: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("id", id), + ("username", username), + ("firstName", firstName), + ("lastName", lastName), + ("email", email), + ("password", password), + ("phone", phone), + ("userStatus", userStatus), + ("objectWithNoDeclaredProps", objectWithNoDeclaredProps), + ("objectWithNoDeclaredPropsNullable", objectWithNoDeclaredPropsNullable), + ("anyTypeProp", anyTypeProp), + ("anyTypeExceptNullProp", anyTypeExceptNullProp), + ("anyTypePropNullable", anyTypePropNullable), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(UserDictInput, arg_) + return User.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + UserDictInput, + UserDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UserDict: + return User.validate(arg, configuration=configuration) + + @property + def id(self) -> typing.Union[int, schemas.Unset]: + val = self.get("id", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def username(self) -> typing.Union[str, schemas.Unset]: + val = self.get("username", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def firstName(self) -> typing.Union[str, schemas.Unset]: + val = self.get("firstName", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def lastName(self) -> typing.Union[str, schemas.Unset]: + val = self.get("lastName", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def email(self) -> typing.Union[str, schemas.Unset]: + val = self.get("email", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def password(self) -> typing.Union[str, schemas.Unset]: + val = self.get("password", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def phone(self) -> typing.Union[str, schemas.Unset]: + val = self.get("phone", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def userStatus(self) -> typing.Union[int, schemas.Unset]: + val = self.get("userStatus", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def objectWithNoDeclaredProps(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: + val = self.get("objectWithNoDeclaredProps", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + val + ) + + @property + def objectWithNoDeclaredPropsNullable(self) -> typing.Union[ + typing.Union[None, schemas.Unset], + typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], + ]: + val = self.get("objectWithNoDeclaredPropsNullable", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[ + None, + schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], + ], + val + ) + + @property + def anyTypeProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("anyTypeProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def anyTypeExceptNullProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("anyTypeExceptNullProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + @property + def anyTypePropNullable(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("anyTypePropNullable", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +UserDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class User( + schemas.Schema[UserDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: UserDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + UserDictInput, + UserDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> UserDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py new file mode 100644 index 00000000000..bbd36527460 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class UUIDString( + schemas.UUIDSchema +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'uuid' + min_length: int = 1 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/whale.py b/samples/client/petstore/python/src/openapi_client/components/schema/whale.py new file mode 100644 index 00000000000..98ff77d87f8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/whale.py @@ -0,0 +1,199 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +HasBaleen: typing_extensions.TypeAlias = schemas.BoolSchema +HasTeeth: typing_extensions.TypeAlias = schemas.BoolSchema + + +class ClassNameEnums: + + @schemas.classproperty + def WHALE(cls) -> typing.Literal["whale"]: + return ClassName.validate("whale") + + +@dataclasses.dataclass(frozen=True) +class ClassName( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "whale": "WHALE", + } + ) + enums = ClassNameEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["whale"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["whale"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["whale",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "whale", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "whale", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "hasBaleen": typing.Type[HasBaleen], + "hasTeeth": typing.Type[HasTeeth], + "className": typing.Type[ClassName], + } +) + + +class WhaleDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "className", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "hasBaleen", + "hasTeeth", + }) + + def __new__( + cls, + *, + className: typing.Literal[ + "whale" + ], + hasBaleen: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + hasTeeth: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "className": className, + } + for key_, val in ( + ("hasBaleen", hasBaleen), + ("hasTeeth", hasTeeth), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(WhaleDictInput, arg_) + return Whale.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + WhaleDictInput, + WhaleDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> WhaleDict: + return Whale.validate(arg, configuration=configuration) + + @property + def className(self) -> typing.Literal["whale"]: + return typing.cast( + typing.Literal["whale"], + self.__getitem__("className") + ) + + @property + def hasBaleen(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("hasBaleen", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + @property + def hasTeeth(self) -> typing.Union[bool, schemas.Unset]: + val = self.get("hasTeeth", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + bool, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +WhaleDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Whale( + schemas.Schema[WhaleDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "className", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: WhaleDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + WhaleDictInput, + WhaleDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> WhaleDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py b/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py new file mode 100644 index 00000000000..2eba13ab364 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py @@ -0,0 +1,274 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema + + +class TypeEnums: + + @schemas.classproperty + def PLAINS(cls) -> typing.Literal["plains"]: + return Type.validate("plains") + + @schemas.classproperty + def MOUNTAIN(cls) -> typing.Literal["mountain"]: + return Type.validate("mountain") + + @schemas.classproperty + def GREVYS(cls) -> typing.Literal["grevys"]: + return Type.validate("grevys") + + +@dataclasses.dataclass(frozen=True) +class Type( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "plains": "PLAINS", + "mountain": "MOUNTAIN", + "grevys": "GREVYS", + } + ) + enums = TypeEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["plains"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["plains"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["mountain"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["mountain"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["grevys"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["grevys"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["plains","mountain","grevys",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "plains", + "mountain", + "grevys", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "plains", + "mountain", + "grevys", + ], + validated_arg + ) + + +class ClassNameEnums: + + @schemas.classproperty + def ZEBRA(cls) -> typing.Literal["zebra"]: + return ClassName.validate("zebra") + + +@dataclasses.dataclass(frozen=True) +class ClassName( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "zebra": "ZEBRA", + } + ) + enums = ClassNameEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["zebra"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["zebra"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["zebra",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "zebra", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "zebra", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "type": typing.Type[Type], + "className": typing.Type[ClassName], + } +) + + +class ZebraDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "className", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "type", + }) + + def __new__( + cls, + *, + className: typing.Literal[ + "zebra" + ], + type: typing.Union[ + typing.Literal[ + "plains", + "mountain", + "grevys" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "className": className, + } + for key_, val in ( + ("type", type), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ZebraDictInput, arg_) + return Zebra.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ZebraDictInput, + ZebraDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ZebraDict: + return Zebra.validate(arg, configuration=configuration) + + @property + def className(self) -> typing.Literal["zebra"]: + return typing.cast( + typing.Literal["zebra"], + self.__getitem__("className") + ) + + @property + def type(self) -> typing.Union[typing.Literal["plains", "mountain", "grevys"], schemas.Unset]: + val = self.get("type", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["plains", "mountain", "grevys"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) +ZebraDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Zebra( + schemas.Schema[ZebraDict, tuple] +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "className", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ZebraDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + ZebraDictInput, + ZebraDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ZebraDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py b/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py new file mode 100644 index 00000000000..df81ea92b61 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from petstore_api.components.schema.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from petstore_api.components.schema._200_response import _200Response +from petstore_api.components.schema.abstract_step_message import AbstractStepMessage +from petstore_api.components.schema.additional_properties_class import AdditionalPropertiesClass +from petstore_api.components.schema.additional_properties_schema import AdditionalPropertiesSchema +from petstore_api.components.schema.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums +from petstore_api.components.schema.address import Address +from petstore_api.components.schema.animal import Animal +from petstore_api.components.schema.animal_farm import AnimalFarm +from petstore_api.components.schema.any_type_and_format import AnyTypeAndFormat +from petstore_api.components.schema.any_type_not_string import AnyTypeNotString +from petstore_api.components.schema.api_response import ApiResponse +from petstore_api.components.schema.array_holding_any_type import ArrayHoldingAnyType +from petstore_api.components.schema.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly +from petstore_api.components.schema.array_of_enums import ArrayOfEnums +from petstore_api.components.schema.array_of_number_only import ArrayOfNumberOnly +from petstore_api.components.schema.array_test import ArrayTest +from petstore_api.components.schema.array_with_validations_in_items import ArrayWithValidationsInItems +from petstore_api.components.schema.bar import Bar +from petstore_api.components.schema.basque_pig import BasquePig +from petstore_api.components.schema.boolean import Boolean +from petstore_api.components.schema.boolean_enum import BooleanEnum +from petstore_api.components.schema.capitalization import Capitalization +from petstore_api.components.schema.cat import Cat +from petstore_api.components.schema.category import Category +from petstore_api.components.schema.child_cat import ChildCat +from petstore_api.components.schema.class_model import ClassModel +from petstore_api.components.schema.client import Client +from petstore_api.components.schema.complex_quadrilateral import ComplexQuadrilateral +from petstore_api.components.schema.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations +from petstore_api.components.schema.composed_array import ComposedArray +from petstore_api.components.schema.composed_bool import ComposedBool +from petstore_api.components.schema.composed_none import ComposedNone +from petstore_api.components.schema.composed_number import ComposedNumber +from petstore_api.components.schema.composed_object import ComposedObject +from petstore_api.components.schema.composed_one_of_different_types import ComposedOneOfDifferentTypes +from petstore_api.components.schema.composed_string import ComposedString +from petstore_api.components.schema.currency import Currency +from petstore_api.components.schema.danish_pig import DanishPig +from petstore_api.components.schema.date_time_test import DateTimeTest +from petstore_api.components.schema.date_time_with_validations import DateTimeWithValidations +from petstore_api.components.schema.date_with_validations import DateWithValidations +from petstore_api.components.schema.decimal_payload import DecimalPayload +from petstore_api.components.schema.dog import Dog +from petstore_api.components.schema.drawing import Drawing +from petstore_api.components.schema.enum_arrays import EnumArrays +from petstore_api.components.schema.enum_class import EnumClass +from petstore_api.components.schema.enum_test import EnumTest +from petstore_api.components.schema.equilateral_triangle import EquilateralTriangle +from petstore_api.components.schema.file import File +from petstore_api.components.schema.file_schema_test_class import FileSchemaTestClass +from petstore_api.components.schema.foo import Foo +from petstore_api.components.schema.format_test import FormatTest +from petstore_api.components.schema.from_schema import FromSchema +from petstore_api.components.schema.grandparent_animal import GrandparentAnimal +from petstore_api.components.schema.health_check_result import HealthCheckResult +from petstore_api.components.schema.integer_enum import IntegerEnum +from petstore_api.components.schema.integer_enum_big import IntegerEnumBig +from petstore_api.components.schema.integer_enum_one_value import IntegerEnumOneValue +from petstore_api.components.schema.integer_enum_with_default_value import IntegerEnumWithDefaultValue +from petstore_api.components.schema.integer_max10 import IntegerMax10 +from petstore_api.components.schema.integer_min15 import IntegerMin15 +from petstore_api.components.schema.isosceles_triangle import IsoscelesTriangle +from petstore_api.components.schema.items import Items +from petstore_api.components.schema.items_schema import ItemsSchema +from petstore_api.components.schema.json_patch_request import JSONPatchRequest +from petstore_api.components.schema.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest +from petstore_api.components.schema.json_patch_request_move_copy import JSONPatchRequestMoveCopy +from petstore_api.components.schema.json_patch_request_remove import JSONPatchRequestRemove +from petstore_api.components.schema.map_test import MapTest +from petstore_api.components.schema.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass +from petstore_api.components.schema.money import Money +from petstore_api.components.schema.multi_properties_schema import MultiPropertiesSchema +from petstore_api.components.schema.my_object_dto import MyObjectDto +from petstore_api.components.schema.name import Name +from petstore_api.components.schema.no_additional_properties import NoAdditionalProperties +from petstore_api.components.schema.nullable_class import NullableClass +from petstore_api.components.schema.nullable_shape import NullableShape +from petstore_api.components.schema.nullable_string import NullableString +from petstore_api.components.schema.number import Number +from petstore_api.components.schema.number_only import NumberOnly +from petstore_api.components.schema.number_with_exclusive_min_max import NumberWithExclusiveMinMax +from petstore_api.components.schema.number_with_validations import NumberWithValidations +from petstore_api.components.schema.obj_with_required_props import ObjWithRequiredProps +from petstore_api.components.schema.obj_with_required_props_base import ObjWithRequiredPropsBase +from petstore_api.components.schema.object_interface import ObjectInterface +from petstore_api.components.schema.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties +from petstore_api.components.schema.object_model_with_ref_props import ObjectModelWithRefProps +from petstore_api.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp +from petstore_api.components.schema.object_with_colliding_properties import ObjectWithCollidingProperties +from petstore_api.components.schema.object_with_decimal_properties import ObjectWithDecimalProperties +from petstore_api.components.schema.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps +from petstore_api.components.schema.object_with_inline_composition_property import ObjectWithInlineCompositionProperty +from petstore_api.components.schema.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties +from petstore_api.components.schema.object_with_non_intersecting_values import ObjectWithNonIntersectingValues +from petstore_api.components.schema.object_with_only_optional_props import ObjectWithOnlyOptionalProps +from petstore_api.components.schema.object_with_optional_test_prop import ObjectWithOptionalTestProp +from petstore_api.components.schema.object_with_validations import ObjectWithValidations +from petstore_api.components.schema.order import Order +from petstore_api.components.schema.paginated_result_my_object_dto import PaginatedResultMyObjectDto +from petstore_api.components.schema.parent_pet import ParentPet +from petstore_api.components.schema.pet import Pet +from petstore_api.components.schema.pig import Pig +from petstore_api.components.schema.player import Player +from petstore_api.components.schema.public_key import PublicKey +from petstore_api.components.schema.quadrilateral import Quadrilateral +from petstore_api.components.schema.quadrilateral_interface import QuadrilateralInterface +from petstore_api.components.schema.read_only_first import ReadOnlyFirst +from petstore_api.components.schema.ref_pet import RefPet +from petstore_api.components.schema.req_props_from_explicit_add_props import ReqPropsFromExplicitAddProps +from petstore_api.components.schema.req_props_from_true_add_props import ReqPropsFromTrueAddProps +from petstore_api.components.schema.req_props_from_unset_add_props import ReqPropsFromUnsetAddProps +from petstore_api.components.schema.return import Return +from petstore_api.components.schema.scalene_triangle import ScaleneTriangle +from petstore_api.components.schema.self_referencing_array_model import SelfReferencingArrayModel +from petstore_api.components.schema.self_referencing_object_model import SelfReferencingObjectModel +from petstore_api.components.schema.shape import Shape +from petstore_api.components.schema.shape_or_null import ShapeOrNull +from petstore_api.components.schema.simple_quadrilateral import SimpleQuadrilateral +from petstore_api.components.schema.some_object import SomeObject +from petstore_api.components.schema.string import String +from petstore_api.components.schema.string_boolean_map import StringBooleanMap +from petstore_api.components.schema.string_enum import StringEnum +from petstore_api.components.schema.string_enum_with_default_value import StringEnumWithDefaultValue +from petstore_api.components.schema.string_with_validation import StringWithValidation +from petstore_api.components.schema.tag import Tag +from petstore_api.components.schema.triangle import Triangle +from petstore_api.components.schema.triangle_interface import TriangleInterface +from petstore_api.components.schema.uuid_string import UUIDString +from petstore_api.components.schema.user import User +from petstore_api.components.schema.special_model_name import SpecialModelName +from petstore_api.components.schema.apple import Apple +from petstore_api.components.schema.apple_req import AppleReq +from petstore_api.components.schema.banana import Banana +from petstore_api.components.schema.banana_req import BananaReq +from petstore_api.components.schema.fruit import Fruit +from petstore_api.components.schema.fruit_req import FruitReq +from petstore_api.components.schema.gm_fruit import GmFruit +from petstore_api.components.schema.has_only_read_only import HasOnlyReadOnly +from petstore_api.components.schema.mammal import Mammal +from petstore_api.components.schema.whale import Whale +from petstore_api.components.schema.zebra import Zebra diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py new file mode 100644 index 00000000000..af1161a5619 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class ApiKey(security_schemes.ApiKeySecurityScheme): + ''' + apiKey in header + ''' + name: str = "api_key" + in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.HEADER diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py new file mode 100644 index 00000000000..275c4b0dbb1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class ApiKeyQuery(security_schemes.ApiKeySecurityScheme): + ''' + apiKey in query + ''' + name: str = "api_key_query" + in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.QUERY diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py new file mode 100644 index 00000000000..375405a8ed7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class BearerTest(security_schemes.HTTPBearerSecurityScheme): + ''' + http bearer with JWT bearer format + ''' + bearer_format = "JWT" diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py new file mode 100644 index 00000000000..27ec3411805 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class HttpBasicTest(security_schemes.HTTPBasicSecurityScheme): + ''' + http basic + ''' diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py new file mode 100644 index 00000000000..40845d0ea17 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py @@ -0,0 +1,16 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class HttpSignatureTest(security_schemes.HTTPSignatureSecurityScheme): + ''' + http + signature + ''' diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py new file mode 100644 index 00000000000..a9d8819cc12 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class OpenIdConnectTest(security_schemes.OpenIdConnectSecurityScheme): + ''' + openIdConnect + ''' + openid_connect_url = "https://somesite.com/.well-known/openid-configuration" diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py new file mode 100644 index 00000000000..04cbf91aa30 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +@dataclasses.dataclass +class PetstoreAuth(security_schemes.OAuth2SecurityScheme): + ''' + oauth2 implicit flow with two scopes + ''' + flows = security_schemes.OAuthFlows( + implicit=security_schemes.ImplicitOAuthFlow( + authorization_url="http://petstore.swagger.io/api/oauth/dialog", + scopes={ + "write:pets": "modify pets in your account", + "read:pets": "read your pets", + }, + ) + ) diff --git a/samples/client/petstore/python/src/openapi_client/configurations/__init__.py b/samples/client/petstore/python/src/openapi_client/configurations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py b/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py new file mode 100644 index 00000000000..9376e4ca194 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py @@ -0,0 +1,407 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import copy +from http import client as http_client +import logging +import multiprocessing +import sys +import typing +import typing_extensions + +import urllib3 + +from petstore_api import exceptions +from petstore_api import security_schemes +from petstore_api.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key_query +from petstore_api.components.security_schemes import security_scheme_bearer_test +from petstore_api.components.security_schemes import security_scheme_http_basic_test +from petstore_api.components.security_schemes import security_scheme_http_signature_test +from petstore_api.components.security_schemes import security_scheme_open_id_connect_test +from petstore_api.components.security_schemes import security_scheme_petstore_auth +from petstore_api.servers import server_0 +from petstore_api.servers import server_1 +from petstore_api.servers import server_2 +from petstore_api.paths.foo.get.servers import server_0 as foo_get_server_0 +from petstore_api.paths.foo.get.servers import server_1 as foo_get_server_1 +from petstore_api.paths.pet_find_by_status.servers import server_0 as pet_find_by_status_server_0 +from petstore_api.paths.pet_find_by_status.servers import server_1 as pet_find_by_status_server_1 + +# security scheme key identifier to security scheme instance +SecuritySchemeInfo = typing.TypedDict( + 'SecuritySchemeInfo', + { + "api_key": security_scheme_api_key.ApiKey, + "api_key_query": security_scheme_api_key_query.ApiKeyQuery, + "bearer_test": security_scheme_bearer_test.BearerTest, + "http_basic_test": security_scheme_http_basic_test.HttpBasicTest, + "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest, + "openIdConnect_test": security_scheme_open_id_connect_test.OpenIdConnectTest, + "petstore_auth": security_scheme_petstore_auth.PetstoreAuth, + }, + total=False +) + + +class SecurityIndexInfoRequired(typing.TypedDict): + security: int + +SecurityIndexInfoOptional = typing.TypedDict( + 'SecurityIndexInfoOptional', + { + "paths//fake/delete/security": typing.Literal[0], + "paths//fake/post/security": typing.Literal[0], + "paths//fake/multipleSecurities/get/security": typing.Literal[0, 1, 2], + "paths//fake/{petId}/uploadImageWithRequiredFile/post/security": typing.Literal[0], + "paths//fake_classname_test/patch/security": typing.Literal[0], + "paths//pet/post/security": typing.Literal[0, 1, 2], + "paths//pet/put/security": typing.Literal[0, 1], + "paths//pet/findByStatus/get/security": typing.Literal[0, 1, 2], + "paths//pet/findByTags/get/security": typing.Literal[0, 1], + "paths//pet/{petId}/delete/security": typing.Literal[0, 1], + "paths//pet/{petId}/get/security": typing.Literal[0], + "paths//pet/{petId}/post/security": typing.Literal[0, 1], + "paths//pet/{petId}/uploadImage/post/security": typing.Literal[0], + "paths//store/inventory/get/security": typing.Literal[0], + }, + total=False +) + + +class SecurityIndexInfo(SecurityIndexInfoRequired, SecurityIndexInfoOptional): + """ + the default security_index to use at each openapi document json path + the fallback value is stored in the 'security' key + """ + +# the server to use at each openapi document json path +ServerInfo = typing.TypedDict( + 'ServerInfo', + { + 'servers/0': server_0.Server0, + 'servers/1': server_1.Server1, + 'servers/2': server_2.Server2, + "paths//foo/get/servers/0": foo_get_server_0.Server0, + "paths//foo/get/servers/1": foo_get_server_1.Server1, + "paths//pet/findByStatus/servers/0": pet_find_by_status_server_0.Server0, + "paths//pet/findByStatus/servers/1": pet_find_by_status_server_1.Server1, + }, + total=False +) + + +class ServerIndexInfoRequired(typing.TypedDict): + servers: typing.Literal[0, 1, 2] + +ServerIndexInfoOptional = typing.TypedDict( + 'ServerIndexInfoOptional', + { + "paths//foo/get/servers": typing.Literal[0, 1], + "paths//pet/findByStatus/servers": typing.Literal[0, 1], + }, + total=False +) + + +class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): + """ + the default server_index to use at each openapi document json path + the fallback value is stored in the 'servers' key + """ + + +class ApiConfiguration(object): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param security_scheme_info: the security scheme auth info that can be used when calling endpoints + The key is a string that identifies the component security scheme that one is adding auth info for + The value is an instance of the component security scheme class for that security scheme + See the SecuritySchemeInfo TypedDict definition + :param security_index_info: path to security_index information + :param server_info: the servers that can be used to make endpoint calls + :param server_index_info: index to servers configuration + """ + + def __init__( + self, + security_scheme_info: typing.Optional[SecuritySchemeInfo] = None, + security_index_info: typing.Optional[SecurityIndexInfo] = None, + server_info: typing.Optional[ServerInfo] = None, + server_index_info: typing.Optional[ServerIndexInfo] = None, + ): + """Constructor + """ + # Authentication Settings + self.security_scheme_info: SecuritySchemeInfo = security_scheme_info or SecuritySchemeInfo() + self.security_index_info: SecurityIndexInfo = security_index_info or {'security': 0} + # Server Info + self.server_info: ServerInfo = server_info or { + 'servers/0': server_0.Server0(), + 'servers/1': server_1.Server1(), + 'servers/2': server_2.Server2(), + "paths//foo/get/servers/0": foo_get_server_0.Server0(), + "paths//foo/get/servers/1": foo_get_server_1.Server1(), + "paths//pet/findByStatus/servers/0": pet_find_by_status_server_0.Server0(), + "paths//pet/findByStatus/servers/1": pet_find_by_status_server_1.Server1(), + } + self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("petstore_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_server_url( + self, + key_prefix: typing.Literal[ + "servers", + "paths//foo/get/servers", + "paths//pet/findByStatus/servers", + ], + index: typing.Optional[int], + ) -> str: + """Gets host URL based on the index + :param index: array index of the host settings + :return: URL based on host settings + """ + if index: + used_index = index + else: + try: + used_index = self.server_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.server_index_info.get("servers", 0) + server_info_key = typing.cast( + typing.Literal[ + "servers/0", + "servers/1", + "servers/2", + "paths//foo/get/servers/0", + "paths//foo/get/servers/1", + "paths//pet/findByStatus/servers/0", + "paths//pet/findByStatus/servers/1", + ], + f"{key_prefix}/{used_index}" + ) + try: + server = self.server_info[server_info_key] + except KeyError as ex: + raise ex + return server.url + + def get_security_requirement_object( + self, + key_prefix: typing.Literal[ + "security", + "paths//fake/delete/security", + "paths//fake/post/security", + "paths//fake/multipleSecurities/get/security", + "paths//fake/{petId}/uploadImageWithRequiredFile/post/security", + "paths//fake_classname_test/patch/security", + "paths//pet/post/security", + "paths//pet/put/security", + "paths//pet/findByStatus/get/security", + "paths//pet/findByTags/get/security", + "paths//pet/{petId}/delete/security", + "paths//pet/{petId}/get/security", + "paths//pet/{petId}/post/security", + "paths//pet/{petId}/uploadImage/post/security", + "paths//store/inventory/get/security", + ], + security_requirement_objects: typing.List[security_schemes.SecurityRequirementObject], + index: typing.Optional[int], + ) -> security_schemes.SecurityRequirementObject: + """Gets security_schemes.SecurityRequirementObject based on the index + :param index: array index of the SecurityRequirementObject + :return: the selected security_schemes.SecurityRequirementObject + """ + if index: + used_index = index + else: + try: + used_index = self.security_index_info[key_prefix] + except KeyError: + # fallback and use the default index + used_index = self.security_index_info.get("security", 0) + return security_requirement_objects[used_index] diff --git a/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py new file mode 100644 index 00000000000..ceba07a8db7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py @@ -0,0 +1,108 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +from petstore_api import exceptions + + +PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { + 'additional_properties': 'additionalProperties', + 'all_of': 'allOf', + 'any_of': 'anyOf', + 'const_value_to_name': 'const', + 'contains': 'contains', + 'dependent_required': 'dependentRequired', + 'dependent_schemas': 'dependentSchemas', + 'discriminator': 'discriminator', + # default omitted because it has no validation impact + 'else_': 'else', + 'enum_value_to_name': 'enum', + 'exclusive_maximum': 'exclusiveMaximum', + 'exclusive_minimum': 'exclusiveMinimum', + 'format': 'format', + 'if_': 'if', + 'inclusive_maximum': 'maximum', + 'inclusive_minimum': 'minimum', + 'items': 'items', + 'max_contains': 'maxContains', + 'max_items': 'maxItems', + 'max_length': 'maxLength', + 'max_properties': 'maxProperties', + 'min_contains': 'minContains', + 'min_items': 'minItems', + 'min_length': 'minLength', + 'min_properties': 'minProperties', + 'multiple_of': 'multipleOf', + 'not_': 'not', + 'one_of': 'oneOf', + 'pattern': 'pattern', + 'pattern_properties': 'patternProperties', + 'prefix_items': 'prefixItems', + 'properties': 'properties', + 'property_names': 'propertyNames', + 'required': 'required', + 'then': 'then', + 'types': 'type', + 'unique_items': 'uniqueItems', + 'unevaluated_items': 'unevaluatedItems', + 'unevaluated_properties': 'unevaluatedProperties' +} + +class SchemaConfiguration: + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param disabled_json_schema_keywords (set): Set of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_json_schema_keywords is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + """ + + def __init__( + self, + disabled_json_schema_keywords = set(), + ): + """Constructor + """ + self.disabled_json_schema_keywords = disabled_json_schema_keywords + + @property + def disabled_json_schema_python_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_python_keywords + + @property + def disabled_json_schema_keywords(self) -> typing.Set[str]: + return self.__disabled_json_schema_keywords + + @disabled_json_schema_keywords.setter + def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): + disabled_json_schema_keywords = set() + disabled_json_schema_python_keywords = set() + for k in json_keywords: + python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} + if not python_keywords: + raise exceptions.ApiValueError( + "Invalid keyword: '{0}''".format(k)) + disabled_json_schema_keywords.add(k) + disabled_json_schema_python_keywords.update(python_keywords) + self.__disabled_json_schema_keywords = disabled_json_schema_keywords + self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/exceptions.py b/samples/client/petstore/python/src/openapi_client/exceptions.py new file mode 100644 index 00000000000..23ce72d541c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/exceptions.py @@ -0,0 +1,132 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import dataclasses +import typing + +from petstore_api import api_response + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + +T = typing.TypeVar('T', bound=api_response.ApiResponse) + + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: typing.Optional[str] = None + api_response: typing.Optional[T] = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.api_response: + if self.api_response.response.headers: + error_message += "HTTP response headers: {0}\n".format( + self.api_response.response.headers) + if self.api_response.response.data: + error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) + + return error_message diff --git a/samples/client/petstore/python/src/openapi_client/paths/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/__init__.py new file mode 100644 index 00000000000..2c2c9cc4bdc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/__init__.py @@ -0,0 +1,3 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis import path_to_api diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py new file mode 100644 index 00000000000..88a7395a37f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.another_fake_dummy import AnotherFakeDummy + +path = "/another-fake/dummy" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py new file mode 100644 index 00000000000..2726b000ad9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py @@ -0,0 +1,143 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _call_123_test__special_tags( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _call_123_test__special_tags( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _call_123_test__special_tags( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + To test special tags + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='patch', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class _123TestSpecialTags(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + call_123_test__special_tags = BaseApi._call_123_test__special_tags + + +class ApiForPatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + patch = BaseApi._call_123_test__special_tags diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py new file mode 100644 index 00000000000..cb468c24c28 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_client +RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py new file mode 100644 index 00000000000..1ffbaf1e85a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.client.ClientDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c1e1b8bec36 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client +Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py new file mode 100644 index 00000000000..6b2b3dd4592 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.common_param_sub_dir import CommonParamSubDir + +path = "/commonParam/{subDir}/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py new file mode 100644 index 00000000000..6d457920a80 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.delete.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "someHeader": typing.Type[schema.Schema], + } +) + + +class HeaderParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someHeader", + }) + + def __new__( + cls, + *, + someHeader: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someHeader", someHeader), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def someHeader(self) -> typing.Union[str, schemas.Unset]: + val = self.get("someHeader", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +HeaderParametersDictInput = typing.TypedDict( + 'HeaderParametersDictInput', + { + "someHeader": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py new file mode 100644 index 00000000000..a18e50e63e1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py @@ -0,0 +1,166 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import ( + parameter_0, + parameter_1, +) +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +header_parameter_classes = ( + parameter_0.Parameter0, +) +path_parameter_classes = ( + parameter_1.Parameter1, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _delete_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _delete_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + if header_params is not None: + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='delete', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class DeleteCommonParam(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + delete_common_param = BaseApi._delete_common_param + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._delete_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..0aff1ee1cb3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.HeaderParameter): + name = "someHeader" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..4737b725a2e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.PathParameter): + name = "subDir" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..e5a24d789ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py @@ -0,0 +1,80 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def C(cls) -> typing.Literal["c"]: + return Schema.validate("c") + + @schemas.classproperty + def D(cls) -> typing.Literal["d"]: + return Schema.validate("d") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "c": "C", + "d": "D", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["c"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["c"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["d"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["d"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["c","d",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "c", + "d", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "c", + "d", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py new file mode 100644 index 00000000000..c0767ebe284 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.delete.parameters.parameter_1 import schema +Properties = typing.TypedDict( + 'Properties', + { + "subDir": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, typing.Literal["c", "d"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + subDir: typing.Literal[ + "c", + "d" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "subDir": subDir, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def subDir(self) -> typing.Literal["c", "d"]: + return self.__getitem__("subDir") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "subDir": typing.Literal[ + "c", + "d" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py new file mode 100644 index 00000000000..f1c322b347e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py @@ -0,0 +1,161 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import parameter_0 +from ..parameters import parameter_0 as path_item_parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) +path_parameter_classes = ( + path_item_parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _get_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _get_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GetCommonParam(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + get_common_param = BaseApi._get_common_param + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._get_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..55cf738f631 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "searchStr" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py new file mode 100644 index 00000000000..47e568499b9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "subDir": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, typing.Literal["a", "b"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + subDir: typing.Literal[ + "a", + "b" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "subDir": subDir, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def subDir(self) -> typing.Literal["a", "b"]: + return self.__getitem__("subDir") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "subDir": typing.Literal[ + "a", + "b" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py new file mode 100644 index 00000000000..616d06cb286 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "searchStr": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "searchStr", + }) + + def __new__( + cls, + *, + searchStr: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("searchStr", searchStr), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def searchStr(self) -> typing.Union[str, schemas.Unset]: + val = self.get("searchStr", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "searchStr": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..4144dcfbaba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "subDir" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..19bce4dcc27 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py @@ -0,0 +1,80 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def A(cls) -> typing.Literal["a"]: + return Schema.validate("a") + + @schemas.classproperty + def B(cls) -> typing.Literal["b"]: + return Schema.validate("b") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "a": "A", + "b": "B", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["a"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["a"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["b"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["b"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["a","b",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "a", + "b", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "a", + "b", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py new file mode 100644 index 00000000000..2b47892aef5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.post.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "someHeader": typing.Type[schema.Schema], + } +) + + +class HeaderParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someHeader", + }) + + def __new__( + cls, + *, + someHeader: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someHeader", someHeader), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def someHeader(self) -> typing.Union[str, schemas.Unset]: + val = self.get("someHeader", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +HeaderParametersDictInput = typing.TypedDict( + 'HeaderParametersDictInput', + { + "someHeader": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py new file mode 100644 index 00000000000..8a30e31fd38 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py @@ -0,0 +1,164 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import parameter_0 +from ..parameters import parameter_0 as path_item_parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +header_parameter_classes = ( + parameter_0.Parameter0, +) +path_parameter_classes = ( + path_item_parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _post_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _post_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _post_common_param( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + if header_params is not None: + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PostCommonParam(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + post_common_param = BaseApi._post_common_param + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._post_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..0aff1ee1cb3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.HeaderParameter): + name = "someHeader" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py new file mode 100644 index 00000000000..47e568499b9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.common_param_sub_dir.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "subDir": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, typing.Literal["a", "b"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + subDir: typing.Literal[ + "a", + "b" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "subDir": subDir, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def subDir(self) -> typing.Literal["a", "b"]: + return self.__getitem__("subDir") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "subDir": typing.Literal[ + "a", + "b" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "subDir", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py new file mode 100644 index 00000000000..1f9ea556af0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake import Fake + +path = "/fake" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py new file mode 100644 index 00000000000..f0b9ed17678 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake.delete.parameters.parameter_1 import schema +from openapi_client.paths.fake.delete.parameters.parameter_4 import schema as schema_2 +Properties = typing.TypedDict( + 'Properties', + { + "required_boolean_group": typing.Type[schema.Schema], + "boolean_group": typing.Type[schema_2.Schema], + } +) +HeaderParametersRequiredDictInput = typing.TypedDict( + 'HeaderParametersRequiredDictInput', + { + "required_boolean_group": typing.Literal[ + "true", + "false" + ], + } +) +HeaderParametersOptionalDictInput = typing.TypedDict( + 'HeaderParametersOptionalDictInput', + { + "boolean_group": typing.Literal[ + "true", + "false" + ], + }, + total=False +) + + +class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "required_boolean_group", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "boolean_group", + }) + + def __new__( + cls, + *, + required_boolean_group: typing.Literal[ + "true", + "false" + ], + boolean_group: typing.Union[ + typing.Literal[ + "true", + "false" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "required_boolean_group": required_boolean_group, + } + for key_, val in ( + ("boolean_group", boolean_group), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def required_boolean_group(self) -> typing.Literal["true", "false"]: + return typing.cast( + typing.Literal["true", "false"], + self.__getitem__("required_boolean_group") + ) + + @property + def boolean_group(self) -> typing.Union[typing.Literal["true", "false"], schemas.Unset]: + val = self.get("boolean_group", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["true", "false"], + val + ) + + +class HeaderParametersDictInput(HeaderParametersRequiredDictInput, HeaderParametersOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "required_boolean_group", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py new file mode 100644 index 00000000000..93b334a4d3b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py @@ -0,0 +1,186 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import ( + parameter_0, + parameter_1, + parameter_2, + parameter_3, + parameter_4, + parameter_5, +) +from .security import security_requirement_object_0 +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_2.Parameter2, + parameter_3.Parameter3, + parameter_5.Parameter5, +) +header_parameter_classes = ( + parameter_1.Parameter1, + parameter_4.Parameter4, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _group_parameters( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _group_parameters( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _group_parameters( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Fake endpoint to test group parameters (optional) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//fake/delete/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='delete', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GroupParameters(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + group_parameters = BaseApi._group_parameters + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._group_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..0c879952986 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "required_string_group" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..13be1c4f047 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.HeaderParameter): + name = "required_boolean_group" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..a0e8558dbad --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py @@ -0,0 +1,80 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def TRUE(cls) -> typing.Literal["true"]: + return Schema.validate("true") + + @schemas.classproperty + def FALSE(cls) -> typing.Literal["false"]: + return Schema.validate("false") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "true": "TRUE", + "false": "FALSE", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["true"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["true"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["false"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["false"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["true","false",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "true", + "false", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "true", + "false", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py new file mode 100644 index 00000000000..61986d9021c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter2(api_client.QueryParameter): + name = "required_int64_group" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py new file mode 100644 index 00000000000..4d7a82e7aca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter3(api_client.QueryParameter): + name = "string_group" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py new file mode 100644 index 00000000000..b0ab1c63e2b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter4(api_client.HeaderParameter): + name = "boolean_group" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py new file mode 100644 index 00000000000..a0e8558dbad --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py @@ -0,0 +1,80 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def TRUE(cls) -> typing.Literal["true"]: + return Schema.validate("true") + + @schemas.classproperty + def FALSE(cls) -> typing.Literal["false"]: + return Schema.validate("false") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "true": "TRUE", + "false": "FALSE", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["true"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["true"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["false"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["false"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["true","false",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "true", + "false", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "true", + "false", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py new file mode 100644 index 00000000000..59fd6db10bf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter5(api_client.QueryParameter): + name = "int64_group" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py new file mode 100644 index 00000000000..845a564889c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py @@ -0,0 +1,167 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake.delete.parameters.parameter_0 import schema +from openapi_client.paths.fake.delete.parameters.parameter_2 import schema as schema_4 +from openapi_client.paths.fake.delete.parameters.parameter_3 import schema as schema_3 +from openapi_client.paths.fake.delete.parameters.parameter_5 import schema as schema_2 +Properties = typing.TypedDict( + 'Properties', + { + "required_string_group": typing.Type[schema.Schema], + "int64_group": typing.Type[schema_2.Schema], + "string_group": typing.Type[schema_3.Schema], + "required_int64_group": typing.Type[schema_4.Schema], + } +) +QueryParametersRequiredDictInput = typing.TypedDict( + 'QueryParametersRequiredDictInput', + { + "required_int64_group": int, + "required_string_group": str, + } +) +QueryParametersOptionalDictInput = typing.TypedDict( + 'QueryParametersOptionalDictInput', + { + "int64_group": int, + "string_group": str, + }, + total=False +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "required_int64_group", + "required_string_group", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "int64_group", + "string_group", + }) + + def __new__( + cls, + *, + required_int64_group: int, + required_string_group: str, + int64_group: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + string_group: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "required_int64_group": required_int64_group, + "required_string_group": required_string_group, + } + for key_, val in ( + ("int64_group", int64_group), + ("string_group", string_group), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def required_int64_group(self) -> int: + return typing.cast( + int, + self.__getitem__("required_int64_group") + ) + + @property + def required_string_group(self) -> str: + return typing.cast( + str, + self.__getitem__("required_string_group") + ) + + @property + def int64_group(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int64_group", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def string_group(self) -> typing.Union[str, schemas.Unset]: + val = self.get("string_group", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + +class QueryParametersDictInput(QueryParametersRequiredDictInput, QueryParametersOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "required_int64_group", + "required_string_group", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py new file mode 100644 index 00000000000..71364283d46 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "bearer_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py new file mode 100644 index 00000000000..3c220d0a7a1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake.get.parameters.parameter_0 import schema as schema_2 +from openapi_client.paths.fake.get.parameters.parameter_1 import schema +Properties = typing.TypedDict( + 'Properties', + { + "enum_header_string": typing.Type[schema.Schema], + "enum_header_string_array": typing.Type[schema_2.Schema], + } +) + + +class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "enum_header_string", + "enum_header_string_array", + }) + + def __new__( + cls, + *, + enum_header_string: typing.Union[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)" + ], + schemas.Unset + ] = schemas.unset, + enum_header_string_array: typing.Union[ + schema_2.SchemaTupleInput, + schema_2.SchemaTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("enum_header_string", enum_header_string), + ("enum_header_string_array", enum_header_string_array), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def enum_header_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: + val = self.get("enum_header_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["_abc", "-efg", "(xyz)"], + val + ) + + @property + def enum_header_string_array(self) -> typing.Union[schema_2.SchemaTuple, schemas.Unset]: + val = self.get("enum_header_string_array", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schema_2.SchemaTuple, + val + ) +HeaderParametersDictInput = typing.TypedDict( + 'HeaderParametersDictInput', + { + "enum_header_string": typing.Literal[ + "_abc", + "-efg", + "(xyz)" + ], + "enum_header_string_array": typing.Union[ + schema_2.SchemaTupleInput, + schema_2.SchemaTuple + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py new file mode 100644 index 00000000000..6980f8dc0e9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py @@ -0,0 +1,239 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake.get.request_body.content.application_x_www_form_urlencoded import schema + +from .. import path +from .responses import ( + response_200, + response_404, +) +from . import request_body +from .parameters import ( + parameter_0, + parameter_1, + parameter_2, + parameter_3, + parameter_4, + parameter_5, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +query_parameter_classes = ( + parameter_2.Parameter2, + parameter_3.Parameter3, + parameter_4.Parameter4, + parameter_5.Parameter5, +) +header_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '404', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _enum_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _enum_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _enum_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + To test enum parameters + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + if header_params is not None: + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + accept_content_types=accept_content_types, + skip_validation=True + ) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class EnumParameters(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + enum_parameters = BaseApi._enum_parameters + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._enum_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..a357ebcaecc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.HeaderParameter): + name = "enum_header_string_array" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..9b4a0147d88 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py @@ -0,0 +1,137 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ItemsEnums: + + @schemas.classproperty + def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: + return Items.validate(">") + + @schemas.classproperty + def DOLLAR_SIGN(cls) -> typing.Literal["$"]: + return Items.validate("$") + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["$"] = "$" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + ">": "GREATER_THAN_SIGN", + "$": "DOLLAR_SIGN", + } + ) + enums = ItemsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[">"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["$"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["$"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">","$",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + ">", + "$", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + ">", + "$", + ], + validated_arg + ) + + +class SchemaTuple( + typing.Tuple[ + typing.Literal[">", "$"], + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + ">", + "$" + ], + ], + typing.Tuple[ + typing.Literal[ + ">", + "$" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..2b9bcbd953a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.HeaderParameter): + name = "enum_header_string" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..e379e0bc782 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py @@ -0,0 +1,95 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: + return Schema.validate("_abc") + + @schemas.classproperty + def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: + return Schema.validate("-efg") + + @schemas.classproperty + def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: + return Schema.validate("(xyz)") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["-efg"] = "-efg" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "_abc": "LOW_LINE_ABC", + "-efg": "HYPHEN_MINUS_EFG", + "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["_abc"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["-efg"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["-efg"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["(xyz)"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["(xyz)"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc","-efg","(xyz)",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py new file mode 100644 index 00000000000..e100952eea3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter2(api_client.QueryParameter): + name = "enum_query_string_array" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py new file mode 100644 index 00000000000..9b4a0147d88 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py @@ -0,0 +1,137 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ItemsEnums: + + @schemas.classproperty + def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: + return Items.validate(">") + + @schemas.classproperty + def DOLLAR_SIGN(cls) -> typing.Literal["$"]: + return Items.validate("$") + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["$"] = "$" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + ">": "GREATER_THAN_SIGN", + "$": "DOLLAR_SIGN", + } + ) + enums = ItemsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[">"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["$"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["$"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">","$",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + ">", + "$", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + ">", + "$", + ], + validated_arg + ) + + +class SchemaTuple( + typing.Tuple[ + typing.Literal[">", "$"], + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + ">", + "$" + ], + ], + typing.Tuple[ + typing.Literal[ + ">", + "$" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py new file mode 100644 index 00000000000..2d8026d8923 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter3(api_client.QueryParameter): + name = "enum_query_string" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py new file mode 100644 index 00000000000..e379e0bc782 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py @@ -0,0 +1,95 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: + return Schema.validate("_abc") + + @schemas.classproperty + def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: + return Schema.validate("-efg") + + @schemas.classproperty + def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: + return Schema.validate("(xyz)") + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["-efg"] = "-efg" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "_abc": "LOW_LINE_ABC", + "-efg": "HYPHEN_MINUS_EFG", + "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["_abc"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["-efg"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["-efg"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["(xyz)"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["(xyz)"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc","-efg","(xyz)",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py new file mode 100644 index 00000000000..73a688e1a31 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter4(api_client.QueryParameter): + name = "enum_query_integer" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py new file mode 100644 index 00000000000..18accea208f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py @@ -0,0 +1,81 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def POSITIVE_1(cls) -> typing.Literal[1]: + return Schema.validate(1) + + @schemas.classproperty + def NEGATIVE_2(cls) -> typing.Literal[-2]: + return Schema.validate(-2) + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int32' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1: "POSITIVE_1", + -2: "NEGATIVE_2", + } + ) + enums = SchemaEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[1], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[-2], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[-2]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[1,-2,]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + 1, + -2, + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + 1, + -2, + ], + validated_arg + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py new file mode 100644 index 00000000000..f9659b3f221 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter5(api_client.QueryParameter): + name = "enum_query_double" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py new file mode 100644 index 00000000000..e53684bdcee --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py @@ -0,0 +1,53 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class SchemaEnums: + + @schemas.classproperty + def POSITIVE_1_PT_1(cls) -> typing.Union[int, float]: + return Schema.validate(1.1) + + @schemas.classproperty + def NEGATIVE_1_PT_2(cls) -> typing.Union[int, float]: + return Schema.validate(-1.2) + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'double' + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + 1.1: "POSITIVE_1_PT_1", + -1.2: "NEGATIVE_1_PT_2", + } + ) + enums = SchemaEnums + + @classmethod + def validate( + cls, + arg: typing.Union[int, float], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[int, float]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return validated_arg diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py new file mode 100644 index 00000000000..2056527d17c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py @@ -0,0 +1,187 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake.get.parameters.parameter_2 import schema as schema_4 +from openapi_client.paths.fake.get.parameters.parameter_3 import schema as schema_2 +from openapi_client.paths.fake.get.parameters.parameter_4 import schema as schema_3 +from openapi_client.paths.fake.get.parameters.parameter_5 import schema +Properties = typing.TypedDict( + 'Properties', + { + "enum_query_double": typing.Type[schema.Schema], + "enum_query_string": typing.Type[schema_2.Schema], + "enum_query_integer": typing.Type[schema_3.Schema], + "enum_query_string_array": typing.Type[schema_4.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "enum_query_double", + "enum_query_string", + "enum_query_integer", + "enum_query_string_array", + }) + + def __new__( + cls, + *, + enum_query_double: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + enum_query_string: typing.Union[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)" + ], + schemas.Unset + ] = schemas.unset, + enum_query_integer: typing.Union[ + typing.Literal[ + 1, + -2 + ], + schemas.Unset + ] = schemas.unset, + enum_query_string_array: typing.Union[ + schema_4.SchemaTupleInput, + schema_4.SchemaTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("enum_query_double", enum_query_double), + ("enum_query_string", enum_query_string), + ("enum_query_integer", enum_query_integer), + ("enum_query_string_array", enum_query_string_array), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def enum_query_double(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("enum_query_double", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def enum_query_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: + val = self.get("enum_query_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["_abc", "-efg", "(xyz)"], + val + ) + + @property + def enum_query_integer(self) -> typing.Union[typing.Literal[1, -2], schemas.Unset]: + val = self.get("enum_query_integer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal[1, -2], + val + ) + + @property + def enum_query_string_array(self) -> typing.Union[schema_4.SchemaTuple, schemas.Unset]: + val = self.get("enum_query_string_array", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schema_4.SchemaTuple, + val + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "enum_query_double": typing.Union[ + int, + float + ], + "enum_query_string": typing.Literal[ + "_abc", + "-efg", + "(xyz)" + ], + "enum_query_integer": typing.Literal[ + 1, + -2 + ], + "enum_query_string_array": typing.Union[ + schema_4.SchemaTupleInput, + schema_4.SchemaTuple + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py new file mode 100644 index 00000000000..04c6511e057 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema + content = { + 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py new file mode 100644 index 00000000000..a3da0790d14 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -0,0 +1,334 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ItemsEnums: + + @schemas.classproperty + def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: + return Items.validate(">") + + @schemas.classproperty + def DOLLAR_SIGN(cls) -> typing.Literal["$"]: + return Items.validate("$") + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["$"] = "$" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + ">": "GREATER_THAN_SIGN", + "$": "DOLLAR_SIGN", + } + ) + enums = ItemsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[">"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["$"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["$"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[">","$",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + ">", + "$", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + ">", + "$", + ], + validated_arg + ) + + +class EnumFormStringArrayTuple( + typing.Tuple[ + typing.Literal[">", "$"], + ... + ] +): + + def __new__(cls, arg: typing.Union[EnumFormStringArrayTupleInput, EnumFormStringArrayTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return EnumFormStringArray.validate(arg, configuration=configuration) +EnumFormStringArrayTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + ">", + "$" + ], + ], + typing.Tuple[ + typing.Literal[ + ">", + "$" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class EnumFormStringArray( + schemas.Schema[schemas.immutabledict, EnumFormStringArrayTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: EnumFormStringArrayTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + EnumFormStringArrayTupleInput, + EnumFormStringArrayTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> EnumFormStringArrayTuple: + return super().validate_base( + arg, + configuration=configuration, + ) + + +class EnumFormStringEnums: + + @schemas.classproperty + def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: + return EnumFormString.validate("_abc") + + @schemas.classproperty + def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: + return EnumFormString.validate("-efg") + + @schemas.classproperty + def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: + return EnumFormString.validate("(xyz)") + + +@dataclasses.dataclass(frozen=True) +class EnumFormString( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["-efg"] = "-efg" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "_abc": "LOW_LINE_ABC", + "-efg": "HYPHEN_MINUS_EFG", + "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", + } + ) + enums = EnumFormStringEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["_abc"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["-efg"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["-efg"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["(xyz)"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["(xyz)"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["_abc","-efg","(xyz)",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "_abc", + "-efg", + "(xyz)", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "enum_form_string_array": typing.Type[EnumFormStringArray], + "enum_form_string": typing.Type[EnumFormString], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "enum_form_string_array", + "enum_form_string", + }) + + def __new__( + cls, + *, + enum_form_string_array: typing.Union[ + EnumFormStringArrayTupleInput, + EnumFormStringArrayTuple, + schemas.Unset + ] = schemas.unset, + enum_form_string: typing.Union[ + typing.Literal[ + "_abc", + "-efg", + "(xyz)" + ], + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("enum_form_string_array", enum_form_string_array), + ("enum_form_string", enum_form_string), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def enum_form_string_array(self) -> typing.Union[EnumFormStringArrayTuple, schemas.Unset]: + val = self.get("enum_form_string_array", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + EnumFormStringArrayTuple, + val + ) + + @property + def enum_form_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: + val = self.get("enum_form_string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Literal["_abc", "-efg", "(xyz)"], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py new file mode 100644 index 00000000000..7a93ab791c1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py new file mode 100644 index 00000000000..3b50a65df5d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py new file mode 100644 index 00000000000..6d305b17569 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py @@ -0,0 +1,143 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _client_model( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _client_model( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _client_model( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + To test \\\"client\\\" model + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='patch', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ClientModel(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + client_model = BaseApi._client_model + + +class ApiForPatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + patch = BaseApi._client_model diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py new file mode 100644 index 00000000000..cb468c24c28 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_client +RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py new file mode 100644 index 00000000000..1ffbaf1e85a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.client.ClientDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c1e1b8bec36 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client +Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py new file mode 100644 index 00000000000..24575769cbc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py @@ -0,0 +1,175 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake.post.request_body.content.application_x_www_form_urlencoded import schema + +from .. import path +from .responses import ( + response_200, + response_404, +) +from . import request_body +from .security import security_requirement_object_0 + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '404', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _endpoint_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _endpoint_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _endpoint_parameters( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//fake/post/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class EndpointParameters(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + endpoint_parameters = BaseApi._endpoint_parameters + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._endpoint_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py new file mode 100644 index 00000000000..04c6511e057 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema + content = { + 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py new file mode 100644 index 00000000000..49d1338baed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -0,0 +1,434 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Integer( + schemas.IntSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int' + inclusive_maximum: typing.Union[int, float] = 100 + inclusive_minimum: typing.Union[int, float] = 10 + + +@dataclasses.dataclass(frozen=True) +class Int32( + schemas.Int32Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int32' + inclusive_maximum: typing.Union[int, float] = 200 + inclusive_minimum: typing.Union[int, float] = 20 +Int64: typing_extensions.TypeAlias = schemas.Int64Schema + + +@dataclasses.dataclass(frozen=True) +class Number( + schemas.NumberSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + inclusive_maximum: typing.Union[int, float] = 543.2 + inclusive_minimum: typing.Union[int, float] = 32.1 + + +@dataclasses.dataclass(frozen=True) +class Float( + schemas.Float32Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'float' + inclusive_maximum: typing.Union[int, float] = 987.6 + + +@dataclasses.dataclass(frozen=True) +class Double( + schemas.Float64Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + float, + int, + }) + format: str = 'double' + inclusive_maximum: typing.Union[int, float] = 123.4 + inclusive_minimum: typing.Union[int, float] = 67.8 + + +@dataclasses.dataclass(frozen=True) +class String( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'[a-z]', # noqa: E501 + flags=re.I, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternWithoutDelimiter( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + pattern: schemas.PatternInfo = schemas.PatternInfo( + pattern=r'^[A-Z].*' # noqa: E501 + ) +Byte: typing_extensions.TypeAlias = schemas.StrSchema +Binary: typing_extensions.TypeAlias = schemas.BinarySchema +Date: typing_extensions.TypeAlias = schemas.DateSchema + + +@dataclasses.dataclass(frozen=True) +class DateTime( + schemas.DateTimeSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'date-time' + default: typing.Literal["2010-02-01T10:20:10.111110+01:00"] = "2010-02-01T10:20:10.111110+01:00" + + +@dataclasses.dataclass(frozen=True) +class Password( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + format: str = 'password' + max_length: int = 64 + min_length: int = 10 +Callback: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "integer": typing.Type[Integer], + "int32": typing.Type[Int32], + "int64": typing.Type[Int64], + "number": typing.Type[Number], + "float": typing.Type[Float], + "double": typing.Type[Double], + "string": typing.Type[String], + "pattern_without_delimiter": typing.Type[PatternWithoutDelimiter], + "byte": typing.Type[Byte], + "binary": typing.Type[Binary], + "date": typing.Type[Date], + "dateTime": typing.Type[DateTime], + "password": typing.Type[Password], + "callback": typing.Type[Callback], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "byte", + "double", + "number", + "pattern_without_delimiter", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "integer", + "int32", + "int64", + "float", + "string", + "binary", + "date", + "dateTime", + "password", + "callback", + }) + + def __new__( + cls, + *, + byte: str, + double: typing.Union[ + int, + float + ], + number: typing.Union[ + int, + float + ], + pattern_without_delimiter: str, + integer: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + int32: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + int64: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + float: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + string: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + binary: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO, + schemas.Unset + ] = schemas.unset, + date: typing.Union[ + str, + datetime.date, + schemas.Unset + ] = schemas.unset, + dateTime: typing.Union[ + str, + datetime.datetime, + schemas.Unset + ] = schemas.unset, + password: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + callback: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "byte": byte, + "double": double, + "number": number, + "pattern_without_delimiter": pattern_without_delimiter, + } + for key_, val in ( + ("integer", integer), + ("int32", int32), + ("int64", int64), + ("float", float), + ("string", string), + ("binary", binary), + ("date", date), + ("dateTime", dateTime), + ("password", password), + ("callback", callback), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def byte(self) -> str: + return typing.cast( + str, + self.__getitem__("byte") + ) + + @property + def double(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("double") + ) + + @property + def number(self) -> typing.Union[int, float]: + return typing.cast( + typing.Union[int, float], + self.__getitem__("number") + ) + + @property + def pattern_without_delimiter(self) -> str: + return typing.cast( + str, + self.__getitem__("pattern_without_delimiter") + ) + + @property + def integer(self) -> typing.Union[int, schemas.Unset]: + val = self.get("integer", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def int32(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int32", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def int64(self) -> typing.Union[int, schemas.Unset]: + val = self.get("int64", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + @property + def float(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + + @property + def string(self) -> typing.Union[str, schemas.Unset]: + val = self.get("string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def binary(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: + val = self.get("binary", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[bytes, schemas.FileIO], + val + ) + + @property + def date(self) -> typing.Union[str, schemas.Unset]: + val = self.get("date", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def dateTime(self) -> typing.Union[str, schemas.Unset]: + val = self.get("dateTime", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def password(self) -> typing.Union[str, schemas.Unset]: + val = self.get("password", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def callback(self) -> typing.Union[str, schemas.Unset]: + val = self.get("callback", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "byte", + "double", + "number", + "pattern_without_delimiter", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py new file mode 100644 index 00000000000..10e691b5c05 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_basic_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py new file mode 100644 index 00000000000..ad543149c62 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_additional_properties_with_array_of_enums import FakeAdditionalPropertiesWithArrayOfEnums + +path = "/fake/additional-properties-with-array-of-enums" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py new file mode 100644 index 00000000000..b4401042d37 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_properties_with_array_of_enums + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _additional_properties_with_array_of_enums( + self, + body: typing.Union[ + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _additional_properties_with_array_of_enums( + self, + body: typing.Union[ + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _additional_properties_with_array_of_enums( + self, + body: typing.Union[ + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, + additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Additional Properties with Array of Enums + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class AdditionalPropertiesWithArrayOfEnums(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + additional_properties_with_array_of_enums = BaseApi._additional_properties_with_array_of_enums + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._additional_properties_with_array_of_enums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..71e55c75dac --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_properties_with_array_of_enums +Schema: typing_extensions.TypeAlias = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..9a6cb1a8be5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..71e55c75dac --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import additional_properties_with_array_of_enums +Schema: typing_extensions.TypeAlias = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py new file mode 100644 index 00000000000..46fee76a281 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema + +path = "/fake/body-with-file-schema" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py new file mode 100644 index 00000000000..12b1379b8cc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py @@ -0,0 +1,135 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import file_schema_test_class + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _body_with_file_schema( + self, + body: typing.Union[ + file_schema_test_class.FileSchemaTestClassDictInput, + file_schema_test_class.FileSchemaTestClassDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _body_with_file_schema( + self, + body: typing.Union[ + file_schema_test_class.FileSchemaTestClassDictInput, + file_schema_test_class.FileSchemaTestClassDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _body_with_file_schema( + self, + body: typing.Union[ + file_schema_test_class.FileSchemaTestClassDictInput, + file_schema_test_class.FileSchemaTestClassDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='put', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class BodyWithFileSchema(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + body_with_file_schema = BaseApi._body_with_file_schema + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._body_with_file_schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..2c45897df78 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import file_schema_test_class +Schema: typing_extensions.TypeAlias = file_schema_test_class.FileSchemaTestClass diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py new file mode 100644 index 00000000000..3b1fb238011 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_body_with_query_params import FakeBodyWithQueryParams + +path = "/fake/body-with-query-params" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py new file mode 100644 index 00000000000..a8db188122f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py @@ -0,0 +1,162 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user + +from .. import path +from .responses import response_200 +from . import request_body +from .parameters import parameter_0 +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _body_with_query_params( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _body_with_query_params( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _body_with_query_params( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='put', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class BodyWithQueryParams(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + body_with_query_params = BaseApi._body_with_query_params + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._body_with_query_params diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..bd1b90dc135 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "query" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py new file mode 100644 index 00000000000..7f2aeddb817 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_body_with_query_params.put.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "query": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "query", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + query: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "query": query, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def query(self) -> str: + return self.__getitem__("query") +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "query": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "query", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8e004303999 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user +Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py new file mode 100644 index 00000000000..4481cd944eb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams + +path = "/fake/case-sensitive-params" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py new file mode 100644 index 00000000000..840b3169040 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py @@ -0,0 +1,140 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import ( + parameter_0, + parameter_1, + parameter_2, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, + parameter_2.Parameter2, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _case_sensitive_params( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _case_sensitive_params( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _case_sensitive_params( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='put', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class CaseSensitiveParams(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + case_sensitive_params = BaseApi._case_sensitive_params + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._case_sensitive_params diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..5eaf87fcf23 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "someVar" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..178565d8afe --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.QueryParameter): + name = "SomeVar" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py new file mode 100644 index 00000000000..571512f5d7e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter2(api_client.QueryParameter): + name = "some_var" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py new file mode 100644 index 00000000000..83bb92ea397 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py @@ -0,0 +1,128 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_0 import schema +from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_1 import schema as schema_3 +from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_2 import schema as schema_2 +Properties = typing.TypedDict( + 'Properties', + { + "someVar": typing.Type[schema.Schema], + "some_var": typing.Type[schema_2.Schema], + "SomeVar": typing.Type[schema_3.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "SomeVar", + "someVar", + "some_var", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + SomeVar: str, + someVar: str, + some_var: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "SomeVar": SomeVar, + "someVar": someVar, + "some_var": some_var, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def SomeVar(self) -> str: + return typing.cast( + str, + self.__getitem__("SomeVar") + ) + + @property + def someVar(self) -> str: + return typing.cast( + str, + self.__getitem__("someVar") + ) + + @property + def some_var(self) -> str: + return typing.cast( + str, + self.__getitem__("some_var") + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "SomeVar": str, + "someVar": str, + "some_var": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "SomeVar", + "someVar", + "some_var", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py new file mode 100644 index 00000000000..00f1d0d933f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_classname_test import FakeClassnameTest + +path = "/fake_classname_test" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py new file mode 100644 index 00000000000..fa6056c176f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py @@ -0,0 +1,157 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client + +from .. import path +from .responses import response_200 +from . import request_body +from .security import security_requirement_object_0 + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _classname( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _classname( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _classname( + self, + body: typing.Union[ + client.ClientDictInput, + client.ClientDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + To test class name in snake case + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//fake_classname_test/patch/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='patch', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class Classname(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + classname = BaseApi._classname + + +class ApiForPatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + patch = BaseApi._classname diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py new file mode 100644 index 00000000000..cb468c24c28 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_client +RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py new file mode 100644 index 00000000000..1ffbaf1e85a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.client.ClientDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..c1e1b8bec36 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import client +Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py new file mode 100644 index 00000000000..7ec708e256b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key_query": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py new file mode 100644 index 00000000000..d030685ff6e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId + +path = "/fake/deleteCoffee/{id}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py new file mode 100644 index 00000000000..183b1fa2cb5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py @@ -0,0 +1,141 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_default, +) +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +default_response = response_default.Default +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_coffee( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> typing.Union[ + response_200.ApiResponse, + response_default.ApiResponse, + ]: ... + + @typing.overload + def _delete_coffee( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _delete_coffee( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Delete coffee + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='delete', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class DeleteCoffee(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + delete_coffee = BaseApi._delete_coffee + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._delete_coffee diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..69b8c284b4d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "id" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py new file mode 100644 index 00000000000..5ad8b700ddf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_delete_coffee_id.delete.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "id": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + id: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "id": id, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def id(self) -> str: + return self.__getitem__("id") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "id": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py new file mode 100644 index 00000000000..b2dbf46535b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class Default(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py new file mode 100644 index 00000000000..9e5ced1c16a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_health import FakeHealth + +path = "/fake/health" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py new file mode 100644 index 00000000000..906e0058097 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py @@ -0,0 +1,117 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _fake_health_get( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _fake_health_get( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _fake_health_get( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Health check endpoint + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class FakeHealthGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + fake_health_get = BaseApi._fake_health_get + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._fake_health_get diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..9bee19c0dbb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.health_check_result.HealthCheckResultDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e0a6f5a070e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import health_check_result +Schema: typing_extensions.TypeAlias = health_check_result.HealthCheckResult diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py new file mode 100644 index 00000000000..2c7383f3c77 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_inline_additional_properties import FakeInlineAdditionalProperties + +path = "/fake/inline-additionalProperties" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py new file mode 100644 index 00000000000..c5c9ab857a5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py @@ -0,0 +1,136 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_inline_additional_properties.post.request_body.content.application_json import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _inline_additional_properties( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _inline_additional_properties( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _inline_additional_properties( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + test inline additionalProperties + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class InlineAdditionalProperties(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + inline_additional_properties = BaseApi._inline_additional_properties + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._inline_additional_properties diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..038be680d09 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -0,0 +1,83 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + def __new__( + cls, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: str, + ): + used_kwargs = typing.cast(SchemaDictInput, kwargs) + return Schema.validate(used_kwargs, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + val = self.get(name, schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +SchemaDictInput = typing.Mapping[ + str, + str, +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py new file mode 100644 index 00000000000..c18e383633e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_inline_composition import FakeInlineComposition + +path = "/fake/inlineComposition/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py new file mode 100644 index 00000000000..69d1576d446 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py @@ -0,0 +1,236 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_inline_composition.post.request_body.content.application_json import schema +from openapi_client.paths.fake_inline_composition.post.request_body.content.multipart_form_data import schema as schema_2 + +from .. import path +from .responses import response_200 +from . import request_body +from .parameters import ( + parameter_0, + parameter_1, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", + "multipart/form-data", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _inline_composition( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _inline_composition( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _inline_composition( + self, + body: typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _inline_composition( + self, + body: typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _inline_composition( + self, + body: typing.Union[ + typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + ], + schemas.Unset, + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + content_type: typing.Literal[ + "application/json", + "multipart/form-data", + ] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + testing composed schemas at inline locations + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class InlineComposition(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + inline_composition = BaseApi._inline_composition + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._inline_composition diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..081e40b3136 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "compositionAtRoot" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..68bb5cd1208 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..3d7fcbff1a0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.QueryParameter): + name = "compositionInProperty" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..c1496a36b86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -0,0 +1,124 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class SomeProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +Properties = typing.TypedDict( + 'Properties', + { + "someProp": typing.Type[SomeProp], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someProp", + }) + + def __new__( + cls, + *, + someProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someProp", someProp), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("someProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py new file mode 100644 index 00000000000..4c16099399b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py @@ -0,0 +1,135 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_inline_composition.post.parameters.parameter_0 import schema +from openapi_client.paths.fake_inline_composition.post.parameters.parameter_1 import schema as schema_2 +Properties = typing.TypedDict( + 'Properties', + { + "compositionAtRoot": typing.Type[schema.Schema], + "compositionInProperty": typing.Type[schema_2.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "compositionAtRoot", + "compositionInProperty", + }) + + def __new__( + cls, + *, + compositionAtRoot: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + compositionInProperty: typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("compositionAtRoot", compositionAtRoot), + ("compositionInProperty", compositionInProperty), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def compositionAtRoot(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("compositionAtRoot", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schemas.OUTPUT_BASE_TYPES, + val + ) + + @property + def compositionInProperty(self) -> typing.Union[schema_2.SchemaDict, schemas.Unset]: + val = self.get("compositionInProperty", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + schema_2.SchemaDict, + val + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "compositionAtRoot": typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + "compositionInProperty": typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py new file mode 100644 index 00000000000..97431fadf5a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..68bb5cd1208 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..c1496a36b86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,124 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class SomeProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +Properties = typing.TypedDict( + 'Properties', + { + "someProp": typing.Type[SomeProp], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someProp", + }) + + def __new__( + cls, + *, + someProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someProp", someProp), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("someProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..81af2ac13c2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .content.multipart_form_data import schema as multipart_form_data_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + schemas.OUTPUT_BASE_TYPES, + multipart_form_data_schema.SchemaDict, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..68bb5cd1208 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..c1496a36b86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -0,0 +1,124 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class _0( + schemas.StrSchema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + min_length: int = 1 +AllOf = typing.Tuple[ + typing.Type[_0], +] + + +@dataclasses.dataclass(frozen=True) +class SomeProp( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + # any type + all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore + +Properties = typing.TypedDict( + 'Properties', + { + "someProp": typing.Type[SomeProp], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "someProp", + }) + + def __new__( + cls, + *, + someProp: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("someProp", someProp), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("someProp", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py new file mode 100644 index 00000000000..7820add345f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_json_form_data import FakeJsonFormData + +path = "/fake/jsonFormData" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py new file mode 100644 index 00000000000..5af1775a4de --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_json_form_data.get.request_body.content.application_x_www_form_urlencoded import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _json_form_data( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _json_form_data( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _json_form_data( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + test json serialization of form data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class JsonFormData(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + json_form_data = BaseApi._json_form_data + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._json_form_data diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py new file mode 100644 index 00000000000..04c6511e057 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema + content = { + 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py new file mode 100644 index 00000000000..e5f79af4d86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -0,0 +1,111 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Param: typing_extensions.TypeAlias = schemas.StrSchema +Param2: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "param": typing.Type[Param], + "param2": typing.Type[Param2], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "param", + "param2", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + param: str, + param2: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "param": param, + "param2": param2, + } + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def param(self) -> str: + return typing.cast( + str, + self.__getitem__("param") + ) + + @property + def param2(self) -> str: + return typing.cast( + str, + self.__getitem__("param2") + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "param", + "param2", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py new file mode 100644 index 00000000000..361506286d6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_json_patch import FakeJsonPatch + +path = "/fake/jsonPatch" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py new file mode 100644 index 00000000000..79482207b12 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_patch_request + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _json_patch( + self, + body: typing.Union[ + json_patch_request.JSONPatchRequestTupleInput, + json_patch_request.JSONPatchRequestTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _json_patch( + self, + body: typing.Union[ + json_patch_request.JSONPatchRequestTupleInput, + json_patch_request.JSONPatchRequestTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _json_patch( + self, + body: typing.Union[ + json_patch_request.JSONPatchRequestTupleInput, + json_patch_request.JSONPatchRequestTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + json patch + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='patch', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class JsonPatch(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + json_patch = BaseApi._json_patch + + +class ApiForPatch(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + patch = BaseApi._json_patch diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py new file mode 100644 index 00000000000..277f35d126a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json_patchjson import schema as application_json_patchjson_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonPatchjsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_patchjson_schema.Schema + content = { + 'application/json-patch+json': ApplicationJsonPatchjsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py new file mode 100644 index 00000000000..5d38fffc83e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import json_patch_request +Schema: typing_extensions.TypeAlias = json_patch_request.JSONPatchRequest diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py new file mode 100644 index 00000000000..50efb5ac083 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_json_with_charset import FakeJsonWithCharset + +path = "/fake/jsonWithCharset" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py new file mode 100644 index 00000000000..74aec626d47 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_json_with_charset.post.request_body.content.application_json_charsetutf8 import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json; charset=utf-8", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _json_with_charset( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _json_with_charset( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _json_with_charset( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + json with charset tx and rx + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class JsonWithCharset(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + json_with_charset = BaseApi._json_with_charset + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._json_with_charset diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py new file mode 100644 index 00000000000..b2720876332 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json_charsetutf8 import schema as application_json_charsetutf8_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonCharsetutf8MediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_charsetutf8_schema.Schema + content = { + 'application/json; charset=utf-8': ApplicationJsonCharsetutf8MediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..f6ede698a4a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json_charsetutf8 import schema as application_json_charsetutf8_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonCharsetutf8MediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_charsetutf8_schema.Schema + content = { + 'application/json; charset=utf-8': ApplicationJsonCharsetutf8MediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py new file mode 100644 index 00000000000..a263c05cfa7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_multiple_request_body_content_types import FakeMultipleRequestBodyContentTypes + +path = "/fake/multipleRequestBodyContentTypes/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py new file mode 100644 index 00000000000..1c132d5bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py @@ -0,0 +1,190 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_multiple_request_body_content_types.post.request_body.content.application_json import schema +from openapi_client.paths.fake_multiple_request_body_content_types.post.request_body.content.multipart_form_data import schema as schema_2 + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _multiple_request_body_content_types( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _multiple_request_body_content_types( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _multiple_request_body_content_types( + self, + body: typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _multiple_request_body_content_types( + self, + body: typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _multiple_request_body_content_types( + self, + body: typing.Union[ + typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + ], + typing.Union[ + schema_2.SchemaDictInput, + schema_2.SchemaDict, + ], + schemas.Unset, + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal[ + "application/json", + "multipart/form-data", + ] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + testing composed schemas at inline locations + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class MultipleRequestBodyContentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + multiple_request_body_content_types = BaseApi._multiple_request_body_content_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._multiple_request_body_content_types diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py new file mode 100644 index 00000000000..97431fadf5a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py @@ -0,0 +1,28 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e01f4f47343 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +A: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "a": typing.Type[A], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "a", + }) + + def __new__( + cls, + *, + a: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("a", a), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def a(self) -> typing.Union[str, schemas.Unset]: + val = self.get("a", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..81a6e94a48c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +B: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "b": typing.Type[B], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "b", + }) + + def __new__( + cls, + *, + b: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("b", b), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def b(self) -> typing.Union[str, schemas.Unset]: + val = self.get("b", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py new file mode 100644 index 00000000000..deeea6afc89 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_multiple_response_bodies import FakeMultipleResponseBodies + +path = "/fake/multipleResponseBodies" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py new file mode 100644 index 00000000000..e8cae9b634a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py @@ -0,0 +1,127 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_202, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '202': typing.Type[response_202.ResponseFor202], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '202': response_202.ResponseFor202, +} +_non_error_status_codes = frozenset({ + '200', + '202', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _multiple_response_bodies( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> typing.Union[ + response_200.ApiResponse, + response_202.ApiResponse, + ]: ... + + @typing.overload + def _multiple_response_bodies( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _multiple_response_bodies( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + multiple responses have response bodies + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + '202', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class MultipleResponseBodies(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + multiple_response_bodies = BaseApi._multiple_response_bodies + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._multiple_response_bodies diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py new file mode 100644 index 00000000000..496d00b6352 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor202(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py new file mode 100644 index 00000000000..d5b975c0083 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_multiple_securities import FakeMultipleSecurities + +path = "/fake/multipleSecurities" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py new file mode 100644 index 00000000000..9956064e494 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py @@ -0,0 +1,137 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .security import ( + security_requirement_object_0, + security_requirement_object_1, + security_requirement_object_2, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, + security_requirement_object_2.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _multiple_securities( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _multiple_securities( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _multiple_securities( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + multiple security requirements + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//fake/multipleSecurities/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class MultipleSecurities(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + multiple_securities = BaseApi._multiple_securities + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._multiple_securities diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..d2abad55619 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py new file mode 100644 index 00000000000..3bd125859d2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py @@ -0,0 +1,15 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_basic_test": (), + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py new file mode 100644 index 00000000000..1af9fd3ec87 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_obj_in_query import FakeObjInQuery + +path = "/fake/objInQuery" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py new file mode 100644 index 00000000000..4d65cbbba86 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import parameter_0 +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + user list + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ObjectInQuery(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + object_in_query = BaseApi._object_in_query + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._object_in_query diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..11281fbe42d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "mapBean" + style=api_client.ParameterStyle.DEEP_OBJECT + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..a563d9ce057 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Keyword: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "keyword": typing.Type[Keyword], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "keyword", + }) + + def __new__( + cls, + *, + keyword: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("keyword", keyword), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def keyword(self) -> typing.Union[str, schemas.Unset]: + val = self.get("keyword", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py new file mode 100644 index 00000000000..4780f4981b6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py @@ -0,0 +1,109 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_obj_in_query.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "mapBean": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schema.SchemaDict]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "mapBean", + }) + + def __new__( + cls, + *, + mapBean: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("mapBean", mapBean), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def mapBean(self) -> typing.Union[schema.SchemaDict, schemas.Unset]: + val = self.get("mapBean", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "mapBean": typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py new file mode 100644 index 00000000000..e5a1bbc24a4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_parameter_collisions1_abab_self_ab import FakeParameterCollisions1AbabSelfAb + +path = "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py new file mode 100644 index 00000000000..0f0259b7a92 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py @@ -0,0 +1,154 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_14 import schema +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_15 import schema as schema_2 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_16 import schema as schema_3 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_17 import schema as schema_5 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_18 import schema as schema_4 +Properties = typing.TypedDict( + 'Properties', + { + "1": typing.Type[schema.Schema], + "aB": typing.Type[schema_2.Schema], + "Ab": typing.Type[schema_3.Schema], + "A-B": typing.Type[schema_4.Schema], + "self": typing.Type[schema_5.Schema], + } +) + + +class CookieParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "1", + "aB", + "Ab", + "A-B", + "self", + }) + + def __new__( + cls, + *, + aB: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + Ab: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("aB", aB), + ("Ab", Ab), + ("self", self), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(CookieParametersDictInput, arg_) + return CookieParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + CookieParametersDictInput, + CookieParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CookieParametersDict: + return CookieParameters.validate(arg, configuration=configuration) + + @property + def aB(self) -> typing.Union[str, schemas.Unset]: + val = self.get("aB", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def Ab(self) -> typing.Union[str, schemas.Unset]: + val = self.get("Ab", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +CookieParametersDictInput = typing.TypedDict( + 'CookieParametersDictInput', + { + "1": str, + "aB": str, + "Ab": str, + "A-B": str, + "self": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class CookieParameters( + schemas.Schema[CookieParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: CookieParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + CookieParametersDictInput, + CookieParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> CookieParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py new file mode 100644 index 00000000000..6c482f937e6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py @@ -0,0 +1,135 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_5 import schema +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_6 import schema as schema_2 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_7 import schema as schema_4 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_8 import schema as schema_3 +Properties = typing.TypedDict( + 'Properties', + { + "1": typing.Type[schema.Schema], + "aB": typing.Type[schema_2.Schema], + "A-B": typing.Type[schema_3.Schema], + "self": typing.Type[schema_4.Schema], + } +) + + +class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "1", + "aB", + "A-B", + "self", + }) + + def __new__( + cls, + *, + aB: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("aB", aB), + ("self", self), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def aB(self) -> typing.Union[str, schemas.Unset]: + val = self.get("aB", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +HeaderParametersDictInput = typing.TypedDict( + 'HeaderParametersDictInput', + { + "1": str, + "aB": str, + "A-B": str, + "self": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py new file mode 100644 index 00000000000..7027f52ab2d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py @@ -0,0 +1,287 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.request_body.content.application_json import schema + +from .. import path +from .responses import response_200 +from . import request_body +from .parameters import ( + parameter_0, + parameter_1, + parameter_2, + parameter_3, + parameter_4, + parameter_5, + parameter_6, + parameter_7, + parameter_8, + parameter_9, + parameter_10, + parameter_11, + parameter_12, + parameter_13, + parameter_14, + parameter_15, + parameter_16, + parameter_17, + parameter_18, +) +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +from .cookie_parameters import CookieParameters, CookieParametersDictInput, CookieParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, + parameter_2.Parameter2, + parameter_3.Parameter3, + parameter_4.Parameter4, +) +header_parameter_classes = ( + parameter_5.Parameter5, + parameter_6.Parameter6, + parameter_7.Parameter7, + parameter_8.Parameter8, +) +path_parameter_classes = ( + parameter_9.Parameter9, + parameter_10.Parameter10, + parameter_11.Parameter11, + parameter_12.Parameter12, + parameter_13.Parameter13, +) +cookie_parameter_classes = ( + parameter_9.Parameter9, + parameter_10.Parameter10, + parameter_11.Parameter11, + parameter_12.Parameter12, + parameter_13.Parameter13, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _parameter_collisions( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + cookie_params: typing.Union[ + CookieParametersDictInput, + CookieParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _parameter_collisions( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + cookie_params: typing.Union[ + CookieParametersDictInput, + CookieParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _parameter_collisions( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + cookie_params: typing.Union[ + CookieParametersDictInput, + CookieParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + parameter collision case + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + if header_params is not None: + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + if cookie_params is not None: + cookie_params = CookieParameters.validate( + cookie_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + accept_content_types=accept_content_types, + skip_validation=True + ) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ParameterCollisions(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + parameter_collisions = BaseApi._parameter_collisions + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._parameter_collisions diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..c3e56a0071c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "1" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..42d3c28a201 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.QueryParameter): + name = "aB" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py new file mode 100644 index 00000000000..a032f10d400 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter10(api_client.PathParameter): + name = "aB" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py new file mode 100644 index 00000000000..0a84c1425b6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter11(api_client.PathParameter): + name = "Ab" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py new file mode 100644 index 00000000000..3046c447b3a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter12(api_client.PathParameter): + name = "self" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py new file mode 100644 index 00000000000..6528508b8d2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter13(api_client.PathParameter): + name = "A-B" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py new file mode 100644 index 00000000000..724f6cd8c85 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter14(api_client.CookieParameter): + name = "1" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py new file mode 100644 index 00000000000..34a6af7117d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter15(api_client.CookieParameter): + name = "aB" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py new file mode 100644 index 00000000000..bbcefa69573 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter16(api_client.CookieParameter): + name = "Ab" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py new file mode 100644 index 00000000000..91a591c289a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter17(api_client.CookieParameter): + name = "self" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py new file mode 100644 index 00000000000..f8023ef9902 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter18(api_client.CookieParameter): + name = "A-B" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py new file mode 100644 index 00000000000..58909088f52 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter2(api_client.QueryParameter): + name = "Ab" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py new file mode 100644 index 00000000000..428cf357caf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter3(api_client.QueryParameter): + name = "self" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py new file mode 100644 index 00000000000..0d9cee81ff8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter4(api_client.QueryParameter): + name = "A-B" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py new file mode 100644 index 00000000000..06acca46ea2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter5(api_client.HeaderParameter): + name = "1" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py new file mode 100644 index 00000000000..2d90f7a46cb --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter6(api_client.HeaderParameter): + name = "aB" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py new file mode 100644 index 00000000000..4fc3881b870 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter7(api_client.HeaderParameter): + name = "self" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py new file mode 100644 index 00000000000..ba0106e7390 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter8(api_client.HeaderParameter): + name = "A-B" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py new file mode 100644 index 00000000000..2fd448fbcaa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter9(api_client.PathParameter): + name = "1" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py new file mode 100644 index 00000000000..8c093f85931 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py @@ -0,0 +1,138 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_10 import schema as schema_2 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_11 import schema as schema_3 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_12 import schema as schema_5 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_13 import schema as schema_4 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_9 import schema +Properties = typing.TypedDict( + 'Properties', + { + "1": typing.Type[schema.Schema], + "aB": typing.Type[schema_2.Schema], + "Ab": typing.Type[schema_3.Schema], + "A-B": typing.Type[schema_4.Schema], + "self": typing.Type[schema_5.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "1", + "A-B", + "Ab", + "aB", + "self", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + Ab: str, + aB: str, + self: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "Ab": Ab, + "aB": aB, + "self": self, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def Ab(self) -> str: + return typing.cast( + str, + self.__getitem__("Ab") + ) + + @property + def aB(self) -> str: + return typing.cast( + str, + self.__getitem__("aB") + ) + + @property + def self(self) -> str: + return typing.cast( + str, + self.__getitem__("self") + ) +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "1": str, + "A-B": str, + "Ab": str, + "aB": str, + "self": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "1", + "A-B", + "Ab", + "aB", + "self", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py new file mode 100644 index 00000000000..75e7b6e9fa8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py @@ -0,0 +1,154 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_0 import schema +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_1 import schema as schema_2 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_2 import schema as schema_3 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_3 import schema as schema_5 +from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_4 import schema as schema_4 +Properties = typing.TypedDict( + 'Properties', + { + "1": typing.Type[schema.Schema], + "aB": typing.Type[schema_2.Schema], + "Ab": typing.Type[schema_3.Schema], + "A-B": typing.Type[schema_4.Schema], + "self": typing.Type[schema_5.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "1", + "aB", + "Ab", + "A-B", + "self", + }) + + def __new__( + cls, + *, + aB: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + Ab: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("aB", aB), + ("Ab", Ab), + ("self", self), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def aB(self) -> typing.Union[str, schemas.Unset]: + val = self.get("aB", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def Ab(self) -> typing.Union[str, schemas.Unset]: + val = self.get("Ab", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "1": str, + "aB": str, + "Ab": str, + "A-B": str, + "self": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py new file mode 100644 index 00000000000..467c5d090d5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_pem_content_type import FakePemContentType + +path = "/fake/pemContentType" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py new file mode 100644 index 00000000000..0e801e2a335 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py @@ -0,0 +1,143 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_pem_content_type.get.request_body.content.application_x_pem_file import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/x-pem-file", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _pem_content_type( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _pem_content_type( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _pem_content_type( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + route with tx and rx pem content type + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PemContentType(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + pem_content_type = BaseApi._pem_content_type + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._pem_content_type diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py new file mode 100644 index 00000000000..164558c77d6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_pem_file import schema as application_x_pem_file_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationXPemFileMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_pem_file_schema.Schema + content = { + 'application/x-pem-file': ApplicationXPemFileMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..b682fb4bb4e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_pem_file import schema as application_x_pem_file_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXPemFileMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_pem_file_schema.Schema + content = { + 'application/x-pem-file': ApplicationXPemFileMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py new file mode 100644 index 00000000000..13f907adb75 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile + +path = "/fake/{petId}/uploadImageWithRequiredFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py new file mode 100644 index 00000000000..c9a5dabde43 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py @@ -0,0 +1,186 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.request_body.content.multipart_form_data import schema + +from .. import path +from .responses import response_200 +from . import request_body +from .parameters import parameter_0 +from .security import security_requirement_object_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _upload_file_with_required_file( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _upload_file_with_required_file( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _upload_file_with_required_file( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + uploads an image (required) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//fake/{petId}/uploadImageWithRequiredFile/post/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UploadFileWithRequiredFile(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + upload_file_with_required_file = BaseApi._upload_file_with_required_file + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._upload_file_with_required_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..18d9059d05f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "petId" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py new file mode 100644 index 00000000000..4cff18e37af --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "petId": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + petId: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "petId": petId, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def petId(self) -> int: + return self.__getitem__("petId") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "petId": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "petId", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py new file mode 100644 index 00000000000..fa0a08ad486 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..b0a024249a2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,126 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema +RequiredFile: typing_extensions.TypeAlias = schemas.BinarySchema +Properties = typing.TypedDict( + 'Properties', + { + "additionalMetadata": typing.Type[AdditionalMetadata], + "requiredFile": typing.Type[RequiredFile], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "requiredFile", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "additionalMetadata", + }) + + def __new__( + cls, + *, + requiredFile: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + additionalMetadata: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "requiredFile": requiredFile, + } + for key_, val in ( + ("additionalMetadata", additionalMetadata), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def requiredFile(self) -> typing.Union[bytes, schemas.FileIO]: + return typing.cast( + typing.Union[bytes, schemas.FileIO], + self.__getitem__("requiredFile") + ) + + @property + def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: + val = self.get("additionalMetadata", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "requiredFile", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..7b75d37c85f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.api_response.ApiResponseDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d3dc5adb905 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import api_response +Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py new file mode 100644 index 00000000000..7dae1fb1aa5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType + +path = "/fake/queryParamWithJsonContentType" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py new file mode 100644 index 00000000000..889f6b04342 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py @@ -0,0 +1,144 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import parameter_0 +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _query_param_with_json_content_type( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _query_param_with_json_content_type( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _query_param_with_json_content_type( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + query param with json content-type + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class QueryParamWithJsonContentType(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + query_param_with_json_content_type = BaseApi._query_param_with_json_content_type + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._query_param_with_json_content_type diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..cabb63456ce --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py @@ -0,0 +1,24 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class Parameter0(api_client.QueryParameter): + name = "someParam" + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py new file mode 100644 index 00000000000..9f3583d942e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.fake_query_param_with_json_content_type.get.parameters.parameter_0.content.application_json import schema +Properties = typing.TypedDict( + 'Properties', + { + "someParam": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "someParam", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + someParam: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "someParam": someParam, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def someParam(self) -> schemas.OUTPUT_BASE_TYPES: + return self.__getitem__("someParam") +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "someParam": typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "someParam", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py new file mode 100644 index 00000000000..a917d6801dd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_redirection import FakeRedirection + +path = "/fake/redirection" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py new file mode 100644 index 00000000000..23671668525 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py @@ -0,0 +1,137 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_303, + response_3xx, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '303': typing.Type[response_303.ResponseFor303], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '303': response_303.ResponseFor303, +} +__RangedStatusCodeToResponse = typing.TypedDict( + '__RangedStatusCodeToResponse', + { + '3': typing.Type[response_3xx.ResponseFor3XX], + } +) +_ranged_status_code_to_response: __RangedStatusCodeToResponse = { + '3': response_3xx.ResponseFor3XX, +} +_non_error_status_codes = frozenset({ + '303', +}) +_non_error_ranged_status_codes = frozenset({ + '3', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _redirection( + self, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> typing.Union[ + response_3xx.ApiResponse, + response_303.ApiResponse, + ]: ... + + @typing.overload + def _redirection( + self, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _redirection( + self, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + operation with redirection responses + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '303', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + ranged_response_status_code = str(raw_response.status)[0] + if ranged_response_status_code in _non_error_ranged_status_codes: + ranged_status_code = typing.cast( + typing.Literal[ + '3', + ], + ranged_response_status_code + ) + return _ranged_status_code_to_response[ranged_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class Redirection(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + redirection = BaseApi._redirection + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._redirection diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py new file mode 100644 index 00000000000..8078c7de794 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor303(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py new file mode 100644 index 00000000000..2e094cea7ae --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor3XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py new file mode 100644 index 00000000000..0a75e663aae --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_ref_obj_in_query import FakeRefObjInQuery + +path = "/fake/refObjInQuery" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py new file mode 100644 index 00000000000..118a305d662 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py @@ -0,0 +1,139 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import parameter_0 +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _ref_object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _ref_object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _ref_object_in_query( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + user list + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + if query_params is not None: + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class RefObjectInQuery(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + ref_object_in_query = BaseApi._ref_object_in_query + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._ref_object_in_query diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..11281fbe42d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "mapBean" + style=api_client.ParameterStyle.DEEP_OBJECT + schema: typing_extensions.TypeAlias = schema.Schema + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..153544eaf8e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import foo +Schema: typing_extensions.TypeAlias = foo.Foo diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py new file mode 100644 index 00000000000..1dac16b0313 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py @@ -0,0 +1,109 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.schema import foo +Properties = typing.TypedDict( + 'Properties', + { + "mapBean": typing.Type[foo.Foo], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, foo.FooDict]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "mapBean", + }) + + def __new__( + cls, + *, + mapBean: typing.Union[ + foo.FooDictInput, + foo.FooDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("mapBean", mapBean), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def mapBean(self) -> typing.Union[foo.FooDict, schemas.Unset]: + val = self.get("mapBean", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "mapBean": typing.Union[ + foo.FooDictInput, + foo.FooDict, + ], + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py new file mode 100644 index 00000000000..a99368bff5c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_array_of_enums import FakeRefsArrayOfEnums + +path = "/fake/refs/array-of-enums" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py new file mode 100644 index 00000000000..3757529b998 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_of_enums + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _array_of_enums( + self, + body: typing.Union[ + array_of_enums.ArrayOfEnumsTupleInput, + array_of_enums.ArrayOfEnumsTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _array_of_enums( + self, + body: typing.Union[ + array_of_enums.ArrayOfEnumsTupleInput, + array_of_enums.ArrayOfEnumsTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _array_of_enums( + self, + body: typing.Union[ + array_of_enums.ArrayOfEnumsTupleInput, + array_of_enums.ArrayOfEnumsTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Array of Enums + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ArrayOfEnums(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + array_of_enums = BaseApi._array_of_enums + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._array_of_enums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..f8a5babef80 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_of_enums +Schema: typing_extensions.TypeAlias = array_of_enums.ArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..93cd34f9bc8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.array_of_enums.ArrayOfEnumsTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..f8a5babef80 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import array_of_enums +Schema: typing_extensions.TypeAlias = array_of_enums.ArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py new file mode 100644 index 00000000000..c8ee0b34c4a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_arraymodel import FakeRefsArraymodel + +path = "/fake/refs/arraymodel" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py new file mode 100644 index 00000000000..316488c7f81 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py @@ -0,0 +1,145 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import animal_farm + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _array_model( + self, + body: typing.Union[ + animal_farm.AnimalFarmTupleInput, + animal_farm.AnimalFarmTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _array_model( + self, + body: typing.Union[ + animal_farm.AnimalFarmTupleInput, + animal_farm.AnimalFarmTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _array_model( + self, + body: typing.Union[ + animal_farm.AnimalFarmTupleInput, + animal_farm.AnimalFarmTuple, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ArrayModel(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + array_model = BaseApi._array_model + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._array_model diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..604d22170f5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import animal_farm +Schema: typing_extensions.TypeAlias = animal_farm.AnimalFarm diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..5a41ab3a7f9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.animal_farm.AnimalFarmTuple + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..604d22170f5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import animal_farm +Schema: typing_extensions.TypeAlias = animal_farm.AnimalFarm diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py new file mode 100644 index 00000000000..82a55f25888 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_boolean import FakeRefsBoolean + +path = "/fake/refs/boolean" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py new file mode 100644 index 00000000000..9400a38b0f5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py @@ -0,0 +1,142 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _boolean( + self, + body: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _boolean( + self, + body: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _boolean( + self, + body: typing.Union[ + bool, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class Boolean(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + boolean = BaseApi._boolean + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..03bad95ad24 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean +Schema: typing_extensions.TypeAlias = boolean.Boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..11ef550d513 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: bool + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..03bad95ad24 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import boolean +Schema: typing_extensions.TypeAlias = boolean.Boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py new file mode 100644 index 00000000000..6db2f53aa48 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_composed_one_of_number_with_validations import FakeRefsComposedOneOfNumberWithValidations + +path = "/fake/refs/composed_one_of_number_with_validations" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py new file mode 100644 index 00000000000..fa14dfd5b97 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py @@ -0,0 +1,145 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import composed_one_of_different_types + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _composed_one_of_different_types( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _composed_one_of_different_types( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _composed_one_of_different_types( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ComposedOneOfDifferentTypes(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + composed_one_of_different_types = BaseApi._composed_one_of_different_types + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._composed_one_of_different_types diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..1fdda306d7e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import composed_one_of_different_types +Schema: typing_extensions.TypeAlias = composed_one_of_different_types.ComposedOneOfDifferentTypes diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..1fdda306d7e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import composed_one_of_different_types +Schema: typing_extensions.TypeAlias = composed_one_of_different_types.ComposedOneOfDifferentTypes diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py new file mode 100644 index 00000000000..207ae9a7bc3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_enum import FakeRefsEnum + +path = "/fake/refs/enum" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py new file mode 100644 index 00000000000..0df44787245 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py @@ -0,0 +1,166 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_enum + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _string_enum( + self, + body: typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _string_enum( + self, + body: typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _string_enum( + self, + body: typing.Union[ + None, + typing.Literal[ + "placed", + "approved", + "delivered", + "single quoted", + "multiple\nlines", + "double quote \n with newline" + ], + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class StringEnum(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + string_enum = BaseApi._string_enum + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._string_enum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8cebf7e115a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_enum +Schema: typing_extensions.TypeAlias = string_enum.StringEnum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..03d0d4590a8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + None, + typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8cebf7e115a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_enum +Schema: typing_extensions.TypeAlias = string_enum.StringEnum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py new file mode 100644 index 00000000000..1ed561eab88 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_mammal import FakeRefsMammal + +path = "/fake/refs/mammal" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py new file mode 100644 index 00000000000..1e541aeecca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py @@ -0,0 +1,142 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mammal + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _mammal( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _mammal( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _mammal( + self, + body: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class Mammal(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + mammal = BaseApi._mammal + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9b391a51f3a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mammal +Schema: typing_extensions.TypeAlias = mammal.Mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9b391a51f3a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import mammal +Schema: typing_extensions.TypeAlias = mammal.Mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py new file mode 100644 index 00000000000..f9bb209fd19 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_number import FakeRefsNumber + +path = "/fake/refs/number" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py new file mode 100644 index 00000000000..0f495897036 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py @@ -0,0 +1,145 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_with_validations + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _number_with_validations( + self, + body: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _number_with_validations( + self, + body: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _number_with_validations( + self, + body: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class NumberWithValidations(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + number_with_validations = BaseApi._number_with_validations + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._number_with_validations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..9033322743d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_with_validations +Schema: typing_extensions.TypeAlias = number_with_validations.NumberWithValidations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..40210f5f787 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[int, float] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..9033322743d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import number_with_validations +Schema: typing_extensions.TypeAlias = number_with_validations.NumberWithValidations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py new file mode 100644 index 00000000000..a4d319c6991 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_object_model_with_ref_props import FakeRefsObjectModelWithRefProps + +path = "/fake/refs/object_model_with_ref_props" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py new file mode 100644 index 00000000000..05066e03396 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py @@ -0,0 +1,145 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_model_with_ref_props + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _object_model_with_ref_props( + self, + body: typing.Union[ + object_model_with_ref_props.ObjectModelWithRefPropsDictInput, + object_model_with_ref_props.ObjectModelWithRefPropsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _object_model_with_ref_props( + self, + body: typing.Union[ + object_model_with_ref_props.ObjectModelWithRefPropsDictInput, + object_model_with_ref_props.ObjectModelWithRefPropsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _object_model_with_ref_props( + self, + body: typing.Union[ + object_model_with_ref_props.ObjectModelWithRefPropsDictInput, + object_model_with_ref_props.ObjectModelWithRefPropsDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ObjectModelWithRefProps(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + object_model_with_ref_props = BaseApi._object_model_with_ref_props + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._object_model_with_ref_props diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..35b5b46c933 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_model_with_ref_props +Schema: typing_extensions.TypeAlias = object_model_with_ref_props.ObjectModelWithRefProps diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..14b88a94296 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.object_model_with_ref_props.ObjectModelWithRefPropsDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..35b5b46c933 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import object_model_with_ref_props +Schema: typing_extensions.TypeAlias = object_model_with_ref_props.ObjectModelWithRefProps diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py new file mode 100644 index 00000000000..ae88d57af4b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_refs_string import FakeRefsString + +path = "/fake/refs/string" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py new file mode 100644 index 00000000000..4a80b355b21 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py @@ -0,0 +1,142 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _string( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _string( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _string( + self, + body: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class String(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + string = BaseApi._string + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._string diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py new file mode 100644 index 00000000000..06b13966ce1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..7b426ea6594 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string +Schema: typing_extensions.TypeAlias = string.String diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..989e596bf91 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: str + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..7b426ea6594 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string +Schema: typing_extensions.TypeAlias = string.String diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py new file mode 100644 index 00000000000..5c0c523c16c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema + +path = "/fake/responseWithoutSchema" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py new file mode 100644 index 00000000000..a5e0d1a6b87 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py @@ -0,0 +1,118 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", + "application/xml", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _response_without_schema( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _response_without_schema( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _response_without_schema( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + receives a response without schema + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class ResponseWithoutSchema(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + response_without_schema = BaseApi._response_without_schema + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._response_without_schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..75cf69b30b8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py @@ -0,0 +1,35 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + pass + + + class ApplicationXmlMediaType(api_client.MediaType): + pass + content = { + 'application/json': ApplicationJsonMediaType, + 'application/xml': ApplicationXmlMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py new file mode 100644 index 00000000000..c77e0b18f5b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_test_query_paramters import FakeTestQueryParamters + +path = "/fake/test-query-paramters" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py new file mode 100644 index 00000000000..7e8a07ba44f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .parameters import ( + parameter_0, + parameter_1, + parameter_2, + parameter_3, + parameter_4, + parameter_5, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, + parameter_2.Parameter2, + parameter_3.Parameter3, + parameter_4.Parameter4, + parameter_5.Parameter5, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _query_parameter_collection_format( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _query_parameter_collection_format( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _query_parameter_collection_format( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='put', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class QueryParameterCollectionFormat(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + query_parameter_collection_format = BaseApi._query_parameter_collection_format + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._query_parameter_collection_format diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..c84d0013bfd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "pipe" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..6a7b8bb82b3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.QueryParameter): + name = "ioutil" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py new file mode 100644 index 00000000000..75c683b3ad2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter2(api_client.QueryParameter): + name = "http" + style = api_client.ParameterStyle.SPACE_DELIMITED + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py new file mode 100644 index 00000000000..a872b4e7a0d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter3(api_client.QueryParameter): + name = "url" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py new file mode 100644 index 00000000000..31859f8d187 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter4(api_client.QueryParameter): + name = "context" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py new file mode 100644 index 00000000000..73c6a47448b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter5(api_client.QueryParameter): + name = "refParam" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py new file mode 100644 index 00000000000..c85ecf13950 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import string_with_validation +Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py new file mode 100644 index 00000000000..21676c8c099 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py @@ -0,0 +1,200 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.schema import string_with_validation +from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_0 import schema as schema_4 +from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_1 import schema +from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_2 import schema as schema_3 +from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_3 import schema as schema_5 +from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_4 import schema as schema_2 +Properties = typing.TypedDict( + 'Properties', + { + "refParam": typing.Type[string_with_validation.StringWithValidation], + "ioutil": typing.Type[schema.Schema], + "context": typing.Type[schema_2.Schema], + "http": typing.Type[schema_3.Schema], + "pipe": typing.Type[schema_4.Schema], + "url": typing.Type[schema_5.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "context", + "http", + "ioutil", + "pipe", + "refParam", + "url", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + context: typing.Union[ + schema_2.SchemaTupleInput, + schema_2.SchemaTuple + ], + http: typing.Union[ + schema_3.SchemaTupleInput, + schema_3.SchemaTuple + ], + ioutil: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + pipe: typing.Union[ + schema_4.SchemaTupleInput, + schema_4.SchemaTuple + ], + refParam: str, + url: typing.Union[ + schema_5.SchemaTupleInput, + schema_5.SchemaTuple + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "context": context, + "http": http, + "ioutil": ioutil, + "pipe": pipe, + "refParam": refParam, + "url": url, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def context(self) -> schema_2.SchemaTuple: + return typing.cast( + schema_2.SchemaTuple, + self.__getitem__("context") + ) + + @property + def http(self) -> schema_3.SchemaTuple: + return typing.cast( + schema_3.SchemaTuple, + self.__getitem__("http") + ) + + @property + def ioutil(self) -> schema.SchemaTuple: + return typing.cast( + schema.SchemaTuple, + self.__getitem__("ioutil") + ) + + @property + def pipe(self) -> schema_4.SchemaTuple: + return typing.cast( + schema_4.SchemaTuple, + self.__getitem__("pipe") + ) + + @property + def refParam(self) -> str: + return typing.cast( + str, + self.__getitem__("refParam") + ) + + @property + def url(self) -> schema_5.SchemaTuple: + return typing.cast( + schema_5.SchemaTuple, + self.__getitem__("url") + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "context": typing.Union[ + schema_2.SchemaTupleInput, + schema_2.SchemaTuple + ], + "http": typing.Union[ + schema_3.SchemaTupleInput, + schema_3.SchemaTuple + ], + "ioutil": typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + "pipe": typing.Union[ + schema_4.SchemaTupleInput, + schema_4.SchemaTuple + ], + "refParam": str, + "url": typing.Union[ + schema_5.SchemaTupleInput, + schema_5.SchemaTuple + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "context", + "http", + "ioutil", + "pipe", + "refParam", + "url", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py new file mode 100644 index 00000000000..66a4e102c1e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_upload_download_file import FakeUploadDownloadFile + +path = "/fake/uploadDownloadFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py new file mode 100644 index 00000000000..eedc7f7f406 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py @@ -0,0 +1,149 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_upload_download_file.post.request_body.content.application_octet_stream import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/octet-stream", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _upload_download_file( + self, + body: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _upload_download_file( + self, + body: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _upload_download_file( + self, + body: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + uploads a file and downloads a file using application/octet-stream + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UploadDownloadFile(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + upload_download_file = BaseApi._upload_download_file + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._upload_download_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py new file mode 100644 index 00000000000..6718046a9bf --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_octet_stream import schema as application_octet_stream_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationOctetStreamMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_octet_stream_schema.Schema + content = { + 'application/octet-stream': ApplicationOctetStreamMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py new file mode 100644 index 00000000000..d74b5d7ff57 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.BinarySchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..d47f3fd53b8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_octet_stream import schema as application_octet_stream_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[bytes, schemas.FileIO] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationOctetStreamMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_octet_stream_schema.Schema + content = { + 'application/octet-stream': ApplicationOctetStreamMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py new file mode 100644 index 00000000000..d74b5d7ff57 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.BinarySchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py new file mode 100644 index 00000000000..5276fc2136f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_upload_file import FakeUploadFile + +path = "/fake/uploadFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py new file mode 100644 index 00000000000..17610b2a730 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_upload_file.post.request_body.content.multipart_form_data import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _upload_file( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _upload_file( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _upload_file( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + uploads a file using multipart/form-data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UploadFile(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + upload_file = BaseApi._upload_file + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._upload_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py new file mode 100644 index 00000000000..fa0a08ad486 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..cc0ef23f4ae --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,126 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema +File: typing_extensions.TypeAlias = schemas.BinarySchema +Properties = typing.TypedDict( + 'Properties', + { + "additionalMetadata": typing.Type[AdditionalMetadata], + "file": typing.Type[File], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "file", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "additionalMetadata", + }) + + def __new__( + cls, + *, + file: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + additionalMetadata: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = { + "file": file, + } + for key_, val in ( + ("additionalMetadata", additionalMetadata), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def file(self) -> typing.Union[bytes, schemas.FileIO]: + return typing.cast( + typing.Union[bytes, schemas.FileIO], + self.__getitem__("file") + ) + + @property + def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: + val = self.get("additionalMetadata", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "file", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..7b75d37c85f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.api_response.ApiResponseDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d3dc5adb905 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import api_response +Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py new file mode 100644 index 00000000000..240977634b3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_upload_files import FakeUploadFiles + +path = "/fake/uploadFiles" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py new file mode 100644 index 00000000000..b9ba2c65542 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py @@ -0,0 +1,146 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.fake_upload_files.post.request_body.content.multipart_form_data import schema + +from .. import path +from .responses import response_200 +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _upload_files( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _upload_files( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _upload_files( + self, + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + uploads files using multipart/form-data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UploadFiles(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + upload_files = BaseApi._upload_files + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._upload_files diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py new file mode 100644 index 00000000000..fa0a08ad486 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..4b136291e17 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,166 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.BinarySchema + + +class FilesTuple( + typing.Tuple[ + typing.Union[bytes, schemas.FileIO], + ... + ] +): + + def __new__(cls, arg: typing.Union[FilesTupleInput, FilesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Files.validate(arg, configuration=configuration) +FilesTupleInput = typing.Union[ + typing.List[ + typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + ], + typing.Tuple[ + typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Files( + schemas.Schema[schemas.immutabledict, FilesTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: FilesTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + FilesTupleInput, + FilesTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FilesTuple: + return super().validate_base( + arg, + configuration=configuration, + ) +Properties = typing.TypedDict( + 'Properties', + { + "files": typing.Type[Files], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "files", + }) + + def __new__( + cls, + *, + files: typing.Union[ + FilesTupleInput, + FilesTuple, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("files", files), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def files(self) -> typing.Union[FilesTuple, schemas.Unset]: + val = self.get("files", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + FilesTuple, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..7b75d37c85f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.api_response.ApiResponseDict + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..d3dc5adb905 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import api_response +Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py new file mode 100644 index 00000000000..431fc7d5367 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.fake_wild_card_responses import FakeWildCardResponses + +path = "/fake/wildCardResponses" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py new file mode 100644 index 00000000000..2673117ca9d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py @@ -0,0 +1,183 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_1xx, + response_200, + response_2xx, + response_3xx, + response_4xx, + response_5xx, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +__RangedStatusCodeToResponse = typing.TypedDict( + '__RangedStatusCodeToResponse', + { + '1': typing.Type[response_1xx.ResponseFor1XX], + '2': typing.Type[response_2xx.ResponseFor2XX], + '3': typing.Type[response_3xx.ResponseFor3XX], + '4': typing.Type[response_4xx.ResponseFor4XX], + '5': typing.Type[response_5xx.ResponseFor5XX], + } +) +_ranged_status_code_to_response: __RangedStatusCodeToResponse = { + '1': response_1xx.ResponseFor1XX, + '2': response_2xx.ResponseFor2XX, + '3': response_3xx.ResponseFor3XX, + '4': response_4xx.ResponseFor4XX, + '5': response_5xx.ResponseFor5XX, +} +_non_error_status_codes = frozenset({ + '200', +}) +_non_error_ranged_status_codes = frozenset({ + '1', + '2', + '3', +}) +_error_ranged_status_codes = frozenset({ + '4', + '5', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _wild_card_responses( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> typing.Union[ + response_1xx.ApiResponse, + response_2xx.ApiResponse, + response_200.ApiResponse, + response_3xx.ApiResponse, + ]: ... + + @typing.overload + def _wild_card_responses( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _wild_card_responses( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + operation with wildcard responses + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + ranged_response_status_code = str(raw_response.status)[0] + if ranged_response_status_code in _non_error_ranged_status_codes: + ranged_status_code = typing.cast( + typing.Literal[ + '1', + '2', + '3', + ], + ranged_response_status_code + ) + return _ranged_status_code_to_response[ranged_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif ranged_response_status_code in _error_ranged_status_codes: + error_ranged_status_code = typing.cast( + typing.Literal[ + '4', + '5', + ], + ranged_response_status_code + ) + error_response = _ranged_status_code_to_response[error_ranged_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class WildCardResponses(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + wild_card_responses = BaseApi._wild_card_responses + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._wild_card_responses diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py new file mode 100644 index 00000000000..11f39de18a8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor1XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..e4ea548bd7a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py new file mode 100644 index 00000000000..4a136b298a1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor2XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py new file mode 100644 index 00000000000..f1b797b6e21 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor3XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py new file mode 100644 index 00000000000..29f652d1862 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor4XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py new file mode 100644 index 00000000000..012d45c5b79 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.OUTPUT_BASE_TYPES + headers: schemas.Unset + + +class ResponseFor5XX(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py new file mode 100644 index 00000000000..3d5eb99c3ed --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py new file mode 100644 index 00000000000..7251b5d50b8 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.foo import Foo + +path = "/foo" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py new file mode 100644 index 00000000000..827f212e40c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py @@ -0,0 +1,94 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_default + + +default_response = response_default.Default + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _foo_get( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_default.ApiResponse: ... + + @typing.overload + def _foo_get( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _foo_get( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "paths//foo/get/servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class FooGet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + foo_get = BaseApi._foo_get + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._foo_get diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py new file mode 100644 index 00000000000..08ea7ee51a4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py @@ -0,0 +1,31 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: application_json_schema.SchemaDict + headers: schemas.Unset + + +class Default(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py new file mode 100644 index 00000000000..d14d6424f11 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -0,0 +1,107 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +from openapi_client.components.schema import foo +Properties = typing.TypedDict( + 'Properties', + { + "string": typing.Type[foo.Foo], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "string", + }) + + def __new__( + cls, + *, + string: typing.Union[ + foo.FooDictInput, + foo.FooDict, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("string", string), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def string(self) -> typing.Union[foo.FooDict, schemas.Unset]: + val = self.get("string", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + foo.FooDict, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py new file mode 100644 index 00000000000..c6566a153aa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "https://path-server-test.petstore.local/v2" diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py new file mode 100644 index 00000000000..66ca05135b9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py @@ -0,0 +1,180 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +class VersionEnums: + + @schemas.classproperty + def V1(cls) -> typing.Literal["v1"]: + return Version.validate("v1") + + @schemas.classproperty + def V2(cls) -> typing.Literal["v2"]: + return Version.validate("v2") + + +@dataclasses.dataclass(frozen=True) +class Version( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["v1"] = "v1" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "v1": "V1", + "v2": "V2", + } + ) + enums = VersionEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v1"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v2"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v2"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1","v2",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "v1", + "v2", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "v1", + "v2", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "version": typing.Type[Version], + } +) + + +class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "version", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + version: typing.Literal[ + "v1", + "v2" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "version": version, + } + used_arg_ = typing.cast(VariablesDictInput, arg_) + return Variables.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + VariablesDictInput, + VariablesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return Variables.validate(arg, configuration=configuration) + + @property + def version(self) -> typing.Literal["v1", "v2"]: + return self.__getitem__("version") +VariablesDictInput = typing.TypedDict( + 'VariablesDictInput', + { + "version": typing.Literal[ + "v1", + "v2" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class Variables( + schemas.Schema[VariablesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "version", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: VariablesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + VariablesDictInput, + VariablesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass +class Server1(server.ServerWithVariables): + variables: VariablesDict = dataclasses.field( + default_factory=lambda: Variables.validate({ + "version": Version.default, + }) + ) + variables_schema: typing.Type[Variables] = Variables + _url: str = "https://petstore.swagger.io/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py new file mode 100644 index 00000000000..e5de8990bb7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.pet import Pet + +path = "/pet" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py new file mode 100644 index 00000000000..520cbec342f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py @@ -0,0 +1,219 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pet + +from .. import path +from .responses import ( + response_200, + response_405, +) +from . import request_body +from .security import ( + security_requirement_object_0, + security_requirement_object_1, + security_requirement_object_2, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, + security_requirement_object_2.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '405': typing.Type[response_405.ResponseFor405], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '405': response_405.ResponseFor405, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '405', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _add_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _add_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _add_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/xml"], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _add_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/xml"], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _add_pet( + self, + body: typing.Union[ + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal[ + "application/json", + "application/xml", + ] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Add a new pet to the store + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/post/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '405', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class AddPet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + add_pet = BaseApi._add_pet + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._add_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py new file mode 100644 index 00000000000..52220997dba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_pet +RequestBody = request_body_pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py new file mode 100644 index 00000000000..5e341f81217 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py new file mode 100644 index 00000000000..9afd8ea15a6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_signature_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py new file mode 100644 index 00000000000..6010c5c7879 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py @@ -0,0 +1,210 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pet + +from .. import path +from .responses import ( + response_400, + response_404, + response_405, +) +from . import request_body +from .security import ( + security_requirement_object_0, + security_requirement_object_1, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + '405': typing.Type[response_405.ResponseFor405], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, + '405': response_405.ResponseFor405, +} +_error_status_codes = frozenset({ + '400', + '404', + '405', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _update_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/xml"], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet( + self, + body: typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/xml"], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _update_pet( + self, + body: typing.Union[ + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + typing.Union[ + pet.PetDictInput, + pet.PetDict, + ], + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal[ + "application/json", + "application/xml", + ] = "application/json", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Update an existing pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/put/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='put', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + '405', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UpdatePet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + update_pet = BaseApi._update_pet + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._update_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py new file mode 100644 index 00000000000..52220997dba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_pet +RequestBody = request_body_pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py new file mode 100644 index 00000000000..5e341f81217 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py new file mode 100644 index 00000000000..9afd8ea15a6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_signature_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py new file mode 100644 index 00000000000..b340004d90c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.pet_find_by_status import PetFindByStatus + +path = "/pet/findByStatus" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py new file mode 100644 index 00000000000..ed30321fbc9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py @@ -0,0 +1,187 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, +) +from .parameters import parameter_0 +from .security import ( + security_requirement_object_0, + security_requirement_object_1, + security_requirement_object_2, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, + security_requirement_object_2.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_status( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _find_pets_by_status( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _find_pets_by_status( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Finds Pets by status + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "paths//pet/findByStatus/servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/findByStatus/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class FindPetsByStatus(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + find_pets_by_status = BaseApi._find_pets_by_status + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._find_pets_by_status diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..7f02a842cef --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "status" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..6110790eb7e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -0,0 +1,153 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +class ItemsEnums: + + @schemas.classproperty + def AVAILABLE(cls) -> typing.Literal["available"]: + return Items.validate("available") + + @schemas.classproperty + def PENDING(cls) -> typing.Literal["pending"]: + return Items.validate("pending") + + @schemas.classproperty + def SOLD(cls) -> typing.Literal["sold"]: + return Items.validate("sold") + + +@dataclasses.dataclass(frozen=True) +class Items( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["available"] = "available" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "available": "AVAILABLE", + "pending": "PENDING", + "sold": "SOLD", + } + ) + enums = ItemsEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["available"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["available"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["pending"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["pending"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["sold"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["sold"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["available","pending","sold",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "available", + "pending", + "sold", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "available", + "pending", + "sold", + ], + validated_arg + ) + + +class SchemaTuple( + typing.Tuple[ + typing.Literal["available", "pending", "sold"], + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + typing.Literal[ + "available", + "pending", + "sold" + ], + ], + typing.Tuple[ + typing.Literal[ + "available", + "pending", + "sold" + ], + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py new file mode 100644 index 00000000000..63ecd32e0d2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_find_by_status.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "status": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schema.SchemaTuple]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "status", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + status: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "status": status, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def status(self) -> schema.SchemaTuple: + return self.__getitem__("status") +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "status": typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "status", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..ba2d7a3d526 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_successful_xml_and_json_array_of_pet +ResponseFor200 = response_successful_xml_and_json_array_of_pet.SuccessfulXmlAndJsonArrayOfPet +ApiResponse = response_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py new file mode 100644 index 00000000000..9afd8ea15a6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_signature_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py new file mode 100644 index 00000000000..c6566a153aa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server0(server.ServerWithoutVariables): + url: str = "https://path-server-test.petstore.local/v2" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py new file mode 100644 index 00000000000..66ca05135b9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py @@ -0,0 +1,180 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +class VersionEnums: + + @schemas.classproperty + def V1(cls) -> typing.Literal["v1"]: + return Version.validate("v1") + + @schemas.classproperty + def V2(cls) -> typing.Literal["v2"]: + return Version.validate("v2") + + +@dataclasses.dataclass(frozen=True) +class Version( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["v1"] = "v1" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "v1": "V1", + "v2": "V2", + } + ) + enums = VersionEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v1"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v2"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v2"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1","v2",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "v1", + "v2", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "v1", + "v2", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "version": typing.Type[Version], + } +) + + +class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "version", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + version: typing.Literal[ + "v1", + "v2" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "version": version, + } + used_arg_ = typing.cast(VariablesDictInput, arg_) + return Variables.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + VariablesDictInput, + VariablesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return Variables.validate(arg, configuration=configuration) + + @property + def version(self) -> typing.Literal["v1", "v2"]: + return self.__getitem__("version") +VariablesDictInput = typing.TypedDict( + 'VariablesDictInput', + { + "version": typing.Literal[ + "v1", + "v2" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class Variables( + schemas.Schema[VariablesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "version", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: VariablesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + VariablesDictInput, + VariablesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass +class Server1(server.ServerWithVariables): + variables: VariablesDict = dataclasses.field( + default_factory=lambda: Variables.validate({ + "version": Version.default, + }) + ) + variables_schema: typing.Type[Variables] = Variables + _url: str = "https://petstore.swagger.io/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py new file mode 100644 index 00000000000..d4ab183cc4b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.pet_find_by_tags import PetFindByTags + +path = "/pet/findByTags" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py new file mode 100644 index 00000000000..81d1ce2a76d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py @@ -0,0 +1,175 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, +) +from .parameters import parameter_0 +from .security import ( + security_requirement_object_0, + security_requirement_object_1, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_pets_by_tags( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _find_pets_by_tags( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _find_pets_by_tags( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Finds Pets by tags + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/findByTags/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class FindPetsByTags(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + find_pets_by_tags = BaseApi._find_pets_by_tags + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._find_pets_by_tags diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..b4188fc1042 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "tags" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..66c900f298b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -0,0 +1,63 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Items: typing_extensions.TypeAlias = schemas.StrSchema + + +class SchemaTuple( + typing.Tuple[ + str, + ... + ] +): + + def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): + return Schema.validate(arg, configuration=configuration) +SchemaTupleInput = typing.Union[ + typing.List[ + str, + ], + typing.Tuple[ + str, + ... + ] +] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[schemas.immutabledict, SchemaTuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + tuple: SchemaTuple + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaTupleInput, + SchemaTuple, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaTuple: + return super().validate_base( + arg, + configuration=configuration, + ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py new file mode 100644 index 00000000000..d1b70043f84 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py @@ -0,0 +1,103 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_find_by_tags.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "tags": typing.Type[schema.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schema.SchemaTuple]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "tags", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + tags: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "tags": tags, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def tags(self) -> schema.SchemaTuple: + return self.__getitem__("tags") +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "tags": typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "tags", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..d4ebce99525 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_ref_successful_xml_and_json_array_of_pet +ResponseFor200 = response_ref_successful_xml_and_json_array_of_pet.RefSuccessfulXmlAndJsonArrayOfPet +ApiResponse = response_ref_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..9afd8ea15a6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "http_signature_test": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py new file mode 100644 index 00000000000..34d43d091bc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.pet_pet_id import PetPetId + +path = "/pet/{petId}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py new file mode 100644 index 00000000000..441b8c75b13 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py @@ -0,0 +1,105 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_pet_id.delete.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "api_key": typing.Type[schema.Schema], + } +) + + +class HeaderParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "api_key", + }) + + def __new__( + cls, + *, + api_key: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("api_key", api_key), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeaderParametersDictInput, arg_) + return HeaderParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return HeaderParameters.validate(arg, configuration=configuration) + + @property + def api_key(self) -> typing.Union[str, schemas.Unset]: + val = self.get("api_key", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val +HeaderParametersDictInput = typing.TypedDict( + 'HeaderParametersDictInput', + { + "api_key": str, + }, + total=False +) + + +@dataclasses.dataclass(frozen=True) +class HeaderParameters( + schemas.Schema[HeaderParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeaderParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeaderParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py new file mode 100644 index 00000000000..ded25f1c460 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py @@ -0,0 +1,189 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_400 +from .parameters import ( + parameter_0, + parameter_1, +) +from .security import ( + security_requirement_object_0, + security_requirement_object_1, +) +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict +header_parameter_classes = ( + parameter_0.Parameter0, +) +path_parameter_classes = ( + parameter_1.Parameter1, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '400': typing.Type[response_400.ResponseFor400], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '400': response_400.ResponseFor400, +} +_error_status_codes = frozenset({ + '400', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_pet( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[False] = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_pet( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: typing.Literal[True], + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _delete_pet( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + header_params: typing.Union[ + HeaderParametersDictInput, + HeaderParametersDict, + None + ] = None, + *, + skip_deserialization: bool = False, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Deletes a pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + if header_params is not None: + header_params = HeaderParameters.validate( + header_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers( + header_parameters=header_parameter_classes, + header_params=header_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/{petId}/delete/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='delete', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class DeletePet(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + delete_pet = BaseApi._delete_pet + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._delete_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..5f79a5e5fa6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,18 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.HeaderParameter): + name = "api_key" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..487a9f61b1c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.PathParameter): + name = "petId" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py new file mode 100644 index 00000000000..3fd1346af72 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_pet_id.delete.parameters.parameter_1 import schema +Properties = typing.TypedDict( + 'Properties', + { + "petId": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + petId: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "petId": petId, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def petId(self) -> int: + return self.__getitem__("petId") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "petId": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "petId", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py new file mode 100644 index 00000000000..e57d8d4bff2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py @@ -0,0 +1,185 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, + response_404, +) +from .parameters import parameter_0 +from .security import security_requirement_object_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', + '404', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_pet_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _get_pet_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _get_pet_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Find pet by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/{petId}/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GetPetById(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + get_pet_by_id = BaseApi._get_pet_by_id + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._get_pet_by_id diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..18d9059d05f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "petId" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py new file mode 100644 index 00000000000..19aa79641ab --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_pet_id.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "petId": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + petId: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "petId": petId, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def petId(self) -> int: + return self.__getitem__("petId") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "petId": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "petId", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..b5e5fb46352 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + application_xml_schema.pet.PetDict, + application_json_schema.ref_pet.pet.PetDict, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..926c64496e4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import ref_pet +Schema: typing_extensions.TypeAlias = ref_pet.RefPet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py new file mode 100644 index 00000000000..0259ab108b6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import pet +Schema: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py new file mode 100644 index 00000000000..ef47cc2b309 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py @@ -0,0 +1,187 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.pet_pet_id.post.request_body.content.application_x_www_form_urlencoded import schema + +from .. import path +from .responses import response_405 +from . import request_body +from .parameters import parameter_0 +from .security import ( + security_requirement_object_0, + security_requirement_object_1, +) +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, + security_requirement_object_1.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '405': typing.Type[response_405.ResponseFor405], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '405': response_405.ResponseFor405, +} +_error_status_codes = frozenset({ + '405', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_pet_with_form( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_pet_with_form( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _update_pet_with_form( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Updates a pet in the store with form data + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/{petId}/post/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '405', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UpdatePetWithForm(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + update_pet_with_form = BaseApi._update_pet_with_form + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._update_pet_with_form diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..18d9059d05f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "petId" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py new file mode 100644 index 00000000000..9ea4fc9d889 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_pet_id.post.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "petId": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + petId: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "petId": petId, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def petId(self) -> int: + return self.__getitem__("petId") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "petId": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "petId", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py new file mode 100644 index 00000000000..04c6511e057 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema + content = { + 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py new file mode 100644 index 00000000000..5b00655e45b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -0,0 +1,123 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Name: typing_extensions.TypeAlias = schemas.StrSchema +Status: typing_extensions.TypeAlias = schemas.StrSchema +Properties = typing.TypedDict( + 'Properties', + { + "name": typing.Type[Name], + "status": typing.Type[Status], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "name", + "status", + }) + + def __new__( + cls, + *, + name: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + status: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("name", name), + ("status", status), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def name(self) -> typing.Union[str, schemas.Unset]: + val = self.get("name", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def status(self) -> typing.Union[str, schemas.Unset]: + val = self.get("status", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py new file mode 100644 index 00000000000..5e341f81217 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py new file mode 100644 index 00000000000..8ae329f0324 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.pet_pet_id_upload_image import PetPetIdUploadImage + +path = "/pet/{petId}/uploadImage" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py new file mode 100644 index 00000000000..373fd0298e4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py @@ -0,0 +1,186 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.paths.pet_pet_id_upload_image.post.request_body.content.multipart_form_data import schema + +from .. import path +from .responses import response_200 +from . import request_body +from .parameters import parameter_0 +from .security import security_requirement_object_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _upload_image( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _upload_image( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _upload_image( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + body: typing.Union[ + schema.SchemaDictInput, + schema.SchemaDict, + schemas.Unset + ] = schemas.unset, + *, + skip_deserialization: bool = False, + content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + uploads an image + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//pet/{petId}/uploadImage/post/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UploadImage(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + upload_image = BaseApi._upload_image + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._upload_image diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..18d9059d05f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "petId" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..17a29526207 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py new file mode 100644 index 00000000000..45dffab9e4f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.pet_pet_id_upload_image.post.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "petId": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "petId", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + petId: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "petId": petId, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def petId(self) -> int: + return self.__getitem__("petId") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "petId": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "petId", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py new file mode 100644 index 00000000000..fa0a08ad486 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.multipart_form_data import schema as multipart_form_data_schema + + +class RequestBody(api_client.RequestBody): + + + class MultipartFormDataMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema + content = { + 'multipart/form-data': MultipartFormDataMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py new file mode 100644 index 00000000000..7fb449f5fc9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -0,0 +1,126 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema +File: typing_extensions.TypeAlias = schemas.BinarySchema +Properties = typing.TypedDict( + 'Properties', + { + "additionalMetadata": typing.Type[AdditionalMetadata], + "file": typing.Type[File], + } +) + + +class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "additionalMetadata", + "file", + }) + + def __new__( + cls, + *, + additionalMetadata: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + file: typing.Union[ + bytes, + io.FileIO, + io.BufferedReader, + schemas.FileIO, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("additionalMetadata", additionalMetadata), + ("file", file), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(SchemaDictInput, arg_) + return Schema.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + SchemaDictInput, + SchemaDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return Schema.validate(arg, configuration=configuration) + + @property + def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: + val = self.get("additionalMetadata", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + @property + def file(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: + val = self.get("file", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[bytes, schemas.FileIO], + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Schema[SchemaDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: SchemaDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + SchemaDictInput, + SchemaDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> SchemaDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..eb192348132 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_with_json_api_response +ResponseFor200 = response_success_with_json_api_response.SuccessWithJsonApiResponse +ApiResponse = response_success_with_json_api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py new file mode 100644 index 00000000000..6af76077f7b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "petstore_auth": ("write:pets", "read:pets", ), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py new file mode 100644 index 00000000000..9e8e8e030e1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.solidus import Solidus + +path = "/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py new file mode 100644 index 00000000000..213c4a75ad9 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py @@ -0,0 +1,108 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _slash_route( + self, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _slash_route( + self, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _slash_route( + self, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + slash route + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class SlashRoute(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + slash_route = BaseApi._slash_route + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._slash_route diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py new file mode 100644 index 00000000000..4cba3f3a269 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.store_inventory import StoreInventory + +path = "/store/inventory" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py new file mode 100644 index 00000000000..9bd7fe0dced --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py @@ -0,0 +1,131 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, security_schemes +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_200 +from .security import security_requirement_object_0 + +_security: typing.List[security_schemes.SecurityRequirementObject] = [ + security_requirement_object_0.security_requirement_object, +] + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, +} +_non_error_status_codes = frozenset({ + '200', +}) + +_all_accept_content_types = ( + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_inventory( + self, + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _get_inventory( + self, + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _get_inventory( + self, + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + security_index: typing.Optional[int] = None, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Returns pet inventories by status + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + security_requirement_object = self.api_client.configuration.get_security_requirement_object( + "paths//store/inventory/get/security", + _security, + security_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + security_requirement_object=security_requirement_object, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GetInventory(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + get_inventory = BaseApi._get_inventory + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._get_inventory diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..21f06235a37 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_inline_content_and_header +ResponseFor200 = response_success_inline_content_and_header.SuccessInlineContentAndHeader +ApiResponse = response_success_inline_content_and_header.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py new file mode 100644 index 00000000000..dddc4276ed1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py @@ -0,0 +1,14 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import security_schemes + +security_requirement_object: security_schemes.SecurityRequirementObject = { + "api_key": (), +} diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py new file mode 100644 index 00000000000..07b8e84f685 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.store_order import StoreOrder + +path = "/store/order" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py new file mode 100644 index 00000000000..1d550b8e2a6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py @@ -0,0 +1,166 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order + +from .. import path +from .responses import ( + response_200, + response_400, +) +from . import request_body + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _place_order( + self, + body: typing.Union[ + order.OrderDictInput, + order.OrderDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _place_order( + self, + body: typing.Union[ + order.OrderDictInput, + order.OrderDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _place_order( + self, + body: typing.Union[ + order.OrderDictInput, + order.OrderDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Place an order for a pet + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class PlaceOrder(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + place_order = BaseApi._place_order + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._place_order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..e1500eb3c2c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order +Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py new file mode 100644 index 00000000000..4c3ac2eaab3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + application_xml_schema.order.OrderDict, + application_json_schema.order.OrderDict, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e1500eb3c2c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order +Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py new file mode 100644 index 00000000000..e1500eb3c2c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order +Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py new file mode 100644 index 00000000000..fccb4ea5eb5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.store_order_order_id import StoreOrderOrderId + +path = "/store/order/{order_id}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py new file mode 100644 index 00000000000..e08d28b3656 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py @@ -0,0 +1,145 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_400, + response_404, +) +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, +} +_error_status_codes = frozenset({ + '400', + '404', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_order( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _delete_order( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _delete_order( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Delete purchase order by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='delete', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class DeleteOrder(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + delete_order = BaseApi._delete_order + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._delete_order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..2a9544ac7b4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "order_id" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py new file mode 100644 index 00000000000..77e3ee024ff --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.store_order_order_id.delete.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "order_id": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "order_id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + order_id: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "order_id": order_id, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def order_id(self) -> str: + return self.__getitem__("order_id") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "order_id": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "order_id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py new file mode 100644 index 00000000000..d50b6aefcc0 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py @@ -0,0 +1,171 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, + response_404, +) +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', + '404', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_order_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _get_order_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _get_order_by_id( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Find purchase order by ID + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GetOrderById(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + get_order_by_id = BaseApi._get_order_by_id + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._get_order_by_id diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..2a9544ac7b4 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py @@ -0,0 +1,19 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.PathParameter): + name = "order_id" + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e3ca2790e60 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py @@ -0,0 +1,24 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + + +@dataclasses.dataclass(frozen=True) +class Schema( + schemas.Int64Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + int, + }) + format: str = 'int64' + inclusive_maximum: typing.Union[int, float] = 5 + inclusive_minimum: typing.Union[int, float] = 1 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py new file mode 100644 index 00000000000..c4dd7ae0849 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.store_order_order_id.get.parameters.parameter_0 import schema +Properties = typing.TypedDict( + 'Properties', + { + "order_id": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, int]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "order_id", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + order_id: int, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "order_id": order_id, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def order_id(self) -> int: + return self.__getitem__("order_id") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "order_id": int, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "order_id", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..4c3ac2eaab3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + application_xml_schema.order.OrderDict, + application_json_schema.order.OrderDict, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e1500eb3c2c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order +Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py new file mode 100644 index 00000000000..e1500eb3c2c --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import order +Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py new file mode 100644 index 00000000000..842d957d392 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user import User + +path = "/user" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py new file mode 100644 index 00000000000..c6722a378a1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py @@ -0,0 +1,114 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user + +from .. import path +from .responses import response_default +from . import request_body + + +default_response = response_default.Default + + +class BaseApi(api_client.Api): + @typing.overload + def _create_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_default.ApiResponse: ... + + @typing.overload + def _create_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _create_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Create user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class CreateUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + create_user = BaseApi._create_user + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._create_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8e004303999 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user +Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py new file mode 100644 index 00000000000..b2dbf46535b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class Default(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py new file mode 100644 index 00000000000..3d135485dba --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user_create_with_array import UserCreateWithArray + +path = "/user/createWithArray" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py new file mode 100644 index 00000000000..d2696db9842 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py @@ -0,0 +1,114 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.request_bodies.request_body_user_array.content.application_json import schema + +from .. import path +from .responses import response_default +from . import request_body + + +default_response = response_default.Default + + +class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_array_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_default.ApiResponse: ... + + @typing.overload + def _create_users_with_array_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _create_users_with_array_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Creates list of users with given input array + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class CreateUsersWithArrayInput(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + create_users_with_array_input = BaseApi._create_users_with_array_input + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._create_users_with_array_input diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py new file mode 100644 index 00000000000..62cc92a3c1b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_user_array +RequestBody = request_body_user_array.UserArray diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py new file mode 100644 index 00000000000..b2dbf46535b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class Default(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py new file mode 100644 index 00000000000..f7e6691eff1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user_create_with_list import UserCreateWithList + +path = "/user/createWithList" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py new file mode 100644 index 00000000000..fff0348e73b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py @@ -0,0 +1,114 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.request_bodies.request_body_user_array.content.application_json import schema + +from .. import path +from .responses import response_default +from . import request_body + + +default_response = response_default.Default + + +class BaseApi(api_client.Api): + @typing.overload + def _create_users_with_list_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_default.ApiResponse: ... + + @typing.overload + def _create_users_with_list_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _create_users_with_list_input( + self, + body: typing.Union[ + schema.SchemaTupleInput, + schema.SchemaTuple + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Creates list of users with given input array + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='post', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class CreateUsersWithListInput(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + create_users_with_list_input = BaseApi._create_users_with_list_input + + +class ApiForPost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + post = BaseApi._create_users_with_list_input diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py new file mode 100644 index 00000000000..d67b26e375e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.request_bodies import request_body_ref_user_array +RequestBody = request_body_ref_user_array.RefUserArray diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py new file mode 100644 index 00000000000..b2dbf46535b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class Default(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py new file mode 100644 index 00000000000..ae1e0c2ced6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user_login import UserLogin + +path = "/user/login" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py new file mode 100644 index 00000000000..82fe9dbedb5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py @@ -0,0 +1,171 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, +) +from .parameters import ( + parameter_0, + parameter_1, +) +from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict +query_parameter_classes = ( + parameter_0.Parameter0, + parameter_1.Parameter1, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _login_user( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _login_user( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _login_user( + self, + query_params: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Logs user into the system + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + query_params = QueryParameters.validate( + query_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + query_parameters=query_parameter_classes, + query_params=query_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + query_params_suffix=query_params_suffix, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class LoginUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + login_user = BaseApi._login_user + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._login_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..bda172d39cd --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter0(api_client.QueryParameter): + name = "username" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py new file mode 100644 index 00000000000..448e308cffc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py @@ -0,0 +1,20 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class Parameter1(api_client.QueryParameter): + name = "password" + style = api_client.ParameterStyle.FORM + schema: typing_extensions.TypeAlias = schema.Schema + required = True + explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py new file mode 100644 index 00000000000..c4898ed4da6 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py @@ -0,0 +1,114 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.paths.user_login.get.parameters.parameter_0 import schema as schema_2 +from openapi_client.paths.user_login.get.parameters.parameter_1 import schema +Properties = typing.TypedDict( + 'Properties', + { + "password": typing.Type[schema.Schema], + "username": typing.Type[schema_2.Schema], + } +) + + +class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "password", + "username", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + password: str, + username: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "password": password, + "username": username, + } + used_arg_ = typing.cast(QueryParametersDictInput, arg_) + return QueryParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return QueryParameters.validate(arg, configuration=configuration) + + @property + def password(self) -> str: + return typing.cast( + str, + self.__getitem__("password") + ) + + @property + def username(self) -> str: + return typing.cast( + str, + self.__getitem__("username") + ) +QueryParametersDictInput = typing.TypedDict( + 'QueryParametersDictInput', + { + "password": str, + "username": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class QueryParameters( + schemas.Schema[QueryParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "password", + "username", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: QueryParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + QueryParametersDictInput, + QueryParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> QueryParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..5e09aa41725 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py @@ -0,0 +1,55 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema +from .headers import header_x_rate_limit +from .headers import header_int32 +from .headers import header_x_expires_after +from .headers import header_ref_content_schema_header +from .headers import header_number_header +from . import header_parameters +parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { + 'X-Rate-Limit': header_x_rate_limit.XRateLimit, + 'int32': header_int32.Int32, + 'X-Expires-After': header_x_expires_after.XExpiresAfter, + 'ref-content-schema-header': header_ref_content_schema_header.RefContentSchemaHeader, + 'numberHeader': header_number_header.NumberHeader, +} + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + str, + str, + ] + headers: header_parameters.HeadersDict + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } + headers=parameters + headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py new file mode 100644 index 00000000000..e97bc729143 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py new file mode 100644 index 00000000000..2b410ee3cb5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py @@ -0,0 +1,151 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.headers.header_int32_json_content_type_header.content.application_json import schema as schema_2 +from openapi_client.components.headers.header_number_header import schema as schema_4 +from openapi_client.components.schema import string_with_validation +from openapi_client.paths.user_login.get.responses.response_200.headers.header_x_expires_after import schema as schema_3 +from openapi_client.paths.user_login.get.responses.response_200.headers.header_x_rate_limit.content.application_json import schema +Properties = typing.TypedDict( + 'Properties', + { + "X-Rate-Limit": typing.Type[schema.Schema], + "int32": typing.Type[schema_2.Schema], + "X-Expires-After": typing.Type[schema_3.Schema], + "ref-content-schema-header": typing.Type[string_with_validation.StringWithValidation], + "numberHeader": typing.Type[schema_4.Schema], + } +) +HeadersRequiredDictInput = typing.TypedDict( + 'HeadersRequiredDictInput', + { + "X-Rate-Limit": int, + "int32": int, + "ref-content-schema-header": str, + } +) +HeadersOptionalDictInput = typing.TypedDict( + 'HeadersOptionalDictInput', + { + "X-Expires-After": typing.Union[ + str, + datetime.datetime + ], + "numberHeader": str, + }, + total=False +) + + +class HeadersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "X-Rate-Limit", + "int32", + "ref-content-schema-header", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "X-Expires-After", + "numberHeader", + }) + + def __new__( + cls, + *, + int32: int, + numberHeader: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "int32": int32, + } + for key_, val in ( + ("numberHeader", numberHeader), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + used_arg_ = typing.cast(HeadersDictInput, arg_) + return Headers.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + HeadersDictInput, + HeadersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return Headers.validate(arg, configuration=configuration) + + @property + def int32(self) -> int: + return typing.cast( + int, + self.__getitem__("int32") + ) + + @property + def numberHeader(self) -> typing.Union[str, schemas.Unset]: + val = self.get("numberHeader", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + + +class HeadersDictInput(HeadersRequiredDictInput, HeadersOptionalDictInput): + pass + + +@dataclasses.dataclass(frozen=True) +class Headers( + schemas.Schema[HeadersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "X-Rate-Limit", + "int32", + "ref-content-schema-header", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: HeadersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + HeadersDictInput, + HeadersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> HeadersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py new file mode 100644 index 00000000000..661b9f2d216 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_int32_json_content_type_header +Int32 = header_int32_json_content_type_header.Int32JsonContentTypeHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py new file mode 100644 index 00000000000..2fb16e7186a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_number_header +NumberHeader = header_number_header.NumberHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py new file mode 100644 index 00000000000..9d425ecc610 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.headers import header_ref_content_schema_header +RefContentSchemaHeader = header_ref_content_schema_header.RefContentSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py new file mode 100644 index 00000000000..f25ccf8739b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from . import schema + + +class XExpiresAfter(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py new file mode 100644 index 00000000000..9bcc0240bd7 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.DateTimeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py new file mode 100644 index 00000000000..65e1c326dc5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from .content.application_json import schema as application_json_schema + + +class XRateLimit(api_client.HeaderParameterWithoutName): + style = api_client.ParameterStyle.SIMPLE + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py new file mode 100644 index 00000000000..6e99ff53420 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Schema: typing_extensions.TypeAlias = schemas.Int32Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py new file mode 100644 index 00000000000..f6b0212b14b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user_logout import UserLogout + +path = "/user/logout" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py new file mode 100644 index 00000000000..c0fe56e62cc --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py @@ -0,0 +1,86 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import response_default + + +default_response = response_default.Default + + +class BaseApi(api_client.Api): + @typing.overload + def _logout_user( + self, + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_default.ApiResponse: ... + + @typing.overload + def _logout_user( + self, + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _logout_user( + self, + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Logs out current logged in user session + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + used_path = path + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + response = default_response.deserialize(raw_response, self.api_client.schema_configuration) + self._verify_response_status(response) + return response + + +class LogoutUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + logout_user = BaseApi._logout_user + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._logout_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py new file mode 100644 index 00000000000..4d63fa47365 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_ref_success_description_only +Default = response_ref_success_description_only.RefSuccessDescriptionOnly +ApiResponse = response_ref_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py new file mode 100644 index 00000000000..062efcf21ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py @@ -0,0 +1,5 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from openapi_client.apis.paths.user_username import UserUsername + +path = "/user/{username}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py new file mode 100644 index 00000000000..ef732e30475 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py @@ -0,0 +1,156 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_404, +) +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '404', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _delete_user( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _delete_user( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _delete_user( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Delete user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='delete', + host=host, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class DeleteUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + delete_user = BaseApi._delete_user + + +class ApiForDelete(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + delete = BaseApi._delete_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..9ce0ebd2c4d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.parameters import parameter_ref_path_user_name +Parameter0 = parameter_ref_path_user_name.RefPathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py new file mode 100644 index 00000000000..7e269d7352f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.parameters.parameter_path_user_name import schema +Properties = typing.TypedDict( + 'Properties', + { + "username": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "username", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + username: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "username": username, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def username(self) -> str: + return self.__getitem__("username") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "username": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "username", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py new file mode 100644 index 00000000000..89e5686c48a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.responses import response_success_description_only +ResponseFor200 = response_success_description_only.SuccessDescriptionOnly +ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py new file mode 100644 index 00000000000..6d4e3b40daa --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py @@ -0,0 +1,171 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .. import path +from .responses import ( + response_200, + response_400, + response_404, +) +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '200': typing.Type[response_200.ResponseFor200], + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '200': response_200.ResponseFor200, + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, +} +_non_error_status_codes = frozenset({ + '200', +}) +_error_status_codes = frozenset({ + '400', + '404', +}) + +_all_accept_content_types = ( + "application/xml", + "application/json", +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_user_by_name( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> response_200.ApiResponse: ... + + @typing.overload + def _get_user_by_name( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _get_user_by_name( + self, + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Get user by user name + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers(accept_content_types=accept_content_types) + # TODO add cookie handling + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='get', + host=host, + headers=headers, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _non_error_status_codes: + status_code = typing.cast( + typing.Literal[ + '200', + ], + status + ) + return _status_code_to_response[status_code].deserialize( + raw_response, self.api_client.schema_configuration) + elif status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class GetUserByName(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + get_user_by_name = BaseApi._get_user_by_name + + +class ApiForGet(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + get = BaseApi._get_user_by_name diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..1a399d1caf5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.parameters import parameter_path_user_name +Parameter0 = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py new file mode 100644 index 00000000000..7e269d7352f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.parameters.parameter_path_user_name import schema +Properties = typing.TypedDict( + 'Properties', + { + "username": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "username", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + username: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "username": username, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def username(self) -> str: + return self.__getitem__("username") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "username": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "username", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py new file mode 100644 index 00000000000..583d8d372c1 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py @@ -0,0 +1,40 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_xml import schema as application_xml_schema +from .content.application_json import schema as application_json_schema + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: typing.Union[ + application_xml_schema.user.UserDict, + application_json_schema.user.UserDict, + ] + headers: schemas.Unset + + +class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) + + + class ApplicationXmlMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_xml_schema.Schema + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/xml': ApplicationXmlMediaType, + 'application/json': ApplicationJsonMediaType, + } diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py new file mode 100644 index 00000000000..8e004303999 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user +Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py new file mode 100644 index 00000000000..8e004303999 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user +Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py new file mode 100644 index 00000000000..11c1bcdc752 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py @@ -0,0 +1,173 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client import api_client, exceptions +from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user + +from .. import path +from .responses import ( + response_400, + response_404, +) +from . import request_body +from .parameters import parameter_0 +from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict +path_parameter_classes = ( + parameter_0.Parameter0, +) + + +__StatusCodeToResponse = typing.TypedDict( + '__StatusCodeToResponse', + { + '400': typing.Type[response_400.ResponseFor400], + '404': typing.Type[response_404.ResponseFor404], + } +) +_status_code_to_response: __StatusCodeToResponse = { + '400': response_400.ResponseFor400, + '404': response_404.ResponseFor404, +} +_error_status_codes = frozenset({ + '400', + '404', +}) + + +class BaseApi(api_client.Api): + @typing.overload + def _update_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[False] = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + @typing.overload + def _update_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: typing.Literal[True], + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> api_response.ApiResponseWithoutDeserialization: ... + + def _update_user( + self, + body: typing.Union[ + user.UserDictInput, + user.UserDict, + ], + path_params: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + *, + skip_deserialization: bool = False, + content_type: typing.Literal["application/json"] = "application/json", + server_index: typing.Optional[int] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ): + """ + Updated user + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + path_params = PathParameters.validate( + path_params, + configuration=self.api_client.schema_configuration + ) + used_path, query_params_suffix = self._get_used_path( + path, + path_parameters=path_parameter_classes, + path_params=path_params, + skip_validation=True + ) + headers = self._get_headers() + # TODO add cookie handling + + fields, serialized_body = self._get_fields_and_body( + request_body=request_body.RequestBody, + body=body, + content_type=content_type, + headers=headers + ) + host = self.api_client.configuration.get_server_url( + "servers", server_index + ) + + raw_response = self.api_client.call_api( + resource_path=used_path, + method='put', + host=host, + headers=headers, + fields=fields, + body=serialized_body, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(skip_deser_response) + return skip_deser_response + + status = str(raw_response.status) + if status in _error_status_codes: + error_status_code = typing.cast( + typing.Literal[ + '400', + '404', + ], + status + ) + error_response = _status_code_to_response[error_status_code].deserialize( + raw_response, self.api_client.schema_configuration) + raise exceptions.ApiException( + status=error_response.response.status, + reason=error_response.response.reason, + api_response=error_response + ) + + response = api_response.ApiResponseWithoutDeserialization(response=raw_response) + self._verify_response_status(response) + return response + + +class UpdateUser(BaseApi): + # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names + update_user = BaseApi._update_user + + +class ApiForPut(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + put = BaseApi._update_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py new file mode 100644 index 00000000000..1a399d1caf5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py @@ -0,0 +1,12 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.components.parameters import parameter_path_user_name +Parameter0 = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py new file mode 100644 index 00000000000..7e269d7352f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py @@ -0,0 +1,97 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + +from openapi_client.components.parameters.parameter_path_user_name import schema +Properties = typing.TypedDict( + 'Properties', + { + "username": typing.Type[schema.Schema], + } +) + + +class PathParametersDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "username", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + username: str, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "username": username, + } + used_arg_ = typing.cast(PathParametersDictInput, arg_) + return PathParameters.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return PathParameters.validate(arg, configuration=configuration) + + @property + def username(self) -> str: + return self.__getitem__("username") +PathParametersDictInput = typing.TypedDict( + 'PathParametersDictInput', + { + "username": str, + } +) + + +@dataclasses.dataclass(frozen=True) +class PathParameters( + schemas.Schema[PathParametersDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "username", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: PathParametersDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + PathParametersDictInput, + PathParametersDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> PathParametersDict: + return super().validate_base( + arg, + configuration=configuration, + ) + diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py new file mode 100644 index 00000000000..89e5cda511a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py @@ -0,0 +1,23 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from .content.application_json import schema as application_json_schema + + +class RequestBody(api_client.RequestBody): + + + class ApplicationJsonMediaType(api_client.MediaType): + schema: typing_extensions.TypeAlias = application_json_schema.Schema + content = { + 'application/json': ApplicationJsonMediaType, + } + required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py new file mode 100644 index 00000000000..8e004303999 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py @@ -0,0 +1,13 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + + +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.components.schema import user +Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py new file mode 100644 index 00000000000..f4edd8046ca --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py new file mode 100644 index 00000000000..13bb18c2137 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py @@ -0,0 +1,22 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass(frozen=True) +class ApiResponse(api_response.ApiResponse): + body: schemas.Unset + headers: schemas.Unset + + +class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): + @classmethod + def get_response(cls, response, headers, body) -> ApiResponse: + return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/py.typed b/samples/client/petstore/python/src/openapi_client/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/rest.py b/samples/client/petstore/python/src/openapi_client/rest.py new file mode 100644 index 00000000000..50f1b297c4d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/rest.py @@ -0,0 +1,270 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import logging +import ssl +from urllib.parse import urlencode +import typing + +import certifi # type: ignore[import] +import urllib3 +from urllib3 import fields +from urllib3 import exceptions as urllib3_exceptions +from urllib3._collections import HTTPHeaderDict + +from petstore_api import exceptions + + +logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request( + self, + method: str, + url: str, + headers: typing.Optional[HTTPHeaderDict] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, + body: typing.Optional[typing.Union[str, bytes]] = None, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + ) -> urllib3.HTTPResponse: + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request body, for other types + :param fields: request parameters for + `application/x-www-form-urlencoded` + or `multipart/form-data` + :param stream: if True, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is False. + :param timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if fields and body: + raise exceptions.ApiValueError( + "body parameter cannot be used with fields parameter." + ) + + headers = headers or HTTPHeaderDict() + + used_timeout: typing.Optional[urllib3.Timeout] = None + if timeout: + if isinstance(timeout, (int, float)): + used_timeout = urllib3.Timeout(total=timeout) + elif (isinstance(timeout, tuple) and + len(timeout) == 2): + used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: + if 'Content-Type' not in headers and body is None: + r = self.pool_manager.request( + method, + url, + preload_content=not stream, + timeout=used_timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + body=body, + encode_multipart=False, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=fields, + encode_multipart=True, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise exceptions.ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=used_timeout, + headers=headers) + except urllib3_exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise exceptions.ApiException(status=0, reason=msg) + + if not stream: + # log response body + logger.debug("response body: %s", r.data) + + return r + + def get(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def head(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def options(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def delete(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def post(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def put(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def patch(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/samples/client/petstore/python/src/openapi_client/schemas/__init__.py b/samples/client/petstore/python/src/openapi_client/schemas/__init__.py new file mode 100644 index 00000000000..dee640c72f5 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/__init__.py @@ -0,0 +1,148 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import typing + +import typing_extensions + +from .schema import ( + get_class, + none_type_, + classproperty, + Bool, + FileIO, + Schema, + SingletonMeta, + AnyTypeSchema, + UnsetAnyTypeSchema, + INPUT_TYPES_ALL +) + +from .schemas import ( + ListSchema, + NoneSchema, + NumberSchema, + IntSchema, + Int32Schema, + Int64Schema, + Float32Schema, + Float64Schema, + StrSchema, + UUIDSchema, + DateSchema, + DateTimeSchema, + DecimalSchema, + BytesSchema, + FileSchema, + BinarySchema, + BoolSchema, + NotAnyTypeSchema, + OUTPUT_BASE_TYPES, + DictSchema +) +from .validation import ( + PatternInfo, + ValidationMetadata, + immutabledict +) +from .format import ( + as_date, + as_datetime, + as_decimal, + as_uuid +) + +def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore + res = {} + for key, val in t_dict.__annotations__.items(): + if isinstance(val, typing._GenericAlias): # type: ignore + # typing.Type[W] -> W + val_cls = typing.get_args(val)[0] + res[key] = val_cls + return res + +X = typing.TypeVar('X', bound=typing.Tuple) + +def tuple_to_instance(tup: typing.Type[X]) -> X: + res = [] + for arg in typing.get_args(tup): + if isinstance(arg, typing._GenericAlias): # type: ignore + # typing.Type[Schema] -> Schema + arg_cls = typing.get_args(arg)[0] + res.append(arg_cls) + return tuple(res) # type: ignore + + +class Unset: + """ + An instance of this class is set as the default value for object type(dict) properties that are optional + When a property has an unset value, that property will not be assigned in the dict + """ + pass + +unset: Unset = Unset() + +def key_unknown_error_msg(key: str) -> str: + return (f"Invalid key. The key {key} is not a known key in this payload. " + "If this key is an additional property, use get_additional_property_" + ) + +def raise_if_key_known( + key: str, + required_keys: typing.FrozenSet[str], + optional_keys: typing.FrozenSet[str] +): + if key in required_keys or key in optional_keys: + raise ValueError(f"The key {key} is a known property, use get_property to access its value") + +__all__ = [ + 'get_class', + 'none_type_', + 'classproperty', + 'Bool', + 'FileIO', + 'Schema', + 'SingletonMeta', + 'AnyTypeSchema', + 'UnsetAnyTypeSchema', + 'INPUT_TYPES_ALL', + 'ListSchema', + 'NoneSchema', + 'NumberSchema', + 'IntSchema', + 'Int32Schema', + 'Int64Schema', + 'Float32Schema', + 'Float64Schema', + 'StrSchema', + 'UUIDSchema', + 'DateSchema', + 'DateTimeSchema', + 'DecimalSchema', + 'BytesSchema', + 'FileSchema', + 'BinarySchema', + 'BoolSchema', + 'NotAnyTypeSchema', + 'OUTPUT_BASE_TYPES', + 'DictSchema', + 'PatternInfo', + 'ValidationMetadata', + 'immutabledict', + 'as_date', + 'as_datetime', + 'as_decimal', + 'as_uuid', + 'typed_dict_to_instance', + 'tuple_to_instance', + 'Unset', + 'unset', + 'key_unknown_error_msg', + 'raise_if_key_known' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/format.py b/samples/client/petstore/python/src/openapi_client/schemas/format.py new file mode 100644 index 00000000000..bb614903b82 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/format.py @@ -0,0 +1,115 @@ +import datetime +import decimal +import functools +import typing +import uuid + +from dateutil import parser, tz + + +class CustomIsoparser(parser.isoparser): + def __init__(self, sep: typing.Optional[str] = None): + """ + :param sep: + A single character that separates date and time portions. If + ``None``, the parser will accept any single character. + For strict ISO-8601 adherence, pass ``'T'``. + """ + if sep is not None: + if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): + raise ValueError('Separator must be a single, non-numeric ' + + 'ASCII character') + + used_sep = sep.encode('ascii') + else: + used_sep = None + + self._sep = used_sep + + @staticmethod + def __get_ascii_bytes(str_in: str) -> bytes: + # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII + # ASCII is the same in UTF-8 + try: + return str_in.encode('ascii') + except UnicodeEncodeError as e: + msg = 'ISO-8601 strings should contain only ASCII characters' + raise ValueError(msg) from e + + def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isodate(dt_str_ascii) # type: ignore + values = typing.cast(typing.Tuple[typing.List[int], int], values) + components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) + pos = values[1] + return components, pos + + def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: + dt_str_ascii = self.__get_ascii_bytes(dt_str) + values = self._parse_isotime(dt_str_ascii) # type: ignore + components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore + return components + + def parse_isodatetime(self, dt_str: str) -> datetime.datetime: + date_components, pos = self.__parse_isodate(dt_str) + if len(dt_str) <= pos: + # len(components) <= 3 + raise ValueError('Value is not a datetime') + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) + if hour == 24: + hour = 0 + components = (*date_components, hour, minute, second, microsecond, tzinfo) + return datetime.datetime(*components) + datetime.timedelta(days=1) + else: + components = (*date_components, hour, minute, second, microsecond, tzinfo) + else: + raise ValueError('String contains unknown ISO components') + + return datetime.datetime(*components) + + def parse_isodate_str(self, datestr: str) -> datetime.date: + components, pos = self.__parse_isodate(datestr) + + if len(datestr) > pos: + raise ValueError('String contains invalid time components') + + if len(components) > 3: + raise ValueError('String contains invalid time components') + + return datetime.date(*components) + +DEFAULT_ISOPARSER = CustomIsoparser() + +@functools.lru_cache() +def as_date(arg: str) -> datetime.date: + """ + type = "string" + format = "date" + """ + return DEFAULT_ISOPARSER.parse_isodate_str(arg) + +@functools.lru_cache() +def as_datetime(arg: str) -> datetime.datetime: + """ + type = "string" + format = "date-time" + """ + return DEFAULT_ISOPARSER.parse_isodatetime(arg) + +@functools.lru_cache() +def as_decimal(arg: str) -> decimal.Decimal: + """ + Applicable when storing decimals that are sent over the wire as strings + type = "string" + format = "number" + """ + return decimal.Decimal(arg) + +@functools.lru_cache() +def as_uuid(arg: str) -> uuid.UUID: + """ + type = "string" + format = "uuid" + """ + return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py new file mode 100644 index 00000000000..3897e140a4a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py @@ -0,0 +1,97 @@ +""" +MIT License + +Copyright (c) 2020 Corentin Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +from __future__ import annotations +import typing +import typing_extensions + +_K = typing.TypeVar("_K") +_V = typing.TypeVar("_V", covariant=True) + + +class immutabledict(typing.Mapping[_K, _V]): + """ + An immutable wrapper around dictionaries that implements + the complete :py:class:`collections.Mapping` interface. + It can be used as a drop-in replacement for dictionaries + where immutability is desired. + + Note: custom version of this class made to remove __init__ + """ + + dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict + _dict: typing.Dict[_K, _V] + _hash: typing.Optional[int] + + @classmethod + def fromkeys( + cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None + ) -> "immutabledict[_K, _V]": + return cls(dict.fromkeys(seq, value)) + + def __new__(cls, *args: typing.Any) -> typing_extensions.Self: + inst = super().__new__(cls) + setattr(inst, '_dict', cls.dict_cls(*args)) + setattr(inst, '_hash', None) + return inst + + def __getitem__(self, key: _K) -> _V: + return self._dict[key] + + def __contains__(self, key: object) -> bool: + return key in self._dict + + def __iter__(self) -> typing.Iterator[_K]: + return iter(self._dict) + + def __len__(self) -> int: + return len(self._dict) + + def __repr__(self) -> str: + return "%s(%r)" % (self.__class__.__name__, self._dict) + + def __hash__(self) -> int: + if self._hash is None: + h = 0 + for key, value in self.items(): + h ^= hash((key, value)) + self._hash = h + + return self._hash + + def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(self) + new.update(other) + return self.__class__(new) + + def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: + if not isinstance(other, (dict, self.__class__)): + return NotImplemented + new = dict(other) + new.update(self) + return new + + def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: + raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/petstore/python/src/openapi_client/schemas/schema.py b/samples/client/petstore/python/src/openapi_client/schemas/schema.py new file mode 100644 index 00000000000..fe663116e61 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/schema.py @@ -0,0 +1,729 @@ +from __future__ import annotations +import datetime +import dataclasses +import io +import types +import typing +import uuid + +import functools +import typing_extensions + +from petstore_api import exceptions +from petstore_api.configurations import schema_configuration + +from . import validation + +_T_co = typing.TypeVar("_T_co", covariant=True) + + +class SequenceNotStr(typing.Protocol[_T_co]): + """ + if a Protocol would define the interface of Sequence, this protocol + would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence + methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection + """ + def __contains__(self, value: object, /) -> bool: + raise NotImplementedError + + def __getitem__(self, index, /): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __iter__(self) -> typing.Iterator[_T_co]: + raise NotImplementedError + + def __reversed__(self, /) -> typing.Iterator[_T_co]: + raise NotImplementedError + +none_type_ = type(None) +T = typing.TypeVar('T', bound=typing.Mapping) +U = typing.TypeVar('U', bound=SequenceNotStr) +W = typing.TypeVar('W') + + +class SchemaTyped: + additional_properties: typing.Type[Schema] + all_of: typing.Tuple[typing.Type[Schema], ...] + any_of: typing.Tuple[typing.Type[Schema], ...] + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] + default: typing.Union[str, int, float, bool, None] + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] + exclusive_maximum: typing.Union[int, float] + exclusive_minimum: typing.Union[int, float] + format: str + inclusive_maximum: typing.Union[int, float] + inclusive_minimum: typing.Union[int, float] + items: typing.Type[Schema] + max_items: int + max_length: int + max_properties: int + min_items: int + min_length: int + min_properties: int + multiple_of: typing.Union[int, float] + not_: typing.Type[Schema] + one_of: typing.Tuple[typing.Type[Schema], ...] + pattern: validation.PatternInfo + properties: typing.Mapping[str, typing.Type[Schema]] + required: typing.FrozenSet[str] + types: typing.FrozenSet[typing.Type] + unique_items: bool + + +class FileIO(io.FileIO): + """ + A class for storing files + Note: this class is not immutable + """ + + def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(arg, (io.FileIO, io.BufferedReader)): + if arg.closed: + raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') + arg.close() + inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore + super(FileIO, inst).__init__(arg.name) + return inst + raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') + + def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + """ + Needed for instantiation when passing in arguments of the above type + """ + pass + + +class classproperty(typing.Generic[W]): + def __init__(self, method: typing.Callable[..., W]): + self.__method = method + functools.update_wrapper(self, method) # type: ignore + + def __get__(self, obj, cls=None) -> W: + if cls is None: + cls = type(obj) + return self.__method(cls) + + +class Bool: + _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} + """ + This class is needed to replace bool during validation processing + json schema requires that 0 != False and 1 != True + python implementation defines 0 == False and 1 == True + To meet the json schema requirements, all bool instances are replaced with Bool singletons + during validation only, and then bool values are returned from validation + """ + + def __new__(cls, arg_: bool, **kwargs): + """ + Method that implements singleton + cls base classes: BoolClass, NoneClass, str, decimal.Decimal + The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 + However 1.0 can also be ingested into that enum schema because 1.0 == 1 and + Decimal('1.0') == Decimal('1') + But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') + and json serializing that instance would be '1' rather than the expected '1.0' + Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + """ + key = (cls, arg_) + if key not in cls._instances: + inst = super().__new__(cls) + cls._instances[key] = inst + return cls._instances[key] + + def __repr__(self): + if bool(self): + return f'' + return f'' + + @classproperty + def TRUE(cls): + return cls(True) # type: ignore + + @classproperty + def FALSE(cls): + return cls(False) # type: ignore + + @functools.lru_cache() + def __bool__(self) -> bool: + for key, instance in self._instances.items(): + if self is instance: + return bool(key[1]) + raise ValueError('Unable to find the boolean value of this instance') + + +def cast_to_allowed_types( + arg: typing.Union[ + dict, + validation.immutabledict, + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + ], + from_server: bool, + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] +) -> typing.Union[ + validation.immutabledict, + tuple, + float, + int, + str, + bytes, + Bool, + None, + FileIO +]: + """ + Casts the input payload arg into the allowed types + The input validated_path_to_schemas is mutated by running this function + + When from_server is False then + - date/datetime is cast to str + - int/float is cast to Decimal + + If a Schema instance is passed in it is converted back to a primitive instance because + One may need to validate that data to the original Schema class AND additional different classes + those additional classes will need to be added to the new manufactured class for that payload + If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other + Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas + TODO: store the validated schema classes in validation_metadata + + Args: + arg: the payload + from_server: whether this payload came from the server or not + validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload + """ + type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + if isinstance(arg, str): + path_to_type[path_to_item] = str + return str(arg) + elif isinstance(arg, (dict, validation.immutabledict)): + path_to_type[path_to_item] = validation.immutabledict + return validation.immutabledict( + { + key: cast_to_allowed_types( + val, + from_server, + validated_path_to_schemas, + path_to_item + (key,), + path_to_type, + ) + for key, val in arg.items() + } + ) + elif isinstance(arg, bool): + """ + this check must come before isinstance(arg, (int, float)) + because isinstance(True, int) is True + """ + path_to_type[path_to_item] = Bool + if arg: + return Bool.TRUE + return Bool.FALSE + elif isinstance(arg, int): + path_to_type[path_to_item] = int + return arg + elif isinstance(arg, float): + path_to_type[path_to_item] = float + return arg + elif isinstance(arg, (tuple, list)): + path_to_type[path_to_item] = tuple + return tuple( + [ + cast_to_allowed_types( + item, + from_server, + validated_path_to_schemas, + path_to_item + (i,), + path_to_type, + ) + for i, item in enumerate(arg) + ] + ) + elif arg is None: + path_to_type[path_to_item] = type(None) + return None + elif isinstance(arg, (datetime.date, datetime.datetime)): + path_to_type[path_to_item] = str + if not from_server: + return arg.isoformat() + raise type_error + elif isinstance(arg, uuid.UUID): + path_to_type[path_to_item] = str + if not from_server: + return str(arg) + raise type_error + elif isinstance(arg, bytes): + path_to_type[path_to_item] = bytes + return bytes(arg) + elif isinstance(arg, (io.FileIO, io.BufferedReader)): + path_to_type[path_to_item] = FileIO + return FileIO(arg) + raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + + +class SingletonMeta(type): + """ + A singleton class for schemas + Schemas are frozen classes that are never instantiated with init args + All args come from defaults + """ + _instances: typing.Dict[type, typing.Any] = {} + + def __call__(cls, *args, **kwargs): + if cls not in cls._instances: + cls._instances[cls] = super().__call__(*args, **kwargs) + return cls._instances[cls] + + +class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): + + @classmethod + def __get_path_to_schemas( + cls, + arg, + validation_metadata: validation.ValidationMetadata, + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: + """ + Run all validations in the json schema and return a dict of + json schema to tuple of validated schemas + """ + _path_to_schemas: validation.PathToSchemasType = {} + if validation_metadata.validation_ran_earlier(cls): + validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: + other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) + validation.update(_path_to_schemas, other_path_to_schemas) + # loop through it make a new class for each entry + # do not modify the returned result because it is cached and we would be modifying the cached value + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} + for path, schema_classes in _path_to_schemas.items(): + schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) + path_to_schemas[path] = schema + """ + For locations that validation did not check + the code still needs to store type + schema information for instantiation + All of those schemas will be UnsetAnyTypeSchema + """ + missing_paths = path_to_type.keys() - path_to_schemas.keys() + for missing_path in missing_paths: + path_to_schemas[missing_path] = UnsetAnyTypeSchema + + return path_to_schemas + + @staticmethod + def __get_items( + arg: tuple, + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + ''' + Schema __get_items + ''' + cast_items = [] + + for i, value in enumerate(arg): + item_path_to_item = path_to_item + (i,) + item_cls = path_to_schemas[item_path_to_item] + new_value = item_cls._get_new_instance_without_conversion( + value, + item_path_to_item, + path_to_schemas + ) + cast_items.append(new_value) + + return tuple(cast_items) + + @staticmethod + def __get_properties( + arg: validation.immutabledict[str, typing.Any], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + """ + Schema __get_properties, this is how properties are set + These values already passed validation + """ + dict_items = {} + + for property_name_js, value in arg.items(): + property_path_to_item = path_to_item + (property_name_js,) + property_cls = path_to_schemas[property_path_to_item] + new_value = property_cls._get_new_instance_without_conversion( + value, + property_path_to_item, + path_to_schemas + ) + dict_items[property_name_js] = new_value + + return validation.immutabledict(dict_items) + + @classmethod + def _get_new_instance_without_conversion( + cls, + arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], + path_to_item: typing.Tuple[typing.Union[str, int], ...], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] + ): + # We have a Dynamic class and we are making an instance of it + if isinstance(arg, validation.immutabledict): + used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) + elif isinstance(arg, tuple): + used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) + elif isinstance(arg, Bool): + return bool(arg) + else: + """ + str, int, float, FileIO, bytes + FileIO = openapi binary type and the user inputs a file + bytes = openapi binary type and the user inputs bytes + """ + return arg + arg_type = type(arg) + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is None: + return used_arg + if arg_type not in type_to_output_cls: + return used_arg + output_cls = type_to_output_cls[arg_type] + if arg_type is tuple: + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(U, inst) + return inst + assert issubclass(output_cls, validation.immutabledict) + inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore + inst = typing.cast(T, inst) + return inst + + @typing.overload + @classmethod + def validate_base( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate_base( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate_base( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + """ + Schema validate_base + + Args: + arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value + configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords + like minItems, minLength etc + """ + if isinstance(arg, (tuple, validation.immutabledict)): + type_to_output_cls = cls.__get_type_to_output_cls() + if type_to_output_cls is not None: + for output_cls in type_to_output_cls.values(): + if isinstance(arg, output_cls): + # U + T use case, don't run validations twice + return arg + + from_server = False + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] + ] = {} + path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} + cast_arg = cast_to_allowed_types( + arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) + validation_metadata = validation.ValidationMetadata( + path_to_item=('args[0]',), + configuration=configuration or schema_configuration.SchemaConfiguration(), + validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) + ) + path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) + return cls._get_new_instance_without_conversion( + cast_arg, + validation_metadata.path_to_item, + path_to_schemas, + ) + + @classmethod + def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: + type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) + type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) + return type_to_output_cls + + +def get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[Schema]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + return item_cls._evaluate(None, local_namespace) + raise ValueError('invalid class value passed in') + + +@dataclasses.dataclass(frozen=True) +class AnyTypeSchema(Schema[T, U]): + # Python representation of a schema defined as true or {} + + @typing.overload + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: SequenceNotStr[INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: U, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Mapping[str, INPUT_TYPES_ALL], + T + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> T: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> FileIO: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return cls.validate_base( + arg, + configuration=configuration + ) + +class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): + # Used when additionalProperties/items was not explicitly defined and a defining schema is needed + pass + +INPUT_TYPES_ALL = typing.Union[ + dict, + validation.immutabledict, + typing.Mapping[str, object], # for TypedDict + list, + tuple, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + FileIO +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/schemas.py b/samples/client/petstore/python/src/openapi_client/schemas/schemas.py new file mode 100644 index 00000000000..21b01c63ede --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/schemas.py @@ -0,0 +1,375 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import datetime +import dataclasses +import io +import typing +import uuid + +import typing_extensions + +from petstore_api.configurations import schema_configuration + +from . import schema, validation + + +@dataclasses.dataclass(frozen=True) +class ListSchema(schema.Schema[validation.immutabledict, tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({tuple}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.List[schema.INPUT_TYPES_ALL], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Union[ + typing.Tuple[schema.INPUT_TYPES_ALL, ...], + schema.U + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.U: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NoneSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) + + @classmethod + def validate( + cls, + arg: None, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> None: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NumberSchema(schema.Schema): + """ + This is used for type: number with no format + Both integers AND floats are accepted + """ + types: typing.FrozenSet[typing.Type] = frozenset({float, int}) + + @typing.overload + @classmethod + def validate( + cls, + arg: int, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> int: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: float, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> float: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class IntSchema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int' + + +@dataclasses.dataclass(frozen=True) +class Int32Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int32' + + +@dataclasses.dataclass(frozen=True) +class Int64Schema(IntSchema): + types: typing.FrozenSet[typing.Type] = frozenset({int, float}) + format: str = 'int64' + + +@dataclasses.dataclass(frozen=True) +class Float32Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'float' + + +@dataclasses.dataclass(frozen=True) +class Float64Schema(NumberSchema): + types: typing.FrozenSet[typing.Type] = frozenset({float}) + format: str = 'double' + + +@dataclasses.dataclass(frozen=True) +class StrSchema(schema.Schema): + """ + date + datetime string types must inherit from this class + That is because one can validate a str payload as both: + - type: string (format unset) + - type: string, format: date + """ + types: typing.FrozenSet[typing.Type] = frozenset({str}) + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class UUIDSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'uuid' + + @classmethod + def validate( + cls, + arg: typing.Union[str, uuid.UUID], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.date], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DateTimeSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'date-time' + + @classmethod + def validate( + cls, + arg: typing.Union[str, datetime.datetime], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class DecimalSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({str}) + format: str = 'number' + + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> str: + """ + Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads + which can be simple (str) or complex (dicts or lists with nested values) + Because casting is only done once and recursively casts all values prior to validation then for a potential + client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know + if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema + where it should stay as Decimal. + """ + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class BytesSchema(schema.Schema): + """ + this class will subclass bytes and is immutable + """ + types: typing.FrozenSet[typing.Type] = frozenset({bytes}) + + @classmethod + def validate( + cls, + arg: bytes, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bytes: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class FileSchema(schema.Schema): + """ + This class is NOT immutable + Dynamic classes are built using it for example when AnyType allows in binary data + Al other schema classes ARE immutable + If one wanted to make this immutable one could make this a DictSchema with required properties: + - data = BytesSchema (which would be an immutable bytes based schema) + - file_name = StrSchema + and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name + The downside would be that data would be stored in memory which one may not want to do for very large files + + The developer is responsible for closing this file and deleting it + + This class was kept as mutable: + - to allow file reading and writing to disk + - to be able to preserve file name info + """ + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.FileIO: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BinarySchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) + format: str = 'binary' + + one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( + BytesSchema, + FileSchema, + ) + + @classmethod + def validate( + cls, + arg: typing.Union[io.FileIO, io.BufferedReader, bytes], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Union[schema.FileIO, bytes]: + return cls.validate_base(arg) + + +@dataclasses.dataclass(frozen=True) +class BoolSchema(schema.Schema): + types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[True], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[True]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal[False], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[False]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: bool, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> bool: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ): + return super().validate_base(arg, configuration=configuration) + + +@dataclasses.dataclass(frozen=True) +class NotAnyTypeSchema(schema.AnyTypeSchema): + """ + Python representation of a schema defined as false or {'not': {}} + Does not allow inputs in of AnyType + Note: validations on this class are never run because the code knows that no inputs will ever validate + """ + not_: typing.Type[schema.Schema] = schema.AnyTypeSchema + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + return super().validate_base(arg, configuration=configuration) + +OUTPUT_BASE_TYPES = typing.Union[ + validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], + str, + int, + float, + bool, + schema.none_type_, + typing.Tuple['OUTPUT_BASE_TYPES', ...], + bytes, + schema.FileIO +] + + +@dataclasses.dataclass(frozen=True) +class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): + types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) + + @typing.overload + @classmethod + def validate( + cls, + arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... + + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: + return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/petstore/python/src/openapi_client/schemas/validation.py b/samples/client/petstore/python/src/openapi_client/schemas/validation.py new file mode 100644 index 00000000000..c7dc596bb2d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/schemas/validation.py @@ -0,0 +1,1446 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import collections +import dataclasses +import decimal +import re +import sys +import types +import typing +import uuid + +import typing_extensions + +from petstore_api import exceptions +from petstore_api.configurations import schema_configuration + +from . import format, original_immutabledict + +immutabledict = original_immutabledict.immutabledict + + +@dataclasses.dataclass +class ValidationMetadata: + """ + A class storing metadata that is needed to validate OpenApi Schema payloads + """ + path_to_item: typing.Tuple[typing.Union[str, int], ...] + configuration: schema_configuration.SchemaConfiguration + validated_path_to_schemas: typing.Mapping[ + typing.Tuple[typing.Union[str, int], ...], + typing.Mapping[type, None] + ] = dataclasses.field(default_factory=dict) + seen_classes: typing.FrozenSet[type] = frozenset() + + def validation_ran_earlier(self, cls: type) -> bool: + validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) + if validated_schemas and cls in validated_schemas: + return True + if cls in self.seen_classes: + return True + return False + +def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + raise exceptions.ApiValueError( + "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( + value=value, + constraint_msg=constraint_msg, + constraint_value=constraint_value, + additional_txt=additional_txt, + path_to_item=path_to_item, + ) + ) + + +class SchemaValidator: + __excluded_cls_properties = { + '__module__', + '__dict__', + '__weakref__', + '__doc__', + '__annotations__', + 'default', # excluded because it has no impact on validation + 'type_to_output_cls', # used to pluck the output class for instantiation + } + + @classmethod + def _validate( + cls, + arg, + validation_metadata: ValidationMetadata, + ) -> PathToSchemasType: + """ + SchemaValidator validate + All keyword validation except for type checking was done in calling stack frames + If those validations passed, the validated classes are collected in path_to_schemas + """ + cls_schema = cls() + json_schema_data = { + k: v + for k, v in vars(cls_schema).items() + if k not in cls.__excluded_cls_properties + and k + not in validation_metadata.configuration.disabled_json_schema_python_keywords + } + contains_path_to_schemas = [] + path_to_schemas: PathToSchemasType = {} + if 'contains' in vars(cls_schema): + contains_path_to_schemas = _get_contains_path_to_schemas( + arg, + vars(cls_schema)['contains'], + validation_metadata, + path_to_schemas + ) + if_path_to_schemas = None + if 'if_' in vars(cls_schema): + if_path_to_schemas = _get_if_path_to_schemas( + arg, + vars(cls_schema)['if_'], + validation_metadata, + ) + validated_pattern_properties: typing.Optional[PathToSchemasType] = None + if 'pattern_properties' in vars(cls_schema): + validated_pattern_properties = _get_validated_pattern_properties( + arg, + vars(cls_schema)['pattern_properties'], + cls, + validation_metadata + ) + prefix_items_length = 0 + if 'prefix_items' in vars(cls_schema): + prefix_items_length = len(vars(cls_schema)['prefix_items']) + for keyword, val in json_schema_data.items(): + used_val: typing.Any + if keyword in {'contains', 'min_contains', 'max_contains'}: + used_val = (val, contains_path_to_schemas) + elif keyword == 'items': + used_val = (val, prefix_items_length) + elif keyword in {'unevaluated_items', 'unevaluated_properties'}: + used_val = (val, path_to_schemas) + elif keyword in {'types'}: + format: typing.Optional[str] = vars(cls_schema).get('format', None) + used_val = (val, format) + elif keyword in {'pattern_properties', 'additional_properties'}: + used_val = (val, validated_pattern_properties) + elif keyword in {'if_', 'then', 'else_'}: + used_val = (val, if_path_to_schemas) + else: + used_val = val + validator = json_schema_keyword_to_validator[keyword] + + other_path_to_schemas = validator( + arg, + used_val, + cls, + validation_metadata, + ) + if other_path_to_schemas: + update(path_to_schemas, other_path_to_schemas) + + base_class = type(arg) + if validation_metadata.path_to_item not in path_to_schemas: + path_to_schemas[validation_metadata.path_to_item] = dict() + path_to_schemas[validation_metadata.path_to_item][base_class] = None + path_to_schemas[validation_metadata.path_to_item][cls] = None + return path_to_schemas + +PathToSchemasType = typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Dict[ + typing.Union[ + typing.Type[SchemaValidator], + typing.Type[str], + typing.Type[int], + typing.Type[float], + typing.Type[bool], + typing.Type[None], + typing.Type[immutabledict], + typing.Type[tuple] + ], + None + ] +] + +def _get_class( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], + local_namespace: typing.Optional[dict] = None +) -> typing.Type[SchemaValidator]: + if isinstance(item_cls, typing._GenericAlias): # type: ignore + # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema + origin_cls = typing.get_origin(item_cls) + if origin_cls is None: + raise ValueError('origin class must not be None') + return origin_cls + elif isinstance(item_cls, types.FunctionType): + # referenced schema + return item_cls() + elif isinstance(item_cls, staticmethod): + # referenced schema + return item_cls.__func__() + elif isinstance(item_cls, type): + return item_cls + elif isinstance(item_cls, typing.ForwardRef): + if sys.version_info < (3, 9): + return item_cls._evaluate(None, local_namespace) + return item_cls._evaluate(None, local_namespace, set()) + raise ValueError('invalid class value passed in') + + +def update(d: dict, u: dict): + """ + Adds u to d + Where each dict is collections.defaultdict(dict) + """ + if not u: + return d + for k, v in u.items(): + if k not in d: + d[k] = v + else: + d[k].update(v) + + +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + +def __get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed""" + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return "is {0}".format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def __type_error_message( + var_value=None, var_name=None, valid_classes=None, key_type=None +): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a tuple + """ + key_or_value = "value" + if key_type: + key_or_value = "key" + valid_classes_phrase = __get_valid_classes_phrase(valid_classes) + msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + return msg + + +def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = __type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type, + ) + return exceptions.ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type, + ) + + +@dataclasses.dataclass(frozen=True) +class PatternInfo: + pattern: str + flags: typing.Optional[re.RegexFlag] = None + + +def validate_types( + arg: typing.Any, + allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + allowed_types = allowed_types_format[0] + if type(arg) not in allowed_types: + raise __get_type_error( + arg, + validation_metadata.path_to_item, + allowed_types, + key_type=False, + ) + if isinstance(arg, bool) or not isinstance(arg, (int, float)): + return None + format = allowed_types_format[1] + if format and format == 'int' and arg != int(arg): + # there is a json schema test where 1.0 validates as an integer + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + return None + + +def validate_enum( + arg: typing.Any, + enum_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in enum_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) + return None + + +def validate_unique_items( + arg: typing.Any, + unique_items_value: bool, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not unique_items_value or not isinstance(arg, tuple): + return None + if len(arg) == len(set(arg)): + return None + _raise_validation_error_message( + value=arg, + constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item + ) + + +def validate_min_items( + arg: typing.Any, + min_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) < min_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be greater than or equal to", + constraint_value=min_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_items( + arg: typing.Any, + max_items: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, tuple): + return None + if len(arg) > max_items: + _raise_validation_error_message( + value=arg, + constraint_msg="number of items must be less than or equal to", + constraint_value=max_items, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_properties( + arg: typing.Any, + min_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) < min_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be greater than or equal to", + constraint_value=min_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_properties( + arg: typing.Any, + max_properties: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + if len(arg) > max_properties: + _raise_validation_error_message( + value=arg, + constraint_msg="number of properties must be less than or equal to", + constraint_value=max_properties, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_min_length( + arg: typing.Any, + min_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) < min_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be greater than or equal to", + constraint_value=min_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_max_length( + arg: typing.Any, + max_length: int, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + if len(arg) > max_length: + _raise_validation_error_message( + value=arg, + constraint_msg="length must be less than or equal to", + constraint_value=max_length, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_minimum( + arg: typing.Any, + inclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg < inclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than or equal to", + constraint_value=inclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_minimum( + arg: typing.Any, + exclusive_minimum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg <= exclusive_minimum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value greater than", + constraint_value=exclusive_minimum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_inclusive_maximum( + arg: typing.Any, + inclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg > inclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than or equal to", + constraint_value=inclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_exclusive_maximum( + arg: typing.Any, + exclusive_maximum: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if arg >= exclusive_maximum: + _raise_validation_error_message( + value=arg, + constraint_msg="must be a value less than", + constraint_value=exclusive_maximum, + path_to_item=validation_metadata.path_to_item + ) + return None + +def validate_multiple_of( + arg: typing.Any, + multiple_of: typing.Union[int, float], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, (int, float)): + return None + if (not (float(arg) / multiple_of).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + _raise_validation_error_message( + value=arg, + constraint_msg="value must be a multiple of", + constraint_value=multiple_of, + path_to_item=validation_metadata.path_to_item + ) + return None + + +def validate_pattern( + arg: typing.Any, + pattern_info: PatternInfo, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, str): + return None + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, arg, flags=flags): + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item, + additional_txt=" with flags=`{}`".format(flags) + ) + _raise_validation_error_message( + value=arg, + constraint_msg="must match regular expression", + constraint_value=pattern_info.pattern, + path_to_item=validation_metadata.path_to_item + ) + return None + + +__int32_inclusive_minimum = -2147483648 +__int32_inclusive_maximum = 2147483647 +__int64_inclusive_minimum = -9223372036854775808 +__int64_inclusive_maximum = 9223372036854775807 +__float_inclusive_minimum = -3.4028234663852886e+38 +__float_inclusive_maximum = 3.4028234663852886e+38 +__double_inclusive_minimum = -1.7976931348623157E+308 +__double_inclusive_maximum = 1.7976931348623157E+308 + +def __validate_numeric_format( + arg: typing.Union[int, float], + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value[:3] == 'int': + # there is a json schema test where 1.0 validates as an integer + if arg != int(arg): + raise exceptions.ApiValueError( + "Invalid non-integer value '{}' for type {} at {}".format( + arg, format, validation_metadata.path_to_item + ) + ) + if format_value == 'int32': + if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + elif format_value == 'int64': + if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + elif format_value in {'float', 'double'}: + if format_value == 'float': + if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) + ) + return None + # double + if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: + raise exceptions.ApiValueError( + "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) + ) + return None + return None + + +def __validate_string_format( + arg: str, + format_value: str, + validation_metadata: ValidationMetadata +) -> None: + if format_value == 'uuid': + try: + uuid.UUID(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'number': + try: + decimal.Decimal(arg) + return None + except decimal.InvalidOperation: + raise exceptions.ApiValueError( + "Value cannot be converted to a decimal. " + "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date': + try: + format.DEFAULT_ISOPARSER.parse_isodate_str(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 date format. " + "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) + ) + elif format_value == 'date-time': + try: + format.DEFAULT_ISOPARSER.parse_isodatetime(arg) + return None + except ValueError: + raise exceptions.ApiValueError( + "Value does not conform to the required ISO-8601 datetime format. " + "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) + ) + return None + + +def validate_format( + arg: typing.Union[str, int, float], + format_value: str, + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + # formats work for strings + numbers + if isinstance(arg, (int, float)): + return __validate_numeric_format( + arg, + format_value, + validation_metadata + ) + elif isinstance(arg, str): + return __validate_string_format( + arg, + format_value, + validation_metadata + ) + return None + + +def validate_required( + arg: typing.Any, + required: typing.Set[str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + missing_req_args = required - arg.keys() + if missing_req_args: + missing_required_arguments = list(missing_req_args) + missing_required_arguments.sort() + raise exceptions.ApiTypeError( + "{} is missing {} required argument{}: {}".format( + cls.__name__, + len(missing_required_arguments), + "s" if len(missing_required_arguments) > 1 else "", + missing_required_arguments + ) + ) + return None + + +def validate_items( + arg: typing.Any, + item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + item_cls = _get_class(item_cls_prefix_items_length[0]) + prefix_items_length = item_cls_prefix_items_length[1] + path_to_schemas: PathToSchemasType = {} + for i in range(prefix_items_length, len(arg)): + value = arg[i] + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = item_cls._validate( + value, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_properties( + arg: typing.Any, + properties: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + present_properties = {k: v for k, v, in arg.items() if k in properties} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, value in present_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + schema = properties[property_name] + schema = _get_class(schema, module_namespace) + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_additional_properties( + arg: typing.Any, + additional_properties_cls_val_pprops: typing.Tuple[ + typing.Type[SchemaValidator], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + schema = _get_class(additional_properties_cls_val_pprops[0]) + path_to_schemas: PathToSchemasType = {} + cls_schema = cls() + properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} + present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} + validated_pattern_properties = additional_properties_cls_val_pprops[1] + for property_name, value in present_additional_properties.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if validated_pattern_properties and path_to_item in validated_pattern_properties: + continue + arg_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_one_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + oneof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema in path_to_schemas[validation_metadata.path_to_item]: + oneof_classes.append(schema) + continue + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + oneof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + oneof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + try: + path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate oneof_classes + continue + oneof_classes.append(schema) + if not oneof_classes: + raise exceptions.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: + raise exceptions.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 + + +def validate_any_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + anyof_classes = [] + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + module_namespace = vars(sys.modules[cls.__module__]) + for schema in classes: + schema = _get_class(schema, module_namespace) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + anyof_classes.append(schema) + continue + if validation_metadata.validation_ran_earlier(schema): + anyof_classes.append(schema) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + + try: + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: + # silence exceptions because the code needs to accumulate anyof_classes + continue + anyof_classes.append(schema) + update(path_to_schemas, other_path_to_schemas) + if not anyof_classes: + raise exceptions.ApiValueError( + "Invalid inputs given to generate an instance of {}. None " + "of the anyOf schemas matched the input data.".format(cls) + ) + return path_to_schemas + + +def validate_all_of( + arg: typing.Any, + classes: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + path_to_schemas: PathToSchemasType = collections.defaultdict(dict) + for schema in classes: + schema = _get_class(schema) + if schema is cls: + """ + optimistically assume that cls schema will pass validation + do not invoke _validate on it because that is recursive + """ + continue + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_not( + arg: typing.Any, + not_cls: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + not_schema = _get_class(not_cls) + other_path_to_schemas = None + not_exception = exceptions.ApiValueError( + "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( + arg, + cls.__name__, + not_schema.__name__, + ) + ) + if validation_metadata.validation_ran_earlier(not_schema): + raise not_exception + + try: + other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) + except (exceptions.ApiValueError, exceptions.ApiTypeError): + pass + if other_path_to_schemas: + raise not_exception + return None + + +def __ensure_discriminator_value_present( + disc_property_name: str, + validation_metadata: ValidationMetadata, + arg +): + if disc_property_name not in arg: + # The input data does not contain the discriminator property + raise exceptions.ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + ) + + +def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): + """ + Used in schemas with discriminators + """ + cls_schema = cls() + if not hasattr(cls_schema, 'discriminator'): + return None + disc = cls_schema.discriminator + if disc_property_name not in disc: + return None + discriminated_cls = disc[disc_property_name].get(disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if not ( + hasattr(cls_schema, 'all_of') or + hasattr(cls_schema, 'one_of') or + hasattr(cls_schema, 'any_of') + ): + return None + # TODO stop traveling if a cycle is hit + if hasattr(cls_schema, 'all_of'): + for allof_cls in cls_schema.all_of: + discriminated_cls = __get_discriminated_class( + allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'one_of'): + for oneof_cls in cls_schema.one_of: + discriminated_cls = __get_discriminated_class( + oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + if hasattr(cls_schema, 'any_of'): + for anyof_cls in cls_schema.any_of: + discriminated_cls = __get_discriminated_class( + anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + if discriminated_cls is not None: + return discriminated_cls + return None + + +def validate_discriminator( + arg: typing.Any, + discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + disc_prop_name = list(discriminator.keys())[0] + __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) + discriminated_cls = __get_discriminated_class( + cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ) + if discriminated_cls is None: + raise exceptions.ApiValueError( + "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( + cls.__name__, + disc_prop_name, + list(discriminator[disc_prop_name].keys()), + validation_metadata.path_to_item + (disc_prop_name,) + ) + ) + if discriminated_cls is cls: + """ + Optimistically assume that cls will pass validation + If the code invoked _validate on cls it would infinitely recurse + """ + return None + if validation_metadata.validation_ran_earlier(discriminated_cls): + path_to_schemas: PathToSchemasType = {} + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + return path_to_schemas + updated_vm = ValidationMetadata( + path_to_item=validation_metadata.path_to_item, + configuration=validation_metadata.configuration, + seen_classes=validation_metadata.seen_classes | frozenset({cls}), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + return discriminated_cls._validate(arg, validation_metadata=updated_vm) + + +def _get_if_path_to_schemas( + arg: typing.Any, + if_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, +) -> PathToSchemasType: + if_cls = _get_class(if_cls) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = if_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, other_path_to_schemas) + except exceptions.OpenApiException: + pass + return these_path_to_schemas + + +def validate_if( + arg: typing.Any, + if_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = if_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + + if true, then true -> true for whole schema + so validate_then will add if_path_to_schemas data to path_to_schemas + """ + return None + + +def validate_then( + arg: typing.Any, + then_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = then_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + """ + if is false use case + if_path_to_schemas == {} + no need to add any data to path_to_schemas + """ + if not if_path_to_schemas: + return None + then_cls = _get_class(then_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = then_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # then False case + raise ex + + +def validate_else( + arg: typing.Any, + else_cls_if_path_to_schemas: typing.Tuple[ + typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if_path_to_schemas = else_cls_if_path_to_schemas[1] + if if_path_to_schemas is None: + # use case: there is no if + return None + if if_path_to_schemas: + # skip validation if if_path_to_schemas was true + return None + """ + if is false use case + if_path_to_schemas == {} + """ + else_cls = _get_class(else_cls_if_path_to_schemas[0]) + these_path_to_schemas: PathToSchemasType = {} + try: + other_path_to_schemas = else_cls._validate( + arg, validation_metadata=validation_metadata) + update(these_path_to_schemas, if_path_to_schemas) + update(these_path_to_schemas, other_path_to_schemas) + return these_path_to_schemas + except exceptions.OpenApiException as ex: + # else False case + raise ex + + +def _get_contains_path_to_schemas( + arg: typing.Any, + contains_cls: typing.Type[SchemaValidator], + validation_metadata: ValidationMetadata, + path_to_schemas: PathToSchemasType +) -> typing.List[PathToSchemasType]: + if not isinstance(arg, tuple): + return [] + contains_cls = _get_class(contains_cls) + contains_path_to_schemas = [] + for i, value in enumerate(arg): + these_path_to_schemas: PathToSchemasType = {} + item_validation_metadata = ValidationMetadata( + path_to_item=validation_metadata.path_to_item+(i,), + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(contains_cls): + add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) + contains_path_to_schemas.append(these_path_to_schemas) + continue + try: + other_path_to_schemas = contains_cls._validate( + value, validation_metadata=item_validation_metadata) + contains_path_to_schemas.append(other_path_to_schemas) + except exceptions.OpenApiException: + pass + return contains_path_to_schemas + + +def validate_contains( + arg: typing.Any, + contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + many_path_to_schemas = contains_cls_path_to_schemas[1] + if not many_path_to_schemas: + raise exceptions.ApiValueError( + "Validation failed for contains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + these_path_to_schemas: PathToSchemasType = {} + for other_path_to_schema in many_path_to_schemas: + update(these_path_to_schemas, other_path_to_schema) + return these_path_to_schemas + + +def validate_min_contains( + arg: typing.Any, + min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + min_contains = min_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) < min_contains: + raise exceptions.ApiValueError( + "Validation failed for minContains keyword in class={} at path_to_item={}. No " + "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_max_contains( + arg: typing.Any, + max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + max_contains = max_contains_and_contains_path_to_schemas[0] + contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] + if len(contains_path_to_schemas) > max_contains: + raise exceptions.ApiValueError( + "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " + "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) + ) + return None + + +def validate_const( + arg: typing.Any, + const_value_to_name: typing.Dict[typing.Any, str], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if arg not in const_value_to_name: + raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) + return None + + +def validate_dependent_required( + arg: typing.Any, + dependent_required: typing.Mapping[str, typing.Set[str]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + for key, keys_that_must_exist in dependent_required.items(): + if key not in arg: + continue + missing_keys = keys_that_must_exist - arg.keys() + if missing_keys: + raise exceptions.ApiValueError( + f"Validation failed for dependentRequired because these_keys={missing_keys} are " + f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" + ) + return None + + +def validate_dependent_schemas( + arg: typing.Any, + dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for key, schema in dependent_schemas.items(): + if key not in arg: + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_property_names( + arg: typing.Any, + property_names_schema: typing.Type[SchemaValidator], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> None: + if not isinstance(arg, immutabledict): + return None + module_namespace = vars(sys.modules[cls.__module__]) + property_names_schema = _get_class(property_names_schema, module_namespace) + for key in arg.keys(): + path_to_item = validation_metadata.path_to_item + (key,) + key_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + property_names_schema._validate(key, validation_metadata=key_validation_metadata) + return None + + +def _get_validated_pattern_properties( + arg: typing.Any, + pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for property_name, property_value in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + for pattern_info, schema in pattern_properties.items(): + flags = pattern_info.flags if pattern_info.flags is not None else 0 + if not re.search(pattern_info.pattern, property_name, flags=flags): + continue + schema = _get_class(schema, module_namespace) + if validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_pattern_properties( + arg: typing.Any, + pattern_properties_validation_results: typing.Tuple[ + typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], + typing.Optional[PathToSchemasType] + ], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + validation_results = pattern_properties_validation_results[1] + return validation_results + + +def validate_prefix_items( + arg: typing.Any, + prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + for i, val in enumerate(arg): + if i >= len(prefix_items): + break + schema = _get_class(prefix_items[i], module_namespace) + path_to_item = validation_metadata.path_to_item + (i,) + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + if item_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) + continue + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_items( + arg: typing.Any, + unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, tuple): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] + for i, val in enumerate(arg): + path_to_item = validation_metadata.path_to_item + (i,) + if path_to_item in validated_path_to_schemas: + continue + item_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +def validate_unevaluated_properties( + arg: typing.Any, + unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], + cls: typing.Type, + validation_metadata: ValidationMetadata, +) -> typing.Optional[PathToSchemasType]: + if not isinstance(arg, immutabledict): + return None + path_to_schemas: PathToSchemasType = {} + module_namespace = vars(sys.modules[cls.__module__]) + schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) + validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] + for property_name, val in arg.items(): + path_to_item = validation_metadata.path_to_item + (property_name,) + if path_to_item in validated_path_to_schemas: + continue + property_validation_metadata = ValidationMetadata( + path_to_item=path_to_item, + configuration=validation_metadata.configuration, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas + ) + other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) + update(path_to_schemas, other_path_to_schemas) + return path_to_schemas + + +validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] +json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { + 'types': validate_types, + 'enum_value_to_name': validate_enum, + 'unique_items': validate_unique_items, + 'min_items': validate_min_items, + 'max_items': validate_max_items, + 'min_properties': validate_min_properties, + 'max_properties': validate_max_properties, + 'min_length': validate_min_length, + 'max_length': validate_max_length, + 'inclusive_minimum': validate_inclusive_minimum, + 'exclusive_minimum': validate_exclusive_minimum, + 'inclusive_maximum': validate_inclusive_maximum, + 'exclusive_maximum': validate_exclusive_maximum, + 'multiple_of': validate_multiple_of, + 'pattern': validate_pattern, + 'format': validate_format, + 'required': validate_required, + 'items': validate_items, + 'properties': validate_properties, + 'additional_properties': validate_additional_properties, + 'one_of': validate_one_of, + 'any_of': validate_any_of, + 'all_of': validate_all_of, + 'not_': validate_not, + 'discriminator': validate_discriminator, + 'contains': validate_contains, + 'min_contains': validate_min_contains, + 'max_contains': validate_max_contains, + 'const_value_to_name': validate_const, + 'dependent_required': validate_dependent_required, + 'dependent_schemas': validate_dependent_schemas, + 'property_names': validate_property_names, + 'pattern_properties': validate_pattern_properties, + 'prefix_items': validate_prefix_items, + 'unevaluated_items': validate_unevaluated_items, + 'unevaluated_properties': validate_unevaluated_properties, + 'if_': validate_if, + 'then': validate_then, + 'else_': validate_else +} \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/security_schemes.py b/samples/client/petstore/python/src/openapi_client/security_schemes.py new file mode 100644 index 00000000000..1ca5047f3e3 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/security_schemes.py @@ -0,0 +1,257 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import abc +import base64 +import dataclasses +import enum +import typing +import typing_extensions + +from urllib3 import _collections + +from petstore_api import signing + + +class SecuritySchemeType(enum.Enum): + API_KEY = 'apiKey' + HTTP = 'http' + MUTUAL_TLS = 'mutualTLS' + OAUTH_2 = 'oauth2' + OPENID_CONNECT = 'openIdConnect' + + +class ApiKeyInLocation(enum.Enum): + QUERY = 'query' + HEADER = 'header' + COOKIE = 'cookie' + + +class __SecuritySchemeBase(metaclass=abc.ABCMeta): + @abc.abstractmethod + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + pass + + +@dataclasses.dataclass +class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): + api_key: str # this must be set by the developer + name: str = '' + in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY + type: SecuritySchemeType = SecuritySchemeType.API_KEY + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + if self.in_location is ApiKeyInLocation.COOKIE: + headers.add('Cookie', self.api_key) + elif self.in_location is ApiKeyInLocation.HEADER: + headers.add(self.name, self.api_key) + elif self.in_location is ApiKeyInLocation.QUERY: + # todo add query handling + raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") + return + + +class HTTPSchemeType(enum.Enum): + BASIC = 'basic' + BEARER = 'bearer' + DIGEST = 'digest' + SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ + + +@dataclasses.dataclass +class HTTPBasicSecurityScheme(__SecuritySchemeBase): + user_id: str # user name + password: str + scheme: HTTPSchemeType = HTTPSchemeType.BASIC + encoding: str = 'utf-8' + type: SecuritySchemeType = SecuritySchemeType.HTTP + """ + https://www.rfc-editor.org/rfc/rfc7617.html + """ + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + user_pass = f"{self.user_id}:{self.password}" + b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) + headers.add('Authorization', f"Basic {b64_user_pass.decode()}") + + +@dataclasses.dataclass +class HTTPBearerSecurityScheme(__SecuritySchemeBase): + access_token: str + bearer_format: typing.Optional[str] = None + scheme: HTTPSchemeType = HTTPSchemeType.BEARER + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + headers.add('Authorization', f"Bearer {self.access_token}") + + +@dataclasses.dataclass +class HTTPSignatureSecurityScheme(__SecuritySchemeBase): + signing_info: signing.HttpSigningConfiguration + scheme: HTTPSchemeType = HTTPSchemeType.SIGNATURE + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + auth_headers = self.signing_info.get_http_signature_headers( + resource_path, method, headers, body, query_params_suffix) + for key, value in auth_headers.items(): + headers.add(key, value) + + +@dataclasses.dataclass +class HTTPDigestSecurityScheme(__SecuritySchemeBase): + scheme: HTTPSchemeType = HTTPSchemeType.DIGEST + type: SecuritySchemeType = SecuritySchemeType.HTTP + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class MutualTLSSecurityScheme(__SecuritySchemeBase): + type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") + + +@dataclasses.dataclass +class ImplicitOAuthFlow: + authorization_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class TokenUrlOauthFlow: + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class AuthorizationCodeOauthFlow: + authorization_url: str + token_url: str + scopes: typing.Dict[str, str] + refresh_url: typing.Optional[str] = None + + +@dataclasses.dataclass +class OAuthFlows: + implicit: typing.Optional[ImplicitOAuthFlow] = None + password: typing.Optional[TokenUrlOauthFlow] = None + client_credentials: typing.Optional[TokenUrlOauthFlow] = None + authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None + + +class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): + flows: OAuthFlows + type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OAuth2SecurityScheme not yet implemented") + + +class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): + openid_connect_url: str + type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT + + def apply_auth( + self, + headers: _collections.HTTPHeaderDict, + resource_path: str, + method: str, + body: typing.Optional[typing.Union[str, bytes]], + query_params_suffix: typing.Optional[str], + scope_names: typing.Tuple[str, ...] = (), + ) -> None: + raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") + +""" +Key is the Security scheme class +Value is the list of scopes +""" +SecurityRequirementObject = typing.TypedDict( + 'SecurityRequirementObject', + { + 'api_key': typing.Tuple[str, ...], + 'api_key_query': typing.Tuple[str, ...], + 'bearer_test': typing.Tuple[str, ...], + 'http_basic_test': typing.Tuple[str, ...], + 'http_signature_test': typing.Tuple[str, ...], + 'openIdConnect_test': typing.Tuple[str, ...], + 'petstore_auth': typing.Tuple[str, ...], + }, + total=False +) \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/server.py b/samples/client/petstore/python/src/openapi_client/server.py new file mode 100644 index 00000000000..3385eefc92a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/server.py @@ -0,0 +1,34 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +import abc +import dataclasses +import typing + +from petstore_api.schemas import validation, schema + + +@dataclasses.dataclass +class ServerWithoutVariables(abc.ABC): + url: str + + +@dataclasses.dataclass +class ServerWithVariables(abc.ABC): + _url: str + variables: validation.immutabledict[str, str] + variables_schema: typing.Type[schema.Schema] + url: str = dataclasses.field(init=False) + + def __post_init__(self): + url = self._url + assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) + for (key, value) in self.variables.items(): + url = url.replace("{" + key + "}", value) + self.url = url diff --git a/samples/client/petstore/python/src/openapi_client/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/servers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/servers/server_0.py new file mode 100644 index 00000000000..70abd9a4e0f --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/servers/server_0.py @@ -0,0 +1,291 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +class ServerEnums: + + @schemas.classproperty + def PETSTORE(cls) -> typing.Literal["petstore"]: + return Server.validate("petstore") + + @schemas.classproperty + def QA_HYPHEN_MINUS_PETSTORE(cls) -> typing.Literal["qa-petstore"]: + return Server.validate("qa-petstore") + + @schemas.classproperty + def DEV_HYPHEN_MINUS_PETSTORE(cls) -> typing.Literal["dev-petstore"]: + return Server.validate("dev-petstore") + + +@dataclasses.dataclass(frozen=True) +class Server( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["petstore"] = "petstore" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "petstore": "PETSTORE", + "qa-petstore": "QA_HYPHEN_MINUS_PETSTORE", + "dev-petstore": "DEV_HYPHEN_MINUS_PETSTORE", + } + ) + enums = ServerEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["petstore"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["petstore"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["qa-petstore"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["qa-petstore"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["dev-petstore"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["dev-petstore"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["petstore","qa-petstore","dev-petstore",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "petstore", + "qa-petstore", + "dev-petstore", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "petstore", + "qa-petstore", + "dev-petstore", + ], + validated_arg + ) + + +class PortEnums: + + @schemas.classproperty + def POSITIVE_80(cls) -> typing.Literal["80"]: + return Port.validate("80") + + @schemas.classproperty + def POSITIVE_8080(cls) -> typing.Literal["8080"]: + return Port.validate("8080") + + +@dataclasses.dataclass(frozen=True) +class Port( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["80"] = "80" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "80": "POSITIVE_80", + "8080": "POSITIVE_8080", + } + ) + enums = PortEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["80"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["80"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["8080"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["8080"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["80","8080",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "80", + "8080", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "80", + "8080", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "server": typing.Type[Server], + "port": typing.Type[Port], + } +) + + +class VariablesDict(schemas.immutabledict[str, str]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "port", + "server", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + port: typing.Literal[ + "80", + "8080" + ], + server: typing.Literal[ + "petstore", + "qa-petstore", + "dev-petstore" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "port": port, + "server": server, + } + used_arg_ = typing.cast(VariablesDictInput, arg_) + return Variables.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + VariablesDictInput, + VariablesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return Variables.validate(arg, configuration=configuration) + + @property + def port(self) -> typing.Literal["80", "8080"]: + return typing.cast( + typing.Literal["80", "8080"], + self.__getitem__("port") + ) + + @property + def server(self) -> typing.Literal["petstore", "qa-petstore", "dev-petstore"]: + return typing.cast( + typing.Literal["petstore", "qa-petstore", "dev-petstore"], + self.__getitem__("server") + ) +VariablesDictInput = typing.TypedDict( + 'VariablesDictInput', + { + "port": typing.Literal[ + "80", + "8080" + ], + "server": typing.Literal[ + "petstore", + "qa-petstore", + "dev-petstore" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class Variables( + schemas.Schema[VariablesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "port", + "server", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: VariablesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + VariablesDictInput, + VariablesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass +class Server0(server.ServerWithVariables): + ''' + petstore server + ''' + variables: VariablesDict = dataclasses.field( + default_factory=lambda: Variables.validate({ + "server": Server.default, + "port": Port.default, + }) + ) + variables_schema: typing.Type[Variables] = Variables + _url: str = "http://{server}.swagger.io:{port}/v2" diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/servers/server_1.py new file mode 100644 index 00000000000..1dcb7062c58 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/servers/server_1.py @@ -0,0 +1,183 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] +AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema + + +class VersionEnums: + + @schemas.classproperty + def V1(cls) -> typing.Literal["v1"]: + return Version.validate("v1") + + @schemas.classproperty + def V2(cls) -> typing.Literal["v2"]: + return Version.validate("v2") + + +@dataclasses.dataclass(frozen=True) +class Version( + schemas.Schema +): + types: typing.FrozenSet[typing.Type] = frozenset({ + str, + }) + default: typing.Literal["v2"] = "v2" + enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( + default_factory=lambda: { + "v1": "V1", + "v2": "V2", + } + ) + enums = VersionEnums + + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v1"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: typing.Literal["v2"], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v2"]: ... + @typing.overload + @classmethod + def validate( + cls, + arg: str, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal["v1","v2",]: ... + @classmethod + def validate( + cls, + arg, + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> typing.Literal[ + "v1", + "v2", + ]: + validated_arg = super().validate_base( + arg, + configuration=configuration, + ) + return typing.cast(typing.Literal[ + "v1", + "v2", + ], + validated_arg + ) +Properties = typing.TypedDict( + 'Properties', + { + "version": typing.Type[Version], + } +) + + +class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + "version", + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + }) + + def __new__( + cls, + *, + version: typing.Literal[ + "v1", + "v2" + ], + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + ): + arg_: typing.Dict[str, typing.Any] = { + "version": version, + } + used_arg_ = typing.cast(VariablesDictInput, arg_) + return Variables.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + VariablesDictInput, + VariablesDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return Variables.validate(arg, configuration=configuration) + + @property + def version(self) -> typing.Literal["v1", "v2"]: + return self.__getitem__("version") +VariablesDictInput = typing.TypedDict( + 'VariablesDictInput', + { + "version": typing.Literal[ + "v1", + "v2" + ], + } +) + + +@dataclasses.dataclass(frozen=True) +class Variables( + schemas.Schema[VariablesDict, tuple] +): + types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) + required: typing.FrozenSet[str] = frozenset({ + "version", + }) + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: VariablesDict + } + ) + + @classmethod + def validate( + cls, + arg: typing.Union[ + VariablesDictInput, + VariablesDict, + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> VariablesDict: + return super().validate_base( + arg, + configuration=configuration, + ) + + + +@dataclasses.dataclass +class Server1(server.ServerWithVariables): + ''' + The local server + ''' + variables: VariablesDict = dataclasses.field( + default_factory=lambda: Variables.validate({ + "version": Version.default, + }) + ) + variables_schema: typing.Type[Variables] = Variables + _url: str = "https://localhost:8080/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_2.py b/samples/client/petstore/python/src/openapi_client/servers/server_2.py new file mode 100644 index 00000000000..dcc94c54227 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/servers/server_2.py @@ -0,0 +1,17 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + + +@dataclasses.dataclass +class Server2(server.ServerWithoutVariables): + ''' + staging server with no variables + ''' + url: str = "https://localhost:8080" diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py b/samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py new file mode 100644 index 00000000000..b96b4e45ae2 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py @@ -0,0 +1,15 @@ +import decimal +import io +import typing +import typing_extensions + +from petstore_api import api_client, schemas + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'api_client', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py new file mode 100644 index 00000000000..5d69234d96a --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py @@ -0,0 +1,18 @@ +import datetime +import decimal +import io +import typing +import typing_extensions +import uuid + +from petstore_api import schemas, api_response + +__all__ = [ + 'decimal', + 'io', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py new file mode 100644 index 00000000000..cff9047338d --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py @@ -0,0 +1,25 @@ +import dataclasses +import datetime +import decimal +import io +import typing +import uuid + +import typing_extensions +import urllib3 + +from petstore_api import api_client, schemas, api_response + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'typing', + 'uuid', + 'typing_extensions', + 'urllib3', + 'api_client', + 'schemas', + 'api_response' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py new file mode 100644 index 00000000000..90b7a255c0e --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py @@ -0,0 +1,28 @@ +import dataclasses +import datetime +import decimal +import io +import numbers +import re +import typing +import typing_extensions +import uuid + +from petstore_api import schemas +from petstore_api.configurations import schema_configuration + +U = typing.TypeVar('U') + +__all__ = [ + 'dataclasses', + 'datetime', + 'decimal', + 'io', + 'numbers', + 're', + 'typing', + 'typing_extensions', + 'uuid', + 'schemas', + 'schema_configuration' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py new file mode 100644 index 00000000000..2eb5123f05b --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py @@ -0,0 +1,12 @@ +import dataclasses +import typing +import typing_extensions + +from petstore_api import security_schemes + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'security_schemes' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py new file mode 100644 index 00000000000..64c064e1840 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py @@ -0,0 +1,13 @@ +import dataclasses +import typing +import typing_extensions + +from petstore_api import server, schemas + +__all__ = [ + 'dataclasses', + 'typing', + 'typing_extensions', + 'server', + 'schemas' +] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/signing.py b/samples/client/petstore/python/src/openapi_client/signing.py new file mode 100644 index 00000000000..c4cd9630553 --- /dev/null +++ b/samples/client/petstore/python/src/openapi_client/signing.py @@ -0,0 +1,415 @@ +# 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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from base64 import b64encode +from Crypto.IO import PEM, PKCS8 # type: ignore[import] +from Crypto.Hash import SHA256, SHA512 # type: ignore[import] +from Crypto.PublicKey import RSA, ECC # type: ignore[import] +from Crypto.Signature import PKCS1_v1_5, pss, DSS # type: ignore[import] +from email.utils import formatdate +import json +import os +import re +from time import time +import typing +from urllib.parse import urlencode, urlparse + +# The constants below define a subset of HTTP headers that can be included in the +# HTTP signature scheme. Additional headers may be included in the signature. + +# The '(request-target)' header is a calculated field that includes the HTTP verb, +# the URL path and the URL query. +HEADER_REQUEST_TARGET = '(request-target)' +# The time when the HTTP signature was generated. +HEADER_CREATED = '(created)' +# The time when the HTTP signature expires. The API server should reject HTTP requests +# that have expired. +HEADER_EXPIRES = '(expires)' +# The 'Host' header. +HEADER_HOST = 'Host' +# The 'Date' header. +HEADER_DATE = 'Date' +# When the 'Digest' header is included in the HTTP signature, the client automatically +# computes the digest of the HTTP request body, per RFC 3230. +HEADER_DIGEST = 'Digest' +# The 'Authorization' header is automatically generated by the client. It includes +# the list of signed headers and a base64-encoded signature. +HEADER_AUTHORIZATION = 'Authorization' + +# The constants below define the cryptographic schemes for the HTTP signature scheme. +SCHEME_HS2019 = 'hs2019' +SCHEME_RSA_SHA256 = 'rsa-sha256' +SCHEME_RSA_SHA512 = 'rsa-sha512' + +# The constants below define the signature algorithms that can be used for the HTTP +# signature scheme. +ALGORITHM_RSASSA_PSS = 'RSASSA-PSS' +ALGORITHM_RSASSA_PKCS1v15 = 'RSASSA-PKCS1-v1_5' + +ALGORITHM_ECDSA_MODE_FIPS_186_3 = 'fips-186-3' +ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 = 'deterministic-rfc6979' +ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS = { + ALGORITHM_ECDSA_MODE_FIPS_186_3, + ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 +} + +# The cryptographic hash algorithm for the message signature. +HASH_SHA256 = 'sha256' +HASH_SHA512 = 'sha512' + + +class HttpSigningConfiguration(object): + """The configuration parameters for the HTTP signature security scheme. + The HTTP signature security scheme is used to sign HTTP requests with a private key + which is in possession of the API client. + An 'Authorization' header is calculated by creating a hash of select headers, + and optionally the body of the HTTP request, then signing the hash value using + a private key. The 'Authorization' header is added to outbound HTTP requests. + + NOTE: This class is auto generated by OpenAPI JSON Schema Generator + + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + Do not edit the class manually. + + :param key_id: A string value specifying the identifier of the cryptographic key, + when signing HTTP requests. + :param signing_scheme: A string value specifying the signature scheme, when + signing HTTP requests. + Supported value are hs2019, rsa-sha256, rsa-sha512. + Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are + available for server-side applications that only support the older + HTTP signature algorithms. + :param private_key_path: A string value specifying the path of the file containing + a private key. The private key is used to sign HTTP requests. + :param private_key_passphrase: A string value specifying the passphrase to decrypt + the private key. + :param signed_headers: A list of strings. Each value is the name of a HTTP header + that must be included in the HTTP signature calculation. + The two special signature headers '(request-target)' and '(created)' SHOULD be + included in SignedHeaders. + The '(created)' header expresses when the signature was created. + The '(request-target)' header is a concatenation of the lowercased :method, an + ASCII space, and the :path pseudo-headers. + When signed_headers is not specified, the client defaults to a single value, + '(created)', in the list of HTTP headers. + When SignedHeaders contains the 'Digest' value, the client performs the + following operations: + 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. + 2. Set the 'Digest' header in the request body. + 3. Include the 'Digest' header and value in the HTTP signature. + :param signing_algorithm: A string value specifying the signature algorithm, when + signing HTTP requests. + Supported values are: + 1. For RSA keys: RSASSA-PSS, RSASSA-PKCS1-v1_5. + 2. For ECDSA keys: fips-186-3, deterministic-rfc6979. + If None, the signing algorithm is inferred from the private key. + The default signing algorithm for RSA keys is RSASSA-PSS. + The default signing algorithm for ECDSA keys is fips-186-3. + :param hash_algorithm: The hash algorithm for the signature. Supported values are + sha256 and sha512. + If the signing_scheme is rsa-sha256, the hash algorithm must be set + to None or sha256. + If the signing_scheme is rsa-sha512, the hash algorithm must be set + to None or sha512. + :param signature_max_validity: The signature max validity, expressed as + a datetime.timedelta value. It must be a positive value. + """ + def __init__(self, key_id, signing_scheme, private_key_path, + private_key_passphrase=None, + signed_headers=None, + signing_algorithm=None, + hash_algorithm=None, + signature_max_validity=None): + self.key_id = key_id + if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: + raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) + self.signing_scheme = signing_scheme + if not os.path.exists(private_key_path): + raise Exception("Private key file does not exist") + self.private_key_path = private_key_path + self.private_key_passphrase = private_key_passphrase + self.signing_algorithm = signing_algorithm + self.hash_algorithm = hash_algorithm + if signing_scheme == SCHEME_RSA_SHA256: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm != HASH_SHA256: + raise Exception("Hash algorithm must be sha256 when security scheme is %s" % + SCHEME_RSA_SHA256) + elif signing_scheme == SCHEME_RSA_SHA512: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA512 + elif self.hash_algorithm != HASH_SHA512: + raise Exception("Hash algorithm must be sha512 when security scheme is %s" % + SCHEME_RSA_SHA512) + elif signing_scheme == SCHEME_HS2019: + if self.hash_algorithm is None: + self.hash_algorithm = HASH_SHA256 + elif self.hash_algorithm not in {HASH_SHA256, HASH_SHA512}: + raise Exception("Invalid hash algorithm") + if signature_max_validity is not None and signature_max_validity.total_seconds() < 0: + raise Exception("The signature max validity must be a positive value") + self.signature_max_validity = signature_max_validity + # If the user has not provided any signed_headers, the default must be set to '(created)', + # as specified in the 'HTTP signature' standard. + if signed_headers is None or len(signed_headers) == 0: + signed_headers = [HEADER_CREATED] + if self.signature_max_validity is None and HEADER_EXPIRES in signed_headers: + raise Exception( + "Signature max validity must be set when " + "'(expires)' signature parameter is specified") + if len(signed_headers) != len(set(signed_headers)): + raise Exception("Cannot have duplicates in the signed_headers parameter") + if HEADER_AUTHORIZATION in signed_headers: + raise Exception("'Authorization' header cannot be included in signed headers") + self.signed_headers = signed_headers + self.private_key = None + """The private key used to sign HTTP requests. + Initialized when the PEM-encoded private key is loaded from a file. + """ + self.host = None + """The host name, optionally followed by a colon and TCP port number. + """ + self._load_private_key() + + def get_http_signature_headers(self, resource_path, method, headers, body, query_params: typing.Optional[str]): + """Create a cryptographic message signature for the HTTP request and add the signed headers. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A dict of HTTP headers that must be added to the outbound HTTP request. + """ + if method is None: + raise Exception("HTTP method must be set") + if resource_path is None: + raise Exception("Resource path must be set") + + signed_headers_list, request_headers_dict = self._get_signed_header_info( + resource_path, method, headers, body, query_params) + + header_items = [ + "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] + string_to_sign = "\n".join(header_items) + + digest, digest_prefix = self._get_message_digest(string_to_sign.encode()) + b64_signed_msg = self._sign_digest(digest) + + request_headers_dict[HEADER_AUTHORIZATION] = self._get_authorization_header( + signed_headers_list, b64_signed_msg) + + return request_headers_dict + + def get_public_key(self): + """Returns the public key object associated with the private key. + """ + pubkey = None + if isinstance(self.private_key, RSA.RsaKey): + pubkey = self.private_key.publickey() + elif isinstance(self.private_key, ECC.EccKey): + pubkey = self.private_key.public_key() + return pubkey + + def _load_private_key(self): + """Load the private key used to sign HTTP requests. + The private key is used to sign HTTP requests as defined in + https://datatracker.ietf.org/doc/draft-cavage-http-signatures/. + """ + if self.private_key is not None: + return + with open(self.private_key_path, 'r') as f: + pem_data = f.read() + # Verify PEM Pre-Encapsulation Boundary + r = re.compile(r"\s*-----BEGIN (.*)-----\s+") + m = r.match(pem_data) + if not m: + raise ValueError("Not a valid PEM pre boundary") + pem_header = m.group(1) + if pem_header == 'RSA PRIVATE KEY': + self.private_key = RSA.importKey(pem_data, self.private_key_passphrase) + elif pem_header == 'EC PRIVATE KEY': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: + # Key is in PKCS8 format, which is capable of holding many different + # types of private keys, not just EC keys. + (key_binary, pem_header, is_encrypted) = \ + PEM.decode(pem_data, self.private_key_passphrase) + (oid, privkey, params) = \ + PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) + if oid == '1.2.840.10045.2.1': + self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) + else: + raise Exception("Unsupported key: {0}. OID: {1}".format(pem_header, oid)) + else: + raise Exception("Unsupported key: {0}".format(pem_header)) + # Validate the specified signature algorithm is compatible with the private key. + if self.signing_algorithm is not None: + supported_algs = None + if isinstance(self.private_key, RSA.RsaKey): + supported_algs = {ALGORITHM_RSASSA_PSS, ALGORITHM_RSASSA_PKCS1v15} + elif isinstance(self.private_key, ECC.EccKey): + supported_algs = ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS + if supported_algs is not None and self.signing_algorithm not in supported_algs: + raise Exception( + "Signing algorithm {0} is not compatible with private key".format( + self.signing_algorithm)) + + def _get_signed_header_info(self, resource_path, method, headers, body, query_params: typing.Optional[str]): + """Build the HTTP headers (name, value) that need to be included in + the HTTP signature scheme. + + :param resource_path : A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method, e.g. GET, POST. + :param headers: A dict containing the HTTP request headers. + :param body: The object (e.g. a dict) representing the HTTP request body. + :param query_params: A string representing the HTTP request query parameters. + :return: A tuple containing two dict objects: + The first dict contains the HTTP headers that are used to calculate + the HTTP signature. + The second dict contains the HTTP headers that must be added to + the outbound HTTP request. + """ + + if body is None: + body = '' + else: + body = json.dumps(body) + + # Build the '(request-target)' HTTP signature parameter. + target_host = urlparse(self.host).netloc + target_path = urlparse(self.host).path + request_target = method.lower() + " " + target_path + resource_path + if query_params: + request_target += query_params + + # Get UNIX time, e.g. seconds since epoch, not including leap seconds. + now = time() + # Format date per RFC 7231 section-7.1.1.2. An example is: + # Date: Wed, 21 Oct 2015 07:28:00 GMT + cdate = formatdate(timeval=now, localtime=False, usegmt=True) + # The '(created)' value MUST be a Unix timestamp integer value. + # Subsecond precision is not supported. + created = int(now) + if self.signature_max_validity is not None: + expires = now + self.signature_max_validity.total_seconds() + + signed_headers_list = [] + request_headers_dict = {} + for hdr_key in self.signed_headers: + hdr_key = hdr_key.lower() + if hdr_key == HEADER_REQUEST_TARGET: + value = request_target + elif hdr_key == HEADER_CREATED: + value = '{0}'.format(created) + elif hdr_key == HEADER_EXPIRES: + value = '{0}'.format(expires) + elif hdr_key == HEADER_DATE.lower(): + value = cdate + request_headers_dict[HEADER_DATE] = '{0}'.format(cdate) + elif hdr_key == HEADER_DIGEST.lower(): + request_body = body.encode() + body_digest, digest_prefix = self._get_message_digest(request_body) + b64_body_digest = b64encode(body_digest.digest()) + value = digest_prefix + b64_body_digest.decode('ascii') + request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( + digest_prefix, b64_body_digest.decode('ascii')) + elif hdr_key == HEADER_HOST.lower(): + value = target_host + request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) + else: + value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) + if value is None: + raise Exception( + "Cannot sign HTTP request. " + "Request does not contain the '{0}' header".format(hdr_key)) + signed_headers_list.append((hdr_key, value)) + + return signed_headers_list, request_headers_dict + + def _get_message_digest(self, data): + """Calculates and returns a cryptographic digest of a specified HTTP request. + + :param data: The string representation of the date to be hashed with a cryptographic hash. + :return: A tuple of (digest, prefix). + The digest is a hashing object that contains the cryptographic digest of + the HTTP request. + The prefix is a string that identifies the cryptographc hash. It is used + to generate the 'Digest' header as specified in RFC 3230. + """ + if self.hash_algorithm == HASH_SHA512: + digest = SHA512.new() + prefix = 'SHA-512=' + elif self.hash_algorithm == HASH_SHA256: + digest = SHA256.new() + prefix = 'SHA-256=' + else: + raise Exception("Unsupported hash algorithm: {0}".format(self.hash_algorithm)) + digest.update(data) + return digest, prefix + + def _sign_digest(self, digest): + """Signs a message digest with a private key specified in the signing_info. + + :param digest: A hashing object that contains the cryptographic digest of the HTTP request. + :return: A base-64 string representing the cryptographic signature of the input digest. + """ + sig_alg = self.signing_algorithm + if isinstance(self.private_key, RSA.RsaKey): + if sig_alg is None or sig_alg == ALGORITHM_RSASSA_PSS: + # RSASSA-PSS in Section 8.1 of RFC8017. + signature = pss.new(self.private_key).sign(digest) + elif sig_alg == ALGORITHM_RSASSA_PKCS1v15: + # RSASSA-PKCS1-v1_5 in Section 8.2 of RFC8017. + signature = PKCS1_v1_5.new(self.private_key).sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + elif isinstance(self.private_key, ECC.EccKey): + if sig_alg is None: + sig_alg = ALGORITHM_ECDSA_MODE_FIPS_186_3 + if sig_alg in ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS: + # draft-ietf-httpbis-message-signatures-00 does not specify the ECDSA encoding. + # Issue: https://github.com/w3c-ccg/http-signatures/issues/107 + signature = DSS.new(key=self.private_key, mode=sig_alg, + encoding='der').sign(digest) + else: + raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) + else: + raise Exception("Unsupported private key: {0}".format(type(self.private_key))) + return b64encode(signature) + + def _get_authorization_header(self, signed_headers, signed_msg): + """Calculates and returns the value of the 'Authorization' header when signing HTTP requests. + + :param signed_headers : A list of tuples. Each value is the name of a HTTP header that + must be included in the HTTP signature calculation. + :param signed_msg: A base-64 encoded string representation of the signature. + :return: The string value of the 'Authorization' header, representing the signature + of the HTTP request. + """ + created_ts = None + expires_ts = None + for k, v in signed_headers: + if k == HEADER_CREATED: + created_ts = v + elif k == HEADER_EXPIRES: + expires_ts = v + lower_keys = [k.lower() for k, v in signed_headers] + headers_value = " ".join(lower_keys) + + auth_str = "Signature keyId=\"{0}\",algorithm=\"{1}\",".format( + self.key_id, self.signing_scheme) + if created_ts is not None: + auth_str = auth_str + "created={0},".format(created_ts) + if expires_ts is not None: + auth_str = auth_str + "expires={0},".format(expires_ts) + auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( + headers_value, signed_msg.decode('ascii')) + + return auth_str diff --git a/samples/client/petstore/python/test/components/schema/test_return.py b/samples/client/petstore/python/test/components/schema/test_return.py new file mode 100644 index 00000000000..026a31fff55 --- /dev/null +++ b/samples/client/petstore/python/test/components/schema/test_return.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +import unittest + +import openapi_client +from openapi_client.components.schema.return import Return +from openapi_client.configurations import schema_configuration + + +class TestReturn(unittest.TestCase): + """Return unit test stubs""" + configuration = schema_configuration.SchemaConfiguration( + disabled_json_schema_keywords={'format'} + ) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index ef11c119878..5918550f9b3 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -30,13 +30,17 @@ import org.openapijsonschematools.codegen.common.CodegenConstants; import org.openapijsonschematools.codegen.generatorrunner.DefaultGeneratorRunner; import org.openapijsonschematools.codegen.generatorrunner.GeneratorRunner; +import org.openapijsonschematools.codegen.generators.DefaultGenerator; import org.openapijsonschematools.codegen.generators.generatorloader.GeneratorNotFoundException; import org.openapijsonschematools.codegen.config.CodegenConfigurator; import org.openapijsonschematools.codegen.config.CodegenConfiguratorUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @SuppressWarnings({"java:S106"}) @Command(name = "generate", description = "Generate code with the specified generator.") public class Generate extends AbstractCommand { + private final Logger LOGGER = LoggerFactory.getLogger(Generate.class); CodegenConfigurator configurator; GeneratorRunner generatorRunner; @@ -355,10 +359,22 @@ public void execute() { if (!isNotEmpty(packageName) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("packageName"))) { // if packageName is passed as an additional property warn them - System.out.println("packageName should be passed in using --package-name from now on"); + LOGGER.warn("Deprecated command line arg: packageName should be passed in using --package-name from now on"); packageName = (String) configurator.getAdditionalProperties().get("packageName"); configurator.setPackageName(packageName); } + if (!isNotEmpty(artifactId) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("artifactId"))) { + // if packageName is passed as an additional property warn them + LOGGER.warn("Deprecated command line arg: artifactId should be passed in using --artifact-id from now on"); + artifactId = (String) configurator.getAdditionalProperties().get("artifactId"); + configurator.setArtifactId(artifactId); + } + if (hideGenerationTimestamp == null && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("hideGenerationTimestamp"))) { + // if packageName is passed as an additional property warn them + LOGGER.warn("Deprecated command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); + hideGenerationTimestamp = (Boolean) configurator.getAdditionalProperties().get("hideGenerationTimestamp"); + configurator.setHideGenerationTimestamp(hideGenerationTimestamp); + } try { final ClientOptInput clientOptInput = configurator.toClientOptInput(); From dccf7e86dc14e9d4b0a1af7bd618674a348c2976 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 12:25:35 -0700 Subject: [PATCH 33/44] Updates batch to watn about deprecated additional properties --- bin/generate-samples.sh | 4 +- .../python/src/openapi_client/__init__.py | 26 - .../python/src/openapi_client/api_client.py | 1402 --------------- .../python/src/openapi_client/api_response.py | 28 - .../src/openapi_client/apis/__init__.py | 3 - .../src/openapi_client/apis/path_to_api.py | 536 ------ .../src/openapi_client/apis/paths/__init__.py | 3 - ...hema_which_should_validate_request_body.py | 16 - ...ies_are_allowed_by_default_request_body.py | 16 - ...erties_can_exist_by_itself_request_body.py | 16 - ...ld_not_look_in_applicators_request_body.py | 16 - ..._combined_with_anyof_oneof_request_body.py | 16 - .../request_body_post_allof_request_body.py | 16 - ...dy_post_allof_simple_types_request_body.py | 16 - ...ost_allof_with_base_schema_request_body.py | 16 - ...llof_with_one_empty_schema_request_body.py | 16 - ...ith_the_first_empty_schema_request_body.py | 16 - ...with_the_last_empty_schema_request_body.py | 16 - ...lof_with_two_empty_schemas_request_body.py | 16 - ...y_post_anyof_complex_types_request_body.py | 16 - .../request_body_post_anyof_request_body.py | 16 - ...ost_anyof_with_base_schema_request_body.py | 16 - ...nyof_with_one_empty_schema_request_body.py | 16 - ..._array_type_matches_arrays_request_body.py | 16 - ...lean_type_matches_booleans_request_body.py | 16 - .../request_body_post_by_int_request_body.py | 16 - ...equest_body_post_by_number_request_body.py | 16 - ..._body_post_by_small_number_request_body.py | 16 - ...body_post_date_time_format_request_body.py | 16 - ...est_body_post_email_format_request_body.py | 16 - ...with0_does_not_match_false_request_body.py | 16 - ..._with1_does_not_match_true_request_body.py | 16 - ...um_with_escaped_characters_request_body.py | 16 - ...with_false_does_not_match0_request_body.py | 16 - ..._with_true_does_not_match1_request_body.py | 16 - ...y_post_enums_in_properties_request_body.py | 16 - ...dy_post_forbidden_property_request_body.py | 16 - ..._body_post_hostname_format_request_body.py | 16 - ...eger_type_matches_integers_request_body.py | 16 - ...or_when_float_division_inf_request_body.py | 16 - ...d_string_value_for_default_request_body.py | 16 - ...uest_body_post_ipv4_format_request_body.py | 16 - ...uest_body_post_ipv6_format_request_body.py | 16 - ...y_post_json_pointer_format_request_body.py | 16 - ...dy_post_maximum_validation_request_body.py | 16 - ...tion_with_unsigned_integer_request_body.py | 16 - ...y_post_maxitems_validation_request_body.py | 16 - ..._post_maxlength_validation_request_body.py | 16 - ..._means_the_object_is_empty_request_body.py | 16 - ...t_maxproperties_validation_request_body.py | 16 - ...dy_post_minimum_validation_request_body.py | 16 - ...dation_with_signed_integer_request_body.py | 16 - ...y_post_minitems_validation_request_body.py | 16 - ..._post_minlength_validation_request_body.py | 16 - ...t_minproperties_validation_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ...est_body_post_nested_items_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ...st_not_more_complex_schema_request_body.py | 16 - .../request_body_post_not_request_body.py | 16 - ..._nul_characters_in_strings_request_body.py | 16 - ...tches_only_the_null_object_request_body.py | 16 - ...umber_type_matches_numbers_request_body.py | 16 - ...ject_properties_validation_request_body.py | 16 - ...bject_type_matches_objects_request_body.py | 16 - ...y_post_oneof_complex_types_request_body.py | 16 - .../request_body_post_oneof_request_body.py | 16 - ...ost_oneof_with_base_schema_request_body.py | 16 - ...st_oneof_with_empty_schema_request_body.py | 16 - ...y_post_oneof_with_required_request_body.py | 16 - ...st_pattern_is_not_anchored_request_body.py | 16 - ...dy_post_pattern_validation_request_body.py | 16 - ...es_with_escaped_characters_request_body.py | 16 - ...ef_that_is_not_a_reference_request_body.py | 16 - ...ef_in_additionalproperties_request_body.py | 16 - ...est_body_post_ref_in_allof_request_body.py | 16 - ...est_body_post_ref_in_anyof_request_body.py | 16 - ...est_body_post_ref_in_items_request_body.py | 16 - ...quest_body_post_ref_in_not_request_body.py | 16 - ...est_body_post_ref_in_oneof_request_body.py | 16 - ..._body_post_ref_in_property_request_body.py | 16 - ...equired_default_validation_request_body.py | 16 - ...y_post_required_validation_request_body.py | 16 - ..._required_with_empty_array_request_body.py | 16 - ...ed_with_escaped_characters_request_body.py | 16 - ...ost_simple_enum_validation_request_body.py | 16 - ...tring_type_matches_strings_request_body.py | 16 - ...if_the_property_is_missing_request_body.py | 16 - ...iqueitems_false_validation_request_body.py | 16 - ...ost_uniqueitems_validation_request_body.py | 16 - ...quest_body_post_uri_format_request_body.py | 16 - ..._post_uri_reference_format_request_body.py | 16 - ...y_post_uri_template_format_request_body.py | 16 - ...alidate_response_body_for_content_types.py | 16 - ...default_response_body_for_content_types.py | 16 - ..._itself_response_body_for_content_types.py | 16 - ...icators_response_body_for_content_types.py | 16 - ...f_oneof_response_body_for_content_types.py | 16 - ...t_allof_response_body_for_content_types.py | 16 - ...e_types_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...schemas_response_body_for_content_types.py | 16 - ...x_types_response_body_for_content_types.py | 16 - ...t_anyof_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._arrays_response_body_for_content_types.py | 16 - ...ooleans_response_body_for_content_types.py | 16 - ..._by_int_response_body_for_content_types.py | 16 - ..._number_response_body_for_content_types.py | 16 - ..._number_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...h_false_response_body_for_content_types.py | 16 - ...ch_true_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ..._match0_response_body_for_content_types.py | 16 - ..._match1_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...roperty_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...ntegers_response_body_for_content_types.py | 16 - ...ion_inf_response_body_for_content_types.py | 16 - ...default_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...integer_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...s_empty_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...integer_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ...d_items_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...ost_not_response_body_for_content_types.py | 16 - ...strings_response_body_for_content_types.py | 16 - ..._object_response_body_for_content_types.py | 16 - ...numbers_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...objects_response_body_for_content_types.py | 16 - ...x_types_response_body_for_content_types.py | 16 - ...t_oneof_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...equired_response_body_for_content_types.py | 16 - ...nchored_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ...ference_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...n_allof_response_body_for_content_types.py | 16 - ...n_anyof_response_body_for_content_types.py | 16 - ...n_items_response_body_for_content_types.py | 16 - ..._in_not_response_body_for_content_types.py | 16 - ...n_oneof_response_body_for_content_types.py | 16 - ...roperty_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...y_array_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...strings_response_body_for_content_types.py | 16 - ...missing_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - .../src/openapi_client/apis/tag_to_api.py | 98 -- .../src/openapi_client/apis/tags/__init__.py | 3 - .../apis/tags/additional_properties_api.py | 35 - .../openapi_client/apis/tags/all_of_api.py | 55 - .../openapi_client/apis/tags/any_of_api.py | 39 - .../apis/tags/content_type_json_api.py | 367 ---- .../openapi_client/apis/tags/default_api.py | 27 - .../src/openapi_client/apis/tags/enum_api.py | 51 - .../openapi_client/apis/tags/format_api.py | 55 - .../src/openapi_client/apis/tags/items_api.py | 23 - .../openapi_client/apis/tags/max_items_api.py | 23 - .../apis/tags/max_length_api.py | 23 - .../apis/tags/max_properties_api.py | 27 - .../openapi_client/apis/tags/maximum_api.py | 27 - .../openapi_client/apis/tags/min_items_api.py | 23 - .../apis/tags/min_length_api.py | 23 - .../apis/tags/min_properties_api.py | 23 - .../openapi_client/apis/tags/minimum_api.py | 27 - .../apis/tags/multiple_of_api.py | 35 - .../src/openapi_client/apis/tags/not_api.py | 31 - .../openapi_client/apis/tags/one_of_api.py | 43 - .../apis/tags/operation_request_body_api.py | 193 --- .../openapi_client/apis/tags/path_post_api.py | 367 ---- .../openapi_client/apis/tags/pattern_api.py | 27 - .../apis/tags/properties_api.py | 27 - .../src/openapi_client/apis/tags/ref_api.py | 51 - .../openapi_client/apis/tags/required_api.py | 35 - ...esponse_content_content_type_schema_api.py | 193 --- .../src/openapi_client/apis/tags/type_api.py | 47 - .../apis/tags/unique_items_api.py | 27 - .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 - ...s_allows_a_schema_which_should_validate.py | 145 -- ...tionalproperties_are_allowed_by_default.py | 110 -- ...dditionalproperties_can_exist_by_itself.py | 88 - ...operties_should_not_look_in_applicators.py | 155 -- .../openapi_client/components/schema/allof.py | 174 -- .../schema/allof_combined_with_anyof_oneof.py | 64 - .../components/schema/allof_simple_types.py | 48 - .../schema/allof_with_base_schema.py | 238 --- .../schema/allof_with_one_empty_schema.py | 30 - .../allof_with_the_first_empty_schema.py | 32 - .../allof_with_the_last_empty_schema.py | 32 - .../schema/allof_with_two_empty_schemas.py | 32 - .../openapi_client/components/schema/anyof.py | 40 - .../components/schema/anyof_complex_types.py | 174 -- .../schema/anyof_with_base_schema.py | 49 - .../schema/anyof_with_one_empty_schema.py | 32 - .../schema/array_type_matches_arrays.py | 74 - .../schema/boolean_type_matches_booleans.py | 13 - .../components/schema/by_int.py | 26 - .../components/schema/by_number.py | 26 - .../components/schema/by_small_number.py | 26 - .../components/schema/date_time_format.py | 26 - .../components/schema/email_format.py | 26 - .../schema/enum_with0_does_not_match_false.py | 66 - .../schema/enum_with1_does_not_match_true.py | 66 - .../schema/enum_with_escaped_characters.py | 85 - .../schema/enum_with_false_does_not_match0.py | 71 - .../schema/enum_with_true_does_not_match1.py | 71 - .../components/schema/enums_in_properties.py | 236 --- .../components/schema/forbidden_property.py | 94 - .../components/schema/hostname_format.py | 26 - .../schema/integer_type_matches_integers.py | 13 - ...not_raise_error_when_float_division_inf.py | 28 - .../invalid_string_value_for_default.py | 106 -- .../components/schema/ipv4_format.py | 26 - .../components/schema/ipv6_format.py | 26 - .../components/schema/json_pointer_format.py | 26 - .../components/schema/maximum_validation.py | 26 - ...aximum_validation_with_unsigned_integer.py | 26 - .../components/schema/maxitems_validation.py | 26 - .../components/schema/maxlength_validation.py | 26 - ...axproperties0_means_the_object_is_empty.py | 26 - .../schema/maxproperties_validation.py | 26 - .../components/schema/minimum_validation.py | 26 - .../minimum_validation_with_signed_integer.py | 26 - .../components/schema/minitems_validation.py | 26 - .../components/schema/minlength_validation.py | 26 - .../schema/minproperties_validation.py | 26 - ...ted_allof_to_check_validation_semantics.py | 42 - ...ted_anyof_to_check_validation_semantics.py | 42 - .../components/schema/nested_items.py | 242 --- ...ted_oneof_to_check_validation_semantics.py | 42 - .../openapi_client/components/schema/not.py | 27 - .../schema/not_more_complex_schema.py | 119 -- .../schema/nul_characters_in_strings.py | 71 - .../null_type_matches_only_the_null_object.py | 13 - .../schema/number_type_matches_numbers.py | 13 - .../schema/object_properties_validation.py | 114 -- .../schema/object_type_matches_objects.py | 13 - .../openapi_client/components/schema/oneof.py | 40 - .../components/schema/oneof_complex_types.py | 174 -- .../schema/oneof_with_base_schema.py | 49 - .../schema/oneof_with_empty_schema.py | 32 - .../components/schema/oneof_with_required.py | 191 -- .../schema/pattern_is_not_anchored.py | 28 - .../components/schema/pattern_validation.py | 28 - .../properties_with_escaped_characters.py | 91 - ...perty_named_ref_that_is_not_a_reference.py | 76 - .../schema/ref_in_additionalproperties.py | 95 - .../components/schema/ref_in_allof.py | 29 - .../components/schema/ref_in_anyof.py | 29 - .../components/schema/ref_in_items.py | 75 - .../components/schema/ref_in_not.py | 26 - .../components/schema/ref_in_oneof.py | 29 - .../components/schema/ref_in_property.py | 98 -- .../schema/required_default_validation.py | 94 - .../components/schema/required_validation.py | 110 -- .../schema/required_with_empty_array.py | 94 - .../required_with_escaped_characters.py | 82 - .../schema/simple_enum_validation.py | 90 - .../schema/string_type_matches_strings.py | 13 - ..._do_anything_if_the_property_is_missing.py | 121 -- .../schema/uniqueitems_false_validation.py | 26 - .../schema/uniqueitems_validation.py | 26 - .../components/schema/uri_format.py | 26 - .../components/schema/uri_reference_format.py | 26 - .../components/schema/uri_template_format.py | 26 - .../components/schemas/__init__.py | 100 -- .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 --- .../configurations/schema_configuration.py | 108 -- .../python/src/openapi_client/exceptions.py | 132 -- .../src/openapi_client/paths/__init__.py | 3 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 --- .../src/openapi_client/schemas/__init__.py | 148 -- .../src/openapi_client/schemas/format.py | 115 -- .../schemas/original_immutabledict.py | 97 -- .../src/openapi_client/schemas/schema.py | 729 -------- .../src/openapi_client/schemas/schemas.py | 375 ---- .../src/openapi_client/schemas/validation.py | 1446 ---------------- .../src/openapi_client/security_schemes.py | 227 --- .../python/src/openapi_client/server.py | 34 - .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 - .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 - .../shared_imports/operation_imports.py | 18 - .../shared_imports/response_imports.py | 25 - .../shared_imports/schema_imports.py | 28 - .../shared_imports/security_scheme_imports.py | 12 - .../shared_imports/server_imports.py | 13 - .../python/src/openapi_client/__init__.py | 26 - .../python/src/openapi_client/api_client.py | 1402 --------------- .../python/src/openapi_client/api_response.py | 28 - .../src/openapi_client/apis/__init__.py | 3 - .../src/openapi_client/apis/path_to_api.py | 872 ---------- .../src/openapi_client/apis/paths/__init__.py | 3 - ...hema_given_for_prefixitems_request_body.py | 16 - ...ems_are_allowed_by_default_request_body.py | 16 - ...ies_are_allowed_by_default_request_body.py | 16 - ...erties_can_exist_by_itself_request_body.py | 16 - ...es_not_look_in_applicators_request_body.py | 16 - ...valued_instance_properties_request_body.py | 16 - ...onalproperties_with_schema_request_body.py | 16 - ..._combined_with_anyof_oneof_request_body.py | 16 - .../request_body_post_allof_request_body.py | 16 - ...dy_post_allof_simple_types_request_body.py | 16 - ...ost_allof_with_base_schema_request_body.py | 16 - ...llof_with_one_empty_schema_request_body.py | 16 - ...ith_the_first_empty_schema_request_body.py | 16 - ...with_the_last_empty_schema_request_body.py | 16 - ...lof_with_two_empty_schemas_request_body.py | 16 - ...y_post_anyof_complex_types_request_body.py | 16 - .../request_body_post_anyof_request_body.py | 16 - ...ost_anyof_with_base_schema_request_body.py | 16 - ...nyof_with_one_empty_schema_request_body.py | 16 - ..._array_type_matches_arrays_request_body.py | 16 - ...lean_type_matches_booleans_request_body.py | 16 - .../request_body_post_by_int_request_body.py | 16 - ...equest_body_post_by_number_request_body.py | 16 - ..._body_post_by_small_number_request_body.py | 16 - ..._nul_characters_in_strings_request_body.py | 16 - ...ontains_keyword_validation_request_body.py | 16 - ...ith_null_instance_elements_request_body.py | 16 - ...uest_body_post_date_format_request_body.py | 16 - ...body_post_date_time_format_request_body.py | 16 - ...es_with_escaped_characters_request_body.py | 16 - ...ema_incompatible_with_root_request_body.py | 16 - ..._schemas_single_dependency_request_body.py | 16 - ..._body_post_duration_format_request_body.py | 16 - ...est_body_post_email_format_request_body.py | 16 - ...body_post_empty_dependents_request_body.py | 16 - ...with0_does_not_match_false_request_body.py | 16 - ..._with1_does_not_match_true_request_body.py | 16 - ...um_with_escaped_characters_request_body.py | 16 - ...with_false_does_not_match0_request_body.py | 16 - ..._with_true_does_not_match1_request_body.py | 16 - ...y_post_enums_in_properties_request_body.py | 16 - ...xclusivemaximum_validation_request_body.py | 16 - ...xclusiveminimum_validation_request_body.py | 16 - ...dy_post_float_division_inf_request_body.py | 16 - ...dy_post_forbidden_property_request_body.py | 16 - ..._body_post_hostname_format_request_body.py | 16 - ...body_post_idn_email_format_request_body.py | 16 - ...y_post_idn_hostname_format_request_body.py | 16 - ...t_if_and_else_without_then_request_body.py | 16 - ...t_if_and_then_without_else_request_body.py | 16 - ...eyword_processing_sequence_request_body.py | 16 - ...ost_ignore_else_without_if_request_body.py | 16 - ...re_if_without_then_or_else_request_body.py | 16 - ...ost_ignore_then_without_if_request_body.py | 16 - ...eger_type_matches_integers_request_body.py | 16 - ...uest_body_post_ipv4_format_request_body.py | 16 - ...uest_body_post_ipv6_format_request_body.py | 16 - ...quest_body_post_iri_format_request_body.py | 16 - ..._post_iri_reference_format_request_body.py | 16 - ...t_body_post_items_contains_request_body.py | 16 - ..._in_applicators_valid_case_request_body.py | 16 - ...ith_null_instance_elements_request_body.py | 16 - ...y_post_json_pointer_format_request_body.py | 16 - ...ithout_contains_is_ignored_request_body.py | 16 - ...dy_post_maximum_validation_request_body.py | 16 - ...tion_with_unsigned_integer_request_body.py | 16 - ...y_post_maxitems_validation_request_body.py | 16 - ..._post_maxlength_validation_request_body.py | 16 - ..._means_the_object_is_empty_request_body.py | 16 - ...t_maxproperties_validation_request_body.py | 16 - ...ithout_contains_is_ignored_request_body.py | 16 - ...dy_post_minimum_validation_request_body.py | 16 - ...dation_with_signed_integer_request_body.py | 16 - ...y_post_minitems_validation_request_body.py | 16 - ..._post_minlength_validation_request_body.py | 16 - ...t_minproperties_validation_request_body.py | 16 - ...ltiple_dependents_required_request_body.py | 16 - ...rnproperties_are_validated_request_body.py | 16 - ...n_be_specified_in_an_array_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ...est_body_post_nested_items_request_body.py | 16 - ...check_validation_semantics_request_body.py | 16 - ..._with_additionalproperties_request_body.py | 16 - ...ce_across_combined_schemas_request_body.py | 16 - ...st_not_more_complex_schema_request_body.py | 16 - ...dy_post_not_multiple_types_request_body.py | 16 - .../request_body_post_not_request_body.py | 16 - ..._nul_characters_in_strings_request_body.py | 16 - ...tches_only_the_null_object_request_body.py | 16 - ...umber_type_matches_numbers_request_body.py | 16 - ...ject_properties_validation_request_body.py | 16 - ...bject_type_matches_objects_request_body.py | 16 - ...y_post_oneof_complex_types_request_body.py | 16 - .../request_body_post_oneof_request_body.py | 16 - ...ost_oneof_with_base_schema_request_body.py | 16 - ...st_oneof_with_empty_schema_request_body.py | 16 - ...y_post_oneof_with_required_request_body.py | 16 - ...st_pattern_is_not_anchored_request_body.py | 16 - ...dy_post_pattern_validation_request_body.py | 16 - ...roperties_matching_a_regex_request_body.py | 16 - ...valued_instance_properties_request_body.py | 16 - ...e_starting_index_for_items_request_body.py | 16 - ...ith_null_instance_elements_request_body.py | 16 - ...onalproperties_interaction_request_body.py | 16 - ...ript_object_property_names_request_body.py | 16 - ...es_with_escaped_characters_request_body.py | 16 - ...valued_instance_properties_request_body.py | 16 - ...ef_that_is_not_a_reference_request_body.py | 16 - ...t_propertynames_validation_request_body.py | 16 - ...est_body_post_regex_format_request_body.py | 16 - ...ult_and_are_case_sensitive_request_body.py | 16 - ...lative_json_pointer_format_request_body.py | 16 - ...equired_default_validation_request_body.py | 16 - ...ript_object_property_names_request_body.py | 16 - ...y_post_required_validation_request_body.py | 16 - ..._required_with_empty_array_request_body.py | 16 - ...ed_with_escaped_characters_request_body.py | 16 - ...ost_simple_enum_validation_request_body.py | 16 - ...ody_post_single_dependency_request_body.py | 16 - ..._multiple_of_large_integer_request_body.py | 16 - ...tring_type_matches_strings_request_body.py | 16 - ...uest_body_post_time_format_request_body.py | 16 - ..._type_array_object_or_null_request_body.py | 16 - ..._post_type_array_or_object_request_body.py | 16 - ...ype_as_array_with_one_item_request_body.py | 16 - ...unevaluateditems_as_schema_request_body.py | 16 - ...n_multiple_nested_contains_request_body.py | 16 - ...nevaluateditems_with_items_request_body.py | 16 - ...ith_null_instance_elements_request_body.py | 16 - ..._affected_by_propertynames_request_body.py | 16 - ...evaluatedproperties_schema_request_body.py | 16 - ...acent_additionalproperties_request_body.py | 16 - ...valued_instance_properties_request_body.py | 16 - ...iqueitems_false_validation_request_body.py | 16 - ...lse_with_an_array_of_items_request_body.py | 16 - ...ost_uniqueitems_validation_request_body.py | 16 - ...ems_with_an_array_of_items_request_body.py | 16 - ...quest_body_post_uri_format_request_body.py | 16 - ..._post_uri_reference_format_request_body.py | 16 - ...y_post_uri_template_format_request_body.py | 16 - ...uest_body_post_uuid_format_request_body.py | 16 - ...orrect_branch_then_vs_else_request_body.py | 16 - ...ixitems_response_body_for_content_types.py | 16 - ...default_response_body_for_content_types.py | 16 - ...default_response_body_for_content_types.py | 16 - ..._itself_response_body_for_content_types.py | 16 - ...icators_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...f_oneof_response_body_for_content_types.py | 16 - ...t_allof_response_body_for_content_types.py | 16 - ...e_types_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...schemas_response_body_for_content_types.py | 16 - ...x_types_response_body_for_content_types.py | 16 - ...t_anyof_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._arrays_response_body_for_content_types.py | 16 - ...ooleans_response_body_for_content_types.py | 16 - ..._by_int_response_body_for_content_types.py | 16 - ..._number_response_body_for_content_types.py | 16 - ..._number_response_body_for_content_types.py | 16 - ...strings_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...lements_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ...th_root_response_body_for_content_types.py | 16 - ...endency_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...endents_response_body_for_content_types.py | 16 - ...h_false_response_body_for_content_types.py | 16 - ...ch_true_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ..._match0_response_body_for_content_types.py | 16 - ..._match1_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...ion_inf_response_body_for_content_types.py | 16 - ...roperty_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...ut_then_response_body_for_content_types.py | 16 - ...ut_else_response_body_for_content_types.py | 16 - ...equence_response_body_for_content_types.py | 16 - ...hout_if_response_body_for_content_types.py | 16 - ...or_else_response_body_for_content_types.py | 16 - ...hout_if_response_body_for_content_types.py | 16 - ...ntegers_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...ontains_response_body_for_content_types.py | 16 - ...id_case_response_body_for_content_types.py | 16 - ...lements_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...ignored_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...integer_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...s_empty_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...ignored_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...integer_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...equired_response_body_for_content_types.py | 16 - ...lidated_response_body_for_content_types.py | 16 - ...n_array_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ...d_items_response_body_for_content_types.py | 16 - ...mantics_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...schemas_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...e_types_response_body_for_content_types.py | 16 - ...ost_not_response_body_for_content_types.py | 16 - ...strings_response_body_for_content_types.py | 16 - ..._object_response_body_for_content_types.py | 16 - ...numbers_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...objects_response_body_for_content_types.py | 16 - ...x_types_response_body_for_content_types.py | 16 - ...t_oneof_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...equired_response_body_for_content_types.py | 16 - ...nchored_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...a_regex_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...r_items_response_body_for_content_types.py | 16 - ...lements_response_body_for_content_types.py | 16 - ...raction_response_body_for_content_types.py | 16 - ...y_names_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...ference_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...nsitive_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...y_names_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...y_array_response_body_for_content_types.py | 16 - ...racters_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...endency_response_body_for_content_types.py | 16 - ...integer_response_body_for_content_types.py | 16 - ...strings_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...or_null_response_body_for_content_types.py | 16 - ..._object_response_body_for_content_types.py | 16 - ...ne_item_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...ontains_response_body_for_content_types.py | 16 - ...h_items_response_body_for_content_types.py | 16 - ...lements_response_body_for_content_types.py | 16 - ...tynames_response_body_for_content_types.py | 16 - ..._schema_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...perties_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...f_items_response_body_for_content_types.py | 16 - ...idation_response_body_for_content_types.py | 16 - ...f_items_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ..._format_response_body_for_content_types.py | 16 - ...vs_else_response_body_for_content_types.py | 16 - .../src/openapi_client/apis/tag_to_api.py | 137 -- .../src/openapi_client/apis/tags/__init__.py | 3 - .../apis/tags/additional_properties_api.py | 43 - .../openapi_client/apis/tags/all_of_api.py | 55 - .../openapi_client/apis/tags/any_of_api.py | 39 - .../src/openapi_client/apis/tags/const_api.py | 23 - .../openapi_client/apis/tags/contains_api.py | 31 - .../apis/tags/content_type_json_api.py | 591 ------- .../apis/tags/dependent_required_api.py | 31 - .../apis/tags/dependent_schemas_api.py | 31 - .../src/openapi_client/apis/tags/enum_api.py | 51 - .../apis/tags/exclusive_maximum_api.py | 23 - .../apis/tags/exclusive_minimum_api.py | 23 - .../openapi_client/apis/tags/format_api.py | 95 - .../apis/tags/if_then_else_api.py | 51 - .../src/openapi_client/apis/tags/items_api.py | 35 - .../apis/tags/max_contains_api.py | 23 - .../openapi_client/apis/tags/max_items_api.py | 23 - .../apis/tags/max_length_api.py | 23 - .../apis/tags/max_properties_api.py | 27 - .../openapi_client/apis/tags/maximum_api.py | 27 - .../apis/tags/min_contains_api.py | 23 - .../openapi_client/apis/tags/min_items_api.py | 23 - .../apis/tags/min_length_api.py | 23 - .../apis/tags/min_properties_api.py | 23 - .../openapi_client/apis/tags/minimum_api.py | 27 - .../apis/tags/multiple_of_api.py | 39 - .../src/openapi_client/apis/tags/not_api.py | 35 - .../openapi_client/apis/tags/one_of_api.py | 43 - .../apis/tags/operation_request_body_api.py | 305 ---- .../openapi_client/apis/tags/path_post_api.py | 591 ------- .../openapi_client/apis/tags/pattern_api.py | 27 - .../apis/tags/pattern_properties_api.py | 35 - .../apis/tags/prefix_items_api.py | 31 - .../apis/tags/properties_api.py | 39 - .../apis/tags/property_names_api.py | 23 - .../src/openapi_client/apis/tags/ref_api.py | 23 - .../openapi_client/apis/tags/required_api.py | 39 - ...esponse_content_content_type_schema_api.py | 305 ---- .../src/openapi_client/apis/tags/type_api.py | 63 - .../apis/tags/unevaluated_items_api.py | 35 - .../apis/tags/unevaluated_properties_api.py | 35 - .../apis/tags/unique_items_api.py | 35 - .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 - .../schema/a_schema_given_for_prefixitems.py | 67 - ...additional_items_are_allowed_by_default.py | 62 - ...tionalproperties_are_allowed_by_default.py | 110 -- ...dditionalproperties_can_exist_by_itself.py | 88 - ...properties_does_not_look_in_applicators.py | 155 -- ...es_with_null_valued_instance_properties.py | 88 - .../additionalproperties_with_schema.py | 145 -- .../openapi_client/components/schema/allof.py | 174 -- .../schema/allof_combined_with_anyof_oneof.py | 64 - .../components/schema/allof_simple_types.py | 48 - .../schema/allof_with_base_schema.py | 238 --- .../schema/allof_with_one_empty_schema.py | 30 - .../allof_with_the_first_empty_schema.py | 32 - .../allof_with_the_last_empty_schema.py | 32 - .../schema/allof_with_two_empty_schemas.py | 32 - .../openapi_client/components/schema/anyof.py | 40 - .../components/schema/anyof_complex_types.py | 174 -- .../schema/anyof_with_base_schema.py | 49 - .../schema/anyof_with_one_empty_schema.py | 32 - .../schema/array_type_matches_arrays.py | 13 - .../schema/boolean_type_matches_booleans.py | 13 - .../components/schema/by_int.py | 26 - .../components/schema/by_number.py | 26 - .../components/schema/by_small_number.py | 26 - .../schema/const_nul_characters_in_strings.py | 38 - .../schema/contains_keyword_validation.py | 35 - .../contains_with_null_instance_elements.py | 27 - .../components/schema/date_format.py | 26 - .../components/schema/date_time_format.py | 26 - ...as_dependencies_with_escaped_characters.py | 97 -- ...endent_subschema_incompatible_with_root.py | 197 --- .../dependent_schemas_single_dependency.py | 129 -- .../components/schema/duration_format.py | 26 - .../components/schema/email_format.py | 26 - .../components/schema/empty_dependents.py | 30 - .../schema/enum_with0_does_not_match_false.py | 66 - .../schema/enum_with1_does_not_match_true.py | 66 - .../schema/enum_with_escaped_characters.py | 85 - .../schema/enum_with_false_does_not_match0.py | 71 - .../schema/enum_with_true_does_not_match1.py | 71 - .../components/schema/enums_in_properties.py | 236 --- .../schema/exclusivemaximum_validation.py | 26 - .../schema/exclusiveminimum_validation.py | 26 - .../components/schema/float_division_inf.py | 28 - .../components/schema/forbidden_property.py | 103 -- .../components/schema/hostname_format.py | 26 - .../components/schema/idn_email_format.py | 26 - .../components/schema/idn_hostname_format.py | 26 - .../schema/if_and_else_without_then.py | 45 - .../schema/if_and_then_without_else.py | 45 - ..._serialized_keyword_processing_sequence.py | 79 - .../schema/ignore_else_without_if.py | 47 - .../schema/ignore_if_without_then_or_else.py | 47 - .../schema/ignore_then_without_if.py | 47 - .../schema/integer_type_matches_integers.py | 13 - .../components/schema/ipv4_format.py | 26 - .../components/schema/ipv6_format.py | 26 - .../components/schema/iri_format.py | 26 - .../components/schema/iri_reference_format.py | 26 - .../components/schema/items_contains.py | 92 - ...does_not_look_in_applicators_valid_case.py | 82 - .../items_with_null_instance_elements.py | 68 - .../components/schema/json_pointer_format.py | 26 - ...maxcontains_without_contains_is_ignored.py | 25 - .../components/schema/maximum_validation.py | 26 - ...aximum_validation_with_unsigned_integer.py | 26 - .../components/schema/maxitems_validation.py | 26 - .../components/schema/maxlength_validation.py | 26 - ...axproperties0_means_the_object_is_empty.py | 26 - .../schema/maxproperties_validation.py | 26 - ...mincontains_without_contains_is_ignored.py | 25 - .../components/schema/minimum_validation.py | 26 - .../minimum_validation_with_signed_integer.py | 26 - .../components/schema/minitems_validation.py | 26 - .../components/schema/minlength_validation.py | 26 - .../schema/minproperties_validation.py | 26 - .../schema/multiple_dependents_required.py | 32 - ...taneous_patternproperties_are_validated.py | 48 - ...iple_types_can_be_specified_in_an_array.py | 54 - ...ted_allof_to_check_validation_semantics.py | 42 - ...ted_anyof_to_check_validation_semantics.py | 42 - .../components/schema/nested_items.py | 242 --- ...ted_oneof_to_check_validation_semantics.py | 42 - ...ascii_pattern_with_additionalproperties.py | 85 - ...on_interference_across_combined_schemas.py | 85 - .../openapi_client/components/schema/not.py | 27 - .../schema/not_more_complex_schema.py | 119 -- .../components/schema/not_multiple_types.py | 63 - .../schema/nul_characters_in_strings.py | 71 - .../null_type_matches_only_the_null_object.py | 13 - .../schema/number_type_matches_numbers.py | 13 - .../schema/object_properties_validation.py | 114 -- .../schema/object_type_matches_objects.py | 13 - .../openapi_client/components/schema/oneof.py | 40 - .../components/schema/oneof_complex_types.py | 174 -- .../schema/oneof_with_base_schema.py | 49 - .../schema/oneof_with_empty_schema.py | 32 - .../components/schema/oneof_with_required.py | 191 -- .../schema/pattern_is_not_anchored.py | 28 - .../components/schema/pattern_validation.py | 28 - ...s_validates_properties_matching_a_regex.py | 36 - ...es_with_null_valued_instance_properties.py | 36 - ...on_adjusts_the_starting_index_for_items.py | 83 - ...prefixitems_with_null_instance_elements.py | 62 - ...erties_additionalproperties_interaction.py | 194 --- ...es_are_javascript_object_property_names.py | 213 --- .../properties_with_escaped_characters.py | 91 - ...es_with_null_valued_instance_properties.py | 96 - ...perty_named_ref_that_is_not_a_reference.py | 76 - .../schema/propertynames_validation.py | 36 - .../components/schema/regex_format.py | 26 - ...hored_by_default_and_are_case_sensitive.py | 40 - .../schema/relative_json_pointer_format.py | 26 - .../schema/required_default_validation.py | 94 - ...es_are_javascript_object_property_names.py | 103 -- .../components/schema/required_validation.py | 110 -- .../schema/required_with_empty_array.py | 94 - .../required_with_escaped_characters.py | 82 - .../schema/simple_enum_validation.py | 90 - .../components/schema/single_dependency.py | 31 - .../schema/small_multiple_of_large_integer.py | 28 - .../schema/string_type_matches_strings.py | 13 - .../components/schema/time_format.py | 26 - .../schema/type_array_object_or_null.py | 64 - .../components/schema/type_array_or_object.py | 56 - .../schema/type_as_array_with_one_item.py | 13 - .../schema/unevaluateditems_as_schema.py | 27 - ...ems_depends_on_multiple_nested_contains.py | 76 - .../schema/unevaluateditems_with_items.py | 76 - ...luateditems_with_null_instance_elements.py | 27 - ...roperties_not_affected_by_propertynames.py | 38 - .../schema/unevaluatedproperties_schema.py | 47 - ...ties_with_adjacent_additionalproperties.py | 120 -- ...es_with_null_valued_instance_properties.py | 27 - .../schema/uniqueitems_false_validation.py | 26 - ...niqueitems_false_with_an_array_of_items.py | 68 - .../schema/uniqueitems_validation.py | 26 - .../uniqueitems_with_an_array_of_items.py | 68 - .../components/schema/uri_format.py | 26 - .../components/schema/uri_reference_format.py | 26 - .../components/schema/uri_template_format.py | 26 - .../components/schema/uuid_format.py | 26 - ...ate_against_correct_branch_then_vs_else.py | 55 - .../components/schemas/__init__.py | 156 -- .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 --- .../configurations/schema_configuration.py | 108 -- .../python/src/openapi_client/exceptions.py | 132 -- .../src/openapi_client/paths/__init__.py | 3 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 132 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 156 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 153 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 126 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 135 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 35 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 116 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 --- .../src/openapi_client/schemas/__init__.py | 148 -- .../src/openapi_client/schemas/format.py | 115 -- .../schemas/original_immutabledict.py | 97 -- .../src/openapi_client/schemas/schema.py | 729 -------- .../src/openapi_client/schemas/schemas.py | 375 ---- .../src/openapi_client/schemas/validation.py | 1446 ---------------- .../src/openapi_client/security_schemes.py | 227 --- .../python/src/openapi_client/server.py | 34 - .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 - .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 - .../shared_imports/operation_imports.py | 18 - .../shared_imports/response_imports.py | 25 - .../shared_imports/schema_imports.py | 28 - .../shared_imports/security_scheme_imports.py | 12 - .../shared_imports/server_imports.py | 13 - .../python/src/openapi_client/__init__.py | 26 - .../python/src/openapi_client/api_client.py | 1402 --------------- .../python/src/openapi_client/api_response.py | 28 - .../src/openapi_client/apis/__init__.py | 3 - .../src/openapi_client/apis/path_to_api.py | 17 - .../src/openapi_client/apis/paths/__init__.py | 3 - .../openapi_client/apis/paths/operators.py | 16 - .../src/openapi_client/apis/tag_to_api.py | 17 - .../src/openapi_client/apis/tags/__init__.py | 3 - .../openapi_client/apis/tags/default_api.py | 21 - .../src/openapi_client/components/__init__.py | 0 .../components/schema/__init__.py | 5 - .../components/schema/addition_operator.py | 158 -- .../components/schema/operator.py | 45 - .../components/schema/subtraction_operator.py | 158 -- .../components/schemas/__init__.py | 16 - .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 281 --- .../configurations/schema_configuration.py | 108 -- .../python/src/openapi_client/exceptions.py | 132 -- .../src/openapi_client/paths/__init__.py | 3 - .../paths/operators/__init__.py | 5 - .../paths/operators/post/__init__.py | 0 .../paths/operators/post/operation.py | 139 -- .../operators/post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../operators/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 22 - .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 --- .../src/openapi_client/schemas/__init__.py | 148 -- .../src/openapi_client/schemas/format.py | 115 -- .../schemas/original_immutabledict.py | 97 -- .../src/openapi_client/schemas/schema.py | 729 -------- .../src/openapi_client/schemas/schemas.py | 375 ---- .../src/openapi_client/schemas/validation.py | 1537 ----------------- .../src/openapi_client/security_schemes.py | 227 --- .../python/src/openapi_client/server.py | 34 - .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 - .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 - .../shared_imports/operation_imports.py | 18 - .../shared_imports/response_imports.py | 25 - .../shared_imports/schema_imports.py | 28 - .../shared_imports/security_scheme_imports.py | 12 - .../shared_imports/server_imports.py | 13 - .../python/src/openapi_client/__init__.py | 26 - .../python/src/openapi_client/api_client.py | 1425 --------------- .../python/src/openapi_client/api_response.py | 28 - .../src/openapi_client/apis/__init__.py | 3 - .../src/openapi_client/apis/path_to_api.py | 26 - .../src/openapi_client/apis/paths/__init__.py | 3 - .../paths/path_with_no_explicit_security.py | 16 - .../paths/path_with_one_explicit_security.py | 16 - .../paths/path_with_security_from_root.py | 16 - .../paths/path_with_two_explicit_security.py | 16 - .../src/openapi_client/apis/tag_to_api.py | 17 - .../src/openapi_client/apis/tags/__init__.py | 3 - .../openapi_client/apis/tags/default_api.py | 27 - .../components/schemas/__init__.py | 13 - .../components/security_schemes/__init__.py | 0 .../security_scheme_api_key.py | 18 - .../security_scheme_bearer_test.py | 17 - .../security_scheme_http_basic_test.py | 16 - .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 347 ---- .../configurations/schema_configuration.py | 108 -- .../python/src/openapi_client/exceptions.py | 132 -- .../src/openapi_client/paths/__init__.py | 3 - .../__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 108 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 122 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 - .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../path_with_security_from_root/__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 130 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 - .../__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 126 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 22 - .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 --- .../src/openapi_client/schemas/__init__.py | 148 -- .../src/openapi_client/schemas/format.py | 115 -- .../schemas/original_immutabledict.py | 97 -- .../src/openapi_client/schemas/schema.py | 729 -------- .../src/openapi_client/schemas/schemas.py | 375 ---- .../src/openapi_client/schemas/validation.py | 1446 ---------------- .../src/openapi_client/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../security/security_requirement_object_2.py | 13 - .../security/security_requirement_object_3.py | 15 - .../src/openapi_client/security_schemes.py | 230 --- .../python/src/openapi_client/server.py | 34 - .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 14 - .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 - .../shared_imports/operation_imports.py | 18 - .../shared_imports/response_imports.py | 25 - .../shared_imports/schema_imports.py | 28 - .../shared_imports/security_scheme_imports.py | 12 - .../shared_imports/server_imports.py | 13 - .../docs/components/schema/_200_response.md | 2 +- .../schema/abstract_step_message.md | 2 +- .../python/src/openapi_client/__init__.py | 29 - .../python/src/openapi_client/api_client.py | 1429 --------------- .../python/src/openapi_client/api_response.py | 28 - .../src/openapi_client/apis/__init__.py | 3 - .../src/openapi_client/apis/path_to_api.py | 182 -- .../src/openapi_client/apis/paths/__init__.py | 3 - .../apis/paths/another_fake_dummy.py | 16 - .../apis/paths/common_param_sub_dir.py | 20 - .../src/openapi_client/apis/paths/fake.py | 22 - ...ditional_properties_with_array_of_enums.py | 16 - .../apis/paths/fake_body_with_file_schema.py | 16 - .../apis/paths/fake_body_with_query_params.py | 16 - .../apis/paths/fake_case_sensitive_params.py | 16 - .../apis/paths/fake_classname_test.py | 16 - .../apis/paths/fake_delete_coffee_id.py | 16 - .../openapi_client/apis/paths/fake_health.py | 16 - .../fake_inline_additional_properties.py | 16 - .../apis/paths/fake_inline_composition.py | 16 - .../apis/paths/fake_json_form_data.py | 16 - .../apis/paths/fake_json_patch.py | 16 - .../apis/paths/fake_json_with_charset.py | 16 - ...ake_multiple_request_body_content_types.py | 16 - .../paths/fake_multiple_response_bodies.py | 16 - .../apis/paths/fake_multiple_securities.py | 16 - .../apis/paths/fake_obj_in_query.py | 16 - ...fake_parameter_collisions1_abab_self_ab.py | 16 - .../apis/paths/fake_pem_content_type.py | 16 - ..._pet_id_upload_image_with_required_file.py | 16 - ...fake_query_param_with_json_content_type.py | 16 - .../apis/paths/fake_redirection.py | 16 - .../apis/paths/fake_ref_obj_in_query.py | 16 - .../apis/paths/fake_refs_array_of_enums.py | 16 - .../apis/paths/fake_refs_arraymodel.py | 16 - .../apis/paths/fake_refs_boolean.py | 16 - ...composed_one_of_number_with_validations.py | 16 - .../apis/paths/fake_refs_enum.py | 16 - .../apis/paths/fake_refs_mammal.py | 16 - .../apis/paths/fake_refs_number.py | 16 - .../fake_refs_object_model_with_ref_props.py | 16 - .../apis/paths/fake_refs_string.py | 16 - .../paths/fake_response_without_schema.py | 16 - .../apis/paths/fake_test_query_paramters.py | 16 - .../apis/paths/fake_upload_download_file.py | 16 - .../apis/paths/fake_upload_file.py | 16 - .../apis/paths/fake_upload_files.py | 16 - .../apis/paths/fake_wild_card_responses.py | 16 - .../src/openapi_client/apis/paths/foo.py | 16 - .../src/openapi_client/apis/paths/pet.py | 18 - .../apis/paths/pet_find_by_status.py | 16 - .../apis/paths/pet_find_by_tags.py | 16 - .../openapi_client/apis/paths/pet_pet_id.py | 20 - .../apis/paths/pet_pet_id_upload_image.py | 16 - .../src/openapi_client/apis/paths/solidus.py | 16 - .../apis/paths/store_inventory.py | 16 - .../openapi_client/apis/paths/store_order.py | 16 - .../apis/paths/store_order_order_id.py | 18 - .../src/openapi_client/apis/paths/user.py | 16 - .../apis/paths/user_create_with_array.py | 16 - .../apis/paths/user_create_with_list.py | 16 - .../openapi_client/apis/paths/user_login.py | 16 - .../openapi_client/apis/paths/user_logout.py | 16 - .../apis/paths/user_username.py | 20 - .../src/openapi_client/apis/tag_to_api.py | 35 - .../src/openapi_client/apis/tags/__init__.py | 3 - .../apis/tags/another_fake_api.py | 21 - .../openapi_client/apis/tags/default_api.py | 21 - .../src/openapi_client/apis/tags/fake_api.py | 105 -- .../apis/tags/fake_classname_tags123_api.py | 21 - .../src/openapi_client/apis/tags/pet_api.py | 37 - .../src/openapi_client/apis/tags/store_api.py | 27 - .../src/openapi_client/apis/tags/user_api.py | 35 - .../src/openapi_client/components/__init__.py | 0 .../components/headers/__init__.py | 0 .../__init__.py | 23 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../headers/header_number_header/__init__.py | 17 - .../headers/header_number_header/schema.py | 13 - .../__init__.py | 23 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../header_ref_schema_header/__init__.py | 18 - .../header_ref_schema_header/schema.py | 13 - .../header_ref_string_header/__init__.py | 12 - .../headers/header_string_header/__init__.py | 18 - .../headers/header_string_header/schema.py | 13 - .../components/parameters/__init__.py | 0 .../__init__.py | 24 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../parameter_path_user_name/__init__.py | 19 - .../parameter_path_user_name/schema.py | 13 - .../parameter_ref_path_user_name/__init__.py | 12 - .../__init__.py | 19 - .../schema.py | 13 - .../components/request_bodies/__init__.py | 0 .../request_body_client/__init__.py | 23 - .../request_body_client/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../request_body_pet/__init__.py | 29 - .../request_body_pet/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../request_body_ref_user_array/__init__.py | 12 - .../request_body_user_array/__init__.py | 23 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 70 - .../components/responses/__init__.py | 0 .../response_headers_with_no_body/__init__.py | 30 - .../header_parameters.py | 105 -- .../headers/__init__.py | 0 .../headers/header_location/__init__.py | 17 - .../headers/header_location/schema.py | 13 - .../__init__.py | 13 - .../__init__.py | 13 - .../__init__.py | 22 - .../__init__.py | 38 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 83 - .../header_parameters.py | 105 -- .../headers/__init__.py | 0 .../headers/header_some_header/__init__.py | 17 - .../headers/header_some_header/schema.py | 13 - .../__init__.py | 46 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../header_parameters.py | 157 -- .../headers/__init__.py | 0 .../headers/header_int32/__init__.py | 12 - .../headers/header_number_header/__init__.py | 12 - .../__init__.py | 12 - .../header_ref_schema_header/__init__.py | 12 - .../headers/header_string_header/__init__.py | 12 - .../__init__.py | 40 - .../content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 70 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 70 - .../components/schema/_200_response.py | 116 -- .../components/schema/__init__.py | 5 - .../schema/abstract_step_message.py | 138 -- .../schema/additional_properties_class.py | 650 ------- .../schema/additional_properties_schema.py | 280 --- ...ditional_properties_with_array_of_enums.py | 157 -- .../components/schema/address.py | 88 - .../components/schema/animal.py | 146 -- .../components/schema/animal_farm.py | 75 - .../components/schema/any_type_and_format.py | 295 ---- .../components/schema/any_type_not_string.py | 27 - .../components/schema/api_response.py | 146 -- .../openapi_client/components/schema/apple.py | 166 -- .../components/schema/apple_req.py | 141 -- .../schema/array_holding_any_type.py | 74 - .../schema/array_of_array_of_number_only.py | 223 --- .../components/schema/array_of_enums.py | 92 - .../components/schema/array_of_number_only.py | 167 -- .../components/schema/array_test.py | 418 ----- .../schema/array_with_validations_in_items.py | 79 - .../components/schema/banana.py | 106 -- .../components/schema/banana_req.py | 147 -- .../openapi_client/components/schema/bar.py | 27 - .../components/schema/basque_pig.py | 158 -- .../components/schema/boolean.py | 13 - .../components/schema/boolean_enum.py | 71 - .../components/schema/capitalization.py | 200 --- .../openapi_client/components/schema/cat.py | 123 -- .../components/schema/category.py | 135 -- .../components/schema/child_cat.py | 123 -- .../components/schema/class_model.py | 98 -- .../components/schema/client.py | 110 -- .../schema/complex_quadrilateral.py | 178 -- ...d_any_of_different_types_no_validations.py | 116 -- .../components/schema/composed_array.py | 74 - .../components/schema/composed_bool.py | 31 - .../components/schema/composed_none.py | 32 - .../components/schema/composed_number.py | 32 - .../components/schema/composed_object.py | 41 - .../schema/composed_one_of_different_types.py | 132 -- .../components/schema/composed_string.py | 31 - .../components/schema/currency.py | 85 - .../components/schema/danish_pig.py | 158 -- .../components/schema/date_time_test.py | 28 - .../schema/date_time_with_validations.py | 30 - .../schema/date_with_validations.py | 30 - .../components/schema/decimal_payload.py | 13 - .../openapi_client/components/schema/dog.py | 123 -- .../components/schema/drawing.py | 259 --- .../components/schema/enum_arrays.py | 322 ---- .../components/schema/enum_class.py | 128 -- .../components/schema/enum_test.py | 563 ------ .../components/schema/equilateral_triangle.py | 178 -- .../openapi_client/components/schema/file.py | 112 -- .../schema/file_schema_test_class.py | 186 -- .../openapi_client/components/schema/foo.py | 111 -- .../components/schema/format_test.py | 632 ------- .../components/schema/from_schema.py | 128 -- .../openapi_client/components/schema/fruit.py | 101 -- .../components/schema/fruit_req.py | 32 - .../components/schema/gm_fruit.py | 101 -- .../components/schema/grandparent_animal.py | 114 -- .../components/schema/has_only_read_only.py | 128 -- .../components/schema/health_check_result.py | 154 -- .../components/schema/integer_enum.py | 100 -- .../components/schema/integer_enum_big.py | 100 -- .../schema/integer_enum_one_value.py | 72 - .../schema/integer_enum_with_default_value.py | 100 -- .../components/schema/integer_max10.py | 28 - .../components/schema/integer_min15.py | 28 - .../components/schema/isosceles_triangle.py | 178 -- .../openapi_client/components/schema/items.py | 76 - .../components/schema/items_schema.py | 146 -- .../components/schema/json_patch_request.py | 87 - .../json_patch_request_add_replace_test.py | 224 --- .../schema/json_patch_request_move_copy.py | 199 --- .../schema/json_patch_request_remove.py | 172 -- .../components/schema/mammal.py | 44 - .../components/schema/map_test.py | 528 ------ ...perties_and_additional_properties_class.py | 226 --- .../openapi_client/components/schema/money.py | 125 -- .../schema/multi_properties_schema.py | 222 --- .../components/schema/my_object_dto.py | 113 -- .../openapi_client/components/schema/name.py | 132 -- .../schema/no_additional_properties.py | 132 -- .../components/schema/nullable_class.py | 1412 --------------- .../components/schema/nullable_shape.py | 34 - .../components/schema/nullable_string.py | 53 - .../components/schema/number.py | 13 - .../components/schema/number_only.py | 111 -- .../schema/number_with_exclusive_min_max.py | 29 - .../schema/number_with_validations.py | 29 - .../schema/obj_with_required_props.py | 107 -- .../schema/obj_with_required_props_base.py | 103 -- .../components/schema/object_interface.py | 13 - ...ject_model_with_arg_and_args_properties.py | 116 -- .../schema/object_model_with_ref_props.py | 150 -- ..._with_req_test_prop_from_unset_add_prop.py | 137 -- .../object_with_colliding_properties.py | 132 -- .../schema/object_with_decimal_properties.py | 148 -- .../object_with_difficultly_named_props.py | 102 -- ...object_with_inline_composition_property.py | 129 -- ...ect_with_invalid_named_refed_properties.py | 111 -- .../object_with_non_intersecting_values.py | 131 -- .../schema/object_with_only_optional_props.py | 256 --- .../schema/object_with_optional_test_prop.py | 110 -- .../schema/object_with_validations.py | 37 - .../openapi_client/components/schema/order.py | 286 --- .../schema/paginated_result_my_object_dto.py | 184 -- .../components/schema/parent_pet.py | 49 - .../openapi_client/components/schema/pet.py | 392 ----- .../openapi_client/components/schema/pig.py | 41 - .../components/schema/player.py | 130 -- .../components/schema/public_key.py | 112 -- .../components/schema/quadrilateral.py | 41 - .../schema/quadrilateral_interface.py | 157 -- .../components/schema/read_only_first.py | 128 -- .../components/schema/ref_pet.py | 13 - .../req_props_from_explicit_add_props.py | 109 -- .../schema/req_props_from_true_add_props.py | 105 -- .../schema/req_props_from_unset_add_props.py | 97 -- .../components/schema/return.py | 98 -- .../components/schema/scalene_triangle.py | 178 -- .../schema/self_referencing_array_model.py | 73 - .../schema/self_referencing_object_model.py | 132 -- .../openapi_client/components/schema/shape.py | 41 - .../components/schema/shape_or_null.py | 45 - .../components/schema/simple_quadrilateral.py | 178 -- .../components/schema/some_object.py | 29 - .../components/schema/special_model_name.py | 112 -- .../components/schema/string.py | 13 - .../components/schema/string_boolean_map.py | 88 - .../components/schema/string_enum.py | 139 -- .../schema/string_enum_with_default_value.py | 100 -- .../schema/string_with_validation.py | 27 - .../openapi_client/components/schema/tag.py | 128 -- .../components/schema/triangle.py | 44 - .../components/schema/triangle_interface.py | 157 -- .../openapi_client/components/schema/user.py | 375 ---- .../components/schema/uuid_string.py | 28 - .../openapi_client/components/schema/whale.py | 199 --- .../openapi_client/components/schema/zebra.py | 274 --- .../components/schemas/__init__.py | 154 -- .../components/security_schemes/__init__.py | 0 .../security_scheme_api_key.py | 18 - .../security_scheme_api_key_query.py | 18 - .../security_scheme_bearer_test.py | 17 - .../security_scheme_http_basic_test.py | 16 - .../security_scheme_http_signature_test.py | 16 - .../security_scheme_open_id_connect_test.py | 17 - .../security_scheme_petstore_auth.py | 25 - .../openapi_client/configurations/__init__.py | 0 .../configurations/api_configuration.py | 407 ----- .../configurations/schema_configuration.py | 108 -- .../python/src/openapi_client/exceptions.py | 132 -- .../src/openapi_client/paths/__init__.py | 3 - .../paths/another_fake_dummy/__init__.py | 5 - .../another_fake_dummy/patch/__init__.py | 0 .../another_fake_dummy/patch/operation.py | 143 -- .../patch/request_body/__init__.py | 12 - .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/common_param_sub_dir/__init__.py | 5 - .../common_param_sub_dir/delete/__init__.py | 0 .../delete/header_parameters.py | 105 -- .../common_param_sub_dir/delete/operation.py | 166 -- .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 18 - .../delete/parameters/parameter_0/schema.py | 13 - .../delete/parameters/parameter_1/__init__.py | 19 - .../delete/parameters/parameter_1/schema.py | 80 - .../delete/path_parameters.py | 103 -- .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 - .../common_param_sub_dir/get/__init__.py | 0 .../common_param_sub_dir/get/operation.py | 161 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 13 - .../get/path_parameters.py | 103 -- .../get/query_parameters.py | 105 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../parameters/__init__.py | 0 .../parameters/parameter_0/__init__.py | 19 - .../parameters/parameter_0/schema.py | 80 - .../common_param_sub_dir/post/__init__.py | 0 .../post/header_parameters.py | 105 -- .../common_param_sub_dir/post/operation.py | 164 -- .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 18 - .../post/parameters/parameter_0/schema.py | 13 - .../post/path_parameters.py | 103 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 - .../src/openapi_client/paths/fake/__init__.py | 5 - .../paths/fake/delete/__init__.py | 0 .../paths/fake/delete/header_parameters.py | 146 -- .../paths/fake/delete/operation.py | 186 -- .../paths/fake/delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 20 - .../delete/parameters/parameter_0/schema.py | 13 - .../delete/parameters/parameter_1/__init__.py | 19 - .../delete/parameters/parameter_1/schema.py | 80 - .../delete/parameters/parameter_2/__init__.py | 20 - .../delete/parameters/parameter_2/schema.py | 13 - .../delete/parameters/parameter_3/__init__.py | 19 - .../delete/parameters/parameter_3/schema.py | 13 - .../delete/parameters/parameter_4/__init__.py | 18 - .../delete/parameters/parameter_4/schema.py | 80 - .../delete/parameters/parameter_5/__init__.py | 19 - .../delete/parameters/parameter_5/schema.py | 13 - .../paths/fake/delete/query_parameters.py | 167 -- .../paths/fake/delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 - .../paths/fake/delete/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../openapi_client/paths/fake/get/__init__.py | 0 .../paths/fake/get/header_parameters.py | 139 -- .../paths/fake/get/operation.py | 239 --- .../paths/fake/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 18 - .../fake/get/parameters/parameter_0/schema.py | 137 -- .../get/parameters/parameter_1/__init__.py | 18 - .../fake/get/parameters/parameter_1/schema.py | 95 - .../get/parameters/parameter_2/__init__.py | 19 - .../fake/get/parameters/parameter_2/schema.py | 137 -- .../get/parameters/parameter_3/__init__.py | 19 - .../fake/get/parameters/parameter_3/schema.py | 95 - .../get/parameters/parameter_4/__init__.py | 19 - .../fake/get/parameters/parameter_4/schema.py | 81 - .../get/parameters/parameter_5/__init__.py | 19 - .../fake/get/parameters/parameter_5/schema.py | 53 - .../paths/fake/get/query_parameters.py | 187 -- .../paths/fake/get/request_body/__init__.py | 22 - .../fake/get/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 334 ---- .../paths/fake/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../get/responses/response_404/__init__.py | 31 - .../response_404/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake/patch/__init__.py | 0 .../paths/fake/patch/operation.py | 143 -- .../paths/fake/patch/request_body/__init__.py | 12 - .../paths/fake/patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake/post/__init__.py | 0 .../paths/fake/post/operation.py | 175 -- .../paths/fake/post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 434 ----- .../paths/fake/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 - .../post/responses/response_404/__init__.py | 22 - .../paths/fake/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 146 -- .../get/request_body/__init__.py | 22 - .../get/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_body_with_file_schema/__init__.py | 5 - .../put/__init__.py | 0 .../put/operation.py | 135 -- .../put/request_body/__init__.py | 23 - .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 - .../fake_body_with_query_params/__init__.py | 5 - .../put/__init__.py | 0 .../put/operation.py | 162 -- .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 - .../put/parameters/parameter_0/schema.py | 13 - .../put/query_parameters.py | 97 -- .../put/request_body/__init__.py | 23 - .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 - .../fake_case_sensitive_params/__init__.py | 5 - .../put/__init__.py | 0 .../put/operation.py | 140 -- .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 - .../put/parameters/parameter_0/schema.py | 13 - .../put/parameters/parameter_1/__init__.py | 20 - .../put/parameters/parameter_1/schema.py | 13 - .../put/parameters/parameter_2/__init__.py | 20 - .../put/parameters/parameter_2/schema.py | 13 - .../put/query_parameters.py | 128 -- .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 - .../paths/fake_classname_test/__init__.py | 5 - .../fake_classname_test/patch/__init__.py | 0 .../fake_classname_test/patch/operation.py | 157 -- .../patch/request_body/__init__.py | 12 - .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../patch/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../paths/fake_delete_coffee_id/__init__.py | 5 - .../fake_delete_coffee_id/delete/__init__.py | 0 .../fake_delete_coffee_id/delete/operation.py | 141 -- .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 19 - .../delete/parameters/parameter_0/schema.py | 13 - .../delete/path_parameters.py | 97 -- .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 - .../responses/response_default/__init__.py | 22 - .../paths/fake_health/__init__.py | 5 - .../paths/fake_health/get/__init__.py | 0 .../paths/fake_health/get/operation.py | 117 -- .../fake_health/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 136 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 83 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 - .../paths/fake_inline_composition/__init__.py | 5 - .../fake_inline_composition/post/__init__.py | 0 .../fake_inline_composition/post/operation.py | 236 --- .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 - .../post/parameters/parameter_0/schema.py | 34 - .../post/parameters/parameter_1/__init__.py | 19 - .../post/parameters/parameter_1/schema.py | 124 -- .../post/query_parameters.py | 135 -- .../post/request_body/__init__.py | 28 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 34 - .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 124 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 40 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 34 - .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 124 -- .../paths/fake_json_form_data/__init__.py | 5 - .../paths/fake_json_form_data/get/__init__.py | 0 .../fake_json_form_data/get/operation.py | 139 -- .../get/request_body/__init__.py | 22 - .../get/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 111 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../paths/fake_json_patch/__init__.py | 5 - .../paths/fake_json_patch/patch/__init__.py | 0 .../paths/fake_json_patch/patch/operation.py | 139 -- .../patch/request_body/__init__.py | 22 - .../patch/request_body/content/__init__.py | 0 .../application_json_patchjson/__init__.py | 0 .../application_json_patchjson/schema.py | 13 - .../patch/responses/__init__.py | 0 .../patch/responses/response_200/__init__.py | 13 - .../paths/fake_json_with_charset/__init__.py | 5 - .../fake_json_with_charset/post/__init__.py | 0 .../fake_json_with_charset/post/operation.py | 146 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../application_json_charsetutf8/__init__.py | 0 .../application_json_charsetutf8/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../application_json_charsetutf8/__init__.py | 0 .../application_json_charsetutf8/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 190 -- .../post/request_body/__init__.py | 28 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 105 -- .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 105 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_multiple_response_bodies/__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 127 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_202/__init__.py | 31 - .../response_202/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_multiple_securities/__init__.py | 5 - .../fake_multiple_securities/get/__init__.py | 0 .../fake_multiple_securities/get/operation.py | 137 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 13 - .../security/security_requirement_object_1.py | 15 - .../security/security_requirement_object_2.py | 14 - .../paths/fake_obj_in_query/__init__.py | 5 - .../paths/fake_obj_in_query/get/__init__.py | 0 .../paths/fake_obj_in_query/get/operation.py | 139 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 105 -- .../fake_obj_in_query/get/query_parameters.py | 109 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/cookie_parameters.py | 154 -- .../post/header_parameters.py | 135 -- .../post/operation.py | 287 --- .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 - .../post/parameters/parameter_0/schema.py | 13 - .../post/parameters/parameter_1/__init__.py | 19 - .../post/parameters/parameter_1/schema.py | 13 - .../post/parameters/parameter_10/__init__.py | 19 - .../post/parameters/parameter_10/schema.py | 13 - .../post/parameters/parameter_11/__init__.py | 19 - .../post/parameters/parameter_11/schema.py | 13 - .../post/parameters/parameter_12/__init__.py | 19 - .../post/parameters/parameter_12/schema.py | 13 - .../post/parameters/parameter_13/__init__.py | 19 - .../post/parameters/parameter_13/schema.py | 13 - .../post/parameters/parameter_14/__init__.py | 19 - .../post/parameters/parameter_14/schema.py | 13 - .../post/parameters/parameter_15/__init__.py | 19 - .../post/parameters/parameter_15/schema.py | 13 - .../post/parameters/parameter_16/__init__.py | 19 - .../post/parameters/parameter_16/schema.py | 13 - .../post/parameters/parameter_17/__init__.py | 19 - .../post/parameters/parameter_17/schema.py | 13 - .../post/parameters/parameter_18/__init__.py | 19 - .../post/parameters/parameter_18/schema.py | 13 - .../post/parameters/parameter_2/__init__.py | 19 - .../post/parameters/parameter_2/schema.py | 13 - .../post/parameters/parameter_3/__init__.py | 19 - .../post/parameters/parameter_3/schema.py | 13 - .../post/parameters/parameter_4/__init__.py | 19 - .../post/parameters/parameter_4/schema.py | 13 - .../post/parameters/parameter_5/__init__.py | 18 - .../post/parameters/parameter_5/schema.py | 13 - .../post/parameters/parameter_6/__init__.py | 18 - .../post/parameters/parameter_6/schema.py | 13 - .../post/parameters/parameter_7/__init__.py | 18 - .../post/parameters/parameter_7/schema.py | 13 - .../post/parameters/parameter_8/__init__.py | 18 - .../post/parameters/parameter_8/schema.py | 13 - .../post/parameters/parameter_9/__init__.py | 19 - .../post/parameters/parameter_9/schema.py | 13 - .../post/path_parameters.py | 138 -- .../post/query_parameters.py | 154 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_pem_content_type/__init__.py | 5 - .../fake_pem_content_type/get/__init__.py | 0 .../fake_pem_content_type/get/operation.py | 143 -- .../get/request_body/__init__.py | 22 - .../get/request_body/content/__init__.py | 0 .../application_x_pem_file/__init__.py | 0 .../content/application_x_pem_file/schema.py | 13 - .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../application_x_pem_file/__init__.py | 0 .../content/application_x_pem_file/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 186 -- .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 - .../post/parameters/parameter_0/schema.py | 13 - .../post/path_parameters.py | 97 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 144 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 24 - .../parameter_0/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/query_parameters.py | 103 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_redirection/__init__.py | 5 - .../paths/fake_redirection/get/__init__.py | 0 .../paths/fake_redirection/get/operation.py | 137 -- .../get/responses/__init__.py | 0 .../get/responses/response_303/__init__.py | 22 - .../get/responses/response_3xx/__init__.py | 22 - .../paths/fake_ref_obj_in_query/__init__.py | 5 - .../fake_ref_obj_in_query/get/__init__.py | 0 .../fake_ref_obj_in_query/get/operation.py | 139 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 13 - .../get/query_parameters.py | 109 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../fake_refs_array_of_enums/__init__.py | 5 - .../fake_refs_array_of_enums/post/__init__.py | 0 .../post/operation.py | 146 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_arraymodel/__init__.py | 5 - .../fake_refs_arraymodel/post/__init__.py | 0 .../fake_refs_arraymodel/post/operation.py | 145 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_boolean/__init__.py | 5 - .../paths/fake_refs_boolean/post/__init__.py | 0 .../paths/fake_refs_boolean/post/operation.py | 142 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 145 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_enum/__init__.py | 5 - .../paths/fake_refs_enum/post/__init__.py | 0 .../paths/fake_refs_enum/post/operation.py | 166 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_refs_enum/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 34 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_mammal/__init__.py | 5 - .../paths/fake_refs_mammal/post/__init__.py | 0 .../paths/fake_refs_mammal/post/operation.py | 142 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_number/__init__.py | 5 - .../paths/fake_refs_number/post/__init__.py | 0 .../paths/fake_refs_number/post/operation.py | 145 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 145 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_refs_string/__init__.py | 5 - .../paths/fake_refs_string/post/__init__.py | 0 .../paths/fake_refs_string/post/operation.py | 142 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_response_without_schema/__init__.py | 5 - .../get/__init__.py | 0 .../get/operation.py | 118 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 35 - .../fake_test_query_paramters/__init__.py | 5 - .../fake_test_query_paramters/put/__init__.py | 0 .../put/operation.py | 146 -- .../put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 20 - .../put/parameters/parameter_0/schema.py | 63 - .../put/parameters/parameter_1/__init__.py | 19 - .../put/parameters/parameter_1/schema.py | 63 - .../put/parameters/parameter_2/__init__.py | 19 - .../put/parameters/parameter_2/schema.py | 63 - .../put/parameters/parameter_3/__init__.py | 19 - .../put/parameters/parameter_3/schema.py | 63 - .../put/parameters/parameter_4/__init__.py | 20 - .../put/parameters/parameter_4/schema.py | 63 - .../put/parameters/parameter_5/__init__.py | 20 - .../put/parameters/parameter_5/schema.py | 13 - .../put/query_parameters.py | 200 --- .../put/responses/__init__.py | 0 .../put/responses/response_200/__init__.py | 13 - .../fake_upload_download_file/__init__.py | 5 - .../post/__init__.py | 0 .../post/operation.py | 149 -- .../post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../application_octet_stream/__init__.py | 0 .../application_octet_stream/schema.py | 13 - .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../application_octet_stream/__init__.py | 0 .../application_octet_stream/schema.py | 13 - .../paths/fake_upload_file/__init__.py | 5 - .../paths/fake_upload_file/post/__init__.py | 0 .../paths/fake_upload_file/post/operation.py | 146 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/fake_upload_files/__init__.py | 5 - .../paths/fake_upload_files/post/__init__.py | 0 .../paths/fake_upload_files/post/operation.py | 146 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 166 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../fake_wild_card_responses/__init__.py | 5 - .../fake_wild_card_responses/get/__init__.py | 0 .../fake_wild_card_responses/get/operation.py | 183 -- .../get/responses/__init__.py | 0 .../get/responses/response_1xx/__init__.py | 31 - .../response_1xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_200/__init__.py | 31 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_2xx/__init__.py | 31 - .../response_2xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_3xx/__init__.py | 31 - .../response_3xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_4xx/__init__.py | 31 - .../response_4xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_5xx/__init__.py | 31 - .../response_5xx/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../src/openapi_client/paths/foo/__init__.py | 5 - .../openapi_client/paths/foo/get/__init__.py | 0 .../openapi_client/paths/foo/get/operation.py | 94 - .../paths/foo/get/responses/__init__.py | 0 .../responses/response_default/__init__.py | 31 - .../response_default/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 107 -- .../paths/foo/get/servers/__init__.py | 0 .../paths/foo/get/servers/server_0.py | 14 - .../paths/foo/get/servers/server_1.py | 180 -- .../src/openapi_client/paths/pet/__init__.py | 5 - .../openapi_client/paths/pet/post/__init__.py | 0 .../paths/pet/post/operation.py | 219 --- .../paths/pet/post/request_body/__init__.py | 12 - .../paths/pet/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 - .../post/responses/response_405/__init__.py | 22 - .../paths/pet/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../security/security_requirement_object_2.py | 14 - .../openapi_client/paths/pet/put/__init__.py | 0 .../openapi_client/paths/pet/put/operation.py | 210 --- .../paths/pet/put/request_body/__init__.py | 12 - .../paths/pet/put/responses/__init__.py | 0 .../put/responses/response_400/__init__.py | 22 - .../put/responses/response_404/__init__.py | 22 - .../put/responses/response_405/__init__.py | 22 - .../paths/pet/put/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../paths/pet_find_by_status/__init__.py | 5 - .../paths/pet_find_by_status/get/__init__.py | 0 .../paths/pet_find_by_status/get/operation.py | 187 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 153 -- .../get/query_parameters.py | 103 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../security/security_requirement_object_2.py | 14 - .../pet_find_by_status/servers/__init__.py | 0 .../pet_find_by_status/servers/server_0.py | 14 - .../pet_find_by_status/servers/server_1.py | 180 -- .../paths/pet_find_by_tags/__init__.py | 5 - .../paths/pet_find_by_tags/get/__init__.py | 0 .../paths/pet_find_by_tags/get/operation.py | 175 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 63 - .../pet_find_by_tags/get/query_parameters.py | 103 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../pet_find_by_tags/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../paths/pet_pet_id/__init__.py | 5 - .../paths/pet_pet_id/delete/__init__.py | 0 .../pet_pet_id/delete/header_parameters.py | 105 -- .../paths/pet_pet_id/delete/operation.py | 189 -- .../pet_pet_id/delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 18 - .../delete/parameters/parameter_0/schema.py | 13 - .../delete/parameters/parameter_1/__init__.py | 19 - .../delete/parameters/parameter_1/schema.py | 13 - .../pet_pet_id/delete/path_parameters.py | 97 -- .../pet_pet_id/delete/responses/__init__.py | 0 .../delete/responses/response_400/__init__.py | 22 - .../pet_pet_id/delete/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../paths/pet_pet_id/get/__init__.py | 0 .../paths/pet_pet_id/get/operation.py | 185 -- .../pet_pet_id/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 13 - .../paths/pet_pet_id/get/path_parameters.py | 97 -- .../pet_pet_id/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../get/responses/response_404/__init__.py | 22 - .../paths/pet_pet_id/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../paths/pet_pet_id/post/__init__.py | 0 .../paths/pet_pet_id/post/operation.py | 187 -- .../pet_pet_id/post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 - .../post/parameters/parameter_0/schema.py | 13 - .../paths/pet_pet_id/post/path_parameters.py | 97 -- .../pet_pet_id/post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../__init__.py | 0 .../schema.py | 123 -- .../pet_pet_id/post/responses/__init__.py | 0 .../post/responses/response_405/__init__.py | 22 - .../pet_pet_id/post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../security/security_requirement_object_1.py | 14 - .../paths/pet_pet_id_upload_image/__init__.py | 5 - .../pet_pet_id_upload_image/post/__init__.py | 0 .../pet_pet_id_upload_image/post/operation.py | 186 -- .../post/parameters/__init__.py | 0 .../post/parameters/parameter_0/__init__.py | 19 - .../post/parameters/parameter_0/schema.py | 13 - .../post/path_parameters.py | 97 -- .../post/request_body/__init__.py | 22 - .../post/request_body/content/__init__.py | 0 .../content/multipart_form_data/__init__.py | 0 .../content/multipart_form_data/schema.py | 126 -- .../post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 13 - .../post/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../openapi_client/paths/solidus/__init__.py | 5 - .../paths/solidus/get/__init__.py | 0 .../paths/solidus/get/operation.py | 108 -- .../paths/solidus/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../paths/store_inventory/__init__.py | 5 - .../paths/store_inventory/get/__init__.py | 0 .../paths/store_inventory/get/operation.py | 131 -- .../store_inventory/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 13 - .../store_inventory/get/security/__init__.py | 0 .../security/security_requirement_object_0.py | 14 - .../paths/store_order/__init__.py | 5 - .../paths/store_order/post/__init__.py | 0 .../paths/store_order/post/operation.py | 166 -- .../store_order/post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../store_order/post/responses/__init__.py | 0 .../post/responses/response_200/__init__.py | 40 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../post/responses/response_400/__init__.py | 22 - .../paths/store_order_order_id/__init__.py | 5 - .../store_order_order_id/delete/__init__.py | 0 .../store_order_order_id/delete/operation.py | 145 -- .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 19 - .../delete/parameters/parameter_0/schema.py | 13 - .../delete/path_parameters.py | 97 -- .../delete/responses/__init__.py | 0 .../delete/responses/response_400/__init__.py | 22 - .../delete/responses/response_404/__init__.py | 22 - .../store_order_order_id/get/__init__.py | 0 .../store_order_order_id/get/operation.py | 171 -- .../get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 19 - .../get/parameters/parameter_0/schema.py | 24 - .../get/path_parameters.py | 97 -- .../get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../get/responses/response_404/__init__.py | 22 - .../src/openapi_client/paths/user/__init__.py | 5 - .../paths/user/post/__init__.py | 0 .../paths/user/post/operation.py | 114 -- .../paths/user/post/request_body/__init__.py | 23 - .../post/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../paths/user/post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 - .../paths/user_create_with_array/__init__.py | 5 - .../user_create_with_array/post/__init__.py | 0 .../user_create_with_array/post/operation.py | 114 -- .../post/request_body/__init__.py | 12 - .../post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 - .../paths/user_create_with_list/__init__.py | 5 - .../user_create_with_list/post/__init__.py | 0 .../user_create_with_list/post/operation.py | 114 -- .../post/request_body/__init__.py | 12 - .../post/responses/__init__.py | 0 .../responses/response_default/__init__.py | 22 - .../paths/user_login/__init__.py | 5 - .../paths/user_login/get/__init__.py | 0 .../paths/user_login/get/operation.py | 171 -- .../user_login/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 20 - .../get/parameters/parameter_0/schema.py | 13 - .../get/parameters/parameter_1/__init__.py | 20 - .../get/parameters/parameter_1/schema.py | 13 - .../paths/user_login/get/query_parameters.py | 114 -- .../user_login/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 55 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../response_200/header_parameters.py | 151 -- .../response_200/headers/__init__.py | 0 .../headers/header_int32/__init__.py | 12 - .../headers/header_number_header/__init__.py | 12 - .../__init__.py | 12 - .../header_x_expires_after/__init__.py | 17 - .../headers/header_x_expires_after/schema.py | 13 - .../headers/header_x_rate_limit/__init__.py | 23 - .../header_x_rate_limit/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../paths/user_logout/__init__.py | 5 - .../paths/user_logout/get/__init__.py | 0 .../paths/user_logout/get/operation.py | 86 - .../user_logout/get/responses/__init__.py | 0 .../responses/response_default/__init__.py | 13 - .../paths/user_username/__init__.py | 5 - .../paths/user_username/delete/__init__.py | 0 .../paths/user_username/delete/operation.py | 156 -- .../delete/parameters/__init__.py | 0 .../delete/parameters/parameter_0/__init__.py | 12 - .../user_username/delete/path_parameters.py | 97 -- .../delete/responses/__init__.py | 0 .../delete/responses/response_200/__init__.py | 13 - .../delete/responses/response_404/__init__.py | 22 - .../paths/user_username/get/__init__.py | 0 .../paths/user_username/get/operation.py | 171 -- .../user_username/get/parameters/__init__.py | 0 .../get/parameters/parameter_0/__init__.py | 12 - .../user_username/get/path_parameters.py | 97 -- .../user_username/get/responses/__init__.py | 0 .../get/responses/response_200/__init__.py | 40 - .../response_200/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../content/application_xml/__init__.py | 0 .../content/application_xml/schema.py | 13 - .../get/responses/response_400/__init__.py | 22 - .../get/responses/response_404/__init__.py | 22 - .../paths/user_username/put/__init__.py | 0 .../paths/user_username/put/operation.py | 173 -- .../user_username/put/parameters/__init__.py | 0 .../put/parameters/parameter_0/__init__.py | 12 - .../user_username/put/path_parameters.py | 97 -- .../put/request_body/__init__.py | 23 - .../put/request_body/content/__init__.py | 0 .../content/application_json/__init__.py | 0 .../content/application_json/schema.py | 13 - .../user_username/put/responses/__init__.py | 0 .../put/responses/response_400/__init__.py | 22 - .../put/responses/response_404/__init__.py | 22 - .../python/src/openapi_client/py.typed | 0 .../python/src/openapi_client/rest.py | 270 --- .../src/openapi_client/schemas/__init__.py | 148 -- .../src/openapi_client/schemas/format.py | 115 -- .../schemas/original_immutabledict.py | 97 -- .../src/openapi_client/schemas/schema.py | 729 -------- .../src/openapi_client/schemas/schemas.py | 375 ---- .../src/openapi_client/schemas/validation.py | 1446 ---------------- .../src/openapi_client/security_schemes.py | 257 --- .../python/src/openapi_client/server.py | 34 - .../src/openapi_client/servers/__init__.py | 0 .../src/openapi_client/servers/server_0.py | 291 ---- .../src/openapi_client/servers/server_1.py | 183 -- .../src/openapi_client/servers/server_2.py | 17 - .../openapi_client/shared_imports/__init__.py | 0 .../shared_imports/header_imports.py | 15 - .../shared_imports/operation_imports.py | 18 - .../shared_imports/response_imports.py | 25 - .../shared_imports/schema_imports.py | 28 - .../shared_imports/security_scheme_imports.py | 12 - .../shared_imports/server_imports.py | 13 - .../python/src/openapi_client/signing.py | 415 ----- .../components/schema/_200_response.py | 19 +- .../codegen/clicommands/Generate.java | 4 +- .../codegen/config/DynamicSettings.java | 22 +- .../codegen/config/WorkflowSettings.java | 2 +- .../codegen/generators/DefaultGenerator.java | 5 +- .../generators/JavaClientGenerator.java | 21 +- .../generators/PythonClientGenerator.java | 1 + .../models/CodeGeneratorSettings.java | 11 +- 6066 files changed, 57 insertions(+), 190954 deletions(-) delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/server.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/server.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py delete mode 100644 samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/api_client.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/api_response.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/exceptions.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/py.typed delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/rest.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/server.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py delete mode 100644 samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/api_client.py delete mode 100644 samples/client/petstore/python/src/openapi_client/api_response.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/path_to_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/foo.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/address.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/animal.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/api_response.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/apple.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/banana.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/bar.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/boolean.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/cat.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/category.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/class_model.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/client.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/currency.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/dog.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/drawing.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/file.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/foo.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/format_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/fruit.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/items.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/mammal.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/map_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/money.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/name.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_only.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/order.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/pet.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/pig.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/player.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/public_key.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/return.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/shape.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/some_object.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/tag.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/triangle.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/user.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/whale.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schema/zebra.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py delete mode 100644 samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py delete mode 100644 samples/client/petstore/python/src/openapi_client/configurations/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py delete mode 100644 samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py delete mode 100644 samples/client/petstore/python/src/openapi_client/exceptions.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/py.typed delete mode 100644 samples/client/petstore/python/src/openapi_client/rest.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/format.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/schema.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/schemas.py delete mode 100644 samples/client/petstore/python/src/openapi_client/schemas/validation.py delete mode 100644 samples/client/petstore/python/src/openapi_client/security_schemes.py delete mode 100644 samples/client/petstore/python/src/openapi_client/server.py delete mode 100644 samples/client/petstore/python/src/openapi_client/servers/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_0.py delete mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_1.py delete mode 100644 samples/client/petstore/python/src/openapi_client/servers/server_2.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py delete mode 100644 samples/client/petstore/python/src/openapi_client/signing.py diff --git a/bin/generate-samples.sh b/bin/generate-samples.sh index a84ef4aa9ed..a92de09b4cb 100755 --- a/bin/generate-samples.sh +++ b/bin/generate-samples.sh @@ -10,6 +10,8 @@ if [ ! -f "$executable" ]; then (cd "${root}" && mvn -B --no-snapshot-updates clean package -DskipTests=true -Dmaven.javadoc.skip=true -Djacoco.skip=true) fi +# -ea -> enable assertions +# -server -> server version of the VM which has more complex optimizations, + is tuned to maximize performance export JAVA_OPTS="${JAVA_OPTS} -ea -server -Duser.timezone=UTC" export BATCH_OPTS="${BATCH_OPTS:-}" @@ -53,10 +55,10 @@ if [[ ${#files[@]} -eq 1 && "${files[0]}" != *'*'* ]]; then java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]} else echo "Please press CTRL+C to stop or the script will continue in 5 seconds." - sleep 5 if [ ${#files[@]} -eq 0 ]; then files=("${root}"/bin/generate_samples_configs/*.yaml) fi + sleep 5 # shellcheck disable=SC2086 # shellcheck disable=SC2068 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py deleted file mode 100644 index feea94e1198..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -__version__ = "1.0.0" - -# import ApiClient -from unit_test_api.api_client import ApiClient - -# import Configuration -from unit_test_api.configurations.api_configuration import ApiConfiguration - -# import exceptions -from unit_test_api.exceptions import OpenApiException -from unit_test_api.exceptions import ApiAttributeError -from unit_test_api.exceptions import ApiTypeError -from unit_test_api.exceptions import ApiValueError -from unit_test_api.exceptions import ApiKeyError -from unit_test_api.exceptions import ApiException diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py deleted file mode 100644 index 83b78940685..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_client.py +++ /dev/null @@ -1,1402 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import datetime -import dataclasses -import decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing import pool -import re -import tempfile -import typing -import typing_extensions -from urllib import parse -import urllib3 -from urllib3 import _collections, fields - - -from unit_test_api import exceptions, rest, schemas, security_schemes, api_response -from unit_test_api.configurations import api_configuration, schema_configuration as schema_configuration_ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj: typing.Any): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return obj - elif isinstance(obj, bool): - # must be before int check - return obj - elif isinstance(obj, int): - return obj - elif obj is None: - return None - elif isinstance(obj, (dict, schemas.immutabledict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -@dataclasses.dataclass -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - prefix: str - separator: str - first: bool = True - item_separator: str = dataclasses.field(init=False) - - def __post_init__(self): - self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return parse.quote(str(in_data)) - return str(in_data) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - @classmethod - def _serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - @classmethod - def _deserialize_simple( - cls, - in_data: str, - name: str, - explode: bool, - percent_encode: bool - ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: - raise NotImplementedError( - "Deserialization of style=simple has not yet been added. " - "If you need this how about you submit a PR adding it?" - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -class Encoding: - content_type: str - headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None - style: typing.Optional[ParameterStyle] = None - explode: bool = False - allow_reserved: bool = False - - -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[schemas.Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -class ParameterBase(JSONDetector): - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[schemas.Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] - - _json_encoder = JSONEncoder() - - def __init_subclass__(cls, **kwargs): - if cls.explode is None: - if cls.style is ParameterStyle.FORM: - cls.explode = True - else: - cls.explode = False - - @classmethod - def _serialize_json( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=cls._json_encoder.compact_separators) - return json.dumps(in_data) - -_SERIALIZE_TYPES = typing.Union[ - int, - float, - str, - datetime.date, - datetime.datetime, - None, - bool, - list, - tuple, - dict, - schemas.immutabledict -] - -_JSON_TYPES = typing.Union[ - int, - float, - str, - None, - bool, - typing.Tuple['_JSON_TYPES', ...], - schemas.immutabledict[str, '_JSON_TYPES'], -] - -@dataclasses.dataclass -class PathParameter(ParameterBase, StyleSimpleSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.PATH - style: ParameterStyle = ParameterStyle.SIMPLE - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_label( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_matrix( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = cls._serialize_simple( - in_data=in_data, - name=cls.name, - explode=cls.explode, - percent_encode=True - ) - return cls._to_dict(cls.name, value) - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if cls.style: - if cls.style is ParameterStyle.SIMPLE: - return cls.__serialize_simple(cast_in_data) - elif cls.style is ParameterStyle.LABEL: - return cls.__serialize_label(cast_in_data) - elif cls.style is ParameterStyle.MATRIX: - return cls.__serialize_matrix(cast_in_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class QueryParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.QUERY - style: ParameterStyle = ParameterStyle.FORM - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_space_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_pipe_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._serialize_form( - in_data, - name=cls.name, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: - if cls.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - raise ValueError(f'No iterator possible for style={cls.style}') - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if cls.style: - # TODO update query ones to omit setting values when [] {} or None is input - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - if cls.style is ParameterStyle.FORM: - return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) - return cls._to_dict( - cls.name, - next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) - ) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class CookieParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.FORM - in_type: ParameterInType = ParameterInType.COOKIE - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if cls.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - value = cls._serialize_form( - cast_in_data, - explode=explode, - name=cls.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return cls._to_dict(cls.name, value) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): - style: ParameterStyle = ParameterStyle.SIMPLE - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - explode: bool = False - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = _collections.HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - @classmethod - def serialize_with_name( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - value = cls._serialize_simple(cast_in_data, name, cls.explode, False) - return cls.__to_headers(((name, value),)) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls.__to_headers(((name, value),)) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - @classmethod - def deserialize( - cls, - in_data: str, - name: str - ): - if cls.schema: - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.validate_base(extracted_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - if cls._content_type_is_json(content_type): - cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) - assert media_type.schema is not None - return media_type.schema.validate_base(cast_in_data) - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class HeaderParameterWithoutName(__HeaderParameterBase): - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - name, - skip_validation=skip_validation - ) - - -class HeaderParameter(__HeaderParameterBase): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - cls.name, - skip_validation=skip_validation - ) - -T = typing.TypeVar("T", bound=api_response.ApiResponse) - - -class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None - headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None - - @classmethod - @abc.abstractmethod - def get_response(cls, response, headers, body) -> T: ... - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = parse.urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - @classmethod - def __deserialize_application_octet_stream( - cls, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or cls.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as write_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - write_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - @classmethod - def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: - content_type = response.headers.get('content-type') - deserialized_body = schemas.unset - streamed = response.supports_chunked_reads() - - deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset - if cls.headers is not None and cls.headers_schema is not None: - deserialized_headers = {} - for header_name, header_param in cls.headers.items(): - header_value = response.headers.get(header_name) - if header_value is None: - continue - header_value = header_param.deserialize(header_value, header_name) - deserialized_headers[header_name] = header_value - deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) - - if cls.content is not None: - if content_type not in cls.content: - raise exceptions.ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" - ) - body_schema = cls.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return cls.get_response( - response=response, - headers=deserialized_headers, - body=schemas.unset - ) - - if cls._content_type_is_json(content_type): - body_data = cls.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = cls.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = cls.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - elif content_type == 'application/x-pem-file': - body_data = response.data.decode() - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = schemas.get_class(body_schema) - if body_schema is schemas.BinarySchema: - deserialized_body = body_schema.validate_base(body_data) - else: - deserialized_body = body_schema.validate_base( - body_data, configuration=configuration) - elif streamed: - response.release_conn() - - return cls.get_response( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -@dataclasses.dataclass -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param configuration: api_configuration.ApiConfiguration object for this client - :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client - :param default_headers: any default headers to include when making calls to the API. - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - configuration: api_configuration.ApiConfiguration = dataclasses.field( - default_factory=lambda: api_configuration.ApiConfiguration()) - schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( - default_factory=lambda: schema_configuration_.SchemaConfiguration()) - default_headers: _collections.HTTPHeaderDict = dataclasses.field( - default_factory=lambda: _collections.HTTPHeaderDict()) - pool_threads: int = 1 - user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' - rest_client: rest.RESTClientObject = dataclasses.field(init=False) - - def __post_init__(self): - self._pool = None - self.rest_client = rest.RESTClientObject(self.configuration) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = pool.ThreadPool(self.pool_threads) - return self._pool - - def set_default_header(self, header_name: str, header_value: str): - self.default_headers[header_name] = header_value - - def call_api( - self, - resource_path: str, - method: str, - host: str, - query_params_suffix: typing.Optional[str] = None, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data` - :param security_requirement_object: The security requirement object, used to apply auth when making the call - :param async_req: execute request asynchronously - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystem file and the schemas.BinarySchema - instance will also inherit from FileSchema and schemas.FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - the method will return the response directly. - """ - # header parameters - used_headers = _collections.HTTPHeaderDict(self.default_headers) - user_agent_key = 'User-Agent' - if user_agent_key not in used_headers and self.user_agent: - used_headers[user_agent_key] = self.user_agent - - # auth setting - self.update_params_for_auth( - used_headers, - security_requirement_object, - resource_path, - method, - body, - query_params_suffix - ) - - # must happen after auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - url = host + resource_path - if query_params_suffix: - url += query_params_suffix - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def request( - self, - method: str, - url: str, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - body: typing.Union[str, bytes, None] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "get": - return self.rest_client.get(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "head": - return self.rest_client.head(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "options": - return self.rest_client.options(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "post": - return self.rest_client.post(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "put": - return self.rest_client.put(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "patch": - return self.rest_client.patch(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "delete": - return self.rest_client.delete(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise exceptions.ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth( - self, - headers: _collections.HTTPHeaderDict, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], - resource_path: str, - method: str, - body: typing.Union[str, bytes, None] = None, - query_params_suffix: typing.Optional[str] = None - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param security_requirement_object: the openapi security requirement object - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - return - -@dataclasses.dataclass -class Api: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) - - @staticmethod - def _get_used_path( - used_path: str, - path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - skip_validation: bool = False - ) -> typing.Tuple[str, str]: - used_path_params = {} - if path_params is not None: - for path_parameter in path_parameters: - parameter_data = path_params.get(path_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) - used_path_params.update(serialized_data) - - for k, v in used_path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - query_params_suffix = "" - if query_params is not None: - prefix_separator_iterator = None - for query_parameter in query_parameters: - parameter_data = query_params.get(query_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = query_parameter.serialize( - parameter_data, - prefix_separator_iterator=prefix_separator_iterator, - skip_validation=skip_validation - ) - for serialized_value in serialized_data.values(): - query_params_suffix += serialized_value - return used_path, query_params_suffix - - @staticmethod - def _get_headers( - header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - accept_content_types: typing.Tuple[str, ...] = (), - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - headers = _collections.HTTPHeaderDict() - if header_params is not None: - for parameter in header_parameters: - parameter_data = header_params.get(parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) - headers.extend(serialized_data) - if accept_content_types: - for accept_content_type in accept_content_types: - headers.add('Accept', accept_content_type) - return headers - - def _get_fields_and_body( - self, - request_body: typing.Type[RequestBody], - body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], - content_type: str, - headers: _collections.HTTPHeaderDict - ): - if request_body.required and body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - - if isinstance(body, schemas.Unset): - return None, None - - serialized_fields = None - serialized_body = None - serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) - headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - serialized_fields = serialized_data['fields'] - elif 'body' in serialized_data: - serialized_body = serialized_data['body'] - return serialized_fields, serialized_body - - @staticmethod - def _verify_response_status(response: api_response.ApiResponse): - if not 200 <= response.response.status <= 399: - raise exceptions.ApiException( - status=response.response.status, - reason=response.response.reason, - api_response=response - ) - - -class SerializedRequestBody(typing.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[rest.RequestField, ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType schemas.Schema info - """ - __json_encoder = JSONEncoder() - __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} - content: typing.Dict[str, typing.Type[MediaType]] - required: bool = False - - @classmethod - def __serialize_json( - cls, - in_data: _JSON_TYPES - ) -> SerializedRequestBody: - in_data = cls.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return {'body': json_str} - - @staticmethod - def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: - return {'body': str(in_data)} - - @classmethod - def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: - json_value = cls.__json_encoder.default(value) - request_field = rest.RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - @classmethod - def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: - if isinstance(value, str): - request_field = rest.RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = rest.RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, schemas.FileIO): - # TODO use content.encoding to limit allowed content types if they are present - urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(rest.RequestField, urllib3_request_field) - value.close() - else: - request_field = cls.__multipart_json_item(key=key, value=value) - return request_field - - @classmethod - def __serialize_multipart_form_data( - cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] - ) -> SerializedRequestBody: - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a rest.RequestField for each item with name=key - for item in value: - request_field = cls.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore - fields.append(request_field) - else: - request_field = cls.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return {'fields': tuple(fields)} - - @staticmethod - def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: - if isinstance(in_data, bytes): - return {'body': in_data} - # schemas.FileIO type - used_in_data = in_data.read() - in_data.close() - return {'body': used_in_data} - - @classmethod - def __serialize_application_x_www_form_data( - cls, in_data: schemas.immutabledict[str, _JSON_TYPES] - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - cast_in_data = cls.__json_encoder.default(in_data) - value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return {'body': value} - - @classmethod - def serialize( - cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = cls.content[content_type] - assert media_type.schema is not None - schema = schemas.get_class(media_type.schema) - used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() - cast_in_data = schema.validate_base(in_data, configuration=used_configuration) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if cls._content_type_is_json(content_type): - if isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") - return cls.__serialize_json(cast_in_data) - elif content_type in cls.__plain_txt_content_types: - if not isinstance(cast_in_data, (int, float, str)): - raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") - return cls.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") - return cls.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError( - f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") - return cls.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - if not isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") - return cls.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py deleted file mode 100644 index 805c5f95e40..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/api_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -import urllib3 - -from unit_test_api import schemas - - -@dataclasses.dataclass(frozen=True) -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] - headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] - - -@dataclasses.dataclass(frozen=True) -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py deleted file mode 100644 index 59134cb109c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/path_to_api.py +++ /dev/null @@ -1,536 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody -from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody -from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody -from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody -from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody -from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody -from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody -from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody -from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody -from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody -from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody -from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody -from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody -from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody -from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody -from openapi_client.apis.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from openapi_client.apis.paths.request_body_post_invalid_string_value_for_default_request_body import RequestBodyPostInvalidStringValueForDefaultRequestBody -from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody -from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody -from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody -from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody -from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody -from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody -from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody -from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody -from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody -from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody -from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody -from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody -from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody -from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody -from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody -from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody -from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody -from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_additionalproperties_request_body import RequestBodyPostRefInAdditionalpropertiesRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_allof_request_body import RequestBodyPostRefInAllofRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_anyof_request_body import RequestBodyPostRefInAnyofRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_items_request_body import RequestBodyPostRefInItemsRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_not_request_body import RequestBodyPostRefInNotRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_oneof_request_body import RequestBodyPostRefInOneofRequestBody -from openapi_client.apis.paths.request_body_post_ref_in_property_request_body import RequestBodyPostRefInPropertyRequestBody -from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody -from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody -from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody -from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody -from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody -from openapi_client.apis.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody -from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody -from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody -from openapi_client.apis.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_allof_response_body_for_content_types import ResponseBodyPostRefInAllofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_anyof_response_body_for_content_types import ResponseBodyPostRefInAnyofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_items_response_body_for_content_types import ResponseBodyPostRefInItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_not_response_body_for_content_types import ResponseBodyPostRefInNotResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_oneof_response_body_for_content_types import ResponseBodyPostRefInOneofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ref_in_property_response_body_for_content_types import ResponseBodyPostRefInPropertyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes - -PathToApi = typing.TypedDict( - 'PathToApi', - { - "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody], - "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody], - "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody], - "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody], - "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": typing.Type[RequestBodyPostAllofCombinedWithAnyofOneofRequestBody], - "/requestBody/postAllofRequestBody": typing.Type[RequestBodyPostAllofRequestBody], - "/requestBody/postAllofSimpleTypesRequestBody": typing.Type[RequestBodyPostAllofSimpleTypesRequestBody], - "/requestBody/postAllofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAllofWithBaseSchemaRequestBody], - "/requestBody/postAllofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithOneEmptySchemaRequestBody], - "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody], - "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheLastEmptySchemaRequestBody], - "/requestBody/postAllofWithTwoEmptySchemasRequestBody": typing.Type[RequestBodyPostAllofWithTwoEmptySchemasRequestBody], - "/requestBody/postAnyofComplexTypesRequestBody": typing.Type[RequestBodyPostAnyofComplexTypesRequestBody], - "/requestBody/postAnyofRequestBody": typing.Type[RequestBodyPostAnyofRequestBody], - "/requestBody/postAnyofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAnyofWithBaseSchemaRequestBody], - "/requestBody/postAnyofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAnyofWithOneEmptySchemaRequestBody], - "/requestBody/postArrayTypeMatchesArraysRequestBody": typing.Type[RequestBodyPostArrayTypeMatchesArraysRequestBody], - "/requestBody/postBooleanTypeMatchesBooleansRequestBody": typing.Type[RequestBodyPostBooleanTypeMatchesBooleansRequestBody], - "/requestBody/postByIntRequestBody": typing.Type[RequestBodyPostByIntRequestBody], - "/requestBody/postByNumberRequestBody": typing.Type[RequestBodyPostByNumberRequestBody], - "/requestBody/postBySmallNumberRequestBody": typing.Type[RequestBodyPostBySmallNumberRequestBody], - "/requestBody/postDateTimeFormatRequestBody": typing.Type[RequestBodyPostDateTimeFormatRequestBody], - "/requestBody/postEmailFormatRequestBody": typing.Type[RequestBodyPostEmailFormatRequestBody], - "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": typing.Type[RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody], - "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": typing.Type[RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody], - "/requestBody/postEnumWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostEnumWithEscapedCharactersRequestBody], - "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": typing.Type[RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody], - "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": typing.Type[RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody], - "/requestBody/postEnumsInPropertiesRequestBody": typing.Type[RequestBodyPostEnumsInPropertiesRequestBody], - "/requestBody/postForbiddenPropertyRequestBody": typing.Type[RequestBodyPostForbiddenPropertyRequestBody], - "/requestBody/postHostnameFormatRequestBody": typing.Type[RequestBodyPostHostnameFormatRequestBody], - "/requestBody/postIntegerTypeMatchesIntegersRequestBody": typing.Type[RequestBodyPostIntegerTypeMatchesIntegersRequestBody], - "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody": typing.Type[RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody], - "/requestBody/postInvalidStringValueForDefaultRequestBody": typing.Type[RequestBodyPostInvalidStringValueForDefaultRequestBody], - "/requestBody/postIpv4FormatRequestBody": typing.Type[RequestBodyPostIpv4FormatRequestBody], - "/requestBody/postIpv6FormatRequestBody": typing.Type[RequestBodyPostIpv6FormatRequestBody], - "/requestBody/postJsonPointerFormatRequestBody": typing.Type[RequestBodyPostJsonPointerFormatRequestBody], - "/requestBody/postMaximumValidationRequestBody": typing.Type[RequestBodyPostMaximumValidationRequestBody], - "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": typing.Type[RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody], - "/requestBody/postMaxitemsValidationRequestBody": typing.Type[RequestBodyPostMaxitemsValidationRequestBody], - "/requestBody/postMaxlengthValidationRequestBody": typing.Type[RequestBodyPostMaxlengthValidationRequestBody], - "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": typing.Type[RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody], - "/requestBody/postMaxpropertiesValidationRequestBody": typing.Type[RequestBodyPostMaxpropertiesValidationRequestBody], - "/requestBody/postMinimumValidationRequestBody": typing.Type[RequestBodyPostMinimumValidationRequestBody], - "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": typing.Type[RequestBodyPostMinimumValidationWithSignedIntegerRequestBody], - "/requestBody/postMinitemsValidationRequestBody": typing.Type[RequestBodyPostMinitemsValidationRequestBody], - "/requestBody/postMinlengthValidationRequestBody": typing.Type[RequestBodyPostMinlengthValidationRequestBody], - "/requestBody/postMinpropertiesValidationRequestBody": typing.Type[RequestBodyPostMinpropertiesValidationRequestBody], - "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody], - "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody], - "/requestBody/postNestedItemsRequestBody": typing.Type[RequestBodyPostNestedItemsRequestBody], - "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody], - "/requestBody/postNotMoreComplexSchemaRequestBody": typing.Type[RequestBodyPostNotMoreComplexSchemaRequestBody], - "/requestBody/postNotRequestBody": typing.Type[RequestBodyPostNotRequestBody], - "/requestBody/postNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostNulCharactersInStringsRequestBody], - "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": typing.Type[RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody], - "/requestBody/postNumberTypeMatchesNumbersRequestBody": typing.Type[RequestBodyPostNumberTypeMatchesNumbersRequestBody], - "/requestBody/postObjectPropertiesValidationRequestBody": typing.Type[RequestBodyPostObjectPropertiesValidationRequestBody], - "/requestBody/postObjectTypeMatchesObjectsRequestBody": typing.Type[RequestBodyPostObjectTypeMatchesObjectsRequestBody], - "/requestBody/postOneofComplexTypesRequestBody": typing.Type[RequestBodyPostOneofComplexTypesRequestBody], - "/requestBody/postOneofRequestBody": typing.Type[RequestBodyPostOneofRequestBody], - "/requestBody/postOneofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostOneofWithBaseSchemaRequestBody], - "/requestBody/postOneofWithEmptySchemaRequestBody": typing.Type[RequestBodyPostOneofWithEmptySchemaRequestBody], - "/requestBody/postOneofWithRequiredRequestBody": typing.Type[RequestBodyPostOneofWithRequiredRequestBody], - "/requestBody/postPatternIsNotAnchoredRequestBody": typing.Type[RequestBodyPostPatternIsNotAnchoredRequestBody], - "/requestBody/postPatternValidationRequestBody": typing.Type[RequestBodyPostPatternValidationRequestBody], - "/requestBody/postPropertiesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostPropertiesWithEscapedCharactersRequestBody], - "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": typing.Type[RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody], - "/requestBody/postRefInAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostRefInAdditionalpropertiesRequestBody], - "/requestBody/postRefInAllofRequestBody": typing.Type[RequestBodyPostRefInAllofRequestBody], - "/requestBody/postRefInAnyofRequestBody": typing.Type[RequestBodyPostRefInAnyofRequestBody], - "/requestBody/postRefInItemsRequestBody": typing.Type[RequestBodyPostRefInItemsRequestBody], - "/requestBody/postRefInNotRequestBody": typing.Type[RequestBodyPostRefInNotRequestBody], - "/requestBody/postRefInOneofRequestBody": typing.Type[RequestBodyPostRefInOneofRequestBody], - "/requestBody/postRefInPropertyRequestBody": typing.Type[RequestBodyPostRefInPropertyRequestBody], - "/requestBody/postRequiredDefaultValidationRequestBody": typing.Type[RequestBodyPostRequiredDefaultValidationRequestBody], - "/requestBody/postRequiredValidationRequestBody": typing.Type[RequestBodyPostRequiredValidationRequestBody], - "/requestBody/postRequiredWithEmptyArrayRequestBody": typing.Type[RequestBodyPostRequiredWithEmptyArrayRequestBody], - "/requestBody/postRequiredWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostRequiredWithEscapedCharactersRequestBody], - "/requestBody/postSimpleEnumValidationRequestBody": typing.Type[RequestBodyPostSimpleEnumValidationRequestBody], - "/requestBody/postStringTypeMatchesStringsRequestBody": typing.Type[RequestBodyPostStringTypeMatchesStringsRequestBody], - "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody": typing.Type[RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody], - "/requestBody/postUniqueitemsFalseValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseValidationRequestBody], - "/requestBody/postUniqueitemsValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsValidationRequestBody], - "/requestBody/postUriFormatRequestBody": typing.Type[RequestBodyPostUriFormatRequestBody], - "/requestBody/postUriReferenceFormatRequestBody": typing.Type[RequestBodyPostUriReferenceFormatRequestBody], - "/requestBody/postUriTemplateFormatRequestBody": typing.Type[RequestBodyPostUriTemplateFormatRequestBody], - "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes], - "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes], - "/responseBody/postAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofResponseBodyForContentTypes], - "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes], - "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes], - "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes], - "/responseBody/postAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofResponseBodyForContentTypes], - "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes], - "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": typing.Type[ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes], - "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": typing.Type[ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes], - "/responseBody/postByIntResponseBodyForContentTypes": typing.Type[ResponseBodyPostByIntResponseBodyForContentTypes], - "/responseBody/postByNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostByNumberResponseBodyForContentTypes], - "/responseBody/postBySmallNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostBySmallNumberResponseBodyForContentTypes], - "/responseBody/postDateTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateTimeFormatResponseBodyForContentTypes], - "/responseBody/postEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmailFormatResponseBodyForContentTypes], - "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes], - "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes], - "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes], - "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes], - "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes], - "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes], - "/responseBody/postHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostHostnameFormatResponseBodyForContentTypes], - "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": typing.Type[ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes], - "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes": typing.Type[ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes], - "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes], - "/responseBody/postIpv4FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv4FormatResponseBodyForContentTypes], - "/responseBody/postIpv6FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv6FormatResponseBodyForContentTypes], - "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes], - "/responseBody/postMaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationResponseBodyForContentTypes], - "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes], - "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes], - "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes], - "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes], - "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes], - "/responseBody/postMinimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationResponseBodyForContentTypes], - "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes], - "/responseBody/postMinitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinitemsValidationResponseBodyForContentTypes], - "/responseBody/postMinlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinlengthValidationResponseBodyForContentTypes], - "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes], - "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNestedItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedItemsResponseBodyForContentTypes], - "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes], - "/responseBody/postNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotResponseBodyForContentTypes], - "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes], - "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes], - "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": typing.Type[ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes], - "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes], - "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes], - "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes], - "/responseBody/postOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofResponseBodyForContentTypes], - "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes], - "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes], - "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes], - "/responseBody/postPatternValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternValidationResponseBodyForContentTypes], - "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes], - "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes], - "/responseBody/postRefInAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAllofResponseBodyForContentTypes], - "/responseBody/postRefInAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInAnyofResponseBodyForContentTypes], - "/responseBody/postRefInItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInItemsResponseBodyForContentTypes], - "/responseBody/postRefInNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInNotResponseBodyForContentTypes], - "/responseBody/postRefInOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInOneofResponseBodyForContentTypes], - "/responseBody/postRefInPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostRefInPropertyResponseBodyForContentTypes], - "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes], - "/responseBody/postRequiredValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredValidationResponseBodyForContentTypes], - "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes], - "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes], - "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes], - "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes": typing.Type[ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes], - "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes], - "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes], - "/responseBody/postUriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriFormatResponseBodyForContentTypes], - "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes], - "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes], - } -) - -path_to_api = PathToApi( - { - "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody": RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, - "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, - "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody": RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, - "/requestBody/postAllofRequestBody": RequestBodyPostAllofRequestBody, - "/requestBody/postAllofSimpleTypesRequestBody": RequestBodyPostAllofSimpleTypesRequestBody, - "/requestBody/postAllofWithBaseSchemaRequestBody": RequestBodyPostAllofWithBaseSchemaRequestBody, - "/requestBody/postAllofWithOneEmptySchemaRequestBody": RequestBodyPostAllofWithOneEmptySchemaRequestBody, - "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, - "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, - "/requestBody/postAllofWithTwoEmptySchemasRequestBody": RequestBodyPostAllofWithTwoEmptySchemasRequestBody, - "/requestBody/postAnyofComplexTypesRequestBody": RequestBodyPostAnyofComplexTypesRequestBody, - "/requestBody/postAnyofRequestBody": RequestBodyPostAnyofRequestBody, - "/requestBody/postAnyofWithBaseSchemaRequestBody": RequestBodyPostAnyofWithBaseSchemaRequestBody, - "/requestBody/postAnyofWithOneEmptySchemaRequestBody": RequestBodyPostAnyofWithOneEmptySchemaRequestBody, - "/requestBody/postArrayTypeMatchesArraysRequestBody": RequestBodyPostArrayTypeMatchesArraysRequestBody, - "/requestBody/postBooleanTypeMatchesBooleansRequestBody": RequestBodyPostBooleanTypeMatchesBooleansRequestBody, - "/requestBody/postByIntRequestBody": RequestBodyPostByIntRequestBody, - "/requestBody/postByNumberRequestBody": RequestBodyPostByNumberRequestBody, - "/requestBody/postBySmallNumberRequestBody": RequestBodyPostBySmallNumberRequestBody, - "/requestBody/postDateTimeFormatRequestBody": RequestBodyPostDateTimeFormatRequestBody, - "/requestBody/postEmailFormatRequestBody": RequestBodyPostEmailFormatRequestBody, - "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, - "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, - "/requestBody/postEnumWithEscapedCharactersRequestBody": RequestBodyPostEnumWithEscapedCharactersRequestBody, - "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, - "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, - "/requestBody/postEnumsInPropertiesRequestBody": RequestBodyPostEnumsInPropertiesRequestBody, - "/requestBody/postForbiddenPropertyRequestBody": RequestBodyPostForbiddenPropertyRequestBody, - "/requestBody/postHostnameFormatRequestBody": RequestBodyPostHostnameFormatRequestBody, - "/requestBody/postIntegerTypeMatchesIntegersRequestBody": RequestBodyPostIntegerTypeMatchesIntegersRequestBody, - "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody": RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - "/requestBody/postInvalidStringValueForDefaultRequestBody": RequestBodyPostInvalidStringValueForDefaultRequestBody, - "/requestBody/postIpv4FormatRequestBody": RequestBodyPostIpv4FormatRequestBody, - "/requestBody/postIpv6FormatRequestBody": RequestBodyPostIpv6FormatRequestBody, - "/requestBody/postJsonPointerFormatRequestBody": RequestBodyPostJsonPointerFormatRequestBody, - "/requestBody/postMaximumValidationRequestBody": RequestBodyPostMaximumValidationRequestBody, - "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, - "/requestBody/postMaxitemsValidationRequestBody": RequestBodyPostMaxitemsValidationRequestBody, - "/requestBody/postMaxlengthValidationRequestBody": RequestBodyPostMaxlengthValidationRequestBody, - "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, - "/requestBody/postMaxpropertiesValidationRequestBody": RequestBodyPostMaxpropertiesValidationRequestBody, - "/requestBody/postMinimumValidationRequestBody": RequestBodyPostMinimumValidationRequestBody, - "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, - "/requestBody/postMinitemsValidationRequestBody": RequestBodyPostMinitemsValidationRequestBody, - "/requestBody/postMinlengthValidationRequestBody": RequestBodyPostMinlengthValidationRequestBody, - "/requestBody/postMinpropertiesValidationRequestBody": RequestBodyPostMinpropertiesValidationRequestBody, - "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, - "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, - "/requestBody/postNestedItemsRequestBody": RequestBodyPostNestedItemsRequestBody, - "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, - "/requestBody/postNotMoreComplexSchemaRequestBody": RequestBodyPostNotMoreComplexSchemaRequestBody, - "/requestBody/postNotRequestBody": RequestBodyPostNotRequestBody, - "/requestBody/postNulCharactersInStringsRequestBody": RequestBodyPostNulCharactersInStringsRequestBody, - "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, - "/requestBody/postNumberTypeMatchesNumbersRequestBody": RequestBodyPostNumberTypeMatchesNumbersRequestBody, - "/requestBody/postObjectPropertiesValidationRequestBody": RequestBodyPostObjectPropertiesValidationRequestBody, - "/requestBody/postObjectTypeMatchesObjectsRequestBody": RequestBodyPostObjectTypeMatchesObjectsRequestBody, - "/requestBody/postOneofComplexTypesRequestBody": RequestBodyPostOneofComplexTypesRequestBody, - "/requestBody/postOneofRequestBody": RequestBodyPostOneofRequestBody, - "/requestBody/postOneofWithBaseSchemaRequestBody": RequestBodyPostOneofWithBaseSchemaRequestBody, - "/requestBody/postOneofWithEmptySchemaRequestBody": RequestBodyPostOneofWithEmptySchemaRequestBody, - "/requestBody/postOneofWithRequiredRequestBody": RequestBodyPostOneofWithRequiredRequestBody, - "/requestBody/postPatternIsNotAnchoredRequestBody": RequestBodyPostPatternIsNotAnchoredRequestBody, - "/requestBody/postPatternValidationRequestBody": RequestBodyPostPatternValidationRequestBody, - "/requestBody/postPropertiesWithEscapedCharactersRequestBody": RequestBodyPostPropertiesWithEscapedCharactersRequestBody, - "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, - "/requestBody/postRefInAdditionalpropertiesRequestBody": RequestBodyPostRefInAdditionalpropertiesRequestBody, - "/requestBody/postRefInAllofRequestBody": RequestBodyPostRefInAllofRequestBody, - "/requestBody/postRefInAnyofRequestBody": RequestBodyPostRefInAnyofRequestBody, - "/requestBody/postRefInItemsRequestBody": RequestBodyPostRefInItemsRequestBody, - "/requestBody/postRefInNotRequestBody": RequestBodyPostRefInNotRequestBody, - "/requestBody/postRefInOneofRequestBody": RequestBodyPostRefInOneofRequestBody, - "/requestBody/postRefInPropertyRequestBody": RequestBodyPostRefInPropertyRequestBody, - "/requestBody/postRequiredDefaultValidationRequestBody": RequestBodyPostRequiredDefaultValidationRequestBody, - "/requestBody/postRequiredValidationRequestBody": RequestBodyPostRequiredValidationRequestBody, - "/requestBody/postRequiredWithEmptyArrayRequestBody": RequestBodyPostRequiredWithEmptyArrayRequestBody, - "/requestBody/postRequiredWithEscapedCharactersRequestBody": RequestBodyPostRequiredWithEscapedCharactersRequestBody, - "/requestBody/postSimpleEnumValidationRequestBody": RequestBodyPostSimpleEnumValidationRequestBody, - "/requestBody/postStringTypeMatchesStringsRequestBody": RequestBodyPostStringTypeMatchesStringsRequestBody, - "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody": RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - "/requestBody/postUniqueitemsFalseValidationRequestBody": RequestBodyPostUniqueitemsFalseValidationRequestBody, - "/requestBody/postUniqueitemsValidationRequestBody": RequestBodyPostUniqueitemsValidationRequestBody, - "/requestBody/postUriFormatRequestBody": RequestBodyPostUriFormatRequestBody, - "/requestBody/postUriReferenceFormatRequestBody": RequestBodyPostUriReferenceFormatRequestBody, - "/requestBody/postUriTemplateFormatRequestBody": RequestBodyPostUriTemplateFormatRequestBody, - "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - "/responseBody/postAllofResponseBodyForContentTypes": ResponseBodyPostAllofResponseBodyForContentTypes, - "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, - "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, - "/responseBody/postAnyofResponseBodyForContentTypes": ResponseBodyPostAnyofResponseBodyForContentTypes, - "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, - "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - "/responseBody/postByIntResponseBodyForContentTypes": ResponseBodyPostByIntResponseBodyForContentTypes, - "/responseBody/postByNumberResponseBodyForContentTypes": ResponseBodyPostByNumberResponseBodyForContentTypes, - "/responseBody/postBySmallNumberResponseBodyForContentTypes": ResponseBodyPostBySmallNumberResponseBodyForContentTypes, - "/responseBody/postDateTimeFormatResponseBodyForContentTypes": ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, - "/responseBody/postEmailFormatResponseBodyForContentTypes": ResponseBodyPostEmailFormatResponseBodyForContentTypes, - "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, - "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, - "/responseBody/postHostnameFormatResponseBodyForContentTypes": ResponseBodyPostHostnameFormatResponseBodyForContentTypes, - "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes": ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes": ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes, - "/responseBody/postIpv4FormatResponseBodyForContentTypes": ResponseBodyPostIpv4FormatResponseBodyForContentTypes, - "/responseBody/postIpv6FormatResponseBodyForContentTypes": ResponseBodyPostIpv6FormatResponseBodyForContentTypes, - "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, - "/responseBody/postMaximumValidationResponseBodyForContentTypes": ResponseBodyPostMaximumValidationResponseBodyForContentTypes, - "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, - "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, - "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, - "/responseBody/postMinimumValidationResponseBodyForContentTypes": ResponseBodyPostMinimumValidationResponseBodyForContentTypes, - "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - "/responseBody/postMinitemsValidationResponseBodyForContentTypes": ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, - "/responseBody/postMinlengthValidationResponseBodyForContentTypes": ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, - "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, - "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNestedItemsResponseBodyForContentTypes": ResponseBodyPostNestedItemsResponseBodyForContentTypes, - "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, - "/responseBody/postNotResponseBodyForContentTypes": ResponseBodyPostNotResponseBodyForContentTypes, - "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, - "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, - "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, - "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, - "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, - "/responseBody/postOneofResponseBodyForContentTypes": ResponseBodyPostOneofResponseBodyForContentTypes, - "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, - "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, - "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, - "/responseBody/postPatternValidationResponseBodyForContentTypes": ResponseBodyPostPatternValidationResponseBodyForContentTypes, - "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes, - "/responseBody/postRefInAllofResponseBodyForContentTypes": ResponseBodyPostRefInAllofResponseBodyForContentTypes, - "/responseBody/postRefInAnyofResponseBodyForContentTypes": ResponseBodyPostRefInAnyofResponseBodyForContentTypes, - "/responseBody/postRefInItemsResponseBodyForContentTypes": ResponseBodyPostRefInItemsResponseBodyForContentTypes, - "/responseBody/postRefInNotResponseBodyForContentTypes": ResponseBodyPostRefInNotResponseBodyForContentTypes, - "/responseBody/postRefInOneofResponseBodyForContentTypes": ResponseBodyPostRefInOneofResponseBodyForContentTypes, - "/responseBody/postRefInPropertyResponseBodyForContentTypes": ResponseBodyPostRefInPropertyResponseBodyForContentTypes, - "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, - "/responseBody/postRequiredValidationResponseBodyForContentTypes": ResponseBodyPostRequiredValidationResponseBodyForContentTypes, - "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, - "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, - "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, - "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes": ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, - "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, - "/responseBody/postUriFormatResponseBodyForContentTypes": ResponseBodyPostUriFormatResponseBodyForContentTypes, - "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, - "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, - } -) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py deleted file mode 100644 index cf241d055c1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py deleted file mode 100644 index 6f675e44ce3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py deleted file mode 100644 index 5929c8d2717..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py deleted file mode 100644 index 48203c5cefc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py deleted file mode 100644 index f3bd123be3d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py deleted file mode 100644 index cb1dbbedd7b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofCombinedWithAnyofOneofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py deleted file mode 100644 index 20aec555912..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py deleted file mode 100644 index a916fe793cc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofSimpleTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py deleted file mode 100644 index 0c9f930d9d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py deleted file mode 100644 index 401ffbb3324..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithOneEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py deleted file mode 100644 index bc4f2eda192..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py deleted file mode 100644 index ac509748dc6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTheLastEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py deleted file mode 100644 index 276e657b0a2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTwoEmptySchemasRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py deleted file mode 100644 index 7c6d7a4d16a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofComplexTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py deleted file mode 100644 index 953f6926245..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py deleted file mode 100644 index ec1ca4e8002..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py deleted file mode 100644 index 3b0ae778b39..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofWithOneEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py deleted file mode 100644 index bd186c8e433..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import ApiForPost - - -class RequestBodyPostArrayTypeMatchesArraysRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py deleted file mode 100644 index e7f71649b89..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import ApiForPost - - -class RequestBodyPostBooleanTypeMatchesBooleansRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py deleted file mode 100644 index 4e248e736b3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import ApiForPost - - -class RequestBodyPostByIntRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py deleted file mode 100644 index 6f7d7557cf1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import ApiForPost - - -class RequestBodyPostByNumberRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py deleted file mode 100644 index 3870e6064fa..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import ApiForPost - - -class RequestBodyPostBySmallNumberRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py deleted file mode 100644 index 9a68bdc1aaa..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostDateTimeFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py deleted file mode 100644 index f8e49f7922f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostEmailFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py deleted file mode 100644 index ad7bd4b42b4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py deleted file mode 100644 index 9dcd7358cd0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py deleted file mode 100644 index 829a6de9cf6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py deleted file mode 100644 index fbc820e7b8d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py deleted file mode 100644 index 2f1a0b24e33..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py deleted file mode 100644 index b53680477cf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumsInPropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py deleted file mode 100644 index fc686241e90..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import ApiForPost - - -class RequestBodyPostForbiddenPropertyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py deleted file mode 100644 index bc3298eb898..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostHostnameFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py deleted file mode 100644 index 95d69960a99..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import ApiForPost - - -class RequestBodyPostIntegerTypeMatchesIntegersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py deleted file mode 100644 index 28e166a8aaf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import ApiForPost - - -class RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py deleted file mode 100644 index 6a9a908ce50..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import ApiForPost - - -class RequestBodyPostInvalidStringValueForDefaultRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py deleted file mode 100644 index fbe904fd1f3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIpv4FormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py deleted file mode 100644 index 2dcf480c366..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIpv6FormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py deleted file mode 100644 index 1cf91b51501..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostJsonPointerFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py deleted file mode 100644 index 9273dce5d86..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaximumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py deleted file mode 100644 index 30584fb32fe..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py deleted file mode 100644 index c9ca86ae75f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py deleted file mode 100644 index c23e88b0d67..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxlengthValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py deleted file mode 100644 index 52a7a084e1d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py deleted file mode 100644 index f39ee138ba9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxpropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py deleted file mode 100644 index 0009e26c08a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinimumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py deleted file mode 100644 index 653ccb088ef..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinimumValidationWithSignedIntegerRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py deleted file mode 100644 index 043ae5801c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py deleted file mode 100644 index f2846ae7901..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinlengthValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py deleted file mode 100644 index 9de110a009a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinpropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py deleted file mode 100644 index a2e38880b90..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 66511fe1ec9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py deleted file mode 100644 index 8ac640a08d1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 087e0ba6f85..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py deleted file mode 100644 index 25cf257f4d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostNotMoreComplexSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py deleted file mode 100644 index b68f3732fd4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_request_body.post.operation import ApiForPost - - -class RequestBodyPostNotRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py deleted file mode 100644 index 651b397ef9a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import ApiForPost - - -class RequestBodyPostNulCharactersInStringsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py deleted file mode 100644 index ec06a06c1ef..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import ApiForPost - - -class RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py deleted file mode 100644 index fac543eb3b8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import ApiForPost - - -class RequestBodyPostNumberTypeMatchesNumbersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py deleted file mode 100644 index ea3b11f8e6e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostObjectPropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py deleted file mode 100644 index d01c15d081c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import ApiForPost - - -class RequestBodyPostObjectTypeMatchesObjectsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py deleted file mode 100644 index 22543709f59..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofComplexTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py deleted file mode 100644 index b47953c0ee3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py deleted file mode 100644 index c27f4afa611..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py deleted file mode 100644 index 6ac292344c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py deleted file mode 100644 index 43c08766171..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithRequiredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py deleted file mode 100644 index 20fc039d931..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternIsNotAnchoredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py deleted file mode 100644 index 5ab0b9fd604..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py deleted file mode 100644 index 26834d3df67..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertiesWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py deleted file mode 100644 index e416e4e64c6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py deleted file mode 100644 index 9f46f1f5c72..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInAdditionalpropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py deleted file mode 100644 index df93a2bda63..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInAllofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py deleted file mode 100644 index ffdd0894c9d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInAnyofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py deleted file mode 100644 index d0aa910477b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py deleted file mode 100644 index f4d6f93ad31..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInNotRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py deleted file mode 100644 index 6d220a41f9c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInOneofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py deleted file mode 100644 index 8724f70525b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import ApiForPost - - -class RequestBodyPostRefInPropertyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py deleted file mode 100644 index c11ae26f038..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredDefaultValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py deleted file mode 100644 index c64ede75b9b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py deleted file mode 100644 index 764233a68b7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredWithEmptyArrayRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py deleted file mode 100644 index 182b1b839f0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py deleted file mode 100644 index 7ebbd2f5ea3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostSimpleEnumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py deleted file mode 100644 index 8d44f510846..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import ApiForPost - - -class RequestBodyPostStringTypeMatchesStringsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py deleted file mode 100644 index 2bcd0ba3d2e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import ApiForPost - - -class RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py deleted file mode 100644 index 45d607b6350..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsFalseValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py deleted file mode 100644 index 5f891c9fbb0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py deleted file mode 100644 index 0b1fb73cfe3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py deleted file mode 100644 index c322e59b291..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriReferenceFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py deleted file mode 100644 index 2a5b4298591..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriTemplateFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py deleted file mode 100644 index 81ab1558148..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py deleted file mode 100644 index 22bca357cff..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py deleted file mode 100644 index 2f583060e1a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py deleted file mode 100644 index 0337e6ee375..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py deleted file mode 100644 index 5443c652c01..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py deleted file mode 100644 index 2cf80e3bc38..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py deleted file mode 100644 index d7b9a493be0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 01acd5af774..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 844ab1cf294..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 6ebfece4c12..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 557ec1e4d5e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py deleted file mode 100644 index 584ff83aff8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py deleted file mode 100644 index fefa96348d7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py deleted file mode 100644 index 3a1aecbf0dd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 282beb275d8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index d2ebe614192..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py deleted file mode 100644 index 215c7358e4d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py deleted file mode 100644 index a601d6a59f1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py deleted file mode 100644 index 7d3313c203b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostByIntResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py deleted file mode 100644 index 002e25e9994..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostByNumberResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py deleted file mode 100644 index d99c2fc52ea..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostBySmallNumberResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py deleted file mode 100644 index 9875a541218..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDateTimeFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py deleted file mode 100644 index 21f627bb4cb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEmailFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py deleted file mode 100644 index ee5a91a625b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py deleted file mode 100644 index 6a2ea03f86c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index c1ba12c5306..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py deleted file mode 100644 index 703ac3a0abe..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py deleted file mode 100644 index ff892aade79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py deleted file mode 100644 index c3a54d88e56..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py deleted file mode 100644 index 48c38287f9c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py deleted file mode 100644 index f6c811f9d72..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostHostnameFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py deleted file mode 100644 index d3b024955f5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py deleted file mode 100644 index 299f94246cf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py deleted file mode 100644 index b7ce4b9fde7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py deleted file mode 100644 index 7d3b34393dd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIpv4FormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py deleted file mode 100644 index 0e4a27008e4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIpv6FormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py deleted file mode 100644 index f2c04d68434..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py deleted file mode 100644 index 682e7761990..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaximumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py deleted file mode 100644 index 291331d7deb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py deleted file mode 100644 index 2068f655d65..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py deleted file mode 100644 index 2ce24daae84..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py deleted file mode 100644 index ba62c77f93d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py deleted file mode 100644 index 080b7112dd4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py deleted file mode 100644 index 6de48e15f3b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinimumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py deleted file mode 100644 index d47e57a46fe..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py deleted file mode 100644 index b37a0b56f14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py deleted file mode 100644 index 739042a805a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinlengthValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py deleted file mode 100644 index 3b9a8146c52..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 6b47c344d11..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 59bdecd8653..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py deleted file mode 100644 index bc670a27186..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 811164f539e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py deleted file mode 100644 index ccdd43ff87a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py deleted file mode 100644 index 7f6339040dd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNotResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py deleted file mode 100644 index 7af0b6e25cd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py deleted file mode 100644 index 3430f020347..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py deleted file mode 100644 index 8963afeef3a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py deleted file mode 100644 index fea3a09c6c4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py deleted file mode 100644 index ea2ecbbc856..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py deleted file mode 100644 index 394d167d062..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py deleted file mode 100644 index 32674b945da..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index ef54203ae92..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py deleted file mode 100644 index df1fbe4ba91..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py deleted file mode 100644 index e4f473e6ba4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py deleted file mode 100644 index 1ee305ce7d0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py deleted file mode 100644 index f935d231123..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index ddb66b4e4ad..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py deleted file mode 100644 index 71a7fcacc73..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py deleted file mode 100644 index dc6e2b22ab6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py deleted file mode 100644 index 805c5fa9567..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInAllofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py deleted file mode 100644 index 9f1dbed4494..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInAnyofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py deleted file mode 100644 index 555b3f94ac5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py deleted file mode 100644 index 3de1498c519..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInNotResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py deleted file mode 100644 index e56d747df8e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInOneofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py deleted file mode 100644 index 81836b718bf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRefInPropertyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py deleted file mode 100644 index 921aada7439..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py deleted file mode 100644 index 1da8650b53f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py deleted file mode 100644 index b9007990da0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index ef671e458a9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py deleted file mode 100644 index f721bb16b44..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py deleted file mode 100644 index 6f795fd2293..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py deleted file mode 100644 index 01a381bde1b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py deleted file mode 100644 index 7d78b86f2d7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py deleted file mode 100644 index e97b1d6aabd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py deleted file mode 100644 index cbac9f4b821..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py deleted file mode 100644 index 19f3d33f199..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py deleted file mode 100644 index ce910515b00..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py deleted file mode 100644 index c2cc8ec4d0c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tag_to_api.py +++ /dev/null @@ -1,98 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.tags.operation_request_body_api import OperationRequestBodyApi -from openapi_client.apis.tags.path_post_api import PathPostApi -from openapi_client.apis.tags.content_type_json_api import ContentTypeJsonApi -from openapi_client.apis.tags.additional_properties_api import AdditionalPropertiesApi -from openapi_client.apis.tags.all_of_api import AllOfApi -from openapi_client.apis.tags.any_of_api import AnyOfApi -from openapi_client.apis.tags.type_api import TypeApi -from openapi_client.apis.tags.multiple_of_api import MultipleOfApi -from openapi_client.apis.tags.format_api import FormatApi -from openapi_client.apis.tags.enum_api import EnumApi -from openapi_client.apis.tags.not_api import NotApi -from openapi_client.apis.tags.default_api import DefaultApi -from openapi_client.apis.tags.maximum_api import MaximumApi -from openapi_client.apis.tags.max_items_api import MaxItemsApi -from openapi_client.apis.tags.max_length_api import MaxLengthApi -from openapi_client.apis.tags.max_properties_api import MaxPropertiesApi -from openapi_client.apis.tags.minimum_api import MinimumApi -from openapi_client.apis.tags.min_items_api import MinItemsApi -from openapi_client.apis.tags.min_length_api import MinLengthApi -from openapi_client.apis.tags.min_properties_api import MinPropertiesApi -from openapi_client.apis.tags.items_api import ItemsApi -from openapi_client.apis.tags.one_of_api import OneOfApi -from openapi_client.apis.tags.properties_api import PropertiesApi -from openapi_client.apis.tags.pattern_api import PatternApi -from openapi_client.apis.tags.ref_api import RefApi -from openapi_client.apis.tags.required_api import RequiredApi -from openapi_client.apis.tags.unique_items_api import UniqueItemsApi -from openapi_client.apis.tags.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi - -TagToApi = typing.TypedDict( - 'TagToApi', - { - "operation.requestBody": typing.Type[OperationRequestBodyApi], - "path.post": typing.Type[PathPostApi], - "contentType_json": typing.Type[ContentTypeJsonApi], - "additionalProperties": typing.Type[AdditionalPropertiesApi], - "allOf": typing.Type[AllOfApi], - "anyOf": typing.Type[AnyOfApi], - "type": typing.Type[TypeApi], - "multipleOf": typing.Type[MultipleOfApi], - "format": typing.Type[FormatApi], - "enum": typing.Type[EnumApi], - "not": typing.Type[NotApi], - "default": typing.Type[DefaultApi], - "maximum": typing.Type[MaximumApi], - "maxItems": typing.Type[MaxItemsApi], - "maxLength": typing.Type[MaxLengthApi], - "maxProperties": typing.Type[MaxPropertiesApi], - "minimum": typing.Type[MinimumApi], - "minItems": typing.Type[MinItemsApi], - "minLength": typing.Type[MinLengthApi], - "minProperties": typing.Type[MinPropertiesApi], - "items": typing.Type[ItemsApi], - "oneOf": typing.Type[OneOfApi], - "properties": typing.Type[PropertiesApi], - "pattern": typing.Type[PatternApi], - "$ref": typing.Type[RefApi], - "required": typing.Type[RequiredApi], - "uniqueItems": typing.Type[UniqueItemsApi], - "response.content.contentType.schema": typing.Type[ResponseContentContentTypeSchemaApi], - } -) - -tag_to_api = TagToApi( - { - "operation.requestBody": OperationRequestBodyApi, - "path.post": PathPostApi, - "contentType_json": ContentTypeJsonApi, - "additionalProperties": AdditionalPropertiesApi, - "allOf": AllOfApi, - "anyOf": AnyOfApi, - "type": TypeApi, - "multipleOf": MultipleOfApi, - "format": FormatApi, - "enum": EnumApi, - "not": NotApi, - "default": DefaultApi, - "maximum": MaximumApi, - "maxItems": MaxItemsApi, - "maxLength": MaxLengthApi, - "maxProperties": MaxPropertiesApi, - "minimum": MinimumApi, - "minItems": MinItemsApi, - "minLength": MinLengthApi, - "minProperties": MinPropertiesApi, - "items": ItemsApi, - "oneOf": OneOfApi, - "properties": PropertiesApi, - "pattern": PatternApi, - "$ref": RefApi, - "required": RequiredApi, - "uniqueItems": UniqueItemsApi, - "response.content.contentType.schema": ResponseContentContentTypeSchemaApi, - } -) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py deleted file mode 100644 index f3c38f014ce..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py deleted file mode 100644 index 38c361c928a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes - - -class AdditionalPropertiesApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py deleted file mode 100644 index 0531f01bfb9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/all_of_api.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes - - -class AllOfApi( - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostAllofSimpleTypesRequestBody, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py deleted file mode 100644 index 03bd96a12a7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/any_of_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody - - -class AnyOfApi( - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostAnyofWithBaseSchemaRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py deleted file mode 100644 index 4cfd8df626b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py +++ /dev/null @@ -1,367 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody -from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody -from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody -from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class ContentTypeJsonApi( - PostMinlengthValidationResponseBodyForContentTypes, - PostRefInAllofResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostRefInPropertyResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostMinlengthValidationRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostRefInAllofRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostRequiredWithEscapedCharactersRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostOneofComplexTypesResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsResponseBodyForContentTypes, - PostNotResponseBodyForContentTypes, - PostRefInAdditionalpropertiesRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostNulCharactersInStringsRequestBody, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostMinimumValidationRequestBody, - PostByNumberResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostPatternValidationRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostMinitemsValidationRequestBody, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostNotRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInOneofRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostStringTypeMatchesStringsRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostRefInNotRequestBody, - PostByNumberRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAnyofComplexTypesRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostPatternIsNotAnchoredRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostAllofSimpleTypesRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostRefInAnyofRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostByIntRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostUriTemplateFormatRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostEmailFormatRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py deleted file mode 100644 index 70a0062498a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/default_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody -from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes - - -class DefaultApi( - PostInvalidStringValueForDefaultRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py deleted file mode 100644 index 11e7efb25a7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/enum_api.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes - - -class EnumApi( - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostEnumsInPropertiesRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostNulCharactersInStringsRequestBody, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py deleted file mode 100644 index 0b0b0cc1e7f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/format_api.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes - - -class FormatApi( - PostIpv4FormatRequestBody, - PostUriFormatRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostHostnameFormatRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostUriTemplateFormatRequestBody, - PostUriTemplateFormatResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, - PostHostnameFormatResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py deleted file mode 100644 index 45738acf118..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/items_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody - - -class ItemsApi( - PostNestedItemsResponseBodyForContentTypes, - PostNestedItemsRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py deleted file mode 100644 index 7489bcffeea..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_items_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes - - -class MaxItemsApi( - PostMaxitemsValidationRequestBody, - PostMaxitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py deleted file mode 100644 index 868b8a8bfc7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_length_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes - - -class MaxLengthApi( - PostMaxlengthValidationRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py deleted file mode 100644 index 8947f0dfed2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody - - -class MaxPropertiesApi( - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py deleted file mode 100644 index 7618762d0cc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/maximum_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes - - -class MaximumApi( - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py deleted file mode 100644 index 3f0555c50d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_items_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes - - -class MinItemsApi( - PostMinitemsValidationRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py deleted file mode 100644 index 9113bc1d7f3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_length_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody - - -class MinLengthApi( - PostMinlengthValidationResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py deleted file mode 100644 index d5580e5667b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes - - -class MinPropertiesApi( - PostMinpropertiesValidationRequestBody, - PostMinpropertiesValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py deleted file mode 100644 index 15a17ef077c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/minimum_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody - - -class MinimumApi( - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostMinimumValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py deleted file mode 100644 index c35c6660341..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class MultipleOfApi( - PostByNumberResponseBodyForContentTypes, - PostByIntRequestBody, - PostBySmallNumberResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostByNumberRequestBody, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py deleted file mode 100644 index 285d7950f3b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/not_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes - - -class NotApi( - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py deleted file mode 100644 index 594a8f332f1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/one_of_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes - - -class OneOfApi( - PostOneofWithBaseSchemaRequestBody, - PostOneofRequestBody, - PostOneofResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py deleted file mode 100644 index b94951ef21c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody - - -class OperationRequestBodyApi( - PostMinimumValidationWithSignedIntegerRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostIpv4FormatRequestBody, - PostMinpropertiesValidationRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInOneofRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostOneofWithRequiredRequestBody, - PostMinlengthValidationRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostRefInNotRequestBody, - PostByNumberRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAnyofComplexTypesRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostRefInAllofRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostSimpleEnumValidationRequestBody, - PostIpv6FormatRequestBody, - PostRequiredWithEscapedCharactersRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostAllofSimpleTypesRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostRefInPropertyRequestBody, - PostRequiredDefaultValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostAllofRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMaxpropertiesValidationRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAnyofRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostByIntRequestBody, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostMaxlengthValidationRequestBody, - PostRefInItemsRequestBody, - PostUriTemplateFormatRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostNulCharactersInStringsRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostMinimumValidationRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostUriFormatRequestBody, - PostOneofComplexTypesRequestBody, - PostPatternValidationRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostJsonPointerFormatRequestBody, - PostMaximumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostMinitemsValidationRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostNotRequestBody, - PostBySmallNumberRequestBody, - PostEmailFormatRequestBody, - PostDateTimeFormatRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py deleted file mode 100644 index b5eb29e5089..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/path_post_api.py +++ /dev/null @@ -1,367 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody -from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody -from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody -from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.post.operation import PostInvalidStringValueForDefaultRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class PathPostApi( - PostMinlengthValidationResponseBodyForContentTypes, - PostRefInAllofResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostRefInPropertyResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostMinlengthValidationRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostRefInAllofRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostRequiredWithEscapedCharactersRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostOneofComplexTypesResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsResponseBodyForContentTypes, - PostNotResponseBodyForContentTypes, - PostRefInAdditionalpropertiesRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostNulCharactersInStringsRequestBody, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostMinimumValidationRequestBody, - PostByNumberResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostPatternValidationRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostMinitemsValidationRequestBody, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostNotRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInOneofRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostStringTypeMatchesStringsRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostRefInNotRequestBody, - PostByNumberRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAnyofComplexTypesRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostPatternIsNotAnchoredRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostAllofSimpleTypesRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostRefInAnyofRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostByIntRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostUriTemplateFormatRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostEmailFormatRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py deleted file mode 100644 index c3f6ecdebf4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/pattern_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes - - -class PatternApi( - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py deleted file mode 100644 index 7a89e1c3a27..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/properties_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes - - -class PropertiesApi( - PostObjectPropertiesValidationRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py deleted file mode 100644 index c393a4beab8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/ref_api.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.request_body_post_ref_in_oneof_request_body.post.operation import PostRefInOneofRequestBody -from openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.post.operation import PostRefInAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_ref_in_anyof_request_body.post.operation import PostRefInAnyofRequestBody -from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_property_request_body.post.operation import PostRefInPropertyRequestBody -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ref_in_items_request_body.post.operation import PostRefInItemsRequestBody -from openapi_client.paths.request_body_post_ref_in_not_request_body.post.operation import PostRefInNotRequestBody -from openapi_client.paths.request_body_post_ref_in_allof_request_body.post.operation import PostRefInAllofRequestBody - - -class RefApi( - PostRefInAnyofResponseBodyForContentTypes, - PostRefInAllofResponseBodyForContentTypes, - PostRefInItemsResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInOneofRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAnyofRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRefInPropertyResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostRefInNotRequestBody, - PostRefInAllofRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py deleted file mode 100644 index 7de1f19ba5d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/required_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody - - -class RequiredApi( - PostRequiredDefaultValidationRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py deleted file mode 100644 index d2914435cd7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.post.operation import PostRefInAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post.operation import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.post.operation import PostRefInPropertyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post.operation import PostRefInOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post.operation import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.post.operation import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post.operation import PostRefInAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.post.operation import PostRefInItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.post.operation import PostRefInNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post.operation import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post.operation import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class ResponseContentContentTypeSchemaApi( - PostMinlengthValidationResponseBodyForContentTypes, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostRefInAllofResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostRefInPropertyResponseBodyForContentTypes, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostDateTimeFormatResponseBodyForContentTypes, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostMaxlengthValidationResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostRefInOneofResponseBodyForContentTypes, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostUriReferenceFormatResponseBodyForContentTypes, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsResponseBodyForContentTypes, - PostMinimumValidationResponseBodyForContentTypes, - PostNotResponseBodyForContentTypes, - PostNestedItemsResponseBodyForContentTypes, - PostRefInNotResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostOneofWithRequiredResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostByNumberResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py deleted file mode 100644 index f962fcc4505..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/type_api.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes - - -class TypeApi( - PostArrayTypeMatchesArraysRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py deleted file mode 100644 index 999064652e7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes - - -class UniqueItemsApi( - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py deleted file mode 100644 index e3edab2dc1c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py deleted file mode 100644 index 038bd7c4d49..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class AdditionalpropertiesAllowsASchemaWhichShouldValidateDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, arg_) - return AdditionalpropertiesAllowsASchemaWhichShouldValidate.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, - AdditionalpropertiesAllowsASchemaWhichShouldValidateDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidateDict: - return AdditionalpropertiesAllowsASchemaWhichShouldValidate.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - bool, - ] -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesAllowsASchemaWhichShouldValidate( - schemas.Schema[AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesAllowsASchemaWhichShouldValidateDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, - AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidateDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py deleted file mode 100644 index 572fdbf35d5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class AdditionalpropertiesAreAllowedByDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AdditionalpropertiesAreAllowedByDefaultDictInput, arg_) - return AdditionalpropertiesAreAllowedByDefault.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesAreAllowedByDefaultDictInput, - AdditionalpropertiesAreAllowedByDefaultDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesAreAllowedByDefaultDict: - return AdditionalpropertiesAreAllowedByDefault.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AdditionalpropertiesAreAllowedByDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesAreAllowedByDefault( - schemas.AnyTypeSchema[AdditionalpropertiesAreAllowedByDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesAreAllowedByDefaultDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py deleted file mode 100644 index 80fdd6f4793..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema - - -class AdditionalpropertiesCanExistByItselfDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(AdditionalpropertiesCanExistByItselfDictInput, kwargs) - return AdditionalpropertiesCanExistByItself.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesCanExistByItselfDictInput, - AdditionalpropertiesCanExistByItselfDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesCanExistByItselfDict: - return AdditionalpropertiesCanExistByItself.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesCanExistByItselfDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesCanExistByItself( - schemas.Schema[AdditionalpropertiesCanExistByItselfDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesCanExistByItselfDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalpropertiesCanExistByItselfDictInput, - AdditionalpropertiesCanExistByItselfDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesCanExistByItselfDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py deleted file mode 100644 index 5d0628f7ab0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -class AdditionalpropertiesShouldNotLookInApplicatorsDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(AdditionalpropertiesShouldNotLookInApplicatorsDictInput, kwargs) - return AdditionalpropertiesShouldNotLookInApplicators.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesShouldNotLookInApplicatorsDictInput, - AdditionalpropertiesShouldNotLookInApplicatorsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesShouldNotLookInApplicatorsDict: - return AdditionalpropertiesShouldNotLookInApplicators.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesShouldNotLookInApplicatorsDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesShouldNotLookInApplicators( - schemas.AnyTypeSchema[AdditionalpropertiesShouldNotLookInApplicatorsDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesShouldNotLookInApplicatorsDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py deleted file mode 100644 index 6728548e074..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AllOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Allof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py deleted file mode 100644 index ea46cdbf618..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _03( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - -AllOf = typing.Tuple[ - typing.Type[_03], -] - - -@dataclasses.dataclass(frozen=True) -class _02( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 3 - -AnyOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 5 - -OneOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class AllofCombinedWithAnyofOneof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py deleted file mode 100644 index 01058d9f887..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_maximum: typing.Union[int, float] = 30 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 20 - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofSimpleTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py deleted file mode 100644 index bd3918c17f5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Baz: typing_extensions.TypeAlias = schemas.NoneSchema -Properties3 = typing.TypedDict( - 'Properties3', - { - "baz": typing.Type[Baz], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "baz", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - baz: None, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "baz": baz, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def baz(self) -> None: - return typing.cast( - None, - self.__getitem__("baz") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "baz", - }) - properties: Properties3 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties3)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class AllofWithBaseSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(AllofWithBaseSchemaDictInput, arg_) - return AllofWithBaseSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AllofWithBaseSchemaDictInput, - AllofWithBaseSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AllofWithBaseSchemaDict: - return AllofWithBaseSchema.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AllofWithBaseSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AllofWithBaseSchema( - schemas.AnyTypeSchema[AllofWithBaseSchemaDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AllofWithBaseSchemaDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py deleted file mode 100644 index 470e60242b3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithOneEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py deleted file mode 100644 index 9e829e776af..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -_1: typing_extensions.TypeAlias = schemas.NumberSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTheFirstEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py deleted file mode 100644 index 6507399dccb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTheLastEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py deleted file mode 100644 index 1b09dd39228..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTwoEmptySchemas( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py deleted file mode 100644 index 14ff8192681..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 2 - -AnyOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Anyof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py deleted file mode 100644 index c45cb20b190..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofComplexTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py deleted file mode 100644 index f276171b5f4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 2 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_length: int = 4 - -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofWithBaseSchema( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py deleted file mode 100644 index cfeca4eb94c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofWithOneEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py deleted file mode 100644 index 08bb9b79d52..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class ArrayTypeMatchesArraysTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayTypeMatchesArraysTupleInput, ArrayTypeMatchesArraysTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayTypeMatchesArrays.validate(arg, configuration=configuration) -ArrayTypeMatchesArraysTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayTypeMatchesArrays( - schemas.Schema[schemas.immutabledict, ArrayTypeMatchesArraysTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayTypeMatchesArraysTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayTypeMatchesArraysTupleInput, - ArrayTypeMatchesArraysTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayTypeMatchesArraysTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py deleted file mode 100644 index 8c91d791dc2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -BooleanTypeMatchesBooleans: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py deleted file mode 100644 index b7d770765dd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_int.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ByInt( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py deleted file mode 100644 index 36eebf5722b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_number.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ByNumber( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 1.5 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py deleted file mode 100644 index 9e49b70ba60..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/by_small_number.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class BySmallNumber( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 0.00010 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py deleted file mode 100644 index 25f80d500d0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/date_time_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateTimeFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'date-time' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py deleted file mode 100644 index f7909faffee..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/email_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class EmailFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'email' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py deleted file mode 100644 index b74d5d80325..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWith0DoesNotMatchFalseEnums: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal[0]: - return EnumWith0DoesNotMatchFalse.validate(0) - - -@dataclasses.dataclass(frozen=True) -class EnumWith0DoesNotMatchFalse( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 0: "POSITIVE_0", - } - ) - enums = EnumWith0DoesNotMatchFalseEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[0], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py deleted file mode 100644 index 23144b3078d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWith1DoesNotMatchTrueEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return EnumWith1DoesNotMatchTrue.validate(1) - - -@dataclasses.dataclass(frozen=True) -class EnumWith1DoesNotMatchTrue( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - } - ) - enums = EnumWith1DoesNotMatchTrueEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py deleted file mode 100644 index 11bb6f792dc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithEscapedCharactersEnums: - - @schemas.classproperty - def FOO_LINE_FEED_LF_BAR(cls) -> typing.Literal["foo\nbar"]: - return EnumWithEscapedCharacters.validate("foo\nbar") - - @schemas.classproperty - def FOO_CARRIAGE_RETURN_CR_BAR(cls) -> typing.Literal["foo\rbar"]: - return EnumWithEscapedCharacters.validate("foo\rbar") - - -@dataclasses.dataclass(frozen=True) -class EnumWithEscapedCharacters( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "foo\nbar": "FOO_LINE_FEED_LF_BAR", - "foo\rbar": "FOO_CARRIAGE_RETURN_CR_BAR", - } - ) - enums = EnumWithEscapedCharactersEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo\nbar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\nbar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo\rbar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\rbar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\nbar","foo\rbar",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "foo\nbar", - "foo\rbar", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "foo\nbar", - "foo\rbar", - ], - validated_arg - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py deleted file mode 100644 index 39070f584e0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithFalseDoesNotMatch0Enums: - - @schemas.classproperty - def FALSE(cls) -> typing.Literal[False]: - return EnumWithFalseDoesNotMatch0.validate(False) - - -@dataclasses.dataclass(frozen=True) -class EnumWithFalseDoesNotMatch0( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - schemas.Bool.FALSE: "FALSE", - } - ) - enums = EnumWithFalseDoesNotMatch0Enums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - False, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - False, - ], - validated_arg - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py deleted file mode 100644 index 5a253b60571..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithTrueDoesNotMatch1Enums: - - @schemas.classproperty - def TRUE(cls) -> typing.Literal[True]: - return EnumWithTrueDoesNotMatch1.validate(True) - - -@dataclasses.dataclass(frozen=True) -class EnumWithTrueDoesNotMatch1( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - schemas.Bool.TRUE: "TRUE", - } - ) - enums = EnumWithTrueDoesNotMatch1Enums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - True, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - True, - ], - validated_arg - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py deleted file mode 100644 index 47a8ea52683..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class FooEnums: - - @schemas.classproperty - def FOO(cls) -> typing.Literal["foo"]: - return Foo.validate("foo") - - -@dataclasses.dataclass(frozen=True) -class Foo( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "foo": "FOO", - } - ) - enums = FooEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "foo", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "foo", - ], - validated_arg - ) - - -class BarEnums: - - @schemas.classproperty - def BAR(cls) -> typing.Literal["bar"]: - return Bar.validate("bar") - - -@dataclasses.dataclass(frozen=True) -class Bar( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "bar": "BAR", - } - ) - enums = BarEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["bar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["bar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["bar",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "bar", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "bar", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class EnumsInPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - bar: typing.Literal[ - "bar" - ], - foo: typing.Union[ - typing.Literal[ - "foo" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(EnumsInPropertiesDictInput, arg_) - return EnumsInProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - EnumsInPropertiesDictInput, - EnumsInPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumsInPropertiesDict: - return EnumsInProperties.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Literal["bar"]: - return typing.cast( - typing.Literal["bar"], - self.__getitem__("bar") - ) - - @property - def foo(self) -> typing.Union[typing.Literal["foo"], schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["foo"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -EnumsInPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class EnumsInProperties( - schemas.Schema[EnumsInPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: EnumsInPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EnumsInPropertiesDictInput, - EnumsInPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumsInPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py deleted file mode 100644 index 2cf2bdea6ca..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/forbidden_property.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class ForbiddenPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ForbiddenPropertyDictInput, arg_) - return ForbiddenProperty.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ForbiddenPropertyDictInput, - ForbiddenPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ForbiddenPropertyDict: - return ForbiddenProperty.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ForbiddenPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ForbiddenProperty( - schemas.AnyTypeSchema[ForbiddenPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ForbiddenPropertyDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py deleted file mode 100644 index e5bfa3bd6d6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/hostname_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class HostnameFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'hostname' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py deleted file mode 100644 index 5950bab69c7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -IntegerTypeMatchesIntegers: typing_extensions.TypeAlias = schemas.IntSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py deleted file mode 100644 index dae0c4fc796..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - multiple_of: typing.Union[int, float] = 0.123456789 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py deleted file mode 100644 index 715c37d509a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/invalid_string_value_for_default.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Bar( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 4 - default: typing.Literal["bad"] = "bad" -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class InvalidStringValueForDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - - def __new__( - cls, - *, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(InvalidStringValueForDefaultDictInput, arg_) - return InvalidStringValueForDefault.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - InvalidStringValueForDefaultDictInput, - InvalidStringValueForDefaultDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> InvalidStringValueForDefaultDict: - return InvalidStringValueForDefault.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -InvalidStringValueForDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class InvalidStringValueForDefault( - schemas.AnyTypeSchema[InvalidStringValueForDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: InvalidStringValueForDefaultDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py deleted file mode 100644 index 687ab5542cf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv4_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Ipv4Format( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'ipv4' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py deleted file mode 100644 index 122c03fb2b0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ipv6_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Ipv6Format( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'ipv6' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py deleted file mode 100644 index bd10c038c39..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class JsonPointerFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'json-pointer' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py deleted file mode 100644 index 223b3d1a9d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaximumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_maximum: typing.Union[int, float] = 3.0 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py deleted file mode 100644 index 881d0b04650..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaximumValidationWithUnsignedInteger( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_maximum: typing.Union[int, float] = 300 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py deleted file mode 100644 index a6d064e1b66..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_items: int = 2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py deleted file mode 100644 index 2860ab7b7b3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxlengthValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_length: int = 2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py deleted file mode 100644 index 7822abc195b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Maxproperties0MeansTheObjectIsEmpty( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_properties: int = 0 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py deleted file mode 100644 index 0c0d8993863..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxpropertiesValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_properties: int = 2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py deleted file mode 100644 index 212bd9d6209..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinimumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_minimum: typing.Union[int, float] = 1.1 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py deleted file mode 100644 index e7f0b10aeda..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinimumValidationWithSignedInteger( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_minimum: typing.Union[int, float] = -2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py deleted file mode 100644 index a605035eb81..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_items: int = 1 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py deleted file mode 100644 index c4dc9989270..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minlength_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinlengthValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_length: int = 2 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py deleted file mode 100644 index ab77435cfcf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinpropertiesValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_properties: int = 1 - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py deleted file mode 100644 index 75fcc3a594b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -AllOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -AllOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedAllofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py deleted file mode 100644 index f97ce2a9ec8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -AnyOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - -AnyOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedAnyofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py deleted file mode 100644 index 8702c5a5ecd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_items.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items4: typing_extensions.TypeAlias = schemas.NumberSchema - - -class ItemsTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items3.validate(arg, configuration=configuration) -ItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items3( - schemas.Schema[schemas.immutabledict, ItemsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput, - ItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ItemsTuple2( - typing.Tuple[ - ItemsTuple, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items2.validate(arg, configuration=configuration) -ItemsTupleInput2 = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items2( - schemas.Schema[schemas.immutabledict, ItemsTuple2] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple2 - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput2, - ItemsTuple2, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple2: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ItemsTuple3( - typing.Tuple[ - ItemsTuple2, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput3, ItemsTuple3], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items.validate(arg, configuration=configuration) -ItemsTupleInput3 = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema[schemas.immutabledict, ItemsTuple3] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple3 - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput3, - ItemsTuple3, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple3: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class NestedItemsTuple( - typing.Tuple[ - ItemsTuple3, - ... - ] -): - - def __new__(cls, arg: typing.Union[NestedItemsTupleInput, NestedItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return NestedItems.validate(arg, configuration=configuration) -NestedItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput3, - ItemsTuple3 - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput3, - ItemsTuple3 - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class NestedItems( - schemas.Schema[schemas.immutabledict, NestedItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: NestedItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NestedItemsTupleInput, - NestedItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NestedItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py deleted file mode 100644 index 4bfb652ec79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -OneOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - -OneOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedOneofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py deleted file mode 100644 index aed7151d4c1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not2: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py deleted file mode 100644 index e5e0a5b915c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class NotDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(NotDictInput, arg_) - return Not.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NotDictInput, - NotDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NotDict: - return Not.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[str, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -NotDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.Schema[NotDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NotDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NotDictInput, - NotDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NotDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class NotMoreComplexSchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py deleted file mode 100644 index b2775cdb5d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class NulCharactersInStringsEnums: - - @schemas.classproperty - def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: - return NulCharactersInStrings.validate("hello\x00there") - - -@dataclasses.dataclass(frozen=True) -class NulCharactersInStrings( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "hello\x00there": "HELLO_NULL_THERE", - } - ) - enums = NulCharactersInStringsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["hello\x00there"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["hello\x00there"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["hello\x00there",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "hello\x00there", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "hello\x00there", - ], - validated_arg - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py deleted file mode 100644 index 7a1f3b51ab3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -NullTypeMatchesOnlyTheNullObject: typing_extensions.TypeAlias = schemas.NoneSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py deleted file mode 100644 index 62e38686690..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -NumberTypeMatchesNumbers: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py deleted file mode 100644 index 22c0ff1a361..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.IntSchema -Bar: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class ObjectPropertiesValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectPropertiesValidationDictInput, arg_) - return ObjectPropertiesValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectPropertiesValidationDictInput, - ObjectPropertiesValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectPropertiesValidationDict: - return ObjectPropertiesValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[int, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectPropertiesValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectPropertiesValidation( - schemas.AnyTypeSchema[ObjectPropertiesValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectPropertiesValidationDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py deleted file mode 100644 index 640c3aaaf65..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -ObjectTypeMatchesObjects: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py deleted file mode 100644 index 311bccf4652..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 2 - -OneOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Oneof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py deleted file mode 100644 index 599622aefdc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofComplexTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py deleted file mode 100644 index a47360cea6d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_length: int = 2 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 4 - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithBaseSchema( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py deleted file mode 100644 index 2e472aacc60..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py deleted file mode 100644 index 655b9cb81e7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("bar") - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - "foo", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "baz", - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - baz: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "baz": baz, - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def baz(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("baz") - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "baz", - "foo", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithRequired( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py deleted file mode 100644 index d9134a500d1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PatternIsNotAnchored( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'a+' # noqa: E501 - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py deleted file mode 100644 index 81e8857ded2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/pattern_validation.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PatternValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^a*$' # noqa: E501 - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py deleted file mode 100644 index 99984579b56..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -FooNbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooBar: typing_extensions.TypeAlias = schemas.NumberSchema -FooBar: typing_extensions.TypeAlias = schemas.NumberSchema -FooRbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooTbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooFbar: typing_extensions.TypeAlias = schemas.NumberSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo\nbar": typing.Type[FooNbar], - "foo\"bar": typing.Type[FooBar], - "foo\\bar": typing.Type[FooBar], - "foo\rbar": typing.Type[FooRbar], - "foo\tbar": typing.Type[FooTbar], - "foo\fbar": typing.Type[FooFbar], - } -) - - -class PropertiesWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar", - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - arg_.update(kwargs) - used_arg_ = typing.cast(PropertiesWithEscapedCharactersDictInput, arg_) - return PropertiesWithEscapedCharacters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertiesWithEscapedCharactersDictInput, - PropertiesWithEscapedCharactersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesWithEscapedCharactersDict: - return PropertiesWithEscapedCharacters.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertiesWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertiesWithEscapedCharacters( - schemas.AnyTypeSchema[PropertiesWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertiesWithEscapedCharactersDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py deleted file mode 100644 index 3ba28cea4d8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Ref: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "$ref": typing.Type[Ref], - } -) - - -class PropertyNamedRefThatIsNotAReferenceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "$ref", - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - arg_.update(kwargs) - used_arg_ = typing.cast(PropertyNamedRefThatIsNotAReferenceDictInput, arg_) - return PropertyNamedRefThatIsNotAReference.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertyNamedRefThatIsNotAReferenceDictInput, - PropertyNamedRefThatIsNotAReferenceDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertyNamedRefThatIsNotAReferenceDict: - return PropertyNamedRefThatIsNotAReference.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertyNamedRefThatIsNotAReferenceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertyNamedRefThatIsNotAReference( - schemas.AnyTypeSchema[PropertyNamedRefThatIsNotAReferenceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertyNamedRefThatIsNotAReferenceDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py deleted file mode 100644 index 3c028ee0d5f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_additionalproperties.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference - - -class RefInAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ): - used_kwargs = typing.cast(RefInAdditionalpropertiesDictInput, kwargs) - return RefInAdditionalproperties.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RefInAdditionalpropertiesDictInput, - RefInAdditionalpropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RefInAdditionalpropertiesDict: - return RefInAdditionalproperties.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -RefInAdditionalpropertiesDictInput = typing.Mapping[ - str, - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], -] - - -@dataclasses.dataclass(frozen=True) -class RefInAdditionalproperties( - schemas.Schema[RefInAdditionalpropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RefInAdditionalpropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - RefInAdditionalpropertiesDictInput, - RefInAdditionalpropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RefInAdditionalpropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py deleted file mode 100644 index f2c43f2a86e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_allof.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AllOf = typing.Tuple[ - typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], -] - - -@dataclasses.dataclass(frozen=True) -class RefInAllof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py deleted file mode 100644 index 04c04bf07fc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_anyof.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AnyOf = typing.Tuple[ - typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], -] - - -@dataclasses.dataclass(frozen=True) -class RefInAnyof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py deleted file mode 100644 index 96f6fbe537a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_items.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference - - -class RefInItemsTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[RefInItemsTupleInput, RefInItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return RefInItems.validate(arg, configuration=configuration) -RefInItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class RefInItems( - schemas.Schema[schemas.immutabledict, RefInItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: RefInItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - RefInItemsTupleInput, - RefInItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RefInItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py deleted file mode 100644 index 932c553fff3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_not.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class RefInNot( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py deleted file mode 100644 index 74d51e63014..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_oneof.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -OneOf = typing.Tuple[ - typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], -] - - -@dataclasses.dataclass(frozen=True) -class RefInOneof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py deleted file mode 100644 index 70c72455ec5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/ref_in_property.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], - } -) - - -class RefInPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "a", - }) - - def __new__( - cls, - *, - a: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("a", a), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RefInPropertyDictInput, arg_) - return RefInProperty.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RefInPropertyDictInput, - RefInPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RefInPropertyDict: - return RefInProperty.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("a", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RefInPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RefInProperty( - schemas.AnyTypeSchema[RefInPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RefInPropertyDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py deleted file mode 100644 index 5f1aadf3625..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_default_validation.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class RequiredDefaultValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredDefaultValidationDictInput, arg_) - return RequiredDefaultValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredDefaultValidationDictInput, - RequiredDefaultValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredDefaultValidationDict: - return RequiredDefaultValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredDefaultValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredDefaultValidation( - schemas.AnyTypeSchema[RequiredDefaultValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredDefaultValidationDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py deleted file mode 100644 index 696de0e8790..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_validation.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class RequiredValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - for key_, val in ( - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredValidationDictInput, arg_) - return RequiredValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredValidationDictInput, - RequiredValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredValidationDict: - return RequiredValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredValidation( - schemas.AnyTypeSchema[RequiredValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredValidationDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py deleted file mode 100644 index ef95f3f7b6a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class RequiredWithEmptyArrayDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredWithEmptyArrayDictInput, arg_) - return RequiredWithEmptyArray.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredWithEmptyArrayDictInput, - RequiredWithEmptyArrayDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredWithEmptyArrayDict: - return RequiredWithEmptyArray.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredWithEmptyArrayDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredWithEmptyArray( - schemas.AnyTypeSchema[RequiredWithEmptyArrayDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredWithEmptyArrayDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py deleted file mode 100644 index 5cc9067987e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class RequiredWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - } - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredWithEscapedCharactersDictInput, arg_) - return RequiredWithEscapedCharacters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredWithEscapedCharactersDictInput, - RequiredWithEscapedCharactersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredWithEscapedCharactersDict: - return RequiredWithEscapedCharacters.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredWithEscapedCharacters( - schemas.AnyTypeSchema[RequiredWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredWithEscapedCharactersDict, - } - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py deleted file mode 100644 index 4bf1a0ae8b2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SimpleEnumValidationEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return SimpleEnumValidation.validate(1) - - @schemas.classproperty - def POSITIVE_2(cls) -> typing.Literal[2]: - return SimpleEnumValidation.validate(2) - - @schemas.classproperty - def POSITIVE_3(cls) -> typing.Literal[3]: - return SimpleEnumValidation.validate(3) - - -@dataclasses.dataclass(frozen=True) -class SimpleEnumValidation( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - 2: "POSITIVE_2", - 3: "POSITIVE_3", - } - ) - enums = SimpleEnumValidationEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[2], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[2]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[3], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[3]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,2,3,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py deleted file mode 100644 index c3a240932f2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -StringTypeMatchesStrings: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py deleted file mode 100644 index 2e001fdaa96..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Alpha( - schemas.NumberSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - inclusive_maximum: typing.Union[int, float] = 3 -Properties = typing.TypedDict( - 'Properties', - { - "alpha": typing.Type[Alpha], - } -) - - -class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "alpha", - }) - - def __new__( - cls, - *, - alpha: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("alpha", alpha), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, arg_) - return TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict: - return TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.validate(arg, configuration=configuration) - - @property - def alpha(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("alpha", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - schemas.Schema[TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py deleted file mode 100644 index f37744f39de..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsFalseValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unique_items: bool = False - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py deleted file mode 100644 index 42a203fab65..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unique_items: bool = True - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py deleted file mode 100644 index 14ed5159fde..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py deleted file mode 100644 index ab3bed76d66..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriReferenceFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri-reference' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py deleted file mode 100644 index 1400cce58b1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schema/uri_template_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriTemplateFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri-template' - diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py deleted file mode 100644 index 68c8f77e506..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/components/schemas/__init__.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from unit_test_api.components.schema.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from unit_test_api.components.schema.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from unit_test_api.components.schema.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from unit_test_api.components.schema.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from unit_test_api.components.schema.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from unit_test_api.components.schema.allof import Allof -from unit_test_api.components.schema.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from unit_test_api.components.schema.allof_simple_types import AllofSimpleTypes -from unit_test_api.components.schema.allof_with_base_schema import AllofWithBaseSchema -from unit_test_api.components.schema.allof_with_one_empty_schema import AllofWithOneEmptySchema -from unit_test_api.components.schema.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from unit_test_api.components.schema.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from unit_test_api.components.schema.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from unit_test_api.components.schema.anyof import Anyof -from unit_test_api.components.schema.anyof_complex_types import AnyofComplexTypes -from unit_test_api.components.schema.anyof_with_base_schema import AnyofWithBaseSchema -from unit_test_api.components.schema.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from unit_test_api.components.schema.array_type_matches_arrays import ArrayTypeMatchesArrays -from unit_test_api.components.schema.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -from unit_test_api.components.schema.by_int import ByInt -from unit_test_api.components.schema.by_number import ByNumber -from unit_test_api.components.schema.by_small_number import BySmallNumber -from unit_test_api.components.schema.date_time_format import DateTimeFormat -from unit_test_api.components.schema.email_format import EmailFormat -from unit_test_api.components.schema.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from unit_test_api.components.schema.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from unit_test_api.components.schema.enum_with_escaped_characters import EnumWithEscapedCharacters -from unit_test_api.components.schema.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from unit_test_api.components.schema.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from unit_test_api.components.schema.enums_in_properties import EnumsInProperties -from unit_test_api.components.schema.forbidden_property import ForbiddenProperty -from unit_test_api.components.schema.hostname_format import HostnameFormat -from unit_test_api.components.schema.integer_type_matches_integers import IntegerTypeMatchesIntegers -from unit_test_api.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from unit_test_api.components.schema.invalid_string_value_for_default import InvalidStringValueForDefault -from unit_test_api.components.schema.ipv4_format import Ipv4Format -from unit_test_api.components.schema.ipv6_format import Ipv6Format -from unit_test_api.components.schema.json_pointer_format import JsonPointerFormat -from unit_test_api.components.schema.maximum_validation import MaximumValidation -from unit_test_api.components.schema.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from unit_test_api.components.schema.maxitems_validation import MaxitemsValidation -from unit_test_api.components.schema.maxlength_validation import MaxlengthValidation -from unit_test_api.components.schema.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from unit_test_api.components.schema.maxproperties_validation import MaxpropertiesValidation -from unit_test_api.components.schema.minimum_validation import MinimumValidation -from unit_test_api.components.schema.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from unit_test_api.components.schema.minitems_validation import MinitemsValidation -from unit_test_api.components.schema.minlength_validation import MinlengthValidation -from unit_test_api.components.schema.minproperties_validation import MinpropertiesValidation -from unit_test_api.components.schema.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from unit_test_api.components.schema.nested_items import NestedItems -from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api.components.schema.not import Not -from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema -from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings -from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -from unit_test_api.components.schema.number_type_matches_numbers import NumberTypeMatchesNumbers -from unit_test_api.components.schema.object_properties_validation import ObjectPropertiesValidation -from unit_test_api.components.schema.object_type_matches_objects import ObjectTypeMatchesObjects -from unit_test_api.components.schema.oneof import Oneof -from unit_test_api.components.schema.oneof_complex_types import OneofComplexTypes -from unit_test_api.components.schema.oneof_with_base_schema import OneofWithBaseSchema -from unit_test_api.components.schema.oneof_with_empty_schema import OneofWithEmptySchema -from unit_test_api.components.schema.oneof_with_required import OneofWithRequired -from unit_test_api.components.schema.pattern_is_not_anchored import PatternIsNotAnchored -from unit_test_api.components.schema.pattern_validation import PatternValidation -from unit_test_api.components.schema.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from unit_test_api.components.schema.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api.components.schema.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api.components.schema.ref_in_allof import RefInAllof -from unit_test_api.components.schema.ref_in_anyof import RefInAnyof -from unit_test_api.components.schema.ref_in_items import RefInItems -from unit_test_api.components.schema.ref_in_not import RefInNot -from unit_test_api.components.schema.ref_in_oneof import RefInOneof -from unit_test_api.components.schema.ref_in_property import RefInProperty -from unit_test_api.components.schema.required_default_validation import RequiredDefaultValidation -from unit_test_api.components.schema.required_validation import RequiredValidation -from unit_test_api.components.schema.required_with_empty_array import RequiredWithEmptyArray -from unit_test_api.components.schema.required_with_escaped_characters import RequiredWithEscapedCharacters -from unit_test_api.components.schema.simple_enum_validation import SimpleEnumValidation -from unit_test_api.components.schema.string_type_matches_strings import StringTypeMatchesStrings -from unit_test_api.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from unit_test_api.components.schema.uniqueitems_false_validation import UniqueitemsFalseValidation -from unit_test_api.components.schema.uniqueitems_validation import UniqueitemsValidation -from unit_test_api.components.schema.uri_format import UriFormat -from unit_test_api.components.schema.uri_reference_format import UriReferenceFormat -from unit_test_api.components.schema.uri_template_format import UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py deleted file mode 100644 index 1abc7dcbc6d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/api_configuration.py +++ /dev/null @@ -1,281 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing -import typing_extensions - -import urllib3 - -from unit_test_api import exceptions -from unit_test_api.servers import server_0 - -# the server to use at each openapi document json path -ServerInfo = typing.TypedDict( - 'ServerInfo', - { - 'servers/0': server_0.Server0, - }, - total=False -) - - -class ServerIndexInfoRequired(typing.TypedDict): - servers: typing.Literal[0] - -ServerIndexInfoOptional = typing.TypedDict( - 'ServerIndexInfoOptional', - { - }, - total=False -) - - -class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): - """ - the default server_index to use at each openapi document json path - the fallback value is stored in the 'servers' key - """ - - -class ApiConfiguration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param server_info: the servers that can be used to make endpoint calls - :param server_index_info: index to servers configuration - """ - - def __init__( - self, - server_info: typing.Optional[ServerInfo] = None, - server_index_info: typing.Optional[ServerIndexInfo] = None, - ): - """Constructor - """ - # Authentication Settings - self.security_scheme_info: typing.Dict[str, typing.Any] = {} - self.security_index_info = {'security': 0} - # Server Info - self.server_info: ServerInfo = server_info or { - 'servers/0': server_0.Server0(), - } - self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("unit_test_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_server_url( - self, - key_prefix: typing.Literal[ - "servers", - ], - index: typing.Optional[int], - ) -> str: - """Gets host URL based on the index - :param index: array index of the host settings - :return: URL based on host settings - """ - if index: - used_index = index - else: - try: - used_index = self.server_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.server_index_info.get("servers", 0) - server_info_key = typing.cast( - typing.Literal[ - "servers/0", - ], - f"{key_prefix}/{used_index}" - ) - try: - server = self.server_info[server_info_key] - except KeyError as ex: - raise ex - return server.url diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py deleted file mode 100644 index 1344eb81896..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/configurations/schema_configuration.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -from unit_test_api import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'additional_properties': 'additionalProperties', - 'all_of': 'allOf', - 'any_of': 'anyOf', - 'const_value_to_name': 'const', - 'contains': 'contains', - 'dependent_required': 'dependentRequired', - 'dependent_schemas': 'dependentSchemas', - 'discriminator': 'discriminator', - # default omitted because it has no validation impact - 'else_': 'else', - 'enum_value_to_name': 'enum', - 'exclusive_maximum': 'exclusiveMaximum', - 'exclusive_minimum': 'exclusiveMinimum', - 'format': 'format', - 'if_': 'if', - 'inclusive_maximum': 'maximum', - 'inclusive_minimum': 'minimum', - 'items': 'items', - 'max_contains': 'maxContains', - 'max_items': 'maxItems', - 'max_length': 'maxLength', - 'max_properties': 'maxProperties', - 'min_contains': 'minContains', - 'min_items': 'minItems', - 'min_length': 'minLength', - 'min_properties': 'minProperties', - 'multiple_of': 'multipleOf', - 'not_': 'not', - 'one_of': 'oneOf', - 'pattern': 'pattern', - 'pattern_properties': 'patternProperties', - 'prefix_items': 'prefixItems', - 'properties': 'properties', - 'property_names': 'propertyNames', - 'required': 'required', - 'then': 'then', - 'types': 'type', - 'unique_items': 'uniqueItems', - 'unevaluated_items': 'unevaluatedItems', - 'unevaluated_properties': 'unevaluatedProperties' -} - -class SchemaConfiguration: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - """ - - def __init__( - self, - disabled_json_schema_keywords = set(), - ): - """Constructor - """ - self.disabled_json_schema_keywords = disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py deleted file mode 100644 index d45185ec9b7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/exceptions.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -from unit_test_api import api_response - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - -T = typing.TypeVar('T', bound=api_response.ApiResponse) - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: typing.Optional[str] = None - api_response: typing.Optional[T] = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.api_response: - if self.api_response.response.headers: - error_message += "HTTP response headers: {0}\n".format( - self.api_response.response.headers) - if self.api_response.response.data: - error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) - - return error_message diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py deleted file mode 100644 index 2c2c9cc4bdc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis import path_to_api diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py deleted file mode 100644 index 82b874069ba..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody - -path = "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py deleted file mode 100644 index 064e50d3664..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[ - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[ - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[ - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDictInput, - additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_allows_a_schema_which_should_validate_request_body = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 340bf9ac466..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate -Schema: typing_extensions.TypeAlias = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py deleted file mode 100644 index 5190cb5eaa5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody - -path = "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py deleted file mode 100644 index 507b2b3fee2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_are_allowed_by_default_request_body = BaseApi._post_additionalproperties_are_allowed_by_default_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_are_allowed_by_default_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 0e1479a204a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default -Schema: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py deleted file mode 100644 index 642b03110eb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody - -path = "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py deleted file mode 100644 index 975167b5cec..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_can_exist_by_itself_request_body = BaseApi._post_additionalproperties_can_exist_by_itself_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_can_exist_by_itself_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 3604eaec570..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself -Schema: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py deleted file mode 100644 index 6ce31665b0a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody - -path = "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py deleted file mode 100644 index e7ccfddfa07..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_should_not_look_in_applicators_request_body = BaseApi._post_additionalproperties_should_not_look_in_applicators_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_should_not_look_in_applicators_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 31a1e692371..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators -Schema: typing_extensions.TypeAlias = additionalproperties_should_not_look_in_applicators.AdditionalpropertiesShouldNotLookInApplicators diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py deleted file mode 100644 index ed94c39ba95..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody - -path = "/requestBody/postAllofCombinedWithAnyofOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py deleted file mode 100644 index b88aad79ab3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_combined_with_anyof_oneof_request_body = BaseApi._post_allof_combined_with_anyof_oneof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_combined_with_anyof_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 0f53323a58c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof -Schema: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py deleted file mode 100644 index 5b7f8d32e3e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody - -path = "/requestBody/postAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py deleted file mode 100644 index 5dd9561aea3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_request_body = BaseApi._post_allof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4d535df3587..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof -Schema: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py deleted file mode 100644 index 0b0cfa4160b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody - -path = "/requestBody/postAllofSimpleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py deleted file mode 100644 index b13ad85a117..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofSimpleTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_simple_types_request_body = BaseApi._post_allof_simple_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_simple_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 20e2d311d65..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types -Schema: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 08c83aaec1b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody - -path = "/requestBody/postAllofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index 85430fe79ff..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_base_schema_request_body = BaseApi._post_allof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d21fc0258d8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema -Schema: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index aea2f6ab6ed..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody - -path = "/requestBody/postAllofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py deleted file mode 100644 index 7e952d703ba..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_one_empty_schema_request_body = BaseApi._post_allof_with_one_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_one_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 69c3924727e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py deleted file mode 100644 index 7aa083ee5bd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody - -path = "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py deleted file mode 100644 index ace40540f1d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_first_empty_schema_request_body = BaseApi._post_allof_with_the_first_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_first_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 56a68d392e9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py deleted file mode 100644 index 9daab2c7562..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody - -path = "/requestBody/postAllofWithTheLastEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py deleted file mode 100644 index 3b92e4c02cf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_last_empty_schema_request_body = BaseApi._post_allof_with_the_last_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_last_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2ce7c85276d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py deleted file mode 100644 index d46b12c2bfe..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody - -path = "/requestBody/postAllofWithTwoEmptySchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py deleted file mode 100644 index a56105b2114..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_two_empty_schemas_request_body = BaseApi._post_allof_with_two_empty_schemas_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_two_empty_schemas_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1130b86c7fc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas -Schema: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py deleted file mode 100644 index 30ce22d14d9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody - -path = "/requestBody/postAnyofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py deleted file mode 100644 index f4340f769b6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_complex_types_request_body = BaseApi._post_anyof_complex_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_complex_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 37d58d62929..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types -Schema: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py deleted file mode 100644 index 0a3eeb92ed7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody - -path = "/requestBody/postAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py deleted file mode 100644 index 4dae2f6a975..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_request_body = BaseApi._post_anyof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f78e4027a5e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof -Schema: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 582eec5d98e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody - -path = "/requestBody/postAnyofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index b8b746b160c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_base_schema_request_body = BaseApi._post_anyof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a51ee5c5cbb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema -Schema: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index 276553e3f77..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody - -path = "/requestBody/postAnyofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py deleted file mode 100644 index aca3fda91ec..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_one_empty_schema_request_body = BaseApi._post_anyof_with_one_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_one_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c89f2bd3f41..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema -Schema: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py deleted file mode 100644 index d8aa6c7999e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody - -path = "/requestBody/postArrayTypeMatchesArraysRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py deleted file mode 100644 index 7202a3904d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, - array_type_matches_arrays.ArrayTypeMatchesArraysTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, - array_type_matches_arrays.ArrayTypeMatchesArraysTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - array_type_matches_arrays.ArrayTypeMatchesArraysTupleInput, - array_type_matches_arrays.ArrayTypeMatchesArraysTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostArrayTypeMatchesArraysRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_array_type_matches_arrays_request_body = BaseApi._post_array_type_matches_arrays_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_array_type_matches_arrays_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c1f04ef4119..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays -Schema: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py deleted file mode 100644 index 04cf90ab91d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody - -path = "/requestBody/postBooleanTypeMatchesBooleansRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py deleted file mode 100644 index 5d8837f8fba..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_boolean_type_matches_booleans_request_body = BaseApi._post_boolean_type_matches_booleans_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_boolean_type_matches_booleans_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 08ea06ae60b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans -Schema: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py deleted file mode 100644 index 9b8e641c5f0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody - -path = "/requestBody/postByIntRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py deleted file mode 100644 index 081ad13bcc2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByIntRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_int_request_body = BaseApi._post_by_int_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_int_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7adfd689fbf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int -Schema: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py deleted file mode 100644 index 3625b98cb9c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody - -path = "/requestBody/postByNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py deleted file mode 100644 index f09c49a58c7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_number_request_body = BaseApi._post_by_number_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_number_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 13f45350f7a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number -Schema: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py deleted file mode 100644 index cb0bd6eeac1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody - -path = "/requestBody/postBySmallNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py deleted file mode 100644 index d653a7b7005..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBySmallNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_small_number_request_body = BaseApi._post_by_small_number_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_small_number_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 08d562eedca..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number -Schema: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py deleted file mode 100644 index fe71ff77c36..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody - -path = "/requestBody/postDateTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py deleted file mode 100644 index 582a5e6aad0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateTimeFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_time_format_request_body = BaseApi._post_date_time_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_time_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2920670b4c7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format -Schema: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py deleted file mode 100644 index 343ccc2d7e7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody - -path = "/requestBody/postEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py deleted file mode 100644 index 3d1a89e26bd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmailFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_email_format_request_body = BaseApi._post_email_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_email_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ee6f2bff8f5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format -Schema: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py deleted file mode 100644 index 6278f4f37bd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody - -path = "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py deleted file mode 100644 index 677e4fab21c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with0_does_not_match_false_request_body = BaseApi._post_enum_with0_does_not_match_false_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with0_does_not_match_false_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c597080e60f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false -Schema: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py deleted file mode 100644 index 2192491c663..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody - -path = "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py deleted file mode 100644 index 6ebd923c476..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with1_does_not_match_true_request_body = BaseApi._post_enum_with1_does_not_match_true_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with1_does_not_match_true_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fd53b5fcf24..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true -Schema: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index f4b3a43f028..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody - -path = "/requestBody/postEnumWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index 1bf7c4c9049..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_escaped_characters_request_body = BaseApi._post_enum_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 957f84b23de..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters -Schema: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py deleted file mode 100644 index 3a9b589fde9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody - -path = "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py deleted file mode 100644 index 325e71a1905..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_false_does_not_match0_request_body = BaseApi._post_enum_with_false_does_not_match0_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_false_does_not_match0_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 06d1a86cede..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 -Schema: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py deleted file mode 100644 index 1ccbf7eb9c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody - -path = "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py deleted file mode 100644 index f1a63fac757..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_true_does_not_match1_request_body = BaseApi._post_enum_with_true_does_not_match1_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_true_does_not_match1_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6bb13075e98..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 -Schema: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py deleted file mode 100644 index 83f65d50bbf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody - -path = "/requestBody/postEnumsInPropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py deleted file mode 100644 index 1d154c0103f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumsInPropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enums_in_properties_request_body = BaseApi._post_enums_in_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enums_in_properties_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8c4fd671f3a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties -Schema: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py deleted file mode 100644 index dc0ec75dc30..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody - -path = "/requestBody/postForbiddenPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py deleted file mode 100644 index d3989a28ff4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostForbiddenPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_forbidden_property_request_body = BaseApi._post_forbidden_property_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_forbidden_property_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7b1c9c5743b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property -Schema: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py deleted file mode 100644 index 3ae4314eb5a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody - -path = "/requestBody/postHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py deleted file mode 100644 index 158a08bb819..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostHostnameFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_hostname_format_request_body = BaseApi._post_hostname_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_hostname_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4dbbf097174..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format -Schema: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py deleted file mode 100644 index 6ebb39e9071..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody - -path = "/requestBody/postIntegerTypeMatchesIntegersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py deleted file mode 100644 index 9f8411a6e00..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_integer_type_matches_integers_request_body = BaseApi._post_integer_type_matches_integers_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_integer_type_matches_integers_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6158b6d193a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers -Schema: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py deleted file mode 100644 index 406ff0675bb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody - -path = "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py deleted file mode 100644 index a69ff6fee00..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f4c72861928..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf -Schema: typing_extensions.TypeAlias = invalid_instance_should_not_raise_error_when_float_division_inf.InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py deleted file mode 100644 index 94484c688b9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_invalid_string_value_for_default_request_body import RequestBodyPostInvalidStringValueForDefaultRequestBody - -path = "/requestBody/postInvalidStringValueForDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py deleted file mode 100644 index 881ff543c96..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_string_value_for_default - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostInvalidStringValueForDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_invalid_string_value_for_default_request_body = BaseApi._post_invalid_string_value_for_default_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_invalid_string_value_for_default_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4d8393f859c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_string_value_for_default -Schema: typing_extensions.TypeAlias = invalid_string_value_for_default.InvalidStringValueForDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py deleted file mode 100644 index 0121543e6ef..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody - -path = "/requestBody/postIpv4FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py deleted file mode 100644 index 470b60208c2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv4FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv4_format_request_body = BaseApi._post_ipv4_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv4_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 059799950e5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format -Schema: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py deleted file mode 100644 index ea64fe2d5bf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody - -path = "/requestBody/postIpv6FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py deleted file mode 100644 index cd202fc4b6c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv6FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv6_format_request_body = BaseApi._post_ipv6_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv6_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2962488b272..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format -Schema: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py deleted file mode 100644 index 01fde730e5a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody - -path = "/requestBody/postJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py deleted file mode 100644 index 1fdca8c044f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostJsonPointerFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_json_pointer_format_request_body = BaseApi._post_json_pointer_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_json_pointer_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e2a8e4178f8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format -Schema: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py deleted file mode 100644 index e154f1fcdb2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody - -path = "/requestBody/postMaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py deleted file mode 100644 index d086568cedb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_request_body = BaseApi._post_maximum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7d9db688e71..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation -Schema: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py deleted file mode 100644 index 6ad11512c97..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody - -path = "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py deleted file mode 100644 index 4fb589404bf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_with_unsigned_integer_request_body = BaseApi._post_maximum_validation_with_unsigned_integer_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_with_unsigned_integer_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7536bd0136c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer -Schema: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py deleted file mode 100644 index 713fdb3d848..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody - -path = "/requestBody/postMaxitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py deleted file mode 100644 index 70bbb41cf2b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxitems_validation_request_body = BaseApi._post_maxitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index faaf87ab0d7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation -Schema: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py deleted file mode 100644 index 5c8fb246f4e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody - -path = "/requestBody/postMaxlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py deleted file mode 100644 index e53d7cf24a7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxlength_validation_request_body = BaseApi._post_maxlength_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxlength_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8c1872beb80..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation -Schema: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py deleted file mode 100644 index ee07bbdbbbd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody - -path = "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py deleted file mode 100644 index 15ce6ba1ed5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties0_means_the_object_is_empty_request_body = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index be07984b186..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty -Schema: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py deleted file mode 100644 index bc81917babb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody - -path = "/requestBody/postMaxpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py deleted file mode 100644 index e7fd11c2354..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties_validation_request_body = BaseApi._post_maxproperties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 16789fbe850..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation -Schema: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py deleted file mode 100644 index ad9ce2f4096..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody - -path = "/requestBody/postMinimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py deleted file mode 100644 index 3cbc67f84af..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_request_body = BaseApi._post_minimum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c2565a914a6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation -Schema: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py deleted file mode 100644 index 5dadedfe25a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody - -path = "/requestBody/postMinimumValidationWithSignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py deleted file mode 100644 index 7b710ba3340..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_with_signed_integer_request_body = BaseApi._post_minimum_validation_with_signed_integer_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_with_signed_integer_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1e1f0b94a42..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer -Schema: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py deleted file mode 100644 index 0f7cc0c1305..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody - -path = "/requestBody/postMinitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py deleted file mode 100644 index d21ce3e5f8a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minitems_validation_request_body = BaseApi._post_minitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 08a7a0ce0ab..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation -Schema: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py deleted file mode 100644 index 0fa95af2e9d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody - -path = "/requestBody/postMinlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py deleted file mode 100644 index eeecaa2e51d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minlength_validation_request_body = BaseApi._post_minlength_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minlength_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 352706b990d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation -Schema: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py deleted file mode 100644 index 3373bc97244..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody - -path = "/requestBody/postMinpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py deleted file mode 100644 index 08f61ae11f5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minproperties_validation_request_body = BaseApi._post_minproperties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minproperties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 78f5320afd0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation -Schema: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index fa5ad4e8f6f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index 46e51530cec..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_allof_to_check_validation_semantics_request_body = BaseApi._post_nested_allof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_allof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e6cddb5a48e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 809df9f9000..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index 5af69d6bd9a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_anyof_to_check_validation_semantics_request_body = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index dd2578be639..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py deleted file mode 100644 index ac24cf6aa52..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody - -path = "/requestBody/postNestedItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py deleted file mode 100644 index 4d95cd261f1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_items_request_body = BaseApi._post_nested_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_items_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 88c01be599d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items -Schema: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 53864f06e40..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index 9bc735cdc52..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_oneof_to_check_validation_semantics_request_body = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index da246f2369a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py deleted file mode 100644 index 0ce18a55b48..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody - -path = "/requestBody/postNotMoreComplexSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py deleted file mode 100644 index 1a98f1038dc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMoreComplexSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_more_complex_schema_request_body = BaseApi._post_not_more_complex_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_more_complex_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f0f896578b9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema -Schema: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py deleted file mode 100644 index 5d8109b6f57..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody - -path = "/requestBody/postNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py deleted file mode 100644 index 9ebbcad3242..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_request_body = BaseApi._post_not_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ac66137b933..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not -Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py deleted file mode 100644 index 9cd5dfb3207..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody - -path = "/requestBody/postNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py deleted file mode 100644 index e99280b4671..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNulCharactersInStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nul_characters_in_strings_request_body = BaseApi._post_nul_characters_in_strings_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nul_characters_in_strings_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5a75e8b811c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings -Schema: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py deleted file mode 100644 index d00cc04dfb9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody - -path = "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py deleted file mode 100644 index 2a2665b4b48..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_null_type_matches_only_the_null_object_request_body = BaseApi._post_null_type_matches_only_the_null_object_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_null_type_matches_only_the_null_object_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fb3c7bee1da..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object -Schema: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py deleted file mode 100644 index 47587baa209..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody - -path = "/requestBody/postNumberTypeMatchesNumbersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py deleted file mode 100644 index 131d6d3b8bb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNumberTypeMatchesNumbersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_number_type_matches_numbers_request_body = BaseApi._post_number_type_matches_numbers_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_number_type_matches_numbers_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 91952830c9c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers -Schema: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py deleted file mode 100644 index 4128e9e90db..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody - -path = "/requestBody/postObjectPropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py deleted file mode 100644 index ad7b583cfc6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectPropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_properties_validation_request_body = BaseApi._post_object_properties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_properties_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 0b4594d21a6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation -Schema: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py deleted file mode 100644 index 9a28be7eac3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody - -path = "/requestBody/postObjectTypeMatchesObjectsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py deleted file mode 100644 index f1003bb773e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectTypeMatchesObjectsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_type_matches_objects_request_body = BaseApi._post_object_type_matches_objects_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_type_matches_objects_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7bd73ee7b25..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects -Schema: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py deleted file mode 100644 index 19e6c49de33..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody - -path = "/requestBody/postOneofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py deleted file mode 100644 index 05c28bb5073..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_complex_types_request_body = BaseApi._post_oneof_complex_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_complex_types_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 30234a39717..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types -Schema: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py deleted file mode 100644 index 5c6ffb88a3a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody - -path = "/requestBody/postOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py deleted file mode 100644 index f737670374e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_request_body = BaseApi._post_oneof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2a261a8e487..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof -Schema: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py deleted file mode 100644 index a08595ec8ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody - -path = "/requestBody/postOneofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index 1be36e5cb2a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_base_schema_request_body = BaseApi._post_oneof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_base_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 34fa27fa52d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema -Schema: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py deleted file mode 100644 index 4f9a293eb8f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody - -path = "/requestBody/postOneofWithEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py deleted file mode 100644 index 5c980b38c84..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_empty_schema_request_body = BaseApi._post_oneof_with_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_empty_schema_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5162407590b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema -Schema: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py deleted file mode 100644 index ce1e3d7a855..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody - -path = "/requestBody/postOneofWithRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py deleted file mode 100644 index 9feee812822..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithRequiredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_required_request_body = BaseApi._post_oneof_with_required_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_required_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2b4322b4bcd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required -Schema: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py deleted file mode 100644 index 73139a7fca0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody - -path = "/requestBody/postPatternIsNotAnchoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py deleted file mode 100644 index ee3e83d0561..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternIsNotAnchoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_is_not_anchored_request_body = BaseApi._post_pattern_is_not_anchored_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_is_not_anchored_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 91f09d1ded4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored -Schema: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py deleted file mode 100644 index df8f3abd132..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody - -path = "/requestBody/postPatternValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py deleted file mode 100644 index d7870d65f97..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_validation_request_body = BaseApi._post_pattern_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 27e60dfe8be..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation -Schema: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 4b7025d9ccb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody - -path = "/requestBody/postPropertiesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index d3623ecd49f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_escaped_characters_request_body = BaseApi._post_properties_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 47261737ae8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters -Schema: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py deleted file mode 100644 index a54d80da178..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody - -path = "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py deleted file mode 100644 index 4084045fc11..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_property_named_ref_that_is_not_a_reference_request_body = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7a05f94ce79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference -Schema: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py deleted file mode 100644 index 9b6c9622b89..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_additionalproperties_request_body import RequestBodyPostRefInAdditionalpropertiesRequestBody - -path = "/requestBody/postRefInAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py deleted file mode 100644 index 3730e8193fa..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_additionalproperties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[ - ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, - ref_in_additionalproperties.RefInAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[ - ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, - ref_in_additionalproperties.RefInAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[ - ref_in_additionalproperties.RefInAdditionalpropertiesDictInput, - ref_in_additionalproperties.RefInAdditionalpropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAdditionalpropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_additionalproperties_request_body = BaseApi._post_ref_in_additionalproperties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_additionalproperties_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 260102ecb7e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_additionalproperties -Schema: typing_extensions.TypeAlias = ref_in_additionalproperties.RefInAdditionalproperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py deleted file mode 100644 index b4900ebefaf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_allof_request_body import RequestBodyPostRefInAllofRequestBody - -path = "/requestBody/postRefInAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py deleted file mode 100644 index b1289893d6a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_allof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_allof_request_body = BaseApi._post_ref_in_allof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_allof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d1e3c696440..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_allof -Schema: typing_extensions.TypeAlias = ref_in_allof.RefInAllof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py deleted file mode 100644 index 0f1d5502e9b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_anyof_request_body import RequestBodyPostRefInAnyofRequestBody - -path = "/requestBody/postRefInAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py deleted file mode 100644 index cd9c738ab60..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_anyof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_anyof_request_body = BaseApi._post_ref_in_anyof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_anyof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ef53520958f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_anyof -Schema: typing_extensions.TypeAlias = ref_in_anyof.RefInAnyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py deleted file mode 100644 index 54fef5c117e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_items_request_body import RequestBodyPostRefInItemsRequestBody - -path = "/requestBody/postRefInItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py deleted file mode 100644 index 259c2bd39ce..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_request_body( - self, - body: typing.Union[ - ref_in_items.RefInItemsTupleInput, - ref_in_items.RefInItemsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_items_request_body( - self, - body: typing.Union[ - ref_in_items.RefInItemsTupleInput, - ref_in_items.RefInItemsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_items_request_body( - self, - body: typing.Union[ - ref_in_items.RefInItemsTupleInput, - ref_in_items.RefInItemsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_items_request_body = BaseApi._post_ref_in_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_items_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fd61df6cd48..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_items -Schema: typing_extensions.TypeAlias = ref_in_items.RefInItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py deleted file mode 100644 index 8e744c5dca8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_not_request_body import RequestBodyPostRefInNotRequestBody - -path = "/requestBody/postRefInNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py deleted file mode 100644 index a032f0a5b80..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_not - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_not_request_body = BaseApi._post_ref_in_not_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_not_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 38c80af7bc4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_not -Schema: typing_extensions.TypeAlias = ref_in_not.RefInNot diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py deleted file mode 100644 index 1b1ed6931d1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_oneof_request_body import RequestBodyPostRefInOneofRequestBody - -path = "/requestBody/postRefInOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py deleted file mode 100644 index 37784168cdd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_oneof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_oneof_request_body = BaseApi._post_ref_in_oneof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_oneof_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b2867bf3d14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_oneof -Schema: typing_extensions.TypeAlias = ref_in_oneof.RefInOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py deleted file mode 100644 index 3b1ee36dc42..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ref_in_property_request_body import RequestBodyPostRefInPropertyRequestBody - -path = "/requestBody/postRefInPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py deleted file mode 100644 index 81c91532daf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_property - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_property_request_body = BaseApi._post_ref_in_property_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_property_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 88a787e95b4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_property -Schema: typing_extensions.TypeAlias = ref_in_property.RefInProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py deleted file mode 100644 index 5ea3e864c93..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody - -path = "/requestBody/postRequiredDefaultValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py deleted file mode 100644 index 6cfc1d51d96..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredDefaultValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_default_validation_request_body = BaseApi._post_required_default_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_default_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b7a10fc1a21..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation -Schema: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py deleted file mode 100644 index f8b9dcf8fe1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody - -path = "/requestBody/postRequiredValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py deleted file mode 100644 index e00ceba288b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_validation_request_body = BaseApi._post_required_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6ca85dbe06d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation -Schema: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py deleted file mode 100644 index 9f70eb66747..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody - -path = "/requestBody/postRequiredWithEmptyArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py deleted file mode 100644 index 5dff7f12652..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEmptyArrayRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_empty_array_request_body = BaseApi._post_required_with_empty_array_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_empty_array_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 91b21b45316..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array -Schema: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 52861ef3116..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody - -path = "/requestBody/postRequiredWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index 3b4b24c5c4c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_escaped_characters_request_body = BaseApi._post_required_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_escaped_characters_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a0c77d21366..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters -Schema: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py deleted file mode 100644 index 455fb167b26..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody - -path = "/requestBody/postSimpleEnumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py deleted file mode 100644 index 5c2ddee175a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSimpleEnumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_simple_enum_validation_request_body = BaseApi._post_simple_enum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_simple_enum_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8377f58eb9f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation -Schema: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py deleted file mode 100644 index bf46191b89d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody - -path = "/requestBody/postStringTypeMatchesStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py deleted file mode 100644 index 81002710b86..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostStringTypeMatchesStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_string_type_matches_strings_request_body = BaseApi._post_string_type_matches_strings_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_string_type_matches_strings_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b08e332ac24..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings -Schema: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py deleted file mode 100644 index a9a6b2d9a93..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody - -path = "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py deleted file mode 100644 index 2a7de144405..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[ - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[ - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[ - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDictInput, - the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b5cefca0997..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing -Schema: typing_extensions.TypeAlias = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py deleted file mode 100644 index 1e8addcca13..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody - -path = "/requestBody/postUniqueitemsFalseValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py deleted file mode 100644 index bb1db20ee1f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_validation_request_body = BaseApi._post_uniqueitems_false_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4b7be0c42e8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation -Schema: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py deleted file mode 100644 index 6a663f89e52..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody - -path = "/requestBody/postUniqueitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py deleted file mode 100644 index 0b9df9ad285..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_validation_request_body = BaseApi._post_uniqueitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_validation_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b5ebe20daa6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation -Schema: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py deleted file mode 100644 index e57a1f4fda6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody - -path = "/requestBody/postUriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py deleted file mode 100644 index b2f918a9a67..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_format_request_body = BaseApi._post_uri_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f50ab22bd79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format -Schema: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py deleted file mode 100644 index 3e35c33e574..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody - -path = "/requestBody/postUriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py deleted file mode 100644 index cf0c69f5dd6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriReferenceFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_reference_format_request_body = BaseApi._post_uri_reference_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_reference_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2abeeb7f30a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format -Schema: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py deleted file mode 100644 index 6de7813243c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody - -path = "/requestBody/postUriTemplateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py deleted file mode 100644 index 1d5936d7c61..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriTemplateFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_template_format_request_body = BaseApi._post_uri_template_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_template_format_request_body diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py deleted file mode 100644 index 6edef9170d2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 0e90a70da6f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format -Schema: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index 85d62d43e14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py deleted file mode 100644 index ba5811c8caf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py deleted file mode 100644 index ffe3fdfd75a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 40a8a7cb914..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidateDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 340bf9ac466..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_allows_a_schema_which_should_validate -Schema: typing_extensions.TypeAlias = additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py deleted file mode 100644 index 9a9a1f63ce1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py deleted file mode 100644 index 205ccb71913..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 0e1479a204a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default -Schema: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py deleted file mode 100644 index 58098efaee9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py deleted file mode 100644 index d558474124d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_can_exist_by_itself_response_body_for_content_types = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index c5e803347e6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3604eaec570..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself -Schema: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py deleted file mode 100644 index e3bdc8efe25..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8fd8d55ac0d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types = BaseApi._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 31a1e692371..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_should_not_look_in_applicators -Schema: typing_extensions.TypeAlias = additionalproperties_should_not_look_in_applicators.AdditionalpropertiesShouldNotLookInApplicators diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 94fcd5a91e2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes - -path = "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9ce7cfc8177..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_combined_with_anyof_oneof_response_body_for_content_types = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 0f53323a58c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof -Schema: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index 2dd5b1204a9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes - -path = "/responseBody/postAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py deleted file mode 100644 index c40f43fd99b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_response_body_for_content_types = BaseApi._post_allof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4d535df3587..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof -Schema: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py deleted file mode 100644 index 4e22ee767b1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes - -path = "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 048e0956d50..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_simple_types_response_body_for_content_types = BaseApi._post_allof_simple_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_simple_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 20e2d311d65..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types -Schema: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index dd5b4e26c61..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9a00f7e10b2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_base_schema_response_body_for_content_types = BaseApi._post_allof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d21fc0258d8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema -Schema: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 6f89734ca8e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6d900d0aba5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 69c3924727e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 64740cc3c20..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4d0dfa99747..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_first_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 56a68d392e9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 714d27c739d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index b50ef7bdfdc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_last_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2ce7c85276d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema -Schema: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py deleted file mode 100644 index 33fa82761fd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py deleted file mode 100644 index f96091c9d0e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_two_empty_schemas_response_body_for_content_types = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1130b86c7fc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas -Schema: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index bf78d0d3dc6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes - -path = "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 7cef1f5cdca..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_complex_types_response_body_for_content_types = BaseApi._post_anyof_complex_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_complex_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 37d58d62929..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types -Schema: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index 732664d5de2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes - -path = "/responseBody/postAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py deleted file mode 100644 index e3c5ead12f7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_response_body_for_content_types = BaseApi._post_anyof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f78e4027a5e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof -Schema: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 42a12880597..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 99336b090f2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_base_schema_response_body_for_content_types = BaseApi._post_anyof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 49488325780..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a51ee5c5cbb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema -Schema: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 41137e270ce..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index f3881f08d7a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c89f2bd3f41..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema -Schema: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py deleted file mode 100644 index 0d7d4c9726a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes - -path = "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py deleted file mode 100644 index 41bf7511544..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_array_type_matches_arrays_response_body_for_content_types = BaseApi._post_array_type_matches_arrays_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_array_type_matches_arrays_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 2ecad59bafd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.array_type_matches_arrays.ArrayTypeMatchesArraysTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c1f04ef4119..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays -Schema: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py deleted file mode 100644 index aadbb3b88e6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes - -path = "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py deleted file mode 100644 index 45bdaa407b8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_boolean_type_matches_booleans_response_body_for_content_types = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 391dd2a3830..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: bool - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 08ea06ae60b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans -Schema: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py deleted file mode 100644 index a5bd11c1830..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes - -path = "/responseBody/postByIntResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4a40fc146b8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByIntResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_int_response_body_for_content_types = BaseApi._post_by_int_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_int_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7adfd689fbf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int -Schema: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py deleted file mode 100644 index b9a0567a12c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes - -path = "/responseBody/postByNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py deleted file mode 100644 index aa3e9430558..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_number_response_body_for_content_types = BaseApi._post_by_number_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_number_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 13f45350f7a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number -Schema: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py deleted file mode 100644 index e0e5f516357..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes - -path = "/responseBody/postBySmallNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py deleted file mode 100644 index 392f9311ba8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBySmallNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_small_number_response_body_for_content_types = BaseApi._post_by_small_number_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_small_number_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 08d562eedca..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number -Schema: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 13b6286ae93..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes - -path = "/responseBody/postDateTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index c6a499e9d8b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_time_format_response_body_for_content_types = BaseApi._post_date_time_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_time_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2920670b4c7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format -Schema: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 427a78c0255..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes - -path = "/responseBody/postEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index c2653ab986e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmailFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_email_format_response_body_for_content_types = BaseApi._post_email_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_email_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ee6f2bff8f5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format -Schema: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py deleted file mode 100644 index aa4d0c2b50f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes - -path = "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py deleted file mode 100644 index ccf7f40e0b9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with0_does_not_match_false_response_body_for_content_types = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1db50373cd1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c597080e60f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false -Schema: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py deleted file mode 100644 index e378c6460c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes - -path = "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py deleted file mode 100644 index d29637bc2c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with1_does_not_match_true_response_body_for_content_types = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1db50373cd1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fd53b5fcf24..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true -Schema: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 313b5ad0205..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index d2ae781a9c5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_escaped_characters_response_body_for_content_types = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index e645226c4d6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal["foo\nbar", "foo\rbar"] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 957f84b23de..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters -Schema: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py deleted file mode 100644 index 2861bd2f1b4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes - -path = "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5e31338efeb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_false_does_not_match0_response_body_for_content_types = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 4e2c62f810d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal[False] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 06d1a86cede..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 -Schema: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py deleted file mode 100644 index 28b8c164e6c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes - -path = "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3c2108ac0c4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_true_does_not_match1_response_body_for_content_types = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 209a88880d0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal[True] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6bb13075e98..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 -Schema: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index bec380d4f76..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes - -path = "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8b281749cb0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enums_in_properties_response_body_for_content_types = BaseApi._post_enums_in_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enums_in_properties_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 87acc6cc302..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.enums_in_properties.EnumsInPropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8c4fd671f3a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties -Schema: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py deleted file mode 100644 index 1530b05acd3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes - -path = "/responseBody/postForbiddenPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py deleted file mode 100644 index bd24aa7fdf7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_forbidden_property_response_body_for_content_types = BaseApi._post_forbidden_property_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_forbidden_property_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7b1c9c5743b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property -Schema: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 54034c61770..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes - -path = "/responseBody/postHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1e5984a0a94..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostHostnameFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_hostname_format_response_body_for_content_types = BaseApi._post_hostname_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_hostname_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4dbbf097174..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format -Schema: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py deleted file mode 100644 index 6fd639a97bd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes - -path = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5d950d14b7d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_integer_type_matches_integers_response_body_for_content_types = BaseApi._post_integer_type_matches_integers_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_integer_type_matches_integers_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 3621b2b4790..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: int - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6158b6d193a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers -Schema: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py deleted file mode 100644 index 08a58fea9cb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes - -path = "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9f39bfc65dc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 3621b2b4790..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: int - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f4c72861928..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_instance_should_not_raise_error_when_float_division_inf -Schema: typing_extensions.TypeAlias = invalid_instance_should_not_raise_error_when_float_division_inf.InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py deleted file mode 100644 index d2f60581791..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes - -path = "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py deleted file mode 100644 index d94189ae05d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_invalid_string_value_for_default_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_invalid_string_value_for_default_response_body_for_content_types = BaseApi._post_invalid_string_value_for_default_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_invalid_string_value_for_default_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4d8393f859c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import invalid_string_value_for_default -Schema: typing_extensions.TypeAlias = invalid_string_value_for_default.InvalidStringValueForDefault diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py deleted file mode 100644 index f6d1f7bfbc8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes - -path = "/responseBody/postIpv4FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index f5643a44f3c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv4FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv4_format_response_body_for_content_types = BaseApi._post_ipv4_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv4_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 059799950e5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format -Schema: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e5190f29dec..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes - -path = "/responseBody/postIpv6FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 33b166af938..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv6FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv6_format_response_body_for_content_types = BaseApi._post_ipv6_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv6_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2962488b272..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format -Schema: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 9c29d339289..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes - -path = "/responseBody/postJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 18fca331566..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_json_pointer_format_response_body_for_content_types = BaseApi._post_json_pointer_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e2a8e4178f8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format -Schema: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 06c7038e33b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes - -path = "/responseBody/postMaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index cccfa360bcf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_response_body_for_content_types = BaseApi._post_maximum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7d9db688e71..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation -Schema: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index ae78ec6c33e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes - -path = "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py deleted file mode 100644 index 49e6d5d9745..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_with_unsigned_integer_response_body_for_content_types = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7536bd0136c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer -Schema: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index cb76cb68088..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 38915643d96..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxitems_validation_response_body_for_content_types = BaseApi._post_maxitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index faaf87ab0d7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation -Schema: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e9d84a641bb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index a482016256c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxlength_validation_response_body_for_content_types = BaseApi._post_maxlength_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxlength_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8c1872beb80..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation -Schema: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py deleted file mode 100644 index 4d41e385754..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes - -path = "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6124a1ad485..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties0_means_the_object_is_empty_response_body_for_content_types = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index be07984b186..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty -Schema: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 319dcbd3536..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9d7b2c07ce2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties_validation_response_body_for_content_types = BaseApi._post_maxproperties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 16789fbe850..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation -Schema: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 3eb225cc1ba..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes - -path = "/responseBody/postMinimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 140d3d748ff..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_response_body_for_content_types = BaseApi._post_minimum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c2565a914a6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation -Schema: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index a73b8e4f6d1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes - -path = "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py deleted file mode 100644 index dec182d4d0d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_with_signed_integer_response_body_for_content_types = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1e1f0b94a42..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer -Schema: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 938aef53ed8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postMinitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 64106f1379a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minitems_validation_response_body_for_content_types = BaseApi._post_minitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 08a7a0ce0ab..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation -Schema: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 2ca5319be17..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes - -path = "/responseBody/postMinlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index c95c71f22e5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minlength_validation_response_body_for_content_types = BaseApi._post_minlength_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minlength_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 352706b990d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation -Schema: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index cd2918690b4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index c6750b8fb2b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minproperties_validation_response_body_for_content_types = BaseApi._post_minproperties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minproperties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 78f5320afd0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation -Schema: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index 95e15ba92fd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index 411be9b195e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_allof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e6cddb5a48e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index aae340572e2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index a71d70d7b4e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_anyof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index dd2578be639..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 12758f725c7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes - -path = "/responseBody/postNestedItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index 540e4dcc22a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_items_response_body_for_content_types = BaseApi._post_nested_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_items_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 5f553449314..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.nested_items.NestedItemsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 88c01be599d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items -Schema: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index 0086d5c131c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index e1916ec4221..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_oneof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index da246f2369a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics -Schema: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 2968687b1d4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes - -path = "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2d66f1c2961..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_more_complex_schema_response_body_for_content_types = BaseApi._post_not_more_complex_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_more_complex_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f0f896578b9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema -Schema: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py deleted file mode 100644 index 12d3bba8822..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes - -path = "/responseBody/postNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py deleted file mode 100644 index 467dab2e0ea..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_response_body_for_content_types = BaseApi._post_not_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ac66137b933..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not -Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index 53972940ea0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes - -path = "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3893df84236..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_nul_characters_in_strings_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 063d528d2a8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal["hello\x00there"] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5a75e8b811c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings -Schema: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py deleted file mode 100644 index f340743b836..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes - -path = "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py deleted file mode 100644 index cb50c6e1bf8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_null_type_matches_only_the_null_object_response_body_for_content_types = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 8d22f289ae1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: None - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fb3c7bee1da..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object -Schema: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py deleted file mode 100644 index 2c021329fd2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes - -path = "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py deleted file mode 100644 index 0c95b06b75c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_number_type_matches_numbers_response_body_for_content_types = BaseApi._post_number_type_matches_numbers_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_number_type_matches_numbers_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1db50373cd1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 91952830c9c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers -Schema: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 56fb6d5dd41..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9fe01bf1044..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_properties_validation_response_body_for_content_types = BaseApi._post_object_properties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_properties_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 0b4594d21a6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation -Schema: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py deleted file mode 100644 index 9c440333b2d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes - -path = "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py deleted file mode 100644 index 144f160e917..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_type_matches_objects_response_body_for_content_types = BaseApi._post_object_type_matches_objects_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_type_matches_objects_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index d3eec0adb00..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7bd73ee7b25..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects -Schema: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index f096eb72f82..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes - -path = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index b70264e4f40..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_complex_types_response_body_for_content_types = BaseApi._post_oneof_complex_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_complex_types_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 30234a39717..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types -Schema: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 222fe0b64a9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes - -path = "/responseBody/postOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py deleted file mode 100644 index f1106aaa3b0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_response_body_for_content_types = BaseApi._post_oneof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2a261a8e487..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof -Schema: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 6aee2766777..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2054aa9f7c8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_base_schema_response_body_for_content_types = BaseApi._post_oneof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 49488325780..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 34fa27fa52d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema -Schema: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 29b1dba63cc..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index e7212b57cdf..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_empty_schema_response_body_for_content_types = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5162407590b..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema -Schema: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py deleted file mode 100644 index fb966129116..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes - -path = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py deleted file mode 100644 index fc0b6647fdb..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_required_response_body_for_content_types = BaseApi._post_oneof_with_required_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_required_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index d3eec0adb00..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2b4322b4bcd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required -Schema: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py deleted file mode 100644 index 06d097f0429..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes - -path = "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py deleted file mode 100644 index d022fe7980e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_is_not_anchored_response_body_for_content_types = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 91f09d1ded4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored -Schema: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 3d2a9cd79fd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes - -path = "/responseBody/postPatternValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 06267e0cc35..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_validation_response_body_for_content_types = BaseApi._post_pattern_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 27e60dfe8be..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation -Schema: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 524ce0e570f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2ced2137cf0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_escaped_characters_response_body_for_content_types = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 47261737ae8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters -Schema: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py deleted file mode 100644 index 0ca1fea80ee..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes - -path = "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py deleted file mode 100644 index 84fc2b6845e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_property_named_ref_that_is_not_a_reference_response_body_for_content_types = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7a05f94ce79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference -Schema: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py deleted file mode 100644 index 4db5b856ad1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes - -path = "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 73edf839b8c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_additionalproperties_response_body_for_content_types = BaseApi._post_ref_in_additionalproperties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 662f4f12aea..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.ref_in_additionalproperties.RefInAdditionalpropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 260102ecb7e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_additionalproperties -Schema: typing_extensions.TypeAlias = ref_in_additionalproperties.RefInAdditionalproperties diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index 1af680f8c9f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_allof_response_body_for_content_types import ResponseBodyPostRefInAllofResponseBodyForContentTypes - -path = "/responseBody/postRefInAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 00b2ee474cd..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_allof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_allof_response_body_for_content_types = BaseApi._post_ref_in_allof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_allof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d1e3c696440..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_allof -Schema: typing_extensions.TypeAlias = ref_in_allof.RefInAllof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index 6172c878c8c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_anyof_response_body_for_content_types import ResponseBodyPostRefInAnyofResponseBodyForContentTypes - -path = "/responseBody/postRefInAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2688321be09..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_anyof_response_body_for_content_types = BaseApi._post_ref_in_anyof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_anyof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ef53520958f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_anyof -Schema: typing_extensions.TypeAlias = ref_in_anyof.RefInAnyof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 9273c3078b7..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_items_response_body_for_content_types import ResponseBodyPostRefInItemsResponseBodyForContentTypes - -path = "/responseBody/postRefInItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2d149092919..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_items_response_body_for_content_types = BaseApi._post_ref_in_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_items_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 4f3bf9cb7c3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.ref_in_items.RefInItemsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fd61df6cd48..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_items -Schema: typing_extensions.TypeAlias = ref_in_items.RefInItems diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py deleted file mode 100644 index 26a9ed4464f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_not_response_body_for_content_types import ResponseBodyPostRefInNotResponseBodyForContentTypes - -path = "/responseBody/postRefInNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py deleted file mode 100644 index f33ee53f26a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_not_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_not_response_body_for_content_types = BaseApi._post_ref_in_not_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_not_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 38c80af7bc4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_not -Schema: typing_extensions.TypeAlias = ref_in_not.RefInNot diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 7e856a6d122..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_oneof_response_body_for_content_types import ResponseBodyPostRefInOneofResponseBodyForContentTypes - -path = "/responseBody/postRefInOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4a3c73f132a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_oneof_response_body_for_content_types = BaseApi._post_ref_in_oneof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_oneof_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b2867bf3d14..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_oneof -Schema: typing_extensions.TypeAlias = ref_in_oneof.RefInOneof diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py deleted file mode 100644 index 8c589053cd8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ref_in_property_response_body_for_content_types import ResponseBodyPostRefInPropertyResponseBodyForContentTypes - -path = "/responseBody/postRefInPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py deleted file mode 100644 index d4b3dbdb77d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ref_in_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ref_in_property_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRefInPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ref_in_property_response_body_for_content_types = BaseApi._post_ref_in_property_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ref_in_property_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 88a787e95b4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_in_property -Schema: typing_extensions.TypeAlias = ref_in_property.RefInProperty diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 8f8152a4d4e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes - -path = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index e3654bfa004..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_default_validation_response_body_for_content_types = BaseApi._post_required_default_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_default_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b7a10fc1a21..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation -Schema: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e482831717f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes - -path = "/responseBody/postRequiredValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index e6b1a3ddf58..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_validation_response_body_for_content_types = BaseApi._post_required_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6ca85dbe06d..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation -Schema: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py deleted file mode 100644 index 19d6f36e233..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes - -path = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py deleted file mode 100644 index 130476861ad..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_empty_array_response_body_for_content_types = BaseApi._post_required_with_empty_array_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_empty_array_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 91b21b45316..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array -Schema: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 5e8263300ab..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index b4343afac07..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_escaped_characters_response_body_for_content_types = BaseApi._post_required_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a0c77d21366..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters -Schema: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 7c2389e93c5..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes - -path = "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 262b405dd5f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_simple_enum_validation_response_body_for_content_types = BaseApi._post_simple_enum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_simple_enum_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1db50373cd1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8377f58eb9f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation -Schema: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index eded6790dd1..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes - -path = "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8e0d97c5ef2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_string_type_matches_strings_response_body_for_content_types = BaseApi._post_string_type_matches_strings_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_string_type_matches_strings_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 49488325780..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b08e332ac24..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings -Schema: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py deleted file mode 100644 index d78f43458f4..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes - -path = "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py deleted file mode 100644 index b5a0c6da1ff..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index b6a5b3c35f9..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b5cefca0997..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import the_default_keyword_does_not_do_anything_if_the_property_is_missing -Schema: typing_extensions.TypeAlias = the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 37e8f062863..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 17bd3cbafed..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_validation_response_body_for_content_types = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4b7be0c42e8..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation -Schema: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 95cf2c1f018..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index b8360fed85f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_validation_response_body_for_content_types = BaseApi._post_uniqueitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_validation_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b5ebe20daa6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation -Schema: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 91e06866bd6..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes - -path = "/responseBody/postUriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 45837e8f1c0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_format_response_body_for_content_types = BaseApi._post_uri_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f50ab22bd79..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format -Schema: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 4b73213c603..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes - -path = "/responseBody/postUriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 843382e1b49..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_reference_format_response_body_for_content_types = BaseApi._post_uri_reference_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_reference_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2abeeb7f30a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format -Schema: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 4d9fad8a307..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes - -path = "/responseBody/postUriTemplateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3db47982f71..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_template_format_response_body_for_content_types = BaseApi._post_uri_template_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_template_format_response_body_for_content_types diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 29f6e1106ac..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 0e90a70da6f..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format -Schema: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed b/samples/client/3_0_3_unit_test/python/src/openapi_client/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py deleted file mode 100644 index e7207ca0cef..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/rest.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi # type: ignore[import] -import urllib3 -from urllib3 import fields -from urllib3 import exceptions as urllib3_exceptions -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import exceptions - - -logger = logging.getLogger(__name__) -_TYPE_FIELD_VALUE = typing.Union[str, bytes] - - -class RequestField(fields.RequestField): - def __init__( - self, - name: str, - data: _TYPE_FIELD_VALUE, - filename: typing.Optional[str] = None, - headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, - header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, - ): - super().__init__(name, data, filename, headers, header_formatter) # type: ignore - - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise exceptions.ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - headers = headers or HTTPHeaderDict() - - used_timeout: typing.Optional[urllib3.Timeout] = None - if timeout: - if isinstance(timeout, (int, float)): - used_timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=used_timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - encode_multipart=False, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise exceptions.ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - except urllib3_exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise exceptions.ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def get(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def head(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def options(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def delete(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def post(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def put(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def patch(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py deleted file mode 100644 index 75cdb24e298..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -import typing_extensions - -from .schema import ( - get_class, - none_type_, - classproperty, - Bool, - FileIO, - Schema, - SingletonMeta, - AnyTypeSchema, - UnsetAnyTypeSchema, - INPUT_TYPES_ALL -) - -from .schemas import ( - ListSchema, - NoneSchema, - NumberSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - StrSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BytesSchema, - FileSchema, - BinarySchema, - BoolSchema, - NotAnyTypeSchema, - OUTPUT_BASE_TYPES, - DictSchema -) -from .validation import ( - PatternInfo, - ValidationMetadata, - immutabledict -) -from .format import ( - as_date, - as_datetime, - as_decimal, - as_uuid -) - -def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore - res = {} - for key, val in t_dict.__annotations__.items(): - if isinstance(val, typing._GenericAlias): # type: ignore - # typing.Type[W] -> W - val_cls = typing.get_args(val)[0] - res[key] = val_cls - return res - -X = typing.TypeVar('X', bound=typing.Tuple) - -def tuple_to_instance(tup: typing.Type[X]) -> X: - res = [] - for arg in typing.get_args(tup): - if isinstance(arg, typing._GenericAlias): # type: ignore - # typing.Type[Schema] -> Schema - arg_cls = typing.get_args(arg)[0] - res.append(arg_cls) - return tuple(res) # type: ignore - - -class Unset: - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset: Unset = Unset() - -def key_unknown_error_msg(key: str) -> str: - return (f"Invalid key. The key {key} is not a known key in this payload. " - "If this key is an additional property, use get_additional_property_" - ) - -def raise_if_key_known( - key: str, - required_keys: typing.FrozenSet[str], - optional_keys: typing.FrozenSet[str] -): - if key in required_keys or key in optional_keys: - raise ValueError(f"The key {key} is a known property, use get_property to access its value") - -__all__ = [ - 'get_class', - 'none_type_', - 'classproperty', - 'Bool', - 'FileIO', - 'Schema', - 'SingletonMeta', - 'AnyTypeSchema', - 'UnsetAnyTypeSchema', - 'INPUT_TYPES_ALL', - 'ListSchema', - 'NoneSchema', - 'NumberSchema', - 'IntSchema', - 'Int32Schema', - 'Int64Schema', - 'Float32Schema', - 'Float64Schema', - 'StrSchema', - 'UUIDSchema', - 'DateSchema', - 'DateTimeSchema', - 'DecimalSchema', - 'BytesSchema', - 'FileSchema', - 'BinarySchema', - 'BoolSchema', - 'NotAnyTypeSchema', - 'OUTPUT_BASE_TYPES', - 'DictSchema', - 'PatternInfo', - 'ValidationMetadata', - 'immutabledict', - 'as_date', - 'as_datetime', - 'as_decimal', - 'as_uuid', - 'typed_dict_to_instance', - 'tuple_to_instance', - 'Unset', - 'unset', - 'key_unknown_error_msg', - 'raise_if_key_known' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py deleted file mode 100644 index bb614903b82..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/format.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -import decimal -import functools -import typing -import uuid - -from dateutil import parser, tz - - -class CustomIsoparser(parser.isoparser): - def __init__(self, sep: typing.Optional[str] = None): - """ - :param sep: - A single character that separates date and time portions. If - ``None``, the parser will accept any single character. - For strict ISO-8601 adherence, pass ``'T'``. - """ - if sep is not None: - if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): - raise ValueError('Separator must be a single, non-numeric ' + - 'ASCII character') - - used_sep = sep.encode('ascii') - else: - used_sep = None - - self._sep = used_sep - - @staticmethod - def __get_ascii_bytes(str_in: str) -> bytes: - # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII - # ASCII is the same in UTF-8 - try: - return str_in.encode('ascii') - except UnicodeEncodeError as e: - msg = 'ISO-8601 strings should contain only ASCII characters' - raise ValueError(msg) from e - - def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isodate(dt_str_ascii) # type: ignore - values = typing.cast(typing.Tuple[typing.List[int], int], values) - components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) - pos = values[1] - return components, pos - - def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isotime(dt_str_ascii) # type: ignore - components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore - return components - - def parse_isodatetime(self, dt_str: str) -> datetime.datetime: - date_components, pos = self.__parse_isodate(dt_str) - if len(dt_str) <= pos: - # len(components) <= 3 - raise ValueError('Value is not a datetime') - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) - if hour == 24: - hour = 0 - components = (*date_components, hour, minute, second, microsecond, tzinfo) - return datetime.datetime(*components) + datetime.timedelta(days=1) - else: - components = (*date_components, hour, minute, second, microsecond, tzinfo) - else: - raise ValueError('String contains unknown ISO components') - - return datetime.datetime(*components) - - def parse_isodate_str(self, datestr: str) -> datetime.date: - components, pos = self.__parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return datetime.date(*components) - -DEFAULT_ISOPARSER = CustomIsoparser() - -@functools.lru_cache() -def as_date(arg: str) -> datetime.date: - """ - type = "string" - format = "date" - """ - return DEFAULT_ISOPARSER.parse_isodate_str(arg) - -@functools.lru_cache() -def as_datetime(arg: str) -> datetime.datetime: - """ - type = "string" - format = "date-time" - """ - return DEFAULT_ISOPARSER.parse_isodatetime(arg) - -@functools.lru_cache() -def as_decimal(arg: str) -> decimal.Decimal: - """ - Applicable when storing decimals that are sent over the wire as strings - type = "string" - format = "number" - """ - return decimal.Decimal(arg) - -@functools.lru_cache() -def as_uuid(arg: str) -> uuid.UUID: - """ - type = "string" - format = "uuid" - """ - return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py deleted file mode 100644 index 3897e140a4a..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/original_immutabledict.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -MIT License - -Copyright (c) 2020 Corentin Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -""" -from __future__ import annotations -import typing -import typing_extensions - -_K = typing.TypeVar("_K") -_V = typing.TypeVar("_V", covariant=True) - - -class immutabledict(typing.Mapping[_K, _V]): - """ - An immutable wrapper around dictionaries that implements - the complete :py:class:`collections.Mapping` interface. - It can be used as a drop-in replacement for dictionaries - where immutability is desired. - - Note: custom version of this class made to remove __init__ - """ - - dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict - _dict: typing.Dict[_K, _V] - _hash: typing.Optional[int] - - @classmethod - def fromkeys( - cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None - ) -> "immutabledict[_K, _V]": - return cls(dict.fromkeys(seq, value)) - - def __new__(cls, *args: typing.Any) -> typing_extensions.Self: - inst = super().__new__(cls) - setattr(inst, '_dict', cls.dict_cls(*args)) - setattr(inst, '_hash', None) - return inst - - def __getitem__(self, key: _K) -> _V: - return self._dict[key] - - def __contains__(self, key: object) -> bool: - return key in self._dict - - def __iter__(self) -> typing.Iterator[_K]: - return iter(self._dict) - - def __len__(self) -> int: - return len(self._dict) - - def __repr__(self) -> str: - return "%s(%r)" % (self.__class__.__name__, self._dict) - - def __hash__(self) -> int: - if self._hash is None: - h = 0 - for key, value in self.items(): - h ^= hash((key, value)) - self._hash = h - - return self._hash - - def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(self) - new.update(other) - return self.__class__(new) - - def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(other) - new.update(self) - return new - - def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: - raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py deleted file mode 100644 index 18cacd94c6c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schema.py +++ /dev/null @@ -1,729 +0,0 @@ -from __future__ import annotations -import datetime -import dataclasses -import io -import types -import typing -import uuid - -import functools -import typing_extensions - -from unit_test_api import exceptions -from unit_test_api.configurations import schema_configuration - -from . import validation - -_T_co = typing.TypeVar("_T_co", covariant=True) - - -class SequenceNotStr(typing.Protocol[_T_co]): - """ - if a Protocol would define the interface of Sequence, this protocol - would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence - methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection - """ - def __contains__(self, value: object, /) -> bool: - raise NotImplementedError - - def __getitem__(self, index, /): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError - - def __iter__(self) -> typing.Iterator[_T_co]: - raise NotImplementedError - - def __reversed__(self, /) -> typing.Iterator[_T_co]: - raise NotImplementedError - -none_type_ = type(None) -T = typing.TypeVar('T', bound=typing.Mapping) -U = typing.TypeVar('U', bound=SequenceNotStr) -W = typing.TypeVar('W') - - -class SchemaTyped: - additional_properties: typing.Type[Schema] - all_of: typing.Tuple[typing.Type[Schema], ...] - any_of: typing.Tuple[typing.Type[Schema], ...] - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] - default: typing.Union[str, int, float, bool, None] - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] - exclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - format: str - inclusive_maximum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - items: typing.Type[Schema] - max_items: int - max_length: int - max_properties: int - min_items: int - min_length: int - min_properties: int - multiple_of: typing.Union[int, float] - not_: typing.Type[Schema] - one_of: typing.Tuple[typing.Type[Schema], ...] - pattern: validation.PatternInfo - properties: typing.Mapping[str, typing.Type[Schema]] - required: typing.FrozenSet[str] - types: typing.FrozenSet[typing.Type] - unique_items: bool - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: - raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore - super(FileIO, inst).__init__(arg.name) - return inst - raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): - """ - Needed for instantiation when passing in arguments of the above type - """ - pass - - -class classproperty(typing.Generic[W]): - def __init__(self, method: typing.Callable[..., W]): - self.__method = method - functools.update_wrapper(self, method) # type: ignore - - def __get__(self, obj, cls=None) -> W: - if cls is None: - cls = type(obj) - return self.__method(cls) - - -class Bool: - _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} - """ - This class is needed to replace bool during validation processing - json schema requires that 0 != False and 1 != True - python implementation defines 0 == False and 1 == True - To meet the json schema requirements, all bool instances are replaced with Bool singletons - during validation only, and then bool values are returned from validation - """ - - def __new__(cls, arg_: bool, **kwargs): - """ - Method that implements singleton - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, arg_) - if key not in cls._instances: - inst = super().__new__(cls) - cls._instances[key] = inst - return cls._instances[key] - - def __repr__(self): - if bool(self): - return f'' - return f'' - - @classproperty - def TRUE(cls): - return cls(True) # type: ignore - - @classproperty - def FALSE(cls): - return cls(False) # type: ignore - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -def cast_to_allowed_types( - arg: typing.Union[ - dict, - validation.immutabledict, - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - ], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] -) -> typing.Union[ - validation.immutabledict, - tuple, - float, - int, - str, - bytes, - Bool, - None, - FileIO -]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - path_to_type[path_to_item] = str - return str(arg) - elif isinstance(arg, (dict, validation.immutabledict)): - path_to_type[path_to_item] = validation.immutabledict - return validation.immutabledict( - { - key: cast_to_allowed_types( - val, - from_server, - validated_path_to_schemas, - path_to_item + (key,), - path_to_type, - ) - for key, val in arg.items() - } - ) - elif isinstance(arg, bool): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - path_to_type[path_to_item] = Bool - if arg: - return Bool.TRUE - return Bool.FALSE - elif isinstance(arg, int): - path_to_type[path_to_item] = int - return arg - elif isinstance(arg, float): - path_to_type[path_to_item] = float - return arg - elif isinstance(arg, (tuple, list)): - path_to_type[path_to_item] = tuple - return tuple( - [ - cast_to_allowed_types( - item, - from_server, - validated_path_to_schemas, - path_to_item + (i,), - path_to_type, - ) - for i, item in enumerate(arg) - ] - ) - elif arg is None: - path_to_type[path_to_item] = type(None) - return None - elif isinstance(arg, (datetime.date, datetime.datetime)): - path_to_type[path_to_item] = str - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - path_to_type[path_to_item] = str - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, bytes): - path_to_type[path_to_item] = bytes - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - path_to_type[path_to_item] = FileIO - return FileIO(arg) - raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class SingletonMeta(type): - """ - A singleton class for schemas - Schemas are frozen classes that are never instantiated with init args - All args come from defaults - """ - _instances: typing.Dict[type, typing.Any] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super().__call__(*args, **kwargs) - return cls._instances[cls] - - -class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): - - @classmethod - def __get_path_to_schemas( - cls, - arg, - validation_metadata: validation.ValidationMetadata, - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: - """ - Run all validations in the json schema and return a dict of - json schema to tuple of validated schemas - """ - _path_to_schemas: validation.PathToSchemasType = {} - if validation_metadata.validation_ran_earlier(cls): - validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) - validation.update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} - for path, schema_classes in _path_to_schemas.items(): - schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) - path_to_schemas[path] = schema - """ - For locations that validation did not check - the code still needs to store type + schema information for instantiation - All of those schemas will be UnsetAnyTypeSchema - """ - missing_paths = path_to_type.keys() - path_to_schemas.keys() - for missing_path in missing_paths: - path_to_schemas[missing_path] = UnsetAnyTypeSchema - - return path_to_schemas - - @staticmethod - def __get_items( - arg: tuple, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - ''' - Schema __get_items - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return tuple(cast_items) - - @staticmethod - def __get_properties( - arg: validation.immutabledict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - """ - Schema __get_properties, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return validation.immutabledict(dict_items) - - @classmethod - def _get_new_instance_without_conversion( - cls, - arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - # We have a Dynamic class and we are making an instance of it - if isinstance(arg, validation.immutabledict): - used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) - elif isinstance(arg, tuple): - used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) - elif isinstance(arg, Bool): - return bool(arg) - else: - """ - str, int, float, FileIO, bytes - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return arg - arg_type = type(arg) - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is None: - return used_arg - if arg_type not in type_to_output_cls: - return used_arg - output_cls = type_to_output_cls[arg_type] - if arg_type is tuple: - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(U, inst) - return inst - assert issubclass(output_cls, validation.immutabledict) - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(T, inst) - return inst - - @typing.overload - @classmethod - def validate_base( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate_base( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - """ - Schema validate_base - - Args: - arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value - configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords - like minItems, minLength etc - """ - if isinstance(arg, (tuple, validation.immutabledict)): - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is not None: - for output_cls in type_to_output_cls.values(): - if isinstance(arg, output_cls): - # U + T use case, don't run validations twice - return arg - - from_server = False - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] - ] = {} - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} - cast_arg = cast_to_allowed_types( - arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = validation.ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) - return cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas, - ) - - @classmethod - def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: - type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) - type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) - return type_to_output_cls - - -def get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[Schema]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - return item_cls._evaluate(None, local_namespace) - raise ValueError('invalid class value passed in') - - -@dataclasses.dataclass(frozen=True) -class AnyTypeSchema(Schema[T, U]): - # Python representation of a schema defined as true or {} - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return cls.validate_base( - arg, - configuration=configuration - ) - -class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - -INPUT_TYPES_ALL = typing.Union[ - dict, - validation.immutabledict, - typing.Mapping[str, object], # for TypedDict - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - FileIO -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py deleted file mode 100644 index 8b545884c06..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/schemas.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import datetime -import dataclasses -import io -import typing -import uuid - -import typing_extensions - -from unit_test_api.configurations import schema_configuration - -from . import schema, validation - - -@dataclasses.dataclass(frozen=True) -class ListSchema(schema.Schema[validation.immutabledict, tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schema.INPUT_TYPES_ALL], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Tuple[schema.INPUT_TYPES_ALL, ...], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NoneSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) - - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NumberSchema(schema.Schema): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - types: typing.FrozenSet[typing.Type] = frozenset({float, int}) - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class IntSchema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int' - - -@dataclasses.dataclass(frozen=True) -class Int32Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int32' - - -@dataclasses.dataclass(frozen=True) -class Int64Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int64' - - -@dataclasses.dataclass(frozen=True) -class Float32Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'float' - - -@dataclasses.dataclass(frozen=True) -class Float64Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'double' - - -@dataclasses.dataclass(frozen=True) -class StrSchema(schema.Schema): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - types: typing.FrozenSet[typing.Type] = frozenset({str}) - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class UUIDSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'uuid' - - @classmethod - def validate( - cls, - arg: typing.Union[str, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateTimeSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date-time' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.datetime], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DecimalSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'number' - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class BytesSchema(schema.Schema): - """ - this class will subclass bytes and is immutable - """ - types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class FileSchema(schema.Schema): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.FileIO: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BinarySchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) - format: str = 'binary' - - one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( - BytesSchema, - FileSchema, - ) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader, bytes], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[schema.FileIO, bytes]: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BoolSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NotAnyTypeSchema(schema.AnyTypeSchema): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - not_: typing.Type[schema.Schema] = schema.AnyTypeSchema - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return super().validate_base(arg, configuration=configuration) - -OUTPUT_BASE_TYPES = typing.Union[ - validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], - str, - int, - float, - bool, - schema.none_type_, - typing.Tuple['OUTPUT_BASE_TYPES', ...], - bytes, - schema.FileIO -] - - -@dataclasses.dataclass(frozen=True) -class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) - - @typing.overload - @classmethod - def validate( - cls, - arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: - return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py deleted file mode 100644 index 120f1bd7e18..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/schemas/validation.py +++ /dev/null @@ -1,1446 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import collections -import dataclasses -import decimal -import re -import sys -import types -import typing -import uuid - -import typing_extensions - -from unit_test_api import exceptions -from unit_test_api.configurations import schema_configuration - -from . import format, original_immutabledict - -immutabledict = original_immutabledict.immutabledict - - -@dataclasses.dataclass -class ValidationMetadata: - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - path_to_item: typing.Tuple[typing.Union[str, int], ...] - configuration: schema_configuration.SchemaConfiguration - validated_path_to_schemas: typing.Mapping[ - typing.Tuple[typing.Union[str, int], ...], - typing.Mapping[type, None] - ] = dataclasses.field(default_factory=dict) - seen_classes: typing.FrozenSet[type] = frozenset() - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) - if validated_schemas and cls in validated_schemas: - return True - if cls in self.seen_classes: - return True - return False - -def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise exceptions.ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class SchemaValidator: - __excluded_cls_properties = { - '__module__', - '__dict__', - '__weakref__', - '__doc__', - '__annotations__', - 'default', # excluded because it has no impact on validation - 'type_to_output_cls', # used to pluck the output class for instantiation - } - - @classmethod - def _validate( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> PathToSchemasType: - """ - SchemaValidator validate - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - """ - cls_schema = cls() - json_schema_data = { - k: v - for k, v in vars(cls_schema).items() - if k not in cls.__excluded_cls_properties - and k - not in validation_metadata.configuration.disabled_json_schema_python_keywords - } - contains_path_to_schemas = [] - path_to_schemas: PathToSchemasType = {} - if 'contains' in vars(cls_schema): - contains_path_to_schemas = _get_contains_path_to_schemas( - arg, - vars(cls_schema)['contains'], - validation_metadata, - path_to_schemas - ) - if_path_to_schemas = None - if 'if_' in vars(cls_schema): - if_path_to_schemas = _get_if_path_to_schemas( - arg, - vars(cls_schema)['if_'], - validation_metadata, - ) - validated_pattern_properties: typing.Optional[PathToSchemasType] = None - if 'pattern_properties' in vars(cls_schema): - validated_pattern_properties = _get_validated_pattern_properties( - arg, - vars(cls_schema)['pattern_properties'], - cls, - validation_metadata - ) - prefix_items_length = 0 - if 'prefix_items' in vars(cls_schema): - prefix_items_length = len(vars(cls_schema)['prefix_items']) - for keyword, val in json_schema_data.items(): - used_val: typing.Any - if keyword in {'contains', 'min_contains', 'max_contains'}: - used_val = (val, contains_path_to_schemas) - elif keyword == 'items': - used_val = (val, prefix_items_length) - elif keyword in {'unevaluated_items', 'unevaluated_properties'}: - used_val = (val, path_to_schemas) - elif keyword in {'types'}: - format: typing.Optional[str] = vars(cls_schema).get('format', None) - used_val = (val, format) - elif keyword in {'pattern_properties', 'additional_properties'}: - used_val = (val, validated_pattern_properties) - elif keyword in {'if_', 'then', 'else_'}: - used_val = (val, if_path_to_schemas) - else: - used_val = val - validator = json_schema_keyword_to_validator[keyword] - - other_path_to_schemas = validator( - arg, - used_val, - cls, - validation_metadata, - ) - if other_path_to_schemas: - update(path_to_schemas, other_path_to_schemas) - - base_class = type(arg) - if validation_metadata.path_to_item not in path_to_schemas: - path_to_schemas[validation_metadata.path_to_item] = dict() - path_to_schemas[validation_metadata.path_to_item][base_class] = None - path_to_schemas[validation_metadata.path_to_item][cls] = None - return path_to_schemas - -PathToSchemasType = typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Dict[ - typing.Union[ - typing.Type[SchemaValidator], - typing.Type[str], - typing.Type[int], - typing.Type[float], - typing.Type[bool], - typing.Type[None], - typing.Type[immutabledict], - typing.Type[tuple] - ], - None - ] -] - -def _get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[SchemaValidator]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - if sys.version_info < (3, 9): - return item_cls._evaluate(None, local_namespace) - return item_cls._evaluate(None, local_namespace, set()) - raise ValueError('invalid class value passed in') - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is collections.defaultdict(dict) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k].update(v) - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def __type_error_message( - var_value=None, var_name=None, valid_classes=None, key_type=None -): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = __get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - -def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = __type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return exceptions.ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternInfo: - pattern: str - flags: typing.Optional[re.RegexFlag] = None - - -def validate_types( - arg: typing.Any, - allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - allowed_types = allowed_types_format[0] - if type(arg) not in allowed_types: - raise __get_type_error( - arg, - validation_metadata.path_to_item, - allowed_types, - key_type=False, - ) - if isinstance(arg, bool) or not isinstance(arg, (int, float)): - return None - format = allowed_types_format[1] - if format and format == 'int' and arg != int(arg): - # there is a json schema test where 1.0 validates as an integer - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - return None - - -def validate_enum( - arg: typing.Any, - enum_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in enum_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) - return None - - -def validate_unique_items( - arg: typing.Any, - unique_items_value: bool, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not unique_items_value or not isinstance(arg, tuple): - return None - if len(arg) == len(set(arg)): - return None - _raise_validation_error_message( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - -def validate_min_items( - arg: typing.Any, - min_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) < min_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=min_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_items( - arg: typing.Any, - max_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) > max_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=max_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_properties( - arg: typing.Any, - min_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) < min_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=min_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_properties( - arg: typing.Any, - max_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) > max_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=max_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_length( - arg: typing.Any, - min_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) < min_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=min_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_length( - arg: typing.Any, - max_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) > max_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=max_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_minimum( - arg: typing.Any, - inclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg < inclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_minimum( - arg: typing.Any, - exclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg <= exclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=exclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_maximum( - arg: typing.Any, - inclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg > inclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_maximum( - arg: typing.Any, - exclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg >= exclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than", - constraint_value=exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - -def validate_multiple_of( - arg: typing.Any, - multiple_of: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if (not (float(arg) / multiple_of).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - _raise_validation_error_message( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_pattern( - arg: typing.Any, - pattern_info: PatternInfo, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item - ) - return None - - -__int32_inclusive_minimum = -2147483648 -__int32_inclusive_maximum = 2147483647 -__int64_inclusive_minimum = -9223372036854775808 -__int64_inclusive_maximum = 9223372036854775807 -__float_inclusive_minimum = -3.4028234663852886e+38 -__float_inclusive_maximum = 3.4028234663852886e+38 -__double_inclusive_minimum = -1.7976931348623157E+308 -__double_inclusive_maximum = 1.7976931348623157E+308 - -def __validate_numeric_format( - arg: typing.Union[int, float], - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value[:3] == 'int': - # there is a json schema test where 1.0 validates as an integer - if arg != int(arg): - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - if format_value == 'int32': - if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - elif format_value == 'int64': - if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - elif format_value in {'float', 'double'}: - if format_value == 'float': - if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - return None - # double - if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - - -def __validate_string_format( - arg: str, - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value == 'uuid': - try: - uuid.UUID(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'number': - try: - decimal.Decimal(arg) - return None - except decimal.InvalidOperation: - raise exceptions.ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date': - try: - format.DEFAULT_ISOPARSER.parse_isodate_str(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date-time': - try: - format.DEFAULT_ISOPARSER.parse_isodatetime(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - return None - - -def validate_format( - arg: typing.Union[str, int, float], - format_value: str, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - # formats work for strings + numbers - if isinstance(arg, (int, float)): - return __validate_numeric_format( - arg, - format_value, - validation_metadata - ) - elif isinstance(arg, str): - return __validate_string_format( - arg, - format_value, - validation_metadata - ) - return None - - -def validate_required( - arg: typing.Any, - required: typing.Set[str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - missing_req_args = required - arg.keys() - if missing_req_args: - missing_required_arguments = list(missing_req_args) - missing_required_arguments.sort() - raise exceptions.ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - return None - - -def validate_items( - arg: typing.Any, - item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - item_cls = _get_class(item_cls_prefix_items_length[0]) - prefix_items_length = item_cls_prefix_items_length[1] - path_to_schemas: PathToSchemasType = {} - for i in range(prefix_items_length, len(arg)): - value = arg[i] - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_properties( - arg: typing.Any, - properties: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - present_properties = {k: v for k, v, in arg.items() if k in properties} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, value in present_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - schema = properties[property_name] - schema = _get_class(schema, module_namespace) - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_additional_properties( - arg: typing.Any, - additional_properties_cls_val_pprops: typing.Tuple[ - typing.Type[SchemaValidator], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - schema = _get_class(additional_properties_cls_val_pprops[0]) - path_to_schemas: PathToSchemasType = {} - cls_schema = cls() - properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} - present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} - validated_pattern_properties = additional_properties_cls_val_pprops[1] - for property_name, value in present_additional_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if validated_pattern_properties and path_to_item in validated_pattern_properties: - continue - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_one_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - oneof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(schema) - continue - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - oneof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - oneof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate oneof_classes - continue - oneof_classes.append(schema) - if not oneof_classes: - raise exceptions.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: - raise exceptions.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 - - -def validate_any_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - anyof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - module_namespace = vars(sys.modules[cls.__module__]) - for schema in classes: - schema = _get_class(schema, module_namespace) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - anyof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - anyof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate anyof_classes - continue - anyof_classes.append(schema) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise exceptions.ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - -def validate_all_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - continue - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_not( - arg: typing.Any, - not_cls: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - not_schema = _get_class(not_cls) - other_path_to_schemas = None - not_exception = exceptions.ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_schema.__name__, - ) - ) - if validation_metadata.validation_ran_earlier(not_schema): - raise not_exception - - try: - other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - return None - - -def __ensure_discriminator_value_present( - disc_property_name: str, - validation_metadata: ValidationMetadata, - arg -): - if disc_property_name not in arg: - # The input data does not contain the discriminator property - raise exceptions.ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - -def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - cls_schema = cls() - if not hasattr(cls_schema, 'discriminator'): - return None - disc = cls_schema.discriminator - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not ( - hasattr(cls_schema, 'all_of') or - hasattr(cls_schema, 'one_of') or - hasattr(cls_schema, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls_schema, 'all_of'): - for allof_cls in cls_schema.all_of: - discriminated_cls = __get_discriminated_class( - allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'one_of'): - for oneof_cls in cls_schema.one_of: - discriminated_cls = __get_discriminated_class( - oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'any_of'): - for anyof_cls in cls_schema.any_of: - discriminated_cls = __get_discriminated_class( - anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -def validate_discriminator( - arg: typing.Any, - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - disc_prop_name = list(discriminator.keys())[0] - __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) - discriminated_cls = __get_discriminated_class( - cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ) - if discriminated_cls is None: - raise exceptions.ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - if discriminated_cls is cls: - """ - Optimistically assume that cls will pass validation - If the code invoked _validate on cls it would infinitely recurse - """ - return None - if validation_metadata.validation_ran_earlier(discriminated_cls): - path_to_schemas: PathToSchemasType = {} - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - return path_to_schemas - updated_vm = ValidationMetadata( - path_to_item=validation_metadata.path_to_item, - configuration=validation_metadata.configuration, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - return discriminated_cls._validate(arg, validation_metadata=updated_vm) - - -def _get_if_path_to_schemas( - arg: typing.Any, - if_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - if_cls = _get_class(if_cls) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = if_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, other_path_to_schemas) - except exceptions.OpenApiException: - pass - return these_path_to_schemas - - -def validate_if( - arg: typing.Any, - if_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = if_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - - if true, then true -> true for whole schema - so validate_then will add if_path_to_schemas data to path_to_schemas - """ - return None - - -def validate_then( - arg: typing.Any, - then_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = then_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - """ - if not if_path_to_schemas: - return None - then_cls = _get_class(then_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = then_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # then False case - raise ex - - -def validate_else( - arg: typing.Any, - else_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = else_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - if if_path_to_schemas: - # skip validation if if_path_to_schemas was true - return None - """ - if is false use case - if_path_to_schemas == {} - """ - else_cls = _get_class(else_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = else_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # else False case - raise ex - - -def _get_contains_path_to_schemas( - arg: typing.Any, - contains_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, - path_to_schemas: PathToSchemasType -) -> typing.List[PathToSchemasType]: - if not isinstance(arg, tuple): - return [] - contains_cls = _get_class(contains_cls) - contains_path_to_schemas = [] - for i, value in enumerate(arg): - these_path_to_schemas: PathToSchemasType = {} - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(contains_cls): - add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) - contains_path_to_schemas.append(these_path_to_schemas) - continue - try: - other_path_to_schemas = contains_cls._validate( - value, validation_metadata=item_validation_metadata) - contains_path_to_schemas.append(other_path_to_schemas) - except exceptions.OpenApiException: - pass - return contains_path_to_schemas - - -def validate_contains( - arg: typing.Any, - contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - many_path_to_schemas = contains_cls_path_to_schemas[1] - if not many_path_to_schemas: - raise exceptions.ApiValueError( - "Validation failed for contains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - these_path_to_schemas: PathToSchemasType = {} - for other_path_to_schema in many_path_to_schemas: - update(these_path_to_schemas, other_path_to_schema) - return these_path_to_schemas - - -def validate_min_contains( - arg: typing.Any, - min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - min_contains = min_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) < min_contains: - raise exceptions.ApiValueError( - "Validation failed for minContains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_max_contains( - arg: typing.Any, - max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - max_contains = max_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) > max_contains: - raise exceptions.ApiValueError( - "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " - "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_const( - arg: typing.Any, - const_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in const_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) - return None - - -def validate_dependent_required( - arg: typing.Any, - dependent_required: typing.Mapping[str, typing.Set[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - for key, keys_that_must_exist in dependent_required.items(): - if key not in arg: - continue - missing_keys = keys_that_must_exist - arg.keys() - if missing_keys: - raise exceptions.ApiValueError( - f"Validation failed for dependentRequired because these_keys={missing_keys} are " - f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" - ) - return None - - -def validate_dependent_schemas( - arg: typing.Any, - dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for key, schema in dependent_schemas.items(): - if key not in arg: - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_property_names( - arg: typing.Any, - property_names_schema: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - module_namespace = vars(sys.modules[cls.__module__]) - property_names_schema = _get_class(property_names_schema, module_namespace) - for key in arg.keys(): - path_to_item = validation_metadata.path_to_item + (key,) - key_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - property_names_schema._validate(key, validation_metadata=key_validation_metadata) - return None - - -def _get_validated_pattern_properties( - arg: typing.Any, - pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, property_value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - for pattern_info, schema in pattern_properties.items(): - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, property_name, flags=flags): - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_pattern_properties( - arg: typing.Any, - pattern_properties_validation_results: typing.Tuple[ - typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - validation_results = pattern_properties_validation_results[1] - return validation_results - - -def validate_prefix_items( - arg: typing.Any, - prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for i, val in enumerate(arg): - if i >= len(prefix_items): - break - schema = _get_class(prefix_items[i], module_namespace) - path_to_item = validation_metadata.path_to_item + (i,) - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_items( - arg: typing.Any, - unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] - for i, val in enumerate(arg): - path_to_item = validation_metadata.path_to_item + (i,) - if path_to_item in validated_path_to_schemas: - continue - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_properties( - arg: typing.Any, - unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] - for property_name, val in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if path_to_item in validated_path_to_schemas: - continue - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] -json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { - 'types': validate_types, - 'enum_value_to_name': validate_enum, - 'unique_items': validate_unique_items, - 'min_items': validate_min_items, - 'max_items': validate_max_items, - 'min_properties': validate_min_properties, - 'max_properties': validate_max_properties, - 'min_length': validate_min_length, - 'max_length': validate_max_length, - 'inclusive_minimum': validate_inclusive_minimum, - 'exclusive_minimum': validate_exclusive_minimum, - 'inclusive_maximum': validate_inclusive_maximum, - 'exclusive_maximum': validate_exclusive_maximum, - 'multiple_of': validate_multiple_of, - 'pattern': validate_pattern, - 'format': validate_format, - 'required': validate_required, - 'items': validate_items, - 'properties': validate_properties, - 'additional_properties': validate_additional_properties, - 'one_of': validate_one_of, - 'any_of': validate_any_of, - 'all_of': validate_all_of, - 'not_': validate_not, - 'discriminator': validate_discriminator, - 'contains': validate_contains, - 'min_contains': validate_min_contains, - 'max_contains': validate_max_contains, - 'const_value_to_name': validate_const, - 'dependent_required': validate_dependent_required, - 'dependent_schemas': validate_dependent_schemas, - 'property_names': validate_property_names, - 'pattern_properties': validate_pattern_properties, - 'prefix_items': validate_prefix_items, - 'unevaluated_items': validate_unevaluated_items, - 'unevaluated_properties': validate_unevaluated_properties, - 'if_': validate_if, - 'then': validate_then, - 'else_': validate_else -} \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py deleted file mode 100644 index 714f7ab4f29..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/security_schemes.py +++ /dev/null @@ -1,227 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import abc -import base64 -import dataclasses -import enum -import typing -import typing_extensions - -from urllib3 import _collections - - -class SecuritySchemeType(enum.Enum): - API_KEY = 'apiKey' - HTTP = 'http' - MUTUAL_TLS = 'mutualTLS' - OAUTH_2 = 'oauth2' - OPENID_CONNECT = 'openIdConnect' - - -class ApiKeyInLocation(enum.Enum): - QUERY = 'query' - HEADER = 'header' - COOKIE = 'cookie' - - -class __SecuritySchemeBase(metaclass=abc.ABCMeta): - @abc.abstractmethod - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - pass - - -@dataclasses.dataclass -class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): - api_key: str # this must be set by the developer - name: str = '' - in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY - type: SecuritySchemeType = SecuritySchemeType.API_KEY - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - if self.in_location is ApiKeyInLocation.COOKIE: - headers.add('Cookie', self.api_key) - elif self.in_location is ApiKeyInLocation.HEADER: - headers.add(self.name, self.api_key) - elif self.in_location is ApiKeyInLocation.QUERY: - # todo add query handling - raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") - return - - -class HTTPSchemeType(enum.Enum): - BASIC = 'basic' - BEARER = 'bearer' - DIGEST = 'digest' - SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ - - -@dataclasses.dataclass -class HTTPBasicSecurityScheme(__SecuritySchemeBase): - user_id: str # user name - password: str - scheme: HTTPSchemeType = HTTPSchemeType.BASIC - encoding: str = 'utf-8' - type: SecuritySchemeType = SecuritySchemeType.HTTP - """ - https://www.rfc-editor.org/rfc/rfc7617.html - """ - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - user_pass = f"{self.user_id}:{self.password}" - b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) - headers.add('Authorization', f"Basic {b64_user_pass.decode()}") - - -@dataclasses.dataclass -class HTTPBearerSecurityScheme(__SecuritySchemeBase): - access_token: str - bearer_format: typing.Optional[str] = None - scheme: HTTPSchemeType = HTTPSchemeType.BEARER - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - headers.add('Authorization', f"Bearer {self.access_token}") - - -@dataclasses.dataclass -class HTTPDigestSecurityScheme(__SecuritySchemeBase): - scheme: HTTPSchemeType = HTTPSchemeType.DIGEST - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class MutualTLSSecurityScheme(__SecuritySchemeBase): - type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class ImplicitOAuthFlow: - authorization_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class TokenUrlOauthFlow: - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class AuthorizationCodeOauthFlow: - authorization_url: str - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class OAuthFlows: - implicit: typing.Optional[ImplicitOAuthFlow] = None - password: typing.Optional[TokenUrlOauthFlow] = None - client_credentials: typing.Optional[TokenUrlOauthFlow] = None - authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None - - -class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): - flows: OAuthFlows - type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OAuth2SecurityScheme not yet implemented") - - -class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): - openid_connect_url: str - type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") - -""" -Key is the Security scheme class -Value is the list of scopes -""" -SecurityRequirementObject = typing.TypedDict( - 'SecurityRequirementObject', - { - }, - total=False -) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py deleted file mode 100644 index dc41c4e14f0..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/server.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import dataclasses -import typing - -from unit_test_api.schemas import validation, schema - - -@dataclasses.dataclass -class ServerWithoutVariables(abc.ABC): - url: str - - -@dataclasses.dataclass -class ServerWithVariables(abc.ABC): - _url: str - variables: validation.immutabledict[str, str] - variables_schema: typing.Type[schema.Schema] - url: str = dataclasses.field(init=False) - - def __post_init__(self): - url = self._url - assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) - for (key, value) in self.variables.items(): - url = url.replace("{" + key + "}", value) - self.url = url diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py deleted file mode 100644 index 80dc4807268..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "https://someserver.com/v1" diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py deleted file mode 100644 index 5374be6472e..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/header_imports.py +++ /dev/null @@ -1,15 +0,0 @@ -import decimal -import io -import typing -import typing_extensions - -from unit_test_api import api_client, schemas - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'api_client', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py deleted file mode 100644 index 55bcea40b80..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/operation_imports.py +++ /dev/null @@ -1,18 +0,0 @@ -import datetime -import decimal -import io -import typing -import typing_extensions -import uuid - -from unit_test_api import schemas, api_response - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py deleted file mode 100644 index ebe9120bd08..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/response_imports.py +++ /dev/null @@ -1,25 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import typing -import uuid - -import typing_extensions -import urllib3 - -from unit_test_api import api_client, schemas, api_response - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'typing', - 'uuid', - 'typing_extensions', - 'urllib3', - 'api_client', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py deleted file mode 100644 index c7b3d6440f2..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/schema_imports.py +++ /dev/null @@ -1,28 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import numbers -import re -import typing -import typing_extensions -import uuid - -from unit_test_api import schemas -from unit_test_api.configurations import schema_configuration - -U = typing.TypeVar('U') - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'numbers', - 're', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'schema_configuration' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py deleted file mode 100644 index 8156260e9b3..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py +++ /dev/null @@ -1,12 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from unit_test_api import security_schemes - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'security_schemes' -] \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py deleted file mode 100644 index 9fe6c950a11..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/openapi_client/shared_imports/server_imports.py +++ /dev/null @@ -1,13 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from unit_test_api import server, schemas - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'server', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py deleted file mode 100644 index efb64434f1b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -__version__ = "1.0.0" - -# import ApiClient -from unit_test_api.api_client import ApiClient - -# import Configuration -from unit_test_api.configurations.api_configuration import ApiConfiguration - -# import exceptions -from unit_test_api.exceptions import OpenApiException -from unit_test_api.exceptions import ApiAttributeError -from unit_test_api.exceptions import ApiTypeError -from unit_test_api.exceptions import ApiValueError -from unit_test_api.exceptions import ApiKeyError -from unit_test_api.exceptions import ApiException diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py deleted file mode 100644 index 1eb81cb10b3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_client.py +++ /dev/null @@ -1,1402 +0,0 @@ -# coding: utf-8 -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import datetime -import dataclasses -import decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing import pool -import re -import tempfile -import typing -import typing_extensions -from urllib import parse -import urllib3 -from urllib3 import _collections, fields - - -from unit_test_api import exceptions, rest, schemas, security_schemes, api_response -from unit_test_api.configurations import api_configuration, schema_configuration as schema_configuration_ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj: typing.Any): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return obj - elif isinstance(obj, bool): - # must be before int check - return obj - elif isinstance(obj, int): - return obj - elif obj is None: - return None - elif isinstance(obj, (dict, schemas.immutabledict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -@dataclasses.dataclass -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - prefix: str - separator: str - first: bool = True - item_separator: str = dataclasses.field(init=False) - - def __post_init__(self): - self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return parse.quote(str(in_data)) - return str(in_data) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - @classmethod - def _serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - @classmethod - def _deserialize_simple( - cls, - in_data: str, - name: str, - explode: bool, - percent_encode: bool - ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: - raise NotImplementedError( - "Deserialization of style=simple has not yet been added. " - "If you need this how about you submit a PR adding it?" - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -class Encoding: - content_type: str - headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None - style: typing.Optional[ParameterStyle] = None - explode: bool = False - allow_reserved: bool = False - - -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[schemas.Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -class ParameterBase(JSONDetector): - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[schemas.Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] - - _json_encoder = JSONEncoder() - - def __init_subclass__(cls, **kwargs): - if cls.explode is None: - if cls.style is ParameterStyle.FORM: - cls.explode = True - else: - cls.explode = False - - @classmethod - def _serialize_json( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=cls._json_encoder.compact_separators) - return json.dumps(in_data) - -_SERIALIZE_TYPES = typing.Union[ - int, - float, - str, - datetime.date, - datetime.datetime, - None, - bool, - list, - tuple, - dict, - schemas.immutabledict -] - -_JSON_TYPES = typing.Union[ - int, - float, - str, - None, - bool, - typing.Tuple['_JSON_TYPES', ...], - schemas.immutabledict[str, '_JSON_TYPES'], -] - -@dataclasses.dataclass -class PathParameter(ParameterBase, StyleSimpleSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.PATH - style: ParameterStyle = ParameterStyle.SIMPLE - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_label( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_matrix( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = cls._serialize_simple( - in_data=in_data, - name=cls.name, - explode=cls.explode, - percent_encode=True - ) - return cls._to_dict(cls.name, value) - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if cls.style: - if cls.style is ParameterStyle.SIMPLE: - return cls.__serialize_simple(cast_in_data) - elif cls.style is ParameterStyle.LABEL: - return cls.__serialize_label(cast_in_data) - elif cls.style is ParameterStyle.MATRIX: - return cls.__serialize_matrix(cast_in_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class QueryParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.QUERY - style: ParameterStyle = ParameterStyle.FORM - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_space_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_pipe_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._serialize_form( - in_data, - name=cls.name, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: - if cls.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - raise ValueError(f'No iterator possible for style={cls.style}') - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if cls.style: - # TODO update query ones to omit setting values when [] {} or None is input - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - if cls.style is ParameterStyle.FORM: - return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) - return cls._to_dict( - cls.name, - next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) - ) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class CookieParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.FORM - in_type: ParameterInType = ParameterInType.COOKIE - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if cls.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - value = cls._serialize_form( - cast_in_data, - explode=explode, - name=cls.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return cls._to_dict(cls.name, value) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): - style: ParameterStyle = ParameterStyle.SIMPLE - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - explode: bool = False - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = _collections.HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - @classmethod - def serialize_with_name( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - value = cls._serialize_simple(cast_in_data, name, cls.explode, False) - return cls.__to_headers(((name, value),)) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls.__to_headers(((name, value),)) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - @classmethod - def deserialize( - cls, - in_data: str, - name: str - ): - if cls.schema: - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.validate_base(extracted_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - if cls._content_type_is_json(content_type): - cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) - assert media_type.schema is not None - return media_type.schema.validate_base(cast_in_data) - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class HeaderParameterWithoutName(__HeaderParameterBase): - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - name, - skip_validation=skip_validation - ) - - -class HeaderParameter(__HeaderParameterBase): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - cls.name, - skip_validation=skip_validation - ) - -T = typing.TypeVar("T", bound=api_response.ApiResponse) - - -class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None - headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None - - @classmethod - @abc.abstractmethod - def get_response(cls, response, headers, body) -> T: ... - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = parse.urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - @classmethod - def __deserialize_application_octet_stream( - cls, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or cls.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as write_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - write_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - @classmethod - def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: - content_type = response.headers.get('content-type') - deserialized_body = schemas.unset - streamed = response.supports_chunked_reads() - - deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset - if cls.headers is not None and cls.headers_schema is not None: - deserialized_headers = {} - for header_name, header_param in cls.headers.items(): - header_value = response.headers.get(header_name) - if header_value is None: - continue - header_value = header_param.deserialize(header_value, header_name) - deserialized_headers[header_name] = header_value - deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) - - if cls.content is not None: - if content_type not in cls.content: - raise exceptions.ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" - ) - body_schema = cls.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return cls.get_response( - response=response, - headers=deserialized_headers, - body=schemas.unset - ) - - if cls._content_type_is_json(content_type): - body_data = cls.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = cls.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = cls.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - elif content_type == 'application/x-pem-file': - body_data = response.data.decode() - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = schemas.get_class(body_schema) - if body_schema is schemas.BinarySchema: - deserialized_body = body_schema.validate_base(body_data) - else: - deserialized_body = body_schema.validate_base( - body_data, configuration=configuration) - elif streamed: - response.release_conn() - - return cls.get_response( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -@dataclasses.dataclass -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param configuration: api_configuration.ApiConfiguration object for this client - :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client - :param default_headers: any default headers to include when making calls to the API. - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - configuration: api_configuration.ApiConfiguration = dataclasses.field( - default_factory=lambda: api_configuration.ApiConfiguration()) - schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( - default_factory=lambda: schema_configuration_.SchemaConfiguration()) - default_headers: _collections.HTTPHeaderDict = dataclasses.field( - default_factory=lambda: _collections.HTTPHeaderDict()) - pool_threads: int = 1 - user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' - rest_client: rest.RESTClientObject = dataclasses.field(init=False) - - def __post_init__(self): - self._pool = None - self.rest_client = rest.RESTClientObject(self.configuration) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = pool.ThreadPool(self.pool_threads) - return self._pool - - def set_default_header(self, header_name: str, header_value: str): - self.default_headers[header_name] = header_value - - def call_api( - self, - resource_path: str, - method: str, - host: str, - query_params_suffix: typing.Optional[str] = None, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data` - :param security_requirement_object: The security requirement object, used to apply auth when making the call - :param async_req: execute request asynchronously - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystem file and the schemas.BinarySchema - instance will also inherit from FileSchema and schemas.FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - the method will return the response directly. - """ - # header parameters - used_headers = _collections.HTTPHeaderDict(self.default_headers) - user_agent_key = 'User-Agent' - if user_agent_key not in used_headers and self.user_agent: - used_headers[user_agent_key] = self.user_agent - - # auth setting - self.update_params_for_auth( - used_headers, - security_requirement_object, - resource_path, - method, - body, - query_params_suffix - ) - - # must happen after auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - url = host + resource_path - if query_params_suffix: - url += query_params_suffix - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def request( - self, - method: str, - url: str, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - body: typing.Union[str, bytes, None] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "get": - return self.rest_client.get(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "head": - return self.rest_client.head(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "options": - return self.rest_client.options(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "post": - return self.rest_client.post(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "put": - return self.rest_client.put(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "patch": - return self.rest_client.patch(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "delete": - return self.rest_client.delete(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise exceptions.ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth( - self, - headers: _collections.HTTPHeaderDict, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], - resource_path: str, - method: str, - body: typing.Union[str, bytes, None] = None, - query_params_suffix: typing.Optional[str] = None - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param security_requirement_object: the openapi security requirement object - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - return - -@dataclasses.dataclass -class Api: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) - - @staticmethod - def _get_used_path( - used_path: str, - path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - skip_validation: bool = False - ) -> typing.Tuple[str, str]: - used_path_params = {} - if path_params is not None: - for path_parameter in path_parameters: - parameter_data = path_params.get(path_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) - used_path_params.update(serialized_data) - - for k, v in used_path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - query_params_suffix = "" - if query_params is not None: - prefix_separator_iterator = None - for query_parameter in query_parameters: - parameter_data = query_params.get(query_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = query_parameter.serialize( - parameter_data, - prefix_separator_iterator=prefix_separator_iterator, - skip_validation=skip_validation - ) - for serialized_value in serialized_data.values(): - query_params_suffix += serialized_value - return used_path, query_params_suffix - - @staticmethod - def _get_headers( - header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - accept_content_types: typing.Tuple[str, ...] = (), - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - headers = _collections.HTTPHeaderDict() - if header_params is not None: - for parameter in header_parameters: - parameter_data = header_params.get(parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) - headers.extend(serialized_data) - if accept_content_types: - for accept_content_type in accept_content_types: - headers.add('Accept', accept_content_type) - return headers - - def _get_fields_and_body( - self, - request_body: typing.Type[RequestBody], - body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], - content_type: str, - headers: _collections.HTTPHeaderDict - ): - if request_body.required and body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - - if isinstance(body, schemas.Unset): - return None, None - - serialized_fields = None - serialized_body = None - serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) - headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - serialized_fields = serialized_data['fields'] - elif 'body' in serialized_data: - serialized_body = serialized_data['body'] - return serialized_fields, serialized_body - - @staticmethod - def _verify_response_status(response: api_response.ApiResponse): - if not 200 <= response.response.status <= 399: - raise exceptions.ApiException( - status=response.response.status, - reason=response.response.reason, - api_response=response - ) - - -class SerializedRequestBody(typing.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[rest.RequestField, ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType schemas.Schema info - """ - __json_encoder = JSONEncoder() - __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} - content: typing.Dict[str, typing.Type[MediaType]] - required: bool = False - - @classmethod - def __serialize_json( - cls, - in_data: _JSON_TYPES - ) -> SerializedRequestBody: - in_data = cls.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return {'body': json_str} - - @staticmethod - def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: - return {'body': str(in_data)} - - @classmethod - def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: - json_value = cls.__json_encoder.default(value) - request_field = rest.RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - @classmethod - def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: - if isinstance(value, str): - request_field = rest.RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = rest.RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, schemas.FileIO): - # TODO use content.encoding to limit allowed content types if they are present - urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(rest.RequestField, urllib3_request_field) - value.close() - else: - request_field = cls.__multipart_json_item(key=key, value=value) - return request_field - - @classmethod - def __serialize_multipart_form_data( - cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] - ) -> SerializedRequestBody: - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a rest.RequestField for each item with name=key - for item in value: - request_field = cls.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore - fields.append(request_field) - else: - request_field = cls.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return {'fields': tuple(fields)} - - @staticmethod - def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: - if isinstance(in_data, bytes): - return {'body': in_data} - # schemas.FileIO type - used_in_data = in_data.read() - in_data.close() - return {'body': used_in_data} - - @classmethod - def __serialize_application_x_www_form_data( - cls, in_data: schemas.immutabledict[str, _JSON_TYPES] - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - cast_in_data = cls.__json_encoder.default(in_data) - value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return {'body': value} - - @classmethod - def serialize( - cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = cls.content[content_type] - assert media_type.schema is not None - schema = schemas.get_class(media_type.schema) - used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() - cast_in_data = schema.validate_base(in_data, configuration=used_configuration) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if cls._content_type_is_json(content_type): - if isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") - return cls.__serialize_json(cast_in_data) - elif content_type in cls.__plain_txt_content_types: - if not isinstance(cast_in_data, (int, float, str)): - raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") - return cls.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") - return cls.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError( - f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") - return cls.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - if not isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") - return cls.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py deleted file mode 100644 index 52f0a194438..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/api_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -import urllib3 - -from unit_test_api import schemas - - -@dataclasses.dataclass(frozen=True) -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] - headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] - - -@dataclasses.dataclass(frozen=True) -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py deleted file mode 100644 index d94ba41150a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/path_to_api.py +++ /dev/null @@ -1,872 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.paths.request_body_post_a_schema_given_for_prefixitems_request_body import RequestBodyPostASchemaGivenForPrefixitemsRequestBody -from openapi_client.apis.paths.request_body_post_additional_items_are_allowed_by_default_request_body import RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body import RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.apis.paths.request_body_post_additionalproperties_with_schema_request_body import RequestBodyPostAdditionalpropertiesWithSchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody -from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody -from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody -from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody -from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody -from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody -from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody -from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody -from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody -from openapi_client.apis.paths.request_body_post_const_nul_characters_in_strings_request_body import RequestBodyPostConstNulCharactersInStringsRequestBody -from openapi_client.apis.paths.request_body_post_contains_keyword_validation_request_body import RequestBodyPostContainsKeywordValidationRequestBody -from openapi_client.apis.paths.request_body_post_contains_with_null_instance_elements_request_body import RequestBodyPostContainsWithNullInstanceElementsRequestBody -from openapi_client.apis.paths.request_body_post_date_format_request_body import RequestBodyPostDateFormatRequestBody -from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody -from openapi_client.apis.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body import RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body import RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody -from openapi_client.apis.paths.request_body_post_dependent_schemas_single_dependency_request_body import RequestBodyPostDependentSchemasSingleDependencyRequestBody -from openapi_client.apis.paths.request_body_post_duration_format_request_body import RequestBodyPostDurationFormatRequestBody -from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody -from openapi_client.apis.paths.request_body_post_empty_dependents_request_body import RequestBodyPostEmptyDependentsRequestBody -from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody -from openapi_client.apis.paths.request_body_post_exclusivemaximum_validation_request_body import RequestBodyPostExclusivemaximumValidationRequestBody -from openapi_client.apis.paths.request_body_post_exclusiveminimum_validation_request_body import RequestBodyPostExclusiveminimumValidationRequestBody -from openapi_client.apis.paths.request_body_post_float_division_inf_request_body import RequestBodyPostFloatDivisionInfRequestBody -from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody -from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody -from openapi_client.apis.paths.request_body_post_idn_email_format_request_body import RequestBodyPostIdnEmailFormatRequestBody -from openapi_client.apis.paths.request_body_post_idn_hostname_format_request_body import RequestBodyPostIdnHostnameFormatRequestBody -from openapi_client.apis.paths.request_body_post_if_and_else_without_then_request_body import RequestBodyPostIfAndElseWithoutThenRequestBody -from openapi_client.apis.paths.request_body_post_if_and_then_without_else_request_body import RequestBodyPostIfAndThenWithoutElseRequestBody -from openapi_client.apis.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body import RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody -from openapi_client.apis.paths.request_body_post_ignore_else_without_if_request_body import RequestBodyPostIgnoreElseWithoutIfRequestBody -from openapi_client.apis.paths.request_body_post_ignore_if_without_then_or_else_request_body import RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody -from openapi_client.apis.paths.request_body_post_ignore_then_without_if_request_body import RequestBodyPostIgnoreThenWithoutIfRequestBody -from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody -from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody -from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody -from openapi_client.apis.paths.request_body_post_iri_format_request_body import RequestBodyPostIriFormatRequestBody -from openapi_client.apis.paths.request_body_post_iri_reference_format_request_body import RequestBodyPostIriReferenceFormatRequestBody -from openapi_client.apis.paths.request_body_post_items_contains_request_body import RequestBodyPostItemsContainsRequestBody -from openapi_client.apis.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body import RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody -from openapi_client.apis.paths.request_body_post_items_with_null_instance_elements_request_body import RequestBodyPostItemsWithNullInstanceElementsRequestBody -from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody -from openapi_client.apis.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body import RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody -from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody -from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_mincontains_without_contains_is_ignored_request_body import RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody -from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody -from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_multiple_dependents_required_request_body import RequestBodyPostMultipleDependentsRequiredRequestBody -from openapi_client.apis.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body import RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody -from openapi_client.apis.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body import RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody -from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody -from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.apis.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body import RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody -from openapi_client.apis.paths.request_body_post_non_interference_across_combined_schemas_request_body import RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody -from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody -from openapi_client.apis.paths.request_body_post_not_multiple_types_request_body import RequestBodyPostNotMultipleTypesRequestBody -from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody -from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody -from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody -from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody -from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody -from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody -from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody -from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody -from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody -from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody -from openapi_client.apis.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body import RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody -from openapi_client.apis.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body import RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.apis.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body import RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody -from openapi_client.apis.paths.request_body_post_prefixitems_with_null_instance_elements_request_body import RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody -from openapi_client.apis.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body import RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody -from openapi_client.apis.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_properties_with_null_valued_instance_properties_request_body import RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.apis.paths.request_body_post_propertynames_validation_request_body import RequestBodyPostPropertynamesValidationRequestBody -from openapi_client.apis.paths.request_body_post_regex_format_request_body import RequestBodyPostRegexFormatRequestBody -from openapi_client.apis.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body import RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody -from openapi_client.apis.paths.request_body_post_relative_json_pointer_format_request_body import RequestBodyPostRelativeJsonPointerFormatRequestBody -from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody -from openapi_client.apis.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody -from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody -from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody -from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody -from openapi_client.apis.paths.request_body_post_single_dependency_request_body import RequestBodyPostSingleDependencyRequestBody -from openapi_client.apis.paths.request_body_post_small_multiple_of_large_integer_request_body import RequestBodyPostSmallMultipleOfLargeIntegerRequestBody -from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody -from openapi_client.apis.paths.request_body_post_time_format_request_body import RequestBodyPostTimeFormatRequestBody -from openapi_client.apis.paths.request_body_post_type_array_object_or_null_request_body import RequestBodyPostTypeArrayObjectOrNullRequestBody -from openapi_client.apis.paths.request_body_post_type_array_or_object_request_body import RequestBodyPostTypeArrayOrObjectRequestBody -from openapi_client.apis.paths.request_body_post_type_as_array_with_one_item_request_body import RequestBodyPostTypeAsArrayWithOneItemRequestBody -from openapi_client.apis.paths.request_body_post_unevaluateditems_as_schema_request_body import RequestBodyPostUnevaluateditemsAsSchemaRequestBody -from openapi_client.apis.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body import RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody -from openapi_client.apis.paths.request_body_post_unevaluateditems_with_items_request_body import RequestBodyPostUnevaluateditemsWithItemsRequestBody -from openapi_client.apis.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body import RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody -from openapi_client.apis.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body import RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody -from openapi_client.apis.paths.request_body_post_unevaluatedproperties_schema_request_body import RequestBodyPostUnevaluatedpropertiesSchemaRequestBody -from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body import RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody -from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body import RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody -from openapi_client.apis.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody -from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody -from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody -from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody -from openapi_client.apis.paths.request_body_post_uuid_format_request_body import RequestBodyPostUuidFormatRequestBody -from openapi_client.apis.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body import RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody -from openapi_client.apis.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types import ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_contains_keyword_validation_response_body_for_content_types import ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_date_format_response_body_for_content_types import ResponseBodyPostDateFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types import ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types import ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types import ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_duration_format_response_body_for_content_types import ResponseBodyPostDurationFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_empty_dependents_response_body_for_content_types import ResponseBodyPostEmptyDependentsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types import ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types import ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_float_division_inf_response_body_for_content_types import ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_idn_email_format_response_body_for_content_types import ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_idn_hostname_format_response_body_for_content_types import ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_if_and_else_without_then_response_body_for_content_types import ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_if_and_then_without_else_response_body_for_content_types import ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types import ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ignore_else_without_if_response_body_for_content_types import ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types import ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ignore_then_without_if_response_body_for_content_types import ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_iri_format_response_body_for_content_types import ResponseBodyPostIriFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_iri_reference_format_response_body_for_content_types import ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_items_contains_response_body_for_content_types import ResponseBodyPostItemsContainsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types import ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_multiple_dependents_required_response_body_for_content_types import ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types import ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types import ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types import ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types import ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_not_multiple_types_response_body_for_content_types import ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types import ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types import ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types import ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_propertynames_validation_response_body_for_content_types import ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_regex_format_response_body_for_content_types import ResponseBodyPostRegexFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types import ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types import ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_single_dependency_response_body_for_content_types import ResponseBodyPostSingleDependencyResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types import ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_time_format_response_body_for_content_types import ResponseBodyPostTimeFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_type_array_object_or_null_response_body_for_content_types import ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_type_array_or_object_response_body_for_content_types import ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types import ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types import ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types import ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_uuid_format_response_body_for_content_types import ResponseBodyPostUuidFormatResponseBodyForContentTypes -from openapi_client.apis.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types import ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes - -PathToApi = typing.TypedDict( - 'PathToApi', - { - "/requestBody/postASchemaGivenForPrefixitemsRequestBody": typing.Type[RequestBodyPostASchemaGivenForPrefixitemsRequestBody], - "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody], - "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody], - "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody], - "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody], - "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody], - "/requestBody/postAdditionalpropertiesWithSchemaRequestBody": typing.Type[RequestBodyPostAdditionalpropertiesWithSchemaRequestBody], - "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": typing.Type[RequestBodyPostAllofCombinedWithAnyofOneofRequestBody], - "/requestBody/postAllofRequestBody": typing.Type[RequestBodyPostAllofRequestBody], - "/requestBody/postAllofSimpleTypesRequestBody": typing.Type[RequestBodyPostAllofSimpleTypesRequestBody], - "/requestBody/postAllofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAllofWithBaseSchemaRequestBody], - "/requestBody/postAllofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithOneEmptySchemaRequestBody], - "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody], - "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": typing.Type[RequestBodyPostAllofWithTheLastEmptySchemaRequestBody], - "/requestBody/postAllofWithTwoEmptySchemasRequestBody": typing.Type[RequestBodyPostAllofWithTwoEmptySchemasRequestBody], - "/requestBody/postAnyofComplexTypesRequestBody": typing.Type[RequestBodyPostAnyofComplexTypesRequestBody], - "/requestBody/postAnyofRequestBody": typing.Type[RequestBodyPostAnyofRequestBody], - "/requestBody/postAnyofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostAnyofWithBaseSchemaRequestBody], - "/requestBody/postAnyofWithOneEmptySchemaRequestBody": typing.Type[RequestBodyPostAnyofWithOneEmptySchemaRequestBody], - "/requestBody/postArrayTypeMatchesArraysRequestBody": typing.Type[RequestBodyPostArrayTypeMatchesArraysRequestBody], - "/requestBody/postBooleanTypeMatchesBooleansRequestBody": typing.Type[RequestBodyPostBooleanTypeMatchesBooleansRequestBody], - "/requestBody/postByIntRequestBody": typing.Type[RequestBodyPostByIntRequestBody], - "/requestBody/postByNumberRequestBody": typing.Type[RequestBodyPostByNumberRequestBody], - "/requestBody/postBySmallNumberRequestBody": typing.Type[RequestBodyPostBySmallNumberRequestBody], - "/requestBody/postConstNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostConstNulCharactersInStringsRequestBody], - "/requestBody/postContainsKeywordValidationRequestBody": typing.Type[RequestBodyPostContainsKeywordValidationRequestBody], - "/requestBody/postContainsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostContainsWithNullInstanceElementsRequestBody], - "/requestBody/postDateFormatRequestBody": typing.Type[RequestBodyPostDateFormatRequestBody], - "/requestBody/postDateTimeFormatRequestBody": typing.Type[RequestBodyPostDateTimeFormatRequestBody], - "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody], - "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody": typing.Type[RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody], - "/requestBody/postDependentSchemasSingleDependencyRequestBody": typing.Type[RequestBodyPostDependentSchemasSingleDependencyRequestBody], - "/requestBody/postDurationFormatRequestBody": typing.Type[RequestBodyPostDurationFormatRequestBody], - "/requestBody/postEmailFormatRequestBody": typing.Type[RequestBodyPostEmailFormatRequestBody], - "/requestBody/postEmptyDependentsRequestBody": typing.Type[RequestBodyPostEmptyDependentsRequestBody], - "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": typing.Type[RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody], - "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": typing.Type[RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody], - "/requestBody/postEnumWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostEnumWithEscapedCharactersRequestBody], - "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": typing.Type[RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody], - "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": typing.Type[RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody], - "/requestBody/postEnumsInPropertiesRequestBody": typing.Type[RequestBodyPostEnumsInPropertiesRequestBody], - "/requestBody/postExclusivemaximumValidationRequestBody": typing.Type[RequestBodyPostExclusivemaximumValidationRequestBody], - "/requestBody/postExclusiveminimumValidationRequestBody": typing.Type[RequestBodyPostExclusiveminimumValidationRequestBody], - "/requestBody/postFloatDivisionInfRequestBody": typing.Type[RequestBodyPostFloatDivisionInfRequestBody], - "/requestBody/postForbiddenPropertyRequestBody": typing.Type[RequestBodyPostForbiddenPropertyRequestBody], - "/requestBody/postHostnameFormatRequestBody": typing.Type[RequestBodyPostHostnameFormatRequestBody], - "/requestBody/postIdnEmailFormatRequestBody": typing.Type[RequestBodyPostIdnEmailFormatRequestBody], - "/requestBody/postIdnHostnameFormatRequestBody": typing.Type[RequestBodyPostIdnHostnameFormatRequestBody], - "/requestBody/postIfAndElseWithoutThenRequestBody": typing.Type[RequestBodyPostIfAndElseWithoutThenRequestBody], - "/requestBody/postIfAndThenWithoutElseRequestBody": typing.Type[RequestBodyPostIfAndThenWithoutElseRequestBody], - "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody": typing.Type[RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody], - "/requestBody/postIgnoreElseWithoutIfRequestBody": typing.Type[RequestBodyPostIgnoreElseWithoutIfRequestBody], - "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody": typing.Type[RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody], - "/requestBody/postIgnoreThenWithoutIfRequestBody": typing.Type[RequestBodyPostIgnoreThenWithoutIfRequestBody], - "/requestBody/postIntegerTypeMatchesIntegersRequestBody": typing.Type[RequestBodyPostIntegerTypeMatchesIntegersRequestBody], - "/requestBody/postIpv4FormatRequestBody": typing.Type[RequestBodyPostIpv4FormatRequestBody], - "/requestBody/postIpv6FormatRequestBody": typing.Type[RequestBodyPostIpv6FormatRequestBody], - "/requestBody/postIriFormatRequestBody": typing.Type[RequestBodyPostIriFormatRequestBody], - "/requestBody/postIriReferenceFormatRequestBody": typing.Type[RequestBodyPostIriReferenceFormatRequestBody], - "/requestBody/postItemsContainsRequestBody": typing.Type[RequestBodyPostItemsContainsRequestBody], - "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody": typing.Type[RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody], - "/requestBody/postItemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostItemsWithNullInstanceElementsRequestBody], - "/requestBody/postJsonPointerFormatRequestBody": typing.Type[RequestBodyPostJsonPointerFormatRequestBody], - "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody": typing.Type[RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody], - "/requestBody/postMaximumValidationRequestBody": typing.Type[RequestBodyPostMaximumValidationRequestBody], - "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": typing.Type[RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody], - "/requestBody/postMaxitemsValidationRequestBody": typing.Type[RequestBodyPostMaxitemsValidationRequestBody], - "/requestBody/postMaxlengthValidationRequestBody": typing.Type[RequestBodyPostMaxlengthValidationRequestBody], - "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": typing.Type[RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody], - "/requestBody/postMaxpropertiesValidationRequestBody": typing.Type[RequestBodyPostMaxpropertiesValidationRequestBody], - "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody": typing.Type[RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody], - "/requestBody/postMinimumValidationRequestBody": typing.Type[RequestBodyPostMinimumValidationRequestBody], - "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": typing.Type[RequestBodyPostMinimumValidationWithSignedIntegerRequestBody], - "/requestBody/postMinitemsValidationRequestBody": typing.Type[RequestBodyPostMinitemsValidationRequestBody], - "/requestBody/postMinlengthValidationRequestBody": typing.Type[RequestBodyPostMinlengthValidationRequestBody], - "/requestBody/postMinpropertiesValidationRequestBody": typing.Type[RequestBodyPostMinpropertiesValidationRequestBody], - "/requestBody/postMultipleDependentsRequiredRequestBody": typing.Type[RequestBodyPostMultipleDependentsRequiredRequestBody], - "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody": typing.Type[RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody], - "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody": typing.Type[RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody], - "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody], - "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody], - "/requestBody/postNestedItemsRequestBody": typing.Type[RequestBodyPostNestedItemsRequestBody], - "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": typing.Type[RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody], - "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody], - "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody": typing.Type[RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody], - "/requestBody/postNotMoreComplexSchemaRequestBody": typing.Type[RequestBodyPostNotMoreComplexSchemaRequestBody], - "/requestBody/postNotMultipleTypesRequestBody": typing.Type[RequestBodyPostNotMultipleTypesRequestBody], - "/requestBody/postNotRequestBody": typing.Type[RequestBodyPostNotRequestBody], - "/requestBody/postNulCharactersInStringsRequestBody": typing.Type[RequestBodyPostNulCharactersInStringsRequestBody], - "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": typing.Type[RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody], - "/requestBody/postNumberTypeMatchesNumbersRequestBody": typing.Type[RequestBodyPostNumberTypeMatchesNumbersRequestBody], - "/requestBody/postObjectPropertiesValidationRequestBody": typing.Type[RequestBodyPostObjectPropertiesValidationRequestBody], - "/requestBody/postObjectTypeMatchesObjectsRequestBody": typing.Type[RequestBodyPostObjectTypeMatchesObjectsRequestBody], - "/requestBody/postOneofComplexTypesRequestBody": typing.Type[RequestBodyPostOneofComplexTypesRequestBody], - "/requestBody/postOneofRequestBody": typing.Type[RequestBodyPostOneofRequestBody], - "/requestBody/postOneofWithBaseSchemaRequestBody": typing.Type[RequestBodyPostOneofWithBaseSchemaRequestBody], - "/requestBody/postOneofWithEmptySchemaRequestBody": typing.Type[RequestBodyPostOneofWithEmptySchemaRequestBody], - "/requestBody/postOneofWithRequiredRequestBody": typing.Type[RequestBodyPostOneofWithRequiredRequestBody], - "/requestBody/postPatternIsNotAnchoredRequestBody": typing.Type[RequestBodyPostPatternIsNotAnchoredRequestBody], - "/requestBody/postPatternValidationRequestBody": typing.Type[RequestBodyPostPatternValidationRequestBody], - "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody": typing.Type[RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody], - "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody], - "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody": typing.Type[RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody], - "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody], - "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody": typing.Type[RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody], - "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": typing.Type[RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody], - "/requestBody/postPropertiesWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostPropertiesWithEscapedCharactersRequestBody], - "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody], - "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": typing.Type[RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody], - "/requestBody/postPropertynamesValidationRequestBody": typing.Type[RequestBodyPostPropertynamesValidationRequestBody], - "/requestBody/postRegexFormatRequestBody": typing.Type[RequestBodyPostRegexFormatRequestBody], - "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody": typing.Type[RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody], - "/requestBody/postRelativeJsonPointerFormatRequestBody": typing.Type[RequestBodyPostRelativeJsonPointerFormatRequestBody], - "/requestBody/postRequiredDefaultValidationRequestBody": typing.Type[RequestBodyPostRequiredDefaultValidationRequestBody], - "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": typing.Type[RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody], - "/requestBody/postRequiredValidationRequestBody": typing.Type[RequestBodyPostRequiredValidationRequestBody], - "/requestBody/postRequiredWithEmptyArrayRequestBody": typing.Type[RequestBodyPostRequiredWithEmptyArrayRequestBody], - "/requestBody/postRequiredWithEscapedCharactersRequestBody": typing.Type[RequestBodyPostRequiredWithEscapedCharactersRequestBody], - "/requestBody/postSimpleEnumValidationRequestBody": typing.Type[RequestBodyPostSimpleEnumValidationRequestBody], - "/requestBody/postSingleDependencyRequestBody": typing.Type[RequestBodyPostSingleDependencyRequestBody], - "/requestBody/postSmallMultipleOfLargeIntegerRequestBody": typing.Type[RequestBodyPostSmallMultipleOfLargeIntegerRequestBody], - "/requestBody/postStringTypeMatchesStringsRequestBody": typing.Type[RequestBodyPostStringTypeMatchesStringsRequestBody], - "/requestBody/postTimeFormatRequestBody": typing.Type[RequestBodyPostTimeFormatRequestBody], - "/requestBody/postTypeArrayObjectOrNullRequestBody": typing.Type[RequestBodyPostTypeArrayObjectOrNullRequestBody], - "/requestBody/postTypeArrayOrObjectRequestBody": typing.Type[RequestBodyPostTypeArrayOrObjectRequestBody], - "/requestBody/postTypeAsArrayWithOneItemRequestBody": typing.Type[RequestBodyPostTypeAsArrayWithOneItemRequestBody], - "/requestBody/postUnevaluateditemsAsSchemaRequestBody": typing.Type[RequestBodyPostUnevaluateditemsAsSchemaRequestBody], - "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody], - "/requestBody/postUnevaluateditemsWithItemsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsWithItemsRequestBody], - "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody": typing.Type[RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody], - "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody], - "/requestBody/postUnevaluatedpropertiesSchemaRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesSchemaRequestBody], - "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody], - "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody": typing.Type[RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody], - "/requestBody/postUniqueitemsFalseValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseValidationRequestBody], - "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody": typing.Type[RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody], - "/requestBody/postUniqueitemsValidationRequestBody": typing.Type[RequestBodyPostUniqueitemsValidationRequestBody], - "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody": typing.Type[RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody], - "/requestBody/postUriFormatRequestBody": typing.Type[RequestBodyPostUriFormatRequestBody], - "/requestBody/postUriReferenceFormatRequestBody": typing.Type[RequestBodyPostUriReferenceFormatRequestBody], - "/requestBody/postUriTemplateFormatRequestBody": typing.Type[RequestBodyPostUriTemplateFormatRequestBody], - "/requestBody/postUuidFormatRequestBody": typing.Type[RequestBodyPostUuidFormatRequestBody], - "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody": typing.Type[RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody], - "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes], - "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], - "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes], - "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes], - "/responseBody/postAllofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofResponseBodyForContentTypes], - "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes], - "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes], - "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes], - "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes], - "/responseBody/postAnyofResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofResponseBodyForContentTypes], - "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes], - "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": typing.Type[ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes], - "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": typing.Type[ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes], - "/responseBody/postByIntResponseBodyForContentTypes": typing.Type[ResponseBodyPostByIntResponseBodyForContentTypes], - "/responseBody/postByNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostByNumberResponseBodyForContentTypes], - "/responseBody/postBySmallNumberResponseBodyForContentTypes": typing.Type[ResponseBodyPostBySmallNumberResponseBodyForContentTypes], - "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes], - "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes], - "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes], - "/responseBody/postDateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateFormatResponseBodyForContentTypes], - "/responseBody/postDateTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDateTimeFormatResponseBodyForContentTypes], - "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes], - "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes": typing.Type[ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes], - "/responseBody/postDurationFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostDurationFormatResponseBodyForContentTypes], - "/responseBody/postEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmailFormatResponseBodyForContentTypes], - "/responseBody/postEmptyDependentsResponseBodyForContentTypes": typing.Type[ResponseBodyPostEmptyDependentsResponseBodyForContentTypes], - "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes], - "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes], - "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes], - "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes], - "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes], - "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes], - "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes], - "/responseBody/postFloatDivisionInfResponseBodyForContentTypes": typing.Type[ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes], - "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": typing.Type[ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes], - "/responseBody/postHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostHostnameFormatResponseBodyForContentTypes], - "/responseBody/postIdnEmailFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes], - "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes], - "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes], - "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes], - "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes], - "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes], - "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes], - "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes": typing.Type[ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes], - "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": typing.Type[ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes], - "/responseBody/postIpv4FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv4FormatResponseBodyForContentTypes], - "/responseBody/postIpv6FormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIpv6FormatResponseBodyForContentTypes], - "/responseBody/postIriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIriFormatResponseBodyForContentTypes], - "/responseBody/postIriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes], - "/responseBody/postItemsContainsResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsContainsResponseBodyForContentTypes], - "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes], - "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes], - "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes], - "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes], - "/responseBody/postMaximumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationResponseBodyForContentTypes], - "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes], - "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes], - "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes], - "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes], - "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes], - "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes], - "/responseBody/postMinimumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationResponseBodyForContentTypes], - "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes], - "/responseBody/postMinitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinitemsValidationResponseBodyForContentTypes], - "/responseBody/postMinlengthValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinlengthValidationResponseBodyForContentTypes], - "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes], - "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes], - "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes], - "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes], - "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNestedItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedItemsResponseBodyForContentTypes], - "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes], - "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes], - "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes": typing.Type[ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes], - "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes], - "/responseBody/postNotMultipleTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes], - "/responseBody/postNotResponseBodyForContentTypes": typing.Type[ResponseBodyPostNotResponseBodyForContentTypes], - "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes], - "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes], - "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": typing.Type[ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes], - "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes], - "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": typing.Type[ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes], - "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes], - "/responseBody/postOneofResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofResponseBodyForContentTypes], - "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes], - "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes], - "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": typing.Type[ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes], - "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes], - "/responseBody/postPatternValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternValidationResponseBodyForContentTypes], - "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes], - "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], - "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes], - "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes], - "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes], - "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes], - "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], - "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes], - "/responseBody/postPropertynamesValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes], - "/responseBody/postRegexFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostRegexFormatResponseBodyForContentTypes], - "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes": typing.Type[ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes], - "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes], - "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes], - "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes], - "/responseBody/postRequiredValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredValidationResponseBodyForContentTypes], - "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes], - "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": typing.Type[ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes], - "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes], - "/responseBody/postSingleDependencyResponseBodyForContentTypes": typing.Type[ResponseBodyPostSingleDependencyResponseBodyForContentTypes], - "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes": typing.Type[ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes], - "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": typing.Type[ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes], - "/responseBody/postTimeFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostTimeFormatResponseBodyForContentTypes], - "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes], - "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes], - "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes": typing.Type[ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes], - "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes], - "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes], - "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes], - "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes], - "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes], - "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes], - "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes], - "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": typing.Type[ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes], - "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes], - "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes], - "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes], - "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes": typing.Type[ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes], - "/responseBody/postUriFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriFormatResponseBodyForContentTypes], - "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes], - "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes], - "/responseBody/postUuidFormatResponseBodyForContentTypes": typing.Type[ResponseBodyPostUuidFormatResponseBodyForContentTypes], - "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes": typing.Type[ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes], - } -) - -path_to_api = PathToApi( - { - "/requestBody/postASchemaGivenForPrefixitemsRequestBody": RequestBodyPostASchemaGivenForPrefixitemsRequestBody, - "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody, - "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody": RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, - "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody": RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, - "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody": RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, - "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, - "/requestBody/postAdditionalpropertiesWithSchemaRequestBody": RequestBodyPostAdditionalpropertiesWithSchemaRequestBody, - "/requestBody/postAllofCombinedWithAnyofOneofRequestBody": RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, - "/requestBody/postAllofRequestBody": RequestBodyPostAllofRequestBody, - "/requestBody/postAllofSimpleTypesRequestBody": RequestBodyPostAllofSimpleTypesRequestBody, - "/requestBody/postAllofWithBaseSchemaRequestBody": RequestBodyPostAllofWithBaseSchemaRequestBody, - "/requestBody/postAllofWithOneEmptySchemaRequestBody": RequestBodyPostAllofWithOneEmptySchemaRequestBody, - "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody": RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, - "/requestBody/postAllofWithTheLastEmptySchemaRequestBody": RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, - "/requestBody/postAllofWithTwoEmptySchemasRequestBody": RequestBodyPostAllofWithTwoEmptySchemasRequestBody, - "/requestBody/postAnyofComplexTypesRequestBody": RequestBodyPostAnyofComplexTypesRequestBody, - "/requestBody/postAnyofRequestBody": RequestBodyPostAnyofRequestBody, - "/requestBody/postAnyofWithBaseSchemaRequestBody": RequestBodyPostAnyofWithBaseSchemaRequestBody, - "/requestBody/postAnyofWithOneEmptySchemaRequestBody": RequestBodyPostAnyofWithOneEmptySchemaRequestBody, - "/requestBody/postArrayTypeMatchesArraysRequestBody": RequestBodyPostArrayTypeMatchesArraysRequestBody, - "/requestBody/postBooleanTypeMatchesBooleansRequestBody": RequestBodyPostBooleanTypeMatchesBooleansRequestBody, - "/requestBody/postByIntRequestBody": RequestBodyPostByIntRequestBody, - "/requestBody/postByNumberRequestBody": RequestBodyPostByNumberRequestBody, - "/requestBody/postBySmallNumberRequestBody": RequestBodyPostBySmallNumberRequestBody, - "/requestBody/postConstNulCharactersInStringsRequestBody": RequestBodyPostConstNulCharactersInStringsRequestBody, - "/requestBody/postContainsKeywordValidationRequestBody": RequestBodyPostContainsKeywordValidationRequestBody, - "/requestBody/postContainsWithNullInstanceElementsRequestBody": RequestBodyPostContainsWithNullInstanceElementsRequestBody, - "/requestBody/postDateFormatRequestBody": RequestBodyPostDateFormatRequestBody, - "/requestBody/postDateTimeFormatRequestBody": RequestBodyPostDateTimeFormatRequestBody, - "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody": RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody, - "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody": RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, - "/requestBody/postDependentSchemasSingleDependencyRequestBody": RequestBodyPostDependentSchemasSingleDependencyRequestBody, - "/requestBody/postDurationFormatRequestBody": RequestBodyPostDurationFormatRequestBody, - "/requestBody/postEmailFormatRequestBody": RequestBodyPostEmailFormatRequestBody, - "/requestBody/postEmptyDependentsRequestBody": RequestBodyPostEmptyDependentsRequestBody, - "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody": RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, - "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody": RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, - "/requestBody/postEnumWithEscapedCharactersRequestBody": RequestBodyPostEnumWithEscapedCharactersRequestBody, - "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody": RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, - "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody": RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, - "/requestBody/postEnumsInPropertiesRequestBody": RequestBodyPostEnumsInPropertiesRequestBody, - "/requestBody/postExclusivemaximumValidationRequestBody": RequestBodyPostExclusivemaximumValidationRequestBody, - "/requestBody/postExclusiveminimumValidationRequestBody": RequestBodyPostExclusiveminimumValidationRequestBody, - "/requestBody/postFloatDivisionInfRequestBody": RequestBodyPostFloatDivisionInfRequestBody, - "/requestBody/postForbiddenPropertyRequestBody": RequestBodyPostForbiddenPropertyRequestBody, - "/requestBody/postHostnameFormatRequestBody": RequestBodyPostHostnameFormatRequestBody, - "/requestBody/postIdnEmailFormatRequestBody": RequestBodyPostIdnEmailFormatRequestBody, - "/requestBody/postIdnHostnameFormatRequestBody": RequestBodyPostIdnHostnameFormatRequestBody, - "/requestBody/postIfAndElseWithoutThenRequestBody": RequestBodyPostIfAndElseWithoutThenRequestBody, - "/requestBody/postIfAndThenWithoutElseRequestBody": RequestBodyPostIfAndThenWithoutElseRequestBody, - "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody": RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, - "/requestBody/postIgnoreElseWithoutIfRequestBody": RequestBodyPostIgnoreElseWithoutIfRequestBody, - "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody": RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody, - "/requestBody/postIgnoreThenWithoutIfRequestBody": RequestBodyPostIgnoreThenWithoutIfRequestBody, - "/requestBody/postIntegerTypeMatchesIntegersRequestBody": RequestBodyPostIntegerTypeMatchesIntegersRequestBody, - "/requestBody/postIpv4FormatRequestBody": RequestBodyPostIpv4FormatRequestBody, - "/requestBody/postIpv6FormatRequestBody": RequestBodyPostIpv6FormatRequestBody, - "/requestBody/postIriFormatRequestBody": RequestBodyPostIriFormatRequestBody, - "/requestBody/postIriReferenceFormatRequestBody": RequestBodyPostIriReferenceFormatRequestBody, - "/requestBody/postItemsContainsRequestBody": RequestBodyPostItemsContainsRequestBody, - "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody": RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody, - "/requestBody/postItemsWithNullInstanceElementsRequestBody": RequestBodyPostItemsWithNullInstanceElementsRequestBody, - "/requestBody/postJsonPointerFormatRequestBody": RequestBodyPostJsonPointerFormatRequestBody, - "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody": RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody, - "/requestBody/postMaximumValidationRequestBody": RequestBodyPostMaximumValidationRequestBody, - "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody": RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, - "/requestBody/postMaxitemsValidationRequestBody": RequestBodyPostMaxitemsValidationRequestBody, - "/requestBody/postMaxlengthValidationRequestBody": RequestBodyPostMaxlengthValidationRequestBody, - "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody": RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, - "/requestBody/postMaxpropertiesValidationRequestBody": RequestBodyPostMaxpropertiesValidationRequestBody, - "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody": RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody, - "/requestBody/postMinimumValidationRequestBody": RequestBodyPostMinimumValidationRequestBody, - "/requestBody/postMinimumValidationWithSignedIntegerRequestBody": RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, - "/requestBody/postMinitemsValidationRequestBody": RequestBodyPostMinitemsValidationRequestBody, - "/requestBody/postMinlengthValidationRequestBody": RequestBodyPostMinlengthValidationRequestBody, - "/requestBody/postMinpropertiesValidationRequestBody": RequestBodyPostMinpropertiesValidationRequestBody, - "/requestBody/postMultipleDependentsRequiredRequestBody": RequestBodyPostMultipleDependentsRequiredRequestBody, - "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody": RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, - "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody": RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, - "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, - "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, - "/requestBody/postNestedItemsRequestBody": RequestBodyPostNestedItemsRequestBody, - "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody": RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, - "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody": RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody, - "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody": RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody, - "/requestBody/postNotMoreComplexSchemaRequestBody": RequestBodyPostNotMoreComplexSchemaRequestBody, - "/requestBody/postNotMultipleTypesRequestBody": RequestBodyPostNotMultipleTypesRequestBody, - "/requestBody/postNotRequestBody": RequestBodyPostNotRequestBody, - "/requestBody/postNulCharactersInStringsRequestBody": RequestBodyPostNulCharactersInStringsRequestBody, - "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody": RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, - "/requestBody/postNumberTypeMatchesNumbersRequestBody": RequestBodyPostNumberTypeMatchesNumbersRequestBody, - "/requestBody/postObjectPropertiesValidationRequestBody": RequestBodyPostObjectPropertiesValidationRequestBody, - "/requestBody/postObjectTypeMatchesObjectsRequestBody": RequestBodyPostObjectTypeMatchesObjectsRequestBody, - "/requestBody/postOneofComplexTypesRequestBody": RequestBodyPostOneofComplexTypesRequestBody, - "/requestBody/postOneofRequestBody": RequestBodyPostOneofRequestBody, - "/requestBody/postOneofWithBaseSchemaRequestBody": RequestBodyPostOneofWithBaseSchemaRequestBody, - "/requestBody/postOneofWithEmptySchemaRequestBody": RequestBodyPostOneofWithEmptySchemaRequestBody, - "/requestBody/postOneofWithRequiredRequestBody": RequestBodyPostOneofWithRequiredRequestBody, - "/requestBody/postPatternIsNotAnchoredRequestBody": RequestBodyPostPatternIsNotAnchoredRequestBody, - "/requestBody/postPatternValidationRequestBody": RequestBodyPostPatternValidationRequestBody, - "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody": RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, - "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, - "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody": RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, - "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody": RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody, - "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody": RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, - "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - "/requestBody/postPropertiesWithEscapedCharactersRequestBody": RequestBodyPostPropertiesWithEscapedCharactersRequestBody, - "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody, - "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody": RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, - "/requestBody/postPropertynamesValidationRequestBody": RequestBodyPostPropertynamesValidationRequestBody, - "/requestBody/postRegexFormatRequestBody": RequestBodyPostRegexFormatRequestBody, - "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody": RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, - "/requestBody/postRelativeJsonPointerFormatRequestBody": RequestBodyPostRelativeJsonPointerFormatRequestBody, - "/requestBody/postRequiredDefaultValidationRequestBody": RequestBodyPostRequiredDefaultValidationRequestBody, - "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody": RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - "/requestBody/postRequiredValidationRequestBody": RequestBodyPostRequiredValidationRequestBody, - "/requestBody/postRequiredWithEmptyArrayRequestBody": RequestBodyPostRequiredWithEmptyArrayRequestBody, - "/requestBody/postRequiredWithEscapedCharactersRequestBody": RequestBodyPostRequiredWithEscapedCharactersRequestBody, - "/requestBody/postSimpleEnumValidationRequestBody": RequestBodyPostSimpleEnumValidationRequestBody, - "/requestBody/postSingleDependencyRequestBody": RequestBodyPostSingleDependencyRequestBody, - "/requestBody/postSmallMultipleOfLargeIntegerRequestBody": RequestBodyPostSmallMultipleOfLargeIntegerRequestBody, - "/requestBody/postStringTypeMatchesStringsRequestBody": RequestBodyPostStringTypeMatchesStringsRequestBody, - "/requestBody/postTimeFormatRequestBody": RequestBodyPostTimeFormatRequestBody, - "/requestBody/postTypeArrayObjectOrNullRequestBody": RequestBodyPostTypeArrayObjectOrNullRequestBody, - "/requestBody/postTypeArrayOrObjectRequestBody": RequestBodyPostTypeArrayOrObjectRequestBody, - "/requestBody/postTypeAsArrayWithOneItemRequestBody": RequestBodyPostTypeAsArrayWithOneItemRequestBody, - "/requestBody/postUnevaluateditemsAsSchemaRequestBody": RequestBodyPostUnevaluateditemsAsSchemaRequestBody, - "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody": RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, - "/requestBody/postUnevaluateditemsWithItemsRequestBody": RequestBodyPostUnevaluateditemsWithItemsRequestBody, - "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody": RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody, - "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody": RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, - "/requestBody/postUnevaluatedpropertiesSchemaRequestBody": RequestBodyPostUnevaluatedpropertiesSchemaRequestBody, - "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody": RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, - "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody": RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, - "/requestBody/postUniqueitemsFalseValidationRequestBody": RequestBodyPostUniqueitemsFalseValidationRequestBody, - "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody": RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody, - "/requestBody/postUniqueitemsValidationRequestBody": RequestBodyPostUniqueitemsValidationRequestBody, - "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody": RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody, - "/requestBody/postUriFormatRequestBody": RequestBodyPostUriFormatRequestBody, - "/requestBody/postUriReferenceFormatRequestBody": RequestBodyPostUriReferenceFormatRequestBody, - "/requestBody/postUriTemplateFormatRequestBody": RequestBodyPostUriTemplateFormatRequestBody, - "/requestBody/postUuidFormatRequestBody": RequestBodyPostUuidFormatRequestBody, - "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody": RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody, - "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes": ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes, - "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes": ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, - "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes": ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - "/responseBody/postAllofResponseBodyForContentTypes": ResponseBodyPostAllofResponseBodyForContentTypes, - "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes": ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, - "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes": ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes": ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, - "/responseBody/postAnyofResponseBodyForContentTypes": ResponseBodyPostAnyofResponseBodyForContentTypes, - "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes": ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes": ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, - "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes": ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - "/responseBody/postByIntResponseBodyForContentTypes": ResponseBodyPostByIntResponseBodyForContentTypes, - "/responseBody/postByNumberResponseBodyForContentTypes": ResponseBodyPostByNumberResponseBodyForContentTypes, - "/responseBody/postBySmallNumberResponseBodyForContentTypes": ResponseBodyPostBySmallNumberResponseBodyForContentTypes, - "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes, - "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes": ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes, - "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes, - "/responseBody/postDateFormatResponseBodyForContentTypes": ResponseBodyPostDateFormatResponseBodyForContentTypes, - "/responseBody/postDateTimeFormatResponseBodyForContentTypes": ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, - "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes": ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, - "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes": ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes, - "/responseBody/postDurationFormatResponseBodyForContentTypes": ResponseBodyPostDurationFormatResponseBodyForContentTypes, - "/responseBody/postEmailFormatResponseBodyForContentTypes": ResponseBodyPostEmailFormatResponseBodyForContentTypes, - "/responseBody/postEmptyDependentsResponseBodyForContentTypes": ResponseBodyPostEmptyDependentsResponseBodyForContentTypes, - "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes": ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes": ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes": ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes": ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes": ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, - "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes": ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes, - "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes": ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes, - "/responseBody/postFloatDivisionInfResponseBodyForContentTypes": ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes, - "/responseBody/postForbiddenPropertyResponseBodyForContentTypes": ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, - "/responseBody/postHostnameFormatResponseBodyForContentTypes": ResponseBodyPostHostnameFormatResponseBodyForContentTypes, - "/responseBody/postIdnEmailFormatResponseBodyForContentTypes": ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes, - "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes": ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes, - "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes": ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes, - "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes": ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes, - "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes": ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, - "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes": ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes, - "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes": ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, - "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes": ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes, - "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes": ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - "/responseBody/postIpv4FormatResponseBodyForContentTypes": ResponseBodyPostIpv4FormatResponseBodyForContentTypes, - "/responseBody/postIpv6FormatResponseBodyForContentTypes": ResponseBodyPostIpv6FormatResponseBodyForContentTypes, - "/responseBody/postIriFormatResponseBodyForContentTypes": ResponseBodyPostIriFormatResponseBodyForContentTypes, - "/responseBody/postIriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes, - "/responseBody/postItemsContainsResponseBodyForContentTypes": ResponseBodyPostItemsContainsResponseBodyForContentTypes, - "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes": ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, - "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes, - "/responseBody/postJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, - "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - "/responseBody/postMaximumValidationResponseBodyForContentTypes": ResponseBodyPostMaximumValidationResponseBodyForContentTypes, - "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes": ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - "/responseBody/postMaxitemsValidationResponseBodyForContentTypes": ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, - "/responseBody/postMaxlengthValidationResponseBodyForContentTypes": ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, - "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes": ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, - "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes": ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - "/responseBody/postMinimumValidationResponseBodyForContentTypes": ResponseBodyPostMinimumValidationResponseBodyForContentTypes, - "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes": ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - "/responseBody/postMinitemsValidationResponseBodyForContentTypes": ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, - "/responseBody/postMinlengthValidationResponseBodyForContentTypes": ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, - "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes": ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, - "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes": ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes, - "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes": ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, - "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes": ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, - "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNestedItemsResponseBodyForContentTypes": ResponseBodyPostNestedItemsResponseBodyForContentTypes, - "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes": ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, - "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes": ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, - "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes": ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, - "/responseBody/postNotMultipleTypesResponseBodyForContentTypes": ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes, - "/responseBody/postNotResponseBodyForContentTypes": ResponseBodyPostNotResponseBodyForContentTypes, - "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes": ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, - "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes": ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes": ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, - "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes": ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, - "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes": ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, - "/responseBody/postOneofComplexTypesResponseBodyForContentTypes": ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, - "/responseBody/postOneofResponseBodyForContentTypes": ResponseBodyPostOneofResponseBodyForContentTypes, - "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, - "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes": ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, - "/responseBody/postOneofWithRequiredResponseBodyForContentTypes": ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, - "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes": ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, - "/responseBody/postPatternValidationResponseBodyForContentTypes": ResponseBodyPostPatternValidationResponseBodyForContentTypes, - "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes": ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, - "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes": ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, - "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, - "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes": ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, - "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes": ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - "/responseBody/postPropertynamesValidationResponseBodyForContentTypes": ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes, - "/responseBody/postRegexFormatResponseBodyForContentTypes": ResponseBodyPostRegexFormatResponseBodyForContentTypes, - "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes": ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, - "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes": ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes, - "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes": ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, - "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes": ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - "/responseBody/postRequiredValidationResponseBodyForContentTypes": ResponseBodyPostRequiredValidationResponseBodyForContentTypes, - "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes": ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, - "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes": ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, - "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes": ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, - "/responseBody/postSingleDependencyResponseBodyForContentTypes": ResponseBodyPostSingleDependencyResponseBodyForContentTypes, - "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes": ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, - "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes": ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, - "/responseBody/postTimeFormatResponseBodyForContentTypes": ResponseBodyPostTimeFormatResponseBodyForContentTypes, - "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes": ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes, - "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes": ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes, - "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes": ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes, - "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes, - "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, - "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes, - "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes": ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, - "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, - "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, - "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, - "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes": ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, - "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes": ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, - "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes": ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, - "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes": ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, - "/responseBody/postUriFormatResponseBodyForContentTypes": ResponseBodyPostUriFormatResponseBodyForContentTypes, - "/responseBody/postUriReferenceFormatResponseBodyForContentTypes": ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, - "/responseBody/postUriTemplateFormatResponseBodyForContentTypes": ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, - "/responseBody/postUuidFormatResponseBodyForContentTypes": ResponseBodyPostUuidFormatResponseBodyForContentTypes, - "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes": ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, - } -) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py deleted file mode 100644 index cf241d055c1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py deleted file mode 100644 index 4f45085b8ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import ApiForPost - - -class RequestBodyPostASchemaGivenForPrefixitemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py deleted file mode 100644 index aa8c5bae97e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py deleted file mode 100644 index 36532c11740..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py deleted file mode 100644 index 4e78c4910a7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py deleted file mode 100644 index dad7ec6c30a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py deleted file mode 100644 index bd7a287cfb9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py deleted file mode 100644 index 931521fcf08..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAdditionalpropertiesWithSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py deleted file mode 100644 index 4480daaccba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofCombinedWithAnyofOneofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py deleted file mode 100644 index 532efdb2ee8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py deleted file mode 100644 index 623774c43a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofSimpleTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py deleted file mode 100644 index af4ff5ef4e0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py deleted file mode 100644 index 5a70255cc45..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithOneEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py deleted file mode 100644 index 2e0f5927ddd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py deleted file mode 100644 index d80740df7b0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTheLastEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py deleted file mode 100644 index 7b7dd7d0b42..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import ApiForPost - - -class RequestBodyPostAllofWithTwoEmptySchemasRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py deleted file mode 100644 index ccaa6b01276..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofComplexTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py deleted file mode 100644 index 647b1f802f2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py deleted file mode 100644 index 4b917efdd47..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py deleted file mode 100644 index 9a23748a21a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostAnyofWithOneEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py deleted file mode 100644 index 84b93e5f9d2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import ApiForPost - - -class RequestBodyPostArrayTypeMatchesArraysRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py deleted file mode 100644 index 292403f027d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import ApiForPost - - -class RequestBodyPostBooleanTypeMatchesBooleansRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py deleted file mode 100644 index 732cf2f7b63..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_int_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import ApiForPost - - -class RequestBodyPostByIntRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py deleted file mode 100644 index 237f942e46a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_number_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import ApiForPost - - -class RequestBodyPostByNumberRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py deleted file mode 100644 index 69b8d1fc812..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import ApiForPost - - -class RequestBodyPostBySmallNumberRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py deleted file mode 100644 index 6d2a3e98043..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import ApiForPost - - -class RequestBodyPostConstNulCharactersInStringsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py deleted file mode 100644 index cae353fc557..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostContainsKeywordValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py deleted file mode 100644 index 337ee06e0ad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import ApiForPost - - -class RequestBodyPostContainsWithNullInstanceElementsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py deleted file mode 100644 index 656ae0a8326..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_date_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostDateFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py deleted file mode 100644 index 0af82fb0b19..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostDateTimeFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py deleted file mode 100644 index 9f3f7280d0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py deleted file mode 100644 index 6cb83d31563..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import ApiForPost - - -class RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py deleted file mode 100644 index 2732f5dfc84..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import ApiForPost - - -class RequestBodyPostDependentSchemasSingleDependencyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py deleted file mode 100644 index 0ddf109b1f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostDurationFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py deleted file mode 100644 index d488c739731..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_email_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostEmailFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py deleted file mode 100644 index 4cff9079b29..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import ApiForPost - - -class RequestBodyPostEmptyDependentsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py deleted file mode 100644 index 17edfbea653..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py deleted file mode 100644 index 69fed82e8ea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py deleted file mode 100644 index 4170ddf46e0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py deleted file mode 100644 index 497786a2f63..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py deleted file mode 100644 index 3ecc317d968..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py deleted file mode 100644 index b3fd918b730..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostEnumsInPropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py deleted file mode 100644 index a630ad544a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostExclusivemaximumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py deleted file mode 100644 index 0fdf671fee7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostExclusiveminimumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py deleted file mode 100644 index 9c661779210..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import ApiForPost - - -class RequestBodyPostFloatDivisionInfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py deleted file mode 100644 index d6feb065be9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import ApiForPost - - -class RequestBodyPostForbiddenPropertyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py deleted file mode 100644 index c27e42fa7b9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostHostnameFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py deleted file mode 100644 index 1eb622c201a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIdnEmailFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py deleted file mode 100644 index ecdc87c665b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIdnHostnameFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py deleted file mode 100644 index b1a206860e6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import ApiForPost - - -class RequestBodyPostIfAndElseWithoutThenRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py deleted file mode 100644 index 52a93559c66..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import ApiForPost - - -class RequestBodyPostIfAndThenWithoutElseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py deleted file mode 100644 index 014514c0088..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import ApiForPost - - -class RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py deleted file mode 100644 index eb15675f93e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import ApiForPost - - -class RequestBodyPostIgnoreElseWithoutIfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py deleted file mode 100644 index 832523825ed..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import ApiForPost - - -class RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py deleted file mode 100644 index 8cf0a2830b2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import ApiForPost - - -class RequestBodyPostIgnoreThenWithoutIfRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py deleted file mode 100644 index bfa468c9418..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import ApiForPost - - -class RequestBodyPostIntegerTypeMatchesIntegersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py deleted file mode 100644 index 6288b0bc8c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIpv4FormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py deleted file mode 100644 index bb18ad7b04a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIpv6FormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py deleted file mode 100644 index 99beb0a18f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIriFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py deleted file mode 100644 index bb97fcbffd0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostIriReferenceFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py deleted file mode 100644 index c250465fcf6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import ApiForPost - - -class RequestBodyPostItemsContainsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py deleted file mode 100644 index a6fa002d893..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import ApiForPost - - -class RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py deleted file mode 100644 index 41b19e5b1f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import ApiForPost - - -class RequestBodyPostItemsWithNullInstanceElementsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py deleted file mode 100644 index 0df910056be..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostJsonPointerFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py deleted file mode 100644 index b08aca33e1a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py deleted file mode 100644 index 674eb049aa6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaximumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py deleted file mode 100644 index f55f13db9ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py deleted file mode 100644 index df142bdc19b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py deleted file mode 100644 index ddff73ec08a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxlengthValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py deleted file mode 100644 index 7ccd2f00b27..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py deleted file mode 100644 index 53c2f641a9d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMaxpropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py deleted file mode 100644 index 57b4545bfa3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import ApiForPost - - -class RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py deleted file mode 100644 index 52b7e1cca45..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinimumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py deleted file mode 100644 index 7b08146a4d6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinimumValidationWithSignedIntegerRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py deleted file mode 100644 index fb8771470d9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py deleted file mode 100644 index a64211cf799..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinlengthValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py deleted file mode 100644 index c6588d4c181..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostMinpropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py deleted file mode 100644 index d057f7302aa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import ApiForPost - - -class RequestBodyPostMultipleDependentsRequiredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py deleted file mode 100644 index e6b064fc8f8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import ApiForPost - - -class RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py deleted file mode 100644 index 92db38c8ef8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import ApiForPost - - -class RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py deleted file mode 100644 index d030cd5ced4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 10599f9f8b8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py deleted file mode 100644 index 20c87854f7a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 78ecdddb7a8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import ApiForPost - - -class RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py deleted file mode 100644 index 55e9374e8ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import ApiForPost - - -class RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py deleted file mode 100644 index eb2fc38e4ca..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import ApiForPost - - -class RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py deleted file mode 100644 index c16784dced4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostNotMoreComplexSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py deleted file mode 100644 index d032c999dfa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostNotMultipleTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py deleted file mode 100644 index ed139742514..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_not_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_request_body.post.operation import ApiForPost - - -class RequestBodyPostNotRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py deleted file mode 100644 index 556b0cac442..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import ApiForPost - - -class RequestBodyPostNulCharactersInStringsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py deleted file mode 100644 index 20ab0b86c2a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import ApiForPost - - -class RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py deleted file mode 100644 index 9653e78ebb4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import ApiForPost - - -class RequestBodyPostNumberTypeMatchesNumbersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py deleted file mode 100644 index c99f22092f5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostObjectPropertiesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py deleted file mode 100644 index 2cc13a7b4d1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import ApiForPost - - -class RequestBodyPostObjectTypeMatchesObjectsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py deleted file mode 100644 index ccc3cf5cceb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofComplexTypesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py deleted file mode 100644 index 88ba41fd46d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py deleted file mode 100644 index dbf639f8789..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithBaseSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py deleted file mode 100644 index 6a417f71839..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithEmptySchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py deleted file mode 100644 index 48e8f046b44..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import ApiForPost - - -class RequestBodyPostOneofWithRequiredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py deleted file mode 100644 index da3c84fc103..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternIsNotAnchoredRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py deleted file mode 100644 index 20ede2aeb3c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py deleted file mode 100644 index 36d7c0cd1af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py deleted file mode 100644 index 646fa1fd1c2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py deleted file mode 100644 index 15e13019192..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py deleted file mode 100644 index 3388319db74..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import ApiForPost - - -class RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py deleted file mode 100644 index 83d49419562..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py deleted file mode 100644 index e35e2f4a51b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py deleted file mode 100644 index 6b3886eb815..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertiesWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py deleted file mode 100644 index 85fef4c141b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py deleted file mode 100644 index 3b2f40d08d7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py deleted file mode 100644 index 700be7b9a6b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostPropertynamesValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py deleted file mode 100644 index 6b75f9d047a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostRegexFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py deleted file mode 100644 index fabf1a799e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import ApiForPost - - -class RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py deleted file mode 100644 index e799ca47f18..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostRelativeJsonPointerFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py deleted file mode 100644 index 174034e1d0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredDefaultValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py deleted file mode 100644 index 14430e0a2f0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py deleted file mode 100644 index b70a88e909c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py deleted file mode 100644 index 8c4fce75faf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredWithEmptyArrayRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py deleted file mode 100644 index cc3eb78287f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import ApiForPost - - -class RequestBodyPostRequiredWithEscapedCharactersRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py deleted file mode 100644 index 01b5089d5fc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostSimpleEnumValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py deleted file mode 100644 index c029d9b24f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import ApiForPost - - -class RequestBodyPostSingleDependencyRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py deleted file mode 100644 index fee4ba60ddc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import ApiForPost - - -class RequestBodyPostSmallMultipleOfLargeIntegerRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py deleted file mode 100644 index 0c0c29c0f88..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import ApiForPost - - -class RequestBodyPostStringTypeMatchesStringsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py deleted file mode 100644 index e527b3fd2f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_time_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_time_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostTimeFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py deleted file mode 100644 index 703fbbc081f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import ApiForPost - - -class RequestBodyPostTypeArrayObjectOrNullRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py deleted file mode 100644 index e0097d83317..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import ApiForPost - - -class RequestBodyPostTypeArrayOrObjectRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py deleted file mode 100644 index 8950ac1612e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import ApiForPost - - -class RequestBodyPostTypeAsArrayWithOneItemRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py deleted file mode 100644 index a7963b04c5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluateditemsAsSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py deleted file mode 100644 index 382f41dd8a8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py deleted file mode 100644 index 1de40ea89f0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluateditemsWithItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py deleted file mode 100644 index 80852b13ba1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py deleted file mode 100644 index 26218bd7658..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py deleted file mode 100644 index 5aabcca6245..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluatedpropertiesSchemaRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py deleted file mode 100644 index e8ba92f7d76..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py deleted file mode 100644 index 161519f4a14..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import ApiForPost - - -class RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py deleted file mode 100644 index 51097da6994..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsFalseValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py deleted file mode 100644 index 3150c965940..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py deleted file mode 100644 index b31adf6d7b0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsValidationRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py deleted file mode 100644 index 18320963098..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import ApiForPost - - -class RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py deleted file mode 100644 index e8a3d3c0af9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py deleted file mode 100644 index 58c7c2cccb7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriReferenceFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py deleted file mode 100644 index 1f55f71bed7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUriTemplateFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py deleted file mode 100644 index 2a21fbccfc2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import ApiForPost - - -class RequestBodyPostUuidFormatRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py deleted file mode 100644 index 918ff40ce1f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import ApiForPost - - -class RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py deleted file mode 100644 index b5619e6f9a6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py deleted file mode 100644 index 6aedb043f82..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py deleted file mode 100644 index 38ea9c51a0e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py deleted file mode 100644 index 4110c9f1d82..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py deleted file mode 100644 index c8825c0f42d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py deleted file mode 100644 index e2375d54b8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py deleted file mode 100644 index 1844a172b63..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py deleted file mode 100644 index be301da0bf5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py deleted file mode 100644 index c3f4e74b8d0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py deleted file mode 100644 index d7312b8d643..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 452cf325331..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index a69ecb4fdd7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py deleted file mode 100644 index fb4178e9acb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 770b21b06be..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py deleted file mode 100644 index 02789ab3d5a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py deleted file mode 100644 index 1f67d8fc354..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py deleted file mode 100644 index bd8f1d2fdde..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 4cd77d39175..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 3ae65f45cc6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py deleted file mode 100644 index e194b6ba539..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py deleted file mode 100644 index dc7016c7123..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py deleted file mode 100644 index 7318812f2af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostByIntResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py deleted file mode 100644 index 8db33c953d8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostByNumberResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py deleted file mode 100644 index 67972605e91..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostBySmallNumberResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py deleted file mode 100644 index b3ced876cdb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py deleted file mode 100644 index b0af9da1a4a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py deleted file mode 100644 index 3e799675384..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py deleted file mode 100644 index bf4fdd6440f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDateFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py deleted file mode 100644 index 248a1ece66c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDateTimeFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index aadf9602831..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py deleted file mode 100644 index 4215764d966..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py deleted file mode 100644 index 59354134abf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py deleted file mode 100644 index 04a56fd88e1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostDurationFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py deleted file mode 100644 index cc3b57cb053..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEmailFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py deleted file mode 100644 index 39d1b1a9cc5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEmptyDependentsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py deleted file mode 100644 index fa99edb15a4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py deleted file mode 100644 index 66659bf7f08..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index 10908094d73..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py deleted file mode 100644 index 16e4cb7a856..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py deleted file mode 100644 index 1393f16c370..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py deleted file mode 100644 index da078e10c0b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py deleted file mode 100644 index d1fe25aecf4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py deleted file mode 100644 index 5abe75f1069..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py deleted file mode 100644 index 4d652990d02..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py deleted file mode 100644 index c15dcf49dbd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py deleted file mode 100644 index dce908eb65e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostHostnameFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py deleted file mode 100644 index f7888abd8b7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py deleted file mode 100644 index ced9b47c90b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py deleted file mode 100644 index 8c3b383582c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py deleted file mode 100644 index 3899b3334ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py deleted file mode 100644 index 80b26e0dd47..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py deleted file mode 100644 index 77f0370a42e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py deleted file mode 100644 index 74179444937..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py deleted file mode 100644 index 1bf29addf50..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py deleted file mode 100644 index 6906efe5199..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py deleted file mode 100644 index fce3e100a9d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIpv4FormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py deleted file mode 100644 index 7b2a2663415..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIpv6FormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py deleted file mode 100644 index ba8d5dbb4c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIriFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py deleted file mode 100644 index 70b80edf11c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py deleted file mode 100644 index 8504c48eb07..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostItemsContainsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py deleted file mode 100644 index d249fcac467..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py deleted file mode 100644 index e35082f9382..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py deleted file mode 100644 index dd871c68782..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py deleted file mode 100644 index df0b8c5c6af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py deleted file mode 100644 index 395ff428a1c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaximumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py deleted file mode 100644 index 2793858fbcb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py deleted file mode 100644 index 07505ab9c95..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py deleted file mode 100644 index dd37437ba93..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py deleted file mode 100644 index 939de700993..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py deleted file mode 100644 index e879ca0b5a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py deleted file mode 100644 index e1ef72109fe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py deleted file mode 100644 index c67d47c8e0b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinimumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py deleted file mode 100644 index 5baedece0e1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py deleted file mode 100644 index 923cda49058..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py deleted file mode 100644 index 6e269ec52a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinlengthValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py deleted file mode 100644 index 05bc54f3fe1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py deleted file mode 100644 index 9ec578d7bb2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py deleted file mode 100644 index ddc8e541058..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py deleted file mode 100644 index 09ea92353e7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 9297fc2f991..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 6df177a58f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py deleted file mode 100644 index 27dd38fe6b8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 7496bfb73fb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py deleted file mode 100644 index 33d6a7fcab3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py deleted file mode 100644 index 727143e3200..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py deleted file mode 100644 index fd71b9e9971..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py deleted file mode 100644 index ea114c38a51..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py deleted file mode 100644 index d8a38229a41..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNotResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py deleted file mode 100644 index b31e4ca403d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py deleted file mode 100644 index 89e88f7a2ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py deleted file mode 100644 index cc2c7ddb2d5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py deleted file mode 100644 index db35b129189..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py deleted file mode 100644 index 0355a660707..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py deleted file mode 100644 index 991c5657fb0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py deleted file mode 100644 index 8798cbe40f3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 34e10a2713b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py deleted file mode 100644 index f82a7eec1ae..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py deleted file mode 100644 index c6b1fded641..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py deleted file mode 100644 index c92ad6904e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py deleted file mode 100644 index bc77b21fc79..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py deleted file mode 100644 index 01ba5b2d193..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py deleted file mode 100644 index 5da7778105d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py deleted file mode 100644 index 4731ef923e7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py deleted file mode 100644 index 7ea8ee5134f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py deleted file mode 100644 index 8d4475b960a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py deleted file mode 100644 index b07bff09fa3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index 1ddafcb8663..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py deleted file mode 100644 index 552dfb16ebe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py deleted file mode 100644 index 551eee85024..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py deleted file mode 100644 index 153f70d56d9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py deleted file mode 100644 index 798f211d66d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRegexFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py deleted file mode 100644 index cc87c2d9415..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py deleted file mode 100644 index 9a0abfc58ee..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py deleted file mode 100644 index 5fee9d6e184..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py deleted file mode 100644 index 8f5eead9b8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py deleted file mode 100644 index fa649f88e7f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py deleted file mode 100644 index 4521b9105ab..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index 236051838e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py deleted file mode 100644 index 8a9ff212518..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py deleted file mode 100644 index aad375f0a81..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostSingleDependencyResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py deleted file mode 100644 index 27fae5acab5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py deleted file mode 100644 index ad259803428..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py deleted file mode 100644 index 21dffee4c1b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostTimeFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py deleted file mode 100644 index 77381eaf890..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py deleted file mode 100644 index 0e8a2fc90e5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py deleted file mode 100644 index d7079547301..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py deleted file mode 100644 index 3f99906e487..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py deleted file mode 100644 index 7176e815134..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py deleted file mode 100644 index a3662fed9ea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py deleted file mode 100644 index 816cdf0313d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py deleted file mode 100644 index ae37c6d7fa9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py deleted file mode 100644 index 443f3a44989..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py deleted file mode 100644 index d5d849ba74f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py deleted file mode 100644 index e6325e150db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py deleted file mode 100644 index 530d358ec89..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py deleted file mode 100644 index d61b2227c80..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py deleted file mode 100644 index a9a7e1eaf8e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py deleted file mode 100644 index 3fb7ac5e62f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py deleted file mode 100644 index 4dc4cf90291..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py deleted file mode 100644 index eada88c71c3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py deleted file mode 100644 index 602bd1505ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py deleted file mode 100644 index cf2eef95759..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostUuidFormatResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py deleted file mode 100644 index b247ee1ba8c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import ApiForPost - - -class ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py deleted file mode 100644 index f0895eaa0ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tag_to_api.py +++ /dev/null @@ -1,137 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.tags.operation_request_body_api import OperationRequestBodyApi -from openapi_client.apis.tags.path_post_api import PathPostApi -from openapi_client.apis.tags.prefix_items_api import PrefixItemsApi -from openapi_client.apis.tags.content_type_json_api import ContentTypeJsonApi -from openapi_client.apis.tags.additional_properties_api import AdditionalPropertiesApi -from openapi_client.apis.tags.all_of_api import AllOfApi -from openapi_client.apis.tags.any_of_api import AnyOfApi -from openapi_client.apis.tags.type_api import TypeApi -from openapi_client.apis.tags.multiple_of_api import MultipleOfApi -from openapi_client.apis.tags.const_api import ConstApi -from openapi_client.apis.tags.contains_api import ContainsApi -from openapi_client.apis.tags.format_api import FormatApi -from openapi_client.apis.tags.dependent_schemas_api import DependentSchemasApi -from openapi_client.apis.tags.dependent_required_api import DependentRequiredApi -from openapi_client.apis.tags.enum_api import EnumApi -from openapi_client.apis.tags.exclusive_maximum_api import ExclusiveMaximumApi -from openapi_client.apis.tags.exclusive_minimum_api import ExclusiveMinimumApi -from openapi_client.apis.tags.not_api import NotApi -from openapi_client.apis.tags.if_then_else_api import IfThenElseApi -from openapi_client.apis.tags.items_api import ItemsApi -from openapi_client.apis.tags.max_contains_api import MaxContainsApi -from openapi_client.apis.tags.maximum_api import MaximumApi -from openapi_client.apis.tags.max_items_api import MaxItemsApi -from openapi_client.apis.tags.max_length_api import MaxLengthApi -from openapi_client.apis.tags.max_properties_api import MaxPropertiesApi -from openapi_client.apis.tags.min_contains_api import MinContainsApi -from openapi_client.apis.tags.minimum_api import MinimumApi -from openapi_client.apis.tags.min_items_api import MinItemsApi -from openapi_client.apis.tags.min_length_api import MinLengthApi -from openapi_client.apis.tags.min_properties_api import MinPropertiesApi -from openapi_client.apis.tags.pattern_properties_api import PatternPropertiesApi -from openapi_client.apis.tags.one_of_api import OneOfApi -from openapi_client.apis.tags.properties_api import PropertiesApi -from openapi_client.apis.tags.pattern_api import PatternApi -from openapi_client.apis.tags.ref_api import RefApi -from openapi_client.apis.tags.property_names_api import PropertyNamesApi -from openapi_client.apis.tags.required_api import RequiredApi -from openapi_client.apis.tags.unevaluated_items_api import UnevaluatedItemsApi -from openapi_client.apis.tags.unevaluated_properties_api import UnevaluatedPropertiesApi -from openapi_client.apis.tags.unique_items_api import UniqueItemsApi -from openapi_client.apis.tags.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi - -TagToApi = typing.TypedDict( - 'TagToApi', - { - "operation.requestBody": typing.Type[OperationRequestBodyApi], - "path.post": typing.Type[PathPostApi], - "prefixItems": typing.Type[PrefixItemsApi], - "contentType_json": typing.Type[ContentTypeJsonApi], - "additionalProperties": typing.Type[AdditionalPropertiesApi], - "allOf": typing.Type[AllOfApi], - "anyOf": typing.Type[AnyOfApi], - "type": typing.Type[TypeApi], - "multipleOf": typing.Type[MultipleOfApi], - "const": typing.Type[ConstApi], - "contains": typing.Type[ContainsApi], - "format": typing.Type[FormatApi], - "dependentSchemas": typing.Type[DependentSchemasApi], - "dependentRequired": typing.Type[DependentRequiredApi], - "enum": typing.Type[EnumApi], - "exclusiveMaximum": typing.Type[ExclusiveMaximumApi], - "exclusiveMinimum": typing.Type[ExclusiveMinimumApi], - "not": typing.Type[NotApi], - "if-then-else": typing.Type[IfThenElseApi], - "items": typing.Type[ItemsApi], - "maxContains": typing.Type[MaxContainsApi], - "maximum": typing.Type[MaximumApi], - "maxItems": typing.Type[MaxItemsApi], - "maxLength": typing.Type[MaxLengthApi], - "maxProperties": typing.Type[MaxPropertiesApi], - "minContains": typing.Type[MinContainsApi], - "minimum": typing.Type[MinimumApi], - "minItems": typing.Type[MinItemsApi], - "minLength": typing.Type[MinLengthApi], - "minProperties": typing.Type[MinPropertiesApi], - "patternProperties": typing.Type[PatternPropertiesApi], - "oneOf": typing.Type[OneOfApi], - "properties": typing.Type[PropertiesApi], - "pattern": typing.Type[PatternApi], - "$ref": typing.Type[RefApi], - "propertyNames": typing.Type[PropertyNamesApi], - "required": typing.Type[RequiredApi], - "unevaluatedItems": typing.Type[UnevaluatedItemsApi], - "unevaluatedProperties": typing.Type[UnevaluatedPropertiesApi], - "uniqueItems": typing.Type[UniqueItemsApi], - "response.content.contentType.schema": typing.Type[ResponseContentContentTypeSchemaApi], - } -) - -tag_to_api = TagToApi( - { - "operation.requestBody": OperationRequestBodyApi, - "path.post": PathPostApi, - "prefixItems": PrefixItemsApi, - "contentType_json": ContentTypeJsonApi, - "additionalProperties": AdditionalPropertiesApi, - "allOf": AllOfApi, - "anyOf": AnyOfApi, - "type": TypeApi, - "multipleOf": MultipleOfApi, - "const": ConstApi, - "contains": ContainsApi, - "format": FormatApi, - "dependentSchemas": DependentSchemasApi, - "dependentRequired": DependentRequiredApi, - "enum": EnumApi, - "exclusiveMaximum": ExclusiveMaximumApi, - "exclusiveMinimum": ExclusiveMinimumApi, - "not": NotApi, - "if-then-else": IfThenElseApi, - "items": ItemsApi, - "maxContains": MaxContainsApi, - "maximum": MaximumApi, - "maxItems": MaxItemsApi, - "maxLength": MaxLengthApi, - "maxProperties": MaxPropertiesApi, - "minContains": MinContainsApi, - "minimum": MinimumApi, - "minItems": MinItemsApi, - "minLength": MinLengthApi, - "minProperties": MinPropertiesApi, - "patternProperties": PatternPropertiesApi, - "oneOf": OneOfApi, - "properties": PropertiesApi, - "pattern": PatternApi, - "$ref": RefApi, - "propertyNames": PropertyNamesApi, - "required": RequiredApi, - "unevaluatedItems": UnevaluatedItemsApi, - "unevaluatedProperties": UnevaluatedPropertiesApi, - "uniqueItems": UniqueItemsApi, - "response.content.contentType.schema": ResponseContentContentTypeSchemaApi, - } -) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py deleted file mode 100644 index f3c38f014ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py deleted file mode 100644 index 1804a25f839..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/additional_properties_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes - - -class AdditionalPropertiesApi( - PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, - PostNonAsciiPatternWithAdditionalpropertiesRequestBody, - PostAdditionalpropertiesWithSchemaRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, - PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py deleted file mode 100644 index 91cabe521e6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/all_of_api.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes - - -class AllOfApi( - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostAllofSimpleTypesRequestBody, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py deleted file mode 100644 index f2a1c8d0fe3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/any_of_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody - - -class AnyOfApi( - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostAnyofWithBaseSchemaRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py deleted file mode 100644 index 4f083f946ad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/const_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody - - -class ConstApi( - PostConstNulCharactersInStringsResponseBodyForContentTypes, - PostConstNulCharactersInStringsRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py deleted file mode 100644 index f81459a111e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/contains_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody -from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody -from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes - - -class ContainsApi( - PostContainsWithNullInstanceElementsRequestBody, - PostContainsWithNullInstanceElementsResponseBodyForContentTypes, - PostItemsContainsRequestBody, - PostContainsKeywordValidationRequestBody, - PostContainsKeywordValidationResponseBodyForContentTypes, - PostItemsContainsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py deleted file mode 100644 index 3d0ba110b43..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/content_type_json_api.py +++ /dev/null @@ -1,591 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody -from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody -from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody -from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody -from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody -from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody -from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes -from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody -from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody -from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes -from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody -from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody -from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody -from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody -from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody -from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody -from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody -from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody -from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody -from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody -from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes -from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody - - -class ContentTypeJsonApi( - PostIriReferenceFormatRequestBody, - PostUnevaluateditemsWithNullInstanceElementsRequestBody, - PostMinlengthValidationResponseBodyForContentTypes, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, - PostAdditionalItemsAreAllowedByDefaultRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostOneofWithRequiredRequestBody, - PostPrefixitemsWithNullInstanceElementsRequestBody, - PostUnevaluateditemsAsSchemaRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostIdnHostnameFormatRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostIriReferenceFormatResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, - PostDurationFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostIdnHostnameFormatResponseBodyForContentTypes, - PostExclusiveminimumValidationRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostAllofRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostContainsKeywordValidationResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, - PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, - PostUuidFormatRequestBody, - PostTimeFormatResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredRequestBody, - PostValidateAgainstCorrectBranchThenVsElseRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostUnevaluatedpropertiesSchemaRequestBody, - PostUnevaluateditemsWithItemsResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostItemsWithNullInstanceElementsResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostRegexFormatRequestBody, - PostNulCharactersInStringsRequestBody, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostItemsContainsResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostRelativeJsonPointerFormatRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, - PostNotRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostSingleDependencyRequestBody, - PostDateTimeFormatRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostContainsWithNullInstanceElementsResponseBodyForContentTypes, - PostTypeArrayOrObjectResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostExclusivemaximumValidationResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyRequestBody, - PostMincontainsWithoutContainsIsIgnoredRequestBody, - PostByNumberRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostIgnoreThenWithoutIfRequestBody, - PostAnyofComplexTypesRequestBody, - PostPropertynamesValidationRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPropertiesWithNullValuedInstancePropertiesRequestBody, - PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, - PostSmallMultipleOfLargeIntegerRequestBody, - PostAllofSimpleTypesRequestBody, - PostTypeArrayObjectOrNullRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, - PostUnevaluateditemsWithItemsRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, - PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, - PostTypeArrayObjectOrNullResponseBodyForContentTypes, - PostASchemaGivenForPrefixitemsRequestBody, - PostByIntRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, - PostUniqueitemsWithAnArrayOfItemsRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostPropertynamesValidationResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, - PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostIgnoreIfWithoutThenOrElseRequestBody, - PostTypeAsArrayWithOneItemResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostNotMultipleTypesResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostByIntResponseBodyForContentTypes, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, - PostIgnoreElseWithoutIfResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostTypeArrayOrObjectRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostIfAndThenWithoutElseRequestBody, - PostIriFormatRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostSingleDependencyResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostItemsWithNullInstanceElementsRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostExclusiveminimumValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostMultipleDependentsRequiredRequestBody, - PostIfAndElseWithoutThenRequestBody, - PostNotResponseBodyForContentTypes, - PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, - PostIdnEmailFormatResponseBodyForContentTypes, - PostIriFormatResponseBodyForContentTypes, - PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostMultipleDependentsRequiredResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostTimeFormatRequestBody, - PostMinimumValidationRequestBody, - PostByNumberResponseBodyForContentTypes, - PostDateFormatResponseBodyForContentTypes, - PostNonAsciiPatternWithAdditionalpropertiesRequestBody, - PostPatternValidationRequestBody, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostIgnoreElseWithoutIfRequestBody, - PostEmptyDependentsRequestBody, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, - PostMinitemsValidationRequestBody, - PostIgnoreThenWithoutIfResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostNotMultipleTypesRequestBody, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostItemsContainsRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, - PostAdditionalpropertiesWithSchemaRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, - PostContainsWithNullInstanceElementsRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostExclusivemaximumValidationRequestBody, - PostContainsKeywordValidationRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, - PostIfAndThenWithoutElseResponseBodyForContentTypes, - PostUuidFormatResponseBodyForContentTypes, - PostDateFormatRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostRelativeJsonPointerFormatResponseBodyForContentTypes, - PostTypeAsArrayWithOneItemRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostNonInterferenceAcrossCombinedSchemasRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, - PostEmptyDependentsResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, - PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostFloatDivisionInfRequestBody, - PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, - PostFloatDivisionInfResponseBodyForContentTypes, - PostConstNulCharactersInStringsResponseBodyForContentTypes, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, - PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostConstNulCharactersInStringsRequestBody, - PostDurationFormatResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostIfAndElseWithoutThenResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostIdnEmailFormatRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostBySmallNumberRequestBody, - PostRegexFormatResponseBodyForContentTypes, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py deleted file mode 100644 index e7ebde52314..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_required_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody -from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody -from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody - - -class DependentRequiredApi( - PostMultipleDependentsRequiredRequestBody, - PostSingleDependencyRequestBody, - PostMultipleDependentsRequiredResponseBodyForContentTypes, - PostSingleDependencyResponseBodyForContentTypes, - PostEmptyDependentsResponseBodyForContentTypes, - PostEmptyDependentsRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py deleted file mode 100644 index 458c97d7876..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/dependent_schemas_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody -from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody -from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes - - -class DependentSchemasApi( - PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, - PostDependentSchemasSingleDependencyResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyRequestBody, - PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, - PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py deleted file mode 100644 index c400dbc4bf5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/enum_api.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes - - -class EnumApi( - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostEnumsInPropertiesRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostNulCharactersInStringsRequestBody, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py deleted file mode 100644 index 7581c95f124..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_maximum_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody - - -class ExclusiveMaximumApi( - PostExclusivemaximumValidationResponseBodyForContentTypes, - PostExclusivemaximumValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py deleted file mode 100644 index e663d09c9c8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/exclusive_minimum_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody -from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes - - -class ExclusiveMinimumApi( - PostExclusiveminimumValidationRequestBody, - PostExclusiveminimumValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py deleted file mode 100644 index b29833cffa6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/format_api.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody -from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody -from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody -from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody -from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody - - -class FormatApi( - PostIriReferenceFormatRequestBody, - PostIpv4FormatRequestBody, - PostUuidFormatRequestBody, - PostTimeFormatResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostIdnEmailFormatResponseBodyForContentTypes, - PostIriFormatResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostUriFormatResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostUuidFormatResponseBodyForContentTypes, - PostDateFormatRequestBody, - PostRegexFormatRequestBody, - PostTimeFormatRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostRelativeJsonPointerFormatResponseBodyForContentTypes, - PostDateFormatResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostDurationFormatResponseBodyForContentTypes, - PostIriFormatRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostIdnHostnameFormatRequestBody, - PostRelativeJsonPointerFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostIriReferenceFormatResponseBodyForContentTypes, - PostIdnEmailFormatRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostDurationFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostIdnHostnameFormatResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostUriTemplateFormatResponseBodyForContentTypes, - PostRegexFormatResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py deleted file mode 100644 index b801897c261..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/if_then_else_api.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody -from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody -from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody -from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody -from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody -from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody -from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody -from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody -from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes - - -class IfThenElseApi( - PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, - PostIfAndElseWithoutThenRequestBody, - PostIfAndThenWithoutElseRequestBody, - PostNonInterferenceAcrossCombinedSchemasRequestBody, - PostValidateAgainstCorrectBranchThenVsElseRequestBody, - PostIfAndElseWithoutThenResponseBodyForContentTypes, - PostIgnoreElseWithoutIfRequestBody, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, - PostIgnoreIfWithoutThenOrElseRequestBody, - PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, - PostIgnoreThenWithoutIfResponseBodyForContentTypes, - PostIgnoreElseWithoutIfResponseBodyForContentTypes, - PostIfAndThenWithoutElseResponseBodyForContentTypes, - PostIgnoreThenWithoutIfRequestBody, - PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py deleted file mode 100644 index 95d79219e5c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/items_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody -from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes - - -class ItemsApi( - PostItemsWithNullInstanceElementsResponseBodyForContentTypes, - PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, - PostItemsWithNullInstanceElementsRequestBody, - PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, - PostNestedItemsResponseBodyForContentTypes, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, - PostNestedItemsRequestBody, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py deleted file mode 100644 index 8660d5232a0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_contains_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody - - -class MaxContainsApi( - PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py deleted file mode 100644 index 5c14e1bcb55..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_items_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes - - -class MaxItemsApi( - PostMaxitemsValidationRequestBody, - PostMaxitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py deleted file mode 100644 index 33bba8bd6ad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_length_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes - - -class MaxLengthApi( - PostMaxlengthValidationRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py deleted file mode 100644 index e43a4c5ff0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/max_properties_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody - - -class MaxPropertiesApi( - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py deleted file mode 100644 index 189f4853874..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/maximum_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes - - -class MaximumApi( - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py deleted file mode 100644 index 87f50957cc8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_contains_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody - - -class MinContainsApi( - PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostMincontainsWithoutContainsIsIgnoredRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py deleted file mode 100644 index f376dfad5dc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_items_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes - - -class MinItemsApi( - PostMinitemsValidationRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py deleted file mode 100644 index 9b08098ac59..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_length_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody - - -class MinLengthApi( - PostMinlengthValidationResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py deleted file mode 100644 index 4c23c49712c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/min_properties_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes - - -class MinPropertiesApi( - PostMinpropertiesValidationRequestBody, - PostMinpropertiesValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py deleted file mode 100644 index 8e892722855..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/minimum_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody - - -class MinimumApi( - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostMinimumValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py deleted file mode 100644 index 94f8db92c01..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/multiple_of_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class MultipleOfApi( - PostByNumberResponseBodyForContentTypes, - PostByIntRequestBody, - PostFloatDivisionInfRequestBody, - PostBySmallNumberResponseBodyForContentTypes, - PostFloatDivisionInfResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, - PostByNumberRequestBody, - PostSmallMultipleOfLargeIntegerRequestBody, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py deleted file mode 100644 index fbc8cb2a4aa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/not_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes - - -class NotApi( - PostNotMultipleTypesRequestBody, - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNotMultipleTypesResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py deleted file mode 100644 index ecf6cd1ffd6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/one_of_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes - - -class OneOfApi( - PostOneofWithBaseSchemaRequestBody, - PostOneofRequestBody, - PostOneofResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py deleted file mode 100644 index cc8b2895925..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/operation_request_body_api.py +++ /dev/null @@ -1,305 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody -from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody -from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody -from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody -from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody -from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody -from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody -from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody -from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody -from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody -from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody -from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody -from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody -from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody -from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody -from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody -from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody -from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody -from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody -from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody - - -class OperationRequestBodyApi( - PostIriReferenceFormatRequestBody, - PostUnevaluateditemsWithNullInstanceElementsRequestBody, - PostMinpropertiesValidationRequestBody, - PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, - PostAdditionalItemsAreAllowedByDefaultRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, - PostOneofWithRequiredRequestBody, - PostPrefixitemsWithNullInstanceElementsRequestBody, - PostUnevaluateditemsAsSchemaRequestBody, - PostMinlengthValidationRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostTypeArrayOrObjectRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostIfAndThenWithoutElseRequestBody, - PostIriFormatRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostSimpleEnumValidationRequestBody, - PostRequiredWithEscapedCharactersRequestBody, - PostIdnHostnameFormatRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostRequiredDefaultValidationRequestBody, - PostDurationFormatRequestBody, - PostItemsWithNullInstanceElementsRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostExclusiveminimumValidationRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostAllofRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostMultipleDependentsRequiredRequestBody, - PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, - PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, - PostIfAndElseWithoutThenRequestBody, - PostUuidFormatRequestBody, - PostMaxcontainsWithoutContainsIsIgnoredRequestBody, - PostValidateAgainstCorrectBranchThenVsElseRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostUnevaluatedpropertiesSchemaRequestBody, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostMaxlengthValidationRequestBody, - PostRegexFormatRequestBody, - PostNulCharactersInStringsRequestBody, - PostTimeFormatRequestBody, - PostMinimumValidationRequestBody, - PostNonAsciiPatternWithAdditionalpropertiesRequestBody, - PostUriFormatRequestBody, - PostOneofComplexTypesRequestBody, - PostPatternValidationRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostJsonPointerFormatRequestBody, - PostIgnoreElseWithoutIfRequestBody, - PostEmptyDependentsRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostRelativeJsonPointerFormatRequestBody, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, - PostMinitemsValidationRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostNotMultipleTypesRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, - PostNotRequestBody, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, - PostSingleDependencyRequestBody, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, - PostItemsContainsRequestBody, - PostDateTimeFormatRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, - PostMinimumValidationWithSignedIntegerRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, - PostAdditionalpropertiesWithSchemaRequestBody, - PostIpv4FormatRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostContainsWithNullInstanceElementsRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostExclusivemaximumValidationRequestBody, - PostContainsKeywordValidationRequestBody, - PostDependentSchemasSingleDependencyRequestBody, - PostMincontainsWithoutContainsIsIgnoredRequestBody, - PostByNumberRequestBody, - PostDateFormatRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostIgnoreThenWithoutIfRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostAnyofComplexTypesRequestBody, - PostPropertynamesValidationRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPropertiesWithNullValuedInstancePropertiesRequestBody, - PostTypeAsArrayWithOneItemRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostNonInterferenceAcrossCombinedSchemasRequestBody, - PostIpv6FormatRequestBody, - PostSmallMultipleOfLargeIntegerRequestBody, - PostAllofSimpleTypesRequestBody, - PostTypeArrayObjectOrNullRequestBody, - PostUnevaluateditemsWithItemsRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMaxpropertiesValidationRequestBody, - PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostASchemaGivenForPrefixitemsRequestBody, - PostByIntRequestBody, - PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, - PostFloatDivisionInfRequestBody, - PostUniqueitemsWithAnArrayOfItemsRequestBody, - PostUriTemplateFormatRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostConstNulCharactersInStringsRequestBody, - PostMaximumValidationRequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostIdnEmailFormatRequestBody, - PostIgnoreIfWithoutThenOrElseRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostBySmallNumberRequestBody, - PostEmailFormatRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py deleted file mode 100644 index 859f8228685..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/path_post_api.py +++ /dev/null @@ -1,591 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_iri_reference_format_request_body.post.operation import PostIriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minproperties_validation_request_body.post.operation import PostMinpropertiesValidationRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody -from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.post.operation import PostEnumWithFalseDoesNotMatch0RequestBody -from openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.post.operation import PostEnumWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_oneof_with_required_request_body.post.operation import PostOneofWithRequiredRequestBody -from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minlength_validation_request_body.post.operation import PostMinlengthValidationRequestBody -from openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post.operation import PostAdditionalpropertiesCanExistByItselfRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post.operation import PostAllofWithTheLastEmptySchemaRequestBody -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_idn_hostname_format_request_body.post.operation import PostIdnHostnameFormatRequestBody -from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_duration_format_request_body.post.operation import PostDurationFormatRequestBody -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.post.operation import PostExclusiveminimumValidationRequestBody -from openapi_client.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from openapi_client.paths.request_body_post_allof_request_body.post.operation import PostAllofRequestBody -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody -from openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseRequestBody -from openapi_client.paths.request_body_post_uuid_format_request_body.post.operation import PostUuidFormatRequestBody -from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.post.operation import PostMaxcontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.post.operation import PostValidateAgainstCorrectBranchThenVsElseRequestBody -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post.operation import PostMaximumValidationWithUnsignedIntegerRequestBody -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxitems_validation_request_body.post.operation import PostMaxitemsValidationRequestBody -from openapi_client.paths.request_body_post_oneof_request_body.post.operation import PostOneofRequestBody -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_regex_format_request_body.post.operation import PostRegexFormatRequestBody -from openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.post.operation import PostNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_format_request_body.post.operation import PostUriFormatRequestBody -from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_oneof_complex_types_request_body.post.operation import PostOneofComplexTypesRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post.operation import PostAllofCombinedWithAnyofOneofRequestBody -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post.operation import PostNestedAnyofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.post.operation import PostRelativeJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody -from openapi_client.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.request_body_post_single_dependency_request_body.post.operation import PostSingleDependencyRequestBody -from openapi_client.paths.request_body_post_date_time_format_request_body.post.operation import PostDateTimeFormatRequestBody -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post.operation import PostMinimumValidationWithSignedIntegerRequestBody -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv4_format_request_body.post.operation import PostIpv4FormatRequestBody -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.post.operation import PostDependentSchemasSingleDependencyRequestBody -from openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.post.operation import PostMincontainsWithoutContainsIsIgnoredRequestBody -from openapi_client.paths.request_body_post_by_number_request_body.post.operation import PostByNumberRequestBody -from openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post.operation import PostNestedOneofToCheckValidationSemanticsRequestBody -from openapi_client.paths.request_body_post_ignore_then_without_if_request_body.post.operation import PostIgnoreThenWithoutIfRequestBody -from openapi_client.paths.request_body_post_anyof_complex_types_request_body.post.operation import PostAnyofComplexTypesRequestBody -from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes -from openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.post.operation import PostSmallMultipleOfLargeIntegerRequestBody -from openapi_client.paths.request_body_post_allof_simple_types_request_body.post.operation import PostAllofSimpleTypesRequestBody -from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody -from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody -from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody -from openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.post.operation import PostOneofWithEmptySchemaRequestBody -from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post.operation import PostAllofWithTheFirstEmptySchemaRequestBody -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes -from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody -from openapi_client.paths.request_body_post_by_int_request_body.post.operation import PostByIntRequestBody -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.post.operation import PostAnyofWithBaseSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.post.operation import PostEnumWithTrueDoesNotMatch1RequestBody -from openapi_client.paths.request_body_post_anyof_request_body.post.operation import PostAnyofRequestBody -from openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.post.operation import PostIgnoreIfWithoutThenOrElseRequestBody -from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_email_format_request_body.post.operation import PostEmailFormatRequestBody -from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_hostname_format_request_body.post.operation import PostHostnameFormatRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody -from openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody -from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.post.operation import PostEnumWith0DoesNotMatchFalseRequestBody -from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_nested_items_request_body.post.operation import PostNestedItemsRequestBody -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_if_and_then_without_else_request_body.post.operation import PostIfAndThenWithoutElseRequestBody -from openapi_client.paths.request_body_post_iri_format_request_body.post.operation import PostIriFormatRequestBody -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_simple_enum_validation_request_body.post.operation import PostSimpleEnumValidationRequestBody -from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_uri_reference_format_request_body.post.operation import PostUriReferenceFormatRequestBody -from openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.post.operation import PostEnumWith1DoesNotMatchTrueRequestBody -from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.post.operation import PostItemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_multiple_dependents_required_request_body.post.operation import PostMultipleDependentsRequiredRequestBody -from openapi_client.paths.request_body_post_if_and_else_without_then_request_body.post.operation import PostIfAndElseWithoutThenRequestBody -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxlength_validation_request_body.post.operation import PostMaxlengthValidationRequestBody -from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.request_body_post_time_format_request_body.post.operation import PostTimeFormatRequestBody -from openapi_client.paths.request_body_post_minimum_validation_request_body.post.operation import PostMinimumValidationRequestBody -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.post.operation import PostNonAsciiPatternWithAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_json_pointer_format_request_body.post.operation import PostJsonPointerFormatRequestBody -from openapi_client.paths.request_body_post_ignore_else_without_if_request_body.post.operation import PostIgnoreElseWithoutIfRequestBody -from openapi_client.paths.request_body_post_empty_dependents_request_body.post.operation import PostEmptyDependentsRequestBody -from openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody -from openapi_client.paths.request_body_post_minitems_validation_request_body.post.operation import PostMinitemsValidationRequestBody -from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody -from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody -from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_items_contains_request_body.post.operation import PostItemsContainsRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.post.operation import PostOneofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody -from openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.post.operation import PostAdditionalpropertiesWithSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.post.operation import PostContainsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.post.operation import PostAllofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.post.operation import PostExclusivemaximumValidationRequestBody -from openapi_client.paths.request_body_post_contains_keyword_validation_request_body.post.operation import PostContainsKeywordValidationRequestBody -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_date_format_request_body.post.operation import PostDateFormatRequestBody -from openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post.operation import PostNestedAllofToCheckValidationSemanticsRequestBody -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody -from openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.post.operation import PostAllofWithTwoEmptySchemasRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.post.operation import PostNonInterferenceAcrossCombinedSchemasRequestBody -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_ipv6_format_request_body.post.operation import PostIpv6FormatRequestBody -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maxproperties_validation_request_body.post.operation import PostMaxpropertiesValidationRequestBody -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes -from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.post.operation import PostAnyofWithOneEmptySchemaRequestBody -from openapi_client.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.request_body_post_float_division_inf_request_body.post.operation import PostFloatDivisionInfRequestBody -from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uri_template_format_request_body.post.operation import PostUriTemplateFormatRequestBody -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post.operation import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.post.operation import PostConstNulCharactersInStringsRequestBody -from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes -from openapi_client.paths.request_body_post_maximum_validation_request_body.post.operation import PostMaximumValidationRequestBody -from openapi_client.paths.request_body_post_idn_email_format_request_body.post.operation import PostIdnEmailFormatRequestBody -from openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post.operation import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from openapi_client.paths.request_body_post_by_small_number_request_body.post.operation import PostBySmallNumberRequestBody -from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes -from openapi_client.paths.request_body_post_allof_with_base_schema_request_body.post.operation import PostAllofWithBaseSchemaRequestBody -from openapi_client.paths.request_body_post_enums_in_properties_request_body.post.operation import PostEnumsInPropertiesRequestBody - - -class PathPostApi( - PostIriReferenceFormatRequestBody, - PostUnevaluateditemsWithNullInstanceElementsRequestBody, - PostMinlengthValidationResponseBodyForContentTypes, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, - PostAdditionalItemsAreAllowedByDefaultRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostDependentSchemasDependenciesWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostOneofWithRequiredRequestBody, - PostPrefixitemsWithNullInstanceElementsRequestBody, - PostUnevaluateditemsAsSchemaRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostIdnHostnameFormatRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostIriReferenceFormatResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, - PostDurationFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostIdnHostnameFormatResponseBodyForContentTypes, - PostExclusiveminimumValidationRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostAllofRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostContainsKeywordValidationResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, - PostItemsDoesNotLookInApplicatorsValidCaseRequestBody, - PostUuidFormatRequestBody, - PostTimeFormatResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredRequestBody, - PostValidateAgainstCorrectBranchThenVsElseRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostUnevaluatedpropertiesSchemaRequestBody, - PostUnevaluateditemsWithItemsResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostOneofRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostItemsWithNullInstanceElementsResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostRegexFormatRequestBody, - PostNulCharactersInStringsRequestBody, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostItemsContainsResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostRelativeJsonPointerFormatRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, - PostNotRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostSingleDependencyRequestBody, - PostDateTimeFormatRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostContainsWithNullInstanceElementsResponseBodyForContentTypes, - PostTypeArrayOrObjectResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostExclusivemaximumValidationResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyRequestBody, - PostMincontainsWithoutContainsIsIgnoredRequestBody, - PostByNumberRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostIgnoreThenWithoutIfRequestBody, - PostAnyofComplexTypesRequestBody, - PostPropertynamesValidationRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPropertiesWithNullValuedInstancePropertiesRequestBody, - PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, - PostSmallMultipleOfLargeIntegerRequestBody, - PostAllofSimpleTypesRequestBody, - PostTypeArrayObjectOrNullRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, - PostUnevaluateditemsWithItemsRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, - PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, - PostTypeArrayObjectOrNullResponseBodyForContentTypes, - PostASchemaGivenForPrefixitemsRequestBody, - PostByIntRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody, - PostUniqueitemsWithAnArrayOfItemsRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostPropertynamesValidationResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, - PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostAnyofRequestBody, - PostIgnoreIfWithoutThenOrElseRequestBody, - PostTypeAsArrayWithOneItemResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostNotMultipleTypesResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostByIntResponseBodyForContentTypes, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostObjectPropertiesValidationRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody, - PostIgnoreElseWithoutIfResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostTypeArrayOrObjectRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNestedItemsRequestBody, - PostRequiredValidationRequestBody, - PostIfAndThenWithoutElseRequestBody, - PostIriFormatRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostSingleDependencyResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostUriReferenceFormatRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostItemsWithNullInstanceElementsRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostExclusiveminimumValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostMultipleDependentsRequiredRequestBody, - PostIfAndElseWithoutThenRequestBody, - PostNotResponseBodyForContentTypes, - PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, - PostIdnEmailFormatResponseBodyForContentTypes, - PostIriFormatResponseBodyForContentTypes, - PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostMultipleDependentsRequiredResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostTimeFormatRequestBody, - PostMinimumValidationRequestBody, - PostByNumberResponseBodyForContentTypes, - PostDateFormatResponseBodyForContentTypes, - PostNonAsciiPatternWithAdditionalpropertiesRequestBody, - PostPatternValidationRequestBody, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostIgnoreElseWithoutIfRequestBody, - PostEmptyDependentsRequestBody, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody, - PostMinitemsValidationRequestBody, - PostIgnoreThenWithoutIfResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostNotMultipleTypesRequestBody, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostItemsContainsRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, - PostAdditionalpropertiesWithSchemaRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, - PostContainsWithNullInstanceElementsRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostExclusivemaximumValidationRequestBody, - PostContainsKeywordValidationRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, - PostIfAndThenWithoutElseResponseBodyForContentTypes, - PostUuidFormatResponseBodyForContentTypes, - PostDateFormatRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostRelativeJsonPointerFormatResponseBodyForContentTypes, - PostTypeAsArrayWithOneItemRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostNonInterferenceAcrossCombinedSchemasRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, - PostEmptyDependentsResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostForbiddenPropertyRequestBody, - PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, - PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostFloatDivisionInfRequestBody, - PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, - PostFloatDivisionInfResponseBodyForContentTypes, - PostConstNulCharactersInStringsResponseBodyForContentTypes, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, - PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, - PostUniqueitemsValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostConstNulCharactersInStringsRequestBody, - PostDurationFormatResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostIfAndElseWithoutThenResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostIdnEmailFormatRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostBySmallNumberRequestBody, - PostRegexFormatResponseBodyForContentTypes, - PostAllofWithBaseSchemaRequestBody, - PostEnumsInPropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py deleted file mode 100644 index 5d2c7fa831b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.post.operation import PostPatternIsNotAnchoredRequestBody -from openapi_client.paths.request_body_post_pattern_validation_request_body.post.operation import PostPatternValidationRequestBody -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes - - -class PatternApi( - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py deleted file mode 100644 index 136106d5b2e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/pattern_properties_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes -from openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody -from openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody -from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody -from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes -from openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody - - -class PatternPropertiesApi( - PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody, - PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody, - PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody, - PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, - PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py deleted file mode 100644 index c2e051cb6a6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/prefix_items_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.post.operation import PostASchemaGivenForPrefixitemsRequestBody -from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.post.operation import PostPrefixitemsWithNullInstanceElementsRequestBody -from openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.post.operation import PostAdditionalItemsAreAllowedByDefaultRequestBody -from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes - - -class PrefixItemsApi( - PostASchemaGivenForPrefixitemsRequestBody, - PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, - PostPrefixitemsWithNullInstanceElementsRequestBody, - PostAdditionalItemsAreAllowedByDefaultRequestBody, - PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, - PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py deleted file mode 100644 index 462065c8597..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/properties_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.post.operation import PostPropertiesWithNullValuedInstancePropertiesRequestBody -from openapi_client.paths.request_body_post_object_properties_validation_request_body.post.operation import PostObjectPropertiesValidationRequestBody -from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes -from openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody -from openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody -from openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.post.operation import PostPropertiesWithEscapedCharactersRequestBody -from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes - - -class PropertiesApi( - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostPropertiesWithNullValuedInstancePropertiesRequestBody, - PostObjectPropertiesValidationRequestBody, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py deleted file mode 100644 index 0983e490ce8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/property_names_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes -from openapi_client.paths.request_body_post_propertynames_validation_request_body.post.operation import PostPropertynamesValidationRequestBody - - -class PropertyNamesApi( - PostPropertynamesValidationResponseBodyForContentTypes, - PostPropertynamesValidationRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py deleted file mode 100644 index 04d781fd602..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/ref_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post.operation import PostPropertyNamedRefThatIsNotAReferenceRequestBody - - -class RefApi( - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py deleted file mode 100644 index c33cb00c3c1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/required_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_required_default_validation_request_body.post.operation import PostRequiredDefaultValidationRequestBody -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_validation_request_body.post.operation import PostRequiredValidationRequestBody -from openapi_client.paths.request_body_post_required_with_empty_array_request_body.post.operation import PostRequiredWithEmptyArrayRequestBody -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.post.operation import PostRequiredWithEscapedCharactersRequestBody -from openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody - - -class RequiredApi( - PostRequiredDefaultValidationRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py deleted file mode 100644 index ab2da787a68..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/response_content_content_type_schema_api.py +++ /dev/null @@ -1,305 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.post.operation import PostMinlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.post.operation import PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.post.operation import PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.post.operation import PostIgnoreElseWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.post.operation import PostHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.post.operation import PostMinpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_response_body_for_content_types.post.operation import PostOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.post.operation import PostDateTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post.operation import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.post.operation import PostSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.post.operation import PostIriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post.operation import PostOneofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post.operation import PostPatternIsNotAnchoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.post.operation import PostMaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post.operation import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.post.operation import PostUriReferenceFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.post.operation import PostJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.post.operation import PostIpv6FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post.operation import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post.operation import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.post.operation import PostIdnHostnameFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post.operation import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.post.operation import PostContainsKeywordValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.post.operation import PostExclusiveminimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post.operation import PostSimpleEnumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from openapi_client.paths.response_body_post_time_format_response_body_for_content_types.post.operation import PostTimeFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post.operation import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.post.operation import PostIdnEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post.operation import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.post.operation import PostIriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.post.operation import PostOneofWithRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.post.operation import PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.post.operation import PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.post.operation import PostItemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.post.operation import PostBySmallNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.post.operation import PostMultipleDependentsRequiredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post.operation import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post.operation import PostNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.post.operation import PostRequiredValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post.operation import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_response_body_for_content_types.post.operation import PostAllofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.post.operation import PostEnumsInPropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.post.operation import PostItemsContainsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_number_response_body_for_content_types.post.operation import PostByNumberResponseBodyForContentTypes -from openapi_client.paths.response_body_post_date_format_response_body_for_content_types.post.operation import PostDateFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.post.operation import PostDependentSchemasSingleDependencyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post.operation import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.post.operation import PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post.operation import PostAllofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.post.operation import PostRequiredDefaultValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post.operation import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.post.operation import PostIpv4FormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post.operation import PostAnyofComplexTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.post.operation import PostIgnoreThenWithoutIfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.post.operation import PostMinitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.post.operation import PostUriTemplateFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post.operation import PostOneofWithBaseSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post.operation import PostMaxpropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.post.operation import PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post.operation import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.post.operation import PostContainsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.post.operation import PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post.operation import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post.operation import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_anyof_response_body_for_content_types.post.operation import PostAnyofResponseBodyForContentTypes -from openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.post.operation import PostExclusivemaximumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.post.operation import PostUriFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.post.operation import PostIfAndThenWithoutElseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.post.operation import PostUuidFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.post.operation import PostRelativeJsonPointerFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.post.operation import PostObjectPropertiesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.post.operation import PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.post.operation import PostMaxlengthValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.post.operation import PostPatternValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.post.operation import PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.post.operation import PostMaxitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.post.operation import PostMinimumValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.post.operation import PostNestedItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_email_format_response_body_for_content_types.post.operation import PostEmailFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post.operation import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.post.operation import PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.post.operation import PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes -from openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.post.operation import PostASchemaGivenForPrefixitemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.post.operation import PostEmptyDependentsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post.operation import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.post.operation import PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.post.operation import PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.post.operation import PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.post.operation import PostFloatDivisionInfResponseBodyForContentTypes -from openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.post.operation import PostConstNulCharactersInStringsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.post.operation import PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.post.operation import PostAllofSimpleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post.operation import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.post.operation import PostPropertynamesValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.post.operation import PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.post.operation import PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes -from openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post.operation import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post.operation import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.post.operation import PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.post.operation import PostDurationFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post.operation import PostOneofWithEmptySchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.post.operation import PostIfAndElseWithoutThenResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post.operation import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.post.operation import PostRegexFormatResponseBodyForContentTypes -from openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.post.operation import PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_by_int_response_body_for_content_types.post.operation import PostByIntResponseBodyForContentTypes - - -class ResponseContentContentTypeSchemaApi( - PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostMinlengthValidationResponseBodyForContentTypes, - PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes, - PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostIgnoreElseWithoutIfResponseBodyForContentTypes, - PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostHostnameFormatResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes, - PostDateTimeFormatResponseBodyForContentTypes, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostSingleDependencyResponseBodyForContentTypes, - PostIriReferenceFormatResponseBodyForContentTypes, - PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostMaximumValidationResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostUriReferenceFormatResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostIdnHostnameFormatResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostContainsKeywordValidationResponseBodyForContentTypes, - PostExclusiveminimumValidationResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostNotResponseBodyForContentTypes, - PostTimeFormatResponseBodyForContentTypes, - PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostIdnEmailFormatResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostIriFormatResponseBodyForContentTypes, - PostOneofWithRequiredResponseBodyForContentTypes, - PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes, - PostUnevaluateditemsWithItemsResponseBodyForContentTypes, - PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostItemsWithNullInstanceElementsResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostMultipleDependentsRequiredResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostAllofResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostItemsContainsResponseBodyForContentTypes, - PostByNumberResponseBodyForContentTypes, - PostDateFormatResponseBodyForContentTypes, - PostDependentSchemasSingleDependencyResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostIgnoreThenWithoutIfResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, - PostMinitemsValidationResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostContainsWithNullInstanceElementsResponseBodyForContentTypes, - PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes, - PostTypeArrayOrObjectResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostExclusivemaximumValidationResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, - PostIfAndThenWithoutElseResponseBodyForContentTypes, - PostUuidFormatResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostRelativeJsonPointerFormatResponseBodyForContentTypes, - PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes, - PostMaxlengthValidationResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostMinimumValidationResponseBodyForContentTypes, - PostNestedItemsResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes, - PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes, - PostASchemaGivenForPrefixitemsResponseBodyForContentTypes, - PostEmptyDependentsResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes, - PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes, - PostTypeArrayObjectOrNullResponseBodyForContentTypes, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes, - PostFloatDivisionInfResponseBodyForContentTypes, - PostConstNulCharactersInStringsResponseBodyForContentTypes, - PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostPropertynamesValidationResponseBodyForContentTypes, - PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes, - PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, - PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes, - PostDurationFormatResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostIfAndElseWithoutThenResponseBodyForContentTypes, - PostTypeAsArrayWithOneItemResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostNotMultipleTypesResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostRegexFormatResponseBodyForContentTypes, - PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes, - PostByIntResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py deleted file mode 100644 index cb97e8de51f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/type_api.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.post.operation import PostTypeAsArrayWithOneItemRequestBody -from openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.post.operation import PostArrayTypeMatchesArraysRequestBody -from openapi_client.paths.request_body_post_string_type_matches_strings_request_body.post.operation import PostStringTypeMatchesStringsRequestBody -from openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post.operation import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.post.operation import PostTypeArrayOrObjectResponseBodyForContentTypes -from openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post.operation import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from openapi_client.paths.request_body_post_type_array_object_or_null_request_body.post.operation import PostTypeArrayObjectOrNullRequestBody -from openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes -from openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post.operation import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.post.operation import PostTypeArrayObjectOrNullResponseBodyForContentTypes -from openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.post.operation import PostTypeAsArrayWithOneItemResponseBodyForContentTypes -from openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post.operation import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post.operation import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.post.operation import PostBooleanTypeMatchesBooleansRequestBody -from openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.post.operation import PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody -from openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.post.operation import PostNumberTypeMatchesNumbersRequestBody -from openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post.operation import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.post.operation import PostIntegerTypeMatchesIntegersRequestBody -from openapi_client.paths.request_body_post_object_type_matches_objects_request_body.post.operation import PostObjectTypeMatchesObjectsRequestBody -from openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post.operation import PostStringTypeMatchesStringsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_type_array_or_object_request_body.post.operation import PostTypeArrayOrObjectRequestBody -from openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post.operation import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes - - -class TypeApi( - PostTypeAsArrayWithOneItemRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostTypeArrayOrObjectResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostTypeArrayObjectOrNullRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostTypeArrayObjectOrNullResponseBodyForContentTypes, - PostTypeAsArrayWithOneItemResponseBodyForContentTypes, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostTypeArrayOrObjectRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py deleted file mode 100644 index 09e88266137..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_items_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.post.operation import PostUnevaluateditemsWithNullInstanceElementsRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.post.operation import PostUnevaluateditemsWithItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.post.operation import PostUnevaluateditemsWithItemsRequestBody -from openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.post.operation import PostUnevaluateditemsAsSchemaRequestBody -from openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.post.operation import PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.post.operation import PostUnevaluateditemsAsSchemaResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.post.operation import PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody - - -class UnevaluatedItemsApi( - PostUnevaluateditemsWithNullInstanceElementsRequestBody, - PostUnevaluateditemsWithItemsResponseBodyForContentTypes, - PostUnevaluateditemsWithItemsRequestBody, - PostUnevaluateditemsAsSchemaRequestBody, - PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes, - PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes, - PostUnevaluateditemsAsSchemaResponseBodyForContentTypes, - PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py deleted file mode 100644 index 923d95ad6f0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unevaluated_properties_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody -from openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes -from openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes -from openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.post.operation import PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.post.operation import PostUnevaluatedpropertiesSchemaRequestBody -from openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.post.operation import PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody - - -class UnevaluatedPropertiesApi( - PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody, - PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes, - PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes, - PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody, - PostUnevaluatedpropertiesSchemaRequestBody, - PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py deleted file mode 100644 index cb37ee072c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/apis/tags/unique_items_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.post.operation import PostUniqueitemsFalseValidationRequestBody -from openapi_client.paths.request_body_post_uniqueitems_validation_request_body.post.operation import PostUniqueitemsValidationRequestBody -from openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.post.operation import PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes -from openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.post.operation import PostUniqueitemsWithAnArrayOfItemsRequestBody -from openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post.operation import PostUniqueitemsValidationResponseBodyForContentTypes -from openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post.operation import PostUniqueitemsFalseValidationResponseBodyForContentTypes - - -class UniqueItemsApi( - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsRequestBody, - PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes, - PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes, - PostUniqueitemsWithAnArrayOfItemsRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py deleted file mode 100644 index e3edab2dc1c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py deleted file mode 100644 index f25e38185d0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/a_schema_given_for_prefixitems.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ASchemaGivenForPrefixitemsTuple( - typing.Tuple[ - int, - str, - typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] - ] -): - - def __new__(cls, arg: typing.Union[ASchemaGivenForPrefixitemsTupleInput, ASchemaGivenForPrefixitemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ASchemaGivenForPrefixitems.validate(arg, configuration=configuration) -ASchemaGivenForPrefixitemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - int, - str, - typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] - ] -] -_0: typing_extensions.TypeAlias = schemas.IntSchema -_1: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class ASchemaGivenForPrefixitems( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ASchemaGivenForPrefixitemsTuple], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - prefix_items: typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - ] = ( - _0, - _1, - ) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ASchemaGivenForPrefixitemsTuple, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py deleted file mode 100644 index 60b52116b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additional_items_are_allowed_by_default.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class AdditionalItemsAreAllowedByDefaultTuple( - typing.Tuple[ - int, - typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] - ] -): - - def __new__(cls, arg: typing.Union[AdditionalItemsAreAllowedByDefaultTupleInput, AdditionalItemsAreAllowedByDefaultTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return AdditionalItemsAreAllowedByDefault.validate(arg, configuration=configuration) -AdditionalItemsAreAllowedByDefaultTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - int, - typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] - ] -] -_0: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class AdditionalItemsAreAllowedByDefault( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], AdditionalItemsAreAllowedByDefaultTuple], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - prefix_items: typing.Tuple[ - typing.Type[_0], - ] = ( - _0, - ) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: AdditionalItemsAreAllowedByDefaultTuple, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py deleted file mode 100644 index be297b23981..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class AdditionalpropertiesAreAllowedByDefaultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AdditionalpropertiesAreAllowedByDefaultDictInput, arg_) - return AdditionalpropertiesAreAllowedByDefault.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesAreAllowedByDefaultDictInput, - AdditionalpropertiesAreAllowedByDefaultDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesAreAllowedByDefaultDict: - return AdditionalpropertiesAreAllowedByDefault.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AdditionalpropertiesAreAllowedByDefaultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesAreAllowedByDefault( - schemas.AnyTypeSchema[AdditionalpropertiesAreAllowedByDefaultDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesAreAllowedByDefaultDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py deleted file mode 100644 index 5e73cc40d6a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema - - -class AdditionalpropertiesCanExistByItselfDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(AdditionalpropertiesCanExistByItselfDictInput, kwargs) - return AdditionalpropertiesCanExistByItself.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesCanExistByItselfDictInput, - AdditionalpropertiesCanExistByItselfDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesCanExistByItselfDict: - return AdditionalpropertiesCanExistByItself.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesCanExistByItselfDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesCanExistByItself( - schemas.Schema[AdditionalpropertiesCanExistByItselfDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesCanExistByItselfDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalpropertiesCanExistByItselfDictInput, - AdditionalpropertiesCanExistByItselfDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesCanExistByItselfDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py deleted file mode 100644 index 0af01b4cf54..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -class AdditionalpropertiesDoesNotLookInApplicatorsDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(AdditionalpropertiesDoesNotLookInApplicatorsDictInput, kwargs) - return AdditionalpropertiesDoesNotLookInApplicators.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesDoesNotLookInApplicatorsDictInput, - AdditionalpropertiesDoesNotLookInApplicatorsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesDoesNotLookInApplicatorsDict: - return AdditionalpropertiesDoesNotLookInApplicators.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesDoesNotLookInApplicatorsDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesDoesNotLookInApplicators( - schemas.AnyTypeSchema[AdditionalpropertiesDoesNotLookInApplicatorsDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesDoesNotLookInApplicatorsDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py deleted file mode 100644 index eb5d99a7271..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NoneSchema - - -class AdditionalpropertiesWithNullValuedInstancePropertiesDict(schemas.immutabledict[str, None]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: None, - ): - used_kwargs = typing.cast(AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, kwargs) - return AdditionalpropertiesWithNullValuedInstanceProperties.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, - AdditionalpropertiesWithNullValuedInstancePropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesWithNullValuedInstancePropertiesDict: - return AdditionalpropertiesWithNullValuedInstanceProperties.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[None, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - None, - val - ) -AdditionalpropertiesWithNullValuedInstancePropertiesDictInput = typing.Mapping[ - str, - None, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesWithNullValuedInstanceProperties( - schemas.Schema[AdditionalpropertiesWithNullValuedInstancePropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesWithNullValuedInstancePropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, - AdditionalpropertiesWithNullValuedInstancePropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesWithNullValuedInstancePropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py deleted file mode 100644 index 6a572c78edc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/additionalproperties_with_schema.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class AdditionalpropertiesWithSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AdditionalpropertiesWithSchemaDictInput, arg_) - return AdditionalpropertiesWithSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalpropertiesWithSchemaDictInput, - AdditionalpropertiesWithSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesWithSchemaDict: - return AdditionalpropertiesWithSchema.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -AdditionalpropertiesWithSchemaDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - bool, - ] -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalpropertiesWithSchema( - schemas.Schema[AdditionalpropertiesWithSchemaDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalpropertiesWithSchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalpropertiesWithSchemaDictInput, - AdditionalpropertiesWithSchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalpropertiesWithSchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py deleted file mode 100644 index 36eab71226e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AllOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Allof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py deleted file mode 100644 index 21eaaca3407..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _03( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - -AllOf = typing.Tuple[ - typing.Type[_03], -] - - -@dataclasses.dataclass(frozen=True) -class _02( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 3 - -AnyOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 5 - -OneOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class AllofCombinedWithAnyofOneof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py deleted file mode 100644 index 3ae0ad99045..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_simple_types.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_maximum: typing.Union[int, float] = 30 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 20 - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofSimpleTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py deleted file mode 100644 index 1c85ad3c380..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_base_schema.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Baz: typing_extensions.TypeAlias = schemas.NoneSchema -Properties3 = typing.TypedDict( - 'Properties3', - { - "baz": typing.Type[Baz], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "baz", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - baz: None, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "baz": baz, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def baz(self) -> None: - return typing.cast( - None, - self.__getitem__("baz") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "baz", - }) - properties: Properties3 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties3)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class AllofWithBaseSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(AllofWithBaseSchemaDictInput, arg_) - return AllofWithBaseSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AllofWithBaseSchemaDictInput, - AllofWithBaseSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AllofWithBaseSchemaDict: - return AllofWithBaseSchema.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AllofWithBaseSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AllofWithBaseSchema( - schemas.AnyTypeSchema[AllofWithBaseSchemaDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AllofWithBaseSchemaDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py deleted file mode 100644 index 4c1dfa6e55b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_one_empty_schema.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithOneEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py deleted file mode 100644 index 52fb972186b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_first_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -_1: typing_extensions.TypeAlias = schemas.NumberSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTheFirstEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py deleted file mode 100644 index 8019bc8d0c7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_the_last_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTheLastEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py deleted file mode 100644 index 63bb8100aab..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/allof_with_two_empty_schemas.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AllofWithTwoEmptySchemas( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py deleted file mode 100644 index 7757b765ca6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 2 - -AnyOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Anyof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py deleted file mode 100644 index c24467347b3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_complex_types.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofComplexTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py deleted file mode 100644 index 0c0c672429b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_base_schema.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 2 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_length: int = 4 - -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofWithBaseSchema( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py deleted file mode 100644 index 0589eabc829..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/anyof_with_one_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class AnyofWithOneEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py deleted file mode 100644 index 7ca16341a82..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/array_type_matches_arrays.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -ArrayTypeMatchesArrays: typing_extensions.TypeAlias = schemas.ListSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py deleted file mode 100644 index 2dfb02c2e0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/boolean_type_matches_booleans.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -BooleanTypeMatchesBooleans: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py deleted file mode 100644 index b140ae55565..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_int.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ByInt( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py deleted file mode 100644 index 5cbfe70a6d6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_number.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ByNumber( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 1.5 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py deleted file mode 100644 index e265cc881ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/by_small_number.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class BySmallNumber( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - multiple_of: typing.Union[int, float] = 0.00010 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py deleted file mode 100644 index a33c47c4b70..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/const_nul_characters_in_strings.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ConstNulCharactersInStringsConst: - - @schemas.classproperty - def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: - return ConstNulCharactersInStrings.validate("hello\x00there") - - -@dataclasses.dataclass(frozen=True) -class ConstNulCharactersInStrings( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "hello\x00there": "HELLO_NULL_THERE", - } - ) - const = ConstNulCharactersInStringsConst - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py deleted file mode 100644 index 1a611281267..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_keyword_validation.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Contains( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 5 - - - -@dataclasses.dataclass(frozen=True) -class ContainsKeywordValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py deleted file mode 100644 index eea9302179a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/contains_with_null_instance_elements.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Contains: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class ContainsWithNullInstanceElements( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py deleted file mode 100644 index 466cfa2bcd8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'date' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py deleted file mode 100644 index c6946ac5ae3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/date_time_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateTimeFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'date-time' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py deleted file mode 100644 index b2250a5907f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class FooTbar( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_properties: int = 4 - - - -class FoobarDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo\"bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - } - arg_.update(kwargs) - used_arg_ = typing.cast(FoobarDictInput, arg_) - return Foobar.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FoobarDictInput, - FoobarDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FoobarDict: - return Foobar.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FoobarDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Foobar( - schemas.AnyTypeSchema[FoobarDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo\"bar", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FoobarDict, - } - ) - -DependentSchemas = typing.TypedDict( - 'DependentSchemas', - { - "foo\tbar": typing.Type[FooTbar], - "foo'bar": typing.Type[Foobar], - } -) - - -@dataclasses.dataclass(frozen=True) -class DependentSchemasDependenciesWithEscapedCharacters( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py deleted file mode 100644 index 68492e9ed3f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py +++ /dev/null @@ -1,197 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "bar": typing.Type[Bar], - } -) - - -class FooDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - - def __new__( - cls, - *, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(FooDictInput, arg_) - return Foo2.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FooDictInput, - FooDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FooDict: - return Foo2.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -FooDictInput = typing.TypedDict( - 'FooDictInput', - { - "bar": typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class Foo2( - schemas.Schema[FooDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FooDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FooDictInput, - FooDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FooDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -DependentSchemas = typing.TypedDict( - 'DependentSchemas', - { - "foo": typing.Type[Foo2], - } -) -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class DependentSchemasDependentSubschemaIncompatibleWithRootDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(DependentSchemasDependentSubschemaIncompatibleWithRootDictInput, arg_) - return DependentSchemasDependentSubschemaIncompatibleWithRoot.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - DependentSchemasDependentSubschemaIncompatibleWithRootDictInput, - DependentSchemasDependentSubschemaIncompatibleWithRootDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DependentSchemasDependentSubschemaIncompatibleWithRootDict: - return DependentSchemasDependentSubschemaIncompatibleWithRoot.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -DependentSchemasDependentSubschemaIncompatibleWithRootDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class DependentSchemasDependentSubschemaIncompatibleWithRoot( - schemas.AnyTypeSchema[DependentSchemasDependentSubschemaIncompatibleWithRootDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: DependentSchemasDependentSubschemaIncompatibleWithRootDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py deleted file mode 100644 index c50bca5f799..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/dependent_schemas_single_dependency.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.IntSchema -Bar2: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar2], - } -) - - -class BarDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(BarDictInput, arg_) - return Bar.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - BarDictInput, - BarDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BarDict: - return Bar.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[int, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def bar(self) -> typing.Union[int, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -BarDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Bar( - schemas.AnyTypeSchema[BarDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: BarDict, - } - ) - -DependentSchemas = typing.TypedDict( - 'DependentSchemas', - { - "bar": typing.Type[Bar], - } -) - - -@dataclasses.dataclass(frozen=True) -class DependentSchemasSingleDependency( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - dependent_schemas: DependentSchemas = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(DependentSchemas)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py deleted file mode 100644 index a76c0704c50..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/duration_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DurationFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'duration' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py deleted file mode 100644 index f3c809a48b1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/email_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class EmailFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'email' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py deleted file mode 100644 index b8f36ca490c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/empty_dependents.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class EmptyDependents( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( - default_factory=lambda: { - "bar": { - }, - } - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py deleted file mode 100644 index db151bca44c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with0_does_not_match_false.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWith0DoesNotMatchFalseEnums: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal[0]: - return EnumWith0DoesNotMatchFalse.validate(0) - - -@dataclasses.dataclass(frozen=True) -class EnumWith0DoesNotMatchFalse( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 0: "POSITIVE_0", - } - ) - enums = EnumWith0DoesNotMatchFalseEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[0], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py deleted file mode 100644 index 0cd21f6929d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with1_does_not_match_true.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWith1DoesNotMatchTrueEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return EnumWith1DoesNotMatchTrue.validate(1) - - -@dataclasses.dataclass(frozen=True) -class EnumWith1DoesNotMatchTrue( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - } - ) - enums = EnumWith1DoesNotMatchTrueEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py deleted file mode 100644 index 45dc81b21fe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_escaped_characters.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithEscapedCharactersEnums: - - @schemas.classproperty - def FOO_LINE_FEED_LF_BAR(cls) -> typing.Literal["foo\nbar"]: - return EnumWithEscapedCharacters.validate("foo\nbar") - - @schemas.classproperty - def FOO_CARRIAGE_RETURN_CR_BAR(cls) -> typing.Literal["foo\rbar"]: - return EnumWithEscapedCharacters.validate("foo\rbar") - - -@dataclasses.dataclass(frozen=True) -class EnumWithEscapedCharacters( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "foo\nbar": "FOO_LINE_FEED_LF_BAR", - "foo\rbar": "FOO_CARRIAGE_RETURN_CR_BAR", - } - ) - enums = EnumWithEscapedCharactersEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo\nbar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\nbar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo\rbar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\rbar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo\nbar","foo\rbar",]: ... - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "foo\nbar", - "foo\rbar", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "foo\nbar", - "foo\rbar", - ], - validated_arg - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py deleted file mode 100644 index 9cc720a6276..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_false_does_not_match0.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithFalseDoesNotMatch0Enums: - - @schemas.classproperty - def FALSE(cls) -> typing.Literal[False]: - return EnumWithFalseDoesNotMatch0.validate(False) - - -@dataclasses.dataclass(frozen=True) -class EnumWithFalseDoesNotMatch0( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - schemas.Bool.FALSE: "FALSE", - } - ) - enums = EnumWithFalseDoesNotMatch0Enums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False,]: ... - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - False, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - False, - ], - validated_arg - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py deleted file mode 100644 index 1b1407e8837..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enum_with_true_does_not_match1.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumWithTrueDoesNotMatch1Enums: - - @schemas.classproperty - def TRUE(cls) -> typing.Literal[True]: - return EnumWithTrueDoesNotMatch1.validate(True) - - -@dataclasses.dataclass(frozen=True) -class EnumWithTrueDoesNotMatch1( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - schemas.Bool.TRUE: "TRUE", - } - ) - enums = EnumWithTrueDoesNotMatch1Enums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True,]: ... - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - True, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - True, - ], - validated_arg - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py deleted file mode 100644 index 0f26a8e8ce7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/enums_in_properties.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class FooEnums: - - @schemas.classproperty - def FOO(cls) -> typing.Literal["foo"]: - return Foo.validate("foo") - - -@dataclasses.dataclass(frozen=True) -class Foo( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "foo": "FOO", - } - ) - enums = FooEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["foo"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["foo",]: ... - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "foo", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "foo", - ], - validated_arg - ) - - -class BarEnums: - - @schemas.classproperty - def BAR(cls) -> typing.Literal["bar"]: - return Bar.validate("bar") - - -@dataclasses.dataclass(frozen=True) -class Bar( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "bar": "BAR", - } - ) - enums = BarEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["bar"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["bar"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["bar",]: ... - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "bar", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "bar", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class EnumsInPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - bar: typing.Literal[ - "bar" - ], - foo: typing.Union[ - typing.Literal[ - "foo" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(EnumsInPropertiesDictInput, arg_) - return EnumsInProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - EnumsInPropertiesDictInput, - EnumsInPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumsInPropertiesDict: - return EnumsInProperties.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Literal["bar"]: - return typing.cast( - typing.Literal["bar"], - self.__getitem__("bar") - ) - - @property - def foo(self) -> typing.Union[typing.Literal["foo"], schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["foo"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -EnumsInPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class EnumsInProperties( - schemas.Schema[EnumsInPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: EnumsInPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EnumsInPropertiesDictInput, - EnumsInPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumsInPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py deleted file mode 100644 index a72994bc205..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusivemaximum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ExclusivemaximumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - exclusive_maximum: typing.Union[int, float] = 3.0 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py deleted file mode 100644 index 8dfe03ac690..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/exclusiveminimum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ExclusiveminimumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - exclusive_minimum: typing.Union[int, float] = 1.1 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py deleted file mode 100644 index 6b12e09da60..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/float_division_inf.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class FloatDivisionInf( - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - multiple_of: typing.Union[int, float] = 0.123456789 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py deleted file mode 100644 index 134c59d5552..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/forbidden_property.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -@dataclasses.dataclass(frozen=True) -class Foo( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class ForbiddenPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ForbiddenPropertyDictInput, arg_) - return ForbiddenProperty.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ForbiddenPropertyDictInput, - ForbiddenPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ForbiddenPropertyDict: - return ForbiddenProperty.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ForbiddenPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ForbiddenProperty( - schemas.AnyTypeSchema[ForbiddenPropertyDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ForbiddenPropertyDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py deleted file mode 100644 index f3b377a8b0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/hostname_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class HostnameFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'hostname' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py deleted file mode 100644 index 390c3a748d4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_email_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IdnEmailFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'idn-email' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py deleted file mode 100644 index f41c6645e51..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/idn_hostname_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IdnHostnameFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'idn-hostname' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py deleted file mode 100644 index 911e889df8c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_else_without_then.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Else( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - exclusive_maximum: typing.Union[int, float] = 0 - - - -@dataclasses.dataclass(frozen=True) -class IfAndElseWithoutThen( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py deleted file mode 100644 index 3fe99a49324..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_and_then_without_else.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - exclusive_maximum: typing.Union[int, float] = 0 - - - -@dataclasses.dataclass(frozen=True) -class Then( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = -10 - - - -@dataclasses.dataclass(frozen=True) -class IfAndThenWithoutElse( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py deleted file mode 100644 index 2f568f6407f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ElseConst: - - @schemas.classproperty - def OTHER(cls) -> typing.Literal["other"]: - return Else.validate("other") - - -@dataclasses.dataclass(frozen=True) -class Else( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "other": "OTHER", - } - ) - const = ElseConst - - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 4 - - - -class ThenConst: - - @schemas.classproperty - def YES(cls) -> typing.Literal["yes"]: - return Then.validate("yes") - - -@dataclasses.dataclass(frozen=True) -class Then( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "yes": "YES", - } - ) - const = ThenConst - - - -@dataclasses.dataclass(frozen=True) -class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py deleted file mode 100644 index 1e1c7b1770a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_else_without_if.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ElseConst: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal["0"]: - return Else.validate("0") - - -@dataclasses.dataclass(frozen=True) -class Else( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "0": "POSITIVE_0", - } - ) - const = ElseConst - - - -@dataclasses.dataclass(frozen=True) -class IgnoreElseWithoutIf( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py deleted file mode 100644 index d19961151f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_if_without_then_or_else.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class IfConst: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal["0"]: - return If.validate("0") - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "0": "POSITIVE_0", - } - ) - const = IfConst - - - -@dataclasses.dataclass(frozen=True) -class IgnoreIfWithoutThenOrElse( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py deleted file mode 100644 index 95bcbe336ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ignore_then_without_if.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ThenConst: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal["0"]: - return Then.validate("0") - - -@dataclasses.dataclass(frozen=True) -class Then( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "0": "POSITIVE_0", - } - ) - const = ThenConst - - - -@dataclasses.dataclass(frozen=True) -class IgnoreThenWithoutIf( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py deleted file mode 100644 index 6d8cf46cdbf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/integer_type_matches_integers.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -IntegerTypeMatchesIntegers: typing_extensions.TypeAlias = schemas.IntSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py deleted file mode 100644 index 4855bb77ab2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv4_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Ipv4Format( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'ipv4' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py deleted file mode 100644 index de4ca06741e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/ipv6_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Ipv6Format( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'ipv6' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py deleted file mode 100644 index bb91eda56cc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IriFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'iri' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py deleted file mode 100644 index 70e9d058ca6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/iri_reference_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IriReferenceFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'iri-reference' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py deleted file mode 100644 index 8c141a47c08..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_contains.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Contains( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 3 - - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - - - -class ItemsContainsTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsContainsTupleInput, ItemsContainsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ItemsContains.validate(arg, configuration=configuration) -ItemsContainsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ItemsContains( - schemas.Schema[schemas.immutabledict, ItemsContainsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsContainsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsContainsTupleInput, - ItemsContainsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsContainsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py deleted file mode 100644 index 09fa12a88ea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 5 - - - -class ItemsDoesNotLookInApplicatorsValidCaseTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsDoesNotLookInApplicatorsValidCaseTupleInput, ItemsDoesNotLookInApplicatorsValidCaseTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ItemsDoesNotLookInApplicatorsValidCase.validate(arg, configuration=configuration) -ItemsDoesNotLookInApplicatorsValidCaseTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ItemsDoesNotLookInApplicatorsValidCase( - schemas.Schema[schemas.immutabledict, ItemsDoesNotLookInApplicatorsValidCaseTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsDoesNotLookInApplicatorsValidCaseTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsDoesNotLookInApplicatorsValidCaseTupleInput, - ItemsDoesNotLookInApplicatorsValidCaseTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsDoesNotLookInApplicatorsValidCaseTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py deleted file mode 100644 index c75b2b85190..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/items_with_null_instance_elements.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.NoneSchema - - -class ItemsWithNullInstanceElementsTuple( - typing.Tuple[ - None, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsWithNullInstanceElementsTupleInput, ItemsWithNullInstanceElementsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ItemsWithNullInstanceElements.validate(arg, configuration=configuration) -ItemsWithNullInstanceElementsTupleInput = typing.Union[ - typing.List[ - None, - ], - typing.Tuple[ - None, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ItemsWithNullInstanceElements( - schemas.Schema[schemas.immutabledict, ItemsWithNullInstanceElementsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsWithNullInstanceElementsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsWithNullInstanceElementsTupleInput, - ItemsWithNullInstanceElementsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsWithNullInstanceElementsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py deleted file mode 100644 index 24f683db206..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/json_pointer_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class JsonPointerFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'json-pointer' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py deleted file mode 100644 index c565610bdbd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxcontainsWithoutContainsIsIgnored( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py deleted file mode 100644 index c2133390df2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaximumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_maximum: typing.Union[int, float] = 3.0 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py deleted file mode 100644 index 948908c3abb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaximumValidationWithUnsignedInteger( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_maximum: typing.Union[int, float] = 300 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py deleted file mode 100644 index 69a196af7a0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_items: int = 2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py deleted file mode 100644 index 9337f83cc1d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxlength_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxlengthValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_length: int = 2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py deleted file mode 100644 index b98f828c08a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Maxproperties0MeansTheObjectIsEmpty( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_properties: int = 0 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py deleted file mode 100644 index 65a8e84bdfd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/maxproperties_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MaxpropertiesValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - max_properties: int = 2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py deleted file mode 100644 index a94435d02db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MincontainsWithoutContainsIsIgnored( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py deleted file mode 100644 index 7f8ad8a2a35..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinimumValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_minimum: typing.Union[int, float] = 1.1 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py deleted file mode 100644 index 0c6b8bfbaca..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minimum_validation_with_signed_integer.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinimumValidationWithSignedInteger( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - inclusive_minimum: typing.Union[int, float] = -2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py deleted file mode 100644 index f4fa4d9774b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_items: int = 1 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py deleted file mode 100644 index 8673b92ea66..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minlength_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinlengthValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_length: int = 2 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py deleted file mode 100644 index c06aec223ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/minproperties_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MinpropertiesValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - min_properties: int = 1 - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py deleted file mode 100644 index 1f96d76d966..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_dependents_required.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MultipleDependentsRequired( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( - default_factory=lambda: { - "quux": { - "foo", - "bar", - }, - } - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py deleted file mode 100644 index ef1be48a50f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -A: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class Aaa( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_maximum: typing.Union[int, float] = 20 - - - -@dataclasses.dataclass(frozen=True) -class MultipleSimultaneousPatternpropertiesAreValidated( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'a*' # noqa: E501 - ): A, - schemas.PatternInfo( - pattern=r'aaa*' # noqa: E501 - ): Aaa, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py deleted file mode 100644 index 8590a90ddfb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class MultipleTypesCanBeSpecifiedInAnArray( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - str, - }) - format: str = 'int' - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py deleted file mode 100644 index 79e2d4188c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -AllOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -AllOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedAllofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py deleted file mode 100644 index 261b6e985ad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -AnyOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - -AnyOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedAnyofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py deleted file mode 100644 index 7920ab20f97..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_items.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items4: typing_extensions.TypeAlias = schemas.NumberSchema - - -class ItemsTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items3.validate(arg, configuration=configuration) -ItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items3( - schemas.Schema[schemas.immutabledict, ItemsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput, - ItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ItemsTuple2( - typing.Tuple[ - ItemsTuple, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items2.validate(arg, configuration=configuration) -ItemsTupleInput2 = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items2( - schemas.Schema[schemas.immutabledict, ItemsTuple2] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple2 - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput2, - ItemsTuple2, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple2: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ItemsTuple3( - typing.Tuple[ - ItemsTuple2, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput3, ItemsTuple3], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items.validate(arg, configuration=configuration) -ItemsTupleInput3 = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema[schemas.immutabledict, ItemsTuple3] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple3 - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput3, - ItemsTuple3, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple3: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class NestedItemsTuple( - typing.Tuple[ - ItemsTuple3, - ... - ] -): - - def __new__(cls, arg: typing.Union[NestedItemsTupleInput, NestedItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return NestedItems.validate(arg, configuration=configuration) -NestedItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput3, - ItemsTuple3 - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput3, - ItemsTuple3 - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class NestedItems( - schemas.Schema[schemas.immutabledict, NestedItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: NestedItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NestedItemsTupleInput, - NestedItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NestedItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py deleted file mode 100644 index a7845141254..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_02: typing_extensions.TypeAlias = schemas.NoneSchema -OneOf = typing.Tuple[ - typing.Type[_02], -] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - -OneOf2 = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class NestedOneofToCheckValidationSemantics( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py deleted file mode 100644 index 45d3e08a17d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -CircumflexAccentLatinSmallLetterAWithAcute: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class NonAsciiPatternWithAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - # map with no key value pairs - def __new__( - cls, - arg: NonAsciiPatternWithAdditionalpropertiesDictInput, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return NonAsciiPatternWithAdditionalproperties.validate(arg, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NonAsciiPatternWithAdditionalpropertiesDictInput, - NonAsciiPatternWithAdditionalpropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NonAsciiPatternWithAdditionalpropertiesDict: - return NonAsciiPatternWithAdditionalproperties.validate(arg, configuration=configuration) -NonAsciiPatternWithAdditionalpropertiesDictInput = typing.Mapping # mapping must be empty - - -@dataclasses.dataclass(frozen=True) -class NonAsciiPatternWithAdditionalproperties( - schemas.Schema[NonAsciiPatternWithAdditionalpropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'^á' # noqa: E501 - ): CircumflexAccentLatinSmallLetterAWithAcute, - } - ) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NonAsciiPatternWithAdditionalpropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NonAsciiPatternWithAdditionalpropertiesDictInput, - NonAsciiPatternWithAdditionalpropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NonAsciiPatternWithAdditionalpropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py deleted file mode 100644 index 61fbc53bf4c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/non_interference_across_combined_schemas.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - exclusive_maximum: typing.Union[int, float] = 0 - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - - - -@dataclasses.dataclass(frozen=True) -class Then( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = -10 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - - - -@dataclasses.dataclass(frozen=True) -class Else( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - - - -@dataclasses.dataclass(frozen=True) -class _2( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - typing.Type[_2], -] - - -@dataclasses.dataclass(frozen=True) -class NonInterferenceAcrossCombinedSchemas( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py deleted file mode 100644 index f6664c76896..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not2: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py deleted file mode 100644 index 355f7902bc7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_more_complex_schema.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class NotDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(NotDictInput, arg_) - return Not.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NotDictInput, - NotDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NotDict: - return Not.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[str, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -NotDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.Schema[NotDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NotDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NotDictInput, - NotDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NotDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class NotMoreComplexSchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py deleted file mode 100644 index 3bfb09f6693..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/not_multiple_types.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - schemas.Bool, - }) - format: str = 'int' - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class NotMultipleTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py deleted file mode 100644 index bed0a8ca7ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/nul_characters_in_strings.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class NulCharactersInStringsEnums: - - @schemas.classproperty - def HELLO_NULL_THERE(cls) -> typing.Literal["hello\x00there"]: - return NulCharactersInStrings.validate("hello\x00there") - - -@dataclasses.dataclass(frozen=True) -class NulCharactersInStrings( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "hello\x00there": "HELLO_NULL_THERE", - } - ) - enums = NulCharactersInStringsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["hello\x00there"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["hello\x00there"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["hello\x00there",]: ... - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "hello\x00there", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "hello\x00there", - ], - validated_arg - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py deleted file mode 100644 index d99e9d3782b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/null_type_matches_only_the_null_object.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -NullTypeMatchesOnlyTheNullObject: typing_extensions.TypeAlias = schemas.NoneSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py deleted file mode 100644 index 66bc8b3d57b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/number_type_matches_numbers.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -NumberTypeMatchesNumbers: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py deleted file mode 100644 index 0bbd62c5796..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_properties_validation.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.IntSchema -Bar: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class ObjectPropertiesValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectPropertiesValidationDictInput, arg_) - return ObjectPropertiesValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectPropertiesValidationDictInput, - ObjectPropertiesValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectPropertiesValidationDict: - return ObjectPropertiesValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[int, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectPropertiesValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectPropertiesValidation( - schemas.AnyTypeSchema[ObjectPropertiesValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectPropertiesValidationDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py deleted file mode 100644 index aa4da781b99..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/object_type_matches_objects.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -ObjectTypeMatchesObjects: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py deleted file mode 100644 index e39a8a21e99..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = 2 - -OneOf2 = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Oneof( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf2 = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf2)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py deleted file mode 100644 index b21ba65ba5c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_complex_types.py +++ /dev/null @@ -1,174 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - } -) - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> int: - return typing.cast( - int, - self.__getitem__("bar") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "foo": typing.Type[Foo], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - foo: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def foo(self) -> str: - return typing.cast( - str, - self.__getitem__("foo") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofComplexTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py deleted file mode 100644 index 984d7abc544..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_base_schema.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_length: int = 2 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 4 - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithBaseSchema( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py deleted file mode 100644 index 6591242da44..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NumberSchema -_1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithEmptySchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py deleted file mode 100644 index bbeedc78bc7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/oneof_with_required.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "bar": bar, - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_0DictInput, arg_) - return _0.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - @property - def bar(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("bar") - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[_0Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "bar", - "foo", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict, - } - ) - - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "baz", - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - baz: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "baz": baz, - "foo": foo, - } - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def baz(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("baz") - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[_1Dict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - required: typing.FrozenSet[str] = frozenset({ - "baz", - "foo", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict, - } - ) - -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class OneofWithRequired( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py deleted file mode 100644 index 035f8e495c3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_is_not_anchored.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PatternIsNotAnchored( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'a+' # noqa: E501 - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py deleted file mode 100644 index 126c3273361..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/pattern_validation.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PatternValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^a*$' # noqa: E501 - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py deleted file mode 100644 index 6e8e8597ada..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -FO: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class PatternpropertiesValidatesPropertiesMatchingARegex( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'f.*o' # noqa: E501 - ): FO, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py deleted file mode 100644 index c1ad822813a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class PatternpropertiesWithNullValuedInstanceProperties( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'^.*bar$' # noqa: E501 - ): Bar, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py deleted file mode 100644 index 1f8d58ac646..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.IntSchema - - -class PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple( - typing.Tuple[ - str, - typing_extensions.Unpack[typing.Tuple[ - int, - ... - ]] - ] -): - - def __new__(cls, arg: typing.Union[PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return PrefixitemsValidationAdjustsTheStartingIndexForItems.validate(arg, configuration=configuration) -PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - str, - ], - ], - typing.Tuple[ - str, - typing_extensions.Unpack[typing.Tuple[ - int, - ... - ]] - ] -] -_0: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class PrefixitemsValidationAdjustsTheStartingIndexForItems( - schemas.Schema[schemas.immutabledict, PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - prefix_items: typing.Tuple[ - typing.Type[_0], - ] = ( - _0, - ) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, - PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py deleted file mode 100644 index dfea03db69d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class PrefixitemsWithNullInstanceElementsTuple( - typing.Tuple[ - None, - typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] - ] -): - - def __new__(cls, arg: typing.Union[PrefixitemsWithNullInstanceElementsTupleInput, PrefixitemsWithNullInstanceElementsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return PrefixitemsWithNullInstanceElements.validate(arg, configuration=configuration) -PrefixitemsWithNullInstanceElementsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - None, - typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] - ] -] -_0: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class PrefixitemsWithNullInstanceElements( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], PrefixitemsWithNullInstanceElementsTuple], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - prefix_items: typing.Tuple[ - typing.Type[_0], - ] = ( - _0, - ) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: PrefixitemsWithNullInstanceElementsTuple, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py deleted file mode 100644 index 451cf73c544..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class FO( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_items: int = 2 - - - -@dataclasses.dataclass(frozen=True) -class Foo( - schemas.Schema[schemas.immutabledict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - max_items: int = 3 - - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schemas.INPUT_TYPES_ALL], - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: - return super().validate_base( - arg, - configuration=configuration, - ) -Bar: typing_extensions.TypeAlias = schemas.ListSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class PropertiesPatternpropertiesAdditionalpropertiesInteractionDict(schemas.immutabledict[str, typing.Union[ - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - int, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - schemas.Unset - ] = schemas.unset, - bar: typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: int, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, arg_) - return PropertiesPatternpropertiesAdditionalpropertiesInteraction.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, - PropertiesPatternpropertiesAdditionalpropertiesInteractionDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesPatternpropertiesAdditionalpropertiesInteractionDict: - return PropertiesPatternpropertiesAdditionalpropertiesInteraction.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[typing.Tuple[schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - val - ) - - @property - def bar(self) -> typing.Union[typing.Tuple[schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) -PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - int, - ] -] - - -@dataclasses.dataclass(frozen=True) -class PropertiesPatternpropertiesAdditionalpropertiesInteraction( - schemas.Schema[PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'f.o' # noqa: E501 - ): FO, - } - ) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertiesPatternpropertiesAdditionalpropertiesInteractionDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, - PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesPatternpropertiesAdditionalpropertiesInteractionDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py deleted file mode 100644 index 87ac3f86ca7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Proto: typing_extensions.TypeAlias = schemas.NumberSchema -Length: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "length": typing.Type[Length], - } -) - - -class ToStringDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "length", - }) - - def __new__( - cls, - *, - length: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("length", length), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ToStringDictInput, arg_) - return ToString.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ToStringDictInput, - ToStringDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ToStringDict: - return ToString.validate(arg, configuration=configuration) - - @property - def length(self) -> typing.Union[str, schemas.Unset]: - val = self.get("length", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ToStringDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ToString( - schemas.AnyTypeSchema[ToStringDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ToStringDict, - } - ) - -Constructor: typing_extensions.TypeAlias = schemas.NumberSchema -Properties2 = typing.TypedDict( - 'Properties2', - { - "__proto__": typing.Type[Proto], - "toString": typing.Type[ToString], - "constructor": typing.Type[Constructor], - } -) - - -class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "__proto__", - "toString", - "constructor", - }) - - def __new__( - cls, - *, - __proto__: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - toString: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - constructor: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("__proto__", __proto__), - ("toString", toString), - ("constructor", constructor), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, arg_) - return PropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, - PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict: - return PropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(arg, configuration=configuration) - - @property - def __proto__(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("__proto__", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def toString(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("toString", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - @property - def constructor(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("constructor", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertiesWhoseNamesAreJavascriptObjectPropertyNames( - schemas.AnyTypeSchema[PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties2 = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties2)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py deleted file mode 100644 index 5b0779046eb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_escaped_characters.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -FooNbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooBar: typing_extensions.TypeAlias = schemas.NumberSchema -FooBar: typing_extensions.TypeAlias = schemas.NumberSchema -FooRbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooTbar: typing_extensions.TypeAlias = schemas.NumberSchema -FooFbar: typing_extensions.TypeAlias = schemas.NumberSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo\nbar": typing.Type[FooNbar], - "foo\"bar": typing.Type[FooBar], - "foo\\bar": typing.Type[FooBar], - "foo\rbar": typing.Type[FooRbar], - "foo\tbar": typing.Type[FooTbar], - "foo\fbar": typing.Type[FooFbar], - } -) - - -class PropertiesWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar", - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - arg_.update(kwargs) - used_arg_ = typing.cast(PropertiesWithEscapedCharactersDictInput, arg_) - return PropertiesWithEscapedCharacters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertiesWithEscapedCharactersDictInput, - PropertiesWithEscapedCharactersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesWithEscapedCharactersDict: - return PropertiesWithEscapedCharacters.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertiesWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertiesWithEscapedCharacters( - schemas.AnyTypeSchema[PropertiesWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertiesWithEscapedCharactersDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py deleted file mode 100644 index 8f5792393b2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.NoneSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class PropertiesWithNullValuedInstancePropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - None, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PropertiesWithNullValuedInstancePropertiesDictInput, arg_) - return PropertiesWithNullValuedInstanceProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertiesWithNullValuedInstancePropertiesDictInput, - PropertiesWithNullValuedInstancePropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertiesWithNullValuedInstancePropertiesDict: - return PropertiesWithNullValuedInstanceProperties.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[None, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - None, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertiesWithNullValuedInstancePropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertiesWithNullValuedInstanceProperties( - schemas.AnyTypeSchema[PropertiesWithNullValuedInstancePropertiesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertiesWithNullValuedInstancePropertiesDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py deleted file mode 100644 index cb9f829559f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Ref: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "$ref": typing.Type[Ref], - } -) - - -class PropertyNamedRefThatIsNotAReferenceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "$ref", - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - arg_.update(kwargs) - used_arg_ = typing.cast(PropertyNamedRefThatIsNotAReferenceDictInput, arg_) - return PropertyNamedRefThatIsNotAReference.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PropertyNamedRefThatIsNotAReferenceDictInput, - PropertyNamedRefThatIsNotAReferenceDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PropertyNamedRefThatIsNotAReferenceDict: - return PropertyNamedRefThatIsNotAReference.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PropertyNamedRefThatIsNotAReferenceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PropertyNamedRefThatIsNotAReference( - schemas.AnyTypeSchema[PropertyNamedRefThatIsNotAReferenceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PropertyNamedRefThatIsNotAReferenceDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py deleted file mode 100644 index b1999d35246..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/propertynames_validation.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PropertyNames( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - max_length: int = 3 - - -@dataclasses.dataclass(frozen=True) -class PropertynamesValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - property_names: typing.Type[PropertyNames] = dataclasses.field(default_factory=lambda: PropertyNames) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py deleted file mode 100644 index d22caef5f9d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regex_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class RegexFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'regex' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py deleted file mode 100644 index 0f6c1de5f87..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_092: typing_extensions.TypeAlias = schemas.BoolSchema -X: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - pattern_properties: typing.Mapping[ - schemas.PatternInfo, - typing.Type[schemas.Schema] - ] = dataclasses.field( - default_factory=lambda: { - schemas.PatternInfo( - pattern=r'[0-9]{2,}' # noqa: E501 - ): _092, - schemas.PatternInfo( - pattern=r'X_' # noqa: E501 - ): X, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py deleted file mode 100644 index fed696c65d0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/relative_json_pointer_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class RelativeJsonPointerFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'relative-json-pointer' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py deleted file mode 100644 index 0c6b0e50bee..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_default_validation.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class RequiredDefaultValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredDefaultValidationDictInput, arg_) - return RequiredDefaultValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredDefaultValidationDictInput, - RequiredDefaultValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredDefaultValidationDict: - return RequiredDefaultValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredDefaultValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredDefaultValidation( - schemas.AnyTypeSchema[RequiredDefaultValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredDefaultValidationDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py deleted file mode 100644 index cd839a18033..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "__proto__", - "constructor", - "toString", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - __proto__: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - constructor: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - toString: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "__proto__": __proto__, - "constructor": constructor, - "toString": toString, - } - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, arg_) - return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput, - RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict: - return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.validate(arg, configuration=configuration) - - @property - def __proto__(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("__proto__") - - @property - def constructor(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("constructor") - - @property - def toString(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("toString") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames( - schemas.AnyTypeSchema[RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "__proto__", - "constructor", - "toString", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py deleted file mode 100644 index 7ba276946f2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_validation.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Bar: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - "bar": typing.Type[Bar], - } -) - - -class RequiredValidationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - bar: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "foo": foo, - } - for key_, val in ( - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredValidationDictInput, arg_) - return RequiredValidation.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredValidationDictInput, - RequiredValidationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredValidationDict: - return RequiredValidation.validate(arg, configuration=configuration) - - @property - def foo(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("foo") - - @property - def bar(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredValidationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredValidation( - schemas.AnyTypeSchema[RequiredValidationDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredValidationDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py deleted file mode 100644 index f4f0e2d4fca..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_empty_array.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Foo: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class RequiredWithEmptyArrayDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredWithEmptyArrayDictInput, arg_) - return RequiredWithEmptyArray.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredWithEmptyArrayDictInput, - RequiredWithEmptyArrayDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredWithEmptyArrayDict: - return RequiredWithEmptyArray.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredWithEmptyArrayDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredWithEmptyArray( - schemas.AnyTypeSchema[RequiredWithEmptyArrayDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredWithEmptyArrayDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py deleted file mode 100644 index f8c3c7514c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/required_with_escaped_characters.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class RequiredWithEscapedCharactersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - } - arg_.update(kwargs) - used_arg_ = typing.cast(RequiredWithEscapedCharactersDictInput, arg_) - return RequiredWithEscapedCharacters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - RequiredWithEscapedCharactersDictInput, - RequiredWithEscapedCharactersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> RequiredWithEscapedCharactersDict: - return RequiredWithEscapedCharacters.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -RequiredWithEscapedCharactersDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class RequiredWithEscapedCharacters( - schemas.AnyTypeSchema[RequiredWithEscapedCharactersDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: RequiredWithEscapedCharactersDict, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py deleted file mode 100644 index b2daaaf5ea3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/simple_enum_validation.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SimpleEnumValidationEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return SimpleEnumValidation.validate(1) - - @schemas.classproperty - def POSITIVE_2(cls) -> typing.Literal[2]: - return SimpleEnumValidation.validate(2) - - @schemas.classproperty - def POSITIVE_3(cls) -> typing.Literal[3]: - return SimpleEnumValidation.validate(3) - - -@dataclasses.dataclass(frozen=True) -class SimpleEnumValidation( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - 2: "POSITIVE_2", - 3: "POSITIVE_3", - } - ) - enums = SimpleEnumValidationEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[2], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[2]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[3], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[3]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,2,3,]: ... - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py deleted file mode 100644 index 50c8214956e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/single_dependency.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class SingleDependency( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - dependent_required: typing.Mapping[str, typing.Set[str]] = dataclasses.field( - default_factory=lambda: { - "bar": { - "foo", - }, - } - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py deleted file mode 100644 index 557918ef62c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/small_multiple_of_large_integer.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class SmallMultipleOfLargeInteger( - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - multiple_of: typing.Union[int, float] = 1.0E-8 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py deleted file mode 100644 index c6bc46221b3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/string_type_matches_strings.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -StringTypeMatchesStrings: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py deleted file mode 100644 index baca2f74f3a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/time_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class TimeFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'time' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py deleted file mode 100644 index cecf34ad7cb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_object_or_null.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class TypeArrayObjectOrNull( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - tuple, - schemas.immutabledict, - type(None), - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schemas.INPUT_TYPES_ALL], - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py deleted file mode 100644 index 6f8fd1423a6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_array_or_object.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class TypeArrayOrObject( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - tuple, - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schemas.INPUT_TYPES_ALL], - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py deleted file mode 100644 index 8c3a2ed4d7c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/type_as_array_with_one_item.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -TypeAsArrayWithOneItem: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py deleted file mode 100644 index c1968ee5f73..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_as_schema.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -UnevaluatedItems: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluateditemsAsSchema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py deleted file mode 100644 index f4d0c496aee..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Contains( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - contains: typing.Type[Contains] = dataclasses.field(default_factory=lambda: Contains) # type: ignore - - - -@dataclasses.dataclass(frozen=True) -class Contains2( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 3 - - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - contains: typing.Type[Contains2] = dataclasses.field(default_factory=lambda: Contains2) # type: ignore - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedItems( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 5 - - - -@dataclasses.dataclass(frozen=True) -class UnevaluateditemsDependsOnMultipleNestedContains( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py deleted file mode 100644 index a672a271658..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_items.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.NumberSchema - - -class UnevaluateditemsWithItemsTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[UnevaluateditemsWithItemsTupleInput, UnevaluateditemsWithItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return UnevaluateditemsWithItems.validate(arg, configuration=configuration) -UnevaluateditemsWithItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] -UnevaluatedItems: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluateditemsWithItems( - schemas.Schema[schemas.immutabledict, UnevaluateditemsWithItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: UnevaluateditemsWithItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - UnevaluateditemsWithItemsTupleInput, - UnevaluateditemsWithItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> UnevaluateditemsWithItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py deleted file mode 100644 index 471701f31d1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -UnevaluatedItems: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluateditemsWithNullInstanceElements( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unevaluated_items: typing.Type[UnevaluatedItems] = dataclasses.field(default_factory=lambda: UnevaluatedItems) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py deleted file mode 100644 index c9623afd041..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class PropertyNames( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - max_length: int = 1 -UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NumberSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedpropertiesNotAffectedByPropertynames( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - property_names: typing.Type[PropertyNames] = dataclasses.field(default_factory=lambda: PropertyNames) # type: ignore - unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py deleted file mode 100644 index f6c432d4ee1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_schema.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedProperties( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 3 - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedpropertiesSchema( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py deleted file mode 100644 index b8c41294bff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "foo": typing.Type[Foo], - } -) - - -class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "foo", - }) - - def __new__( - cls, - *, - foo: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, arg_) - return UnevaluatedpropertiesWithAdjacentAdditionalproperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, - UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict: - return UnevaluatedpropertiesWithAdjacentAdditionalproperties.validate(arg, configuration=configuration) - - @property - def foo(self) -> typing.Union[str, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] -UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedpropertiesWithAdjacentAdditionalproperties( - schemas.Schema[UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, - UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py deleted file mode 100644 index 43b97ea0ac5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -UnevaluatedProperties: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class UnevaluatedpropertiesWithNullValuedInstanceProperties( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unevaluated_properties: typing.Type[UnevaluatedProperties] = dataclasses.field(default_factory=lambda: UnevaluatedProperties) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py deleted file mode 100644 index eb3dd1dd9da..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsFalseValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unique_items: bool = False - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py deleted file mode 100644 index aa5b8fa1570..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class UniqueitemsFalseWithAnArrayOfItemsTuple( - typing.Tuple[ - bool, - bool, - typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] - ] -): - - def __new__(cls, arg: typing.Union[UniqueitemsFalseWithAnArrayOfItemsTupleInput, UniqueitemsFalseWithAnArrayOfItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return UniqueitemsFalseWithAnArrayOfItems.validate(arg, configuration=configuration) -UniqueitemsFalseWithAnArrayOfItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - bool, - bool, - typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] - ] -] -_0: typing_extensions.TypeAlias = schemas.BoolSchema -_1: typing_extensions.TypeAlias = schemas.BoolSchema - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsFalseWithAnArrayOfItems( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], UniqueitemsFalseWithAnArrayOfItemsTuple], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - prefix_items: typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - ] = ( - _0, - _1, - ) - unique_items: bool = False - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: UniqueitemsFalseWithAnArrayOfItemsTuple, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py deleted file mode 100644 index 2dab8004288..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_validation.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsValidation( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - unique_items: bool = True - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py deleted file mode 100644 index c48de95a3fe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class UniqueitemsWithAnArrayOfItemsTuple( - typing.Tuple[ - bool, - bool, - typing_extensions.Unpack[typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]] - ] -): - - def __new__(cls, arg: typing.Union[UniqueitemsWithAnArrayOfItemsTupleInput, UniqueitemsWithAnArrayOfItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return UniqueitemsWithAnArrayOfItems.validate(arg, configuration=configuration) -UniqueitemsWithAnArrayOfItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - bool, - bool, - typing_extensions.Unpack[typing.Tuple[schemas.INPUT_TYPES_ALL, ...]] - ] -] -_0: typing_extensions.TypeAlias = schemas.BoolSchema -_1: typing_extensions.TypeAlias = schemas.BoolSchema - - -@dataclasses.dataclass(frozen=True) -class UniqueitemsWithAnArrayOfItems( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], UniqueitemsWithAnArrayOfItemsTuple], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - prefix_items: typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - ] = ( - _0, - _1, - ) - unique_items: bool = True - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: UniqueitemsWithAnArrayOfItemsTuple, - } - ) - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py deleted file mode 100644 index d7690fc9afd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py deleted file mode 100644 index bb6024943e7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_reference_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriReferenceFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri-reference' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py deleted file mode 100644 index 92c4c3ed0b2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uri_template_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UriTemplateFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uri-template' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py deleted file mode 100644 index 30f1e08b604..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/uuid_format.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UuidFormat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - format: str = 'uuid' - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py deleted file mode 100644 index 7884b7da8a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Else( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - multiple_of: typing.Union[int, float] = 2 - - - -@dataclasses.dataclass(frozen=True) -class If( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - exclusive_maximum: typing.Union[int, float] = 0 - - - -@dataclasses.dataclass(frozen=True) -class Then( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - inclusive_minimum: typing.Union[int, float] = -10 - - - -@dataclasses.dataclass(frozen=True) -class ValidateAgainstCorrectBranchThenVsElse( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py deleted file mode 100644 index 77bdbe22aa6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/components/schemas/__init__.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from unit_test_api.components.schema.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from unit_test_api.components.schema.a_schema_given_for_prefixitems import ASchemaGivenForPrefixitems -from unit_test_api.components.schema.additional_items_are_allowed_by_default import AdditionalItemsAreAllowedByDefault -from unit_test_api.components.schema.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from unit_test_api.components.schema.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from unit_test_api.components.schema.additionalproperties_does_not_look_in_applicators import AdditionalpropertiesDoesNotLookInApplicators -from unit_test_api.components.schema.additionalproperties_with_null_valued_instance_properties import AdditionalpropertiesWithNullValuedInstanceProperties -from unit_test_api.components.schema.additionalproperties_with_schema import AdditionalpropertiesWithSchema -from unit_test_api.components.schema.allof import Allof -from unit_test_api.components.schema.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from unit_test_api.components.schema.allof_simple_types import AllofSimpleTypes -from unit_test_api.components.schema.allof_with_base_schema import AllofWithBaseSchema -from unit_test_api.components.schema.allof_with_one_empty_schema import AllofWithOneEmptySchema -from unit_test_api.components.schema.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from unit_test_api.components.schema.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from unit_test_api.components.schema.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from unit_test_api.components.schema.anyof import Anyof -from unit_test_api.components.schema.anyof_complex_types import AnyofComplexTypes -from unit_test_api.components.schema.anyof_with_base_schema import AnyofWithBaseSchema -from unit_test_api.components.schema.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from unit_test_api.components.schema.array_type_matches_arrays import ArrayTypeMatchesArrays -from unit_test_api.components.schema.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -from unit_test_api.components.schema.by_int import ByInt -from unit_test_api.components.schema.by_number import ByNumber -from unit_test_api.components.schema.by_small_number import BySmallNumber -from unit_test_api.components.schema.const_nul_characters_in_strings import ConstNulCharactersInStrings -from unit_test_api.components.schema.contains_keyword_validation import ContainsKeywordValidation -from unit_test_api.components.schema.contains_with_null_instance_elements import ContainsWithNullInstanceElements -from unit_test_api.components.schema.date_format import DateFormat -from unit_test_api.components.schema.date_time_format import DateTimeFormat -from unit_test_api.components.schema.dependent_schemas_dependencies_with_escaped_characters import DependentSchemasDependenciesWithEscapedCharacters -from unit_test_api.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root import DependentSchemasDependentSubschemaIncompatibleWithRoot -from unit_test_api.components.schema.dependent_schemas_single_dependency import DependentSchemasSingleDependency -from unit_test_api.components.schema.duration_format import DurationFormat -from unit_test_api.components.schema.email_format import EmailFormat -from unit_test_api.components.schema.empty_dependents import EmptyDependents -from unit_test_api.components.schema.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from unit_test_api.components.schema.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from unit_test_api.components.schema.enum_with_escaped_characters import EnumWithEscapedCharacters -from unit_test_api.components.schema.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from unit_test_api.components.schema.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from unit_test_api.components.schema.enums_in_properties import EnumsInProperties -from unit_test_api.components.schema.exclusivemaximum_validation import ExclusivemaximumValidation -from unit_test_api.components.schema.exclusiveminimum_validation import ExclusiveminimumValidation -from unit_test_api.components.schema.float_division_inf import FloatDivisionInf -from unit_test_api.components.schema.forbidden_property import ForbiddenProperty -from unit_test_api.components.schema.hostname_format import HostnameFormat -from unit_test_api.components.schema.idn_email_format import IdnEmailFormat -from unit_test_api.components.schema.idn_hostname_format import IdnHostnameFormat -from unit_test_api.components.schema.if_and_else_without_then import IfAndElseWithoutThen -from unit_test_api.components.schema.if_and_then_without_else import IfAndThenWithoutElse -from unit_test_api.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence import IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence -from unit_test_api.components.schema.ignore_else_without_if import IgnoreElseWithoutIf -from unit_test_api.components.schema.ignore_if_without_then_or_else import IgnoreIfWithoutThenOrElse -from unit_test_api.components.schema.ignore_then_without_if import IgnoreThenWithoutIf -from unit_test_api.components.schema.integer_type_matches_integers import IntegerTypeMatchesIntegers -from unit_test_api.components.schema.ipv4_format import Ipv4Format -from unit_test_api.components.schema.ipv6_format import Ipv6Format -from unit_test_api.components.schema.iri_format import IriFormat -from unit_test_api.components.schema.iri_reference_format import IriReferenceFormat -from unit_test_api.components.schema.items_contains import ItemsContains -from unit_test_api.components.schema.items_does_not_look_in_applicators_valid_case import ItemsDoesNotLookInApplicatorsValidCase -from unit_test_api.components.schema.items_with_null_instance_elements import ItemsWithNullInstanceElements -from unit_test_api.components.schema.json_pointer_format import JsonPointerFormat -from unit_test_api.components.schema.maxcontains_without_contains_is_ignored import MaxcontainsWithoutContainsIsIgnored -from unit_test_api.components.schema.maximum_validation import MaximumValidation -from unit_test_api.components.schema.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from unit_test_api.components.schema.maxitems_validation import MaxitemsValidation -from unit_test_api.components.schema.maxlength_validation import MaxlengthValidation -from unit_test_api.components.schema.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from unit_test_api.components.schema.maxproperties_validation import MaxpropertiesValidation -from unit_test_api.components.schema.mincontains_without_contains_is_ignored import MincontainsWithoutContainsIsIgnored -from unit_test_api.components.schema.minimum_validation import MinimumValidation -from unit_test_api.components.schema.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from unit_test_api.components.schema.minitems_validation import MinitemsValidation -from unit_test_api.components.schema.minlength_validation import MinlengthValidation -from unit_test_api.components.schema.minproperties_validation import MinpropertiesValidation -from unit_test_api.components.schema.multiple_dependents_required import MultipleDependentsRequired -from unit_test_api.components.schema.multiple_simultaneous_patternproperties_are_validated import MultipleSimultaneousPatternpropertiesAreValidated -from unit_test_api.components.schema.multiple_types_can_be_specified_in_an_array import MultipleTypesCanBeSpecifiedInAnArray -from unit_test_api.components.schema.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from unit_test_api.components.schema.nested_items import NestedItems -from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties import NonAsciiPatternWithAdditionalproperties -from unit_test_api.components.schema.non_interference_across_combined_schemas import NonInterferenceAcrossCombinedSchemas -from unit_test_api.components.schema.not import Not -from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema -from unit_test_api.components.schema.not_multiple_types import NotMultipleTypes -from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings -from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -from unit_test_api.components.schema.number_type_matches_numbers import NumberTypeMatchesNumbers -from unit_test_api.components.schema.object_properties_validation import ObjectPropertiesValidation -from unit_test_api.components.schema.object_type_matches_objects import ObjectTypeMatchesObjects -from unit_test_api.components.schema.oneof import Oneof -from unit_test_api.components.schema.oneof_complex_types import OneofComplexTypes -from unit_test_api.components.schema.oneof_with_base_schema import OneofWithBaseSchema -from unit_test_api.components.schema.oneof_with_empty_schema import OneofWithEmptySchema -from unit_test_api.components.schema.oneof_with_required import OneofWithRequired -from unit_test_api.components.schema.pattern_is_not_anchored import PatternIsNotAnchored -from unit_test_api.components.schema.pattern_validation import PatternValidation -from unit_test_api.components.schema.patternproperties_validates_properties_matching_a_regex import PatternpropertiesValidatesPropertiesMatchingARegex -from unit_test_api.components.schema.patternproperties_with_null_valued_instance_properties import PatternpropertiesWithNullValuedInstanceProperties -from unit_test_api.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items import PrefixitemsValidationAdjustsTheStartingIndexForItems -from unit_test_api.components.schema.prefixitems_with_null_instance_elements import PrefixitemsWithNullInstanceElements -from unit_test_api.components.schema.properties_patternproperties_additionalproperties_interaction import PropertiesPatternpropertiesAdditionalpropertiesInteraction -from unit_test_api.components.schema.properties_whose_names_are_javascript_object_property_names import PropertiesWhoseNamesAreJavascriptObjectPropertyNames -from unit_test_api.components.schema.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from unit_test_api.components.schema.properties_with_null_valued_instance_properties import PropertiesWithNullValuedInstanceProperties -from unit_test_api.components.schema.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api.components.schema.propertynames_validation import PropertynamesValidation -from unit_test_api.components.schema.regex_format import RegexFormat -from unit_test_api.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive import RegexesAreNotAnchoredByDefaultAndAreCaseSensitive -from unit_test_api.components.schema.relative_json_pointer_format import RelativeJsonPointerFormat -from unit_test_api.components.schema.required_default_validation import RequiredDefaultValidation -from unit_test_api.components.schema.required_properties_whose_names_are_javascript_object_property_names import RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames -from unit_test_api.components.schema.required_validation import RequiredValidation -from unit_test_api.components.schema.required_with_empty_array import RequiredWithEmptyArray -from unit_test_api.components.schema.required_with_escaped_characters import RequiredWithEscapedCharacters -from unit_test_api.components.schema.simple_enum_validation import SimpleEnumValidation -from unit_test_api.components.schema.single_dependency import SingleDependency -from unit_test_api.components.schema.small_multiple_of_large_integer import SmallMultipleOfLargeInteger -from unit_test_api.components.schema.string_type_matches_strings import StringTypeMatchesStrings -from unit_test_api.components.schema.time_format import TimeFormat -from unit_test_api.components.schema.type_array_object_or_null import TypeArrayObjectOrNull -from unit_test_api.components.schema.type_array_or_object import TypeArrayOrObject -from unit_test_api.components.schema.type_as_array_with_one_item import TypeAsArrayWithOneItem -from unit_test_api.components.schema.unevaluateditems_as_schema import UnevaluateditemsAsSchema -from unit_test_api.components.schema.unevaluateditems_depends_on_multiple_nested_contains import UnevaluateditemsDependsOnMultipleNestedContains -from unit_test_api.components.schema.unevaluateditems_with_items import UnevaluateditemsWithItems -from unit_test_api.components.schema.unevaluateditems_with_null_instance_elements import UnevaluateditemsWithNullInstanceElements -from unit_test_api.components.schema.unevaluatedproperties_not_affected_by_propertynames import UnevaluatedpropertiesNotAffectedByPropertynames -from unit_test_api.components.schema.unevaluatedproperties_schema import UnevaluatedpropertiesSchema -from unit_test_api.components.schema.unevaluatedproperties_with_adjacent_additionalproperties import UnevaluatedpropertiesWithAdjacentAdditionalproperties -from unit_test_api.components.schema.unevaluatedproperties_with_null_valued_instance_properties import UnevaluatedpropertiesWithNullValuedInstanceProperties -from unit_test_api.components.schema.uniqueitems_false_validation import UniqueitemsFalseValidation -from unit_test_api.components.schema.uniqueitems_false_with_an_array_of_items import UniqueitemsFalseWithAnArrayOfItems -from unit_test_api.components.schema.uniqueitems_validation import UniqueitemsValidation -from unit_test_api.components.schema.uniqueitems_with_an_array_of_items import UniqueitemsWithAnArrayOfItems -from unit_test_api.components.schema.uri_format import UriFormat -from unit_test_api.components.schema.uri_reference_format import UriReferenceFormat -from unit_test_api.components.schema.uri_template_format import UriTemplateFormat -from unit_test_api.components.schema.uuid_format import UuidFormat -from unit_test_api.components.schema.validate_against_correct_branch_then_vs_else import ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py deleted file mode 100644 index 454797c5140..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/api_configuration.py +++ /dev/null @@ -1,281 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing -import typing_extensions - -import urllib3 - -from unit_test_api import exceptions -from unit_test_api.servers import server_0 - -# the server to use at each openapi document json path -ServerInfo = typing.TypedDict( - 'ServerInfo', - { - 'servers/0': server_0.Server0, - }, - total=False -) - - -class ServerIndexInfoRequired(typing.TypedDict): - servers: typing.Literal[0] - -ServerIndexInfoOptional = typing.TypedDict( - 'ServerIndexInfoOptional', - { - }, - total=False -) - - -class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): - """ - the default server_index to use at each openapi document json path - the fallback value is stored in the 'servers' key - """ - - -class ApiConfiguration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param server_info: the servers that can be used to make endpoint calls - :param server_index_info: index to servers configuration - """ - - def __init__( - self, - server_info: typing.Optional[ServerInfo] = None, - server_index_info: typing.Optional[ServerIndexInfo] = None, - ): - """Constructor - """ - # Authentication Settings - self.security_scheme_info: typing.Dict[str, typing.Any] = {} - self.security_index_info = {'security': 0} - # Server Info - self.server_info: ServerInfo = server_info or { - 'servers/0': server_0.Server0(), - } - self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("unit_test_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_server_url( - self, - key_prefix: typing.Literal[ - "servers", - ], - index: typing.Optional[int], - ) -> str: - """Gets host URL based on the index - :param index: array index of the host settings - :return: URL based on host settings - """ - if index: - used_index = index - else: - try: - used_index = self.server_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.server_index_info.get("servers", 0) - server_info_key = typing.cast( - typing.Literal[ - "servers/0", - ], - f"{key_prefix}/{used_index}" - ) - try: - server = self.server_info[server_info_key] - except KeyError as ex: - raise ex - return server.url diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py deleted file mode 100644 index b0684d73d5f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/configurations/schema_configuration.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -from unit_test_api import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'additional_properties': 'additionalProperties', - 'all_of': 'allOf', - 'any_of': 'anyOf', - 'const_value_to_name': 'const', - 'contains': 'contains', - 'dependent_required': 'dependentRequired', - 'dependent_schemas': 'dependentSchemas', - 'discriminator': 'discriminator', - # default omitted because it has no validation impact - 'else_': 'else', - 'enum_value_to_name': 'enum', - 'exclusive_maximum': 'exclusiveMaximum', - 'exclusive_minimum': 'exclusiveMinimum', - 'format': 'format', - 'if_': 'if', - 'inclusive_maximum': 'maximum', - 'inclusive_minimum': 'minimum', - 'items': 'items', - 'max_contains': 'maxContains', - 'max_items': 'maxItems', - 'max_length': 'maxLength', - 'max_properties': 'maxProperties', - 'min_contains': 'minContains', - 'min_items': 'minItems', - 'min_length': 'minLength', - 'min_properties': 'minProperties', - 'multiple_of': 'multipleOf', - 'not_': 'not', - 'one_of': 'oneOf', - 'pattern': 'pattern', - 'pattern_properties': 'patternProperties', - 'prefix_items': 'prefixItems', - 'properties': 'properties', - 'property_names': 'propertyNames', - 'required': 'required', - 'then': 'then', - 'types': 'type', - 'unique_items': 'uniqueItems', - 'unevaluated_items': 'unevaluatedItems', - 'unevaluated_properties': 'unevaluatedProperties' -} - -class SchemaConfiguration: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - """ - - def __init__( - self, - disabled_json_schema_keywords = set(), - ): - """Constructor - """ - self.disabled_json_schema_keywords = disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py deleted file mode 100644 index 3843c84be18..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/exceptions.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -from unit_test_api import api_response - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - -T = typing.TypeVar('T', bound=api_response.ApiResponse) - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: typing.Optional[str] = None - api_response: typing.Optional[T] = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.api_response: - if self.api_response.response.headers: - error_message += "HTTP response headers: {0}\n".format( - self.api_response.response.headers) - if self.api_response.response.data: - error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) - - return error_message diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py deleted file mode 100644 index 2c2c9cc4bdc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis import path_to_api diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py deleted file mode 100644 index 972a0679fc7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_a_schema_given_for_prefixitems_request_body import RequestBodyPostASchemaGivenForPrefixitemsRequestBody - -path = "/requestBody/postASchemaGivenForPrefixitemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py deleted file mode 100644 index a4b93b19651..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import a_schema_given_for_prefixitems - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_a_schema_given_for_prefixitems_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_a_schema_given_for_prefixitems_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_a_schema_given_for_prefixitems_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostASchemaGivenForPrefixitemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_a_schema_given_for_prefixitems_request_body = BaseApi._post_a_schema_given_for_prefixitems_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_a_schema_given_for_prefixitems_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 03fda6470fc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import a_schema_given_for_prefixitems -Schema2: typing_extensions.TypeAlias = a_schema_given_for_prefixitems.ASchemaGivenForPrefixitems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py deleted file mode 100644 index b5a1da9f408..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additional_items_are_allowed_by_default_request_body import RequestBodyPostAdditionalItemsAreAllowedByDefaultRequestBody - -path = "/requestBody/postAdditionalItemsAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py deleted file mode 100644 index 9b130485e72..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_items_are_allowed_by_default - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additional_items_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additional_items_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additional_items_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalItemsAreAllowedByDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additional_items_are_allowed_by_default_request_body = BaseApi._post_additional_items_are_allowed_by_default_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additional_items_are_allowed_by_default_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 15e21c81b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_items_are_allowed_by_default -Schema2: typing_extensions.TypeAlias = additional_items_are_allowed_by_default.AdditionalItemsAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py deleted file mode 100644 index 5190cb5eaa5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody - -path = "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py deleted file mode 100644 index e3a767fb516..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_are_allowed_by_default_request_body = BaseApi._post_additionalproperties_are_allowed_by_default_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_are_allowed_by_default_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f320e878562..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default -Schema2: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py deleted file mode 100644 index 642b03110eb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody - -path = "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py deleted file mode 100644 index c49263d964f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDictInput, - additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_can_exist_by_itself_request_body = BaseApi._post_additionalproperties_can_exist_by_itself_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_can_exist_by_itself_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b7fce07ef58..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself -Schema2: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py deleted file mode 100644 index 0fd803cb9c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody - -path = "/requestBody/postAdditionalpropertiesDoesNotLookInApplicatorsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py deleted file mode 100644 index 009c73d6f78..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_does_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_does_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_does_not_look_in_applicators_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesDoesNotLookInApplicatorsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_does_not_look_in_applicators_request_body = BaseApi._post_additionalproperties_does_not_look_in_applicators_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_does_not_look_in_applicators_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e194ba355a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators -Schema2: typing_extensions.TypeAlias = additionalproperties_does_not_look_in_applicators.AdditionalpropertiesDoesNotLookInApplicators diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py deleted file mode 100644 index abe8e789e71..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body import RequestBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody - -path = "/requestBody/postAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py deleted file mode 100644 index c9b8aff1e5a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDictInput, - additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_with_null_valued_instance_properties_request_body = BaseApi._post_additionalproperties_with_null_valued_instance_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ff0333176a0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py deleted file mode 100644 index 9ca0006c2c1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_additionalproperties_with_schema_request_body import RequestBodyPostAdditionalpropertiesWithSchemaRequestBody - -path = "/requestBody/postAdditionalpropertiesWithSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py deleted file mode 100644 index 1a9af7581aa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_with_schema_request_body( - self, - body: typing.Union[ - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_with_schema_request_body( - self, - body: typing.Union[ - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_with_schema_request_body( - self, - body: typing.Union[ - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDictInput, - additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesWithSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_with_schema_request_body = BaseApi._post_additionalproperties_with_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_with_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e457613c9a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_schema -Schema2: typing_extensions.TypeAlias = additionalproperties_with_schema.AdditionalpropertiesWithSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py deleted file mode 100644 index ed94c39ba95..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody - -path = "/requestBody/postAllofCombinedWithAnyofOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py deleted file mode 100644 index 91edc43c717..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_combined_with_anyof_oneof_request_body = BaseApi._post_allof_combined_with_anyof_oneof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_combined_with_anyof_oneof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e6f7ceccca4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof -Schema2: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py deleted file mode 100644 index 5b7f8d32e3e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody - -path = "/requestBody/postAllofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py deleted file mode 100644 index d5fbaa13525..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_request_body = BaseApi._post_allof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 58ea8d6fe3c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof -Schema2: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py deleted file mode 100644 index 0b0cfa4160b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody - -path = "/requestBody/postAllofSimpleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py deleted file mode 100644 index 555910f6843..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofSimpleTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_simple_types_request_body = BaseApi._post_allof_simple_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_simple_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 04ffe7a5c26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types -Schema2: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 08c83aaec1b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody - -path = "/requestBody/postAllofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index 94caf2c34f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_base_schema_request_body = BaseApi._post_allof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 68c4f35329d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema -Schema2: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index aea2f6ab6ed..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody - -path = "/requestBody/postAllofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py deleted file mode 100644 index a7f8d59ecf2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_one_empty_schema_request_body = BaseApi._post_allof_with_one_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_one_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 53fd4ffe2fe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py deleted file mode 100644 index 7aa083ee5bd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody - -path = "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py deleted file mode 100644 index 5c369074c0e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_first_empty_schema_request_body = BaseApi._post_allof_with_the_first_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_first_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4a8764a76f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py deleted file mode 100644 index 9daab2c7562..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody - -path = "/requestBody/postAllofWithTheLastEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py deleted file mode 100644 index 12d937153ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_last_empty_schema_request_body = BaseApi._post_allof_with_the_last_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_last_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index dffb1658cb6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py deleted file mode 100644 index d46b12c2bfe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody - -path = "/requestBody/postAllofWithTwoEmptySchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py deleted file mode 100644 index a681fb5025b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_two_empty_schemas_request_body = BaseApi._post_allof_with_two_empty_schemas_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_two_empty_schemas_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6c0ee15f391..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas -Schema2: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py deleted file mode 100644 index 30ce22d14d9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody - -path = "/requestBody/postAnyofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py deleted file mode 100644 index ce387aad34f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_complex_types_request_body = BaseApi._post_anyof_complex_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_complex_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5cf2d870bec..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types -Schema2: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py deleted file mode 100644 index 0a3eeb92ed7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody - -path = "/requestBody/postAnyofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py deleted file mode 100644 index fa3969cbce9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_request_body = BaseApi._post_anyof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fd388ae0816..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof -Schema2: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 582eec5d98e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody - -path = "/requestBody/postAnyofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index 928c418c7e3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_base_schema_request_body = BaseApi._post_anyof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 50467d99daa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema -Schema2: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index 276553e3f77..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody - -path = "/requestBody/postAnyofWithOneEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py deleted file mode 100644 index f75d8a9a4a1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_one_empty_schema_request_body = BaseApi._post_anyof_with_one_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_one_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7399a723ae4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema -Schema2: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py deleted file mode 100644 index d8aa6c7999e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody - -path = "/requestBody/postArrayTypeMatchesArraysRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py deleted file mode 100644 index 9fd769aee48..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostArrayTypeMatchesArraysRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_array_type_matches_arrays_request_body = BaseApi._post_array_type_matches_arrays_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_array_type_matches_arrays_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e5b3f23185a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays -Schema2: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py deleted file mode 100644 index 04cf90ab91d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody - -path = "/requestBody/postBooleanTypeMatchesBooleansRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py deleted file mode 100644 index b670c895942..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_boolean_type_matches_booleans_request_body( - self, - body: bool, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_boolean_type_matches_booleans_request_body = BaseApi._post_boolean_type_matches_booleans_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_boolean_type_matches_booleans_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d4e345c87b1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans -Schema2: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py deleted file mode 100644 index 9b8e641c5f0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody - -path = "/requestBody/postByIntRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py deleted file mode 100644 index f8fbd45cc79..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_int_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByIntRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_int_request_body = BaseApi._post_by_int_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_int_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ce650694a07..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int -Schema2: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py deleted file mode 100644 index 3625b98cb9c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody - -path = "/requestBody/postByNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py deleted file mode 100644 index 36a71a07663..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_number_request_body = BaseApi._post_by_number_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_number_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ab6f9a04822..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number -Schema2: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py deleted file mode 100644 index cb0bd6eeac1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody - -path = "/requestBody/postBySmallNumberRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py deleted file mode 100644 index 2312317913c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_small_number_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBySmallNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_small_number_request_body = BaseApi._post_by_small_number_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_small_number_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4508b52a87d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number -Schema2: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py deleted file mode 100644 index 8e211944e53..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_const_nul_characters_in_strings_request_body import RequestBodyPostConstNulCharactersInStringsRequestBody - -path = "/requestBody/postConstNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py deleted file mode 100644 index 20c73783324..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import const_nul_characters_in_strings - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_const_nul_characters_in_strings_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_const_nul_characters_in_strings_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_const_nul_characters_in_strings_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostConstNulCharactersInStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_const_nul_characters_in_strings_request_body = BaseApi._post_const_nul_characters_in_strings_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_const_nul_characters_in_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 563f2c99b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import const_nul_characters_in_strings -Schema2: typing_extensions.TypeAlias = const_nul_characters_in_strings.ConstNulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py deleted file mode 100644 index 34eab770b79..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_contains_keyword_validation_request_body import RequestBodyPostContainsKeywordValidationRequestBody - -path = "/requestBody/postContainsKeywordValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py deleted file mode 100644 index fd5dcdca9b9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_keyword_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_contains_keyword_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_contains_keyword_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_contains_keyword_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostContainsKeywordValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_contains_keyword_validation_request_body = BaseApi._post_contains_keyword_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_contains_keyword_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f519bece380..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_keyword_validation -Schema2: typing_extensions.TypeAlias = contains_keyword_validation.ContainsKeywordValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py deleted file mode 100644 index d7ca471535c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_contains_with_null_instance_elements_request_body import RequestBodyPostContainsWithNullInstanceElementsRequestBody - -path = "/requestBody/postContainsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py deleted file mode 100644 index 9d2dedfdf9a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_with_null_instance_elements - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_contains_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_contains_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_contains_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostContainsWithNullInstanceElementsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_contains_with_null_instance_elements_request_body = BaseApi._post_contains_with_null_instance_elements_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_contains_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f239f206444..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = contains_with_null_instance_elements.ContainsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py deleted file mode 100644 index 881d8a9ff1e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_date_format_request_body import RequestBodyPostDateFormatRequestBody - -path = "/requestBody/postDateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py deleted file mode 100644 index 0d9372f69c6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_format_request_body = BaseApi._post_date_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d8ee34fd280..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_format -Schema2: typing_extensions.TypeAlias = date_format.DateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py deleted file mode 100644 index fe71ff77c36..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody - -path = "/requestBody/postDateTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py deleted file mode 100644 index f97fd17f451..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateTimeFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_time_format_request_body = BaseApi._post_date_time_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_time_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d9c84ea8aca..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format -Schema2: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 5dbed6ecd7e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body import RequestBodyPostDependentSchemasDependenciesWithEscapedCharactersRequestBody - -path = "/requestBody/postDependentSchemasDependenciesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index f8318756306..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_dependencies_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasDependenciesWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_dependencies_with_escaped_characters_request_body = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2843b8be0d3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters -Schema2: typing_extensions.TypeAlias = dependent_schemas_dependencies_with_escaped_characters.DependentSchemasDependenciesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py deleted file mode 100644 index 7c3df7f2d5f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body import RequestBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody - -path = "/requestBody/postDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py deleted file mode 100644 index 81825fc5862..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasDependentSubschemaIncompatibleWithRootRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 85ff65ae213..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root -Schema2: typing_extensions.TypeAlias = dependent_schemas_dependent_subschema_incompatible_with_root.DependentSchemasDependentSubschemaIncompatibleWithRoot diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py deleted file mode 100644 index ff5c1c16db3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_dependent_schemas_single_dependency_request_body import RequestBodyPostDependentSchemasSingleDependencyRequestBody - -path = "/requestBody/postDependentSchemasSingleDependencyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py deleted file mode 100644 index 3e8b1c2abf6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_single_dependency - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasSingleDependencyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_single_dependency_request_body = BaseApi._post_dependent_schemas_single_dependency_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_single_dependency_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d9a02a6c025..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_single_dependency -Schema2: typing_extensions.TypeAlias = dependent_schemas_single_dependency.DependentSchemasSingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py deleted file mode 100644 index 37732fa1eb0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_duration_format_request_body import RequestBodyPostDurationFormatRequestBody - -path = "/requestBody/postDurationFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py deleted file mode 100644 index 156290db6b7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import duration_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_duration_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_duration_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_duration_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDurationFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_duration_format_request_body = BaseApi._post_duration_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_duration_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1919784341f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import duration_format -Schema2: typing_extensions.TypeAlias = duration_format.DurationFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py deleted file mode 100644 index 343ccc2d7e7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody - -path = "/requestBody/postEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py deleted file mode 100644 index 98f3f44dd6d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmailFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_email_format_request_body = BaseApi._post_email_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_email_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5043f89584b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format -Schema2: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py deleted file mode 100644 index 563bc0c6c7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_empty_dependents_request_body import RequestBodyPostEmptyDependentsRequestBody - -path = "/requestBody/postEmptyDependentsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py deleted file mode 100644 index 2a92de49c44..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import empty_dependents - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_empty_dependents_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_empty_dependents_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_empty_dependents_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmptyDependentsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_empty_dependents_request_body = BaseApi._post_empty_dependents_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_empty_dependents_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index aa466ad9a06..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import empty_dependents -Schema2: typing_extensions.TypeAlias = empty_dependents.EmptyDependents diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py deleted file mode 100644 index 6278f4f37bd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody - -path = "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py deleted file mode 100644 index 61ec05fc9f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with0_does_not_match_false_request_body = BaseApi._post_enum_with0_does_not_match_false_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with0_does_not_match_false_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1fba80557bf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false -Schema2: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py deleted file mode 100644 index 2192491c663..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody - -path = "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py deleted file mode 100644 index 6180860a7c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with1_does_not_match_true_request_body = BaseApi._post_enum_with1_does_not_match_true_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with1_does_not_match_true_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 58e4afb2697..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true -Schema2: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index f4b3a43f028..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody - -path = "/requestBody/postEnumWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index 2cb4c758b23..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Literal[ - "foo\nbar", - "foo\rbar" - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_escaped_characters_request_body = BaseApi._post_enum_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 716a7b075de..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters -Schema2: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py deleted file mode 100644 index 3a9b589fde9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody - -path = "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py deleted file mode 100644 index 4f29320a179..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Literal[ - False - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_false_does_not_match0_request_body = BaseApi._post_enum_with_false_does_not_match0_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_false_does_not_match0_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fa242d67709..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 -Schema2: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py deleted file mode 100644 index 1ccbf7eb9c3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody - -path = "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py deleted file mode 100644 index 422b5aac77a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Literal[ - True - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_true_does_not_match1_request_body = BaseApi._post_enum_with_true_does_not_match1_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_true_does_not_match1_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ee7e09e06bd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 -Schema2: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py deleted file mode 100644 index 83f65d50bbf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody - -path = "/requestBody/postEnumsInPropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py deleted file mode 100644 index 0f93cd467b2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - enums_in_properties.EnumsInPropertiesDictInput, - enums_in_properties.EnumsInPropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumsInPropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enums_in_properties_request_body = BaseApi._post_enums_in_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enums_in_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e62f262bdfe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties -Schema2: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py deleted file mode 100644 index e2f72d08b72..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_exclusivemaximum_validation_request_body import RequestBodyPostExclusivemaximumValidationRequestBody - -path = "/requestBody/postExclusivemaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py deleted file mode 100644 index c0a0dcd696d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusivemaximum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_exclusivemaximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_exclusivemaximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_exclusivemaximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostExclusivemaximumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_exclusivemaximum_validation_request_body = BaseApi._post_exclusivemaximum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_exclusivemaximum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index dbc0369f87f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusivemaximum_validation -Schema2: typing_extensions.TypeAlias = exclusivemaximum_validation.ExclusivemaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py deleted file mode 100644 index 8e6b4a5ebf1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_exclusiveminimum_validation_request_body import RequestBodyPostExclusiveminimumValidationRequestBody - -path = "/requestBody/postExclusiveminimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py deleted file mode 100644 index a8fce568d5a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusiveminimum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_exclusiveminimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_exclusiveminimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_exclusiveminimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostExclusiveminimumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_exclusiveminimum_validation_request_body = BaseApi._post_exclusiveminimum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_exclusiveminimum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2b423e4a8de..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusiveminimum_validation -Schema2: typing_extensions.TypeAlias = exclusiveminimum_validation.ExclusiveminimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py deleted file mode 100644 index e979241b0f4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_float_division_inf_request_body import RequestBodyPostFloatDivisionInfRequestBody - -path = "/requestBody/postFloatDivisionInfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py deleted file mode 100644 index e0bbd6ed5db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import float_division_inf - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_float_division_inf_request_body( - self, - body: int, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostFloatDivisionInfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_float_division_inf_request_body = BaseApi._post_float_division_inf_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_float_division_inf_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 93e1dd44d11..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import float_division_inf -Schema2: typing_extensions.TypeAlias = float_division_inf.FloatDivisionInf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py deleted file mode 100644 index dc0ec75dc30..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody - -path = "/requestBody/postForbiddenPropertyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py deleted file mode 100644 index e79b407ba62..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostForbiddenPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_forbidden_property_request_body = BaseApi._post_forbidden_property_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_forbidden_property_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a20158e1e64..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property -Schema2: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py deleted file mode 100644 index 3ae4314eb5a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody - -path = "/requestBody/postHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py deleted file mode 100644 index 7ae0d1b32ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostHostnameFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_hostname_format_request_body = BaseApi._post_hostname_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_hostname_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 71160bda951..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format -Schema2: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py deleted file mode 100644 index 9c97bd86295..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_idn_email_format_request_body import RequestBodyPostIdnEmailFormatRequestBody - -path = "/requestBody/postIdnEmailFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py deleted file mode 100644 index 43f9a777467..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_email_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_idn_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_idn_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_idn_email_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIdnEmailFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_idn_email_format_request_body = BaseApi._post_idn_email_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_idn_email_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index bdcb513c406..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_email_format -Schema2: typing_extensions.TypeAlias = idn_email_format.IdnEmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py deleted file mode 100644 index 97a1c3a7a38..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_idn_hostname_format_request_body import RequestBodyPostIdnHostnameFormatRequestBody - -path = "/requestBody/postIdnHostnameFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py deleted file mode 100644 index ddb5366dc14..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_hostname_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_idn_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_idn_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_idn_hostname_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIdnHostnameFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_idn_hostname_format_request_body = BaseApi._post_idn_hostname_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_idn_hostname_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 08005f9e7ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_hostname_format -Schema2: typing_extensions.TypeAlias = idn_hostname_format.IdnHostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py deleted file mode 100644 index f0a3919ddfd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_if_and_else_without_then_request_body import RequestBodyPostIfAndElseWithoutThenRequestBody - -path = "/requestBody/postIfAndElseWithoutThenRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py deleted file mode 100644 index 385d781ffbf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_else_without_then - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_and_else_without_then_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_and_else_without_then_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_and_else_without_then_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAndElseWithoutThenRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_and_else_without_then_request_body = BaseApi._post_if_and_else_without_then_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_and_else_without_then_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 539f547c303..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_else_without_then -Schema2: typing_extensions.TypeAlias = if_and_else_without_then.IfAndElseWithoutThen diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py deleted file mode 100644 index 85747ded97b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_if_and_then_without_else_request_body import RequestBodyPostIfAndThenWithoutElseRequestBody - -path = "/requestBody/postIfAndThenWithoutElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py deleted file mode 100644 index f922d58ef84..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_then_without_else - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_and_then_without_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_and_then_without_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_and_then_without_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAndThenWithoutElseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_and_then_without_else_request_body = BaseApi._post_if_and_then_without_else_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_and_then_without_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6af342aacad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_then_without_else -Schema2: typing_extensions.TypeAlias = if_and_then_without_else.IfAndThenWithoutElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py deleted file mode 100644 index f4396f026e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body import RequestBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody - -path = "/requestBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py deleted file mode 100644 index 93acf03cdb2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 813371f1669..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence -Schema2: typing_extensions.TypeAlias = if_appears_at_the_end_when_serialized_keyword_processing_sequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py deleted file mode 100644 index e6d431a11ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ignore_else_without_if_request_body import RequestBodyPostIgnoreElseWithoutIfRequestBody - -path = "/requestBody/postIgnoreElseWithoutIfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py deleted file mode 100644 index 0dd3d286a6e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_else_without_if - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_else_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_else_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_else_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreElseWithoutIfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_else_without_if_request_body = BaseApi._post_ignore_else_without_if_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_else_without_if_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c133595c014..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_else_without_if -Schema2: typing_extensions.TypeAlias = ignore_else_without_if.IgnoreElseWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py deleted file mode 100644 index a4ee9a63ac9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ignore_if_without_then_or_else_request_body import RequestBodyPostIgnoreIfWithoutThenOrElseRequestBody - -path = "/requestBody/postIgnoreIfWithoutThenOrElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py deleted file mode 100644 index 0938e1d2e94..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_if_without_then_or_else - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_if_without_then_or_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_if_without_then_or_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_if_without_then_or_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreIfWithoutThenOrElseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_if_without_then_or_else_request_body = BaseApi._post_ignore_if_without_then_or_else_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_if_without_then_or_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d481bc18fd2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_if_without_then_or_else -Schema2: typing_extensions.TypeAlias = ignore_if_without_then_or_else.IgnoreIfWithoutThenOrElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py deleted file mode 100644 index b2e6b3c053c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ignore_then_without_if_request_body import RequestBodyPostIgnoreThenWithoutIfRequestBody - -path = "/requestBody/postIgnoreThenWithoutIfRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py deleted file mode 100644 index 0f2426167ad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_then_without_if - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_then_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_then_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_then_without_if_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreThenWithoutIfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_then_without_if_request_body = BaseApi._post_ignore_then_without_if_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_then_without_if_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9613e4b85c2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_then_without_if -Schema2: typing_extensions.TypeAlias = ignore_then_without_if.IgnoreThenWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py deleted file mode 100644 index 6ebb39e9071..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody - -path = "/requestBody/postIntegerTypeMatchesIntegersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py deleted file mode 100644 index 85284949220..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_integer_type_matches_integers_request_body( - self, - body: int, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_integer_type_matches_integers_request_body = BaseApi._post_integer_type_matches_integers_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_integer_type_matches_integers_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 75015a55e57..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers -Schema2: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py deleted file mode 100644 index 0121543e6ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody - -path = "/requestBody/postIpv4FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py deleted file mode 100644 index 466fb58afba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv4FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv4_format_request_body = BaseApi._post_ipv4_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv4_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 55901e0867d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format -Schema2: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py deleted file mode 100644 index ea64fe2d5bf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody - -path = "/requestBody/postIpv6FormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py deleted file mode 100644 index 306fed20616..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv6FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv6_format_request_body = BaseApi._post_ipv6_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv6_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f664f74ba26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format -Schema2: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py deleted file mode 100644 index 70084af2845..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_iri_format_request_body import RequestBodyPostIriFormatRequestBody - -path = "/requestBody/postIriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py deleted file mode 100644 index 5acdd07b313..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_iri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_iri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_iri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIriFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_iri_format_request_body = BaseApi._post_iri_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_iri_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2d5ce8c0714..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_format -Schema2: typing_extensions.TypeAlias = iri_format.IriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py deleted file mode 100644 index c10ecb7a137..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_iri_reference_format_request_body import RequestBodyPostIriReferenceFormatRequestBody - -path = "/requestBody/postIriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py deleted file mode 100644 index eb62d783a08..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_reference_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_iri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_iri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_iri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIriReferenceFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_iri_reference_format_request_body = BaseApi._post_iri_reference_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_iri_reference_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e38e4efe7af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_reference_format -Schema2: typing_extensions.TypeAlias = iri_reference_format.IriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py deleted file mode 100644 index bcf75d2d0d7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_items_contains_request_body import RequestBodyPostItemsContainsRequestBody - -path = "/requestBody/postItemsContainsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py deleted file mode 100644 index 6547cb3cbea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_contains - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_contains_request_body( - self, - body: typing.Union[ - items_contains.ItemsContainsTupleInput, - items_contains.ItemsContainsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_contains_request_body( - self, - body: typing.Union[ - items_contains.ItemsContainsTupleInput, - items_contains.ItemsContainsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_contains_request_body( - self, - body: typing.Union[ - items_contains.ItemsContainsTupleInput, - items_contains.ItemsContainsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsContainsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_contains_request_body = BaseApi._post_items_contains_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_contains_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 75681108ad2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_contains -Schema2: typing_extensions.TypeAlias = items_contains.ItemsContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py deleted file mode 100644 index 8396a09cdd7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body import RequestBodyPostItemsDoesNotLookInApplicatorsValidCaseRequestBody - -path = "/requestBody/postItemsDoesNotLookInApplicatorsValidCaseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py deleted file mode 100644 index 72abdcb5431..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_does_not_look_in_applicators_valid_case_request_body( - self, - body: typing.Union[ - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_does_not_look_in_applicators_valid_case_request_body( - self, - body: typing.Union[ - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_does_not_look_in_applicators_valid_case_request_body( - self, - body: typing.Union[ - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTupleInput, - items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsDoesNotLookInApplicatorsValidCaseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_does_not_look_in_applicators_valid_case_request_body = BaseApi._post_items_does_not_look_in_applicators_valid_case_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_does_not_look_in_applicators_valid_case_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 56c52e9e116..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case -Schema2: typing_extensions.TypeAlias = items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCase diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py deleted file mode 100644 index 08615840da4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_items_with_null_instance_elements_request_body import RequestBodyPostItemsWithNullInstanceElementsRequestBody - -path = "/requestBody/postItemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py deleted file mode 100644 index 3c67e6c725b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_with_null_instance_elements - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_with_null_instance_elements_request_body( - self, - body: typing.Union[ - items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, - items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_with_null_instance_elements_request_body( - self, - body: typing.Union[ - items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, - items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_with_null_instance_elements_request_body( - self, - body: typing.Union[ - items_with_null_instance_elements.ItemsWithNullInstanceElementsTupleInput, - items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsWithNullInstanceElementsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_with_null_instance_elements_request_body = BaseApi._post_items_with_null_instance_elements_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 60737c9dad5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = items_with_null_instance_elements.ItemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py deleted file mode 100644 index 01fde730e5a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody - -path = "/requestBody/postJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py deleted file mode 100644 index 1cea61a5ef6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostJsonPointerFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_json_pointer_format_request_body = BaseApi._post_json_pointer_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_json_pointer_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 489bbe53817..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format -Schema2: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py deleted file mode 100644 index a9553e628ef..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body import RequestBodyPostMaxcontainsWithoutContainsIsIgnoredRequestBody - -path = "/requestBody/postMaxcontainsWithoutContainsIsIgnoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py deleted file mode 100644 index ed136362c6b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxcontains_without_contains_is_ignored - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxcontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxcontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxcontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxcontainsWithoutContainsIsIgnoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxcontains_without_contains_is_ignored_request_body = BaseApi._post_maxcontains_without_contains_is_ignored_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxcontains_without_contains_is_ignored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ebd36d19ec3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxcontains_without_contains_is_ignored -Schema2: typing_extensions.TypeAlias = maxcontains_without_contains_is_ignored.MaxcontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py deleted file mode 100644 index e154f1fcdb2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody - -path = "/requestBody/postMaximumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py deleted file mode 100644 index cca2b5a02a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_request_body = BaseApi._post_maximum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b73de2ae539..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation -Schema2: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py deleted file mode 100644 index 6ad11512c97..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody - -path = "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py deleted file mode 100644 index d5880de2fc9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_with_unsigned_integer_request_body = BaseApi._post_maximum_validation_with_unsigned_integer_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_with_unsigned_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a5cb9f890fd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer -Schema2: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py deleted file mode 100644 index 713fdb3d848..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody - -path = "/requestBody/postMaxitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py deleted file mode 100644 index 54c1e39012a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxitems_validation_request_body = BaseApi._post_maxitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 16c2894ebba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation -Schema2: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py deleted file mode 100644 index 5c8fb246f4e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody - -path = "/requestBody/postMaxlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py deleted file mode 100644 index 27fa550cc70..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxlength_validation_request_body = BaseApi._post_maxlength_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxlength_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d94050ba037..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation -Schema2: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py deleted file mode 100644 index ee07bbdbbbd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody - -path = "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py deleted file mode 100644 index 5267de99fda..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties0_means_the_object_is_empty_request_body = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties0_means_the_object_is_empty_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1c24d48d19b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty -Schema2: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py deleted file mode 100644 index bc81917babb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody - -path = "/requestBody/postMaxpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py deleted file mode 100644 index 2dfe5bbd95a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties_validation_request_body = BaseApi._post_maxproperties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e5bd830805a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation -Schema2: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py deleted file mode 100644 index 61e149c8f8d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_mincontains_without_contains_is_ignored_request_body import RequestBodyPostMincontainsWithoutContainsIsIgnoredRequestBody - -path = "/requestBody/postMincontainsWithoutContainsIsIgnoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py deleted file mode 100644 index 935570c2c97..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mincontains_without_contains_is_ignored - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_mincontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_mincontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_mincontains_without_contains_is_ignored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMincontainsWithoutContainsIsIgnoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_mincontains_without_contains_is_ignored_request_body = BaseApi._post_mincontains_without_contains_is_ignored_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_mincontains_without_contains_is_ignored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 68d35232895..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mincontains_without_contains_is_ignored -Schema2: typing_extensions.TypeAlias = mincontains_without_contains_is_ignored.MincontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py deleted file mode 100644 index ad9ce2f4096..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody - -path = "/requestBody/postMinimumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py deleted file mode 100644 index cdf97e46f41..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_request_body = BaseApi._post_minimum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 675ae689104..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation -Schema2: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py deleted file mode 100644 index 5dadedfe25a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody - -path = "/requestBody/postMinimumValidationWithSignedIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py deleted file mode 100644 index e969e45a34c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_with_signed_integer_request_body = BaseApi._post_minimum_validation_with_signed_integer_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_with_signed_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 06b5dea583e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer -Schema2: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py deleted file mode 100644 index 0f7cc0c1305..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody - -path = "/requestBody/postMinitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py deleted file mode 100644 index 19fcba11479..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minitems_validation_request_body = BaseApi._post_minitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 29f288f2b17..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation -Schema2: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py deleted file mode 100644 index 0fa95af2e9d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody - -path = "/requestBody/postMinlengthValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py deleted file mode 100644 index cb549983d29..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minlength_validation_request_body = BaseApi._post_minlength_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minlength_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 618e8ab4279..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation -Schema2: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py deleted file mode 100644 index 3373bc97244..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody - -path = "/requestBody/postMinpropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py deleted file mode 100644 index 408503016ed..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minproperties_validation_request_body = BaseApi._post_minproperties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minproperties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index f6e1a9b1c20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation -Schema2: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py deleted file mode 100644 index 20e856d6c42..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_multiple_dependents_required_request_body import RequestBodyPostMultipleDependentsRequiredRequestBody - -path = "/requestBody/postMultipleDependentsRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py deleted file mode 100644 index 3c0be68e4a6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_dependents_required - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_dependents_required_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_dependents_required_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_dependents_required_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleDependentsRequiredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_dependents_required_request_body = BaseApi._post_multiple_dependents_required_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_dependents_required_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 3ba1ea03ac2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_dependents_required -Schema2: typing_extensions.TypeAlias = multiple_dependents_required.MultipleDependentsRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py deleted file mode 100644 index 0998431112c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body import RequestBodyPostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody - -path = "/requestBody/postMultipleSimultaneousPatternpropertiesAreValidatedRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py deleted file mode 100644 index e75f07d9fa5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_simultaneous_patternproperties_are_validated_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_simultaneous_patternproperties_are_validated_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_simultaneous_patternproperties_are_validated_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleSimultaneousPatternpropertiesAreValidatedRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_simultaneous_patternproperties_are_validated_request_body = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 66dd94e3c9e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated -Schema2: typing_extensions.TypeAlias = multiple_simultaneous_patternproperties_are_validated.MultipleSimultaneousPatternpropertiesAreValidated diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py deleted file mode 100644 index d557c68d471..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body import RequestBodyPostMultipleTypesCanBeSpecifiedInAnArrayRequestBody - -path = "/requestBody/postMultipleTypesCanBeSpecifiedInAnArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py deleted file mode 100644 index 3136826bcd9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_types_can_be_specified_in_an_array_request_body( - self, - body: typing.Union[ - int, - str, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_types_can_be_specified_in_an_array_request_body( - self, - body: typing.Union[ - int, - str, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_types_can_be_specified_in_an_array_request_body( - self, - body: typing.Union[ - int, - str, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleTypesCanBeSpecifiedInAnArrayRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_types_can_be_specified_in_an_array_request_body = BaseApi._post_multiple_types_can_be_specified_in_an_array_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_types_can_be_specified_in_an_array_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2d953804838..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array -Schema2: typing_extensions.TypeAlias = multiple_types_can_be_specified_in_an_array.MultipleTypesCanBeSpecifiedInAnArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index fa5ad4e8f6f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index b9883a102de..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_allof_to_check_validation_semantics_request_body = BaseApi._post_nested_allof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_allof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1aaa108330d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 809df9f9000..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index 430c5ee60fc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_anyof_to_check_validation_semantics_request_body = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_anyof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4d81833ca5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py deleted file mode 100644 index ac24cf6aa52..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody - -path = "/requestBody/postNestedItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py deleted file mode 100644 index 53604ab38a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_items_request_body( - self, - body: typing.Union[ - nested_items.NestedItemsTupleInput, - nested_items.NestedItemsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_items_request_body = BaseApi._post_nested_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8a0193a2831..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items -Schema2: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 53864f06e40..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody - -path = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py deleted file mode 100644 index b04ec723d1a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_oneof_to_check_validation_semantics_request_body = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_oneof_to_check_validation_semantics_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 164ce7d2feb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py deleted file mode 100644 index 1e784160f84..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body import RequestBodyPostNonAsciiPatternWithAdditionalpropertiesRequestBody - -path = "/requestBody/postNonAsciiPatternWithAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py deleted file mode 100644 index cc7250e6eff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_non_ascii_pattern_with_additionalproperties_request_body( - self, - body: typing.Union[ - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_non_ascii_pattern_with_additionalproperties_request_body( - self, - body: typing.Union[ - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_non_ascii_pattern_with_additionalproperties_request_body( - self, - body: typing.Union[ - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDictInput, - non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNonAsciiPatternWithAdditionalpropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_non_ascii_pattern_with_additionalproperties_request_body = BaseApi._post_non_ascii_pattern_with_additionalproperties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_non_ascii_pattern_with_additionalproperties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fe71df0ddc0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties -Schema2: typing_extensions.TypeAlias = non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py deleted file mode 100644 index fa664ca13f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_non_interference_across_combined_schemas_request_body import RequestBodyPostNonInterferenceAcrossCombinedSchemasRequestBody - -path = "/requestBody/postNonInterferenceAcrossCombinedSchemasRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py deleted file mode 100644 index e7a3c3b1792..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_interference_across_combined_schemas - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_non_interference_across_combined_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_non_interference_across_combined_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_non_interference_across_combined_schemas_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNonInterferenceAcrossCombinedSchemasRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_non_interference_across_combined_schemas_request_body = BaseApi._post_non_interference_across_combined_schemas_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_non_interference_across_combined_schemas_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7f98584568e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_interference_across_combined_schemas -Schema2: typing_extensions.TypeAlias = non_interference_across_combined_schemas.NonInterferenceAcrossCombinedSchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py deleted file mode 100644 index 0ce18a55b48..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody - -path = "/requestBody/postNotMoreComplexSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py deleted file mode 100644 index c9afbde92df..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMoreComplexSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_more_complex_schema_request_body = BaseApi._post_not_more_complex_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_more_complex_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7466659646d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema -Schema2: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py deleted file mode 100644 index 05bb43a3b9f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_not_multiple_types_request_body import RequestBodyPostNotMultipleTypesRequestBody - -path = "/requestBody/postNotMultipleTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py deleted file mode 100644 index 3fb48b052c8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_multiple_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_multiple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_multiple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_multiple_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMultipleTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_multiple_types_request_body = BaseApi._post_not_multiple_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_multiple_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 808ed7158e0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_multiple_types -Schema2: typing_extensions.TypeAlias = not_multiple_types.NotMultipleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py deleted file mode 100644 index 5d8109b6f57..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody - -path = "/requestBody/postNotRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py deleted file mode 100644 index cd610e49d23..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_request_body = BaseApi._post_not_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9ad18bdd1d0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not -Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py deleted file mode 100644 index 9cd5dfb3207..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody - -path = "/requestBody/postNulCharactersInStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py deleted file mode 100644 index e8fab53d96d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Literal[ - "hello\x00there" - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNulCharactersInStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nul_characters_in_strings_request_body = BaseApi._post_nul_characters_in_strings_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nul_characters_in_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2422cba070d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings -Schema2: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py deleted file mode 100644 index d00cc04dfb9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody - -path = "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py deleted file mode 100644 index 12d96b16e38..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: None, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_null_type_matches_only_the_null_object_request_body = BaseApi._post_null_type_matches_only_the_null_object_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_null_type_matches_only_the_null_object_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a70311d5d92..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object -Schema2: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py deleted file mode 100644 index 47587baa209..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody - -path = "/requestBody/postNumberTypeMatchesNumbersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py deleted file mode 100644 index d76fc77ebae..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNumberTypeMatchesNumbersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_number_type_matches_numbers_request_body = BaseApi._post_number_type_matches_numbers_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_number_type_matches_numbers_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 404c9d56f43..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers -Schema2: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py deleted file mode 100644 index 4128e9e90db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody - -path = "/requestBody/postObjectPropertiesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py deleted file mode 100644 index 6737e2d9d16..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectPropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_properties_validation_request_body = BaseApi._post_object_properties_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_properties_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1593145b4bc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation -Schema2: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py deleted file mode 100644 index 9a28be7eac3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody - -path = "/requestBody/postObjectTypeMatchesObjectsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py deleted file mode 100644 index 6187696ea8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectTypeMatchesObjectsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_type_matches_objects_request_body = BaseApi._post_object_type_matches_objects_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_type_matches_objects_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 417224c18ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects -Schema2: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py deleted file mode 100644 index 19e6c49de33..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody - -path = "/requestBody/postOneofComplexTypesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py deleted file mode 100644 index ca65ba80f61..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_complex_types_request_body = BaseApi._post_oneof_complex_types_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_complex_types_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c473dde6bfb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types -Schema2: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py deleted file mode 100644 index 5c6ffb88a3a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody - -path = "/requestBody/postOneofRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py deleted file mode 100644 index 9e24ea1dd3a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_request_body = BaseApi._post_oneof_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 474d29f6009..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof -Schema2: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py deleted file mode 100644 index a08595ec8ac..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody - -path = "/requestBody/postOneofWithBaseSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py deleted file mode 100644 index 0c076d2ec5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_base_schema_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_base_schema_request_body = BaseApi._post_oneof_with_base_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_base_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d1898df2fe7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema -Schema2: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py deleted file mode 100644 index 4f9a293eb8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody - -path = "/requestBody/postOneofWithEmptySchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py deleted file mode 100644 index 71649629dc5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_empty_schema_request_body = BaseApi._post_oneof_with_empty_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_empty_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 792b00c2b5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema -Schema2: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py deleted file mode 100644 index ce1e3d7a855..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody - -path = "/requestBody/postOneofWithRequiredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py deleted file mode 100644 index 3a4b21d436e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithRequiredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_required_request_body = BaseApi._post_oneof_with_required_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_required_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 16715d35af0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required -Schema2: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py deleted file mode 100644 index 73139a7fca0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody - -path = "/requestBody/postPatternIsNotAnchoredRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py deleted file mode 100644 index 754eeb128d5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternIsNotAnchoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_is_not_anchored_request_body = BaseApi._post_pattern_is_not_anchored_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_is_not_anchored_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 293cfe38cb4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored -Schema2: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py deleted file mode 100644 index df8f3abd132..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody - -path = "/requestBody/postPatternValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py deleted file mode 100644 index ba195f4413c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_validation_request_body = BaseApi._post_pattern_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 4920b211601..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation -Schema2: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py deleted file mode 100644 index 3ec8b0f6407..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body import RequestBodyPostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody - -path = "/requestBody/postPatternpropertiesValidatesPropertiesMatchingARegexRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py deleted file mode 100644 index 715a9b63b1e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_patternproperties_validates_properties_matching_a_regex_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_patternproperties_validates_properties_matching_a_regex_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_patternproperties_validates_properties_matching_a_regex_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternpropertiesValidatesPropertiesMatchingARegexRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_patternproperties_validates_properties_matching_a_regex_request_body = BaseApi._post_patternproperties_validates_properties_matching_a_regex_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_patternproperties_validates_properties_matching_a_regex_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 87ad0cdfa8d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex -Schema2: typing_extensions.TypeAlias = patternproperties_validates_properties_matching_a_regex.PatternpropertiesValidatesPropertiesMatchingARegex diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py deleted file mode 100644 index 00f47c38a5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body import RequestBodyPostPatternpropertiesWithNullValuedInstancePropertiesRequestBody - -path = "/requestBody/postPatternpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py deleted file mode 100644 index ed56f623c32..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_patternproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_patternproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_patternproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_patternproperties_with_null_valued_instance_properties_request_body = BaseApi._post_patternproperties_with_null_valued_instance_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_patternproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index b7142af3c40..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = patternproperties_with_null_valued_instance_properties.PatternpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py deleted file mode 100644 index 00be82012fa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body import RequestBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody - -path = "/requestBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py deleted file mode 100644 index 8d339d7a0d6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( - self, - body: typing.Union[ - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( - self, - body: typing.Union[ - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body( - self, - body: typing.Union[ - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTupleInput, - prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPrefixitemsValidationAdjustsTheStartingIndexForItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index cd69d04ea26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items -Schema2: typing_extensions.TypeAlias = prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py deleted file mode 100644 index aea7209c610..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_prefixitems_with_null_instance_elements_request_body import RequestBodyPostPrefixitemsWithNullInstanceElementsRequestBody - -path = "/requestBody/postPrefixitemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py deleted file mode 100644 index ebd4b682c57..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_with_null_instance_elements - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_prefixitems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_prefixitems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_prefixitems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPrefixitemsWithNullInstanceElementsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_prefixitems_with_null_instance_elements_request_body = BaseApi._post_prefixitems_with_null_instance_elements_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_prefixitems_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2185e963d00..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = prefixitems_with_null_instance_elements.PrefixitemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py deleted file mode 100644 index 94fcb893ae7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body import RequestBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody - -path = "/requestBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py deleted file mode 100644 index 540e720d4c3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_patternproperties_additionalproperties_interaction_request_body( - self, - body: typing.Union[ - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_patternproperties_additionalproperties_interaction_request_body( - self, - body: typing.Union[ - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_patternproperties_additionalproperties_interaction_request_body( - self, - body: typing.Union[ - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDictInput, - properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesPatternpropertiesAdditionalpropertiesInteractionRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_patternproperties_additionalproperties_interaction_request_body = BaseApi._post_properties_patternproperties_additionalproperties_interaction_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_patternproperties_additionalproperties_interaction_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 83b71f80614..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction -Schema2: typing_extensions.TypeAlias = properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteraction diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py deleted file mode 100644 index b20aa8feaa0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody - -path = "/requestBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py deleted file mode 100644 index 9eb82cb56a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_whose_names_are_javascript_object_property_names_request_body = BaseApi._post_properties_whose_names_are_javascript_object_property_names_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_whose_names_are_javascript_object_property_names_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index baee22e025f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names -Schema2: typing_extensions.TypeAlias = properties_whose_names_are_javascript_object_property_names.PropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 4b7025d9ccb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody - -path = "/requestBody/postPropertiesWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index f7f1907b01f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_escaped_characters_request_body = BaseApi._post_properties_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5260b009fd7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters -Schema2: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py deleted file mode 100644 index e9ba34b3e95..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_properties_with_null_valued_instance_properties_request_body import RequestBodyPostPropertiesWithNullValuedInstancePropertiesRequestBody - -path = "/requestBody/postPropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py deleted file mode 100644 index 81fb6a1eb65..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_null_valued_instance_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_null_valued_instance_properties_request_body = BaseApi._post_properties_with_null_valued_instance_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index e02ac63f49f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = properties_with_null_valued_instance_properties.PropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py deleted file mode 100644 index a54d80da178..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody - -path = "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py deleted file mode 100644 index f6c69abbb41..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_property_named_ref_that_is_not_a_reference_request_body = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_property_named_ref_that_is_not_a_reference_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c5b136bf4a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference -Schema2: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py deleted file mode 100644 index 72ec2a32d4a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_propertynames_validation_request_body import RequestBodyPostPropertynamesValidationRequestBody - -path = "/requestBody/postPropertynamesValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py deleted file mode 100644 index 1b5b1101cd1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import propertynames_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_propertynames_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_propertynames_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_propertynames_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertynamesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_propertynames_validation_request_body = BaseApi._post_propertynames_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_propertynames_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 915e3feeac0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import propertynames_validation -Schema2: typing_extensions.TypeAlias = propertynames_validation.PropertynamesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py deleted file mode 100644 index 6c72b4e6d18..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_regex_format_request_body import RequestBodyPostRegexFormatRequestBody - -path = "/requestBody/postRegexFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py deleted file mode 100644 index 6ce7ad79332..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regex_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_regex_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_regex_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_regex_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRegexFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_regex_format_request_body = BaseApi._post_regex_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_regex_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 28598ef5139..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regex_format -Schema2: typing_extensions.TypeAlias = regex_format.RegexFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py deleted file mode 100644 index 368ad1c4c49..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body import RequestBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody - -path = "/requestBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py deleted file mode 100644 index e6e3fd9169e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a13163b0df7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive -Schema2: typing_extensions.TypeAlias = regexes_are_not_anchored_by_default_and_are_case_sensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py deleted file mode 100644 index ea31c0603b7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_relative_json_pointer_format_request_body import RequestBodyPostRelativeJsonPointerFormatRequestBody - -path = "/requestBody/postRelativeJsonPointerFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py deleted file mode 100644 index c96de2bbaf5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import relative_json_pointer_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_relative_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_relative_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_relative_json_pointer_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRelativeJsonPointerFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_relative_json_pointer_format_request_body = BaseApi._post_relative_json_pointer_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_relative_json_pointer_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index ba70730fb48..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import relative_json_pointer_format -Schema2: typing_extensions.TypeAlias = relative_json_pointer_format.RelativeJsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py deleted file mode 100644 index 5ea3e864c93..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody - -path = "/requestBody/postRequiredDefaultValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py deleted file mode 100644 index 83fe31dc612..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredDefaultValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_default_validation_request_body = BaseApi._post_required_default_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_default_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 3ddabc1af63..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation -Schema2: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py deleted file mode 100644 index 90bc586ed2c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body import RequestBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody - -path = "/requestBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py deleted file mode 100644 index 7f9d7969234..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_properties_whose_names_are_javascript_object_property_names_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_properties_whose_names_are_javascript_object_property_names_request_body = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8d36048378e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names -Schema2: typing_extensions.TypeAlias = required_properties_whose_names_are_javascript_object_property_names.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py deleted file mode 100644 index f8b9dcf8fe1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody - -path = "/requestBody/postRequiredValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py deleted file mode 100644 index 8b84cb57f7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_validation_request_body = BaseApi._post_required_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8f5ebbe79cf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation -Schema2: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py deleted file mode 100644 index 9f70eb66747..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody - -path = "/requestBody/postRequiredWithEmptyArrayRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py deleted file mode 100644 index 95add17687c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEmptyArrayRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_empty_array_request_body = BaseApi._post_required_with_empty_array_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_empty_array_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index af52814277e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array -Schema2: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 52861ef3116..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody - -path = "/requestBody/postRequiredWithEscapedCharactersRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py deleted file mode 100644 index 40b8874dde0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_escaped_characters_request_body = BaseApi._post_required_with_escaped_characters_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_escaped_characters_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9489d00c981..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters -Schema2: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py deleted file mode 100644 index 455fb167b26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody - -path = "/requestBody/postSimpleEnumValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py deleted file mode 100644 index d4990c52b2d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - int, - float - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSimpleEnumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_simple_enum_validation_request_body = BaseApi._post_simple_enum_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_simple_enum_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5e64dd92807..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation -Schema2: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py deleted file mode 100644 index 1ee27e23ac5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_single_dependency_request_body import RequestBodyPostSingleDependencyRequestBody - -path = "/requestBody/postSingleDependencyRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py deleted file mode 100644 index 96757053d86..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import single_dependency - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_single_dependency_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSingleDependencyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_single_dependency_request_body = BaseApi._post_single_dependency_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_single_dependency_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 3982e382df8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import single_dependency -Schema2: typing_extensions.TypeAlias = single_dependency.SingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py deleted file mode 100644 index d4595a3437a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_small_multiple_of_large_integer_request_body import RequestBodyPostSmallMultipleOfLargeIntegerRequestBody - -path = "/requestBody/postSmallMultipleOfLargeIntegerRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py deleted file mode 100644 index c00b28dc35a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import small_multiple_of_large_integer - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_small_multiple_of_large_integer_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_small_multiple_of_large_integer_request_body( - self, - body: int, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_small_multiple_of_large_integer_request_body( - self, - body: int, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSmallMultipleOfLargeIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_small_multiple_of_large_integer_request_body = BaseApi._post_small_multiple_of_large_integer_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_small_multiple_of_large_integer_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 5493790072e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import small_multiple_of_large_integer -Schema2: typing_extensions.TypeAlias = small_multiple_of_large_integer.SmallMultipleOfLargeInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py deleted file mode 100644 index bf46191b89d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody - -path = "/requestBody/postStringTypeMatchesStringsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py deleted file mode 100644 index 54388df0e65..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_string_type_matches_strings_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostStringTypeMatchesStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_string_type_matches_strings_request_body = BaseApi._post_string_type_matches_strings_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_string_type_matches_strings_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 27b5b8bcead..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings -Schema2: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py deleted file mode 100644 index d7585a38c92..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_time_format_request_body import RequestBodyPostTimeFormatRequestBody - -path = "/requestBody/postTimeFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py deleted file mode 100644 index 2747083c249..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import time_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_time_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTimeFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_time_format_request_body = BaseApi._post_time_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_time_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 10d05231bea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import time_format -Schema2: typing_extensions.TypeAlias = time_format.TimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py deleted file mode 100644 index 91862fbc1ec..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_type_array_object_or_null_request_body import RequestBodyPostTypeArrayObjectOrNullRequestBody - -path = "/requestBody/postTypeArrayObjectOrNullRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py deleted file mode 100644 index 2f7098a9c6e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_object_or_null - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_array_object_or_null_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - None, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_array_object_or_null_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - None, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_array_object_or_null_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - None, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeArrayObjectOrNullRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_array_object_or_null_request_body = BaseApi._post_type_array_object_or_null_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_array_object_or_null_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 75bddff3f20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_object_or_null -Schema2: typing_extensions.TypeAlias = type_array_object_or_null.TypeArrayObjectOrNull diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py deleted file mode 100644 index 78cee53bda5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_type_array_or_object_request_body import RequestBodyPostTypeArrayOrObjectRequestBody - -path = "/requestBody/postTypeArrayOrObjectRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py deleted file mode 100644 index 434709a727e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_or_object - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_array_or_object_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_array_or_object_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_array_or_object_request_body( - self, - body: typing.Union[ - typing.Union[ - typing.Tuple[schemas.INPUT_TYPES_ALL, ...], - typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...], - ], - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeArrayOrObjectRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_array_or_object_request_body = BaseApi._post_type_array_or_object_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_array_or_object_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 207c015b341..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_or_object -Schema2: typing_extensions.TypeAlias = type_array_or_object.TypeArrayOrObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py deleted file mode 100644 index c07c7c39810..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_type_as_array_with_one_item_request_body import RequestBodyPostTypeAsArrayWithOneItemRequestBody - -path = "/requestBody/postTypeAsArrayWithOneItemRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py deleted file mode 100644 index e888f7ad32c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_as_array_with_one_item - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_as_array_with_one_item_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_as_array_with_one_item_request_body( - self, - body: str, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_as_array_with_one_item_request_body( - self, - body: str, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeAsArrayWithOneItemRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_as_array_with_one_item_request_body = BaseApi._post_type_as_array_with_one_item_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_as_array_with_one_item_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 008ad4c0312..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_as_array_with_one_item -Schema2: typing_extensions.TypeAlias = type_as_array_with_one_item.TypeAsArrayWithOneItem diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py deleted file mode 100644 index 6700b6e3bf6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluateditems_as_schema_request_body import RequestBodyPostUnevaluateditemsAsSchemaRequestBody - -path = "/requestBody/postUnevaluateditemsAsSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py deleted file mode 100644 index 571fbdd4a20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_as_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_as_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_as_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_as_schema_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsAsSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_as_schema_request_body = BaseApi._post_unevaluateditems_as_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_as_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d5f5a3df221..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_as_schema -Schema2: typing_extensions.TypeAlias = unevaluateditems_as_schema.UnevaluateditemsAsSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py deleted file mode 100644 index b8d6a2de947..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body import RequestBodyPostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody - -path = "/requestBody/postUnevaluateditemsDependsOnMultipleNestedContainsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py deleted file mode 100644 index a472c8bd566..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_depends_on_multiple_nested_contains_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsDependsOnMultipleNestedContainsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_depends_on_multiple_nested_contains_request_body = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a0d5b127247..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains -Schema2: typing_extensions.TypeAlias = unevaluateditems_depends_on_multiple_nested_contains.UnevaluateditemsDependsOnMultipleNestedContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py deleted file mode 100644 index 6f0cae1c447..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluateditems_with_items_request_body import RequestBodyPostUnevaluateditemsWithItemsRequestBody - -path = "/requestBody/postUnevaluateditemsWithItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py deleted file mode 100644 index 190b8e4b564..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_with_items_request_body( - self, - body: typing.Union[ - unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, - unevaluateditems_with_items.UnevaluateditemsWithItemsTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_with_items_request_body( - self, - body: typing.Union[ - unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, - unevaluateditems_with_items.UnevaluateditemsWithItemsTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_with_items_request_body( - self, - body: typing.Union[ - unevaluateditems_with_items.UnevaluateditemsWithItemsTupleInput, - unevaluateditems_with_items.UnevaluateditemsWithItemsTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsWithItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_with_items_request_body = BaseApi._post_unevaluateditems_with_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_with_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9a0410581eb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_items -Schema2: typing_extensions.TypeAlias = unevaluateditems_with_items.UnevaluateditemsWithItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py deleted file mode 100644 index 7e8cb32ca73..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body import RequestBodyPostUnevaluateditemsWithNullInstanceElementsRequestBody - -path = "/requestBody/postUnevaluateditemsWithNullInstanceElementsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py deleted file mode 100644 index 189432ea0d1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_null_instance_elements - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_with_null_instance_elements_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsWithNullInstanceElementsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_with_null_instance_elements_request_body = BaseApi._post_unevaluateditems_with_null_instance_elements_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_with_null_instance_elements_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fa885543144..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = unevaluateditems_with_null_instance_elements.UnevaluateditemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py deleted file mode 100644 index 10726ada218..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body import RequestBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody - -path = "/requestBody/postUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py deleted file mode 100644 index 9961995ccde..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_not_affected_by_propertynames_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesNotAffectedByPropertynamesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_not_affected_by_propertynames_request_body = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index d2d6d5dc23c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_not_affected_by_propertynames.UnevaluatedpropertiesNotAffectedByPropertynames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py deleted file mode 100644 index 7421a4d72e0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_schema_request_body import RequestBodyPostUnevaluatedpropertiesSchemaRequestBody - -path = "/requestBody/postUnevaluatedpropertiesSchemaRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py deleted file mode 100644 index c6c0a20df59..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_schema_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_schema_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_schema_request_body( - self, - body: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_schema_request_body = BaseApi._post_unevaluatedproperties_schema_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_schema_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index fca2e2461c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_schema -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_schema.UnevaluatedpropertiesSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py deleted file mode 100644 index 70d1447448c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body import RequestBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody - -path = "/requestBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py deleted file mode 100644 index 23e1c63cdba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( - self, - body: typing.Union[ - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( - self, - body: typing.Union[ - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_with_adjacent_additionalproperties_request_body( - self, - body: typing.Union[ - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDictInput, - unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_with_adjacent_additionalproperties_request_body = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1a3d1132937..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py deleted file mode 100644 index 0ff130a6909..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body import RequestBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody - -path = "/requestBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py deleted file mode 100644 index 3a34d537bd6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_with_null_valued_instance_properties_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesWithNullValuedInstancePropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_with_null_valued_instance_properties_request_body = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 6e452389e71..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_null_valued_instance_properties.UnevaluatedpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py deleted file mode 100644 index 1e8addcca13..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody - -path = "/requestBody/postUniqueitemsFalseValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py deleted file mode 100644 index 498a03ae5fb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_validation_request_body = BaseApi._post_uniqueitems_false_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index a87136f730d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation -Schema2: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py deleted file mode 100644 index d408da0761f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsFalseWithAnArrayOfItemsRequestBody - -path = "/requestBody/postUniqueitemsFalseWithAnArrayOfItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py deleted file mode 100644 index 757dab38875..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseWithAnArrayOfItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_with_an_array_of_items_request_body = BaseApi._post_uniqueitems_false_with_an_array_of_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_with_an_array_of_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8b39a15068e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items -Schema2: typing_extensions.TypeAlias = uniqueitems_false_with_an_array_of_items.UniqueitemsFalseWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py deleted file mode 100644 index 6a663f89e52..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody - -path = "/requestBody/postUniqueitemsValidationRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py deleted file mode 100644 index 8cb93dbc108..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_validation_request_body = BaseApi._post_uniqueitems_validation_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_validation_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 22d0b748ea7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation -Schema2: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py deleted file mode 100644 index 64dc9150a25..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body import RequestBodyPostUniqueitemsWithAnArrayOfItemsRequestBody - -path = "/requestBody/postUniqueitemsWithAnArrayOfItemsRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py deleted file mode 100644 index d0e27033756..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_with_an_array_of_items - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_with_an_array_of_items_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsWithAnArrayOfItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_with_an_array_of_items_request_body = BaseApi._post_uniqueitems_with_an_array_of_items_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_with_an_array_of_items_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 82a52c16a75..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_with_an_array_of_items -Schema2: typing_extensions.TypeAlias = uniqueitems_with_an_array_of_items.UniqueitemsWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py deleted file mode 100644 index e57a1f4fda6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody - -path = "/requestBody/postUriFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py deleted file mode 100644 index 7408afb67d7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_format_request_body = BaseApi._post_uri_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 654ba34398b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format -Schema2: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py deleted file mode 100644 index 3e35c33e574..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody - -path = "/requestBody/postUriReferenceFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py deleted file mode 100644 index c3f37d8126c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriReferenceFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_reference_format_request_body = BaseApi._post_uri_reference_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_reference_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 2b77aef5da1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format -Schema2: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py deleted file mode 100644 index 6de7813243c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody - -path = "/requestBody/postUriTemplateFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py deleted file mode 100644 index 94ff739b556..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriTemplateFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_template_format_request_body = BaseApi._post_uri_template_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_template_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index c4967db183c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format -Schema2: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py deleted file mode 100644 index c66e6ec97af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_uuid_format_request_body import RequestBodyPostUuidFormatRequestBody - -path = "/requestBody/postUuidFormatRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py deleted file mode 100644 index d08bae1e1a9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uuid_format - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uuid_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uuid_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uuid_format_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUuidFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uuid_format_request_body = BaseApi._post_uuid_format_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uuid_format_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 76fa1e8f1e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uuid_format -Schema2: typing_extensions.TypeAlias = uuid_format.UuidFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py deleted file mode 100644 index 1b2ead672e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body import RequestBodyPostValidateAgainstCorrectBranchThenVsElseRequestBody - -path = "/requestBody/postValidateAgainstCorrectBranchThenVsElseRequestBody" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py deleted file mode 100644 index 04d2698602f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import validate_against_correct_branch_then_vs_else - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_validate_against_correct_branch_then_vs_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_validate_against_correct_branch_then_vs_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_validate_against_correct_branch_then_vs_else_request_body( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostValidateAgainstCorrectBranchThenVsElseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_validate_against_correct_branch_then_vs_else_request_body = BaseApi._post_validate_against_correct_branch_then_vs_else_request_body - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_validate_against_correct_branch_then_vs_else_request_body diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py deleted file mode 100644 index ed4680461db..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py deleted file mode 100644 index 026e5c74a70..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import validate_against_correct_branch_then_vs_else -Schema2: typing_extensions.TypeAlias = validate_against_correct_branch_then_vs_else.ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py deleted file mode 100644 index e4d24d606c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py deleted file mode 100644 index 100eaecbe9c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types import ResponseBodyPostASchemaGivenForPrefixitemsResponseBodyForContentTypes - -path = "/responseBody/postASchemaGivenForPrefixitemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py deleted file mode 100644 index 51572cb35f3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_a_schema_given_for_prefixitems_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_a_schema_given_for_prefixitems_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_a_schema_given_for_prefixitems_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostASchemaGivenForPrefixitemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_a_schema_given_for_prefixitems_response_body_for_content_types = BaseApi._post_a_schema_given_for_prefixitems_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_a_schema_given_for_prefixitems_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 03fda6470fc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import a_schema_given_for_prefixitems -Schema2: typing_extensions.TypeAlias = a_schema_given_for_prefixitems.ASchemaGivenForPrefixitems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py deleted file mode 100644 index cb9c34b720d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes - -path = "/responseBody/postAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py deleted file mode 100644 index 104bc42997f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additional_items_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additional_items_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additional_items_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalItemsAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additional_items_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additional_items_are_allowed_by_default_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additional_items_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 15e21c81b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_items_are_allowed_by_default -Schema2: typing_extensions.TypeAlias = additional_items_are_allowed_by_default.AdditionalItemsAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py deleted file mode 100644 index 9a9a1f63ce1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6e0cef1b9f2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_are_allowed_by_default_response_body_for_content_types = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_are_allowed_by_default_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f320e878562..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_are_allowed_by_default -Schema2: typing_extensions.TypeAlias = additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py deleted file mode 100644 index 58098efaee9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py deleted file mode 100644 index 647b89cb08d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_can_exist_by_itself_response_body_for_content_types = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_can_exist_by_itself_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index efb2f439ad6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItselfDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b7fce07ef58..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_can_exist_by_itself -Schema2: typing_extensions.TypeAlias = additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py deleted file mode 100644 index 7763b077706..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py deleted file mode 100644 index 38db0a323f4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesDoesNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types = BaseApi._post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e194ba355a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_does_not_look_in_applicators -Schema2: typing_extensions.TypeAlias = additionalproperties_does_not_look_in_applicators.AdditionalpropertiesDoesNotLookInApplicators diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index ec89fa5c089..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1b926b3cc6e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1a8671e3497..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstancePropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ff0333176a0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = additionalproperties_with_null_valued_instance_properties.AdditionalpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 863dcf8aabf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesWithSchemaResponseBodyForContentTypes - -path = "/responseBody/postAdditionalpropertiesWithSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5110220dffb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_with_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_additionalproperties_with_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_additionalproperties_with_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAdditionalpropertiesWithSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_additionalproperties_with_schema_response_body_for_content_types = BaseApi._post_additionalproperties_with_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_additionalproperties_with_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 46b640468a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additionalproperties_with_schema.AdditionalpropertiesWithSchemaDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e457613c9a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additionalproperties_with_schema -Schema2: typing_extensions.TypeAlias = additionalproperties_with_schema.AdditionalpropertiesWithSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 94fcd5a91e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes - -path = "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1dd9115a629..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_combined_with_anyof_oneof_response_body_for_content_types = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_combined_with_anyof_oneof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e6f7ceccca4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_combined_with_anyof_oneof -Schema2: typing_extensions.TypeAlias = allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index 2dd5b1204a9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes - -path = "/responseBody/postAllofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6fdff3fcf93..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_response_body_for_content_types = BaseApi._post_allof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 58ea8d6fe3c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof -Schema2: typing_extensions.TypeAlias = allof.Allof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py deleted file mode 100644 index 4e22ee767b1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes - -path = "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2c6ab6921ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_simple_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_simple_types_response_body_for_content_types = BaseApi._post_allof_simple_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_simple_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 04ffe7a5c26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_simple_types -Schema2: typing_extensions.TypeAlias = allof_simple_types.AllofSimpleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index dd5b4e26c61..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index b26372c41a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_base_schema_response_body_for_content_types = BaseApi._post_allof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 68c4f35329d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_base_schema -Schema2: typing_extensions.TypeAlias = allof_with_base_schema.AllofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 6f89734ca8e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index d9bff7e0505..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 53fd4ffe2fe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_one_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_one_empty_schema.AllofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 64740cc3c20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index ef94285e3a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_first_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_first_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4a8764a76f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_first_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 714d27c739d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 64ed6c803a5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_the_last_empty_schema_response_body_for_content_types = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_the_last_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index dffb1658cb6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_the_last_empty_schema -Schema2: typing_extensions.TypeAlias = allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py deleted file mode 100644 index 33fa82761fd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes - -path = "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py deleted file mode 100644 index f23c16a96c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_allof_with_two_empty_schemas_response_body_for_content_types = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_allof_with_two_empty_schemas_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6c0ee15f391..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import allof_with_two_empty_schemas -Schema2: typing_extensions.TypeAlias = allof_with_two_empty_schemas.AllofWithTwoEmptySchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index bf78d0d3dc6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes - -path = "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6bf3fe2b64a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_complex_types_response_body_for_content_types = BaseApi._post_anyof_complex_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_complex_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5cf2d870bec..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_complex_types -Schema2: typing_extensions.TypeAlias = anyof_complex_types.AnyofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index 732664d5de2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes - -path = "/responseBody/postAnyofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py deleted file mode 100644 index a41dee1b906..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_response_body_for_content_types = BaseApi._post_anyof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fd388ae0816..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof -Schema2: typing_extensions.TypeAlias = anyof.Anyof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 42a12880597..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 0c3aaedd5a7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_base_schema_response_body_for_content_types = BaseApi._post_anyof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index afd6bbfefd5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 50467d99daa..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_base_schema -Schema2: typing_extensions.TypeAlias = anyof_with_base_schema.AnyofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 41137e270ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 29b9dc4a757..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_anyof_with_one_empty_schema_response_body_for_content_types = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_anyof_with_one_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7399a723ae4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import anyof_with_one_empty_schema -Schema2: typing_extensions.TypeAlias = anyof_with_one_empty_schema.AnyofWithOneEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py deleted file mode 100644 index 0d7d4c9726a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes - -path = "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py deleted file mode 100644 index e461d8a6d8e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_array_type_matches_arrays_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_array_type_matches_arrays_response_body_for_content_types = BaseApi._post_array_type_matches_arrays_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_array_type_matches_arrays_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 1c4bdfabd73..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Tuple[schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e5b3f23185a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_type_matches_arrays -Schema2: typing_extensions.TypeAlias = array_type_matches_arrays.ArrayTypeMatchesArrays diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py deleted file mode 100644 index aadbb3b88e6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes - -path = "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py deleted file mode 100644 index de9a0bc83f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_boolean_type_matches_booleans_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_boolean_type_matches_booleans_response_body_for_content_types = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_boolean_type_matches_booleans_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 61346186f4a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: bool - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d4e345c87b1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean_type_matches_booleans -Schema2: typing_extensions.TypeAlias = boolean_type_matches_booleans.BooleanTypeMatchesBooleans diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py deleted file mode 100644 index a5bd11c1830..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes - -path = "/responseBody/postByIntResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py deleted file mode 100644 index f10119ef8f1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_int_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByIntResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_int_response_body_for_content_types = BaseApi._post_by_int_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_int_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ce650694a07..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_int -Schema2: typing_extensions.TypeAlias = by_int.ByInt diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py deleted file mode 100644 index b9a0567a12c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes - -path = "/responseBody/postByNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4d75d92b604..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_number_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostByNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_number_response_body_for_content_types = BaseApi._post_by_number_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_number_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ab6f9a04822..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_number -Schema2: typing_extensions.TypeAlias = by_number.ByNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py deleted file mode 100644 index e0e5f516357..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes - -path = "/responseBody/postBySmallNumberResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py deleted file mode 100644 index d6eea237dce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_by_small_number_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostBySmallNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_by_small_number_response_body_for_content_types = BaseApi._post_by_small_number_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_by_small_number_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4508b52a87d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import by_small_number -Schema2: typing_extensions.TypeAlias = by_small_number.BySmallNumber diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index 0d4b86846dc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostConstNulCharactersInStringsResponseBodyForContentTypes - -path = "/responseBody/postConstNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py deleted file mode 100644 index eae8d3fc66e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_const_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_const_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_const_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostConstNulCharactersInStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_const_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_const_nul_characters_in_strings_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_const_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 563f2c99b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import const_nul_characters_in_strings -Schema2: typing_extensions.TypeAlias = const_nul_characters_in_strings.ConstNulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index adaa1824768..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_contains_keyword_validation_response_body_for_content_types import ResponseBodyPostContainsKeywordValidationResponseBodyForContentTypes - -path = "/responseBody/postContainsKeywordValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index b9b479bb91d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_contains_keyword_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_contains_keyword_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_contains_keyword_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostContainsKeywordValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_contains_keyword_validation_response_body_for_content_types = BaseApi._post_contains_keyword_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_contains_keyword_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f519bece380..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_keyword_validation -Schema2: typing_extensions.TypeAlias = contains_keyword_validation.ContainsKeywordValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py deleted file mode 100644 index 2ce9822ed35..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostContainsWithNullInstanceElementsResponseBodyForContentTypes - -path = "/responseBody/postContainsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py deleted file mode 100644 index b2f037b20e7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_contains_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_contains_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_contains_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostContainsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_contains_with_null_instance_elements_response_body_for_content_types = BaseApi._post_contains_with_null_instance_elements_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_contains_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f239f206444..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import contains_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = contains_with_null_instance_elements.ContainsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py deleted file mode 100644 index d72e560e323..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_date_format_response_body_for_content_types import ResponseBodyPostDateFormatResponseBodyForContentTypes - -path = "/responseBody/postDateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index c3ce9b38e51..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_format_response_body_for_content_types = BaseApi._post_date_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d8ee34fd280..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_format -Schema2: typing_extensions.TypeAlias = date_format.DateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 13b6286ae93..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes - -path = "/responseBody/postDateTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 77e95e77abf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_date_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_date_time_format_response_body_for_content_types = BaseApi._post_date_time_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_date_time_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d9c84ea8aca..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import date_time_format -Schema2: typing_extensions.TypeAlias = date_time_format.DateTimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 5927aa39a32..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types import ResponseBodyPostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6322005e88a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasDependenciesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2843b8be0d3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependencies_with_escaped_characters -Schema2: typing_extensions.TypeAlias = dependent_schemas_dependencies_with_escaped_characters.DependentSchemasDependenciesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py deleted file mode 100644 index bb38523f74e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types import ResponseBodyPostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes - -path = "/responseBody/postDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5a23e1ea68c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasDependentSubschemaIncompatibleWithRootResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 85ff65ae213..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_dependent_subschema_incompatible_with_root -Schema2: typing_extensions.TypeAlias = dependent_schemas_dependent_subschema_incompatible_with_root.DependentSchemasDependentSubschemaIncompatibleWithRoot diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py deleted file mode 100644 index d6ff6e21f1c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types import ResponseBodyPostDependentSchemasSingleDependencyResponseBodyForContentTypes - -path = "/responseBody/postDependentSchemasSingleDependencyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py deleted file mode 100644 index 78c2af9c864..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_dependent_schemas_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_dependent_schemas_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_dependent_schemas_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDependentSchemasSingleDependencyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_dependent_schemas_single_dependency_response_body_for_content_types = BaseApi._post_dependent_schemas_single_dependency_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_dependent_schemas_single_dependency_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d9a02a6c025..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import dependent_schemas_single_dependency -Schema2: typing_extensions.TypeAlias = dependent_schemas_single_dependency.DependentSchemasSingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py deleted file mode 100644 index a7f1c0aac8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_duration_format_response_body_for_content_types import ResponseBodyPostDurationFormatResponseBodyForContentTypes - -path = "/responseBody/postDurationFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 7696bd8edd5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_duration_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_duration_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_duration_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostDurationFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_duration_format_response_body_for_content_types = BaseApi._post_duration_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_duration_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1919784341f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import duration_format -Schema2: typing_extensions.TypeAlias = duration_format.DurationFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 427a78c0255..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes - -path = "/responseBody/postEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index a97ac3aaf4e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmailFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_email_format_response_body_for_content_types = BaseApi._post_email_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_email_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5043f89584b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import email_format -Schema2: typing_extensions.TypeAlias = email_format.EmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py deleted file mode 100644 index 4f52a93701b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_empty_dependents_response_body_for_content_types import ResponseBodyPostEmptyDependentsResponseBodyForContentTypes - -path = "/responseBody/postEmptyDependentsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py deleted file mode 100644 index e20e6e38dcb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_empty_dependents_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_empty_dependents_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_empty_dependents_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEmptyDependentsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_empty_dependents_response_body_for_content_types = BaseApi._post_empty_dependents_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_empty_dependents_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index aa466ad9a06..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import empty_dependents -Schema2: typing_extensions.TypeAlias = empty_dependents.EmptyDependents diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py deleted file mode 100644 index aa4d0c2b50f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes - -path = "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9f10c052867..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with0_does_not_match_false_response_body_for_content_types = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with0_does_not_match_false_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index bedf2ff6ca1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1fba80557bf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with0_does_not_match_false -Schema2: typing_extensions.TypeAlias = enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py deleted file mode 100644 index e378c6460c3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes - -path = "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py deleted file mode 100644 index ea6bfc6f671..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with1_does_not_match_true_response_body_for_content_types = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with1_does_not_match_true_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index bedf2ff6ca1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 58e4afb2697..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with1_does_not_match_true -Schema2: typing_extensions.TypeAlias = enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 313b5ad0205..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index 0a2ffcbe270..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_escaped_characters_response_body_for_content_types = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index df96b5e6964..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal["foo\nbar", "foo\rbar"] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 716a7b075de..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_escaped_characters -Schema2: typing_extensions.TypeAlias = enum_with_escaped_characters.EnumWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py deleted file mode 100644 index 2861bd2f1b4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes - -path = "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1b72a02fd43..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_false_does_not_match0_response_body_for_content_types = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_false_does_not_match0_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 084f224ba44..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal[False] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fa242d67709..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_false_does_not_match0 -Schema2: typing_extensions.TypeAlias = enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py deleted file mode 100644 index 28b8c164e6c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes - -path = "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2b91e5a3fd9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enum_with_true_does_not_match1_response_body_for_content_types = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enum_with_true_does_not_match1_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 71c087eebd7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal[True] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ee7e09e06bd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enum_with_true_does_not_match1 -Schema2: typing_extensions.TypeAlias = enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index bec380d4f76..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes - -path = "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 53b0e35de58..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_enums_in_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_enums_in_properties_response_body_for_content_types = BaseApi._post_enums_in_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_enums_in_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 60a048f4cd9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.enums_in_properties.EnumsInPropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e62f262bdfe..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import enums_in_properties -Schema2: typing_extensions.TypeAlias = enums_in_properties.EnumsInProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index af3ba24a6ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types import ResponseBodyPostExclusivemaximumValidationResponseBodyForContentTypes - -path = "/responseBody/postExclusivemaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 883d14bde34..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_exclusivemaximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_exclusivemaximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_exclusivemaximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostExclusivemaximumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_exclusivemaximum_validation_response_body_for_content_types = BaseApi._post_exclusivemaximum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_exclusivemaximum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index dbc0369f87f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusivemaximum_validation -Schema2: typing_extensions.TypeAlias = exclusivemaximum_validation.ExclusivemaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 2087550d18a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types import ResponseBodyPostExclusiveminimumValidationResponseBodyForContentTypes - -path = "/responseBody/postExclusiveminimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index b0f1d4ae198..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_exclusiveminimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_exclusiveminimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_exclusiveminimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostExclusiveminimumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_exclusiveminimum_validation_response_body_for_content_types = BaseApi._post_exclusiveminimum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_exclusiveminimum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2b423e4a8de..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import exclusiveminimum_validation -Schema2: typing_extensions.TypeAlias = exclusiveminimum_validation.ExclusiveminimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py deleted file mode 100644 index f797e58e02e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_float_division_inf_response_body_for_content_types import ResponseBodyPostFloatDivisionInfResponseBodyForContentTypes - -path = "/responseBody/postFloatDivisionInfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py deleted file mode 100644 index d6ed496d3bb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_float_division_inf_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostFloatDivisionInfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_float_division_inf_response_body_for_content_types = BaseApi._post_float_division_inf_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_float_division_inf_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index f83cf220b7d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: int - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 93e1dd44d11..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import float_division_inf -Schema2: typing_extensions.TypeAlias = float_division_inf.FloatDivisionInf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py deleted file mode 100644 index 1530b05acd3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes - -path = "/responseBody/postForbiddenPropertyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3025d831fac..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_forbidden_property_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_forbidden_property_response_body_for_content_types = BaseApi._post_forbidden_property_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_forbidden_property_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a20158e1e64..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import forbidden_property -Schema2: typing_extensions.TypeAlias = forbidden_property.ForbiddenProperty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 54034c61770..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes - -path = "/responseBody/postHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9ae8a2ee83b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostHostnameFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_hostname_format_response_body_for_content_types = BaseApi._post_hostname_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_hostname_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 71160bda951..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import hostname_format -Schema2: typing_extensions.TypeAlias = hostname_format.HostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 13d038914c5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_idn_email_format_response_body_for_content_types import ResponseBodyPostIdnEmailFormatResponseBodyForContentTypes - -path = "/responseBody/postIdnEmailFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index ec9913367fb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_idn_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_idn_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_idn_email_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIdnEmailFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_idn_email_format_response_body_for_content_types = BaseApi._post_idn_email_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_idn_email_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index bdcb513c406..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_email_format -Schema2: typing_extensions.TypeAlias = idn_email_format.IdnEmailFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 65262f7b972..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_idn_hostname_format_response_body_for_content_types import ResponseBodyPostIdnHostnameFormatResponseBodyForContentTypes - -path = "/responseBody/postIdnHostnameFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5d0e1e86bf3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_idn_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_idn_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_idn_hostname_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIdnHostnameFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_idn_hostname_format_response_body_for_content_types = BaseApi._post_idn_hostname_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_idn_hostname_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 08005f9e7ff..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import idn_hostname_format -Schema2: typing_extensions.TypeAlias = idn_hostname_format.IdnHostnameFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py deleted file mode 100644 index d81390039b6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_if_and_else_without_then_response_body_for_content_types import ResponseBodyPostIfAndElseWithoutThenResponseBodyForContentTypes - -path = "/responseBody/postIfAndElseWithoutThenResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py deleted file mode 100644 index d0096be5440..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_and_else_without_then_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_and_else_without_then_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_and_else_without_then_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAndElseWithoutThenResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_and_else_without_then_response_body_for_content_types = BaseApi._post_if_and_else_without_then_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_and_else_without_then_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 539f547c303..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_else_without_then -Schema2: typing_extensions.TypeAlias = if_and_else_without_then.IfAndElseWithoutThen diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py deleted file mode 100644 index c4737b30384..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_if_and_then_without_else_response_body_for_content_types import ResponseBodyPostIfAndThenWithoutElseResponseBodyForContentTypes - -path = "/responseBody/postIfAndThenWithoutElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py deleted file mode 100644 index e37481dcd4b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_and_then_without_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_and_then_without_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_and_then_without_else_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAndThenWithoutElseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_and_then_without_else_response_body_for_content_types = BaseApi._post_if_and_then_without_else_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_and_then_without_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6af342aacad..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_and_then_without_else -Schema2: typing_extensions.TypeAlias = if_and_then_without_else.IfAndThenWithoutElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py deleted file mode 100644 index 989c5fd2233..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types import ResponseBodyPostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes - -path = "/responseBody/postIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py deleted file mode 100644 index b797a5c2fa5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 813371f1669..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import if_appears_at_the_end_when_serialized_keyword_processing_sequence -Schema2: typing_extensions.TypeAlias = if_appears_at_the_end_when_serialized_keyword_processing_sequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py deleted file mode 100644 index 70f3a1bf478..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ignore_else_without_if_response_body_for_content_types import ResponseBodyPostIgnoreElseWithoutIfResponseBodyForContentTypes - -path = "/responseBody/postIgnoreElseWithoutIfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3213419e88c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_else_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_else_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_else_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreElseWithoutIfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_else_without_if_response_body_for_content_types = BaseApi._post_ignore_else_without_if_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_else_without_if_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c133595c014..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_else_without_if -Schema2: typing_extensions.TypeAlias = ignore_else_without_if.IgnoreElseWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py deleted file mode 100644 index 6987b79eb23..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types import ResponseBodyPostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes - -path = "/responseBody/postIgnoreIfWithoutThenOrElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py deleted file mode 100644 index cfe3d7c2495..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_if_without_then_or_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_if_without_then_or_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_if_without_then_or_else_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreIfWithoutThenOrElseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_if_without_then_or_else_response_body_for_content_types = BaseApi._post_ignore_if_without_then_or_else_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_if_without_then_or_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d481bc18fd2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_if_without_then_or_else -Schema2: typing_extensions.TypeAlias = ignore_if_without_then_or_else.IgnoreIfWithoutThenOrElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py deleted file mode 100644 index 240072a553b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ignore_then_without_if_response_body_for_content_types import ResponseBodyPostIgnoreThenWithoutIfResponseBodyForContentTypes - -path = "/responseBody/postIgnoreThenWithoutIfResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py deleted file mode 100644 index 222cf9f744e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ignore_then_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ignore_then_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ignore_then_without_if_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIgnoreThenWithoutIfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ignore_then_without_if_response_body_for_content_types = BaseApi._post_ignore_then_without_if_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ignore_then_without_if_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9613e4b85c2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ignore_then_without_if -Schema2: typing_extensions.TypeAlias = ignore_then_without_if.IgnoreThenWithoutIf diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py deleted file mode 100644 index 6fd639a97bd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes - -path = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py deleted file mode 100644 index 141cd5132e4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_integer_type_matches_integers_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_integer_type_matches_integers_response_body_for_content_types = BaseApi._post_integer_type_matches_integers_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_integer_type_matches_integers_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index f83cf220b7d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: int - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 75015a55e57..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import integer_type_matches_integers -Schema2: typing_extensions.TypeAlias = integer_type_matches_integers.IntegerTypeMatchesIntegers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py deleted file mode 100644 index f6d1f7bfbc8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes - -path = "/responseBody/postIpv4FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 04ad2539275..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv4_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv4FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv4_format_response_body_for_content_types = BaseApi._post_ipv4_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv4_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 55901e0867d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv4_format -Schema2: typing_extensions.TypeAlias = ipv4_format.Ipv4Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e5190f29dec..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes - -path = "/responseBody/postIpv6FormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index b86845f73e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_ipv6_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIpv6FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_ipv6_format_response_body_for_content_types = BaseApi._post_ipv6_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_ipv6_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f664f74ba26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ipv6_format -Schema2: typing_extensions.TypeAlias = ipv6_format.Ipv6Format diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py deleted file mode 100644 index fa4b21eedbc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_iri_format_response_body_for_content_types import ResponseBodyPostIriFormatResponseBodyForContentTypes - -path = "/responseBody/postIriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 0fdc66e598c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_iri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_iri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_iri_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIriFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_iri_format_response_body_for_content_types = BaseApi._post_iri_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_iri_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2d5ce8c0714..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_format -Schema2: typing_extensions.TypeAlias = iri_format.IriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 49e03e18c32..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_iri_reference_format_response_body_for_content_types import ResponseBodyPostIriReferenceFormatResponseBodyForContentTypes - -path = "/responseBody/postIriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index d418e67698c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_iri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_iri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_iri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostIriReferenceFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_iri_reference_format_response_body_for_content_types = BaseApi._post_iri_reference_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_iri_reference_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e38e4efe7af..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import iri_reference_format -Schema2: typing_extensions.TypeAlias = iri_reference_format.IriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py deleted file mode 100644 index ab04f810cde..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_items_contains_response_body_for_content_types import ResponseBodyPostItemsContainsResponseBodyForContentTypes - -path = "/responseBody/postItemsContainsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py deleted file mode 100644 index a9eba781bb4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_contains_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_contains_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_contains_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsContainsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_contains_response_body_for_content_types = BaseApi._post_items_contains_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_contains_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 11613081516..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.items_contains.ItemsContainsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 75681108ad2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_contains -Schema2: typing_extensions.TypeAlias = items_contains.ItemsContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py deleted file mode 100644 index a0cd821d43b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types import ResponseBodyPostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes - -path = "/responseBody/postItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py deleted file mode 100644 index cded9debf7e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsDoesNotLookInApplicatorsValidCaseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types = BaseApi._post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 6cea3951174..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCaseTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 56c52e9e116..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_does_not_look_in_applicators_valid_case -Schema2: typing_extensions.TypeAlias = items_does_not_look_in_applicators_valid_case.ItemsDoesNotLookInApplicatorsValidCase diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py deleted file mode 100644 index 52134518ba1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostItemsWithNullInstanceElementsResponseBodyForContentTypes - -path = "/responseBody/postItemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py deleted file mode 100644 index a9d4ceef799..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_items_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_items_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_items_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostItemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_items_with_null_instance_elements_response_body_for_content_types = BaseApi._post_items_with_null_instance_elements_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_items_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index c9b7ab9ea09..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.items_with_null_instance_elements.ItemsWithNullInstanceElementsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 60737c9dad5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import items_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = items_with_null_instance_elements.ItemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 9c29d339289..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes - -path = "/responseBody/postJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 318c8291a1f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_json_pointer_format_response_body_for_content_types = BaseApi._post_json_pointer_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 489bbe53817..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_pointer_format -Schema2: typing_extensions.TypeAlias = json_pointer_format.JsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py deleted file mode 100644 index 1dc286e7b7b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes - -path = "/responseBody/postMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py deleted file mode 100644 index db7c1b08769..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxcontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxcontainsWithoutContainsIsIgnoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxcontains_without_contains_is_ignored_response_body_for_content_types = BaseApi._post_maxcontains_without_contains_is_ignored_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxcontains_without_contains_is_ignored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ebd36d19ec3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxcontains_without_contains_is_ignored -Schema2: typing_extensions.TypeAlias = maxcontains_without_contains_is_ignored.MaxcontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 06c7038e33b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes - -path = "/responseBody/postMaximumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1543302c1f3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_response_body_for_content_types = BaseApi._post_maximum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b73de2ae539..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation -Schema2: typing_extensions.TypeAlias = maximum_validation.MaximumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index ae78ec6c33e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes - -path = "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py deleted file mode 100644 index b7f2edc24bc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maximum_validation_with_unsigned_integer_response_body_for_content_types = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maximum_validation_with_unsigned_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a5cb9f890fd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maximum_validation_with_unsigned_integer -Schema2: typing_extensions.TypeAlias = maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index cb76cb68088..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 9e45e4f3e97..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxitems_validation_response_body_for_content_types = BaseApi._post_maxitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 16c2894ebba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxitems_validation -Schema2: typing_extensions.TypeAlias = maxitems_validation.MaxitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e9d84a641bb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index ad73e88cf29..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxlength_validation_response_body_for_content_types = BaseApi._post_maxlength_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxlength_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d94050ba037..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxlength_validation -Schema2: typing_extensions.TypeAlias = maxlength_validation.MaxlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py deleted file mode 100644 index 4d41e385754..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes - -path = "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py deleted file mode 100644 index 75d32073fd2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties0_means_the_object_is_empty_response_body_for_content_types = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1c24d48d19b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties0_means_the_object_is_empty -Schema2: typing_extensions.TypeAlias = maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 319dcbd3536..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 04f20e2f2e9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_maxproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_maxproperties_validation_response_body_for_content_types = BaseApi._post_maxproperties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_maxproperties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e5bd830805a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import maxproperties_validation -Schema2: typing_extensions.TypeAlias = maxproperties_validation.MaxpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py deleted file mode 100644 index 1c6f586b01c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types import ResponseBodyPostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes - -path = "/responseBody/postMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py deleted file mode 100644 index da3adea83e3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_mincontains_without_contains_is_ignored_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMincontainsWithoutContainsIsIgnoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_mincontains_without_contains_is_ignored_response_body_for_content_types = BaseApi._post_mincontains_without_contains_is_ignored_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_mincontains_without_contains_is_ignored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 68d35232895..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mincontains_without_contains_is_ignored -Schema2: typing_extensions.TypeAlias = mincontains_without_contains_is_ignored.MincontainsWithoutContainsIsIgnored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 3eb225cc1ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes - -path = "/responseBody/postMinimumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6c5ab27f180..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_response_body_for_content_types = BaseApi._post_minimum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 675ae689104..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation -Schema2: typing_extensions.TypeAlias = minimum_validation.MinimumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index a73b8e4f6d1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes - -path = "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py deleted file mode 100644 index 036a5021cb3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minimum_validation_with_signed_integer_response_body_for_content_types = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minimum_validation_with_signed_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 06b5dea583e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minimum_validation_with_signed_integer -Schema2: typing_extensions.TypeAlias = minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 938aef53ed8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postMinitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index a550e7c927e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minitems_validation_response_body_for_content_types = BaseApi._post_minitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 29f288f2b17..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minitems_validation -Schema2: typing_extensions.TypeAlias = minitems_validation.MinitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 2ca5319be17..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes - -path = "/responseBody/postMinlengthValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index b8dbb68909f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minlength_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minlength_validation_response_body_for_content_types = BaseApi._post_minlength_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minlength_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 618e8ab4279..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minlength_validation -Schema2: typing_extensions.TypeAlias = minlength_validation.MinlengthValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index cd2918690b4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 448da8f80d3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_minproperties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_minproperties_validation_response_body_for_content_types = BaseApi._post_minproperties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_minproperties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f6e1a9b1c20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import minproperties_validation -Schema2: typing_extensions.TypeAlias = minproperties_validation.MinpropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py deleted file mode 100644 index 478acc4d74a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_multiple_dependents_required_response_body_for_content_types import ResponseBodyPostMultipleDependentsRequiredResponseBodyForContentTypes - -path = "/responseBody/postMultipleDependentsRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8f3cf3e2433..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_dependents_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_dependents_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_dependents_required_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleDependentsRequiredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_dependents_required_response_body_for_content_types = BaseApi._post_multiple_dependents_required_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_dependents_required_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3ba1ea03ac2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_dependents_required -Schema2: typing_extensions.TypeAlias = multiple_dependents_required.MultipleDependentsRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py deleted file mode 100644 index 774354cf0ec..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types import ResponseBodyPostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes - -path = "/responseBody/postMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py deleted file mode 100644 index fa96af72421..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleSimultaneousPatternpropertiesAreValidatedResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 66dd94e3c9e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_simultaneous_patternproperties_are_validated -Schema2: typing_extensions.TypeAlias = multiple_simultaneous_patternproperties_are_validated.MultipleSimultaneousPatternpropertiesAreValidated diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py deleted file mode 100644 index 0367d6c69c8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types import ResponseBodyPostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes - -path = "/responseBody/postMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1fa17f17d85..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostMultipleTypesCanBeSpecifiedInAnArrayResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types = BaseApi._post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index ca4aa5887ce..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - int, - str, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2d953804838..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import multiple_types_can_be_specified_in_an_array -Schema2: typing_extensions.TypeAlias = multiple_types_can_be_specified_in_an_array.MultipleTypesCanBeSpecifiedInAnArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index 95e15ba92fd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index 691bedcc1dd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_allof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_allof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1aaa108330d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_allof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index aae340572e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index a5c58418d78..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_anyof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4d81833ca5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_anyof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 12758f725c7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes - -path = "/responseBody/postNestedItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5cd1c08891e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_items_response_body_for_content_types = BaseApi._post_nested_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 2d1144f546d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.nested_items.NestedItemsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8a0193a2831..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_items -Schema2: typing_extensions.TypeAlias = nested_items.NestedItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index 0086d5c131c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes - -path = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py deleted file mode 100644 index d11395d5809..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nested_oneof_to_check_validation_semantics_response_body_for_content_types = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 164ce7d2feb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nested_oneof_to_check_validation_semantics -Schema2: typing_extensions.TypeAlias = nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py deleted file mode 100644 index 0d1a20a9594..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types import ResponseBodyPostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes - -path = "/responseBody/postNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 771d1444a0e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNonAsciiPatternWithAdditionalpropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types = BaseApi._post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index ded6c211b01..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalpropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fe71df0ddc0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_ascii_pattern_with_additionalproperties -Schema2: typing_extensions.TypeAlias = non_ascii_pattern_with_additionalproperties.NonAsciiPatternWithAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py deleted file mode 100644 index be23568be28..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types import ResponseBodyPostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes - -path = "/responseBody/postNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py deleted file mode 100644 index 949ed38d831..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_non_interference_across_combined_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_non_interference_across_combined_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_non_interference_across_combined_schemas_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNonInterferenceAcrossCombinedSchemasResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_non_interference_across_combined_schemas_response_body_for_content_types = BaseApi._post_non_interference_across_combined_schemas_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_non_interference_across_combined_schemas_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7f98584568e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import non_interference_across_combined_schemas -Schema2: typing_extensions.TypeAlias = non_interference_across_combined_schemas.NonInterferenceAcrossCombinedSchemas diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 2968687b1d4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes - -path = "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index b3365eea277..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_more_complex_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_more_complex_schema_response_body_for_content_types = BaseApi._post_not_more_complex_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_more_complex_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7466659646d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_more_complex_schema -Schema2: typing_extensions.TypeAlias = not_more_complex_schema.NotMoreComplexSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py deleted file mode 100644 index fab62f6f0f3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_not_multiple_types_response_body_for_content_types import ResponseBodyPostNotMultipleTypesResponseBodyForContentTypes - -path = "/responseBody/postNotMultipleTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 60e598632f6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_multiple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_multiple_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_multiple_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotMultipleTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_multiple_types_response_body_for_content_types = BaseApi._post_not_multiple_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_multiple_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 808ed7158e0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not_multiple_types -Schema2: typing_extensions.TypeAlias = not_multiple_types.NotMultipleTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py deleted file mode 100644 index 12d3bba8822..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes - -path = "/responseBody/postNotResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5fe9d69ef6e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_not_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_not_response_body_for_content_types = BaseApi._post_not_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_not_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9ad18bdd1d0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import not -Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index 53972940ea0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes - -path = "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4c827820e66..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_nul_characters_in_strings_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_nul_characters_in_strings_response_body_for_content_types = BaseApi._post_nul_characters_in_strings_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_nul_characters_in_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 8a213c77893..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Literal["hello\x00there"] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2422cba070d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import nul_characters_in_strings -Schema2: typing_extensions.TypeAlias = nul_characters_in_strings.NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py deleted file mode 100644 index f340743b836..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes - -path = "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py deleted file mode 100644 index f6767d186c6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_null_type_matches_only_the_null_object_response_body_for_content_types = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_null_type_matches_only_the_null_object_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 50796c1ac43..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: None - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a70311d5d92..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import null_type_matches_only_the_null_object -Schema2: typing_extensions.TypeAlias = null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py deleted file mode 100644 index 2c021329fd2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes - -path = "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py deleted file mode 100644 index 00f8609c3ed..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_number_type_matches_numbers_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_number_type_matches_numbers_response_body_for_content_types = BaseApi._post_number_type_matches_numbers_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_number_type_matches_numbers_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index bedf2ff6ca1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 404c9d56f43..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_type_matches_numbers -Schema2: typing_extensions.TypeAlias = number_type_matches_numbers.NumberTypeMatchesNumbers diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 56fb6d5dd41..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes - -path = "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 967edc154a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_properties_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_properties_validation_response_body_for_content_types = BaseApi._post_object_properties_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_properties_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1593145b4bc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_properties_validation -Schema2: typing_extensions.TypeAlias = object_properties_validation.ObjectPropertiesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py deleted file mode 100644 index 9c440333b2d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes - -path = "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1dd9fa3fbb6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_object_type_matches_objects_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_object_type_matches_objects_response_body_for_content_types = BaseApi._post_object_type_matches_objects_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_object_type_matches_objects_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index a769310ea96..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 417224c18ba..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_type_matches_objects -Schema2: typing_extensions.TypeAlias = object_type_matches_objects.ObjectTypeMatchesObjects diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index f096eb72f82..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes - -path = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8d95130244f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_complex_types_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_complex_types_response_body_for_content_types = BaseApi._post_oneof_complex_types_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_complex_types_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c473dde6bfb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_complex_types -Schema2: typing_extensions.TypeAlias = oneof_complex_types.OneofComplexTypes diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 222fe0b64a9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes - -path = "/responseBody/postOneofResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py deleted file mode 100644 index 87d905e6cb2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_response_body_for_content_types = BaseApi._post_oneof_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 474d29f6009..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof -Schema2: typing_extensions.TypeAlias = oneof.Oneof diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 6aee2766777..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes - -path = "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index ca43c65d7b4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_base_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_base_schema_response_body_for_content_types = BaseApi._post_oneof_with_base_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_base_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index afd6bbfefd5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d1898df2fe7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_base_schema -Schema2: typing_extensions.TypeAlias = oneof_with_base_schema.OneofWithBaseSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 29b1dba63cc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes - -path = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8fcc6cfcb87..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_empty_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_empty_schema_response_body_for_content_types = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_empty_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 792b00c2b5e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_empty_schema -Schema2: typing_extensions.TypeAlias = oneof_with_empty_schema.OneofWithEmptySchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py deleted file mode 100644 index fb966129116..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes - -path = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py deleted file mode 100644 index 21df132c256..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_oneof_with_required_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_oneof_with_required_response_body_for_content_types = BaseApi._post_oneof_with_required_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_oneof_with_required_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index a769310ea96..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 16715d35af0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import oneof_with_required -Schema2: typing_extensions.TypeAlias = oneof_with_required.OneofWithRequired diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py deleted file mode 100644 index 06d097f0429..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes - -path = "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py deleted file mode 100644 index f9c647f4f5f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_is_not_anchored_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_is_not_anchored_response_body_for_content_types = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_is_not_anchored_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 293cfe38cb4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_is_not_anchored -Schema2: typing_extensions.TypeAlias = pattern_is_not_anchored.PatternIsNotAnchored diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 3d2a9cd79fd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes - -path = "/responseBody/postPatternValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 09f446da89a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_pattern_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_pattern_validation_response_body_for_content_types = BaseApi._post_pattern_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_pattern_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 4920b211601..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pattern_validation -Schema2: typing_extensions.TypeAlias = pattern_validation.PatternValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py deleted file mode 100644 index 8ae1347b4b4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types import ResponseBodyPostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes - -path = "/responseBody/postPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py deleted file mode 100644 index b9ae2397916..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternpropertiesValidatesPropertiesMatchingARegexResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types = BaseApi._post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 87ad0cdfa8d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_validates_properties_matching_a_regex -Schema2: typing_extensions.TypeAlias = patternproperties_validates_properties_matching_a_regex.PatternpropertiesValidatesPropertiesMatchingARegex diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index 5a13f3a9335..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes - -path = "/responseBody/postPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 2e1c88c4012..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPatternpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index b7142af3c40..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import patternproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = patternproperties_with_null_valued_instance_properties.PatternpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 743caf8869c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types import ResponseBodyPostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes - -path = "/responseBody/postPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index 6ce2b37375b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPrefixitemsValidationAdjustsTheStartingIndexForItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 97378ea1acc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItemsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index cd69d04ea26..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_validation_adjusts_the_starting_index_for_items -Schema2: typing_extensions.TypeAlias = prefixitems_validation_adjusts_the_starting_index_for_items.PrefixitemsValidationAdjustsTheStartingIndexForItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py deleted file mode 100644 index d9367885649..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes - -path = "/responseBody/postPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py deleted file mode 100644 index 712ff10d8b8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_prefixitems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPrefixitemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_prefixitems_with_null_instance_elements_response_body_for_content_types = BaseApi._post_prefixitems_with_null_instance_elements_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_prefixitems_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2185e963d00..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import prefixitems_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = prefixitems_with_null_instance_elements.PrefixitemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py deleted file mode 100644 index 41aabde4e4e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types import ResponseBodyPostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes - -path = "/responseBody/postPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py deleted file mode 100644 index 51f93cf5d5f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesPatternpropertiesAdditionalpropertiesInteractionResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types = BaseApi._post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index de649fa4319..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteractionDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 83b71f80614..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_patternproperties_additionalproperties_interaction -Schema2: typing_extensions.TypeAlias = properties_patternproperties_additionalproperties_interaction.PropertiesPatternpropertiesAdditionalpropertiesInteraction diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py deleted file mode 100644 index cc1349075a2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes - -path = "/responseBody/postPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py deleted file mode 100644 index 672f6d3cf90..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types = BaseApi._post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index baee22e025f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_whose_names_are_javascript_object_property_names -Schema2: typing_extensions.TypeAlias = properties_whose_names_are_javascript_object_property_names.PropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 524ce0e570f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index f2e193a5990..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_escaped_characters_response_body_for_content_types = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5260b009fd7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_escaped_characters -Schema2: typing_extensions.TypeAlias = properties_with_escaped_characters.PropertiesWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index 3ffa469a8c5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes - -path = "/responseBody/postPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index ef72091615f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_properties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_properties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_properties_with_null_valued_instance_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_properties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e02ac63f49f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import properties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = properties_with_null_valued_instance_properties.PropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py deleted file mode 100644 index 0ca1fea80ee..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes - -path = "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py deleted file mode 100644 index 49132310f60..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_property_named_ref_that_is_not_a_reference_response_body_for_content_types = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c5b136bf4a3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import property_named_ref_that_is_not_a_reference -Schema2: typing_extensions.TypeAlias = property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 5e23637021f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_propertynames_validation_response_body_for_content_types import ResponseBodyPostPropertynamesValidationResponseBodyForContentTypes - -path = "/responseBody/postPropertynamesValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index ed471342a52..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_propertynames_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_propertynames_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_propertynames_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostPropertynamesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_propertynames_validation_response_body_for_content_types = BaseApi._post_propertynames_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_propertynames_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 915e3feeac0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import propertynames_validation -Schema2: typing_extensions.TypeAlias = propertynames_validation.PropertynamesValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py deleted file mode 100644 index af3ca1c015a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_regex_format_response_body_for_content_types import ResponseBodyPostRegexFormatResponseBodyForContentTypes - -path = "/responseBody/postRegexFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 21dffe89c5c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_regex_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_regex_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_regex_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRegexFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_regex_format_response_body_for_content_types = BaseApi._post_regex_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_regex_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 28598ef5139..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regex_format -Schema2: typing_extensions.TypeAlias = regex_format.RegexFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py deleted file mode 100644 index ac517b795dc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types import ResponseBodyPostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes - -path = "/responseBody/postRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3c419c09354..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRegexesAreNotAnchoredByDefaultAndAreCaseSensitiveResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a13163b0df7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import regexes_are_not_anchored_by_default_and_are_case_sensitive -Schema2: typing_extensions.TypeAlias = regexes_are_not_anchored_by_default_and_are_case_sensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 724da9a034d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types import ResponseBodyPostRelativeJsonPointerFormatResponseBodyForContentTypes - -path = "/responseBody/postRelativeJsonPointerFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 603d249dd1b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_relative_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_relative_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_relative_json_pointer_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRelativeJsonPointerFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_relative_json_pointer_format_response_body_for_content_types = BaseApi._post_relative_json_pointer_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_relative_json_pointer_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index ba70730fb48..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import relative_json_pointer_format -Schema2: typing_extensions.TypeAlias = relative_json_pointer_format.RelativeJsonPointerFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 8f8152a4d4e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes - -path = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index dd7fc1b83fb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_default_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_default_validation_response_body_for_content_types = BaseApi._post_required_default_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_default_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3ddabc1af63..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_default_validation -Schema2: typing_extensions.TypeAlias = required_default_validation.RequiredDefaultValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py deleted file mode 100644 index 4cbc6625cc4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types import ResponseBodyPostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes - -path = "/responseBody/postRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py deleted file mode 100644 index e900da1ce31..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8d36048378e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_properties_whose_names_are_javascript_object_property_names -Schema2: typing_extensions.TypeAlias = required_properties_whose_names_are_javascript_object_property_names.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e482831717f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes - -path = "/responseBody/postRequiredValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8e0461985a9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_validation_response_body_for_content_types = BaseApi._post_required_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8f5ebbe79cf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_validation -Schema2: typing_extensions.TypeAlias = required_validation.RequiredValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py deleted file mode 100644 index 19d6f36e233..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes - -path = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py deleted file mode 100644 index b817cb104eb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_empty_array_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_empty_array_response_body_for_content_types = BaseApi._post_required_with_empty_array_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_empty_array_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index af52814277e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_empty_array -Schema2: typing_extensions.TypeAlias = required_with_empty_array.RequiredWithEmptyArray diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 5e8263300ab..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes - -path = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py deleted file mode 100644 index 7e773621962..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_required_with_escaped_characters_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_required_with_escaped_characters_response_body_for_content_types = BaseApi._post_required_with_escaped_characters_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_required_with_escaped_characters_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9489d00c981..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import required_with_escaped_characters -Schema2: typing_extensions.TypeAlias = required_with_escaped_characters.RequiredWithEscapedCharacters diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 7c2389e93c5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes - -path = "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index b54d0e0f8d3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_simple_enum_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_simple_enum_validation_response_body_for_content_types = BaseApi._post_simple_enum_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_simple_enum_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index bedf2ff6ca1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5e64dd92807..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import simple_enum_validation -Schema2: typing_extensions.TypeAlias = simple_enum_validation.SimpleEnumValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py deleted file mode 100644 index c1f67fa4d84..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_single_dependency_response_body_for_content_types import ResponseBodyPostSingleDependencyResponseBodyForContentTypes - -path = "/responseBody/postSingleDependencyResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py deleted file mode 100644 index 85803b45f7f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_single_dependency_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSingleDependencyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_single_dependency_response_body_for_content_types = BaseApi._post_single_dependency_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_single_dependency_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3982e382df8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import single_dependency -Schema2: typing_extensions.TypeAlias = single_dependency.SingleDependency diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index f793c61db45..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types import ResponseBodyPostSmallMultipleOfLargeIntegerResponseBodyForContentTypes - -path = "/responseBody/postSmallMultipleOfLargeIntegerResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py deleted file mode 100644 index f4e91b0ad73..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_small_multiple_of_large_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_small_multiple_of_large_integer_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_small_multiple_of_large_integer_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostSmallMultipleOfLargeIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_small_multiple_of_large_integer_response_body_for_content_types = BaseApi._post_small_multiple_of_large_integer_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_small_multiple_of_large_integer_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index f83cf220b7d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: int - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 5493790072e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import small_multiple_of_large_integer -Schema2: typing_extensions.TypeAlias = small_multiple_of_large_integer.SmallMultipleOfLargeInteger diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index eded6790dd1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes - -path = "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py deleted file mode 100644 index 1448af5a7c4..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_string_type_matches_strings_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_string_type_matches_strings_response_body_for_content_types = BaseApi._post_string_type_matches_strings_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_string_type_matches_strings_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index afd6bbfefd5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 27b5b8bcead..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_type_matches_strings -Schema2: typing_extensions.TypeAlias = string_type_matches_strings.StringTypeMatchesStrings diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 3e5bbe20eb9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_time_format_response_body_for_content_types import ResponseBodyPostTimeFormatResponseBodyForContentTypes - -path = "/responseBody/postTimeFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 0f996c7333d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_time_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTimeFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_time_format_response_body_for_content_types = BaseApi._post_time_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_time_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 10d05231bea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import time_format -Schema2: typing_extensions.TypeAlias = time_format.TimeFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py deleted file mode 100644 index 07a1adabf53..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_type_array_object_or_null_response_body_for_content_types import ResponseBodyPostTypeArrayObjectOrNullResponseBodyForContentTypes - -path = "/responseBody/postTypeArrayObjectOrNullResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py deleted file mode 100644 index 3a53a57d04b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_array_object_or_null_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_array_object_or_null_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_array_object_or_null_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeArrayObjectOrNullResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_array_object_or_null_response_body_for_content_types = BaseApi._post_type_array_object_or_null_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_array_object_or_null_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 98cb654ccd9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - None, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 75bddff3f20..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_object_or_null -Schema2: typing_extensions.TypeAlias = type_array_object_or_null.TypeArrayObjectOrNull diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py deleted file mode 100644 index 760a294f189..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_type_array_or_object_response_body_for_content_types import ResponseBodyPostTypeArrayOrObjectResponseBodyForContentTypes - -path = "/responseBody/postTypeArrayOrObjectResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py deleted file mode 100644 index 61fc4f4aa62..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_array_or_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_array_or_object_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_array_or_object_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeArrayOrObjectResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_array_or_object_response_body_for_content_types = BaseApi._post_type_array_or_object_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_array_or_object_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index e0fe2593326..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 207c015b341..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_array_or_object -Schema2: typing_extensions.TypeAlias = type_array_or_object.TypeArrayOrObject diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py deleted file mode 100644 index 9188deec331..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types import ResponseBodyPostTypeAsArrayWithOneItemResponseBodyForContentTypes - -path = "/responseBody/postTypeAsArrayWithOneItemResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py deleted file mode 100644 index f5b05ddaeed..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_type_as_array_with_one_item_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_type_as_array_with_one_item_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_type_as_array_with_one_item_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostTypeAsArrayWithOneItemResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_type_as_array_with_one_item_response_body_for_content_types = BaseApi._post_type_as_array_with_one_item_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_type_as_array_with_one_item_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index afd6bbfefd5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 008ad4c0312..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import type_as_array_with_one_item -Schema2: typing_extensions.TypeAlias = type_as_array_with_one_item.TypeAsArrayWithOneItem diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 0753616c549..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types import ResponseBodyPostUnevaluateditemsAsSchemaResponseBodyForContentTypes - -path = "/responseBody/postUnevaluateditemsAsSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 65bd75e36b5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_as_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_as_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_as_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsAsSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_as_schema_response_body_for_content_types = BaseApi._post_unevaluateditems_as_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_as_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d5f5a3df221..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_as_schema -Schema2: typing_extensions.TypeAlias = unevaluateditems_as_schema.UnevaluateditemsAsSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py deleted file mode 100644 index c8dc397f25b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types import ResponseBodyPostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes - -path = "/responseBody/postUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py deleted file mode 100644 index 7494783637c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsDependsOnMultipleNestedContainsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a0d5b127247..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_depends_on_multiple_nested_contains -Schema2: typing_extensions.TypeAlias = unevaluateditems_depends_on_multiple_nested_contains.UnevaluateditemsDependsOnMultipleNestedContains diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 1e607d8d3a9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithItemsResponseBodyForContentTypes - -path = "/responseBody/postUnevaluateditemsWithItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index df993ea0de8..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_with_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_with_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_with_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsWithItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_with_items_response_body_for_content_types = BaseApi._post_unevaluateditems_with_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_with_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index fd395b03b8f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.unevaluateditems_with_items.UnevaluateditemsWithItemsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9a0410581eb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_items -Schema2: typing_extensions.TypeAlias = unevaluateditems_with_items.UnevaluateditemsWithItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py deleted file mode 100644 index f24aa9420e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types import ResponseBodyPostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes - -path = "/responseBody/postUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py deleted file mode 100644 index e784ef4c1cf..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluateditems_with_null_instance_elements_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluateditemsWithNullInstanceElementsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluateditems_with_null_instance_elements_response_body_for_content_types = BaseApi._post_unevaluateditems_with_null_instance_elements_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluateditems_with_null_instance_elements_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fa885543144..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluateditems_with_null_instance_elements -Schema2: typing_extensions.TypeAlias = unevaluateditems_with_null_instance_elements.UnevaluateditemsWithNullInstanceElements diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py deleted file mode 100644 index 0147d7453ee..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes - -path = "/responseBody/postUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py deleted file mode 100644 index 4a75715b224..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesNotAffectedByPropertynamesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d2d6d5dc23c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_not_affected_by_propertynames -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_not_affected_by_propertynames.UnevaluatedpropertiesNotAffectedByPropertynames diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 443ee48da06..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesSchemaResponseBodyForContentTypes - -path = "/responseBody/postUnevaluatedpropertiesSchemaResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py deleted file mode 100644 index 362dcaeac0c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_schema_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_schema_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_schema_response_body_for_content_types = BaseApi._post_unevaluatedproperties_schema_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_schema_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index a769310ea96..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index fca2e2461c0..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_schema -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_schema.UnevaluatedpropertiesSchema diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py deleted file mode 100644 index 4feff9c9260..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes - -path = "/responseBody/postUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py deleted file mode 100644 index ad9137009dc..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesWithAdjacentAdditionalpropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index af2a926d0e6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalpropertiesDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1a3d1132937..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_adjacent_additionalproperties -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_adjacent_additionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index c95ae9e40b2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types import ResponseBodyPostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes - -path = "/responseBody/postUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py deleted file mode 100644 index 34e6bcb4d17..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUnevaluatedpropertiesWithNullValuedInstancePropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 6e452389e71..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import unevaluatedproperties_with_null_valued_instance_properties -Schema2: typing_extensions.TypeAlias = unevaluatedproperties_with_null_valued_instance_properties.UnevaluatedpropertiesWithNullValuedInstanceProperties diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 37e8f062863..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index 211fa9e22c6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_validation_response_body_for_content_types = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index a87136f730d..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_validation -Schema2: typing_extensions.TypeAlias = uniqueitems_false_validation.UniqueitemsFalseValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py deleted file mode 100644 index cb2c9d36fea..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index fee09eec632..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsFalseWithAnArrayOfItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types = BaseApi._post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8b39a15068e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_false_with_an_array_of_items -Schema2: typing_extensions.TypeAlias = uniqueitems_false_with_an_array_of_items.UniqueitemsFalseWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 95cf2c1f018..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py deleted file mode 100644 index bb3c95b8fe5..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_validation_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_validation_response_body_for_content_types = BaseApi._post_uniqueitems_validation_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_validation_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 22d0b748ea7..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_validation -Schema2: typing_extensions.TypeAlias = uniqueitems_validation.UniqueitemsValidation diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 0f0578e0be9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types import ResponseBodyPostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes - -path = "/responseBody/postUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py deleted file mode 100644 index c804454a0da..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uniqueitems_with_an_array_of_items_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUniqueitemsWithAnArrayOfItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uniqueitems_with_an_array_of_items_response_body_for_content_types = BaseApi._post_uniqueitems_with_an_array_of_items_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uniqueitems_with_an_array_of_items_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 82a52c16a75..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uniqueitems_with_an_array_of_items -Schema2: typing_extensions.TypeAlias = uniqueitems_with_an_array_of_items.UniqueitemsWithAnArrayOfItems diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 91e06866bd6..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes - -path = "/responseBody/postUriFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index ec1b58f8f00..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_format_response_body_for_content_types = BaseApi._post_uri_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 654ba34398b..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_format -Schema2: typing_extensions.TypeAlias = uri_format.UriFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 4b73213c603..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes - -path = "/responseBody/postUriReferenceFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 5b991fb70bb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_reference_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_reference_format_response_body_for_content_types = BaseApi._post_uri_reference_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_reference_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 2b77aef5da1..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_reference_format -Schema2: typing_extensions.TypeAlias = uri_reference_format.UriReferenceFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 4d9fad8a307..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes - -path = "/responseBody/postUriTemplateFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 8176c47db49..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uri_template_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uri_template_format_response_body_for_content_types = BaseApi._post_uri_template_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uri_template_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c4967db183c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uri_template_format -Schema2: typing_extensions.TypeAlias = uri_template_format.UriTemplateFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py deleted file mode 100644 index c54d8f14a05..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_uuid_format_response_body_for_content_types import ResponseBodyPostUuidFormatResponseBodyForContentTypes - -path = "/responseBody/postUuidFormatResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py deleted file mode 100644 index 7c66139a44f..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uuid_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_uuid_format_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_uuid_format_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostUuidFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_uuid_format_response_body_for_content_types = BaseApi._post_uuid_format_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_uuid_format_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 76fa1e8f1e2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import uuid_format -Schema2: typing_extensions.TypeAlias = uuid_format.UuidFormat diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py deleted file mode 100644 index 8764e5383f3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types import ResponseBodyPostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes - -path = "/responseBody/postValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes" \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py deleted file mode 100644 index f4761bd0b40..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_validate_against_correct_branch_then_vs_else_response_body_for_content_types( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostValidateAgainstCorrectBranchThenVsElseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_validate_against_correct_branch_then_vs_else_response_body_for_content_types = BaseApi._post_validate_against_correct_branch_then_vs_else_response_body_for_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_validate_against_correct_branch_then_vs_else_response_body_for_content_types diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index 675c3d42400..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema2 - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 026e5c74a70..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import validate_against_correct_branch_then_vs_else -Schema2: typing_extensions.TypeAlias = validate_against_correct_branch_then_vs_else.ValidateAgainstCorrectBranchThenVsElse diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed b/samples/client/3_1_0_unit_test/python/src/openapi_client/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py deleted file mode 100644 index ea2057c7c05..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/rest.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi # type: ignore[import] -import urllib3 -from urllib3 import fields -from urllib3 import exceptions as urllib3_exceptions -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import exceptions - - -logger = logging.getLogger(__name__) -_TYPE_FIELD_VALUE = typing.Union[str, bytes] - - -class RequestField(fields.RequestField): - def __init__( - self, - name: str, - data: _TYPE_FIELD_VALUE, - filename: typing.Optional[str] = None, - headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, - header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, - ): - super().__init__(name, data, filename, headers, header_formatter) # type: ignore - - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise exceptions.ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - headers = headers or HTTPHeaderDict() - - used_timeout: typing.Optional[urllib3.Timeout] = None - if timeout: - if isinstance(timeout, (int, float)): - used_timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=used_timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - encode_multipart=False, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise exceptions.ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - except urllib3_exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise exceptions.ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def get(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def head(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def options(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def delete(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def post(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def put(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def patch(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py deleted file mode 100644 index 93aebd2e4f9..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -import typing_extensions - -from .schema import ( - get_class, - none_type_, - classproperty, - Bool, - FileIO, - Schema, - SingletonMeta, - AnyTypeSchema, - UnsetAnyTypeSchema, - INPUT_TYPES_ALL -) - -from .schemas import ( - ListSchema, - NoneSchema, - NumberSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - StrSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BytesSchema, - FileSchema, - BinarySchema, - BoolSchema, - NotAnyTypeSchema, - OUTPUT_BASE_TYPES, - DictSchema -) -from .validation import ( - PatternInfo, - ValidationMetadata, - immutabledict -) -from .format import ( - as_date, - as_datetime, - as_decimal, - as_uuid -) - -def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore - res = {} - for key, val in t_dict.__annotations__.items(): - if isinstance(val, typing._GenericAlias): # type: ignore - # typing.Type[W] -> W - val_cls = typing.get_args(val)[0] - res[key] = val_cls - return res - -X = typing.TypeVar('X', bound=typing.Tuple) - -def tuple_to_instance(tup: typing.Type[X]) -> X: - res = [] - for arg in typing.get_args(tup): - if isinstance(arg, typing._GenericAlias): # type: ignore - # typing.Type[Schema] -> Schema - arg_cls = typing.get_args(arg)[0] - res.append(arg_cls) - return tuple(res) # type: ignore - - -class Unset: - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset: Unset = Unset() - -def key_unknown_error_msg(key: str) -> str: - return (f"Invalid key. The key {key} is not a known key in this payload. " - "If this key is an additional property, use get_additional_property_" - ) - -def raise_if_key_known( - key: str, - required_keys: typing.FrozenSet[str], - optional_keys: typing.FrozenSet[str] -): - if key in required_keys or key in optional_keys: - raise ValueError(f"The key {key} is a known property, use get_property to access its value") - -__all__ = [ - 'get_class', - 'none_type_', - 'classproperty', - 'Bool', - 'FileIO', - 'Schema', - 'SingletonMeta', - 'AnyTypeSchema', - 'UnsetAnyTypeSchema', - 'INPUT_TYPES_ALL', - 'ListSchema', - 'NoneSchema', - 'NumberSchema', - 'IntSchema', - 'Int32Schema', - 'Int64Schema', - 'Float32Schema', - 'Float64Schema', - 'StrSchema', - 'UUIDSchema', - 'DateSchema', - 'DateTimeSchema', - 'DecimalSchema', - 'BytesSchema', - 'FileSchema', - 'BinarySchema', - 'BoolSchema', - 'NotAnyTypeSchema', - 'OUTPUT_BASE_TYPES', - 'DictSchema', - 'PatternInfo', - 'ValidationMetadata', - 'immutabledict', - 'as_date', - 'as_datetime', - 'as_decimal', - 'as_uuid', - 'typed_dict_to_instance', - 'tuple_to_instance', - 'Unset', - 'unset', - 'key_unknown_error_msg', - 'raise_if_key_known' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py deleted file mode 100644 index bb614903b82..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/format.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -import decimal -import functools -import typing -import uuid - -from dateutil import parser, tz - - -class CustomIsoparser(parser.isoparser): - def __init__(self, sep: typing.Optional[str] = None): - """ - :param sep: - A single character that separates date and time portions. If - ``None``, the parser will accept any single character. - For strict ISO-8601 adherence, pass ``'T'``. - """ - if sep is not None: - if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): - raise ValueError('Separator must be a single, non-numeric ' + - 'ASCII character') - - used_sep = sep.encode('ascii') - else: - used_sep = None - - self._sep = used_sep - - @staticmethod - def __get_ascii_bytes(str_in: str) -> bytes: - # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII - # ASCII is the same in UTF-8 - try: - return str_in.encode('ascii') - except UnicodeEncodeError as e: - msg = 'ISO-8601 strings should contain only ASCII characters' - raise ValueError(msg) from e - - def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isodate(dt_str_ascii) # type: ignore - values = typing.cast(typing.Tuple[typing.List[int], int], values) - components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) - pos = values[1] - return components, pos - - def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isotime(dt_str_ascii) # type: ignore - components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore - return components - - def parse_isodatetime(self, dt_str: str) -> datetime.datetime: - date_components, pos = self.__parse_isodate(dt_str) - if len(dt_str) <= pos: - # len(components) <= 3 - raise ValueError('Value is not a datetime') - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) - if hour == 24: - hour = 0 - components = (*date_components, hour, minute, second, microsecond, tzinfo) - return datetime.datetime(*components) + datetime.timedelta(days=1) - else: - components = (*date_components, hour, minute, second, microsecond, tzinfo) - else: - raise ValueError('String contains unknown ISO components') - - return datetime.datetime(*components) - - def parse_isodate_str(self, datestr: str) -> datetime.date: - components, pos = self.__parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return datetime.date(*components) - -DEFAULT_ISOPARSER = CustomIsoparser() - -@functools.lru_cache() -def as_date(arg: str) -> datetime.date: - """ - type = "string" - format = "date" - """ - return DEFAULT_ISOPARSER.parse_isodate_str(arg) - -@functools.lru_cache() -def as_datetime(arg: str) -> datetime.datetime: - """ - type = "string" - format = "date-time" - """ - return DEFAULT_ISOPARSER.parse_isodatetime(arg) - -@functools.lru_cache() -def as_decimal(arg: str) -> decimal.Decimal: - """ - Applicable when storing decimals that are sent over the wire as strings - type = "string" - format = "number" - """ - return decimal.Decimal(arg) - -@functools.lru_cache() -def as_uuid(arg: str) -> uuid.UUID: - """ - type = "string" - format = "uuid" - """ - return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py deleted file mode 100644 index 3897e140a4a..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/original_immutabledict.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -MIT License - -Copyright (c) 2020 Corentin Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -""" -from __future__ import annotations -import typing -import typing_extensions - -_K = typing.TypeVar("_K") -_V = typing.TypeVar("_V", covariant=True) - - -class immutabledict(typing.Mapping[_K, _V]): - """ - An immutable wrapper around dictionaries that implements - the complete :py:class:`collections.Mapping` interface. - It can be used as a drop-in replacement for dictionaries - where immutability is desired. - - Note: custom version of this class made to remove __init__ - """ - - dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict - _dict: typing.Dict[_K, _V] - _hash: typing.Optional[int] - - @classmethod - def fromkeys( - cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None - ) -> "immutabledict[_K, _V]": - return cls(dict.fromkeys(seq, value)) - - def __new__(cls, *args: typing.Any) -> typing_extensions.Self: - inst = super().__new__(cls) - setattr(inst, '_dict', cls.dict_cls(*args)) - setattr(inst, '_hash', None) - return inst - - def __getitem__(self, key: _K) -> _V: - return self._dict[key] - - def __contains__(self, key: object) -> bool: - return key in self._dict - - def __iter__(self) -> typing.Iterator[_K]: - return iter(self._dict) - - def __len__(self) -> int: - return len(self._dict) - - def __repr__(self) -> str: - return "%s(%r)" % (self.__class__.__name__, self._dict) - - def __hash__(self) -> int: - if self._hash is None: - h = 0 - for key, value in self.items(): - h ^= hash((key, value)) - self._hash = h - - return self._hash - - def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(self) - new.update(other) - return self.__class__(new) - - def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(other) - new.update(self) - return new - - def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: - raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py deleted file mode 100644 index 18cacd94c6c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schema.py +++ /dev/null @@ -1,729 +0,0 @@ -from __future__ import annotations -import datetime -import dataclasses -import io -import types -import typing -import uuid - -import functools -import typing_extensions - -from unit_test_api import exceptions -from unit_test_api.configurations import schema_configuration - -from . import validation - -_T_co = typing.TypeVar("_T_co", covariant=True) - - -class SequenceNotStr(typing.Protocol[_T_co]): - """ - if a Protocol would define the interface of Sequence, this protocol - would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence - methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection - """ - def __contains__(self, value: object, /) -> bool: - raise NotImplementedError - - def __getitem__(self, index, /): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError - - def __iter__(self) -> typing.Iterator[_T_co]: - raise NotImplementedError - - def __reversed__(self, /) -> typing.Iterator[_T_co]: - raise NotImplementedError - -none_type_ = type(None) -T = typing.TypeVar('T', bound=typing.Mapping) -U = typing.TypeVar('U', bound=SequenceNotStr) -W = typing.TypeVar('W') - - -class SchemaTyped: - additional_properties: typing.Type[Schema] - all_of: typing.Tuple[typing.Type[Schema], ...] - any_of: typing.Tuple[typing.Type[Schema], ...] - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] - default: typing.Union[str, int, float, bool, None] - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] - exclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - format: str - inclusive_maximum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - items: typing.Type[Schema] - max_items: int - max_length: int - max_properties: int - min_items: int - min_length: int - min_properties: int - multiple_of: typing.Union[int, float] - not_: typing.Type[Schema] - one_of: typing.Tuple[typing.Type[Schema], ...] - pattern: validation.PatternInfo - properties: typing.Mapping[str, typing.Type[Schema]] - required: typing.FrozenSet[str] - types: typing.FrozenSet[typing.Type] - unique_items: bool - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: - raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore - super(FileIO, inst).__init__(arg.name) - return inst - raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): - """ - Needed for instantiation when passing in arguments of the above type - """ - pass - - -class classproperty(typing.Generic[W]): - def __init__(self, method: typing.Callable[..., W]): - self.__method = method - functools.update_wrapper(self, method) # type: ignore - - def __get__(self, obj, cls=None) -> W: - if cls is None: - cls = type(obj) - return self.__method(cls) - - -class Bool: - _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} - """ - This class is needed to replace bool during validation processing - json schema requires that 0 != False and 1 != True - python implementation defines 0 == False and 1 == True - To meet the json schema requirements, all bool instances are replaced with Bool singletons - during validation only, and then bool values are returned from validation - """ - - def __new__(cls, arg_: bool, **kwargs): - """ - Method that implements singleton - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, arg_) - if key not in cls._instances: - inst = super().__new__(cls) - cls._instances[key] = inst - return cls._instances[key] - - def __repr__(self): - if bool(self): - return f'' - return f'' - - @classproperty - def TRUE(cls): - return cls(True) # type: ignore - - @classproperty - def FALSE(cls): - return cls(False) # type: ignore - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -def cast_to_allowed_types( - arg: typing.Union[ - dict, - validation.immutabledict, - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - ], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] -) -> typing.Union[ - validation.immutabledict, - tuple, - float, - int, - str, - bytes, - Bool, - None, - FileIO -]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - path_to_type[path_to_item] = str - return str(arg) - elif isinstance(arg, (dict, validation.immutabledict)): - path_to_type[path_to_item] = validation.immutabledict - return validation.immutabledict( - { - key: cast_to_allowed_types( - val, - from_server, - validated_path_to_schemas, - path_to_item + (key,), - path_to_type, - ) - for key, val in arg.items() - } - ) - elif isinstance(arg, bool): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - path_to_type[path_to_item] = Bool - if arg: - return Bool.TRUE - return Bool.FALSE - elif isinstance(arg, int): - path_to_type[path_to_item] = int - return arg - elif isinstance(arg, float): - path_to_type[path_to_item] = float - return arg - elif isinstance(arg, (tuple, list)): - path_to_type[path_to_item] = tuple - return tuple( - [ - cast_to_allowed_types( - item, - from_server, - validated_path_to_schemas, - path_to_item + (i,), - path_to_type, - ) - for i, item in enumerate(arg) - ] - ) - elif arg is None: - path_to_type[path_to_item] = type(None) - return None - elif isinstance(arg, (datetime.date, datetime.datetime)): - path_to_type[path_to_item] = str - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - path_to_type[path_to_item] = str - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, bytes): - path_to_type[path_to_item] = bytes - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - path_to_type[path_to_item] = FileIO - return FileIO(arg) - raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class SingletonMeta(type): - """ - A singleton class for schemas - Schemas are frozen classes that are never instantiated with init args - All args come from defaults - """ - _instances: typing.Dict[type, typing.Any] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super().__call__(*args, **kwargs) - return cls._instances[cls] - - -class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): - - @classmethod - def __get_path_to_schemas( - cls, - arg, - validation_metadata: validation.ValidationMetadata, - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: - """ - Run all validations in the json schema and return a dict of - json schema to tuple of validated schemas - """ - _path_to_schemas: validation.PathToSchemasType = {} - if validation_metadata.validation_ran_earlier(cls): - validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) - validation.update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} - for path, schema_classes in _path_to_schemas.items(): - schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) - path_to_schemas[path] = schema - """ - For locations that validation did not check - the code still needs to store type + schema information for instantiation - All of those schemas will be UnsetAnyTypeSchema - """ - missing_paths = path_to_type.keys() - path_to_schemas.keys() - for missing_path in missing_paths: - path_to_schemas[missing_path] = UnsetAnyTypeSchema - - return path_to_schemas - - @staticmethod - def __get_items( - arg: tuple, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - ''' - Schema __get_items - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return tuple(cast_items) - - @staticmethod - def __get_properties( - arg: validation.immutabledict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - """ - Schema __get_properties, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return validation.immutabledict(dict_items) - - @classmethod - def _get_new_instance_without_conversion( - cls, - arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - # We have a Dynamic class and we are making an instance of it - if isinstance(arg, validation.immutabledict): - used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) - elif isinstance(arg, tuple): - used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) - elif isinstance(arg, Bool): - return bool(arg) - else: - """ - str, int, float, FileIO, bytes - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return arg - arg_type = type(arg) - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is None: - return used_arg - if arg_type not in type_to_output_cls: - return used_arg - output_cls = type_to_output_cls[arg_type] - if arg_type is tuple: - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(U, inst) - return inst - assert issubclass(output_cls, validation.immutabledict) - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(T, inst) - return inst - - @typing.overload - @classmethod - def validate_base( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate_base( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - """ - Schema validate_base - - Args: - arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value - configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords - like minItems, minLength etc - """ - if isinstance(arg, (tuple, validation.immutabledict)): - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is not None: - for output_cls in type_to_output_cls.values(): - if isinstance(arg, output_cls): - # U + T use case, don't run validations twice - return arg - - from_server = False - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] - ] = {} - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} - cast_arg = cast_to_allowed_types( - arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = validation.ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) - return cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas, - ) - - @classmethod - def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: - type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) - type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) - return type_to_output_cls - - -def get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[Schema]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - return item_cls._evaluate(None, local_namespace) - raise ValueError('invalid class value passed in') - - -@dataclasses.dataclass(frozen=True) -class AnyTypeSchema(Schema[T, U]): - # Python representation of a schema defined as true or {} - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return cls.validate_base( - arg, - configuration=configuration - ) - -class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - -INPUT_TYPES_ALL = typing.Union[ - dict, - validation.immutabledict, - typing.Mapping[str, object], # for TypedDict - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - FileIO -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py deleted file mode 100644 index e79646f0acd..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/schemas.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import datetime -import dataclasses -import io -import typing -import uuid - -import typing_extensions - -from unit_test_api.configurations import schema_configuration - -from . import schema, validation - - -@dataclasses.dataclass(frozen=True) -class ListSchema(schema.Schema[validation.immutabledict, tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schema.INPUT_TYPES_ALL], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Tuple[schema.INPUT_TYPES_ALL, ...], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NoneSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) - - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NumberSchema(schema.Schema): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - types: typing.FrozenSet[typing.Type] = frozenset({float, int}) - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class IntSchema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int' - - -@dataclasses.dataclass(frozen=True) -class Int32Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int32' - - -@dataclasses.dataclass(frozen=True) -class Int64Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int64' - - -@dataclasses.dataclass(frozen=True) -class Float32Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'float' - - -@dataclasses.dataclass(frozen=True) -class Float64Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'double' - - -@dataclasses.dataclass(frozen=True) -class StrSchema(schema.Schema): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - types: typing.FrozenSet[typing.Type] = frozenset({str}) - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class UUIDSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'uuid' - - @classmethod - def validate( - cls, - arg: typing.Union[str, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateTimeSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date-time' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.datetime], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DecimalSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'number' - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class BytesSchema(schema.Schema): - """ - this class will subclass bytes and is immutable - """ - types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class FileSchema(schema.Schema): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.FileIO: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BinarySchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) - format: str = 'binary' - - one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( - BytesSchema, - FileSchema, - ) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader, bytes], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[schema.FileIO, bytes]: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BoolSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NotAnyTypeSchema(schema.AnyTypeSchema): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - not_: typing.Type[schema.Schema] = schema.AnyTypeSchema - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return super().validate_base(arg, configuration=configuration) - -OUTPUT_BASE_TYPES = typing.Union[ - validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], - str, - int, - float, - bool, - schema.none_type_, - typing.Tuple['OUTPUT_BASE_TYPES', ...], - bytes, - schema.FileIO -] - - -@dataclasses.dataclass(frozen=True) -class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) - - @typing.overload - @classmethod - def validate( - cls, - arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: - return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py deleted file mode 100644 index 7f2d1d58545..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/schemas/validation.py +++ /dev/null @@ -1,1446 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import collections -import dataclasses -import decimal -import re -import sys -import types -import typing -import uuid - -import typing_extensions - -from unit_test_api import exceptions -from unit_test_api.configurations import schema_configuration - -from . import format, original_immutabledict - -immutabledict = original_immutabledict.immutabledict - - -@dataclasses.dataclass -class ValidationMetadata: - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - path_to_item: typing.Tuple[typing.Union[str, int], ...] - configuration: schema_configuration.SchemaConfiguration - validated_path_to_schemas: typing.Mapping[ - typing.Tuple[typing.Union[str, int], ...], - typing.Mapping[type, None] - ] = dataclasses.field(default_factory=dict) - seen_classes: typing.FrozenSet[type] = frozenset() - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) - if validated_schemas and cls in validated_schemas: - return True - if cls in self.seen_classes: - return True - return False - -def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise exceptions.ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class SchemaValidator: - __excluded_cls_properties = { - '__module__', - '__dict__', - '__weakref__', - '__doc__', - '__annotations__', - 'default', # excluded because it has no impact on validation - 'type_to_output_cls', # used to pluck the output class for instantiation - } - - @classmethod - def _validate( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> PathToSchemasType: - """ - SchemaValidator validate - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - """ - cls_schema = cls() - json_schema_data = { - k: v - for k, v in vars(cls_schema).items() - if k not in cls.__excluded_cls_properties - and k - not in validation_metadata.configuration.disabled_json_schema_python_keywords - } - contains_path_to_schemas = [] - path_to_schemas: PathToSchemasType = {} - if 'contains' in vars(cls_schema): - contains_path_to_schemas = _get_contains_path_to_schemas( - arg, - vars(cls_schema)['contains'], - validation_metadata, - path_to_schemas - ) - if_path_to_schemas = None - if 'if_' in vars(cls_schema): - if_path_to_schemas = _get_if_path_to_schemas( - arg, - vars(cls_schema)['if_'], - validation_metadata, - ) - validated_pattern_properties: typing.Optional[PathToSchemasType] = None - if 'pattern_properties' in vars(cls_schema): - validated_pattern_properties = _get_validated_pattern_properties( - arg, - vars(cls_schema)['pattern_properties'], - cls, - validation_metadata - ) - prefix_items_length = 0 - if 'prefix_items' in vars(cls_schema): - prefix_items_length = len(vars(cls_schema)['prefix_items']) - for keyword, val in json_schema_data.items(): - used_val: typing.Any - if keyword in {'contains', 'min_contains', 'max_contains'}: - used_val = (val, contains_path_to_schemas) - elif keyword == 'items': - used_val = (val, prefix_items_length) - elif keyword in {'unevaluated_items', 'unevaluated_properties'}: - used_val = (val, path_to_schemas) - elif keyword in {'types'}: - format: typing.Optional[str] = vars(cls_schema).get('format', None) - used_val = (val, format) - elif keyword in {'pattern_properties', 'additional_properties'}: - used_val = (val, validated_pattern_properties) - elif keyword in {'if_', 'then', 'else_'}: - used_val = (val, if_path_to_schemas) - else: - used_val = val - validator = json_schema_keyword_to_validator[keyword] - - other_path_to_schemas = validator( - arg, - used_val, - cls, - validation_metadata, - ) - if other_path_to_schemas: - update(path_to_schemas, other_path_to_schemas) - - base_class = type(arg) - if validation_metadata.path_to_item not in path_to_schemas: - path_to_schemas[validation_metadata.path_to_item] = dict() - path_to_schemas[validation_metadata.path_to_item][base_class] = None - path_to_schemas[validation_metadata.path_to_item][cls] = None - return path_to_schemas - -PathToSchemasType = typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Dict[ - typing.Union[ - typing.Type[SchemaValidator], - typing.Type[str], - typing.Type[int], - typing.Type[float], - typing.Type[bool], - typing.Type[None], - typing.Type[immutabledict], - typing.Type[tuple] - ], - None - ] -] - -def _get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[SchemaValidator]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - if sys.version_info < (3, 9): - return item_cls._evaluate(None, local_namespace) - return item_cls._evaluate(None, local_namespace, set()) - raise ValueError('invalid class value passed in') - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is collections.defaultdict(dict) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k].update(v) - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def __type_error_message( - var_value=None, var_name=None, valid_classes=None, key_type=None -): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = __get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - -def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = __type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return exceptions.ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternInfo: - pattern: str - flags: typing.Optional[re.RegexFlag] = None - - -def validate_types( - arg: typing.Any, - allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - allowed_types = allowed_types_format[0] - if type(arg) not in allowed_types: - raise __get_type_error( - arg, - validation_metadata.path_to_item, - allowed_types, - key_type=False, - ) - if isinstance(arg, bool) or not isinstance(arg, (int, float)): - return None - format = allowed_types_format[1] - if format and format == 'int' and arg != int(arg): - # there is a json schema test where 1.0 validates as an integer - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - return None - - -def validate_enum( - arg: typing.Any, - enum_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in enum_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) - return None - - -def validate_unique_items( - arg: typing.Any, - unique_items_value: bool, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not unique_items_value or not isinstance(arg, tuple): - return None - if len(arg) == len(set(arg)): - return None - _raise_validation_error_message( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - -def validate_min_items( - arg: typing.Any, - min_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) < min_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=min_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_items( - arg: typing.Any, - max_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) > max_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=max_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_properties( - arg: typing.Any, - min_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) < min_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=min_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_properties( - arg: typing.Any, - max_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) > max_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=max_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_length( - arg: typing.Any, - min_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) < min_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=min_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_length( - arg: typing.Any, - max_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) > max_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=max_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_minimum( - arg: typing.Any, - inclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg < inclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_minimum( - arg: typing.Any, - exclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg <= exclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=exclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_maximum( - arg: typing.Any, - inclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg > inclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_maximum( - arg: typing.Any, - exclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg >= exclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than", - constraint_value=exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - -def validate_multiple_of( - arg: typing.Any, - multiple_of: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if (not (float(arg) / multiple_of).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - _raise_validation_error_message( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_pattern( - arg: typing.Any, - pattern_info: PatternInfo, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item - ) - return None - - -__int32_inclusive_minimum = -2147483648 -__int32_inclusive_maximum = 2147483647 -__int64_inclusive_minimum = -9223372036854775808 -__int64_inclusive_maximum = 9223372036854775807 -__float_inclusive_minimum = -3.4028234663852886e+38 -__float_inclusive_maximum = 3.4028234663852886e+38 -__double_inclusive_minimum = -1.7976931348623157E+308 -__double_inclusive_maximum = 1.7976931348623157E+308 - -def __validate_numeric_format( - arg: typing.Union[int, float], - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value[:3] == 'int': - # there is a json schema test where 1.0 validates as an integer - if arg != int(arg): - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - if format_value == 'int32': - if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - elif format_value == 'int64': - if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - elif format_value in {'float', 'double'}: - if format_value == 'float': - if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - return None - # double - if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - - -def __validate_string_format( - arg: str, - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value == 'uuid': - try: - uuid.UUID(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'number': - try: - decimal.Decimal(arg) - return None - except decimal.InvalidOperation: - raise exceptions.ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date': - try: - format.DEFAULT_ISOPARSER.parse_isodate_str(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date-time': - try: - format.DEFAULT_ISOPARSER.parse_isodatetime(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - return None - - -def validate_format( - arg: typing.Union[str, int, float], - format_value: str, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - # formats work for strings + numbers - if isinstance(arg, (int, float)): - return __validate_numeric_format( - arg, - format_value, - validation_metadata - ) - elif isinstance(arg, str): - return __validate_string_format( - arg, - format_value, - validation_metadata - ) - return None - - -def validate_required( - arg: typing.Any, - required: typing.Set[str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - missing_req_args = required - arg.keys() - if missing_req_args: - missing_required_arguments = list(missing_req_args) - missing_required_arguments.sort() - raise exceptions.ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - return None - - -def validate_items( - arg: typing.Any, - item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - item_cls = _get_class(item_cls_prefix_items_length[0]) - prefix_items_length = item_cls_prefix_items_length[1] - path_to_schemas: PathToSchemasType = {} - for i in range(prefix_items_length, len(arg)): - value = arg[i] - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_properties( - arg: typing.Any, - properties: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - present_properties = {k: v for k, v, in arg.items() if k in properties} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, value in present_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - schema = properties[property_name] - schema = _get_class(schema, module_namespace) - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_additional_properties( - arg: typing.Any, - additional_properties_cls_val_pprops: typing.Tuple[ - typing.Type[SchemaValidator], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - schema = _get_class(additional_properties_cls_val_pprops[0]) - path_to_schemas: PathToSchemasType = {} - cls_schema = cls() - properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} - present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} - validated_pattern_properties = additional_properties_cls_val_pprops[1] - for property_name, value in present_additional_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if validated_pattern_properties and path_to_item in validated_pattern_properties: - continue - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_one_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - oneof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(schema) - continue - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - oneof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - oneof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate oneof_classes - continue - oneof_classes.append(schema) - if not oneof_classes: - raise exceptions.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: - raise exceptions.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 - - -def validate_any_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - anyof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - module_namespace = vars(sys.modules[cls.__module__]) - for schema in classes: - schema = _get_class(schema, module_namespace) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - anyof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - anyof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate anyof_classes - continue - anyof_classes.append(schema) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise exceptions.ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - -def validate_all_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - continue - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_not( - arg: typing.Any, - not_cls: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - not_schema = _get_class(not_cls) - other_path_to_schemas = None - not_exception = exceptions.ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_schema.__name__, - ) - ) - if validation_metadata.validation_ran_earlier(not_schema): - raise not_exception - - try: - other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - return None - - -def __ensure_discriminator_value_present( - disc_property_name: str, - validation_metadata: ValidationMetadata, - arg -): - if disc_property_name not in arg: - # The input data does not contain the discriminator property - raise exceptions.ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - -def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - cls_schema = cls() - if not hasattr(cls_schema, 'discriminator'): - return None - disc = cls_schema.discriminator - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not ( - hasattr(cls_schema, 'all_of') or - hasattr(cls_schema, 'one_of') or - hasattr(cls_schema, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls_schema, 'all_of'): - for allof_cls in cls_schema.all_of: - discriminated_cls = __get_discriminated_class( - allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'one_of'): - for oneof_cls in cls_schema.one_of: - discriminated_cls = __get_discriminated_class( - oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'any_of'): - for anyof_cls in cls_schema.any_of: - discriminated_cls = __get_discriminated_class( - anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -def validate_discriminator( - arg: typing.Any, - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - disc_prop_name = list(discriminator.keys())[0] - __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) - discriminated_cls = __get_discriminated_class( - cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ) - if discriminated_cls is None: - raise exceptions.ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - if discriminated_cls is cls: - """ - Optimistically assume that cls will pass validation - If the code invoked _validate on cls it would infinitely recurse - """ - return None - if validation_metadata.validation_ran_earlier(discriminated_cls): - path_to_schemas: PathToSchemasType = {} - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - return path_to_schemas - updated_vm = ValidationMetadata( - path_to_item=validation_metadata.path_to_item, - configuration=validation_metadata.configuration, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - return discriminated_cls._validate(arg, validation_metadata=updated_vm) - - -def _get_if_path_to_schemas( - arg: typing.Any, - if_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - if_cls = _get_class(if_cls) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = if_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, other_path_to_schemas) - except exceptions.OpenApiException: - pass - return these_path_to_schemas - - -def validate_if( - arg: typing.Any, - if_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = if_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - - if true, then true -> true for whole schema - so validate_then will add if_path_to_schemas data to path_to_schemas - """ - return None - - -def validate_then( - arg: typing.Any, - then_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = then_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - """ - if not if_path_to_schemas: - return None - then_cls = _get_class(then_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = then_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # then False case - raise ex - - -def validate_else( - arg: typing.Any, - else_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = else_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - if if_path_to_schemas: - # skip validation if if_path_to_schemas was true - return None - """ - if is false use case - if_path_to_schemas == {} - """ - else_cls = _get_class(else_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = else_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # else False case - raise ex - - -def _get_contains_path_to_schemas( - arg: typing.Any, - contains_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, - path_to_schemas: PathToSchemasType -) -> typing.List[PathToSchemasType]: - if not isinstance(arg, tuple): - return [] - contains_cls = _get_class(contains_cls) - contains_path_to_schemas = [] - for i, value in enumerate(arg): - these_path_to_schemas: PathToSchemasType = {} - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(contains_cls): - add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) - contains_path_to_schemas.append(these_path_to_schemas) - continue - try: - other_path_to_schemas = contains_cls._validate( - value, validation_metadata=item_validation_metadata) - contains_path_to_schemas.append(other_path_to_schemas) - except exceptions.OpenApiException: - pass - return contains_path_to_schemas - - -def validate_contains( - arg: typing.Any, - contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - many_path_to_schemas = contains_cls_path_to_schemas[1] - if not many_path_to_schemas: - raise exceptions.ApiValueError( - "Validation failed for contains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - these_path_to_schemas: PathToSchemasType = {} - for other_path_to_schema in many_path_to_schemas: - update(these_path_to_schemas, other_path_to_schema) - return these_path_to_schemas - - -def validate_min_contains( - arg: typing.Any, - min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - min_contains = min_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) < min_contains: - raise exceptions.ApiValueError( - "Validation failed for minContains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_max_contains( - arg: typing.Any, - max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - max_contains = max_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) > max_contains: - raise exceptions.ApiValueError( - "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " - "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_const( - arg: typing.Any, - const_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in const_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) - return None - - -def validate_dependent_required( - arg: typing.Any, - dependent_required: typing.Mapping[str, typing.Set[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - for key, keys_that_must_exist in dependent_required.items(): - if key not in arg: - continue - missing_keys = keys_that_must_exist - arg.keys() - if missing_keys: - raise exceptions.ApiValueError( - f"Validation failed for dependentRequired because these_keys={missing_keys} are " - f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" - ) - return None - - -def validate_dependent_schemas( - arg: typing.Any, - dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for key, schema in dependent_schemas.items(): - if key not in arg: - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_property_names( - arg: typing.Any, - property_names_schema: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - module_namespace = vars(sys.modules[cls.__module__]) - property_names_schema = _get_class(property_names_schema, module_namespace) - for key in arg.keys(): - path_to_item = validation_metadata.path_to_item + (key,) - key_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - property_names_schema._validate(key, validation_metadata=key_validation_metadata) - return None - - -def _get_validated_pattern_properties( - arg: typing.Any, - pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, property_value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - for pattern_info, schema in pattern_properties.items(): - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, property_name, flags=flags): - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_pattern_properties( - arg: typing.Any, - pattern_properties_validation_results: typing.Tuple[ - typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - validation_results = pattern_properties_validation_results[1] - return validation_results - - -def validate_prefix_items( - arg: typing.Any, - prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for i, val in enumerate(arg): - if i >= len(prefix_items): - break - schema = _get_class(prefix_items[i], module_namespace) - path_to_item = validation_metadata.path_to_item + (i,) - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_items( - arg: typing.Any, - unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] - for i, val in enumerate(arg): - path_to_item = validation_metadata.path_to_item + (i,) - if path_to_item in validated_path_to_schemas: - continue - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_properties( - arg: typing.Any, - unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] - for property_name, val in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if path_to_item in validated_path_to_schemas: - continue - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] -json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { - 'types': validate_types, - 'enum_value_to_name': validate_enum, - 'unique_items': validate_unique_items, - 'min_items': validate_min_items, - 'max_items': validate_max_items, - 'min_properties': validate_min_properties, - 'max_properties': validate_max_properties, - 'min_length': validate_min_length, - 'max_length': validate_max_length, - 'inclusive_minimum': validate_inclusive_minimum, - 'exclusive_minimum': validate_exclusive_minimum, - 'inclusive_maximum': validate_inclusive_maximum, - 'exclusive_maximum': validate_exclusive_maximum, - 'multiple_of': validate_multiple_of, - 'pattern': validate_pattern, - 'format': validate_format, - 'required': validate_required, - 'items': validate_items, - 'properties': validate_properties, - 'additional_properties': validate_additional_properties, - 'one_of': validate_one_of, - 'any_of': validate_any_of, - 'all_of': validate_all_of, - 'not_': validate_not, - 'discriminator': validate_discriminator, - 'contains': validate_contains, - 'min_contains': validate_min_contains, - 'max_contains': validate_max_contains, - 'const_value_to_name': validate_const, - 'dependent_required': validate_dependent_required, - 'dependent_schemas': validate_dependent_schemas, - 'property_names': validate_property_names, - 'pattern_properties': validate_pattern_properties, - 'prefix_items': validate_prefix_items, - 'unevaluated_items': validate_unevaluated_items, - 'unevaluated_properties': validate_unevaluated_properties, - 'if_': validate_if, - 'then': validate_then, - 'else_': validate_else -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py deleted file mode 100644 index 91fd822fe1c..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/security_schemes.py +++ /dev/null @@ -1,227 +0,0 @@ -# coding: utf-8 -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import abc -import base64 -import dataclasses -import enum -import typing -import typing_extensions - -from urllib3 import _collections - - -class SecuritySchemeType(enum.Enum): - API_KEY = 'apiKey' - HTTP = 'http' - MUTUAL_TLS = 'mutualTLS' - OAUTH_2 = 'oauth2' - OPENID_CONNECT = 'openIdConnect' - - -class ApiKeyInLocation(enum.Enum): - QUERY = 'query' - HEADER = 'header' - COOKIE = 'cookie' - - -class __SecuritySchemeBase(metaclass=abc.ABCMeta): - @abc.abstractmethod - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - pass - - -@dataclasses.dataclass -class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): - api_key: str # this must be set by the developer - name: str = '' - in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY - type: SecuritySchemeType = SecuritySchemeType.API_KEY - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - if self.in_location is ApiKeyInLocation.COOKIE: - headers.add('Cookie', self.api_key) - elif self.in_location is ApiKeyInLocation.HEADER: - headers.add(self.name, self.api_key) - elif self.in_location is ApiKeyInLocation.QUERY: - # todo add query handling - raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") - return - - -class HTTPSchemeType(enum.Enum): - BASIC = 'basic' - BEARER = 'bearer' - DIGEST = 'digest' - SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ - - -@dataclasses.dataclass -class HTTPBasicSecurityScheme(__SecuritySchemeBase): - user_id: str # user name - password: str - scheme: HTTPSchemeType = HTTPSchemeType.BASIC - encoding: str = 'utf-8' - type: SecuritySchemeType = SecuritySchemeType.HTTP - """ - https://www.rfc-editor.org/rfc/rfc7617.html - """ - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - user_pass = f"{self.user_id}:{self.password}" - b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) - headers.add('Authorization', f"Basic {b64_user_pass.decode()}") - - -@dataclasses.dataclass -class HTTPBearerSecurityScheme(__SecuritySchemeBase): - access_token: str - bearer_format: typing.Optional[str] = None - scheme: HTTPSchemeType = HTTPSchemeType.BEARER - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - headers.add('Authorization', f"Bearer {self.access_token}") - - -@dataclasses.dataclass -class HTTPDigestSecurityScheme(__SecuritySchemeBase): - scheme: HTTPSchemeType = HTTPSchemeType.DIGEST - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class MutualTLSSecurityScheme(__SecuritySchemeBase): - type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class ImplicitOAuthFlow: - authorization_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class TokenUrlOauthFlow: - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class AuthorizationCodeOauthFlow: - authorization_url: str - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class OAuthFlows: - implicit: typing.Optional[ImplicitOAuthFlow] = None - password: typing.Optional[TokenUrlOauthFlow] = None - client_credentials: typing.Optional[TokenUrlOauthFlow] = None - authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None - - -class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): - flows: OAuthFlows - type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OAuth2SecurityScheme not yet implemented") - - -class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): - openid_connect_url: str - type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") - -""" -Key is the Security scheme class -Value is the list of scopes -""" -SecurityRequirementObject = typing.TypedDict( - 'SecurityRequirementObject', - { - }, - total=False -) \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py deleted file mode 100644 index a079ee31bcb..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/server.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import dataclasses -import typing - -from unit_test_api.schemas import validation, schema - - -@dataclasses.dataclass -class ServerWithoutVariables(abc.ABC): - url: str - - -@dataclasses.dataclass -class ServerWithVariables(abc.ABC): - _url: str - variables: validation.immutabledict[str, str] - variables_schema: typing.Type[schema.Schema] - url: str = dataclasses.field(init=False) - - def __post_init__(self): - url = self._url - assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) - for (key, value) in self.variables.items(): - url = url.replace("{" + key + "}", value) - self.url = url diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py deleted file mode 100644 index f24c0278335..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "https://someserver.com/v1" diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py deleted file mode 100644 index 5374be6472e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/header_imports.py +++ /dev/null @@ -1,15 +0,0 @@ -import decimal -import io -import typing -import typing_extensions - -from unit_test_api import api_client, schemas - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'api_client', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py deleted file mode 100644 index 55bcea40b80..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/operation_imports.py +++ /dev/null @@ -1,18 +0,0 @@ -import datetime -import decimal -import io -import typing -import typing_extensions -import uuid - -from unit_test_api import schemas, api_response - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py deleted file mode 100644 index ebe9120bd08..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/response_imports.py +++ /dev/null @@ -1,25 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import typing -import uuid - -import typing_extensions -import urllib3 - -from unit_test_api import api_client, schemas, api_response - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'typing', - 'uuid', - 'typing_extensions', - 'urllib3', - 'api_client', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py deleted file mode 100644 index c7b3d6440f2..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/schema_imports.py +++ /dev/null @@ -1,28 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import numbers -import re -import typing -import typing_extensions -import uuid - -from unit_test_api import schemas -from unit_test_api.configurations import schema_configuration - -U = typing.TypeVar('U') - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'numbers', - 're', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'schema_configuration' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py deleted file mode 100644 index 8156260e9b3..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/security_scheme_imports.py +++ /dev/null @@ -1,12 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from unit_test_api import security_schemes - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'security_schemes' -] \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py deleted file mode 100644 index 9fe6c950a11..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/openapi_client/shared_imports/server_imports.py +++ /dev/null @@ -1,13 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from unit_test_api import server, schemas - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'server', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py deleted file mode 100644 index 0c3f6f3e684..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -__version__ = "1.0.0" - -# import ApiClient -from this_package.api_client import ApiClient - -# import Configuration -from this_package.configurations.api_configuration import ApiConfiguration - -# import exceptions -from this_package.exceptions import OpenApiException -from this_package.exceptions import ApiAttributeError -from this_package.exceptions import ApiTypeError -from this_package.exceptions import ApiValueError -from this_package.exceptions import ApiKeyError -from this_package.exceptions import ApiException diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py deleted file mode 100644 index 138593b9740..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_client.py +++ /dev/null @@ -1,1402 +0,0 @@ -# coding: utf-8 -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import datetime -import dataclasses -import decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing import pool -import re -import tempfile -import typing -import typing_extensions -from urllib import parse -import urllib3 -from urllib3 import _collections, fields - - -from this_package import exceptions, rest, schemas, security_schemes, api_response -from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj: typing.Any): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return obj - elif isinstance(obj, bool): - # must be before int check - return obj - elif isinstance(obj, int): - return obj - elif obj is None: - return None - elif isinstance(obj, (dict, schemas.immutabledict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -@dataclasses.dataclass -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - prefix: str - separator: str - first: bool = True - item_separator: str = dataclasses.field(init=False) - - def __post_init__(self): - self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return parse.quote(str(in_data)) - return str(in_data) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - @classmethod - def _serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - @classmethod - def _deserialize_simple( - cls, - in_data: str, - name: str, - explode: bool, - percent_encode: bool - ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: - raise NotImplementedError( - "Deserialization of style=simple has not yet been added. " - "If you need this how about you submit a PR adding it?" - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -class Encoding: - content_type: str - headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None - style: typing.Optional[ParameterStyle] = None - explode: bool = False - allow_reserved: bool = False - - -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[schemas.Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -class ParameterBase(JSONDetector): - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[schemas.Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] - - _json_encoder = JSONEncoder() - - def __init_subclass__(cls, **kwargs): - if cls.explode is None: - if cls.style is ParameterStyle.FORM: - cls.explode = True - else: - cls.explode = False - - @classmethod - def _serialize_json( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=cls._json_encoder.compact_separators) - return json.dumps(in_data) - -_SERIALIZE_TYPES = typing.Union[ - int, - float, - str, - datetime.date, - datetime.datetime, - None, - bool, - list, - tuple, - dict, - schemas.immutabledict -] - -_JSON_TYPES = typing.Union[ - int, - float, - str, - None, - bool, - typing.Tuple['_JSON_TYPES', ...], - schemas.immutabledict[str, '_JSON_TYPES'], -] - -@dataclasses.dataclass -class PathParameter(ParameterBase, StyleSimpleSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.PATH - style: ParameterStyle = ParameterStyle.SIMPLE - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_label( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_matrix( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = cls._serialize_simple( - in_data=in_data, - name=cls.name, - explode=cls.explode, - percent_encode=True - ) - return cls._to_dict(cls.name, value) - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if cls.style: - if cls.style is ParameterStyle.SIMPLE: - return cls.__serialize_simple(cast_in_data) - elif cls.style is ParameterStyle.LABEL: - return cls.__serialize_label(cast_in_data) - elif cls.style is ParameterStyle.MATRIX: - return cls.__serialize_matrix(cast_in_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class QueryParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.QUERY - style: ParameterStyle = ParameterStyle.FORM - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_space_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_pipe_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._serialize_form( - in_data, - name=cls.name, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: - if cls.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - raise ValueError(f'No iterator possible for style={cls.style}') - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if cls.style: - # TODO update query ones to omit setting values when [] {} or None is input - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - if cls.style is ParameterStyle.FORM: - return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) - return cls._to_dict( - cls.name, - next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) - ) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class CookieParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.FORM - in_type: ParameterInType = ParameterInType.COOKIE - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if cls.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - value = cls._serialize_form( - cast_in_data, - explode=explode, - name=cls.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return cls._to_dict(cls.name, value) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): - style: ParameterStyle = ParameterStyle.SIMPLE - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - explode: bool = False - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = _collections.HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - @classmethod - def serialize_with_name( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - value = cls._serialize_simple(cast_in_data, name, cls.explode, False) - return cls.__to_headers(((name, value),)) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls.__to_headers(((name, value),)) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - @classmethod - def deserialize( - cls, - in_data: str, - name: str - ): - if cls.schema: - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.validate_base(extracted_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - if cls._content_type_is_json(content_type): - cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) - assert media_type.schema is not None - return media_type.schema.validate_base(cast_in_data) - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class HeaderParameterWithoutName(__HeaderParameterBase): - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - name, - skip_validation=skip_validation - ) - - -class HeaderParameter(__HeaderParameterBase): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - cls.name, - skip_validation=skip_validation - ) - -T = typing.TypeVar("T", bound=api_response.ApiResponse) - - -class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None - headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None - - @classmethod - @abc.abstractmethod - def get_response(cls, response, headers, body) -> T: ... - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = parse.urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - @classmethod - def __deserialize_application_octet_stream( - cls, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or cls.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as write_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - write_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - @classmethod - def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: - content_type = response.headers.get('content-type') - deserialized_body = schemas.unset - streamed = response.supports_chunked_reads() - - deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset - if cls.headers is not None and cls.headers_schema is not None: - deserialized_headers = {} - for header_name, header_param in cls.headers.items(): - header_value = response.headers.get(header_name) - if header_value is None: - continue - header_value = header_param.deserialize(header_value, header_name) - deserialized_headers[header_name] = header_value - deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) - - if cls.content is not None: - if content_type not in cls.content: - raise exceptions.ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" - ) - body_schema = cls.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return cls.get_response( - response=response, - headers=deserialized_headers, - body=schemas.unset - ) - - if cls._content_type_is_json(content_type): - body_data = cls.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = cls.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = cls.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - elif content_type == 'application/x-pem-file': - body_data = response.data.decode() - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = schemas.get_class(body_schema) - if body_schema is schemas.BinarySchema: - deserialized_body = body_schema.validate_base(body_data) - else: - deserialized_body = body_schema.validate_base( - body_data, configuration=configuration) - elif streamed: - response.release_conn() - - return cls.get_response( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -@dataclasses.dataclass -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param configuration: api_configuration.ApiConfiguration object for this client - :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client - :param default_headers: any default headers to include when making calls to the API. - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - configuration: api_configuration.ApiConfiguration = dataclasses.field( - default_factory=lambda: api_configuration.ApiConfiguration()) - schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( - default_factory=lambda: schema_configuration_.SchemaConfiguration()) - default_headers: _collections.HTTPHeaderDict = dataclasses.field( - default_factory=lambda: _collections.HTTPHeaderDict()) - pool_threads: int = 1 - user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' - rest_client: rest.RESTClientObject = dataclasses.field(init=False) - - def __post_init__(self): - self._pool = None - self.rest_client = rest.RESTClientObject(self.configuration) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = pool.ThreadPool(self.pool_threads) - return self._pool - - def set_default_header(self, header_name: str, header_value: str): - self.default_headers[header_name] = header_value - - def call_api( - self, - resource_path: str, - method: str, - host: str, - query_params_suffix: typing.Optional[str] = None, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data` - :param security_requirement_object: The security requirement object, used to apply auth when making the call - :param async_req: execute request asynchronously - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystem file and the schemas.BinarySchema - instance will also inherit from FileSchema and schemas.FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - the method will return the response directly. - """ - # header parameters - used_headers = _collections.HTTPHeaderDict(self.default_headers) - user_agent_key = 'User-Agent' - if user_agent_key not in used_headers and self.user_agent: - used_headers[user_agent_key] = self.user_agent - - # auth setting - self.update_params_for_auth( - used_headers, - security_requirement_object, - resource_path, - method, - body, - query_params_suffix - ) - - # must happen after auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - url = host + resource_path - if query_params_suffix: - url += query_params_suffix - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def request( - self, - method: str, - url: str, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - body: typing.Union[str, bytes, None] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "get": - return self.rest_client.get(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "head": - return self.rest_client.head(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "options": - return self.rest_client.options(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "post": - return self.rest_client.post(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "put": - return self.rest_client.put(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "patch": - return self.rest_client.patch(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "delete": - return self.rest_client.delete(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise exceptions.ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth( - self, - headers: _collections.HTTPHeaderDict, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], - resource_path: str, - method: str, - body: typing.Union[str, bytes, None] = None, - query_params_suffix: typing.Optional[str] = None - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param security_requirement_object: the openapi security requirement object - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - return - -@dataclasses.dataclass -class Api: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) - - @staticmethod - def _get_used_path( - used_path: str, - path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - skip_validation: bool = False - ) -> typing.Tuple[str, str]: - used_path_params = {} - if path_params is not None: - for path_parameter in path_parameters: - parameter_data = path_params.get(path_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) - used_path_params.update(serialized_data) - - for k, v in used_path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - query_params_suffix = "" - if query_params is not None: - prefix_separator_iterator = None - for query_parameter in query_parameters: - parameter_data = query_params.get(query_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = query_parameter.serialize( - parameter_data, - prefix_separator_iterator=prefix_separator_iterator, - skip_validation=skip_validation - ) - for serialized_value in serialized_data.values(): - query_params_suffix += serialized_value - return used_path, query_params_suffix - - @staticmethod - def _get_headers( - header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - accept_content_types: typing.Tuple[str, ...] = (), - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - headers = _collections.HTTPHeaderDict() - if header_params is not None: - for parameter in header_parameters: - parameter_data = header_params.get(parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) - headers.extend(serialized_data) - if accept_content_types: - for accept_content_type in accept_content_types: - headers.add('Accept', accept_content_type) - return headers - - def _get_fields_and_body( - self, - request_body: typing.Type[RequestBody], - body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], - content_type: str, - headers: _collections.HTTPHeaderDict - ): - if request_body.required and body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - - if isinstance(body, schemas.Unset): - return None, None - - serialized_fields = None - serialized_body = None - serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) - headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - serialized_fields = serialized_data['fields'] - elif 'body' in serialized_data: - serialized_body = serialized_data['body'] - return serialized_fields, serialized_body - - @staticmethod - def _verify_response_status(response: api_response.ApiResponse): - if not 200 <= response.response.status <= 399: - raise exceptions.ApiException( - status=response.response.status, - reason=response.response.reason, - api_response=response - ) - - -class SerializedRequestBody(typing.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[rest.RequestField, ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType schemas.Schema info - """ - __json_encoder = JSONEncoder() - __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} - content: typing.Dict[str, typing.Type[MediaType]] - required: bool = False - - @classmethod - def __serialize_json( - cls, - in_data: _JSON_TYPES - ) -> SerializedRequestBody: - in_data = cls.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return {'body': json_str} - - @staticmethod - def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: - return {'body': str(in_data)} - - @classmethod - def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: - json_value = cls.__json_encoder.default(value) - request_field = rest.RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - @classmethod - def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: - if isinstance(value, str): - request_field = rest.RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = rest.RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, schemas.FileIO): - # TODO use content.encoding to limit allowed content types if they are present - urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(rest.RequestField, urllib3_request_field) - value.close() - else: - request_field = cls.__multipart_json_item(key=key, value=value) - return request_field - - @classmethod - def __serialize_multipart_form_data( - cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] - ) -> SerializedRequestBody: - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a rest.RequestField for each item with name=key - for item in value: - request_field = cls.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore - fields.append(request_field) - else: - request_field = cls.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return {'fields': tuple(fields)} - - @staticmethod - def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: - if isinstance(in_data, bytes): - return {'body': in_data} - # schemas.FileIO type - used_in_data = in_data.read() - in_data.close() - return {'body': used_in_data} - - @classmethod - def __serialize_application_x_www_form_data( - cls, in_data: schemas.immutabledict[str, _JSON_TYPES] - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - cast_in_data = cls.__json_encoder.default(in_data) - value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return {'body': value} - - @classmethod - def serialize( - cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = cls.content[content_type] - assert media_type.schema is not None - schema = schemas.get_class(media_type.schema) - used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() - cast_in_data = schema.validate_base(in_data, configuration=used_configuration) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if cls._content_type_is_json(content_type): - if isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") - return cls.__serialize_json(cast_in_data) - elif content_type in cls.__plain_txt_content_types: - if not isinstance(cast_in_data, (int, float, str)): - raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") - return cls.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") - return cls.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError( - f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") - return cls.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - if not isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") - return cls.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py deleted file mode 100644 index a59826524c2..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/api_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -import urllib3 - -from this_package import schemas - - -@dataclasses.dataclass(frozen=True) -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] - headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] - - -@dataclasses.dataclass(frozen=True) -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py deleted file mode 100644 index 00cc9b99d82..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/path_to_api.py +++ /dev/null @@ -1,17 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.paths.operators import Operators - -PathToApi = typing.TypedDict( - 'PathToApi', - { - "/operators": typing.Type[Operators], - } -) - -path_to_api = PathToApi( - { - "/operators": Operators, - } -) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py deleted file mode 100644 index cf241d055c1..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py deleted file mode 100644 index 22ed5dc9343..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/paths/operators.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.operators.post.operation import ApiForPost - - -class Operators( - ApiForPost, -): - pass diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py deleted file mode 100644 index 00e34b097d3..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tag_to_api.py +++ /dev/null @@ -1,17 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.tags.default_api import DefaultApi - -TagToApi = typing.TypedDict( - 'TagToApi', - { - "default": typing.Type[DefaultApi], - } -) - -tag_to_api = TagToApi( - { - "default": DefaultApi, - } -) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py deleted file mode 100644 index f3c38f014ce..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py deleted file mode 100644 index aeab3e99b95..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/apis/tags/default_api.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.operators.post.operation import PostOperators - - -class DefaultApi( - PostOperators, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py deleted file mode 100644 index e3edab2dc1c..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py deleted file mode 100644 index dcbd682095a..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/addition_operator.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -A: typing_extensions.TypeAlias = schemas.Float64Schema -B: typing_extensions.TypeAlias = schemas.Float64Schema - - -@dataclasses.dataclass(frozen=True) -class OperatorId( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["ADD"] = "ADD" -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - "b": typing.Type[B], - "operator_id": typing.Type[OperatorId], - } -) - - -class AdditionOperatorDict(schemas.immutabledict[str, typing.Union[ - str, - typing.Union[int, float], -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "a", - "b", - "operator_id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - a: typing.Union[ - int, - float - ], - b: typing.Union[ - int, - float - ], - operator_id: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "a": a, - "b": b, - "operator_id": operator_id, - } - used_arg_ = typing.cast(AdditionOperatorDictInput, arg_) - return AdditionOperator.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionOperatorDictInput, - AdditionOperatorDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionOperatorDict: - return AdditionOperator.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("a") - ) - - @property - def b(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("b") - ) - - @property - def operator_id(self) -> str: - return typing.cast( - str, - self.__getitem__("operator_id") - ) -AdditionOperatorDictInput = typing.TypedDict( - 'AdditionOperatorDictInput', - { - "a": typing.Union[ - int, - float - ], - "b": typing.Union[ - int, - float - ], - "operator_id": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class AdditionOperator( - schemas.Schema[AdditionOperatorDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "a", - "b", - "operator_id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionOperatorDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionOperatorDictInput, - AdditionOperatorDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionOperatorDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py deleted file mode 100644 index 2829b3fd60e..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/operator.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import addition_operator -from openapi_client.components.schema import subtraction_operator -OneOf = typing.Tuple[ - typing.Type[addition_operator.AdditionOperator], - typing.Type[subtraction_operator.SubtractionOperator], -] - - -@dataclasses.dataclass(frozen=True) -class Operator( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'operator_id': { - 'ADD': addition_operator.AdditionOperator, - 'AdditionOperator': addition_operator.AdditionOperator, - 'SUB': subtraction_operator.SubtractionOperator, - 'SubtractionOperator': subtraction_operator.SubtractionOperator, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py deleted file mode 100644 index 90f4e1c236a..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schema/subtraction_operator.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -A: typing_extensions.TypeAlias = schemas.Float64Schema -B: typing_extensions.TypeAlias = schemas.Float64Schema - - -@dataclasses.dataclass(frozen=True) -class OperatorId( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["SUB"] = "SUB" -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - "b": typing.Type[B], - "operator_id": typing.Type[OperatorId], - } -) - - -class SubtractionOperatorDict(schemas.immutabledict[str, typing.Union[ - str, - typing.Union[int, float], -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "a", - "b", - "operator_id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - a: typing.Union[ - int, - float - ], - b: typing.Union[ - int, - float - ], - operator_id: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "a": a, - "b": b, - "operator_id": operator_id, - } - used_arg_ = typing.cast(SubtractionOperatorDictInput, arg_) - return SubtractionOperator.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SubtractionOperatorDictInput, - SubtractionOperatorDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SubtractionOperatorDict: - return SubtractionOperator.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("a") - ) - - @property - def b(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("b") - ) - - @property - def operator_id(self) -> str: - return typing.cast( - str, - self.__getitem__("operator_id") - ) -SubtractionOperatorDictInput = typing.TypedDict( - 'SubtractionOperatorDictInput', - { - "a": typing.Union[ - int, - float - ], - "b": typing.Union[ - int, - float - ], - "operator_id": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class SubtractionOperator( - schemas.Schema[SubtractionOperatorDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "a", - "b", - "operator_id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SubtractionOperatorDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SubtractionOperatorDictInput, - SubtractionOperatorDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SubtractionOperatorDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py deleted file mode 100644 index 755e18164fb..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/components/schemas/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from this_package.components.schema.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from this_package.components.schema.addition_operator import AdditionOperator -from this_package.components.schema.operator import Operator -from this_package.components.schema.subtraction_operator import SubtractionOperator diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py deleted file mode 100644 index ee66a00c502..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/api_configuration.py +++ /dev/null @@ -1,281 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing -import typing_extensions - -import urllib3 - -from this_package import exceptions -from this_package.servers import server_0 - -# the server to use at each openapi document json path -ServerInfo = typing.TypedDict( - 'ServerInfo', - { - 'servers/0': server_0.Server0, - }, - total=False -) - - -class ServerIndexInfoRequired(typing.TypedDict): - servers: typing.Literal[0] - -ServerIndexInfoOptional = typing.TypedDict( - 'ServerIndexInfoOptional', - { - }, - total=False -) - - -class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): - """ - the default server_index to use at each openapi document json path - the fallback value is stored in the 'servers' key - """ - - -class ApiConfiguration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param server_info: the servers that can be used to make endpoint calls - :param server_index_info: index to servers configuration - """ - - def __init__( - self, - server_info: typing.Optional[ServerInfo] = None, - server_index_info: typing.Optional[ServerIndexInfo] = None, - ): - """Constructor - """ - # Authentication Settings - self.security_scheme_info: typing.Dict[str, typing.Any] = {} - self.security_index_info = {'security': 0} - # Server Info - self.server_info: ServerInfo = server_info or { - 'servers/0': server_0.Server0(), - } - self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("this_package") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_server_url( - self, - key_prefix: typing.Literal[ - "servers", - ], - index: typing.Optional[int], - ) -> str: - """Gets host URL based on the index - :param index: array index of the host settings - :return: URL based on host settings - """ - if index: - used_index = index - else: - try: - used_index = self.server_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.server_index_info.get("servers", 0) - server_info_key = typing.cast( - typing.Literal[ - "servers/0", - ], - f"{key_prefix}/{used_index}" - ) - try: - server = self.server_info[server_info_key] - except KeyError as ex: - raise ex - return server.url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py deleted file mode 100644 index d2247791360..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/configurations/schema_configuration.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -from this_package import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'additional_properties': 'additionalProperties', - 'all_of': 'allOf', - 'any_of': 'anyOf', - 'const_value_to_name': 'const', - 'contains': 'contains', - 'dependent_required': 'dependentRequired', - 'dependent_schemas': 'dependentSchemas', - 'discriminator': 'discriminator', - # default omitted because it has no validation impact - 'else_': 'else', - 'enum_value_to_name': 'enum', - 'exclusive_maximum': 'exclusiveMaximum', - 'exclusive_minimum': 'exclusiveMinimum', - 'format': 'format', - 'if_': 'if', - 'inclusive_maximum': 'maximum', - 'inclusive_minimum': 'minimum', - 'items': 'items', - 'max_contains': 'maxContains', - 'max_items': 'maxItems', - 'max_length': 'maxLength', - 'max_properties': 'maxProperties', - 'min_contains': 'minContains', - 'min_items': 'minItems', - 'min_length': 'minLength', - 'min_properties': 'minProperties', - 'multiple_of': 'multipleOf', - 'not_': 'not', - 'one_of': 'oneOf', - 'pattern': 'pattern', - 'pattern_properties': 'patternProperties', - 'prefix_items': 'prefixItems', - 'properties': 'properties', - 'property_names': 'propertyNames', - 'required': 'required', - 'then': 'then', - 'types': 'type', - 'unique_items': 'uniqueItems', - 'unevaluated_items': 'unevaluatedItems', - 'unevaluated_properties': 'unevaluatedProperties' -} - -class SchemaConfiguration: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - """ - - def __init__( - self, - disabled_json_schema_keywords = set(), - ): - """Constructor - """ - self.disabled_json_schema_keywords = disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py deleted file mode 100644 index ac02439dd07..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/exceptions.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -from this_package import api_response - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - -T = typing.TypeVar('T', bound=api_response.ApiResponse) - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: typing.Optional[str] = None - api_response: typing.Optional[T] = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.api_response: - if self.api_response.response.headers: - error_message += "HTTP response headers: {0}\n".format( - self.api_response.response.headers) - if self.api_response.response.data: - error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) - - return error_message diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py deleted file mode 100644 index 2c2c9cc4bdc..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis import path_to_api diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py deleted file mode 100644 index 4794ead8e40..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.operators import Operators - -path = "/operators" \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py deleted file mode 100644 index 6a741c539e2..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/operation.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import operator - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_operators( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_operators( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_operators( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostOperators(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_operators = BaseApi._post_operators - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_operators diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py deleted file mode 100644 index 53b58771dd6..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py deleted file mode 100644 index 36de00ea18a..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import operator -Schema: typing_extensions.TypeAlias = operator.Operator diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py deleted file mode 100644 index f06624da9d4..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/paths/operators/post/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py deleted file mode 100644 index c96b510600e..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/rest.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi # type: ignore[import] -import urllib3 -from urllib3 import fields -from urllib3 import exceptions as urllib3_exceptions -from urllib3._collections import HTTPHeaderDict - -from this_package import exceptions - - -logger = logging.getLogger(__name__) -_TYPE_FIELD_VALUE = typing.Union[str, bytes] - - -class RequestField(fields.RequestField): - def __init__( - self, - name: str, - data: _TYPE_FIELD_VALUE, - filename: typing.Optional[str] = None, - headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, - header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, - ): - super().__init__(name, data, filename, headers, header_formatter) # type: ignore - - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise exceptions.ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - headers = headers or HTTPHeaderDict() - - used_timeout: typing.Optional[urllib3.Timeout] = None - if timeout: - if isinstance(timeout, (int, float)): - used_timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=used_timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - encode_multipart=False, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise exceptions.ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - except urllib3_exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise exceptions.ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def get(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def head(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def options(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def delete(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def post(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def put(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def patch(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py deleted file mode 100644 index 1df56a1a180..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -import typing_extensions - -from .schema import ( - get_class, - none_type_, - classproperty, - Bool, - FileIO, - Schema, - SingletonMeta, - AnyTypeSchema, - UnsetAnyTypeSchema, - INPUT_TYPES_ALL -) - -from .schemas import ( - ListSchema, - NoneSchema, - NumberSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - StrSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BytesSchema, - FileSchema, - BinarySchema, - BoolSchema, - NotAnyTypeSchema, - OUTPUT_BASE_TYPES, - DictSchema -) -from .validation import ( - PatternInfo, - ValidationMetadata, - immutabledict -) -from .format import ( - as_date, - as_datetime, - as_decimal, - as_uuid -) - -def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore - res = {} - for key, val in t_dict.__annotations__.items(): - if isinstance(val, typing._GenericAlias): # type: ignore - # typing.Type[W] -> W - val_cls = typing.get_args(val)[0] - res[key] = val_cls - return res - -X = typing.TypeVar('X', bound=typing.Tuple) - -def tuple_to_instance(tup: typing.Type[X]) -> X: - res = [] - for arg in typing.get_args(tup): - if isinstance(arg, typing._GenericAlias): # type: ignore - # typing.Type[Schema] -> Schema - arg_cls = typing.get_args(arg)[0] - res.append(arg_cls) - return tuple(res) # type: ignore - - -class Unset: - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset: Unset = Unset() - -def key_unknown_error_msg(key: str) -> str: - return (f"Invalid key. The key {key} is not a known key in this payload. " - "If this key is an additional property, use get_additional_property_" - ) - -def raise_if_key_known( - key: str, - required_keys: typing.FrozenSet[str], - optional_keys: typing.FrozenSet[str] -): - if key in required_keys or key in optional_keys: - raise ValueError(f"The key {key} is a known property, use get_property to access its value") - -__all__ = [ - 'get_class', - 'none_type_', - 'classproperty', - 'Bool', - 'FileIO', - 'Schema', - 'SingletonMeta', - 'AnyTypeSchema', - 'UnsetAnyTypeSchema', - 'INPUT_TYPES_ALL', - 'ListSchema', - 'NoneSchema', - 'NumberSchema', - 'IntSchema', - 'Int32Schema', - 'Int64Schema', - 'Float32Schema', - 'Float64Schema', - 'StrSchema', - 'UUIDSchema', - 'DateSchema', - 'DateTimeSchema', - 'DecimalSchema', - 'BytesSchema', - 'FileSchema', - 'BinarySchema', - 'BoolSchema', - 'NotAnyTypeSchema', - 'OUTPUT_BASE_TYPES', - 'DictSchema', - 'PatternInfo', - 'ValidationMetadata', - 'immutabledict', - 'as_date', - 'as_datetime', - 'as_decimal', - 'as_uuid', - 'typed_dict_to_instance', - 'tuple_to_instance', - 'Unset', - 'unset', - 'key_unknown_error_msg', - 'raise_if_key_known' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py deleted file mode 100644 index bb614903b82..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/format.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -import decimal -import functools -import typing -import uuid - -from dateutil import parser, tz - - -class CustomIsoparser(parser.isoparser): - def __init__(self, sep: typing.Optional[str] = None): - """ - :param sep: - A single character that separates date and time portions. If - ``None``, the parser will accept any single character. - For strict ISO-8601 adherence, pass ``'T'``. - """ - if sep is not None: - if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): - raise ValueError('Separator must be a single, non-numeric ' + - 'ASCII character') - - used_sep = sep.encode('ascii') - else: - used_sep = None - - self._sep = used_sep - - @staticmethod - def __get_ascii_bytes(str_in: str) -> bytes: - # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII - # ASCII is the same in UTF-8 - try: - return str_in.encode('ascii') - except UnicodeEncodeError as e: - msg = 'ISO-8601 strings should contain only ASCII characters' - raise ValueError(msg) from e - - def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isodate(dt_str_ascii) # type: ignore - values = typing.cast(typing.Tuple[typing.List[int], int], values) - components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) - pos = values[1] - return components, pos - - def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isotime(dt_str_ascii) # type: ignore - components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore - return components - - def parse_isodatetime(self, dt_str: str) -> datetime.datetime: - date_components, pos = self.__parse_isodate(dt_str) - if len(dt_str) <= pos: - # len(components) <= 3 - raise ValueError('Value is not a datetime') - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) - if hour == 24: - hour = 0 - components = (*date_components, hour, minute, second, microsecond, tzinfo) - return datetime.datetime(*components) + datetime.timedelta(days=1) - else: - components = (*date_components, hour, minute, second, microsecond, tzinfo) - else: - raise ValueError('String contains unknown ISO components') - - return datetime.datetime(*components) - - def parse_isodate_str(self, datestr: str) -> datetime.date: - components, pos = self.__parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return datetime.date(*components) - -DEFAULT_ISOPARSER = CustomIsoparser() - -@functools.lru_cache() -def as_date(arg: str) -> datetime.date: - """ - type = "string" - format = "date" - """ - return DEFAULT_ISOPARSER.parse_isodate_str(arg) - -@functools.lru_cache() -def as_datetime(arg: str) -> datetime.datetime: - """ - type = "string" - format = "date-time" - """ - return DEFAULT_ISOPARSER.parse_isodatetime(arg) - -@functools.lru_cache() -def as_decimal(arg: str) -> decimal.Decimal: - """ - Applicable when storing decimals that are sent over the wire as strings - type = "string" - format = "number" - """ - return decimal.Decimal(arg) - -@functools.lru_cache() -def as_uuid(arg: str) -> uuid.UUID: - """ - type = "string" - format = "uuid" - """ - return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py deleted file mode 100644 index 3897e140a4a..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/original_immutabledict.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -MIT License - -Copyright (c) 2020 Corentin Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -""" -from __future__ import annotations -import typing -import typing_extensions - -_K = typing.TypeVar("_K") -_V = typing.TypeVar("_V", covariant=True) - - -class immutabledict(typing.Mapping[_K, _V]): - """ - An immutable wrapper around dictionaries that implements - the complete :py:class:`collections.Mapping` interface. - It can be used as a drop-in replacement for dictionaries - where immutability is desired. - - Note: custom version of this class made to remove __init__ - """ - - dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict - _dict: typing.Dict[_K, _V] - _hash: typing.Optional[int] - - @classmethod - def fromkeys( - cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None - ) -> "immutabledict[_K, _V]": - return cls(dict.fromkeys(seq, value)) - - def __new__(cls, *args: typing.Any) -> typing_extensions.Self: - inst = super().__new__(cls) - setattr(inst, '_dict', cls.dict_cls(*args)) - setattr(inst, '_hash', None) - return inst - - def __getitem__(self, key: _K) -> _V: - return self._dict[key] - - def __contains__(self, key: object) -> bool: - return key in self._dict - - def __iter__(self) -> typing.Iterator[_K]: - return iter(self._dict) - - def __len__(self) -> int: - return len(self._dict) - - def __repr__(self) -> str: - return "%s(%r)" % (self.__class__.__name__, self._dict) - - def __hash__(self) -> int: - if self._hash is None: - h = 0 - for key, value in self.items(): - h ^= hash((key, value)) - self._hash = h - - return self._hash - - def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(self) - new.update(other) - return self.__class__(new) - - def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(other) - new.update(self) - return new - - def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: - raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py deleted file mode 100644 index e593c90b1d7..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schema.py +++ /dev/null @@ -1,729 +0,0 @@ -from __future__ import annotations -import datetime -import dataclasses -import io -import types -import typing -import uuid - -import functools -import typing_extensions - -from this_package import exceptions -from this_package.configurations import schema_configuration - -from . import validation - -_T_co = typing.TypeVar("_T_co", covariant=True) - - -class SequenceNotStr(typing.Protocol[_T_co]): - """ - if a Protocol would define the interface of Sequence, this protocol - would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence - methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection - """ - def __contains__(self, value: object, /) -> bool: - raise NotImplementedError - - def __getitem__(self, index, /): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError - - def __iter__(self) -> typing.Iterator[_T_co]: - raise NotImplementedError - - def __reversed__(self, /) -> typing.Iterator[_T_co]: - raise NotImplementedError - -none_type_ = type(None) -T = typing.TypeVar('T', bound=typing.Mapping) -U = typing.TypeVar('U', bound=SequenceNotStr) -W = typing.TypeVar('W') - - -class SchemaTyped: - additional_properties: typing.Type[Schema] - all_of: typing.Tuple[typing.Type[Schema], ...] - any_of: typing.Tuple[typing.Type[Schema], ...] - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] - default: typing.Union[str, int, float, bool, None] - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] - exclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - format: str - inclusive_maximum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - items: typing.Type[Schema] - max_items: int - max_length: int - max_properties: int - min_items: int - min_length: int - min_properties: int - multiple_of: typing.Union[int, float] - not_: typing.Type[Schema] - one_of: typing.Tuple[typing.Type[Schema], ...] - pattern: validation.PatternInfo - properties: typing.Mapping[str, typing.Type[Schema]] - required: typing.FrozenSet[str] - types: typing.FrozenSet[typing.Type] - unique_items: bool - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: - raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore - super(FileIO, inst).__init__(arg.name) - return inst - raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): - """ - Needed for instantiation when passing in arguments of the above type - """ - pass - - -class classproperty(typing.Generic[W]): - def __init__(self, method: typing.Callable[..., W]): - self.__method = method - functools.update_wrapper(self, method) # type: ignore - - def __get__(self, obj, cls=None) -> W: - if cls is None: - cls = type(obj) - return self.__method(cls) - - -class Bool: - _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} - """ - This class is needed to replace bool during validation processing - json schema requires that 0 != False and 1 != True - python implementation defines 0 == False and 1 == True - To meet the json schema requirements, all bool instances are replaced with Bool singletons - during validation only, and then bool values are returned from validation - """ - - def __new__(cls, arg_: bool, **kwargs): - """ - Method that implements singleton - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, arg_) - if key not in cls._instances: - inst = super().__new__(cls) - cls._instances[key] = inst - return cls._instances[key] - - def __repr__(self): - if bool(self): - return f'' - return f'' - - @classproperty - def TRUE(cls): - return cls(True) # type: ignore - - @classproperty - def FALSE(cls): - return cls(False) # type: ignore - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -def cast_to_allowed_types( - arg: typing.Union[ - dict, - validation.immutabledict, - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - ], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] -) -> typing.Union[ - validation.immutabledict, - tuple, - float, - int, - str, - bytes, - Bool, - None, - FileIO -]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - path_to_type[path_to_item] = str - return str(arg) - elif isinstance(arg, (dict, validation.immutabledict)): - path_to_type[path_to_item] = validation.immutabledict - return validation.immutabledict( - { - key: cast_to_allowed_types( - val, - from_server, - validated_path_to_schemas, - path_to_item + (key,), - path_to_type, - ) - for key, val in arg.items() - } - ) - elif isinstance(arg, bool): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - path_to_type[path_to_item] = Bool - if arg: - return Bool.TRUE - return Bool.FALSE - elif isinstance(arg, int): - path_to_type[path_to_item] = int - return arg - elif isinstance(arg, float): - path_to_type[path_to_item] = float - return arg - elif isinstance(arg, (tuple, list)): - path_to_type[path_to_item] = tuple - return tuple( - [ - cast_to_allowed_types( - item, - from_server, - validated_path_to_schemas, - path_to_item + (i,), - path_to_type, - ) - for i, item in enumerate(arg) - ] - ) - elif arg is None: - path_to_type[path_to_item] = type(None) - return None - elif isinstance(arg, (datetime.date, datetime.datetime)): - path_to_type[path_to_item] = str - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - path_to_type[path_to_item] = str - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, bytes): - path_to_type[path_to_item] = bytes - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - path_to_type[path_to_item] = FileIO - return FileIO(arg) - raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class SingletonMeta(type): - """ - A singleton class for schemas - Schemas are frozen classes that are never instantiated with init args - All args come from defaults - """ - _instances: typing.Dict[type, typing.Any] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super().__call__(*args, **kwargs) - return cls._instances[cls] - - -class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): - - @classmethod - def __get_path_to_schemas( - cls, - arg, - validation_metadata: validation.ValidationMetadata, - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: - """ - Run all validations in the json schema and return a dict of - json schema to tuple of validated schemas - """ - _path_to_schemas: validation.PathToSchemasType = {} - if validation_metadata.validation_ran_earlier(cls): - validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) - validation.update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} - for path, schema_classes in _path_to_schemas.items(): - schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) - path_to_schemas[path] = schema - """ - For locations that validation did not check - the code still needs to store type + schema information for instantiation - All of those schemas will be UnsetAnyTypeSchema - """ - missing_paths = path_to_type.keys() - path_to_schemas.keys() - for missing_path in missing_paths: - path_to_schemas[missing_path] = UnsetAnyTypeSchema - - return path_to_schemas - - @staticmethod - def __get_items( - arg: tuple, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - ''' - Schema __get_items - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return tuple(cast_items) - - @staticmethod - def __get_properties( - arg: validation.immutabledict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - """ - Schema __get_properties, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return validation.immutabledict(dict_items) - - @classmethod - def _get_new_instance_without_conversion( - cls, - arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - # We have a Dynamic class and we are making an instance of it - if isinstance(arg, validation.immutabledict): - used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) - elif isinstance(arg, tuple): - used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) - elif isinstance(arg, Bool): - return bool(arg) - else: - """ - str, int, float, FileIO, bytes - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return arg - arg_type = type(arg) - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is None: - return used_arg - if arg_type not in type_to_output_cls: - return used_arg - output_cls = type_to_output_cls[arg_type] - if arg_type is tuple: - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(U, inst) - return inst - assert issubclass(output_cls, validation.immutabledict) - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(T, inst) - return inst - - @typing.overload - @classmethod - def validate_base( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate_base( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - """ - Schema validate_base - - Args: - arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value - configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords - like minItems, minLength etc - """ - if isinstance(arg, (tuple, validation.immutabledict)): - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is not None: - for output_cls in type_to_output_cls.values(): - if isinstance(arg, output_cls): - # U + T use case, don't run validations twice - return arg - - from_server = False - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] - ] = {} - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} - cast_arg = cast_to_allowed_types( - arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = validation.ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) - return cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas, - ) - - @classmethod - def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: - type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) - type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) - return type_to_output_cls - - -def get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[Schema]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - return item_cls._evaluate(None, local_namespace) - raise ValueError('invalid class value passed in') - - -@dataclasses.dataclass(frozen=True) -class AnyTypeSchema(Schema[T, U]): - # Python representation of a schema defined as true or {} - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return cls.validate_base( - arg, - configuration=configuration - ) - -class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - -INPUT_TYPES_ALL = typing.Union[ - dict, - validation.immutabledict, - typing.Mapping[str, object], # for TypedDict - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - FileIO -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py deleted file mode 100644 index df48b61b43d..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/schemas.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import datetime -import dataclasses -import io -import typing -import uuid - -import typing_extensions - -from this_package.configurations import schema_configuration - -from . import schema, validation - - -@dataclasses.dataclass(frozen=True) -class ListSchema(schema.Schema[validation.immutabledict, tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schema.INPUT_TYPES_ALL], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Tuple[schema.INPUT_TYPES_ALL, ...], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NoneSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) - - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NumberSchema(schema.Schema): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - types: typing.FrozenSet[typing.Type] = frozenset({float, int}) - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class IntSchema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int' - - -@dataclasses.dataclass(frozen=True) -class Int32Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int32' - - -@dataclasses.dataclass(frozen=True) -class Int64Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int64' - - -@dataclasses.dataclass(frozen=True) -class Float32Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'float' - - -@dataclasses.dataclass(frozen=True) -class Float64Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'double' - - -@dataclasses.dataclass(frozen=True) -class StrSchema(schema.Schema): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - types: typing.FrozenSet[typing.Type] = frozenset({str}) - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class UUIDSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'uuid' - - @classmethod - def validate( - cls, - arg: typing.Union[str, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateTimeSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date-time' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.datetime], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DecimalSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'number' - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class BytesSchema(schema.Schema): - """ - this class will subclass bytes and is immutable - """ - types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class FileSchema(schema.Schema): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.FileIO: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BinarySchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) - format: str = 'binary' - - one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( - BytesSchema, - FileSchema, - ) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader, bytes], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[schema.FileIO, bytes]: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BoolSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NotAnyTypeSchema(schema.AnyTypeSchema): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - not_: typing.Type[schema.Schema] = schema.AnyTypeSchema - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return super().validate_base(arg, configuration=configuration) - -OUTPUT_BASE_TYPES = typing.Union[ - validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], - str, - int, - float, - bool, - schema.none_type_, - typing.Tuple['OUTPUT_BASE_TYPES', ...], - bytes, - schema.FileIO -] - - -@dataclasses.dataclass(frozen=True) -class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) - - @typing.overload - @classmethod - def validate( - cls, - arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: - return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py deleted file mode 100644 index f0868711eba..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/schemas/validation.py +++ /dev/null @@ -1,1537 +0,0 @@ -# coding: utf-8 - -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import collections -import dataclasses -import decimal -import re -import sys -import types -import typing -import uuid - -import typing_extensions - -from this_package import exceptions -from this_package.configurations import schema_configuration - -from . import format, original_immutabledict - -immutabledict = original_immutabledict.immutabledict - - -@dataclasses.dataclass -class ValidationMetadata: - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - path_to_item: typing.Tuple[typing.Union[str, int], ...] - configuration: schema_configuration.SchemaConfiguration - validated_path_to_schemas: typing.Mapping[ - typing.Tuple[typing.Union[str, int], ...], - typing.Mapping[type, None] - ] = dataclasses.field(default_factory=dict) - seen_classes: typing.FrozenSet[type] = frozenset() - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) - if validated_schemas and cls in validated_schemas: - return True - if cls in self.seen_classes: - return True - return False - -def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise exceptions.ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class SchemaValidator: - __excluded_cls_properties = { - '__module__', - '__dict__', - '__weakref__', - '__doc__', - '__annotations__', - 'default', # excluded because it has no impact on validation - 'type_to_output_cls', # used to pluck the output class for instantiation - } - - @classmethod - def _validate( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> PathToSchemasType: - """ - SchemaValidator validate - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - """ - cls_schema = cls() - json_schema_data = { - k: v - for k, v in vars(cls_schema).items() - if k not in cls.__excluded_cls_properties - and k - not in validation_metadata.configuration.disabled_json_schema_python_keywords - } - kwargs = {} - if 'discriminator' in json_schema_data: - discriminated_cls, ensure_discriminator_value_present_exc = _get_discriminated_class_and_exception( - arg, - cls, - validation_metadata - ) - kwargs = { - 'discriminated_cls': discriminated_cls, - 'ensure_discriminator_value_present_exc': ensure_discriminator_value_present_exc - } - contains_path_to_schemas = [] - path_to_schemas: PathToSchemasType = {} - if 'contains' in vars(cls_schema): - contains_path_to_schemas = _get_contains_path_to_schemas( - arg, - vars(cls_schema)['contains'], - validation_metadata, - path_to_schemas - ) - if_path_to_schemas = None - if 'if_' in vars(cls_schema): - if_path_to_schemas = _get_if_path_to_schemas( - arg, - vars(cls_schema)['if_'], - validation_metadata, - ) - validated_pattern_properties: typing.Optional[PathToSchemasType] = None - if 'pattern_properties' in vars(cls_schema): - validated_pattern_properties = _get_validated_pattern_properties( - arg, - vars(cls_schema)['pattern_properties'], - cls, - validation_metadata - ) - prefix_items_length = 0 - if 'prefix_items' in vars(cls_schema): - prefix_items_length = len(vars(cls_schema)['prefix_items']) - for keyword, val in json_schema_data.items(): - used_val: typing.Any - if keyword in {'contains', 'min_contains', 'max_contains'}: - used_val = (val, contains_path_to_schemas) - elif keyword == 'items': - used_val = (val, prefix_items_length) - elif keyword in {'unevaluated_items', 'unevaluated_properties'}: - used_val = (val, path_to_schemas) - elif keyword in {'types'}: - format: typing.Optional[str] = vars(cls_schema).get('format', None) - used_val = (val, format) - elif keyword in {'pattern_properties', 'additional_properties'}: - used_val = (val, validated_pattern_properties) - elif keyword in {'if_', 'then', 'else_'}: - used_val = (val, if_path_to_schemas) - else: - used_val = val - validator = json_schema_keyword_to_validator[keyword] - - other_path_to_schemas = validator( - arg, - used_val, - cls, - validation_metadata, - **kwargs - ) - if other_path_to_schemas: - update(path_to_schemas, other_path_to_schemas) - - base_class = type(arg) - if validation_metadata.path_to_item not in path_to_schemas: - path_to_schemas[validation_metadata.path_to_item] = dict() - path_to_schemas[validation_metadata.path_to_item][base_class] = None - path_to_schemas[validation_metadata.path_to_item][cls] = None - return path_to_schemas - -PathToSchemasType = typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Dict[ - typing.Union[ - typing.Type[SchemaValidator], - typing.Type[str], - typing.Type[int], - typing.Type[float], - typing.Type[bool], - typing.Type[None], - typing.Type[immutabledict], - typing.Type[tuple] - ], - None - ] -] - -def _get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[SchemaValidator]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - if sys.version_info < (3, 9): - return item_cls._evaluate(None, local_namespace) - return item_cls._evaluate(None, local_namespace, set()) - raise ValueError('invalid class value passed in') - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is collections.defaultdict(dict) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k].update(v) - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def __type_error_message( - var_value=None, var_name=None, valid_classes=None, key_type=None -): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = __get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - -def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = __type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return exceptions.ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternInfo: - pattern: str - flags: typing.Optional[re.RegexFlag] = None - - -def validate_types( - arg: typing.Any, - allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - allowed_types = allowed_types_format[0] - if type(arg) not in allowed_types: - raise __get_type_error( - arg, - validation_metadata.path_to_item, - allowed_types, - key_type=False, - ) - if isinstance(arg, bool) or not isinstance(arg, (int, float)): - return None - format = allowed_types_format[1] - if format and format == 'int' and arg != int(arg): - # there is a json schema test where 1.0 validates as an integer - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - return None - - -def validate_enum( - arg: typing.Any, - enum_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if arg not in enum_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) - return None - - -def validate_unique_items( - arg: typing.Any, - unique_items_value: bool, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not unique_items_value or not isinstance(arg, tuple): - return None - if len(arg) == len(set(arg)): - return None - _raise_validation_error_message( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - -def validate_min_items( - arg: typing.Any, - min_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) < min_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=min_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_items( - arg: typing.Any, - max_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) > max_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=max_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_properties( - arg: typing.Any, - min_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) < min_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=min_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_properties( - arg: typing.Any, - max_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) > max_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=max_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_length( - arg: typing.Any, - min_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, str): - return None - if len(arg) < min_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=min_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_length( - arg: typing.Any, - max_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, str): - return None - if len(arg) > max_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=max_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_minimum( - arg: typing.Any, - inclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg < inclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_minimum( - arg: typing.Any, - exclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg <= exclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=exclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_maximum( - arg: typing.Any, - inclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg > inclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_maximum( - arg: typing.Any, - exclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg >= exclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than", - constraint_value=exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - -def validate_multiple_of( - arg: typing.Any, - multiple_of: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, (int, float)): - return None - if (not (float(arg) / multiple_of).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - _raise_validation_error_message( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_pattern( - arg: typing.Any, - pattern_info: PatternInfo, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, str): - return None - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item - ) - return None - - -__int32_inclusive_minimum = -2147483648 -__int32_inclusive_maximum = 2147483647 -__int64_inclusive_minimum = -9223372036854775808 -__int64_inclusive_maximum = 9223372036854775807 -__float_inclusive_minimum = -3.4028234663852886e+38 -__float_inclusive_maximum = 3.4028234663852886e+38 -__double_inclusive_minimum = -1.7976931348623157E+308 -__double_inclusive_maximum = 1.7976931348623157E+308 - -def __validate_numeric_format( - arg: typing.Union[int, float], - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value[:3] == 'int': - # there is a json schema test where 1.0 validates as an integer - if arg != int(arg): - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - if format_value == 'int32': - if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - elif format_value == 'int64': - if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - elif format_value in {'float', 'double'}: - if format_value == 'float': - if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - return None - # double - if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - - -def __validate_string_format( - arg: str, - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value == 'uuid': - try: - uuid.UUID(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'number': - try: - decimal.Decimal(arg) - return None - except decimal.InvalidOperation: - raise exceptions.ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date': - try: - format.DEFAULT_ISOPARSER.parse_isodate_str(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date-time': - try: - format.DEFAULT_ISOPARSER.parse_isodatetime(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - return None - - -def validate_format( - arg: typing.Union[str, int, float], - format_value: str, - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - # formats work for strings + numbers - if isinstance(arg, (int, float)): - return __validate_numeric_format( - arg, - format_value, - validation_metadata - ) - elif isinstance(arg, str): - return __validate_string_format( - arg, - format_value, - validation_metadata - ) - return None - - -def validate_required( - arg: typing.Any, - required: typing.Set[str], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, immutabledict): - return None - missing_req_args = required - arg.keys() - if missing_req_args: - missing_required_arguments = list(missing_req_args) - missing_required_arguments.sort() - raise exceptions.ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - return None - - -def validate_items( - arg: typing.Any, - item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - item_cls = _get_class(item_cls_prefix_items_length[0]) - prefix_items_length = item_cls_prefix_items_length[1] - path_to_schemas: PathToSchemasType = {} - for i in range(prefix_items_length, len(arg)): - value = arg[i] - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_properties( - arg: typing.Any, - properties: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - present_properties = {k: v for k, v, in arg.items() if k in properties} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, value in present_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - schema = properties[property_name] - schema = _get_class(schema, module_namespace) - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_additional_properties( - arg: typing.Any, - additional_properties_cls_val_pprops: typing.Tuple[ - typing.Type[SchemaValidator], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - schema = _get_class(additional_properties_cls_val_pprops[0]) - path_to_schemas: PathToSchemasType = {} - cls_schema = cls() - properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} - present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} - validated_pattern_properties = additional_properties_cls_val_pprops[1] - for property_name, value in present_additional_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if validated_pattern_properties and path_to_item in validated_pattern_properties: - continue - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_one_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, - discriminated_cls: typing.Optional[SchemaValidator], - **kwargs -) -> PathToSchemasType: - oneof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(schema) - continue - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - oneof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - oneof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate oneof_classes - continue - oneof_classes.append(schema) - if not oneof_classes: - if discriminated_cls: - """ - return without exception because code was generated with - nonCompliantUseDiscriminatorIfCompositionFails=true - """ - return {} - raise exceptions.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 discriminated_cls: - """ - return without exception because code was generated with - nonCompliantUseDiscriminatorIfCompositionFails=true - """ - return {} - raise exceptions.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 - - -def validate_any_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, - discriminated_cls: typing.Optional[SchemaValidator], - **kwargs -) -> PathToSchemasType: - anyof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - module_namespace = vars(sys.modules[cls.__module__]) - for schema in classes: - schema = _get_class(schema, module_namespace) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - anyof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - anyof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate anyof_classes - continue - anyof_classes.append(schema) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - if discriminated_cls: - """ - return without exception because code was generated with - nonCompliantUseDiscriminatorIfCompositionFails=true - """ - return {} - raise exceptions.ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - -def validate_all_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> PathToSchemasType: - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - continue - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_not( - arg: typing.Any, - not_cls: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - not_schema = _get_class(not_cls) - other_path_to_schemas = None - not_exception = exceptions.ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_schema.__name__, - ) - ) - if validation_metadata.validation_ran_earlier(not_schema): - raise not_exception - - try: - other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - return None - - -def __ensure_discriminator_value_present( - disc_property_name: str, - validation_metadata: ValidationMetadata, - arg -): - if disc_property_name not in arg: - # The input data does not contain the discriminator property - raise exceptions.ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - -def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - cls_schema = cls() - if not hasattr(cls_schema, 'discriminator'): - return None - disc = cls_schema.discriminator - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not ( - hasattr(cls_schema, 'all_of') or - hasattr(cls_schema, 'one_of') or - hasattr(cls_schema, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls_schema, 'all_of'): - for allof_cls in cls_schema.all_of: - discriminated_cls = __get_discriminated_class( - allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'one_of'): - for oneof_cls in cls_schema.one_of: - discriminated_cls = __get_discriminated_class( - oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'any_of'): - for anyof_cls in cls_schema.any_of: - discriminated_cls = __get_discriminated_class( - anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - -def _get_discriminated_class_and_exception( - arg: typing.Any, - cls: typing.Type, - validation_metadata: ValidationMetadata -) -> typing.Tuple[typing.Optional[SchemaValidator], typing.Optional[Exception]]: - if not isinstance(arg, immutabledict): - return None, None - cls_schema = cls() - discriminator = cls_schema.discriminator - disc_prop_name = list(discriminator.keys())[0] - try: - __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) - except exceptions.ApiValueError as ex: - return None, ex - return ( - __get_discriminated_class( - cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ), - None - ) - - -def validate_discriminator( - arg: typing.Any, - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - discriminated_cls: typing.Optional[SchemaValidator], - ensure_discriminator_value_present_exc: typing.Optional[Exception], -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - disc_prop_name = list(discriminator.keys())[0] - if ensure_discriminator_value_present_exc: - raise ensure_discriminator_value_present_exc - if discriminated_cls is None: - raise exceptions.ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - if discriminated_cls is cls: - """ - Optimistically assume that cls will pass validation - If the code invoked _validate on cls it would infinitely recurse - """ - return None - if validation_metadata.validation_ran_earlier(discriminated_cls): - path_to_schemas: PathToSchemasType = {} - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - return path_to_schemas - updated_vm = ValidationMetadata( - path_to_item=validation_metadata.path_to_item, - configuration=validation_metadata.configuration, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - return discriminated_cls._validate(arg, validation_metadata=updated_vm) - - -def _get_if_path_to_schemas( - arg: typing.Any, - if_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - if_cls = _get_class(if_cls) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = if_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, other_path_to_schemas) - except exceptions.OpenApiException: - pass - return these_path_to_schemas - - -def validate_if( - arg: typing.Any, - if_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = if_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - - if true, then true -> true for whole schema - so validate_then will add if_path_to_schemas data to path_to_schemas - """ - return None - - -def validate_then( - arg: typing.Any, - then_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = then_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - """ - if not if_path_to_schemas: - return None - then_cls = _get_class(then_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = then_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # then False case - raise ex - - -def validate_else( - arg: typing.Any, - else_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = else_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - if if_path_to_schemas: - # skip validation if if_path_to_schemas was true - return None - """ - if is false use case - if_path_to_schemas == {} - """ - else_cls = _get_class(else_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = else_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # else False case - raise ex - - -def _get_contains_path_to_schemas( - arg: typing.Any, - contains_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, - path_to_schemas: PathToSchemasType -) -> typing.List[PathToSchemasType]: - if not isinstance(arg, tuple): - return [] - contains_cls = _get_class(contains_cls) - contains_path_to_schemas = [] - for i, value in enumerate(arg): - these_path_to_schemas: PathToSchemasType = {} - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(contains_cls): - add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) - contains_path_to_schemas.append(these_path_to_schemas) - continue - try: - other_path_to_schemas = contains_cls._validate( - value, validation_metadata=item_validation_metadata) - contains_path_to_schemas.append(other_path_to_schemas) - except exceptions.OpenApiException: - pass - return contains_path_to_schemas - - -def validate_contains( - arg: typing.Any, - contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - many_path_to_schemas = contains_cls_path_to_schemas[1] - if not many_path_to_schemas: - raise exceptions.ApiValueError( - "Validation failed for contains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - these_path_to_schemas: PathToSchemasType = {} - for other_path_to_schema in many_path_to_schemas: - update(these_path_to_schemas, other_path_to_schema) - return these_path_to_schemas - - -def validate_min_contains( - arg: typing.Any, - min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - min_contains = min_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) < min_contains: - raise exceptions.ApiValueError( - "Validation failed for minContains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_max_contains( - arg: typing.Any, - max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - max_contains = max_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) > max_contains: - raise exceptions.ApiValueError( - "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " - "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_const( - arg: typing.Any, - const_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if arg not in const_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) - return None - - -def validate_dependent_required( - arg: typing.Any, - dependent_required: typing.Mapping[str, typing.Set[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, immutabledict): - return None - for key, keys_that_must_exist in dependent_required.items(): - if key not in arg: - continue - missing_keys = keys_that_must_exist - arg.keys() - if missing_keys: - raise exceptions.ApiValueError( - f"Validation failed for dependentRequired because these_keys={missing_keys} are " - f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" - ) - return None - - -def validate_dependent_schemas( - arg: typing.Any, - dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for key, schema in dependent_schemas.items(): - if key not in arg: - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_property_names( - arg: typing.Any, - property_names_schema: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> None: - if not isinstance(arg, immutabledict): - return None - module_namespace = vars(sys.modules[cls.__module__]) - property_names_schema = _get_class(property_names_schema, module_namespace) - for key in arg.keys(): - path_to_item = validation_metadata.path_to_item + (key,) - key_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - property_names_schema._validate(key, validation_metadata=key_validation_metadata) - return None - - -def _get_validated_pattern_properties( - arg: typing.Any, - pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, property_value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - for pattern_info, schema in pattern_properties.items(): - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, property_name, flags=flags): - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_pattern_properties( - arg: typing.Any, - pattern_properties_validation_results: typing.Tuple[ - typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - validation_results = pattern_properties_validation_results[1] - return validation_results - - -def validate_prefix_items( - arg: typing.Any, - prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for i, val in enumerate(arg): - if i >= len(prefix_items): - break - schema = _get_class(prefix_items[i], module_namespace) - path_to_item = validation_metadata.path_to_item + (i,) - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_items( - arg: typing.Any, - unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] - for i, val in enumerate(arg): - path_to_item = validation_metadata.path_to_item + (i,) - if path_to_item in validated_path_to_schemas: - continue - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_properties( - arg: typing.Any, - unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, - **kwargs -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] - for property_name, val in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if path_to_item in validated_path_to_schemas: - continue - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] -json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { - 'types': validate_types, - 'enum_value_to_name': validate_enum, - 'unique_items': validate_unique_items, - 'min_items': validate_min_items, - 'max_items': validate_max_items, - 'min_properties': validate_min_properties, - 'max_properties': validate_max_properties, - 'min_length': validate_min_length, - 'max_length': validate_max_length, - 'inclusive_minimum': validate_inclusive_minimum, - 'exclusive_minimum': validate_exclusive_minimum, - 'inclusive_maximum': validate_inclusive_maximum, - 'exclusive_maximum': validate_exclusive_maximum, - 'multiple_of': validate_multiple_of, - 'pattern': validate_pattern, - 'format': validate_format, - 'required': validate_required, - 'items': validate_items, - 'properties': validate_properties, - 'additional_properties': validate_additional_properties, - 'one_of': validate_one_of, - 'any_of': validate_any_of, - 'all_of': validate_all_of, - 'not_': validate_not, - 'discriminator': validate_discriminator, - 'contains': validate_contains, - 'min_contains': validate_min_contains, - 'max_contains': validate_max_contains, - 'const_value_to_name': validate_const, - 'dependent_required': validate_dependent_required, - 'dependent_schemas': validate_dependent_schemas, - 'property_names': validate_property_names, - 'pattern_properties': validate_pattern_properties, - 'prefix_items': validate_prefix_items, - 'unevaluated_items': validate_unevaluated_items, - 'unevaluated_properties': validate_unevaluated_properties, - 'if_': validate_if, - 'then': validate_then, - 'else_': validate_else -} \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py deleted file mode 100644 index 15b1c7d2af9..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/security_schemes.py +++ /dev/null @@ -1,227 +0,0 @@ -# coding: utf-8 -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import abc -import base64 -import dataclasses -import enum -import typing -import typing_extensions - -from urllib3 import _collections - - -class SecuritySchemeType(enum.Enum): - API_KEY = 'apiKey' - HTTP = 'http' - MUTUAL_TLS = 'mutualTLS' - OAUTH_2 = 'oauth2' - OPENID_CONNECT = 'openIdConnect' - - -class ApiKeyInLocation(enum.Enum): - QUERY = 'query' - HEADER = 'header' - COOKIE = 'cookie' - - -class __SecuritySchemeBase(metaclass=abc.ABCMeta): - @abc.abstractmethod - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - pass - - -@dataclasses.dataclass -class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): - api_key: str # this must be set by the developer - name: str = '' - in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY - type: SecuritySchemeType = SecuritySchemeType.API_KEY - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - if self.in_location is ApiKeyInLocation.COOKIE: - headers.add('Cookie', self.api_key) - elif self.in_location is ApiKeyInLocation.HEADER: - headers.add(self.name, self.api_key) - elif self.in_location is ApiKeyInLocation.QUERY: - # todo add query handling - raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") - return - - -class HTTPSchemeType(enum.Enum): - BASIC = 'basic' - BEARER = 'bearer' - DIGEST = 'digest' - SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ - - -@dataclasses.dataclass -class HTTPBasicSecurityScheme(__SecuritySchemeBase): - user_id: str # user name - password: str - scheme: HTTPSchemeType = HTTPSchemeType.BASIC - encoding: str = 'utf-8' - type: SecuritySchemeType = SecuritySchemeType.HTTP - """ - https://www.rfc-editor.org/rfc/rfc7617.html - """ - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - user_pass = f"{self.user_id}:{self.password}" - b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) - headers.add('Authorization', f"Basic {b64_user_pass.decode()}") - - -@dataclasses.dataclass -class HTTPBearerSecurityScheme(__SecuritySchemeBase): - access_token: str - bearer_format: typing.Optional[str] = None - scheme: HTTPSchemeType = HTTPSchemeType.BEARER - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - headers.add('Authorization', f"Bearer {self.access_token}") - - -@dataclasses.dataclass -class HTTPDigestSecurityScheme(__SecuritySchemeBase): - scheme: HTTPSchemeType = HTTPSchemeType.DIGEST - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class MutualTLSSecurityScheme(__SecuritySchemeBase): - type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class ImplicitOAuthFlow: - authorization_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class TokenUrlOauthFlow: - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class AuthorizationCodeOauthFlow: - authorization_url: str - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class OAuthFlows: - implicit: typing.Optional[ImplicitOAuthFlow] = None - password: typing.Optional[TokenUrlOauthFlow] = None - client_credentials: typing.Optional[TokenUrlOauthFlow] = None - authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None - - -class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): - flows: OAuthFlows - type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OAuth2SecurityScheme not yet implemented") - - -class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): - openid_connect_url: str - type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") - -""" -Key is the Security scheme class -Value is the list of scopes -""" -SecurityRequirementObject = typing.TypedDict( - 'SecurityRequirementObject', - { - }, - total=False -) \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py deleted file mode 100644 index 8e8a8052f43..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/server.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import dataclasses -import typing - -from this_package.schemas import validation, schema - - -@dataclasses.dataclass -class ServerWithoutVariables(abc.ABC): - url: str - - -@dataclasses.dataclass -class ServerWithVariables(abc.ABC): - _url: str - variables: validation.immutabledict[str, str] - variables_schema: typing.Type[schema.Schema] - url: str = dataclasses.field(init=False) - - def __post_init__(self): - url = self._url - assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) - for (key, value) in self.variables.items(): - url = url.replace("{" + key + "}", value) - self.url = url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py deleted file mode 100644 index 752d9cc7c2b..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -""" - discriminator-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "http://localhost:3000" diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py deleted file mode 100644 index 8358a4052d4..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/header_imports.py +++ /dev/null @@ -1,15 +0,0 @@ -import decimal -import io -import typing -import typing_extensions - -from this_package import api_client, schemas - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'api_client', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py deleted file mode 100644 index 9abf48185ca..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/operation_imports.py +++ /dev/null @@ -1,18 +0,0 @@ -import datetime -import decimal -import io -import typing -import typing_extensions -import uuid - -from this_package import schemas, api_response - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py deleted file mode 100644 index 0526a2a1c52..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/response_imports.py +++ /dev/null @@ -1,25 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import typing -import uuid - -import typing_extensions -import urllib3 - -from this_package import api_client, schemas, api_response - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'typing', - 'uuid', - 'typing_extensions', - 'urllib3', - 'api_client', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py deleted file mode 100644 index 01b3da50dc5..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/schema_imports.py +++ /dev/null @@ -1,28 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import numbers -import re -import typing -import typing_extensions -import uuid - -from this_package import schemas -from this_package.configurations import schema_configuration - -U = typing.TypeVar('U') - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'numbers', - 're', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'schema_configuration' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py deleted file mode 100644 index 8bc2580eaec..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/security_scheme_imports.py +++ /dev/null @@ -1,12 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from this_package import security_schemes - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'security_schemes' -] \ No newline at end of file diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py deleted file mode 100644 index 5a77ec9124f..00000000000 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/openapi_client/shared_imports/server_imports.py +++ /dev/null @@ -1,13 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from this_package import server, schemas - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'server', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/__init__.py deleted file mode 100644 index 75f976d15f6..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -__version__ = "1.0.0" - -# import ApiClient -from this_package.api_client import ApiClient - -# import Configuration -from this_package.configurations.api_configuration import ApiConfiguration - -# import exceptions -from this_package.exceptions import OpenApiException -from this_package.exceptions import ApiAttributeError -from this_package.exceptions import ApiTypeError -from this_package.exceptions import ApiValueError -from this_package.exceptions import ApiKeyError -from this_package.exceptions import ApiException diff --git a/samples/client/openapi_features/security/python/src/openapi_client/api_client.py b/samples/client/openapi_features/security/python/src/openapi_client/api_client.py deleted file mode 100644 index 2397c06f5cf..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/api_client.py +++ /dev/null @@ -1,1425 +0,0 @@ -# coding: utf-8 -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import datetime -import dataclasses -import decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing import pool -import re -import tempfile -import typing -import typing_extensions -from urllib import parse -import urllib3 -from urllib3 import _collections, fields - - -from this_package import exceptions, rest, schemas, security_schemes, api_response -from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj: typing.Any): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return obj - elif isinstance(obj, bool): - # must be before int check - return obj - elif isinstance(obj, int): - return obj - elif obj is None: - return None - elif isinstance(obj, (dict, schemas.immutabledict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -@dataclasses.dataclass -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - prefix: str - separator: str - first: bool = True - item_separator: str = dataclasses.field(init=False) - - def __post_init__(self): - self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return parse.quote(str(in_data)) - return str(in_data) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - @classmethod - def _serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - @classmethod - def _deserialize_simple( - cls, - in_data: str, - name: str, - explode: bool, - percent_encode: bool - ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: - raise NotImplementedError( - "Deserialization of style=simple has not yet been added. " - "If you need this how about you submit a PR adding it?" - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -class Encoding: - content_type: str - headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None - style: typing.Optional[ParameterStyle] = None - explode: bool = False - allow_reserved: bool = False - - -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[schemas.Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -class ParameterBase(JSONDetector): - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[schemas.Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] - - _json_encoder = JSONEncoder() - - def __init_subclass__(cls, **kwargs): - if cls.explode is None: - if cls.style is ParameterStyle.FORM: - cls.explode = True - else: - cls.explode = False - - @classmethod - def _serialize_json( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=cls._json_encoder.compact_separators) - return json.dumps(in_data) - -_SERIALIZE_TYPES = typing.Union[ - int, - float, - str, - datetime.date, - datetime.datetime, - None, - bool, - list, - tuple, - dict, - schemas.immutabledict -] - -_JSON_TYPES = typing.Union[ - int, - float, - str, - None, - bool, - typing.Tuple['_JSON_TYPES', ...], - schemas.immutabledict[str, '_JSON_TYPES'], -] - -@dataclasses.dataclass -class PathParameter(ParameterBase, StyleSimpleSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.PATH - style: ParameterStyle = ParameterStyle.SIMPLE - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_label( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_matrix( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = cls._serialize_simple( - in_data=in_data, - name=cls.name, - explode=cls.explode, - percent_encode=True - ) - return cls._to_dict(cls.name, value) - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if cls.style: - if cls.style is ParameterStyle.SIMPLE: - return cls.__serialize_simple(cast_in_data) - elif cls.style is ParameterStyle.LABEL: - return cls.__serialize_label(cast_in_data) - elif cls.style is ParameterStyle.MATRIX: - return cls.__serialize_matrix(cast_in_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class QueryParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.QUERY - style: ParameterStyle = ParameterStyle.FORM - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_space_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_pipe_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._serialize_form( - in_data, - name=cls.name, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: - if cls.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - raise ValueError(f'No iterator possible for style={cls.style}') - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if cls.style: - # TODO update query ones to omit setting values when [] {} or None is input - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - if cls.style is ParameterStyle.FORM: - return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) - return cls._to_dict( - cls.name, - next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) - ) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class CookieParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.FORM - in_type: ParameterInType = ParameterInType.COOKIE - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if cls.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - value = cls._serialize_form( - cast_in_data, - explode=explode, - name=cls.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return cls._to_dict(cls.name, value) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): - style: ParameterStyle = ParameterStyle.SIMPLE - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - explode: bool = False - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = _collections.HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - @classmethod - def serialize_with_name( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - value = cls._serialize_simple(cast_in_data, name, cls.explode, False) - return cls.__to_headers(((name, value),)) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls.__to_headers(((name, value),)) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - @classmethod - def deserialize( - cls, - in_data: str, - name: str - ): - if cls.schema: - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.validate_base(extracted_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - if cls._content_type_is_json(content_type): - cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) - assert media_type.schema is not None - return media_type.schema.validate_base(cast_in_data) - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class HeaderParameterWithoutName(__HeaderParameterBase): - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - name, - skip_validation=skip_validation - ) - - -class HeaderParameter(__HeaderParameterBase): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - cls.name, - skip_validation=skip_validation - ) - -T = typing.TypeVar("T", bound=api_response.ApiResponse) - - -class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None - headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None - - @classmethod - @abc.abstractmethod - def get_response(cls, response, headers, body) -> T: ... - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = parse.urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - @classmethod - def __deserialize_application_octet_stream( - cls, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or cls.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as write_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - write_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - @classmethod - def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: - content_type = response.headers.get('content-type') - deserialized_body = schemas.unset - streamed = response.supports_chunked_reads() - - deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset - if cls.headers is not None and cls.headers_schema is not None: - deserialized_headers = {} - for header_name, header_param in cls.headers.items(): - header_value = response.headers.get(header_name) - if header_value is None: - continue - header_value = header_param.deserialize(header_value, header_name) - deserialized_headers[header_name] = header_value - deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) - - if cls.content is not None: - if content_type not in cls.content: - raise exceptions.ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" - ) - body_schema = cls.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return cls.get_response( - response=response, - headers=deserialized_headers, - body=schemas.unset - ) - - if cls._content_type_is_json(content_type): - body_data = cls.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = cls.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = cls.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - elif content_type == 'application/x-pem-file': - body_data = response.data.decode() - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = schemas.get_class(body_schema) - if body_schema is schemas.BinarySchema: - deserialized_body = body_schema.validate_base(body_data) - else: - deserialized_body = body_schema.validate_base( - body_data, configuration=configuration) - elif streamed: - response.release_conn() - - return cls.get_response( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -@dataclasses.dataclass -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param configuration: api_configuration.ApiConfiguration object for this client - :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client - :param default_headers: any default headers to include when making calls to the API. - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - configuration: api_configuration.ApiConfiguration = dataclasses.field( - default_factory=lambda: api_configuration.ApiConfiguration()) - schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( - default_factory=lambda: schema_configuration_.SchemaConfiguration()) - default_headers: _collections.HTTPHeaderDict = dataclasses.field( - default_factory=lambda: _collections.HTTPHeaderDict()) - pool_threads: int = 1 - user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' - rest_client: rest.RESTClientObject = dataclasses.field(init=False) - - def __post_init__(self): - self._pool = None - self.rest_client = rest.RESTClientObject(self.configuration) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = pool.ThreadPool(self.pool_threads) - return self._pool - - def set_default_header(self, header_name: str, header_value: str): - self.default_headers[header_name] = header_value - - def call_api( - self, - resource_path: str, - method: str, - host: str, - query_params_suffix: typing.Optional[str] = None, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data` - :param security_requirement_object: The security requirement object, used to apply auth when making the call - :param async_req: execute request asynchronously - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystem file and the schemas.BinarySchema - instance will also inherit from FileSchema and schemas.FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - the method will return the response directly. - """ - # header parameters - used_headers = _collections.HTTPHeaderDict(self.default_headers) - user_agent_key = 'User-Agent' - if user_agent_key not in used_headers and self.user_agent: - used_headers[user_agent_key] = self.user_agent - - # auth setting - self.update_params_for_auth( - used_headers, - security_requirement_object, - resource_path, - method, - body, - query_params_suffix - ) - - # must happen after auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - url = host + resource_path - if query_params_suffix: - url += query_params_suffix - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def request( - self, - method: str, - url: str, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - body: typing.Union[str, bytes, None] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "get": - return self.rest_client.get(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "head": - return self.rest_client.head(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "options": - return self.rest_client.options(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "post": - return self.rest_client.post(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "put": - return self.rest_client.put(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "patch": - return self.rest_client.patch(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "delete": - return self.rest_client.delete(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise exceptions.ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth( - self, - headers: _collections.HTTPHeaderDict, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], - resource_path: str, - method: str, - body: typing.Union[str, bytes, None] = None, - query_params_suffix: typing.Optional[str] = None - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param security_requirement_object: the openapi security requirement object - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - if not security_requirement_object: - # optional auth cause, use no auth - return - for security_scheme_component_name, scope_names in security_requirement_object.items(): - scope_names = typing.cast(typing.Tuple[str, ...], scope_names) - security_scheme_component_name = typing.cast(typing.Literal[ - 'api_key', - 'bearer_test', - 'http_basic_test', - ], - security_scheme_component_name - ) - try: - security_scheme_instance = self.configuration.security_scheme_info[security_scheme_component_name] - security_scheme_instance.apply_auth( - headers, - resource_path, - method, - body, - query_params_suffix, - scope_names - ) - except KeyError as ex: - raise ex - -@dataclasses.dataclass -class Api: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) - - @staticmethod - def _get_used_path( - used_path: str, - path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - skip_validation: bool = False - ) -> typing.Tuple[str, str]: - used_path_params = {} - if path_params is not None: - for path_parameter in path_parameters: - parameter_data = path_params.get(path_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) - used_path_params.update(serialized_data) - - for k, v in used_path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - query_params_suffix = "" - if query_params is not None: - prefix_separator_iterator = None - for query_parameter in query_parameters: - parameter_data = query_params.get(query_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = query_parameter.serialize( - parameter_data, - prefix_separator_iterator=prefix_separator_iterator, - skip_validation=skip_validation - ) - for serialized_value in serialized_data.values(): - query_params_suffix += serialized_value - return used_path, query_params_suffix - - @staticmethod - def _get_headers( - header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - accept_content_types: typing.Tuple[str, ...] = (), - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - headers = _collections.HTTPHeaderDict() - if header_params is not None: - for parameter in header_parameters: - parameter_data = header_params.get(parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) - headers.extend(serialized_data) - if accept_content_types: - for accept_content_type in accept_content_types: - headers.add('Accept', accept_content_type) - return headers - - def _get_fields_and_body( - self, - request_body: typing.Type[RequestBody], - body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], - content_type: str, - headers: _collections.HTTPHeaderDict - ): - if request_body.required and body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - - if isinstance(body, schemas.Unset): - return None, None - - serialized_fields = None - serialized_body = None - serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) - headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - serialized_fields = serialized_data['fields'] - elif 'body' in serialized_data: - serialized_body = serialized_data['body'] - return serialized_fields, serialized_body - - @staticmethod - def _verify_response_status(response: api_response.ApiResponse): - if not 200 <= response.response.status <= 399: - raise exceptions.ApiException( - status=response.response.status, - reason=response.response.reason, - api_response=response - ) - - -class SerializedRequestBody(typing.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[rest.RequestField, ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType schemas.Schema info - """ - __json_encoder = JSONEncoder() - __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} - content: typing.Dict[str, typing.Type[MediaType]] - required: bool = False - - @classmethod - def __serialize_json( - cls, - in_data: _JSON_TYPES - ) -> SerializedRequestBody: - in_data = cls.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return {'body': json_str} - - @staticmethod - def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: - return {'body': str(in_data)} - - @classmethod - def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: - json_value = cls.__json_encoder.default(value) - request_field = rest.RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - @classmethod - def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: - if isinstance(value, str): - request_field = rest.RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = rest.RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, schemas.FileIO): - # TODO use content.encoding to limit allowed content types if they are present - urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(rest.RequestField, urllib3_request_field) - value.close() - else: - request_field = cls.__multipart_json_item(key=key, value=value) - return request_field - - @classmethod - def __serialize_multipart_form_data( - cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] - ) -> SerializedRequestBody: - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a rest.RequestField for each item with name=key - for item in value: - request_field = cls.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore - fields.append(request_field) - else: - request_field = cls.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return {'fields': tuple(fields)} - - @staticmethod - def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: - if isinstance(in_data, bytes): - return {'body': in_data} - # schemas.FileIO type - used_in_data = in_data.read() - in_data.close() - return {'body': used_in_data} - - @classmethod - def __serialize_application_x_www_form_data( - cls, in_data: schemas.immutabledict[str, _JSON_TYPES] - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - cast_in_data = cls.__json_encoder.default(in_data) - value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return {'body': value} - - @classmethod - def serialize( - cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = cls.content[content_type] - assert media_type.schema is not None - schema = schemas.get_class(media_type.schema) - used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() - cast_in_data = schema.validate_base(in_data, configuration=used_configuration) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if cls._content_type_is_json(content_type): - if isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") - return cls.__serialize_json(cast_in_data) - elif content_type in cls.__plain_txt_content_types: - if not isinstance(cast_in_data, (int, float, str)): - raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") - return cls.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") - return cls.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError( - f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") - return cls.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - if not isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") - return cls.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/api_response.py b/samples/client/openapi_features/security/python/src/openapi_client/api_response.py deleted file mode 100644 index 049176b5b07..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/api_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -import urllib3 - -from this_package import schemas - - -@dataclasses.dataclass(frozen=True) -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] - headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] - - -@dataclasses.dataclass(frozen=True) -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py deleted file mode 100644 index 548a81961cc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/path_to_api.py +++ /dev/null @@ -1,26 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.paths.path_with_no_explicit_security import PathWithNoExplicitSecurity -from openapi_client.apis.paths.path_with_one_explicit_security import PathWithOneExplicitSecurity -from openapi_client.apis.paths.path_with_security_from_root import PathWithSecurityFromRoot -from openapi_client.apis.paths.path_with_two_explicit_security import PathWithTwoExplicitSecurity - -PathToApi = typing.TypedDict( - 'PathToApi', - { - "/pathWithNoExplicitSecurity": typing.Type[PathWithNoExplicitSecurity], - "/pathWithOneExplicitSecurity": typing.Type[PathWithOneExplicitSecurity], - "/pathWithSecurityFromRoot": typing.Type[PathWithSecurityFromRoot], - "/pathWithTwoExplicitSecurity": typing.Type[PathWithTwoExplicitSecurity], - } -) - -path_to_api = PathToApi( - { - "/pathWithNoExplicitSecurity": PathWithNoExplicitSecurity, - "/pathWithOneExplicitSecurity": PathWithOneExplicitSecurity, - "/pathWithSecurityFromRoot": PathWithSecurityFromRoot, - "/pathWithTwoExplicitSecurity": PathWithTwoExplicitSecurity, - } -) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py deleted file mode 100644 index cf241d055c1..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py deleted file mode 100644 index 7161d98bdd4..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_no_explicit_security.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.path_with_no_explicit_security.get.operation import ApiForGet - - -class PathWithNoExplicitSecurity( - ApiForGet, -): - pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py deleted file mode 100644 index 32583ac9253..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_one_explicit_security.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.path_with_one_explicit_security.get.operation import ApiForGet - - -class PathWithOneExplicitSecurity( - ApiForGet, -): - pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py deleted file mode 100644 index 0371b1e8dcd..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_security_from_root.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.path_with_security_from_root.get.operation import ApiForGet - - -class PathWithSecurityFromRoot( - ApiForGet, -): - pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py deleted file mode 100644 index 180a7ff058f..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/paths/path_with_two_explicit_security.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.path_with_two_explicit_security.get.operation import ApiForGet - - -class PathWithTwoExplicitSecurity( - ApiForGet, -): - pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py deleted file mode 100644 index 00e34b097d3..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/tag_to_api.py +++ /dev/null @@ -1,17 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.tags.default_api import DefaultApi - -TagToApi = typing.TypedDict( - 'TagToApi', - { - "default": typing.Type[DefaultApi], - } -) - -tag_to_api = TagToApi( - { - "default": DefaultApi, - } -) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py deleted file mode 100644 index f3c38f014ce..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py b/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py deleted file mode 100644 index 50f432dbc18..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/apis/tags/default_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.path_with_security_from_root.get.operation import PathWithSecurityFromRoot -from openapi_client.paths.path_with_two_explicit_security.get.operation import PathWithTwoExplicitSecurity -from openapi_client.paths.path_with_one_explicit_security.get.operation import PathWithOneExplicitSecurity -from openapi_client.paths.path_with_no_explicit_security.get.operation import PathWithNoExplicitSecurity - - -class DefaultApi( - PathWithSecurityFromRoot, - PathWithTwoExplicitSecurity, - PathWithOneExplicitSecurity, - PathWithNoExplicitSecurity, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py deleted file mode 100644 index 31197d997c1..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/components/schemas/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from this_package.components.schema.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py deleted file mode 100644 index 36ecd2a56f5..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class ApiKey(security_schemes.ApiKeySecurityScheme): - ''' - apiKey in header - ''' - name: str = "api_key" - in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.HEADER diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py deleted file mode 100644 index 5c04e9ea955..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class BearerTest(security_schemes.HTTPBearerSecurityScheme): - ''' - http bearer with JWT bearer format - ''' - bearer_format = "JWT" diff --git a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py b/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py deleted file mode 100644 index 206b6a78ee3..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class HttpBasicTest(security_schemes.HTTPBasicSecurityScheme): - ''' - http basic - ''' diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py deleted file mode 100644 index 2a6fb032a55..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/configurations/api_configuration.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing -import typing_extensions - -import urllib3 - -from this_package import exceptions -from this_package import security_schemes -from this_package.components.security_schemes import security_scheme_api_key -from this_package.components.security_schemes import security_scheme_bearer_test -from this_package.components.security_schemes import security_scheme_http_basic_test -from this_package.servers import server_0 - -# security scheme key identifier to security scheme instance -SecuritySchemeInfo = typing.TypedDict( - 'SecuritySchemeInfo', - { - "api_key": security_scheme_api_key.ApiKey, - "bearer_test": security_scheme_bearer_test.BearerTest, - "http_basic_test": security_scheme_http_basic_test.HttpBasicTest, - }, - total=False -) - - -class SecurityIndexInfoRequired(typing.TypedDict): - security: typing.Literal[0, 1, 2, 3] - -SecurityIndexInfoOptional = typing.TypedDict( - 'SecurityIndexInfoOptional', - { - "paths//pathWithOneExplicitSecurity/get/security": typing.Literal[0], - "paths//pathWithTwoExplicitSecurity/get/security": typing.Literal[0, 1], - }, - total=False -) - - -class SecurityIndexInfo(SecurityIndexInfoRequired, SecurityIndexInfoOptional): - """ - the default security_index to use at each openapi document json path - the fallback value is stored in the 'security' key - """ - -# the server to use at each openapi document json path -ServerInfo = typing.TypedDict( - 'ServerInfo', - { - 'servers/0': server_0.Server0, - }, - total=False -) - - -class ServerIndexInfoRequired(typing.TypedDict): - servers: typing.Literal[0] - -ServerIndexInfoOptional = typing.TypedDict( - 'ServerIndexInfoOptional', - { - }, - total=False -) - - -class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): - """ - the default server_index to use at each openapi document json path - the fallback value is stored in the 'servers' key - """ - - -class ApiConfiguration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param security_scheme_info: the security scheme auth info that can be used when calling endpoints - The key is a string that identifies the component security scheme that one is adding auth info for - The value is an instance of the component security scheme class for that security scheme - See the SecuritySchemeInfo TypedDict definition - :param security_index_info: path to security_index information - :param server_info: the servers that can be used to make endpoint calls - :param server_index_info: index to servers configuration - """ - - def __init__( - self, - security_scheme_info: typing.Optional[SecuritySchemeInfo] = None, - security_index_info: typing.Optional[SecurityIndexInfo] = None, - server_info: typing.Optional[ServerInfo] = None, - server_index_info: typing.Optional[ServerIndexInfo] = None, - ): - """Constructor - """ - # Authentication Settings - self.security_scheme_info: SecuritySchemeInfo = security_scheme_info or SecuritySchemeInfo() - self.security_index_info: SecurityIndexInfo = security_index_info or {'security': 0} - # Server Info - self.server_info: ServerInfo = server_info or { - 'servers/0': server_0.Server0(), - } - self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("this_package") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_server_url( - self, - key_prefix: typing.Literal[ - "servers", - ], - index: typing.Optional[int], - ) -> str: - """Gets host URL based on the index - :param index: array index of the host settings - :return: URL based on host settings - """ - if index: - used_index = index - else: - try: - used_index = self.server_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.server_index_info.get("servers", 0) - server_info_key = typing.cast( - typing.Literal[ - "servers/0", - ], - f"{key_prefix}/{used_index}" - ) - try: - server = self.server_info[server_info_key] - except KeyError as ex: - raise ex - return server.url - - def get_security_requirement_object( - self, - key_prefix: typing.Literal[ - "security", - "paths//pathWithOneExplicitSecurity/get/security", - "paths//pathWithTwoExplicitSecurity/get/security", - ], - security_requirement_objects: typing.List[security_schemes.SecurityRequirementObject], - index: typing.Optional[int], - ) -> security_schemes.SecurityRequirementObject: - """Gets security_schemes.SecurityRequirementObject based on the index - :param index: array index of the SecurityRequirementObject - :return: the selected security_schemes.SecurityRequirementObject - """ - if index: - used_index = index - else: - try: - used_index = self.security_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.security_index_info.get("security", 0) - return security_requirement_objects[used_index] diff --git a/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py deleted file mode 100644 index 6cccef59809..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/configurations/schema_configuration.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -from this_package import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'additional_properties': 'additionalProperties', - 'all_of': 'allOf', - 'any_of': 'anyOf', - 'const_value_to_name': 'const', - 'contains': 'contains', - 'dependent_required': 'dependentRequired', - 'dependent_schemas': 'dependentSchemas', - 'discriminator': 'discriminator', - # default omitted because it has no validation impact - 'else_': 'else', - 'enum_value_to_name': 'enum', - 'exclusive_maximum': 'exclusiveMaximum', - 'exclusive_minimum': 'exclusiveMinimum', - 'format': 'format', - 'if_': 'if', - 'inclusive_maximum': 'maximum', - 'inclusive_minimum': 'minimum', - 'items': 'items', - 'max_contains': 'maxContains', - 'max_items': 'maxItems', - 'max_length': 'maxLength', - 'max_properties': 'maxProperties', - 'min_contains': 'minContains', - 'min_items': 'minItems', - 'min_length': 'minLength', - 'min_properties': 'minProperties', - 'multiple_of': 'multipleOf', - 'not_': 'not', - 'one_of': 'oneOf', - 'pattern': 'pattern', - 'pattern_properties': 'patternProperties', - 'prefix_items': 'prefixItems', - 'properties': 'properties', - 'property_names': 'propertyNames', - 'required': 'required', - 'then': 'then', - 'types': 'type', - 'unique_items': 'uniqueItems', - 'unevaluated_items': 'unevaluatedItems', - 'unevaluated_properties': 'unevaluatedProperties' -} - -class SchemaConfiguration: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - """ - - def __init__( - self, - disabled_json_schema_keywords = set(), - ): - """Constructor - """ - self.disabled_json_schema_keywords = disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py b/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py deleted file mode 100644 index c3cc97e49c5..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/exceptions.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -from this_package import api_response - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - -T = typing.TypeVar('T', bound=api_response.ApiResponse) - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: typing.Optional[str] = None - api_response: typing.Optional[T] = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.api_response: - if self.api_response.response.headers: - error_message += "HTTP response headers: {0}\n".format( - self.api_response.response.headers) - if self.api_response.response.data: - error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) - - return error_message diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py deleted file mode 100644 index 2c2c9cc4bdc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis import path_to_api diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py deleted file mode 100644 index 119b3694283..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.path_with_no_explicit_security import PathWithNoExplicitSecurity - -path = "/pathWithNoExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py deleted file mode 100644 index 4ab6ba787c4..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/operation.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _path_with_no_explicit_security( - self, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _path_with_no_explicit_security( - self, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _path_with_no_explicit_security( - self, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - path with no explicit security - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PathWithNoExplicitSecurity(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - path_with_no_explicit_security = BaseApi._path_with_no_explicit_security - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._path_with_no_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py deleted file mode 100644 index aab0cfbdecc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py deleted file mode 100644 index 895c607d7a3..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.path_with_one_explicit_security import PathWithOneExplicitSecurity - -path = "/pathWithOneExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py deleted file mode 100644 index 3f699f63bb1..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/operation.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .security import security_requirement_object_0 - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _path_with_one_explicit_security( - self, - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _path_with_one_explicit_security( - self, - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _path_with_one_explicit_security( - self, - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - path with one explicit security - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pathWithOneExplicitSecurity/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PathWithOneExplicitSecurity(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - path_with_one_explicit_security = BaseApi._path_with_one_explicit_security - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._path_with_one_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py deleted file mode 100644 index aab0cfbdecc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py deleted file mode 100644 index 825bd466db0..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py deleted file mode 100644 index b0b9b9143f5..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.path_with_security_from_root import PathWithSecurityFromRoot - -path = "/pathWithSecurityFromRoot" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py deleted file mode 100644 index 14090a6ffd2..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/operation.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from openapi_client.security import ( - security_requirement_object_0, - security_requirement_object_1, - security_requirement_object_2, - security_requirement_object_3, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, - security_requirement_object_2.security_requirement_object, - security_requirement_object_3.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _path_with_security_from_root( - self, - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _path_with_security_from_root( - self, - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _path_with_security_from_root( - self, - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - path with security from root - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PathWithSecurityFromRoot(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - path_with_security_from_root = BaseApi._path_with_security_from_root - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._path_with_security_from_root diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py deleted file mode 100644 index aab0cfbdecc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py deleted file mode 100644 index acc37036200..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.path_with_two_explicit_security import PathWithTwoExplicitSecurity - -path = "/pathWithTwoExplicitSecurity" \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py deleted file mode 100644 index 5c7ba4b8f39..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/operation.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .security import ( - security_requirement_object_0, - security_requirement_object_1, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _path_with_two_explicit_security( - self, - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _path_with_two_explicit_security( - self, - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _path_with_two_explicit_security( - self, - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - path with two explicit security - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pathWithTwoExplicitSecurity/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PathWithTwoExplicitSecurity(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - path_with_two_explicit_security = BaseApi._path_with_two_explicit_security - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._path_with_two_explicit_security diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py deleted file mode 100644 index aab0cfbdecc..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py deleted file mode 100644 index 825bd466db0..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py b/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py deleted file mode 100644 index 43650240018..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "bearer_test": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/py.typed b/samples/client/openapi_features/security/python/src/openapi_client/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/rest.py b/samples/client/openapi_features/security/python/src/openapi_client/rest.py deleted file mode 100644 index bae5ccf2b84..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/rest.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi # type: ignore[import] -import urllib3 -from urllib3 import fields -from urllib3 import exceptions as urllib3_exceptions -from urllib3._collections import HTTPHeaderDict - -from this_package import exceptions - - -logger = logging.getLogger(__name__) -_TYPE_FIELD_VALUE = typing.Union[str, bytes] - - -class RequestField(fields.RequestField): - def __init__( - self, - name: str, - data: _TYPE_FIELD_VALUE, - filename: typing.Optional[str] = None, - headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, - header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, - ): - super().__init__(name, data, filename, headers, header_formatter) # type: ignore - - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise exceptions.ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - headers = headers or HTTPHeaderDict() - - used_timeout: typing.Optional[urllib3.Timeout] = None - if timeout: - if isinstance(timeout, (int, float)): - used_timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=used_timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - encode_multipart=False, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise exceptions.ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - except urllib3_exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise exceptions.ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def get(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def head(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def options(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def delete(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def post(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def put(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def patch(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py deleted file mode 100644 index 5b34ff5718e..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -import typing_extensions - -from .schema import ( - get_class, - none_type_, - classproperty, - Bool, - FileIO, - Schema, - SingletonMeta, - AnyTypeSchema, - UnsetAnyTypeSchema, - INPUT_TYPES_ALL -) - -from .schemas import ( - ListSchema, - NoneSchema, - NumberSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - StrSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BytesSchema, - FileSchema, - BinarySchema, - BoolSchema, - NotAnyTypeSchema, - OUTPUT_BASE_TYPES, - DictSchema -) -from .validation import ( - PatternInfo, - ValidationMetadata, - immutabledict -) -from .format import ( - as_date, - as_datetime, - as_decimal, - as_uuid -) - -def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore - res = {} - for key, val in t_dict.__annotations__.items(): - if isinstance(val, typing._GenericAlias): # type: ignore - # typing.Type[W] -> W - val_cls = typing.get_args(val)[0] - res[key] = val_cls - return res - -X = typing.TypeVar('X', bound=typing.Tuple) - -def tuple_to_instance(tup: typing.Type[X]) -> X: - res = [] - for arg in typing.get_args(tup): - if isinstance(arg, typing._GenericAlias): # type: ignore - # typing.Type[Schema] -> Schema - arg_cls = typing.get_args(arg)[0] - res.append(arg_cls) - return tuple(res) # type: ignore - - -class Unset: - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset: Unset = Unset() - -def key_unknown_error_msg(key: str) -> str: - return (f"Invalid key. The key {key} is not a known key in this payload. " - "If this key is an additional property, use get_additional_property_" - ) - -def raise_if_key_known( - key: str, - required_keys: typing.FrozenSet[str], - optional_keys: typing.FrozenSet[str] -): - if key in required_keys or key in optional_keys: - raise ValueError(f"The key {key} is a known property, use get_property to access its value") - -__all__ = [ - 'get_class', - 'none_type_', - 'classproperty', - 'Bool', - 'FileIO', - 'Schema', - 'SingletonMeta', - 'AnyTypeSchema', - 'UnsetAnyTypeSchema', - 'INPUT_TYPES_ALL', - 'ListSchema', - 'NoneSchema', - 'NumberSchema', - 'IntSchema', - 'Int32Schema', - 'Int64Schema', - 'Float32Schema', - 'Float64Schema', - 'StrSchema', - 'UUIDSchema', - 'DateSchema', - 'DateTimeSchema', - 'DecimalSchema', - 'BytesSchema', - 'FileSchema', - 'BinarySchema', - 'BoolSchema', - 'NotAnyTypeSchema', - 'OUTPUT_BASE_TYPES', - 'DictSchema', - 'PatternInfo', - 'ValidationMetadata', - 'immutabledict', - 'as_date', - 'as_datetime', - 'as_decimal', - 'as_uuid', - 'typed_dict_to_instance', - 'tuple_to_instance', - 'Unset', - 'unset', - 'key_unknown_error_msg', - 'raise_if_key_known' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py deleted file mode 100644 index bb614903b82..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/format.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -import decimal -import functools -import typing -import uuid - -from dateutil import parser, tz - - -class CustomIsoparser(parser.isoparser): - def __init__(self, sep: typing.Optional[str] = None): - """ - :param sep: - A single character that separates date and time portions. If - ``None``, the parser will accept any single character. - For strict ISO-8601 adherence, pass ``'T'``. - """ - if sep is not None: - if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): - raise ValueError('Separator must be a single, non-numeric ' + - 'ASCII character') - - used_sep = sep.encode('ascii') - else: - used_sep = None - - self._sep = used_sep - - @staticmethod - def __get_ascii_bytes(str_in: str) -> bytes: - # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII - # ASCII is the same in UTF-8 - try: - return str_in.encode('ascii') - except UnicodeEncodeError as e: - msg = 'ISO-8601 strings should contain only ASCII characters' - raise ValueError(msg) from e - - def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isodate(dt_str_ascii) # type: ignore - values = typing.cast(typing.Tuple[typing.List[int], int], values) - components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) - pos = values[1] - return components, pos - - def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isotime(dt_str_ascii) # type: ignore - components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore - return components - - def parse_isodatetime(self, dt_str: str) -> datetime.datetime: - date_components, pos = self.__parse_isodate(dt_str) - if len(dt_str) <= pos: - # len(components) <= 3 - raise ValueError('Value is not a datetime') - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) - if hour == 24: - hour = 0 - components = (*date_components, hour, minute, second, microsecond, tzinfo) - return datetime.datetime(*components) + datetime.timedelta(days=1) - else: - components = (*date_components, hour, minute, second, microsecond, tzinfo) - else: - raise ValueError('String contains unknown ISO components') - - return datetime.datetime(*components) - - def parse_isodate_str(self, datestr: str) -> datetime.date: - components, pos = self.__parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return datetime.date(*components) - -DEFAULT_ISOPARSER = CustomIsoparser() - -@functools.lru_cache() -def as_date(arg: str) -> datetime.date: - """ - type = "string" - format = "date" - """ - return DEFAULT_ISOPARSER.parse_isodate_str(arg) - -@functools.lru_cache() -def as_datetime(arg: str) -> datetime.datetime: - """ - type = "string" - format = "date-time" - """ - return DEFAULT_ISOPARSER.parse_isodatetime(arg) - -@functools.lru_cache() -def as_decimal(arg: str) -> decimal.Decimal: - """ - Applicable when storing decimals that are sent over the wire as strings - type = "string" - format = "number" - """ - return decimal.Decimal(arg) - -@functools.lru_cache() -def as_uuid(arg: str) -> uuid.UUID: - """ - type = "string" - format = "uuid" - """ - return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py deleted file mode 100644 index 3897e140a4a..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/original_immutabledict.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -MIT License - -Copyright (c) 2020 Corentin Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -""" -from __future__ import annotations -import typing -import typing_extensions - -_K = typing.TypeVar("_K") -_V = typing.TypeVar("_V", covariant=True) - - -class immutabledict(typing.Mapping[_K, _V]): - """ - An immutable wrapper around dictionaries that implements - the complete :py:class:`collections.Mapping` interface. - It can be used as a drop-in replacement for dictionaries - where immutability is desired. - - Note: custom version of this class made to remove __init__ - """ - - dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict - _dict: typing.Dict[_K, _V] - _hash: typing.Optional[int] - - @classmethod - def fromkeys( - cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None - ) -> "immutabledict[_K, _V]": - return cls(dict.fromkeys(seq, value)) - - def __new__(cls, *args: typing.Any) -> typing_extensions.Self: - inst = super().__new__(cls) - setattr(inst, '_dict', cls.dict_cls(*args)) - setattr(inst, '_hash', None) - return inst - - def __getitem__(self, key: _K) -> _V: - return self._dict[key] - - def __contains__(self, key: object) -> bool: - return key in self._dict - - def __iter__(self) -> typing.Iterator[_K]: - return iter(self._dict) - - def __len__(self) -> int: - return len(self._dict) - - def __repr__(self) -> str: - return "%s(%r)" % (self.__class__.__name__, self._dict) - - def __hash__(self) -> int: - if self._hash is None: - h = 0 - for key, value in self.items(): - h ^= hash((key, value)) - self._hash = h - - return self._hash - - def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(self) - new.update(other) - return self.__class__(new) - - def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(other) - new.update(self) - return new - - def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: - raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py deleted file mode 100644 index e593c90b1d7..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schema.py +++ /dev/null @@ -1,729 +0,0 @@ -from __future__ import annotations -import datetime -import dataclasses -import io -import types -import typing -import uuid - -import functools -import typing_extensions - -from this_package import exceptions -from this_package.configurations import schema_configuration - -from . import validation - -_T_co = typing.TypeVar("_T_co", covariant=True) - - -class SequenceNotStr(typing.Protocol[_T_co]): - """ - if a Protocol would define the interface of Sequence, this protocol - would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence - methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection - """ - def __contains__(self, value: object, /) -> bool: - raise NotImplementedError - - def __getitem__(self, index, /): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError - - def __iter__(self) -> typing.Iterator[_T_co]: - raise NotImplementedError - - def __reversed__(self, /) -> typing.Iterator[_T_co]: - raise NotImplementedError - -none_type_ = type(None) -T = typing.TypeVar('T', bound=typing.Mapping) -U = typing.TypeVar('U', bound=SequenceNotStr) -W = typing.TypeVar('W') - - -class SchemaTyped: - additional_properties: typing.Type[Schema] - all_of: typing.Tuple[typing.Type[Schema], ...] - any_of: typing.Tuple[typing.Type[Schema], ...] - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] - default: typing.Union[str, int, float, bool, None] - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] - exclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - format: str - inclusive_maximum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - items: typing.Type[Schema] - max_items: int - max_length: int - max_properties: int - min_items: int - min_length: int - min_properties: int - multiple_of: typing.Union[int, float] - not_: typing.Type[Schema] - one_of: typing.Tuple[typing.Type[Schema], ...] - pattern: validation.PatternInfo - properties: typing.Mapping[str, typing.Type[Schema]] - required: typing.FrozenSet[str] - types: typing.FrozenSet[typing.Type] - unique_items: bool - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: - raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore - super(FileIO, inst).__init__(arg.name) - return inst - raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): - """ - Needed for instantiation when passing in arguments of the above type - """ - pass - - -class classproperty(typing.Generic[W]): - def __init__(self, method: typing.Callable[..., W]): - self.__method = method - functools.update_wrapper(self, method) # type: ignore - - def __get__(self, obj, cls=None) -> W: - if cls is None: - cls = type(obj) - return self.__method(cls) - - -class Bool: - _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} - """ - This class is needed to replace bool during validation processing - json schema requires that 0 != False and 1 != True - python implementation defines 0 == False and 1 == True - To meet the json schema requirements, all bool instances are replaced with Bool singletons - during validation only, and then bool values are returned from validation - """ - - def __new__(cls, arg_: bool, **kwargs): - """ - Method that implements singleton - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, arg_) - if key not in cls._instances: - inst = super().__new__(cls) - cls._instances[key] = inst - return cls._instances[key] - - def __repr__(self): - if bool(self): - return f'' - return f'' - - @classproperty - def TRUE(cls): - return cls(True) # type: ignore - - @classproperty - def FALSE(cls): - return cls(False) # type: ignore - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -def cast_to_allowed_types( - arg: typing.Union[ - dict, - validation.immutabledict, - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - ], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] -) -> typing.Union[ - validation.immutabledict, - tuple, - float, - int, - str, - bytes, - Bool, - None, - FileIO -]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - path_to_type[path_to_item] = str - return str(arg) - elif isinstance(arg, (dict, validation.immutabledict)): - path_to_type[path_to_item] = validation.immutabledict - return validation.immutabledict( - { - key: cast_to_allowed_types( - val, - from_server, - validated_path_to_schemas, - path_to_item + (key,), - path_to_type, - ) - for key, val in arg.items() - } - ) - elif isinstance(arg, bool): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - path_to_type[path_to_item] = Bool - if arg: - return Bool.TRUE - return Bool.FALSE - elif isinstance(arg, int): - path_to_type[path_to_item] = int - return arg - elif isinstance(arg, float): - path_to_type[path_to_item] = float - return arg - elif isinstance(arg, (tuple, list)): - path_to_type[path_to_item] = tuple - return tuple( - [ - cast_to_allowed_types( - item, - from_server, - validated_path_to_schemas, - path_to_item + (i,), - path_to_type, - ) - for i, item in enumerate(arg) - ] - ) - elif arg is None: - path_to_type[path_to_item] = type(None) - return None - elif isinstance(arg, (datetime.date, datetime.datetime)): - path_to_type[path_to_item] = str - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - path_to_type[path_to_item] = str - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, bytes): - path_to_type[path_to_item] = bytes - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - path_to_type[path_to_item] = FileIO - return FileIO(arg) - raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class SingletonMeta(type): - """ - A singleton class for schemas - Schemas are frozen classes that are never instantiated with init args - All args come from defaults - """ - _instances: typing.Dict[type, typing.Any] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super().__call__(*args, **kwargs) - return cls._instances[cls] - - -class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): - - @classmethod - def __get_path_to_schemas( - cls, - arg, - validation_metadata: validation.ValidationMetadata, - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: - """ - Run all validations in the json schema and return a dict of - json schema to tuple of validated schemas - """ - _path_to_schemas: validation.PathToSchemasType = {} - if validation_metadata.validation_ran_earlier(cls): - validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) - validation.update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} - for path, schema_classes in _path_to_schemas.items(): - schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) - path_to_schemas[path] = schema - """ - For locations that validation did not check - the code still needs to store type + schema information for instantiation - All of those schemas will be UnsetAnyTypeSchema - """ - missing_paths = path_to_type.keys() - path_to_schemas.keys() - for missing_path in missing_paths: - path_to_schemas[missing_path] = UnsetAnyTypeSchema - - return path_to_schemas - - @staticmethod - def __get_items( - arg: tuple, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - ''' - Schema __get_items - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return tuple(cast_items) - - @staticmethod - def __get_properties( - arg: validation.immutabledict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - """ - Schema __get_properties, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return validation.immutabledict(dict_items) - - @classmethod - def _get_new_instance_without_conversion( - cls, - arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - # We have a Dynamic class and we are making an instance of it - if isinstance(arg, validation.immutabledict): - used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) - elif isinstance(arg, tuple): - used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) - elif isinstance(arg, Bool): - return bool(arg) - else: - """ - str, int, float, FileIO, bytes - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return arg - arg_type = type(arg) - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is None: - return used_arg - if arg_type not in type_to_output_cls: - return used_arg - output_cls = type_to_output_cls[arg_type] - if arg_type is tuple: - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(U, inst) - return inst - assert issubclass(output_cls, validation.immutabledict) - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(T, inst) - return inst - - @typing.overload - @classmethod - def validate_base( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate_base( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - """ - Schema validate_base - - Args: - arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value - configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords - like minItems, minLength etc - """ - if isinstance(arg, (tuple, validation.immutabledict)): - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is not None: - for output_cls in type_to_output_cls.values(): - if isinstance(arg, output_cls): - # U + T use case, don't run validations twice - return arg - - from_server = False - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] - ] = {} - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} - cast_arg = cast_to_allowed_types( - arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = validation.ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) - return cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas, - ) - - @classmethod - def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: - type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) - type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) - return type_to_output_cls - - -def get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[Schema]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - return item_cls._evaluate(None, local_namespace) - raise ValueError('invalid class value passed in') - - -@dataclasses.dataclass(frozen=True) -class AnyTypeSchema(Schema[T, U]): - # Python representation of a schema defined as true or {} - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return cls.validate_base( - arg, - configuration=configuration - ) - -class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - -INPUT_TYPES_ALL = typing.Union[ - dict, - validation.immutabledict, - typing.Mapping[str, object], # for TypedDict - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - FileIO -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py deleted file mode 100644 index 27a275a6247..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/schemas.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import datetime -import dataclasses -import io -import typing -import uuid - -import typing_extensions - -from this_package.configurations import schema_configuration - -from . import schema, validation - - -@dataclasses.dataclass(frozen=True) -class ListSchema(schema.Schema[validation.immutabledict, tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schema.INPUT_TYPES_ALL], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Tuple[schema.INPUT_TYPES_ALL, ...], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NoneSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) - - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NumberSchema(schema.Schema): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - types: typing.FrozenSet[typing.Type] = frozenset({float, int}) - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class IntSchema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int' - - -@dataclasses.dataclass(frozen=True) -class Int32Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int32' - - -@dataclasses.dataclass(frozen=True) -class Int64Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int64' - - -@dataclasses.dataclass(frozen=True) -class Float32Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'float' - - -@dataclasses.dataclass(frozen=True) -class Float64Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'double' - - -@dataclasses.dataclass(frozen=True) -class StrSchema(schema.Schema): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - types: typing.FrozenSet[typing.Type] = frozenset({str}) - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class UUIDSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'uuid' - - @classmethod - def validate( - cls, - arg: typing.Union[str, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateTimeSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date-time' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.datetime], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DecimalSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'number' - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class BytesSchema(schema.Schema): - """ - this class will subclass bytes and is immutable - """ - types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class FileSchema(schema.Schema): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.FileIO: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BinarySchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) - format: str = 'binary' - - one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( - BytesSchema, - FileSchema, - ) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader, bytes], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[schema.FileIO, bytes]: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BoolSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NotAnyTypeSchema(schema.AnyTypeSchema): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - not_: typing.Type[schema.Schema] = schema.AnyTypeSchema - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return super().validate_base(arg, configuration=configuration) - -OUTPUT_BASE_TYPES = typing.Union[ - validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], - str, - int, - float, - bool, - schema.none_type_, - typing.Tuple['OUTPUT_BASE_TYPES', ...], - bytes, - schema.FileIO -] - - -@dataclasses.dataclass(frozen=True) -class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) - - @typing.overload - @classmethod - def validate( - cls, - arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: - return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py b/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py deleted file mode 100644 index 8cba8662fdd..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/schemas/validation.py +++ /dev/null @@ -1,1446 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import collections -import dataclasses -import decimal -import re -import sys -import types -import typing -import uuid - -import typing_extensions - -from this_package import exceptions -from this_package.configurations import schema_configuration - -from . import format, original_immutabledict - -immutabledict = original_immutabledict.immutabledict - - -@dataclasses.dataclass -class ValidationMetadata: - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - path_to_item: typing.Tuple[typing.Union[str, int], ...] - configuration: schema_configuration.SchemaConfiguration - validated_path_to_schemas: typing.Mapping[ - typing.Tuple[typing.Union[str, int], ...], - typing.Mapping[type, None] - ] = dataclasses.field(default_factory=dict) - seen_classes: typing.FrozenSet[type] = frozenset() - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) - if validated_schemas and cls in validated_schemas: - return True - if cls in self.seen_classes: - return True - return False - -def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise exceptions.ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class SchemaValidator: - __excluded_cls_properties = { - '__module__', - '__dict__', - '__weakref__', - '__doc__', - '__annotations__', - 'default', # excluded because it has no impact on validation - 'type_to_output_cls', # used to pluck the output class for instantiation - } - - @classmethod - def _validate( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> PathToSchemasType: - """ - SchemaValidator validate - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - """ - cls_schema = cls() - json_schema_data = { - k: v - for k, v in vars(cls_schema).items() - if k not in cls.__excluded_cls_properties - and k - not in validation_metadata.configuration.disabled_json_schema_python_keywords - } - contains_path_to_schemas = [] - path_to_schemas: PathToSchemasType = {} - if 'contains' in vars(cls_schema): - contains_path_to_schemas = _get_contains_path_to_schemas( - arg, - vars(cls_schema)['contains'], - validation_metadata, - path_to_schemas - ) - if_path_to_schemas = None - if 'if_' in vars(cls_schema): - if_path_to_schemas = _get_if_path_to_schemas( - arg, - vars(cls_schema)['if_'], - validation_metadata, - ) - validated_pattern_properties: typing.Optional[PathToSchemasType] = None - if 'pattern_properties' in vars(cls_schema): - validated_pattern_properties = _get_validated_pattern_properties( - arg, - vars(cls_schema)['pattern_properties'], - cls, - validation_metadata - ) - prefix_items_length = 0 - if 'prefix_items' in vars(cls_schema): - prefix_items_length = len(vars(cls_schema)['prefix_items']) - for keyword, val in json_schema_data.items(): - used_val: typing.Any - if keyword in {'contains', 'min_contains', 'max_contains'}: - used_val = (val, contains_path_to_schemas) - elif keyword == 'items': - used_val = (val, prefix_items_length) - elif keyword in {'unevaluated_items', 'unevaluated_properties'}: - used_val = (val, path_to_schemas) - elif keyword in {'types'}: - format: typing.Optional[str] = vars(cls_schema).get('format', None) - used_val = (val, format) - elif keyword in {'pattern_properties', 'additional_properties'}: - used_val = (val, validated_pattern_properties) - elif keyword in {'if_', 'then', 'else_'}: - used_val = (val, if_path_to_schemas) - else: - used_val = val - validator = json_schema_keyword_to_validator[keyword] - - other_path_to_schemas = validator( - arg, - used_val, - cls, - validation_metadata, - ) - if other_path_to_schemas: - update(path_to_schemas, other_path_to_schemas) - - base_class = type(arg) - if validation_metadata.path_to_item not in path_to_schemas: - path_to_schemas[validation_metadata.path_to_item] = dict() - path_to_schemas[validation_metadata.path_to_item][base_class] = None - path_to_schemas[validation_metadata.path_to_item][cls] = None - return path_to_schemas - -PathToSchemasType = typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Dict[ - typing.Union[ - typing.Type[SchemaValidator], - typing.Type[str], - typing.Type[int], - typing.Type[float], - typing.Type[bool], - typing.Type[None], - typing.Type[immutabledict], - typing.Type[tuple] - ], - None - ] -] - -def _get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[SchemaValidator]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - if sys.version_info < (3, 9): - return item_cls._evaluate(None, local_namespace) - return item_cls._evaluate(None, local_namespace, set()) - raise ValueError('invalid class value passed in') - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is collections.defaultdict(dict) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k].update(v) - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def __type_error_message( - var_value=None, var_name=None, valid_classes=None, key_type=None -): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = __get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - -def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = __type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return exceptions.ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternInfo: - pattern: str - flags: typing.Optional[re.RegexFlag] = None - - -def validate_types( - arg: typing.Any, - allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - allowed_types = allowed_types_format[0] - if type(arg) not in allowed_types: - raise __get_type_error( - arg, - validation_metadata.path_to_item, - allowed_types, - key_type=False, - ) - if isinstance(arg, bool) or not isinstance(arg, (int, float)): - return None - format = allowed_types_format[1] - if format and format == 'int' and arg != int(arg): - # there is a json schema test where 1.0 validates as an integer - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - return None - - -def validate_enum( - arg: typing.Any, - enum_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in enum_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) - return None - - -def validate_unique_items( - arg: typing.Any, - unique_items_value: bool, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not unique_items_value or not isinstance(arg, tuple): - return None - if len(arg) == len(set(arg)): - return None - _raise_validation_error_message( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - -def validate_min_items( - arg: typing.Any, - min_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) < min_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=min_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_items( - arg: typing.Any, - max_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) > max_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=max_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_properties( - arg: typing.Any, - min_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) < min_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=min_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_properties( - arg: typing.Any, - max_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) > max_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=max_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_length( - arg: typing.Any, - min_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) < min_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=min_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_length( - arg: typing.Any, - max_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) > max_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=max_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_minimum( - arg: typing.Any, - inclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg < inclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_minimum( - arg: typing.Any, - exclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg <= exclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=exclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_maximum( - arg: typing.Any, - inclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg > inclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_maximum( - arg: typing.Any, - exclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg >= exclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than", - constraint_value=exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - -def validate_multiple_of( - arg: typing.Any, - multiple_of: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if (not (float(arg) / multiple_of).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - _raise_validation_error_message( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_pattern( - arg: typing.Any, - pattern_info: PatternInfo, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item - ) - return None - - -__int32_inclusive_minimum = -2147483648 -__int32_inclusive_maximum = 2147483647 -__int64_inclusive_minimum = -9223372036854775808 -__int64_inclusive_maximum = 9223372036854775807 -__float_inclusive_minimum = -3.4028234663852886e+38 -__float_inclusive_maximum = 3.4028234663852886e+38 -__double_inclusive_minimum = -1.7976931348623157E+308 -__double_inclusive_maximum = 1.7976931348623157E+308 - -def __validate_numeric_format( - arg: typing.Union[int, float], - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value[:3] == 'int': - # there is a json schema test where 1.0 validates as an integer - if arg != int(arg): - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - if format_value == 'int32': - if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - elif format_value == 'int64': - if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - elif format_value in {'float', 'double'}: - if format_value == 'float': - if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - return None - # double - if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - - -def __validate_string_format( - arg: str, - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value == 'uuid': - try: - uuid.UUID(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'number': - try: - decimal.Decimal(arg) - return None - except decimal.InvalidOperation: - raise exceptions.ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date': - try: - format.DEFAULT_ISOPARSER.parse_isodate_str(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date-time': - try: - format.DEFAULT_ISOPARSER.parse_isodatetime(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - return None - - -def validate_format( - arg: typing.Union[str, int, float], - format_value: str, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - # formats work for strings + numbers - if isinstance(arg, (int, float)): - return __validate_numeric_format( - arg, - format_value, - validation_metadata - ) - elif isinstance(arg, str): - return __validate_string_format( - arg, - format_value, - validation_metadata - ) - return None - - -def validate_required( - arg: typing.Any, - required: typing.Set[str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - missing_req_args = required - arg.keys() - if missing_req_args: - missing_required_arguments = list(missing_req_args) - missing_required_arguments.sort() - raise exceptions.ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - return None - - -def validate_items( - arg: typing.Any, - item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - item_cls = _get_class(item_cls_prefix_items_length[0]) - prefix_items_length = item_cls_prefix_items_length[1] - path_to_schemas: PathToSchemasType = {} - for i in range(prefix_items_length, len(arg)): - value = arg[i] - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_properties( - arg: typing.Any, - properties: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - present_properties = {k: v for k, v, in arg.items() if k in properties} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, value in present_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - schema = properties[property_name] - schema = _get_class(schema, module_namespace) - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_additional_properties( - arg: typing.Any, - additional_properties_cls_val_pprops: typing.Tuple[ - typing.Type[SchemaValidator], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - schema = _get_class(additional_properties_cls_val_pprops[0]) - path_to_schemas: PathToSchemasType = {} - cls_schema = cls() - properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} - present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} - validated_pattern_properties = additional_properties_cls_val_pprops[1] - for property_name, value in present_additional_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if validated_pattern_properties and path_to_item in validated_pattern_properties: - continue - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_one_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - oneof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(schema) - continue - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - oneof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - oneof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate oneof_classes - continue - oneof_classes.append(schema) - if not oneof_classes: - raise exceptions.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: - raise exceptions.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 - - -def validate_any_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - anyof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - module_namespace = vars(sys.modules[cls.__module__]) - for schema in classes: - schema = _get_class(schema, module_namespace) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - anyof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - anyof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate anyof_classes - continue - anyof_classes.append(schema) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise exceptions.ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - -def validate_all_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - continue - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_not( - arg: typing.Any, - not_cls: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - not_schema = _get_class(not_cls) - other_path_to_schemas = None - not_exception = exceptions.ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_schema.__name__, - ) - ) - if validation_metadata.validation_ran_earlier(not_schema): - raise not_exception - - try: - other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - return None - - -def __ensure_discriminator_value_present( - disc_property_name: str, - validation_metadata: ValidationMetadata, - arg -): - if disc_property_name not in arg: - # The input data does not contain the discriminator property - raise exceptions.ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - -def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - cls_schema = cls() - if not hasattr(cls_schema, 'discriminator'): - return None - disc = cls_schema.discriminator - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not ( - hasattr(cls_schema, 'all_of') or - hasattr(cls_schema, 'one_of') or - hasattr(cls_schema, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls_schema, 'all_of'): - for allof_cls in cls_schema.all_of: - discriminated_cls = __get_discriminated_class( - allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'one_of'): - for oneof_cls in cls_schema.one_of: - discriminated_cls = __get_discriminated_class( - oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'any_of'): - for anyof_cls in cls_schema.any_of: - discriminated_cls = __get_discriminated_class( - anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -def validate_discriminator( - arg: typing.Any, - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - disc_prop_name = list(discriminator.keys())[0] - __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) - discriminated_cls = __get_discriminated_class( - cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ) - if discriminated_cls is None: - raise exceptions.ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - if discriminated_cls is cls: - """ - Optimistically assume that cls will pass validation - If the code invoked _validate on cls it would infinitely recurse - """ - return None - if validation_metadata.validation_ran_earlier(discriminated_cls): - path_to_schemas: PathToSchemasType = {} - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - return path_to_schemas - updated_vm = ValidationMetadata( - path_to_item=validation_metadata.path_to_item, - configuration=validation_metadata.configuration, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - return discriminated_cls._validate(arg, validation_metadata=updated_vm) - - -def _get_if_path_to_schemas( - arg: typing.Any, - if_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - if_cls = _get_class(if_cls) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = if_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, other_path_to_schemas) - except exceptions.OpenApiException: - pass - return these_path_to_schemas - - -def validate_if( - arg: typing.Any, - if_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = if_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - - if true, then true -> true for whole schema - so validate_then will add if_path_to_schemas data to path_to_schemas - """ - return None - - -def validate_then( - arg: typing.Any, - then_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = then_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - """ - if not if_path_to_schemas: - return None - then_cls = _get_class(then_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = then_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # then False case - raise ex - - -def validate_else( - arg: typing.Any, - else_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = else_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - if if_path_to_schemas: - # skip validation if if_path_to_schemas was true - return None - """ - if is false use case - if_path_to_schemas == {} - """ - else_cls = _get_class(else_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = else_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # else False case - raise ex - - -def _get_contains_path_to_schemas( - arg: typing.Any, - contains_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, - path_to_schemas: PathToSchemasType -) -> typing.List[PathToSchemasType]: - if not isinstance(arg, tuple): - return [] - contains_cls = _get_class(contains_cls) - contains_path_to_schemas = [] - for i, value in enumerate(arg): - these_path_to_schemas: PathToSchemasType = {} - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(contains_cls): - add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) - contains_path_to_schemas.append(these_path_to_schemas) - continue - try: - other_path_to_schemas = contains_cls._validate( - value, validation_metadata=item_validation_metadata) - contains_path_to_schemas.append(other_path_to_schemas) - except exceptions.OpenApiException: - pass - return contains_path_to_schemas - - -def validate_contains( - arg: typing.Any, - contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - many_path_to_schemas = contains_cls_path_to_schemas[1] - if not many_path_to_schemas: - raise exceptions.ApiValueError( - "Validation failed for contains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - these_path_to_schemas: PathToSchemasType = {} - for other_path_to_schema in many_path_to_schemas: - update(these_path_to_schemas, other_path_to_schema) - return these_path_to_schemas - - -def validate_min_contains( - arg: typing.Any, - min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - min_contains = min_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) < min_contains: - raise exceptions.ApiValueError( - "Validation failed for minContains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_max_contains( - arg: typing.Any, - max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - max_contains = max_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) > max_contains: - raise exceptions.ApiValueError( - "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " - "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_const( - arg: typing.Any, - const_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in const_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) - return None - - -def validate_dependent_required( - arg: typing.Any, - dependent_required: typing.Mapping[str, typing.Set[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - for key, keys_that_must_exist in dependent_required.items(): - if key not in arg: - continue - missing_keys = keys_that_must_exist - arg.keys() - if missing_keys: - raise exceptions.ApiValueError( - f"Validation failed for dependentRequired because these_keys={missing_keys} are " - f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" - ) - return None - - -def validate_dependent_schemas( - arg: typing.Any, - dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for key, schema in dependent_schemas.items(): - if key not in arg: - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_property_names( - arg: typing.Any, - property_names_schema: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - module_namespace = vars(sys.modules[cls.__module__]) - property_names_schema = _get_class(property_names_schema, module_namespace) - for key in arg.keys(): - path_to_item = validation_metadata.path_to_item + (key,) - key_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - property_names_schema._validate(key, validation_metadata=key_validation_metadata) - return None - - -def _get_validated_pattern_properties( - arg: typing.Any, - pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, property_value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - for pattern_info, schema in pattern_properties.items(): - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, property_name, flags=flags): - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_pattern_properties( - arg: typing.Any, - pattern_properties_validation_results: typing.Tuple[ - typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - validation_results = pattern_properties_validation_results[1] - return validation_results - - -def validate_prefix_items( - arg: typing.Any, - prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for i, val in enumerate(arg): - if i >= len(prefix_items): - break - schema = _get_class(prefix_items[i], module_namespace) - path_to_item = validation_metadata.path_to_item + (i,) - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_items( - arg: typing.Any, - unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] - for i, val in enumerate(arg): - path_to_item = validation_metadata.path_to_item + (i,) - if path_to_item in validated_path_to_schemas: - continue - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_properties( - arg: typing.Any, - unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] - for property_name, val in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if path_to_item in validated_path_to_schemas: - continue - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] -json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { - 'types': validate_types, - 'enum_value_to_name': validate_enum, - 'unique_items': validate_unique_items, - 'min_items': validate_min_items, - 'max_items': validate_max_items, - 'min_properties': validate_min_properties, - 'max_properties': validate_max_properties, - 'min_length': validate_min_length, - 'max_length': validate_max_length, - 'inclusive_minimum': validate_inclusive_minimum, - 'exclusive_minimum': validate_exclusive_minimum, - 'inclusive_maximum': validate_inclusive_maximum, - 'exclusive_maximum': validate_exclusive_maximum, - 'multiple_of': validate_multiple_of, - 'pattern': validate_pattern, - 'format': validate_format, - 'required': validate_required, - 'items': validate_items, - 'properties': validate_properties, - 'additional_properties': validate_additional_properties, - 'one_of': validate_one_of, - 'any_of': validate_any_of, - 'all_of': validate_all_of, - 'not_': validate_not, - 'discriminator': validate_discriminator, - 'contains': validate_contains, - 'min_contains': validate_min_contains, - 'max_contains': validate_max_contains, - 'const_value_to_name': validate_const, - 'dependent_required': validate_dependent_required, - 'dependent_schemas': validate_dependent_schemas, - 'property_names': validate_property_names, - 'pattern_properties': validate_pattern_properties, - 'prefix_items': validate_prefix_items, - 'unevaluated_items': validate_unevaluated_items, - 'unevaluated_properties': validate_unevaluated_properties, - 'if_': validate_if, - 'then': validate_then, - 'else_': validate_else -} \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py deleted file mode 100644 index 825bd466db0..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py deleted file mode 100644 index 8c7acf580b2..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_basic_test": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py deleted file mode 100644 index bb588d341e4..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_2.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py b/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py deleted file mode 100644 index e264ffe0348..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/security/security_requirement_object_3.py +++ /dev/null @@ -1,15 +0,0 @@ -# coding: utf-8 - -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_basic_test": (), - "api_key": (), -} diff --git a/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py b/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py deleted file mode 100644 index 995189ffe58..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/security_schemes.py +++ /dev/null @@ -1,230 +0,0 @@ -# coding: utf-8 -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import abc -import base64 -import dataclasses -import enum -import typing -import typing_extensions - -from urllib3 import _collections - - -class SecuritySchemeType(enum.Enum): - API_KEY = 'apiKey' - HTTP = 'http' - MUTUAL_TLS = 'mutualTLS' - OAUTH_2 = 'oauth2' - OPENID_CONNECT = 'openIdConnect' - - -class ApiKeyInLocation(enum.Enum): - QUERY = 'query' - HEADER = 'header' - COOKIE = 'cookie' - - -class __SecuritySchemeBase(metaclass=abc.ABCMeta): - @abc.abstractmethod - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - pass - - -@dataclasses.dataclass -class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): - api_key: str # this must be set by the developer - name: str = '' - in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY - type: SecuritySchemeType = SecuritySchemeType.API_KEY - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - if self.in_location is ApiKeyInLocation.COOKIE: - headers.add('Cookie', self.api_key) - elif self.in_location is ApiKeyInLocation.HEADER: - headers.add(self.name, self.api_key) - elif self.in_location is ApiKeyInLocation.QUERY: - # todo add query handling - raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") - return - - -class HTTPSchemeType(enum.Enum): - BASIC = 'basic' - BEARER = 'bearer' - DIGEST = 'digest' - SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ - - -@dataclasses.dataclass -class HTTPBasicSecurityScheme(__SecuritySchemeBase): - user_id: str # user name - password: str - scheme: HTTPSchemeType = HTTPSchemeType.BASIC - encoding: str = 'utf-8' - type: SecuritySchemeType = SecuritySchemeType.HTTP - """ - https://www.rfc-editor.org/rfc/rfc7617.html - """ - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - user_pass = f"{self.user_id}:{self.password}" - b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) - headers.add('Authorization', f"Basic {b64_user_pass.decode()}") - - -@dataclasses.dataclass -class HTTPBearerSecurityScheme(__SecuritySchemeBase): - access_token: str - bearer_format: typing.Optional[str] = None - scheme: HTTPSchemeType = HTTPSchemeType.BEARER - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - headers.add('Authorization', f"Bearer {self.access_token}") - - -@dataclasses.dataclass -class HTTPDigestSecurityScheme(__SecuritySchemeBase): - scheme: HTTPSchemeType = HTTPSchemeType.DIGEST - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class MutualTLSSecurityScheme(__SecuritySchemeBase): - type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class ImplicitOAuthFlow: - authorization_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class TokenUrlOauthFlow: - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class AuthorizationCodeOauthFlow: - authorization_url: str - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class OAuthFlows: - implicit: typing.Optional[ImplicitOAuthFlow] = None - password: typing.Optional[TokenUrlOauthFlow] = None - client_credentials: typing.Optional[TokenUrlOauthFlow] = None - authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None - - -class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): - flows: OAuthFlows - type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OAuth2SecurityScheme not yet implemented") - - -class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): - openid_connect_url: str - type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") - -""" -Key is the Security scheme class -Value is the list of scopes -""" -SecurityRequirementObject = typing.TypedDict( - 'SecurityRequirementObject', - { - 'api_key': typing.Tuple[str, ...], - 'bearer_test': typing.Tuple[str, ...], - 'http_basic_test': typing.Tuple[str, ...], - }, - total=False -) \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/server.py b/samples/client/openapi_features/security/python/src/openapi_client/server.py deleted file mode 100644 index ed9566b28c3..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/server.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import dataclasses -import typing - -from this_package.schemas import validation, schema - - -@dataclasses.dataclass -class ServerWithoutVariables(abc.ABC): - url: str - - -@dataclasses.dataclass -class ServerWithVariables(abc.ABC): - _url: str - variables: validation.immutabledict[str, str] - variables_schema: typing.Type[schema.Schema] - url: str = dataclasses.field(init=False) - - def __post_init__(self): - url = self._url - assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) - for (key, value) in self.variables.items(): - url = url.replace("{" + key + "}", value) - self.url = url diff --git a/samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py b/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py deleted file mode 100644 index 163695d7390..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# coding: utf-8 -""" - security-test - No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501 - The version of the OpenAPI document: 1.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "http://localhost:3000" diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py deleted file mode 100644 index 8358a4052d4..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/header_imports.py +++ /dev/null @@ -1,15 +0,0 @@ -import decimal -import io -import typing -import typing_extensions - -from this_package import api_client, schemas - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'api_client', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py deleted file mode 100644 index 9abf48185ca..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/operation_imports.py +++ /dev/null @@ -1,18 +0,0 @@ -import datetime -import decimal -import io -import typing -import typing_extensions -import uuid - -from this_package import schemas, api_response - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py deleted file mode 100644 index 0526a2a1c52..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/response_imports.py +++ /dev/null @@ -1,25 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import typing -import uuid - -import typing_extensions -import urllib3 - -from this_package import api_client, schemas, api_response - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'typing', - 'uuid', - 'typing_extensions', - 'urllib3', - 'api_client', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py deleted file mode 100644 index 01b3da50dc5..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/schema_imports.py +++ /dev/null @@ -1,28 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import numbers -import re -import typing -import typing_extensions -import uuid - -from this_package import schemas -from this_package.configurations import schema_configuration - -U = typing.TypeVar('U') - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'numbers', - 're', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'schema_configuration' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py deleted file mode 100644 index 8bc2580eaec..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/security_scheme_imports.py +++ /dev/null @@ -1,12 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from this_package import security_schemes - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'security_schemes' -] \ No newline at end of file diff --git a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py deleted file mode 100644 index 5a77ec9124f..00000000000 --- a/samples/client/openapi_features/security/python/src/openapi_client/shared_imports/server_imports.py +++ /dev/null @@ -1,13 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from this_package import server, schemas - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'server', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/petstore/python/docs/components/schema/_200_response.md b/samples/client/petstore/python/docs/components/schema/_200_response.md index 647fb8b0085..66bf9060ccf 100644 --- a/samples/client/petstore/python/docs/components/schema/_200_response.md +++ b/samples/client/petstore/python/docs/components/schema/_200_response.md @@ -1,5 +1,5 @@ # _200Response -openapi_client.components.schema._200_response +petstore_api.components.schema._200_response ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/abstract_step_message.md b/samples/client/petstore/python/docs/components/schema/abstract_step_message.md index 80b53959c32..dbc033f8176 100644 --- a/samples/client/petstore/python/docs/components/schema/abstract_step_message.md +++ b/samples/client/petstore/python/docs/components/schema/abstract_step_message.md @@ -1,5 +1,5 @@ # AbstractStepMessage -openapi_client.components.schema.abstract_step_message +petstore_api.components.schema.abstract_step_message ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/src/openapi_client/__init__.py b/samples/client/petstore/python/src/openapi_client/__init__.py deleted file mode 100644 index 687c4c538e1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -__version__ = "1.0.0" - -# import ApiClient -from petstore_api.api_client import ApiClient - -# import Configuration -from petstore_api.configurations.api_configuration import ApiConfiguration -from petstore_api.signing import HttpSigningConfiguration - -# import exceptions -from petstore_api.exceptions import OpenApiException -from petstore_api.exceptions import ApiAttributeError -from petstore_api.exceptions import ApiTypeError -from petstore_api.exceptions import ApiValueError -from petstore_api.exceptions import ApiKeyError -from petstore_api.exceptions import ApiException - -__import__('sys').setrecursionlimit(1234) diff --git a/samples/client/petstore/python/src/openapi_client/api_client.py b/samples/client/petstore/python/src/openapi_client/api_client.py deleted file mode 100644 index 6b21b4f48e4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/api_client.py +++ /dev/null @@ -1,1429 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import datetime -import dataclasses -import decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing import pool -import re -import tempfile -import typing -import typing_extensions -from urllib import parse -import urllib3 -from urllib3 import _collections, fields - - -from petstore_api import exceptions, rest, schemas, security_schemes, api_response -from petstore_api.configurations import api_configuration, schema_configuration as schema_configuration_ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj: typing.Any): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return obj - elif isinstance(obj, bool): - # must be before int check - return obj - elif isinstance(obj, int): - return obj - elif obj is None: - return None - elif isinstance(obj, (dict, schemas.immutabledict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise exceptions.ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -@dataclasses.dataclass -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - prefix: str - separator: str - first: bool = True - item_separator: str = dataclasses.field(init=False) - - def __post_init__(self): - self.item_separator = self.separator if self.separator in {'.', '|', '%20'} else ',' - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return parse.quote(str(in_data)) - return str(in_data) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise exceptions.ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif in_data is None: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise exceptions.ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - @classmethod - def _serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return cls._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - @classmethod - def _deserialize_simple( - cls, - in_data: str, - name: str, - explode: bool, - percent_encode: bool - ) -> typing.Union[str, typing.List[str], typing.Dict[str, str]]: - raise NotImplementedError( - "Deserialization of style=simple has not yet been added. " - "If you need this how about you submit a PR adding it?" - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -class Encoding: - content_type: str - headers: typing.Optional[typing.Dict[str, 'HeaderParameter']] = None - style: typing.Optional[ParameterStyle] = None - explode: bool = False - allow_reserved: bool = False - - -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[schemas.Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -class ParameterBase(JSONDetector): - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[schemas.Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] - - _json_encoder = JSONEncoder() - - def __init_subclass__(cls, **kwargs): - if cls.explode is None: - if cls.style is ParameterStyle.FORM: - cls.explode = True - else: - cls.explode = False - - @classmethod - def _serialize_json( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=cls._json_encoder.compact_separators) - return json.dumps(in_data) - -_SERIALIZE_TYPES = typing.Union[ - int, - float, - str, - datetime.date, - datetime.datetime, - None, - bool, - list, - tuple, - dict, - schemas.immutabledict -] - -_JSON_TYPES = typing.Union[ - int, - float, - str, - None, - bool, - typing.Tuple['_JSON_TYPES', ...], - schemas.immutabledict[str, '_JSON_TYPES'], -] - -@dataclasses.dataclass -class PathParameter(ParameterBase, StyleSimpleSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.PATH - style: ParameterStyle = ParameterStyle.SIMPLE - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_label( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_matrix( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=cls.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_simple( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = cls._serialize_simple( - in_data=in_data, - name=cls.name, - explode=cls.explode, - percent_encode=True - ) - return cls._to_dict(cls.name, value) - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if cls.style: - if cls.style is ParameterStyle.SIMPLE: - return cls.__serialize_simple(cast_in_data) - elif cls.style is ParameterStyle.LABEL: - return cls.__serialize_label(cast_in_data) - elif cls.style is ParameterStyle.MATRIX: - return cls.__serialize_matrix(cast_in_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class QueryParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - in_type: ParameterInType = ParameterInType.QUERY - style: ParameterStyle = ParameterStyle.FORM - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def __serialize_space_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_pipe_delimited( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._ref6570_expansion( - variable_name=cls.name, - in_data=in_data, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def __serialize_form( - cls, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], - explode: bool - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - value = cls._serialize_form( - in_data, - name=cls.name, - explode=explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return cls._to_dict(cls.name, value) - - @classmethod - def get_prefix_separator_iterator(cls) -> PrefixSeparatorIterator: - if cls.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - raise ValueError(f'No iterator possible for style={cls.style}') - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if cls.style: - # TODO update query ones to omit setting values when [] {} or None is input - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - if cls.style is ParameterStyle.FORM: - return cls.__serialize_form(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.SPACE_DELIMITED: - return cls.__serialize_space_delimited(cast_in_data, prefix_separator_iterator, explode) - elif cls.style is ParameterStyle.PIPE_DELIMITED: - return cls.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator, explode) - if prefix_separator_iterator is None: - prefix_separator_iterator = cls.get_prefix_separator_iterator() - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data, eliminate_whitespace=True) - return cls._to_dict( - cls.name, - next(prefix_separator_iterator) + cls.name + '=' + parse.quote(value) - ) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -@dataclasses.dataclass -class CookieParameter(ParameterBase, StyleFormSerializer): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.FORM - in_type: ParameterInType = ParameterInType.COOKIE - explode: typing.Optional[bool] = None - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> typing.Dict[str, str]: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if cls.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - explode = cls.explode if cls.explode is not None else cls.style == ParameterStyle.FORM - value = cls._serialize_form( - cast_in_data, - explode=explode, - name=cls.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return cls._to_dict(cls.name, value) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls._to_dict(cls.name, value) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class __HeaderParameterBase(ParameterBase, StyleSimpleSerializer): - style: ParameterStyle = ParameterStyle.SIMPLE - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - explode: bool = False - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> _collections.HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = _collections.HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - @classmethod - def serialize_with_name( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - if cls.schema: - cast_in_data = in_data if skip_validation else cls.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - value = cls._serialize_simple(cast_in_data, name, cls.explode, False) - return cls.__to_headers(((name, value),)) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - assert media_type.schema is not None - cast_in_data = in_data if skip_validation else media_type.schema.validate_base(in_data) - cast_in_data = cls._json_encoder.default(cast_in_data) - if cls._content_type_is_json(content_type): - value = cls._serialize_json(cast_in_data) - return cls.__to_headers(((name, value),)) - else: - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - @classmethod - def deserialize( - cls, - in_data: str, - name: str - ): - if cls.schema: - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if cls.style: - extracted_data = cls._deserialize_simple(in_data, name, cls.explode, False) - return cls.schema.validate_base(extracted_data) - assert cls.content is not None - for content_type, media_type in cls.content.items(): - if cls._content_type_is_json(content_type): - cast_in_data: typing.Union[dict, list, None, int, float, str] = json.loads(in_data) - assert media_type.schema is not None - return media_type.schema.validate_base(cast_in_data) - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - raise ValueError('Invalid value for content, it was empty and must have 1 key value pair') - - -class HeaderParameterWithoutName(__HeaderParameterBase): - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - name: str, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - name, - skip_validation=skip_validation - ) - - -class HeaderParameter(__HeaderParameterBase): - name: str - required: bool = False - style: ParameterStyle = ParameterStyle.SIMPLE - in_type: ParameterInType = ParameterInType.HEADER - explode: bool = False - allow_reserved: typing.Optional[bool] = None - schema: typing.Optional[typing.Type[schemas.Schema]] = None - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - - @classmethod - def serialize( - cls, - in_data: _SERIALIZE_TYPES, - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - return cls.serialize_with_name( - in_data, - cls.name, - skip_validation=skip_validation - ) - -T = typing.TypeVar("T", bound=api_response.ApiResponse) - - -class OpenApiResponse(typing.Generic[T], JSONDetector, abc.ABC): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - content: typing.Optional[typing.Dict[str, typing.Type[MediaType]]] = None - headers: typing.Optional[typing.Dict[str, typing.Type[HeaderParameterWithoutName]]] = None - headers_schema: typing.Optional[typing.Type[schemas.Schema]] = None - - @classmethod - @abc.abstractmethod - def get_response(cls, response, headers, body) -> T: ... - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = parse.urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - @classmethod - def __deserialize_application_octet_stream( - cls, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - cls.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or cls.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as write_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - write_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - @classmethod - def deserialize(cls, response: urllib3.HTTPResponse, configuration: schema_configuration_.SchemaConfiguration) -> T: - content_type = response.headers.get('content-type') - deserialized_body = schemas.unset - streamed = response.supports_chunked_reads() - - deserialized_headers: typing.Union[schemas.Unset, typing.Dict[str, typing.Any]] = schemas.unset - if cls.headers is not None and cls.headers_schema is not None: - deserialized_headers = {} - for header_name, header_param in cls.headers.items(): - header_value = response.headers.get(header_name) - if header_value is None: - continue - header_value = header_param.deserialize(header_value, header_name) - deserialized_headers[header_name] = header_value - deserialized_headers = cls.headers_schema.validate_base(deserialized_headers, configuration=configuration) - - if cls.content is not None: - if content_type not in cls.content: - raise exceptions.ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(cls.content))} are defined for status_code={str(response.status)}" - ) - body_schema = cls.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return cls.get_response( - response=response, - headers=deserialized_headers, - body=schemas.unset - ) - - if cls._content_type_is_json(content_type): - body_data = cls.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = cls.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = cls.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - elif content_type == 'application/x-pem-file': - body_data = response.data.decode() - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - body_schema = schemas.get_class(body_schema) - if body_schema is schemas.BinarySchema: - deserialized_body = body_schema.validate_base(body_data) - else: - deserialized_body = body_schema.validate_base( - body_data, configuration=configuration) - elif streamed: - response.release_conn() - - return cls.get_response( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -@dataclasses.dataclass -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param configuration: api_configuration.ApiConfiguration object for this client - :param schema_configuration: schema_configuration_.SchemaConfiguration object for this client - :param default_headers: any default headers to include when making calls to the API. - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - configuration: api_configuration.ApiConfiguration = dataclasses.field( - default_factory=lambda: api_configuration.ApiConfiguration()) - schema_configuration: schema_configuration_.SchemaConfiguration = dataclasses.field( - default_factory=lambda: schema_configuration_.SchemaConfiguration()) - default_headers: _collections.HTTPHeaderDict = dataclasses.field( - default_factory=lambda: _collections.HTTPHeaderDict()) - pool_threads: int = 1 - user_agent: str = 'OpenAPI-JSON-Schema-Generator/1.0.0/python' - rest_client: rest.RESTClientObject = dataclasses.field(init=False) - - def __post_init__(self): - self._pool = None - self.rest_client = rest.RESTClientObject(self.configuration) - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = pool.ThreadPool(self.pool_threads) - return self._pool - - def set_default_header(self, header_name: str, header_value: str): - self.default_headers[header_name] = header_value - - def call_api( - self, - resource_path: str, - method: str, - host: str, - query_params_suffix: typing.Optional[str] = None, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data` - :param security_requirement_object: The security requirement object, used to apply auth when making the call - :param async_req: execute request asynchronously - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystem file and the schemas.BinarySchema - instance will also inherit from FileSchema and schemas.FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - the method will return the response directly. - """ - # header parameters - used_headers = _collections.HTTPHeaderDict(self.default_headers) - user_agent_key = 'User-Agent' - if user_agent_key not in used_headers and self.user_agent: - used_headers[user_agent_key] = self.user_agent - - # auth setting - self.update_params_for_auth( - used_headers, - security_requirement_object, - resource_path, - method, - body, - query_params_suffix - ) - - # must happen after auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - url = host + resource_path - if query_params_suffix: - url += query_params_suffix - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def request( - self, - method: str, - url: str, - headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, - body: typing.Union[str, bytes, None] = None, - stream: bool = False, - timeout: typing.Union[int, float, typing.Tuple, None] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "get": - return self.rest_client.get(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "head": - return self.rest_client.head(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "options": - return self.rest_client.options(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "post": - return self.rest_client.post(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "put": - return self.rest_client.put(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "patch": - return self.rest_client.patch(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "delete": - return self.rest_client.delete(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise exceptions.ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth( - self, - headers: _collections.HTTPHeaderDict, - security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject], - resource_path: str, - method: str, - body: typing.Union[str, bytes, None] = None, - query_params_suffix: typing.Optional[str] = None - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param security_requirement_object: the openapi security requirement object - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - if not security_requirement_object: - # optional auth cause, use no auth - return - for security_scheme_component_name, scope_names in security_requirement_object.items(): - scope_names = typing.cast(typing.Tuple[str, ...], scope_names) - security_scheme_component_name = typing.cast(typing.Literal[ - 'api_key', - 'api_key_query', - 'bearer_test', - 'http_basic_test', - 'http_signature_test', - 'openIdConnect_test', - 'petstore_auth', - ], - security_scheme_component_name - ) - try: - security_scheme_instance = self.configuration.security_scheme_info[security_scheme_component_name] - security_scheme_instance.apply_auth( - headers, - resource_path, - method, - body, - query_params_suffix, - scope_names - ) - except KeyError as ex: - raise ex - -@dataclasses.dataclass -class Api: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - api_client: ApiClient = dataclasses.field(default_factory=lambda: ApiClient()) - - @staticmethod - def _get_used_path( - used_path: str, - path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - skip_validation: bool = False - ) -> typing.Tuple[str, str]: - used_path_params = {} - if path_params is not None: - for path_parameter in path_parameters: - parameter_data = path_params.get(path_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = path_parameter.serialize(parameter_data, skip_validation=skip_validation) - used_path_params.update(serialized_data) - - for k, v in used_path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - query_params_suffix = "" - if query_params is not None: - prefix_separator_iterator = None - for query_parameter in query_parameters: - parameter_data = query_params.get(query_parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = query_parameter.get_prefix_separator_iterator() - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = query_parameter.serialize( - parameter_data, - prefix_separator_iterator=prefix_separator_iterator, - skip_validation=skip_validation - ) - for serialized_value in serialized_data.values(): - query_params_suffix += serialized_value - return used_path, query_params_suffix - - @staticmethod - def _get_headers( - header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] = None, - accept_content_types: typing.Tuple[str, ...] = (), - skip_validation: bool = False - ) -> _collections.HTTPHeaderDict: - headers = _collections.HTTPHeaderDict() - if header_params is not None: - for parameter in header_parameters: - parameter_data = header_params.get(parameter.name, schemas.unset) - if isinstance(parameter_data, schemas.Unset): - continue - assert not isinstance(parameter_data, (bytes, schemas.FileIO)) - serialized_data = parameter.serialize(parameter_data, skip_validation=skip_validation) - headers.extend(serialized_data) - if accept_content_types: - for accept_content_type in accept_content_types: - headers.add('Accept', accept_content_type) - return headers - - def _get_fields_and_body( - self, - request_body: typing.Type[RequestBody], - body: typing.Union[schemas.INPUT_TYPES_ALL, schemas.Unset], - content_type: str, - headers: _collections.HTTPHeaderDict - ): - if request_body.required and body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - - if isinstance(body, schemas.Unset): - return None, None - - serialized_fields = None - serialized_body = None - serialized_data = request_body.serialize(body, content_type, configuration=self.api_client.schema_configuration) - headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - serialized_fields = serialized_data['fields'] - elif 'body' in serialized_data: - serialized_body = serialized_data['body'] - return serialized_fields, serialized_body - - @staticmethod - def _verify_response_status(response: api_response.ApiResponse): - if not 200 <= response.response.status <= 399: - raise exceptions.ApiException( - status=response.response.status, - reason=response.response.reason, - api_response=response - ) - - -class SerializedRequestBody(typing.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[rest.RequestField, ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType schemas.Schema info - """ - __json_encoder = JSONEncoder() - __plain_txt_content_types = {'text/plain', 'application/x-pem-file'} - content: typing.Dict[str, typing.Type[MediaType]] - required: bool = False - - @classmethod - def __serialize_json( - cls, - in_data: _JSON_TYPES - ) -> SerializedRequestBody: - in_data = cls.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return {'body': json_str} - - @staticmethod - def __serialize_text_plain(in_data: typing.Union[int, float, str]) -> SerializedRequestBody: - return {'body': str(in_data)} - - @classmethod - def __multipart_json_item(cls, key: str, value: _JSON_TYPES) -> rest.RequestField: - json_value = cls.__json_encoder.default(value) - request_field = rest.RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - @classmethod - def __multipart_form_item(cls, key: str, value: typing.Union[_JSON_TYPES, bytes, schemas.FileIO]) -> rest.RequestField: - if isinstance(value, str): - request_field = rest.RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') - elif isinstance(value, bytes): - request_field = rest.RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') - elif isinstance(value, schemas.FileIO): - # TODO use content.encoding to limit allowed content types if they are present - urllib3_request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(rest.RequestField, urllib3_request_field) - value.close() - else: - request_field = cls.__multipart_json_item(key=key, value=value) - return request_field - - @classmethod - def __serialize_multipart_form_data( - cls, in_data: schemas.immutabledict[str, typing.Union[_JSON_TYPES, bytes, schemas.FileIO]] - ) -> SerializedRequestBody: - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - for key, value in in_data.items(): - if isinstance(value, tuple): - if value: - # values use explode = True, so the code makes a rest.RequestField for each item with name=key - for item in value: - request_field = cls.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = cls.__multipart_json_item(key=key, value=value) # type: ignore - fields.append(request_field) - else: - request_field = cls.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return {'fields': tuple(fields)} - - @staticmethod - def __serialize_application_octet_stream(in_data: typing.Union[schemas.FileIO, bytes]) -> SerializedRequestBody: - if isinstance(in_data, bytes): - return {'body': in_data} - # schemas.FileIO type - used_in_data = in_data.read() - in_data.close() - return {'body': used_in_data} - - @classmethod - def __serialize_application_x_www_form_data( - cls, in_data: schemas.immutabledict[str, _JSON_TYPES] - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - cast_in_data = cls.__json_encoder.default(in_data) - value = cls._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return {'body': value} - - @classmethod - def serialize( - cls, in_data: schemas.INPUT_TYPES_ALL, content_type: str, configuration: typing.Optional[schema_configuration_.SchemaConfiguration] = None - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = cls.content[content_type] - assert media_type.schema is not None - schema = schemas.get_class(media_type.schema) - used_configuration = configuration if configuration is not None else schema_configuration_.SchemaConfiguration() - cast_in_data = schema.validate_base(in_data, configuration=used_configuration) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if cls._content_type_is_json(content_type): - if isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be int/float/str/bool/None/tuple/immutabledict and it was type {type(cast_in_data)}") - return cls.__serialize_json(cast_in_data) - elif content_type in cls.__plain_txt_content_types: - if not isinstance(cast_in_data, (int, float, str)): - raise ValueError(f"Unable to serialize type {type(cast_in_data)} to text/plain") - return cls.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError(f"Unable to serialize {cast_in_data} to multipart/form-data because it is not a dict of data") - return cls.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - if not isinstance(cast_in_data, schemas.immutabledict): - raise ValueError( - f"Unable to serialize {cast_in_data} to application/x-www-form-urlencoded because it is not a dict of data") - return cls.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - if not isinstance(cast_in_data, (schemas.FileIO, bytes)): - raise ValueError(f"Invalid input data type. Data must be bytes or File for content_type={content_type}") - return cls.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) diff --git a/samples/client/petstore/python/src/openapi_client/api_response.py b/samples/client/petstore/python/src/openapi_client/api_response.py deleted file mode 100644 index 8cfed7e3ff9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/api_response.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -import urllib3 - -from petstore_api import schemas - - -@dataclasses.dataclass(frozen=True) -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.OUTPUT_BASE_TYPES] - headers: typing.Union[schemas.Unset, typing.Mapping[str, schemas.OUTPUT_BASE_TYPES]] - - -@dataclasses.dataclass(frozen=True) -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset diff --git a/samples/client/petstore/python/src/openapi_client/apis/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py b/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py deleted file mode 100644 index 8c25c2a703f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/path_to_api.py +++ /dev/null @@ -1,182 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.paths.solidus import Solidus -from openapi_client.apis.paths.another_fake_dummy import AnotherFakeDummy -from openapi_client.apis.paths.common_param_sub_dir import CommonParamSubDir -from openapi_client.apis.paths.fake import Fake -from openapi_client.apis.paths.fake_additional_properties_with_array_of_enums import FakeAdditionalPropertiesWithArrayOfEnums -from openapi_client.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema -from openapi_client.apis.paths.fake_body_with_query_params import FakeBodyWithQueryParams -from openapi_client.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams -from openapi_client.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId -from openapi_client.apis.paths.fake_health import FakeHealth -from openapi_client.apis.paths.fake_inline_additional_properties import FakeInlineAdditionalProperties -from openapi_client.apis.paths.fake_inline_composition import FakeInlineComposition -from openapi_client.apis.paths.fake_json_form_data import FakeJsonFormData -from openapi_client.apis.paths.fake_json_patch import FakeJsonPatch -from openapi_client.apis.paths.fake_json_with_charset import FakeJsonWithCharset -from openapi_client.apis.paths.fake_multiple_request_body_content_types import FakeMultipleRequestBodyContentTypes -from openapi_client.apis.paths.fake_multiple_response_bodies import FakeMultipleResponseBodies -from openapi_client.apis.paths.fake_multiple_securities import FakeMultipleSecurities -from openapi_client.apis.paths.fake_obj_in_query import FakeObjInQuery -from openapi_client.apis.paths.fake_parameter_collisions1_abab_self_ab import FakeParameterCollisions1AbabSelfAb -from openapi_client.apis.paths.fake_pem_content_type import FakePemContentType -from openapi_client.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType -from openapi_client.apis.paths.fake_redirection import FakeRedirection -from openapi_client.apis.paths.fake_ref_obj_in_query import FakeRefObjInQuery -from openapi_client.apis.paths.fake_refs_array_of_enums import FakeRefsArrayOfEnums -from openapi_client.apis.paths.fake_refs_arraymodel import FakeRefsArraymodel -from openapi_client.apis.paths.fake_refs_boolean import FakeRefsBoolean -from openapi_client.apis.paths.fake_refs_composed_one_of_number_with_validations import FakeRefsComposedOneOfNumberWithValidations -from openapi_client.apis.paths.fake_refs_enum import FakeRefsEnum -from openapi_client.apis.paths.fake_refs_mammal import FakeRefsMammal -from openapi_client.apis.paths.fake_refs_number import FakeRefsNumber -from openapi_client.apis.paths.fake_refs_object_model_with_ref_props import FakeRefsObjectModelWithRefProps -from openapi_client.apis.paths.fake_refs_string import FakeRefsString -from openapi_client.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema -from openapi_client.apis.paths.fake_test_query_paramters import FakeTestQueryParamters -from openapi_client.apis.paths.fake_upload_download_file import FakeUploadDownloadFile -from openapi_client.apis.paths.fake_upload_file import FakeUploadFile -from openapi_client.apis.paths.fake_upload_files import FakeUploadFiles -from openapi_client.apis.paths.fake_wild_card_responses import FakeWildCardResponses -from openapi_client.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile -from openapi_client.apis.paths.fake_classname_test import FakeClassnameTest -from openapi_client.apis.paths.foo import Foo -from openapi_client.apis.paths.pet import Pet -from openapi_client.apis.paths.pet_find_by_status import PetFindByStatus -from openapi_client.apis.paths.pet_find_by_tags import PetFindByTags -from openapi_client.apis.paths.pet_pet_id import PetPetId -from openapi_client.apis.paths.pet_pet_id_upload_image import PetPetIdUploadImage -from openapi_client.apis.paths.store_inventory import StoreInventory -from openapi_client.apis.paths.store_order import StoreOrder -from openapi_client.apis.paths.store_order_order_id import StoreOrderOrderId -from openapi_client.apis.paths.user import User -from openapi_client.apis.paths.user_create_with_array import UserCreateWithArray -from openapi_client.apis.paths.user_create_with_list import UserCreateWithList -from openapi_client.apis.paths.user_login import UserLogin -from openapi_client.apis.paths.user_logout import UserLogout -from openapi_client.apis.paths.user_username import UserUsername - -PathToApi = typing.TypedDict( - 'PathToApi', - { - "/": typing.Type[Solidus], - "/another-fake/dummy": typing.Type[AnotherFakeDummy], - "/commonParam/{subDir}/": typing.Type[CommonParamSubDir], - "/fake": typing.Type[Fake], - "/fake/additional-properties-with-array-of-enums": typing.Type[FakeAdditionalPropertiesWithArrayOfEnums], - "/fake/body-with-file-schema": typing.Type[FakeBodyWithFileSchema], - "/fake/body-with-query-params": typing.Type[FakeBodyWithQueryParams], - "/fake/case-sensitive-params": typing.Type[FakeCaseSensitiveParams], - "/fake/deleteCoffee/{id}": typing.Type[FakeDeleteCoffeeId], - "/fake/health": typing.Type[FakeHealth], - "/fake/inline-additionalProperties": typing.Type[FakeInlineAdditionalProperties], - "/fake/inlineComposition/": typing.Type[FakeInlineComposition], - "/fake/jsonFormData": typing.Type[FakeJsonFormData], - "/fake/jsonPatch": typing.Type[FakeJsonPatch], - "/fake/jsonWithCharset": typing.Type[FakeJsonWithCharset], - "/fake/multipleRequestBodyContentTypes/": typing.Type[FakeMultipleRequestBodyContentTypes], - "/fake/multipleResponseBodies": typing.Type[FakeMultipleResponseBodies], - "/fake/multipleSecurities": typing.Type[FakeMultipleSecurities], - "/fake/objInQuery": typing.Type[FakeObjInQuery], - "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/": typing.Type[FakeParameterCollisions1AbabSelfAb], - "/fake/pemContentType": typing.Type[FakePemContentType], - "/fake/queryParamWithJsonContentType": typing.Type[FakeQueryParamWithJsonContentType], - "/fake/redirection": typing.Type[FakeRedirection], - "/fake/refObjInQuery": typing.Type[FakeRefObjInQuery], - "/fake/refs/array-of-enums": typing.Type[FakeRefsArrayOfEnums], - "/fake/refs/arraymodel": typing.Type[FakeRefsArraymodel], - "/fake/refs/boolean": typing.Type[FakeRefsBoolean], - "/fake/refs/composed_one_of_number_with_validations": typing.Type[FakeRefsComposedOneOfNumberWithValidations], - "/fake/refs/enum": typing.Type[FakeRefsEnum], - "/fake/refs/mammal": typing.Type[FakeRefsMammal], - "/fake/refs/number": typing.Type[FakeRefsNumber], - "/fake/refs/object_model_with_ref_props": typing.Type[FakeRefsObjectModelWithRefProps], - "/fake/refs/string": typing.Type[FakeRefsString], - "/fake/responseWithoutSchema": typing.Type[FakeResponseWithoutSchema], - "/fake/test-query-paramters": typing.Type[FakeTestQueryParamters], - "/fake/uploadDownloadFile": typing.Type[FakeUploadDownloadFile], - "/fake/uploadFile": typing.Type[FakeUploadFile], - "/fake/uploadFiles": typing.Type[FakeUploadFiles], - "/fake/wildCardResponses": typing.Type[FakeWildCardResponses], - "/fake/{petId}/uploadImageWithRequiredFile": typing.Type[FakePetIdUploadImageWithRequiredFile], - "/fake_classname_test": typing.Type[FakeClassnameTest], - "/foo": typing.Type[Foo], - "/pet": typing.Type[Pet], - "/pet/findByStatus": typing.Type[PetFindByStatus], - "/pet/findByTags": typing.Type[PetFindByTags], - "/pet/{petId}": typing.Type[PetPetId], - "/pet/{petId}/uploadImage": typing.Type[PetPetIdUploadImage], - "/store/inventory": typing.Type[StoreInventory], - "/store/order": typing.Type[StoreOrder], - "/store/order/{order_id}": typing.Type[StoreOrderOrderId], - "/user": typing.Type[User], - "/user/createWithArray": typing.Type[UserCreateWithArray], - "/user/createWithList": typing.Type[UserCreateWithList], - "/user/login": typing.Type[UserLogin], - "/user/logout": typing.Type[UserLogout], - "/user/{username}": typing.Type[UserUsername], - } -) - -path_to_api = PathToApi( - { - "/": Solidus, - "/another-fake/dummy": AnotherFakeDummy, - "/commonParam/{subDir}/": CommonParamSubDir, - "/fake": Fake, - "/fake/additional-properties-with-array-of-enums": FakeAdditionalPropertiesWithArrayOfEnums, - "/fake/body-with-file-schema": FakeBodyWithFileSchema, - "/fake/body-with-query-params": FakeBodyWithQueryParams, - "/fake/case-sensitive-params": FakeCaseSensitiveParams, - "/fake/deleteCoffee/{id}": FakeDeleteCoffeeId, - "/fake/health": FakeHealth, - "/fake/inline-additionalProperties": FakeInlineAdditionalProperties, - "/fake/inlineComposition/": FakeInlineComposition, - "/fake/jsonFormData": FakeJsonFormData, - "/fake/jsonPatch": FakeJsonPatch, - "/fake/jsonWithCharset": FakeJsonWithCharset, - "/fake/multipleRequestBodyContentTypes/": FakeMultipleRequestBodyContentTypes, - "/fake/multipleResponseBodies": FakeMultipleResponseBodies, - "/fake/multipleSecurities": FakeMultipleSecurities, - "/fake/objInQuery": FakeObjInQuery, - "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/": FakeParameterCollisions1AbabSelfAb, - "/fake/pemContentType": FakePemContentType, - "/fake/queryParamWithJsonContentType": FakeQueryParamWithJsonContentType, - "/fake/redirection": FakeRedirection, - "/fake/refObjInQuery": FakeRefObjInQuery, - "/fake/refs/array-of-enums": FakeRefsArrayOfEnums, - "/fake/refs/arraymodel": FakeRefsArraymodel, - "/fake/refs/boolean": FakeRefsBoolean, - "/fake/refs/composed_one_of_number_with_validations": FakeRefsComposedOneOfNumberWithValidations, - "/fake/refs/enum": FakeRefsEnum, - "/fake/refs/mammal": FakeRefsMammal, - "/fake/refs/number": FakeRefsNumber, - "/fake/refs/object_model_with_ref_props": FakeRefsObjectModelWithRefProps, - "/fake/refs/string": FakeRefsString, - "/fake/responseWithoutSchema": FakeResponseWithoutSchema, - "/fake/test-query-paramters": FakeTestQueryParamters, - "/fake/uploadDownloadFile": FakeUploadDownloadFile, - "/fake/uploadFile": FakeUploadFile, - "/fake/uploadFiles": FakeUploadFiles, - "/fake/wildCardResponses": FakeWildCardResponses, - "/fake/{petId}/uploadImageWithRequiredFile": FakePetIdUploadImageWithRequiredFile, - "/fake_classname_test": FakeClassnameTest, - "/foo": Foo, - "/pet": Pet, - "/pet/findByStatus": PetFindByStatus, - "/pet/findByTags": PetFindByTags, - "/pet/{petId}": PetPetId, - "/pet/{petId}/uploadImage": PetPetIdUploadImage, - "/store/inventory": StoreInventory, - "/store/order": StoreOrder, - "/store/order/{order_id}": StoreOrderOrderId, - "/user": User, - "/user/createWithArray": UserCreateWithArray, - "/user/createWithList": UserCreateWithList, - "/user/login": UserLogin, - "/user/logout": UserLogout, - "/user/{username}": UserUsername, - } -) diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py deleted file mode 100644 index cf241d055c1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.path_to_api import path_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py b/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py deleted file mode 100644 index 9c1052c855c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/another_fake_dummy.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.another_fake_dummy.patch.operation import ApiForPatch - - -class AnotherFakeDummy( - ApiForPatch, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py b/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py deleted file mode 100644 index 2d231b5d148..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/common_param_sub_dir.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.common_param_sub_dir.delete.operation import ApiForDelete -from openapi_client.paths.common_param_sub_dir.get.operation import ApiForGet -from openapi_client.paths.common_param_sub_dir.post.operation import ApiForPost - - -class CommonParamSubDir( - ApiForDelete, - ApiForGet, - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py deleted file mode 100644 index 8f0a84856d0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake.delete.operation import ApiForDelete -from openapi_client.paths.fake.get.operation import ApiForGet -from openapi_client.paths.fake.patch.operation import ApiForPatch -from openapi_client.paths.fake.post.operation import ApiForPost - - -class Fake( - ApiForDelete, - ApiForGet, - ApiForPatch, - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py deleted file mode 100644 index 69686a9b026..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_additional_properties_with_array_of_enums.get.operation import ApiForGet - - -class FakeAdditionalPropertiesWithArrayOfEnums( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py deleted file mode 100644 index 82f480a021b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_file_schema.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_body_with_file_schema.put.operation import ApiForPut - - -class FakeBodyWithFileSchema( - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py deleted file mode 100644 index 1947070c3da..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_body_with_query_params.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_body_with_query_params.put.operation import ApiForPut - - -class FakeBodyWithQueryParams( - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py deleted file mode 100644 index 86a9eca0578..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_case_sensitive_params.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_case_sensitive_params.put.operation import ApiForPut - - -class FakeCaseSensitiveParams( - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py deleted file mode 100644 index a34df8557a5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_classname_test.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_classname_test.patch.operation import ApiForPatch - - -class FakeClassnameTest( - ApiForPatch, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py deleted file mode 100644 index cd4e891e784..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_delete_coffee_id.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_delete_coffee_id.delete.operation import ApiForDelete - - -class FakeDeleteCoffeeId( - ApiForDelete, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py deleted file mode 100644 index b7cbc526126..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_health.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_health.get.operation import ApiForGet - - -class FakeHealth( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py deleted file mode 100644 index 319d64e6607..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_additional_properties.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_inline_additional_properties.post.operation import ApiForPost - - -class FakeInlineAdditionalProperties( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py deleted file mode 100644 index f9c609a9320..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_inline_composition.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_inline_composition.post.operation import ApiForPost - - -class FakeInlineComposition( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py deleted file mode 100644 index c5ef9fab228..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_form_data.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_json_form_data.get.operation import ApiForGet - - -class FakeJsonFormData( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py deleted file mode 100644 index a74915e355b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_patch.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_json_patch.patch.operation import ApiForPatch - - -class FakeJsonPatch( - ApiForPatch, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py deleted file mode 100644 index b3f029fdec4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_json_with_charset.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_json_with_charset.post.operation import ApiForPost - - -class FakeJsonWithCharset( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py deleted file mode 100644 index e97a8ae7542..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_multiple_request_body_content_types.post.operation import ApiForPost - - -class FakeMultipleRequestBodyContentTypes( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py deleted file mode 100644 index 2133676cad3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_response_bodies.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_multiple_response_bodies.get.operation import ApiForGet - - -class FakeMultipleResponseBodies( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py deleted file mode 100644 index 9ad99cdac53..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_multiple_securities.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_multiple_securities.get.operation import ApiForGet - - -class FakeMultipleSecurities( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py deleted file mode 100644 index eedc7fd2da8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_obj_in_query.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_obj_in_query.get.operation import ApiForGet - - -class FakeObjInQuery( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py deleted file mode 100644 index 92ea3b1983d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.operation import ApiForPost - - -class FakeParameterCollisions1AbabSelfAb( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py deleted file mode 100644 index d535d95edfa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pem_content_type.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_pem_content_type.get.operation import ApiForGet - - -class FakePemContentType( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py deleted file mode 100644 index ae48a4b4666..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.operation import ApiForPost - - -class FakePetIdUploadImageWithRequiredFile( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py deleted file mode 100644 index 22d3bf14499..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_query_param_with_json_content_type.get.operation import ApiForGet - - -class FakeQueryParamWithJsonContentType( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py deleted file mode 100644 index 1f033300c4d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_redirection.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_redirection.get.operation import ApiForGet - - -class FakeRedirection( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py deleted file mode 100644 index 35b0f890ebc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_ref_obj_in_query.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_ref_obj_in_query.get.operation import ApiForGet - - -class FakeRefObjInQuery( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py deleted file mode 100644 index 19bb7620a00..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_array_of_enums.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_array_of_enums.post.operation import ApiForPost - - -class FakeRefsArrayOfEnums( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py deleted file mode 100644 index da6d4aa521f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_arraymodel.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_arraymodel.post.operation import ApiForPost - - -class FakeRefsArraymodel( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py deleted file mode 100644 index 7c54aaa865d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_boolean.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_boolean.post.operation import ApiForPost - - -class FakeRefsBoolean( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py deleted file mode 100644 index fafaf48c7f4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_composed_one_of_number_with_validations.post.operation import ApiForPost - - -class FakeRefsComposedOneOfNumberWithValidations( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py deleted file mode 100644 index c8a87d87a4c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_enum.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_enum.post.operation import ApiForPost - - -class FakeRefsEnum( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py deleted file mode 100644 index 6fdeb019cdb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_mammal.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_mammal.post.operation import ApiForPost - - -class FakeRefsMammal( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py deleted file mode 100644 index 7d19b3d3876..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_number.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_number.post.operation import ApiForPost - - -class FakeRefsNumber( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py deleted file mode 100644 index 4fd9f107cf9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_object_model_with_ref_props.post.operation import ApiForPost - - -class FakeRefsObjectModelWithRefProps( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py deleted file mode 100644 index 2875f753c3e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_refs_string.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_refs_string.post.operation import ApiForPost - - -class FakeRefsString( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py deleted file mode 100644 index c6ceeffa2fc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_response_without_schema.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_response_without_schema.get.operation import ApiForGet - - -class FakeResponseWithoutSchema( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py deleted file mode 100644 index 1da24ddd49b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_test_query_paramters.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_test_query_paramters.put.operation import ApiForPut - - -class FakeTestQueryParamters( - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py deleted file mode 100644 index d495f5f53e5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_download_file.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_upload_download_file.post.operation import ApiForPost - - -class FakeUploadDownloadFile( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py deleted file mode 100644 index c8a9449e8fe..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_file.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_upload_file.post.operation import ApiForPost - - -class FakeUploadFile( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py deleted file mode 100644 index 1807076aa53..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_upload_files.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_upload_files.post.operation import ApiForPost - - -class FakeUploadFiles( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py b/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py deleted file mode 100644 index 8ddefee61bf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/fake_wild_card_responses.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_wild_card_responses.get.operation import ApiForGet - - -class FakeWildCardResponses( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py b/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py deleted file mode 100644 index d8a08bb1cb3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/foo.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.foo.get.operation import ApiForGet - - -class Foo( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py deleted file mode 100644 index f426fa02173..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/pet.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet.post.operation import ApiForPost -from openapi_client.paths.pet.put.operation import ApiForPut - - -class Pet( - ApiForPost, - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py deleted file mode 100644 index a7c88651abe..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_status.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet_find_by_status.get.operation import ApiForGet - - -class PetFindByStatus( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py deleted file mode 100644 index 74a64957608..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_find_by_tags.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet_find_by_tags.get.operation import ApiForGet - - -class PetFindByTags( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py deleted file mode 100644 index a4063dd4e8e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet_pet_id.delete.operation import ApiForDelete -from openapi_client.paths.pet_pet_id.get.operation import ApiForGet -from openapi_client.paths.pet_pet_id.post.operation import ApiForPost - - -class PetPetId( - ApiForDelete, - ApiForGet, - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py b/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py deleted file mode 100644 index 4124c836fbc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/pet_pet_id_upload_image.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet_pet_id_upload_image.post.operation import ApiForPost - - -class PetPetIdUploadImage( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py b/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py deleted file mode 100644 index 19459c5faaa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/solidus.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.solidus.get.operation import ApiForGet - - -class Solidus( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py deleted file mode 100644 index a8a084555ea..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/store_inventory.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.store_inventory.get.operation import ApiForGet - - -class StoreInventory( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py deleted file mode 100644 index 1e8631583fd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.store_order.post.operation import ApiForPost - - -class StoreOrder( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py b/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py deleted file mode 100644 index ecbd226629a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/store_order_order_id.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.store_order_order_id.delete.operation import ApiForDelete -from openapi_client.paths.store_order_order_id.get.operation import ApiForGet - - -class StoreOrderOrderId( - ApiForDelete, - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user.py deleted file mode 100644 index 9a9184c27ac..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user.post.operation import ApiForPost - - -class User( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py deleted file mode 100644 index c609573e940..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_array.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_create_with_array.post.operation import ApiForPost - - -class UserCreateWithArray( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py deleted file mode 100644 index 9a8e025cf23..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user_create_with_list.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_create_with_list.post.operation import ApiForPost - - -class UserCreateWithList( - ApiForPost, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py deleted file mode 100644 index 1c15ad8a393..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user_login.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_login.get.operation import ApiForGet - - -class UserLogin( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py deleted file mode 100644 index 0195adba7ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user_logout.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_logout.get.operation import ApiForGet - - -class UserLogout( - ApiForGet, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py b/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py deleted file mode 100644 index 54054eeb1a4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/paths/user_username.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_username.delete.operation import ApiForDelete -from openapi_client.paths.user_username.get.operation import ApiForGet -from openapi_client.paths.user_username.put.operation import ApiForPut - - -class UserUsername( - ApiForDelete, - ApiForGet, - ApiForPut, -): - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py b/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py deleted file mode 100644 index 84a15788e60..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tag_to_api.py +++ /dev/null @@ -1,35 +0,0 @@ -import typing -import typing_extensions - -from openapi_client.apis.tags.fake_api import FakeApi -from openapi_client.apis.tags.another_fake_api import AnotherFakeApi -from openapi_client.apis.tags.pet_api import PetApi -from openapi_client.apis.tags.fake_classname_tags123_api import FakeClassnameTags123Api -from openapi_client.apis.tags.default_api import DefaultApi -from openapi_client.apis.tags.store_api import StoreApi -from openapi_client.apis.tags.user_api import UserApi - -TagToApi = typing.TypedDict( - 'TagToApi', - { - "fake": typing.Type[FakeApi], - "$another-fake?": typing.Type[AnotherFakeApi], - "pet": typing.Type[PetApi], - "fake_classname_tags 123#$%^": typing.Type[FakeClassnameTags123Api], - "default": typing.Type[DefaultApi], - "store": typing.Type[StoreApi], - "user": typing.Type[UserApi], - } -) - -tag_to_api = TagToApi( - { - "fake": FakeApi, - "$another-fake?": AnotherFakeApi, - "pet": PetApi, - "fake_classname_tags 123#$%^": FakeClassnameTags123Api, - "default": DefaultApi, - "store": StoreApi, - "user": UserApi, - } -) diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py b/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py deleted file mode 100644 index f3c38f014ce..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.tag_to_api import tag_to_api \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py deleted file mode 100644 index 0608716a620..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/another_fake_api.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.another_fake_dummy.patch.operation import _123TestSpecialTags - - -class AnotherFakeApi( - _123TestSpecialTags, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py deleted file mode 100644 index 9890b8e0fd9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/default_api.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.foo.get.operation import FooGet - - -class DefaultApi( - FooGet, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py deleted file mode 100644 index 2f3d2adb2a4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_api.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.operation import ParameterCollisions -from openapi_client.paths.fake_obj_in_query.get.operation import ObjectInQuery -from openapi_client.paths.fake_query_param_with_json_content_type.get.operation import QueryParamWithJsonContentType -from openapi_client.paths.fake_json_form_data.get.operation import JsonFormData -from openapi_client.paths.common_param_sub_dir.delete.operation import DeleteCommonParam -from openapi_client.paths.common_param_sub_dir.get.operation import GetCommonParam -from openapi_client.paths.common_param_sub_dir.post.operation import PostCommonParam -from openapi_client.paths.fake_body_with_file_schema.put.operation import BodyWithFileSchema -from openapi_client.paths.fake_json_patch.patch.operation import JsonPatch -from openapi_client.paths.fake_response_without_schema.get.operation import ResponseWithoutSchema -from openapi_client.paths.fake_pem_content_type.get.operation import PemContentType -from openapi_client.paths.fake_refs_boolean.post.operation import Boolean -from openapi_client.paths.fake_refs_string.post.operation import String -from openapi_client.paths.fake_wild_card_responses.get.operation import WildCardResponses -from openapi_client.paths.fake_refs_mammal.post.operation import Mammal -from openapi_client.paths.fake_upload_download_file.post.operation import UploadDownloadFile -from openapi_client.paths.fake_json_with_charset.post.operation import JsonWithCharset -from openapi_client.paths.fake_upload_files.post.operation import UploadFiles -from openapi_client.paths.fake_inline_composition.post.operation import InlineComposition -from openapi_client.paths.fake_refs_array_of_enums.post.operation import ArrayOfEnums -from openapi_client.paths.fake_multiple_request_body_content_types.post.operation import MultipleRequestBodyContentTypes -from openapi_client.paths.solidus.get.operation import SlashRoute -from openapi_client.paths.fake_health.get.operation import FakeHealthGet -from openapi_client.paths.fake_delete_coffee_id.delete.operation import DeleteCoffee -from openapi_client.paths.fake_case_sensitive_params.put.operation import CaseSensitiveParams -from openapi_client.paths.fake_ref_obj_in_query.get.operation import RefObjectInQuery -from openapi_client.paths.fake_test_query_paramters.put.operation import QueryParameterCollectionFormat -from openapi_client.paths.fake_upload_file.post.operation import UploadFile -from openapi_client.paths.fake_refs_arraymodel.post.operation import ArrayModel -from openapi_client.paths.fake_multiple_securities.get.operation import MultipleSecurities -from openapi_client.paths.fake_refs_object_model_with_ref_props.post.operation import ObjectModelWithRefProps -from openapi_client.paths.fake_refs_number.post.operation import NumberWithValidations -from openapi_client.paths.fake_multiple_response_bodies.get.operation import MultipleResponseBodies -from openapi_client.paths.fake_inline_additional_properties.post.operation import InlineAdditionalProperties -from openapi_client.paths.fake_redirection.get.operation import Redirection -from openapi_client.paths.fake_additional_properties_with_array_of_enums.get.operation import AdditionalPropertiesWithArrayOfEnums -from openapi_client.paths.fake_refs_enum.post.operation import StringEnum -from openapi_client.paths.fake.delete.operation import GroupParameters -from openapi_client.paths.fake.get.operation import EnumParameters -from openapi_client.paths.fake.patch.operation import ClientModel -from openapi_client.paths.fake.post.operation import EndpointParameters -from openapi_client.paths.fake_body_with_query_params.put.operation import BodyWithQueryParams -from openapi_client.paths.fake_refs_composed_one_of_number_with_validations.post.operation import ComposedOneOfDifferentTypes - - -class FakeApi( - ParameterCollisions, - ObjectInQuery, - QueryParamWithJsonContentType, - JsonFormData, - DeleteCommonParam, - GetCommonParam, - PostCommonParam, - BodyWithFileSchema, - JsonPatch, - ResponseWithoutSchema, - PemContentType, - Boolean, - String, - WildCardResponses, - Mammal, - UploadDownloadFile, - JsonWithCharset, - UploadFiles, - InlineComposition, - ArrayOfEnums, - MultipleRequestBodyContentTypes, - SlashRoute, - FakeHealthGet, - DeleteCoffee, - CaseSensitiveParams, - RefObjectInQuery, - QueryParameterCollectionFormat, - UploadFile, - ArrayModel, - MultipleSecurities, - ObjectModelWithRefProps, - NumberWithValidations, - MultipleResponseBodies, - InlineAdditionalProperties, - Redirection, - AdditionalPropertiesWithArrayOfEnums, - StringEnum, - GroupParameters, - EnumParameters, - ClientModel, - EndpointParameters, - BodyWithQueryParams, - ComposedOneOfDifferentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py deleted file mode 100644 index 842ec42eede..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/fake_classname_tags123_api.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.fake_classname_test.patch.operation import Classname - - -class FakeClassnameTags123Api( - Classname, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py deleted file mode 100644 index d0f66b13a36..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/pet_api.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.pet_find_by_status.get.operation import FindPetsByStatus -from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.operation import UploadFileWithRequiredFile -from openapi_client.paths.pet.post.operation import AddPet -from openapi_client.paths.pet.put.operation import UpdatePet -from openapi_client.paths.pet_pet_id.delete.operation import DeletePet -from openapi_client.paths.pet_pet_id.get.operation import GetPetById -from openapi_client.paths.pet_pet_id.post.operation import UpdatePetWithForm -from openapi_client.paths.pet_pet_id_upload_image.post.operation import UploadImage -from openapi_client.paths.pet_find_by_tags.get.operation import FindPetsByTags - - -class PetApi( - FindPetsByStatus, - UploadFileWithRequiredFile, - AddPet, - UpdatePet, - DeletePet, - GetPetById, - UpdatePetWithForm, - UploadImage, - FindPetsByTags, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py deleted file mode 100644 index c04ff91ddc5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/store_api.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.store_order_order_id.delete.operation import DeleteOrder -from openapi_client.paths.store_order_order_id.get.operation import GetOrderById -from openapi_client.paths.store_order.post.operation import PlaceOrder -from openapi_client.paths.store_inventory.get.operation import GetInventory - - -class StoreApi( - DeleteOrder, - GetOrderById, - PlaceOrder, - GetInventory, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py b/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py deleted file mode 100644 index 1f4d8c54c72..00000000000 --- a/samples/client/petstore/python/src/openapi_client/apis/tags/user_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.paths.user_create_with_array.post.operation import CreateUsersWithArrayInput -from openapi_client.paths.user_login.get.operation import LoginUser -from openapi_client.paths.user_username.delete.operation import DeleteUser -from openapi_client.paths.user_username.get.operation import GetUserByName -from openapi_client.paths.user_username.put.operation import UpdateUser -from openapi_client.paths.user_create_with_list.post.operation import CreateUsersWithListInput -from openapi_client.paths.user_logout.get.operation import LogoutUser -from openapi_client.paths.user.post.operation import CreateUser - - -class UserApi( - CreateUsersWithArrayInput, - LoginUser, - DeleteUser, - GetUserByName, - UpdateUser, - CreateUsersWithListInput, - LogoutUser, - CreateUser, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/petstore/python/src/openapi_client/components/__init__.py b/samples/client/petstore/python/src/openapi_client/components/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py deleted file mode 100644 index 36b07403a85..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from .content.application_json import schema as application_json_schema - - -class Int32JsonContentTypeHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py deleted file mode 100644 index 6e99ff53420..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int32Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py deleted file mode 100644 index ebcb275404d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class NumberHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py deleted file mode 100644 index 8c0cdd67a6c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_number_header/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.DecimalSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py deleted file mode 100644 index 8fec76789bb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from .content.application_json import schema as application_json_schema - - -class RefContentSchemaHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py deleted file mode 100644 index c85ecf13950..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_with_validation -Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py deleted file mode 100644 index aaef64c81ee..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class RefSchemaHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py deleted file mode 100644 index c85ecf13950..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_schema_header/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_with_validation -Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py deleted file mode 100644 index 4c4d6ab10e9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_ref_string_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_string_header -RefStringHeader = header_string_header.StringHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py deleted file mode 100644 index 5e3e8b4ff53..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class StringHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/headers/header_string_header/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py deleted file mode 100644 index 88944efe171..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class ComponentRefSchemaStringWithValidation(api_client.PathParameter): - name = "CRSstringWithValidation" - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py deleted file mode 100644 index c85ecf13950..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_with_validation -Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py deleted file mode 100644 index 03bb3914d15..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class PathUserName(api_client.PathParameter): - name = "username" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_path_user_name/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py deleted file mode 100644 index 60e6da28931..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.parameters import parameter_path_user_name -RefPathUserName = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py deleted file mode 100644 index 377c2da06a9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class RefSchemaStringWithValidation(api_client.PathParameter): - name = "RSstringWithValidation" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py b/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py deleted file mode 100644 index c85ecf13950..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_with_validation -Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py deleted file mode 100644 index de6ac29bbc3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class Client(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py deleted file mode 100644 index c1e1b8bec36..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client -Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py deleted file mode 100644 index 3cc41a0b7bb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .content.application_xml import schema as application_xml_schema - - -class Pet(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - 'application/xml': ApplicationXmlMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py deleted file mode 100644 index 0259ab108b6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pet -Schema: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py deleted file mode 100644 index 926c64496e4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_pet -Schema: typing_extensions.TypeAlias = ref_pet.RefPet diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py deleted file mode 100644 index 51cb22ca765..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_user_array -RefUserArray = request_body_user_array.UserArray diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py deleted file mode 100644 index 65052e82fc5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class UserArray(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py deleted file mode 100644 index 6bc146dd5f5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import user - - -class SchemaTuple( - typing.Tuple[ - user.UserDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Union[ - user.UserDictInput, - user.UserDict, - ], - ], - typing.Tuple[ - typing.Union[ - user.UserDictInput, - user.UserDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[user.User] = dataclasses.field(default_factory=lambda: user.User) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py deleted file mode 100644 index 91dadef2df0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .headers import header_location -from . import header_parameters -parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { - 'location': header_location.Location, -} - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - headers: header_parameters.HeadersDict - body: schemas.Unset - - -class HeadersWithNoBody(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - headers=parameters - headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py deleted file mode 100644 index c70623e07f1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.responses.response_headers_with_no_body.headers.header_location import schema -Properties = typing.TypedDict( - 'Properties', - { - "location": typing.Type[schema.Schema], - } -) - - -class HeadersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "location", - }) - - def __new__( - cls, - *, - location: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("location", location), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeadersDictInput, arg_) - return Headers.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeadersDictInput, - HeadersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return Headers.validate(arg, configuration=configuration) - - @property - def location(self) -> typing.Union[str, schemas.Unset]: - val = self.get("location", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -HeadersDictInput = typing.TypedDict( - 'HeadersDictInput', - { - "location": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class Headers( - schemas.Schema[HeadersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeadersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeadersDictInput, - HeadersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py deleted file mode 100644 index eb00b8d1525..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Location(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py deleted file mode 100644 index fdec53da3a7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_success_description_only/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -RefSuccessDescriptionOnly = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py deleted file mode 100644 index 026392a3540..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_successful_xml_and_json_array_of_pet -RefSuccessfulXmlAndJsonArrayOfPet = response_successful_xml_and_json_array_of_pet.SuccessfulXmlAndJsonArrayOfPet -ApiResponse = response_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py deleted file mode 100644 index a5647fcb110..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_description_only/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class SuccessDescriptionOnly(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py deleted file mode 100644 index 4b82a657157..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .headers import header_some_header -from . import header_parameters -parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { - 'someHeader': header_some_header.SomeHeader, -} - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.SchemaDict - headers: header_parameters.HeadersDict - - -class SuccessInlineContentAndHeader(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - headers=parameters - headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py deleted file mode 100644 index f7aac3d1568..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.Int32Schema - - -class SchemaDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: int, - ): - used_kwargs = typing.cast(SchemaDictInput, kwargs) - return Schema.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) -SchemaDictInput = typing.Mapping[ - str, - int, -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py deleted file mode 100644 index 759fa696017..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.responses.response_success_inline_content_and_header.headers.header_some_header import schema -Properties = typing.TypedDict( - 'Properties', - { - "someHeader": typing.Type[schema.Schema], - } -) - - -class HeadersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someHeader", - }) - - def __new__( - cls, - *, - someHeader: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someHeader", someHeader), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeadersDictInput, arg_) - return Headers.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeadersDictInput, - HeadersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return Headers.validate(arg, configuration=configuration) - - @property - def someHeader(self) -> typing.Union[str, schemas.Unset]: - val = self.get("someHeader", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -HeadersDictInput = typing.TypedDict( - 'HeadersDictInput', - { - "someHeader": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class Headers( - schemas.Schema[HeadersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeadersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeadersDictInput, - HeadersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py deleted file mode 100644 index 3cd15288de5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class SomeHeader(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py deleted file mode 100644 index ea2e1f64f29..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .headers import header_ref_schema_header -from .headers import header_int32 -from .headers import header_ref_content_schema_header -from .headers import header_string_header -from .headers import header_number_header -from . import header_parameters -parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { - 'ref-schema-header': header_ref_schema_header.RefSchemaHeader, - 'int32': header_int32.Int32, - 'ref-content-schema-header': header_ref_content_schema_header.RefContentSchemaHeader, - 'stringHeader': header_string_header.StringHeader, - 'numberHeader': header_number_header.NumberHeader, -} - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.api_response.ApiResponseDict - headers: header_parameters.HeadersDict - - -class SuccessWithJsonApiResponse(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - headers=parameters - headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py deleted file mode 100644 index d3dc5adb905..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import api_response -Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py deleted file mode 100644 index 4f860701310..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.headers.header_int32_json_content_type_header.content.application_json import schema -from openapi_client.components.headers.header_number_header import schema as schema_3 -from openapi_client.components.headers.header_string_header import schema as schema_2 -from openapi_client.components.schema import string_with_validation -Properties = typing.TypedDict( - 'Properties', - { - "ref-schema-header": typing.Type[string_with_validation.StringWithValidation], - "int32": typing.Type[schema.Schema], - "ref-content-schema-header": typing.Type[string_with_validation.StringWithValidation], - "stringHeader": typing.Type[schema_2.Schema], - "numberHeader": typing.Type[schema_3.Schema], - } -) -HeadersRequiredDictInput = typing.TypedDict( - 'HeadersRequiredDictInput', - { - "int32": int, - "ref-content-schema-header": str, - "ref-schema-header": str, - "stringHeader": str, - } -) -HeadersOptionalDictInput = typing.TypedDict( - 'HeadersOptionalDictInput', - { - "numberHeader": str, - }, - total=False -) - - -class HeadersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "int32", - "ref-content-schema-header", - "ref-schema-header", - "stringHeader", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "numberHeader", - }) - - def __new__( - cls, - *, - int32: int, - stringHeader: str, - numberHeader: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "int32": int32, - "stringHeader": stringHeader, - } - for key_, val in ( - ("numberHeader", numberHeader), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeadersDictInput, arg_) - return Headers.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeadersDictInput, - HeadersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return Headers.validate(arg, configuration=configuration) - - @property - def int32(self) -> int: - return typing.cast( - int, - self.__getitem__("int32") - ) - - @property - def stringHeader(self) -> str: - return typing.cast( - str, - self.__getitem__("stringHeader") - ) - - @property - def numberHeader(self) -> typing.Union[str, schemas.Unset]: - val = self.get("numberHeader", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - -class HeadersDictInput(HeadersRequiredDictInput, HeadersOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class Headers( - schemas.Schema[HeadersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "int32", - "ref-content-schema-header", - "ref-schema-header", - "stringHeader", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeadersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeadersDictInput, - HeadersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py deleted file mode 100644 index 661b9f2d216..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_int32_json_content_type_header -Int32 = header_int32_json_content_type_header.Int32JsonContentTypeHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py deleted file mode 100644 index 2fb16e7186a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_number_header -NumberHeader = header_number_header.NumberHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py deleted file mode 100644 index 9d425ecc610..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_ref_content_schema_header -RefContentSchemaHeader = header_ref_content_schema_header.RefContentSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py deleted file mode 100644 index 710ad30499c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_ref_schema_header -RefSchemaHeader = header_ref_schema_header.RefSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py deleted file mode 100644 index b90033ab2cf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_ref_string_header -StringHeader = header_ref_string_header.RefStringHeader diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py deleted file mode 100644 index 33f79f32a32..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - application_xml_schema.SchemaTuple, - application_json_schema.SchemaTuple, - ] - headers: schemas.Unset - - -class SuccessfulXmlAndJsonArrayOfPet(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py deleted file mode 100644 index a1393887f15..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import ref_pet - - -class SchemaTuple( - typing.Tuple[ - ref_pet.pet.PetDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ref_pet.pet.PetDictInput, - ref_pet.pet.PetDict, - ], - ], - typing.Tuple[ - typing.Union[ - ref_pet.pet.PetDictInput, - ref_pet.pet.PetDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[ref_pet.RefPet] = dataclasses.field(default_factory=lambda: ref_pet.RefPet) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py deleted file mode 100644 index ca23bfa54a2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import pet - - -class SchemaTuple( - typing.Tuple[ - pet.PetDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - ], - typing.Tuple[ - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[pet.Pet] = dataclasses.field(default_factory=lambda: pet.Pet) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py b/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py deleted file mode 100644 index 45c511a8523..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/_200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.Int32Schema -Class: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - "class": typing.Type[Class], - } -) - - -class _200ResponseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - "class", - }) - - def __new__( - cls, - *, - name: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - class: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("name", name), - ("class", class), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_200ResponseDictInput, arg_) - return _200Response.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _200ResponseDictInput, - _200ResponseDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _200ResponseDict: - return _200Response.validate(arg, configuration=configuration) - - @property - def name(self) -> typing.Union[int, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def class(self) -> typing.Union[str, schemas.Unset]: - val = self.get("class", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_200ResponseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _200Response( - schemas.AnyTypeSchema[_200ResponseDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - model with an invalid class name for python, starts with a number - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _200ResponseDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py b/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py deleted file mode 100644 index e3edab2dc1c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from openapi_client.components.schemas import ModelA, ModelB diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py b/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py deleted file mode 100644 index c8ca03332f3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/abstract_step_message.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Discriminator: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "discriminator": typing.Type[Discriminator], - } -) - - -class AbstractStepMessageDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "description", - "discriminator", - "sequenceNumber", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - description: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - discriminator: str, - sequenceNumber: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "description": description, - "discriminator": discriminator, - "sequenceNumber": sequenceNumber, - } - arg_.update(kwargs) - used_arg_ = typing.cast(AbstractStepMessageDictInput, arg_) - return AbstractStepMessage.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AbstractStepMessageDictInput, - AbstractStepMessageDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AbstractStepMessageDict: - return AbstractStepMessage.validate(arg, configuration=configuration) - - @property - def description(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("description") - - @property - def discriminator(self) -> str: - return typing.cast( - str, - self.__getitem__("discriminator") - ) - - @property - def sequenceNumber(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("sequenceNumber") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AbstractStepMessageDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] -AnyOf = typing.Tuple[ - typing.Type['AbstractStepMessage'], -] - - -@dataclasses.dataclass(frozen=True) -class AbstractStepMessage( - schemas.Schema[AbstractStepMessageDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Abstract Step - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "description", - "discriminator", - "sequenceNumber", - }) - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'discriminator': { - 'AbstractStepMessage': AbstractStepMessage, - } - } - ) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AbstractStepMessageDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AbstractStepMessageDictInput, - AbstractStepMessageDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AbstractStepMessageDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py deleted file mode 100644 index 5e0aa6e287f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_class.py +++ /dev/null @@ -1,650 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema - - -class MapPropertyDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - used_kwargs = typing.cast(MapPropertyDictInput, kwargs) - return MapProperty.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapPropertyDictInput, - MapPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapPropertyDict: - return MapProperty.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -MapPropertyDictInput = typing.Mapping[ - str, - str, -] - - -@dataclasses.dataclass(frozen=True) -class MapProperty( - schemas.Schema[MapPropertyDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapPropertyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapPropertyDictInput, - MapPropertyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapPropertyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AdditionalProperties3: typing_extensions.TypeAlias = schemas.StrSchema - - -class AdditionalPropertiesDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - used_kwargs = typing.cast(AdditionalPropertiesDictInput, kwargs) - return AdditionalProperties2.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesDict: - return AdditionalProperties2.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -AdditionalPropertiesDictInput = typing.Mapping[ - str, - str, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties2( - schemas.Schema[AdditionalPropertiesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class MapOfMapPropertyDict(schemas.immutabledict[str, AdditionalPropertiesDict]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], - ): - used_kwargs = typing.cast(MapOfMapPropertyDictInput, kwargs) - return MapOfMapProperty.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapOfMapPropertyDictInput, - MapOfMapPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapOfMapPropertyDict: - return MapOfMapProperty.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesDict, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - AdditionalPropertiesDict, - val - ) -MapOfMapPropertyDictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], -] - - -@dataclasses.dataclass(frozen=True) -class MapOfMapProperty( - schemas.Schema[MapOfMapPropertyDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapOfMapPropertyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapOfMapPropertyDictInput, - MapOfMapPropertyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapOfMapPropertyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -Anytype1: typing_extensions.TypeAlias = schemas.AnyTypeSchema -MapWithUndeclaredPropertiesAnytype1: typing_extensions.TypeAlias = schemas.DictSchema -MapWithUndeclaredPropertiesAnytype2: typing_extensions.TypeAlias = schemas.DictSchema -AdditionalProperties4: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class MapWithUndeclaredPropertiesAnytype3Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - used_kwargs = typing.cast(MapWithUndeclaredPropertiesAnytype3DictInput, kwargs) - return MapWithUndeclaredPropertiesAnytype3.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapWithUndeclaredPropertiesAnytype3DictInput, - MapWithUndeclaredPropertiesAnytype3Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapWithUndeclaredPropertiesAnytype3Dict: - return MapWithUndeclaredPropertiesAnytype3.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -MapWithUndeclaredPropertiesAnytype3DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class MapWithUndeclaredPropertiesAnytype3( - schemas.Schema[MapWithUndeclaredPropertiesAnytype3Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapWithUndeclaredPropertiesAnytype3Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapWithUndeclaredPropertiesAnytype3DictInput, - MapWithUndeclaredPropertiesAnytype3Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapWithUndeclaredPropertiesAnytype3Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AdditionalProperties5: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -class EmptyMapDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - # map with no key value pairs - def __new__( - cls, - arg: EmptyMapDictInput, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return EmptyMap.validate(arg, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - EmptyMapDictInput, - EmptyMapDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EmptyMapDict: - return EmptyMap.validate(arg, configuration=configuration) -EmptyMapDictInput = typing.Mapping # mapping must be empty - - -@dataclasses.dataclass(frozen=True) -class EmptyMap( - schemas.Schema[EmptyMapDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties5] = dataclasses.field(default_factory=lambda: AdditionalProperties5) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: EmptyMapDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EmptyMapDictInput, - EmptyMapDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EmptyMapDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AdditionalProperties6: typing_extensions.TypeAlias = schemas.StrSchema - - -class MapWithUndeclaredPropertiesStringDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - used_kwargs = typing.cast(MapWithUndeclaredPropertiesStringDictInput, kwargs) - return MapWithUndeclaredPropertiesString.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapWithUndeclaredPropertiesStringDictInput, - MapWithUndeclaredPropertiesStringDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapWithUndeclaredPropertiesStringDict: - return MapWithUndeclaredPropertiesString.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -MapWithUndeclaredPropertiesStringDictInput = typing.Mapping[ - str, - str, -] - - -@dataclasses.dataclass(frozen=True) -class MapWithUndeclaredPropertiesString( - schemas.Schema[MapWithUndeclaredPropertiesStringDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties6] = dataclasses.field(default_factory=lambda: AdditionalProperties6) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapWithUndeclaredPropertiesStringDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapWithUndeclaredPropertiesStringDictInput, - MapWithUndeclaredPropertiesStringDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapWithUndeclaredPropertiesStringDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -Properties = typing.TypedDict( - 'Properties', - { - "map_property": typing.Type[MapProperty], - "map_of_map_property": typing.Type[MapOfMapProperty], - "anytype_1": typing.Type[Anytype1], - "map_with_undeclared_properties_anytype_1": typing.Type[MapWithUndeclaredPropertiesAnytype1], - "map_with_undeclared_properties_anytype_2": typing.Type[MapWithUndeclaredPropertiesAnytype2], - "map_with_undeclared_properties_anytype_3": typing.Type[MapWithUndeclaredPropertiesAnytype3], - "empty_map": typing.Type[EmptyMap], - "map_with_undeclared_properties_string": typing.Type[MapWithUndeclaredPropertiesString], - } -) - - -class AdditionalPropertiesClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "map_property", - "map_of_map_property", - "anytype_1", - "map_with_undeclared_properties_anytype_1", - "map_with_undeclared_properties_anytype_2", - "map_with_undeclared_properties_anytype_3", - "empty_map", - "map_with_undeclared_properties_string", - }) - - def __new__( - cls, - *, - map_property: typing.Union[ - MapPropertyDictInput, - MapPropertyDict, - schemas.Unset - ] = schemas.unset, - map_of_map_property: typing.Union[ - MapOfMapPropertyDictInput, - MapOfMapPropertyDict, - schemas.Unset - ] = schemas.unset, - anytype_1: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - map_with_undeclared_properties_anytype_1: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - schemas.Unset - ] = schemas.unset, - map_with_undeclared_properties_anytype_2: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - schemas.Unset - ] = schemas.unset, - map_with_undeclared_properties_anytype_3: typing.Union[ - MapWithUndeclaredPropertiesAnytype3DictInput, - MapWithUndeclaredPropertiesAnytype3Dict, - schemas.Unset - ] = schemas.unset, - empty_map: typing.Union[ - EmptyMapDictInput, - EmptyMapDict, - schemas.Unset - ] = schemas.unset, - map_with_undeclared_properties_string: typing.Union[ - MapWithUndeclaredPropertiesStringDictInput, - MapWithUndeclaredPropertiesStringDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("map_property", map_property), - ("map_of_map_property", map_of_map_property), - ("anytype_1", anytype_1), - ("map_with_undeclared_properties_anytype_1", map_with_undeclared_properties_anytype_1), - ("map_with_undeclared_properties_anytype_2", map_with_undeclared_properties_anytype_2), - ("map_with_undeclared_properties_anytype_3", map_with_undeclared_properties_anytype_3), - ("empty_map", empty_map), - ("map_with_undeclared_properties_string", map_with_undeclared_properties_string), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AdditionalPropertiesClassDictInput, arg_) - return AdditionalPropertiesClass.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalPropertiesClassDictInput, - AdditionalPropertiesClassDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesClassDict: - return AdditionalPropertiesClass.validate(arg, configuration=configuration) - - @property - def map_property(self) -> typing.Union[MapPropertyDict, schemas.Unset]: - val = self.get("map_property", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapPropertyDict, - val - ) - - @property - def map_of_map_property(self) -> typing.Union[MapOfMapPropertyDict, schemas.Unset]: - val = self.get("map_of_map_property", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapOfMapPropertyDict, - val - ) - - @property - def anytype_1(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("anytype_1", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def map_with_undeclared_properties_anytype_1(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("map_with_undeclared_properties_anytype_1", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) - - @property - def map_with_undeclared_properties_anytype_2(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("map_with_undeclared_properties_anytype_2", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) - - @property - def map_with_undeclared_properties_anytype_3(self) -> typing.Union[MapWithUndeclaredPropertiesAnytype3Dict, schemas.Unset]: - val = self.get("map_with_undeclared_properties_anytype_3", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapWithUndeclaredPropertiesAnytype3Dict, - val - ) - - @property - def empty_map(self) -> typing.Union[EmptyMapDict, schemas.Unset]: - val = self.get("empty_map", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - EmptyMapDict, - val - ) - - @property - def map_with_undeclared_properties_string(self) -> typing.Union[MapWithUndeclaredPropertiesStringDict, schemas.Unset]: - val = self.get("map_with_undeclared_properties_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapWithUndeclaredPropertiesStringDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AdditionalPropertiesClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AdditionalPropertiesClass( - schemas.Schema[AdditionalPropertiesClassDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalPropertiesClassDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalPropertiesClassDictInput, - AdditionalPropertiesClassDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesClassDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py deleted file mode 100644 index 96a936ed62e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_schema.py +++ /dev/null @@ -1,280 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class _0Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - used_kwargs = typing.cast(_0DictInput, kwargs) - return _0.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _0DictInput, - _0Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return _0.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -_0DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.Schema[_0Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _0Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _0DictInput, - _0Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _0Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties2( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - min_length: int = 3 - - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ): - used_kwargs = typing.cast(_1DictInput, kwargs) - return _1.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -_1DictInput = typing.Mapping[ - str, - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], -] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties3( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - max_length: int = 5 - - - -class _2Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ): - used_kwargs = typing.cast(_2DictInput, kwargs) - return _2.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _2DictInput, - _2Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _2Dict: - return _2.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -_2DictInput = typing.Mapping[ - str, - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], -] - - -@dataclasses.dataclass(frozen=True) -class _2( - schemas.Schema[_2Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _2Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _2DictInput, - _2Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _2Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - typing.Type[_2], -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalPropertiesSchema( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py b/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py deleted file mode 100644 index faaa149de05..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/additional_properties_with_array_of_enums.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import enum_class - - -class AdditionalPropertiesTuple( - typing.Tuple[ - typing.Literal["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M"], - ... - ] -): - - def __new__(cls, arg: typing.Union[AdditionalPropertiesTupleInput, AdditionalPropertiesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return AdditionalProperties.validate(arg, configuration=configuration) -AdditionalPropertiesTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M" - ], - ], - typing.Tuple[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties( - schemas.Schema[schemas.immutabledict, AdditionalPropertiesTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[enum_class.EnumClass] = dataclasses.field(default_factory=lambda: enum_class.EnumClass) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: AdditionalPropertiesTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalPropertiesTupleInput, - AdditionalPropertiesTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class AdditionalPropertiesWithArrayOfEnumsDict(schemas.immutabledict[str, AdditionalPropertiesTuple]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalPropertiesTupleInput, - AdditionalPropertiesTuple - ], - ): - used_kwargs = typing.cast(AdditionalPropertiesWithArrayOfEnumsDictInput, kwargs) - return AdditionalPropertiesWithArrayOfEnums.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalPropertiesWithArrayOfEnumsDictInput, - AdditionalPropertiesWithArrayOfEnumsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesWithArrayOfEnumsDict: - return AdditionalPropertiesWithArrayOfEnums.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesTuple, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - AdditionalPropertiesTuple, - val - ) -AdditionalPropertiesWithArrayOfEnumsDictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalPropertiesTupleInput, - AdditionalPropertiesTuple - ], -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalPropertiesWithArrayOfEnums( - schemas.Schema[AdditionalPropertiesWithArrayOfEnumsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalPropertiesWithArrayOfEnumsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalPropertiesWithArrayOfEnumsDictInput, - AdditionalPropertiesWithArrayOfEnumsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesWithArrayOfEnumsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/address.py b/samples/client/petstore/python/src/openapi_client/components/schema/address.py deleted file mode 100644 index 587ee5f7c2e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/address.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.IntSchema - - -class AddressDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: int, - ): - used_kwargs = typing.cast(AddressDictInput, kwargs) - return Address.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AddressDictInput, - AddressDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AddressDict: - return Address.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[int, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) -AddressDictInput = typing.Mapping[ - str, - int, -] - - -@dataclasses.dataclass(frozen=True) -class Address( - schemas.Schema[AddressDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AddressDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AddressDictInput, - AddressDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AddressDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/animal.py b/samples/client/petstore/python/src/openapi_client/components/schema/animal.py deleted file mode 100644 index 3daaf0428b9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/animal.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -ClassName: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class Color( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["red"] = "red" -Properties = typing.TypedDict( - 'Properties', - { - "className": typing.Type[ClassName], - "color": typing.Type[Color], - } -) - - -class AnimalDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "className", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "color", - }) - - def __new__( - cls, - *, - className: str, - color: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "className": className, - } - for key_, val in ( - ("color", color), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AnimalDictInput, arg_) - return Animal.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AnimalDictInput, - AnimalDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AnimalDict: - return Animal.validate(arg, configuration=configuration) - - @property - def className(self) -> str: - return typing.cast( - str, - self.__getitem__("className") - ) - - @property - def color(self) -> typing.Union[str, schemas.Unset]: - val = self.get("color", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AnimalDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Animal( - schemas.Schema[AnimalDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "className", - }) - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'className': { - 'Cat': cat.Cat, - 'Dog': dog.Dog, - } - } - ) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AnimalDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AnimalDictInput, - AnimalDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AnimalDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - -from openapi_client.components.schema import cat -from openapi_client.components.schema import dog diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py b/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py deleted file mode 100644 index 3101c2d6b75..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/animal_farm.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import animal - - -class AnimalFarmTuple( - typing.Tuple[ - animal.AnimalDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[AnimalFarmTupleInput, AnimalFarmTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return AnimalFarm.validate(arg, configuration=configuration) -AnimalFarmTupleInput = typing.Union[ - typing.List[ - typing.Union[ - animal.AnimalDictInput, - animal.AnimalDict, - ], - ], - typing.Tuple[ - typing.Union[ - animal.AnimalDictInput, - animal.AnimalDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class AnimalFarm( - schemas.Schema[schemas.immutabledict, AnimalFarmTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[animal.Animal] = dataclasses.field(default_factory=lambda: animal.Animal) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: AnimalFarmTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AnimalFarmTupleInput, - AnimalFarmTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AnimalFarmTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py deleted file mode 100644 index ca84f9d4be2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_and_format.py +++ /dev/null @@ -1,295 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Uuid( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'uuid' - - - -@dataclasses.dataclass(frozen=True) -class Date( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'date' - - - -@dataclasses.dataclass(frozen=True) -class DateTime( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'date-time' - - - -@dataclasses.dataclass(frozen=True) -class Number( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'number' - - - -@dataclasses.dataclass(frozen=True) -class Binary( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'binary' - - - -@dataclasses.dataclass(frozen=True) -class Int32( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'int32' - - - -@dataclasses.dataclass(frozen=True) -class Int64( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'int64' - - - -@dataclasses.dataclass(frozen=True) -class Double( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'double' - - - -@dataclasses.dataclass(frozen=True) -class Float( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - format: str = 'float' - -Properties = typing.TypedDict( - 'Properties', - { - "uuid": typing.Type[Uuid], - "date": typing.Type[Date], - "date-time": typing.Type[DateTime], - "number": typing.Type[Number], - "binary": typing.Type[Binary], - "int32": typing.Type[Int32], - "int64": typing.Type[Int64], - "double": typing.Type[Double], - "float": typing.Type[Float], - } -) - - -class AnyTypeAndFormatDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "uuid", - "date", - "date-time", - "number", - "binary", - "int32", - "int64", - "double", - "float", - }) - - def __new__( - cls, - *, - uuid: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - date: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - number: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - binary: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - int32: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - int64: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - double: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - float: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("uuid", uuid), - ("date", date), - ("number", number), - ("binary", binary), - ("int32", int32), - ("int64", int64), - ("double", double), - ("float", float), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AnyTypeAndFormatDictInput, arg_) - return AnyTypeAndFormat.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AnyTypeAndFormatDictInput, - AnyTypeAndFormatDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AnyTypeAndFormatDict: - return AnyTypeAndFormat.validate(arg, configuration=configuration) - - @property - def uuid(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def date(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("date", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def number(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("number", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def binary(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("binary", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def int32(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("int32", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def int64(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("int64", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def double(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("double", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def float(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AnyTypeAndFormatDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class AnyTypeAndFormat( - schemas.Schema[AnyTypeAndFormatDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AnyTypeAndFormatDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AnyTypeAndFormatDictInput, - AnyTypeAndFormatDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AnyTypeAndFormatDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py deleted file mode 100644 index ec62fe2c822..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/any_type_not_string.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not: typing_extensions.TypeAlias = schemas.StrSchema - - -@dataclasses.dataclass(frozen=True) -class AnyTypeNotString( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py b/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py deleted file mode 100644 index 833210dd37e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/api_response.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Code: typing_extensions.TypeAlias = schemas.Int32Schema -Type: typing_extensions.TypeAlias = schemas.StrSchema -Message: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "code": typing.Type[Code], - "type": typing.Type[Type], - "message": typing.Type[Message], - } -) - - -class ApiResponseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "code", - "type", - "message", - }) - - def __new__( - cls, - *, - code: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - type: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - message: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("code", code), - ("type", type), - ("message", message), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ApiResponseDictInput, arg_) - return ApiResponse.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ApiResponseDictInput, - ApiResponseDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ApiResponseDict: - return ApiResponse.validate(arg, configuration=configuration) - - @property - def code(self) -> typing.Union[int, schemas.Unset]: - val = self.get("code", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def type(self) -> typing.Union[str, schemas.Unset]: - val = self.get("type", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def message(self) -> typing.Union[str, schemas.Unset]: - val = self.get("message", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ApiResponseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse( - schemas.Schema[ApiResponseDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ApiResponseDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ApiResponseDictInput, - ApiResponseDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ApiResponseDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/apple.py b/samples/client/petstore/python/src/openapi_client/components/schema/apple.py deleted file mode 100644 index a7e6c5255ba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/apple.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Cultivar( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^[a-zA-Z\s]*$' # noqa: E501 - ) - - -@dataclasses.dataclass(frozen=True) -class Origin( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^[A-Z\s]*$', # noqa: E501 - flags=re.I, - ) -Properties = typing.TypedDict( - 'Properties', - { - "cultivar": typing.Type[Cultivar], - "origin": typing.Type[Origin], - } -) - - -class AppleDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "cultivar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "origin", - }) - - def __new__( - cls, - *, - cultivar: str, - origin: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "cultivar": cultivar, - } - for key_, val in ( - ("origin", origin), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(AppleDictInput, arg_) - return Apple.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AppleDictInput, - AppleDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AppleDict: - return Apple.validate(arg, configuration=configuration) - - @property - def cultivar(self) -> str: - return typing.cast( - str, - self.__getitem__("cultivar") - ) - - @property - def origin(self) -> typing.Union[str, schemas.Unset]: - val = self.get("origin", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -AppleDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Apple( - schemas.Schema[AppleDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - required: typing.FrozenSet[str] = frozenset({ - "cultivar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AppleDict, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - AppleDictInput, - AppleDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AppleDict: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py deleted file mode 100644 index a8b7d3bc0af..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/apple_req.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Cultivar: typing_extensions.TypeAlias = schemas.StrSchema -Mealy: typing_extensions.TypeAlias = schemas.BoolSchema -Properties = typing.TypedDict( - 'Properties', - { - "cultivar": typing.Type[Cultivar], - "mealy": typing.Type[Mealy], - } -) -AppleReqRequiredDictInput = typing.TypedDict( - 'AppleReqRequiredDictInput', - { - "cultivar": str, - } -) -AppleReqOptionalDictInput = typing.TypedDict( - 'AppleReqOptionalDictInput', - { - "mealy": bool, - }, - total=False -) - - -class AppleReqDict(schemas.immutabledict[str, typing.Union[ - bool, - str, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "cultivar", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "mealy", - }) - - def __new__( - cls, - *, - cultivar: str, - mealy: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "cultivar": cultivar, - } - for key_, val in ( - ("mealy", mealy), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(AppleReqDictInput, arg_) - return AppleReq.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AppleReqDictInput, - AppleReqDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AppleReqDict: - return AppleReq.validate(arg, configuration=configuration) - - @property - def cultivar(self) -> str: - return typing.cast( - str, - self.__getitem__("cultivar") - ) - - @property - def mealy(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("mealy", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - -class AppleReqDictInput(AppleReqRequiredDictInput, AppleReqOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class AppleReq( - schemas.Schema[AppleReqDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "cultivar", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AppleReqDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AppleReqDictInput, - AppleReqDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AppleReqDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py deleted file mode 100644 index 669a0d92647..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_holding_any_type.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class ArrayHoldingAnyTypeTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayHoldingAnyTypeTupleInput, ArrayHoldingAnyTypeTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayHoldingAnyType.validate(arg, configuration=configuration) -ArrayHoldingAnyTypeTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayHoldingAnyType( - schemas.Schema[schemas.immutabledict, ArrayHoldingAnyTypeTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayHoldingAnyTypeTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayHoldingAnyTypeTupleInput, - ArrayHoldingAnyTypeTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayHoldingAnyTypeTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py deleted file mode 100644 index de9b1499382..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_array_of_number_only.py +++ /dev/null @@ -1,223 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items2: typing_extensions.TypeAlias = schemas.NumberSchema - - -class ItemsTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items.validate(arg, configuration=configuration) -ItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema[schemas.immutabledict, ItemsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput, - ItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ArrayArrayNumberTuple( - typing.Tuple[ - ItemsTuple, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayArrayNumberTupleInput, ArrayArrayNumberTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayArrayNumber.validate(arg, configuration=configuration) -ArrayArrayNumberTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayArrayNumber( - schemas.Schema[schemas.immutabledict, ArrayArrayNumberTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayArrayNumberTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayArrayNumberTupleInput, - ArrayArrayNumberTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayArrayNumberTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "ArrayArrayNumber": typing.Type[ArrayArrayNumber], - } -) - - -class ArrayOfArrayOfNumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "ArrayArrayNumber", - }) - - def __new__( - cls, - *, - ArrayArrayNumber: typing.Union[ - ArrayArrayNumberTupleInput, - ArrayArrayNumberTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("ArrayArrayNumber", ArrayArrayNumber), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ArrayOfArrayOfNumberOnlyDictInput, arg_) - return ArrayOfArrayOfNumberOnly.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ArrayOfArrayOfNumberOnlyDictInput, - ArrayOfArrayOfNumberOnlyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfArrayOfNumberOnlyDict: - return ArrayOfArrayOfNumberOnly.validate(arg, configuration=configuration) - - @property - def ArrayArrayNumber(self) -> typing.Union[ArrayArrayNumberTuple, schemas.Unset]: - val = self.get("ArrayArrayNumber", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayArrayNumberTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ArrayOfArrayOfNumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ArrayOfArrayOfNumberOnly( - schemas.Schema[ArrayOfArrayOfNumberOnlyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ArrayOfArrayOfNumberOnlyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayOfArrayOfNumberOnlyDictInput, - ArrayOfArrayOfNumberOnlyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfArrayOfNumberOnlyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py deleted file mode 100644 index a95dfb0802d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_enums.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import string_enum - - -class ArrayOfEnumsTuple( - typing.Tuple[ - typing.Union[ - None, - typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], - ], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayOfEnumsTupleInput, ArrayOfEnumsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayOfEnums.validate(arg, configuration=configuration) -ArrayOfEnumsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - ], - ], - typing.Tuple[ - typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayOfEnums( - schemas.Schema[schemas.immutabledict, ArrayOfEnumsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[string_enum.StringEnum] = dataclasses.field(default_factory=lambda: string_enum.StringEnum) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayOfEnumsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayOfEnumsTupleInput, - ArrayOfEnumsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfEnumsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py deleted file mode 100644 index ed3680d02d3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_of_number_only.py +++ /dev/null @@ -1,167 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.NumberSchema - - -class ArrayNumberTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayNumberTupleInput, ArrayNumberTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayNumber.validate(arg, configuration=configuration) -ArrayNumberTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayNumber( - schemas.Schema[schemas.immutabledict, ArrayNumberTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayNumberTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayNumberTupleInput, - ArrayNumberTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayNumberTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "ArrayNumber": typing.Type[ArrayNumber], - } -) - - -class ArrayOfNumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "ArrayNumber", - }) - - def __new__( - cls, - *, - ArrayNumber: typing.Union[ - ArrayNumberTupleInput, - ArrayNumberTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("ArrayNumber", ArrayNumber), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ArrayOfNumberOnlyDictInput, arg_) - return ArrayOfNumberOnly.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ArrayOfNumberOnlyDictInput, - ArrayOfNumberOnlyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfNumberOnlyDict: - return ArrayOfNumberOnly.validate(arg, configuration=configuration) - - @property - def ArrayNumber(self) -> typing.Union[ArrayNumberTuple, schemas.Unset]: - val = self.get("ArrayNumber", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayNumberTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ArrayOfNumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ArrayOfNumberOnly( - schemas.Schema[ArrayOfNumberOnlyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ArrayOfNumberOnlyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayOfNumberOnlyDictInput, - ArrayOfNumberOnlyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfNumberOnlyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py deleted file mode 100644 index 3cb1d35f117..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_test.py +++ /dev/null @@ -1,418 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class ArrayOfStringTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayOfStringTupleInput, ArrayOfStringTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayOfString.validate(arg, configuration=configuration) -ArrayOfStringTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayOfString( - schemas.Schema[schemas.immutabledict, ArrayOfStringTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayOfStringTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayOfStringTupleInput, - ArrayOfStringTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayOfStringTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Items3: typing_extensions.TypeAlias = schemas.Int64Schema - - -class ItemsTuple( - typing.Tuple[ - int, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items2.validate(arg, configuration=configuration) -ItemsTupleInput = typing.Union[ - typing.List[ - int, - ], - typing.Tuple[ - int, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items2( - schemas.Schema[schemas.immutabledict, ItemsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput, - ItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ArrayArrayOfIntegerTuple( - typing.Tuple[ - ItemsTuple, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayArrayOfIntegerTupleInput, ArrayArrayOfIntegerTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayArrayOfInteger.validate(arg, configuration=configuration) -ArrayArrayOfIntegerTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput, - ItemsTuple - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayArrayOfInteger( - schemas.Schema[schemas.immutabledict, ArrayArrayOfIntegerTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayArrayOfIntegerTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayArrayOfIntegerTupleInput, - ArrayArrayOfIntegerTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayArrayOfIntegerTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - -from openapi_client.components.schema import read_only_first - - -class ItemsTuple2( - typing.Tuple[ - read_only_first.ReadOnlyFirstDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput2, ItemsTuple2], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items4.validate(arg, configuration=configuration) -ItemsTupleInput2 = typing.Union[ - typing.List[ - typing.Union[ - read_only_first.ReadOnlyFirstDictInput, - read_only_first.ReadOnlyFirstDict, - ], - ], - typing.Tuple[ - typing.Union[ - read_only_first.ReadOnlyFirstDictInput, - read_only_first.ReadOnlyFirstDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items4( - schemas.Schema[schemas.immutabledict, ItemsTuple2] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[read_only_first.ReadOnlyFirst] = dataclasses.field(default_factory=lambda: read_only_first.ReadOnlyFirst) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple2 - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput2, - ItemsTuple2, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple2: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class ArrayArrayOfModelTuple( - typing.Tuple[ - ItemsTuple2, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayArrayOfModelTupleInput, ArrayArrayOfModelTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayArrayOfModel.validate(arg, configuration=configuration) -ArrayArrayOfModelTupleInput = typing.Union[ - typing.List[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ], - typing.Tuple[ - typing.Union[ - ItemsTupleInput2, - ItemsTuple2 - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayArrayOfModel( - schemas.Schema[schemas.immutabledict, ArrayArrayOfModelTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items4] = dataclasses.field(default_factory=lambda: Items4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayArrayOfModelTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayArrayOfModelTupleInput, - ArrayArrayOfModelTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayArrayOfModelTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "array_of_string": typing.Type[ArrayOfString], - "array_array_of_integer": typing.Type[ArrayArrayOfInteger], - "array_array_of_model": typing.Type[ArrayArrayOfModel], - } -) - - -class ArrayTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "array_of_string", - "array_array_of_integer", - "array_array_of_model", - }) - - def __new__( - cls, - *, - array_of_string: typing.Union[ - ArrayOfStringTupleInput, - ArrayOfStringTuple, - schemas.Unset - ] = schemas.unset, - array_array_of_integer: typing.Union[ - ArrayArrayOfIntegerTupleInput, - ArrayArrayOfIntegerTuple, - schemas.Unset - ] = schemas.unset, - array_array_of_model: typing.Union[ - ArrayArrayOfModelTupleInput, - ArrayArrayOfModelTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("array_of_string", array_of_string), - ("array_array_of_integer", array_array_of_integer), - ("array_array_of_model", array_array_of_model), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ArrayTestDictInput, arg_) - return ArrayTest.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ArrayTestDictInput, - ArrayTestDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayTestDict: - return ArrayTest.validate(arg, configuration=configuration) - - @property - def array_of_string(self) -> typing.Union[ArrayOfStringTuple, schemas.Unset]: - val = self.get("array_of_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayOfStringTuple, - val - ) - - @property - def array_array_of_integer(self) -> typing.Union[ArrayArrayOfIntegerTuple, schemas.Unset]: - val = self.get("array_array_of_integer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayArrayOfIntegerTuple, - val - ) - - @property - def array_array_of_model(self) -> typing.Union[ArrayArrayOfModelTuple, schemas.Unset]: - val = self.get("array_array_of_model", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayArrayOfModelTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ArrayTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ArrayTest( - schemas.Schema[ArrayTestDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ArrayTestDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayTestDictInput, - ArrayTestDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayTestDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py b/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py deleted file mode 100644 index 3be8febdf72..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/array_with_validations_in_items.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Int64Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int64' - inclusive_maximum: typing.Union[int, float] = 7 - - -class ArrayWithValidationsInItemsTuple( - typing.Tuple[ - int, - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayWithValidationsInItemsTupleInput, ArrayWithValidationsInItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayWithValidationsInItems.validate(arg, configuration=configuration) -ArrayWithValidationsInItemsTupleInput = typing.Union[ - typing.List[ - int, - ], - typing.Tuple[ - int, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayWithValidationsInItems( - schemas.Schema[schemas.immutabledict, ArrayWithValidationsInItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - max_items: int = 2 - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayWithValidationsInItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayWithValidationsInItemsTupleInput, - ArrayWithValidationsInItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayWithValidationsInItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/banana.py b/samples/client/petstore/python/src/openapi_client/components/schema/banana.py deleted file mode 100644 index 3450011c99a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/banana.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema -Properties = typing.TypedDict( - 'Properties', - { - "lengthCm": typing.Type[LengthCm], - } -) - - -class BananaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "lengthCm", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - lengthCm: typing.Union[ - int, - float - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "lengthCm": lengthCm, - } - arg_.update(kwargs) - used_arg_ = typing.cast(BananaDictInput, arg_) - return Banana.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - BananaDictInput, - BananaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BananaDict: - return Banana.validate(arg, configuration=configuration) - - @property - def lengthCm(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("lengthCm") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -BananaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Banana( - schemas.Schema[BananaDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "lengthCm", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: BananaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - BananaDictInput, - BananaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BananaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py deleted file mode 100644 index b9403b8d51a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/banana_req.py +++ /dev/null @@ -1,147 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -LengthCm: typing_extensions.TypeAlias = schemas.NumberSchema -Sweet: typing_extensions.TypeAlias = schemas.BoolSchema -Properties = typing.TypedDict( - 'Properties', - { - "lengthCm": typing.Type[LengthCm], - "sweet": typing.Type[Sweet], - } -) -BananaReqRequiredDictInput = typing.TypedDict( - 'BananaReqRequiredDictInput', - { - "lengthCm": typing.Union[ - int, - float - ], - } -) -BananaReqOptionalDictInput = typing.TypedDict( - 'BananaReqOptionalDictInput', - { - "sweet": bool, - }, - total=False -) - - -class BananaReqDict(schemas.immutabledict[str, typing.Union[ - bool, - typing.Union[int, float], -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "lengthCm", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "sweet", - }) - - def __new__( - cls, - *, - lengthCm: typing.Union[ - int, - float - ], - sweet: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "lengthCm": lengthCm, - } - for key_, val in ( - ("sweet", sweet), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(BananaReqDictInput, arg_) - return BananaReq.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - BananaReqDictInput, - BananaReqDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BananaReqDict: - return BananaReq.validate(arg, configuration=configuration) - - @property - def lengthCm(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("lengthCm") - ) - - @property - def sweet(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("sweet", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - -class BananaReqDictInput(BananaReqRequiredDictInput, BananaReqOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class BananaReq( - schemas.Schema[BananaReqDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "lengthCm", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: BananaReqDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - BananaReqDictInput, - BananaReqDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BananaReqDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/bar.py b/samples/client/petstore/python/src/openapi_client/components/schema/bar.py deleted file mode 100644 index 82a834981c2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/bar.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Bar( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["bar"] = "bar" diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py deleted file mode 100644 index 39a3c96a06a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/basque_pig.py +++ /dev/null @@ -1,158 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ClassNameEnums: - - @schemas.classproperty - def BASQUE_PIG(cls) -> typing.Literal["BasquePig"]: - return ClassName.validate("BasquePig") - - -@dataclasses.dataclass(frozen=True) -class ClassName( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "BasquePig": "BASQUE_PIG", - } - ) - enums = ClassNameEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["BasquePig"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["BasquePig"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["BasquePig",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "BasquePig", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "BasquePig", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "className": typing.Type[ClassName], - } -) - - -class BasquePigDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "className", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - className: typing.Literal[ - "BasquePig" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "className": className, - } - arg_.update(kwargs) - used_arg_ = typing.cast(BasquePigDictInput, arg_) - return BasquePig.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - BasquePigDictInput, - BasquePigDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BasquePigDict: - return BasquePig.validate(arg, configuration=configuration) - - @property - def className(self) -> typing.Literal["BasquePig"]: - return typing.cast( - typing.Literal["BasquePig"], - self.__getitem__("className") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -BasquePigDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class BasquePig( - schemas.Schema[BasquePigDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "className", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: BasquePigDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - BasquePigDictInput, - BasquePigDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> BasquePigDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py b/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py deleted file mode 100644 index c25e1c02d57..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/boolean.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Boolean: typing_extensions.TypeAlias = schemas.BoolSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py deleted file mode 100644 index 0b735572d6f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/boolean_enum.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class BooleanEnumEnums: - - @schemas.classproperty - def TRUE(cls) -> typing.Literal[True]: - return BooleanEnum.validate(True) - - -@dataclasses.dataclass(frozen=True) -class BooleanEnum( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - schemas.Bool.TRUE: "TRUE", - } - ) - enums = BooleanEnumEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - True, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - True, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py b/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py deleted file mode 100644 index 0cae531b32e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/capitalization.py +++ /dev/null @@ -1,200 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -SmallCamel: typing_extensions.TypeAlias = schemas.StrSchema -CapitalCamel: typing_extensions.TypeAlias = schemas.StrSchema -SmallSnake: typing_extensions.TypeAlias = schemas.StrSchema -CapitalSnake: typing_extensions.TypeAlias = schemas.StrSchema -SCAETHFlowPoints: typing_extensions.TypeAlias = schemas.StrSchema -ATTNAME: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "smallCamel": typing.Type[SmallCamel], - "CapitalCamel": typing.Type[CapitalCamel], - "small_Snake": typing.Type[SmallSnake], - "Capital_Snake": typing.Type[CapitalSnake], - "SCA_ETH_Flow_Points": typing.Type[SCAETHFlowPoints], - "ATT_NAME": typing.Type[ATTNAME], - } -) - - -class CapitalizationDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "smallCamel", - "CapitalCamel", - "small_Snake", - "Capital_Snake", - "SCA_ETH_Flow_Points", - "ATT_NAME", - }) - - def __new__( - cls, - *, - smallCamel: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - CapitalCamel: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - small_Snake: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - Capital_Snake: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - SCA_ETH_Flow_Points: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - ATT_NAME: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("smallCamel", smallCamel), - ("CapitalCamel", CapitalCamel), - ("small_Snake", small_Snake), - ("Capital_Snake", Capital_Snake), - ("SCA_ETH_Flow_Points", SCA_ETH_Flow_Points), - ("ATT_NAME", ATT_NAME), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(CapitalizationDictInput, arg_) - return Capitalization.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - CapitalizationDictInput, - CapitalizationDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CapitalizationDict: - return Capitalization.validate(arg, configuration=configuration) - - @property - def smallCamel(self) -> typing.Union[str, schemas.Unset]: - val = self.get("smallCamel", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def CapitalCamel(self) -> typing.Union[str, schemas.Unset]: - val = self.get("CapitalCamel", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def small_Snake(self) -> typing.Union[str, schemas.Unset]: - val = self.get("small_Snake", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def Capital_Snake(self) -> typing.Union[str, schemas.Unset]: - val = self.get("Capital_Snake", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def SCA_ETH_Flow_Points(self) -> typing.Union[str, schemas.Unset]: - val = self.get("SCA_ETH_Flow_Points", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def ATT_NAME(self) -> typing.Union[str, schemas.Unset]: - val = self.get("ATT_NAME", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -CapitalizationDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Capitalization( - schemas.Schema[CapitalizationDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: CapitalizationDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - CapitalizationDictInput, - CapitalizationDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CapitalizationDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/cat.py b/samples/client/petstore/python/src/openapi_client/components/schema/cat.py deleted file mode 100644 index d6cdba17fe0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/cat.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Declawed: typing_extensions.TypeAlias = schemas.BoolSchema -Properties = typing.TypedDict( - 'Properties', - { - "declawed": typing.Type[Declawed], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "declawed", - }) - - def __new__( - cls, - *, - declawed: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("declawed", declawed), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def declawed(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("declawed", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[animal.Animal], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Cat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/category.py b/samples/client/petstore/python/src/openapi_client/components/schema/category.py deleted file mode 100644 index f7fae09737f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/category.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Id: typing_extensions.TypeAlias = schemas.Int64Schema - - -@dataclasses.dataclass(frozen=True) -class Name( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["default-name"] = "default-name" -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "name": typing.Type[Name], - } -) - - -class CategoryDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "name", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - }) - - def __new__( - cls, - *, - name: str, - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "name": name, - } - for key_, val in ( - ("id", id), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(CategoryDictInput, arg_) - return Category.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - CategoryDictInput, - CategoryDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CategoryDict: - return Category.validate(arg, configuration=configuration) - - @property - def name(self) -> str: - return typing.cast( - str, - self.__getitem__("name") - ) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -CategoryDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Category( - schemas.Schema[CategoryDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "name", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: CategoryDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - CategoryDictInput, - CategoryDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CategoryDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py b/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py deleted file mode 100644 index 7a3d03af662..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/child_cat.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - }) - - def __new__( - cls, - *, - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("name", name), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[parent_pet.ParentPet], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class ChildCat( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/class_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/class_model.py deleted file mode 100644 index e21f53fea5a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/class_model.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Class: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "_class": typing.Type[Class], - } -) - - -class ClassModelDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "_class", - }) - - def __new__( - cls, - *, - _class: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("_class", _class), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ClassModelDictInput, arg_) - return ClassModel.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ClassModelDictInput, - ClassModelDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ClassModelDict: - return ClassModel.validate(arg, configuration=configuration) - - @property - def _class(self) -> typing.Union[str, schemas.Unset]: - val = self.get("_class", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ClassModelDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ClassModel( - schemas.AnyTypeSchema[ClassModelDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Model for testing model with "_class" property - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ClassModelDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/client.py b/samples/client/petstore/python/src/openapi_client/components/schema/client.py deleted file mode 100644 index fb8f129a071..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/client.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Client2: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "client": typing.Type[Client2], - } -) - - -class ClientDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "client", - }) - - def __new__( - cls, - *, - client: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("client", client), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ClientDictInput, arg_) - return Client.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ClientDictInput, - ClientDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ClientDict: - return Client.validate(arg, configuration=configuration) - - @property - def client(self) -> typing.Union[str, schemas.Unset]: - val = self.get("client", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ClientDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Client( - schemas.Schema[ClientDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ClientDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ClientDictInput, - ClientDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ClientDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py deleted file mode 100644 index 3b5534c17a7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/complex_quadrilateral.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class QuadrilateralTypeEnums: - - @schemas.classproperty - def COMPLEX_QUADRILATERAL(cls) -> typing.Literal["ComplexQuadrilateral"]: - return QuadrilateralType.validate("ComplexQuadrilateral") - - -@dataclasses.dataclass(frozen=True) -class QuadrilateralType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "ComplexQuadrilateral": "COMPLEX_QUADRILATERAL", - } - ) - enums = QuadrilateralTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["ComplexQuadrilateral"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["ComplexQuadrilateral"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["ComplexQuadrilateral",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "ComplexQuadrilateral", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "ComplexQuadrilateral", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "quadrilateralType": typing.Type[QuadrilateralType], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "quadrilateralType", - }) - - def __new__( - cls, - *, - quadrilateralType: typing.Union[ - typing.Literal[ - "ComplexQuadrilateral" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("quadrilateralType", quadrilateralType), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def quadrilateralType(self) -> typing.Union[typing.Literal["ComplexQuadrilateral"], schemas.Unset]: - val = self.get("quadrilateralType", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["ComplexQuadrilateral"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[quadrilateral_interface.QuadrilateralInterface], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class ComplexQuadrilateral( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py deleted file mode 100644 index 6c7dd559314..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.DictSchema -_1: typing_extensions.TypeAlias = schemas.DateSchema -_2: typing_extensions.TypeAlias = schemas.DateTimeSchema -_3: typing_extensions.TypeAlias = schemas.BinarySchema -_4: typing_extensions.TypeAlias = schemas.StrSchema -_5: typing_extensions.TypeAlias = schemas.StrSchema -_6: typing_extensions.TypeAlias = schemas.DictSchema -_7: typing_extensions.TypeAlias = schemas.BoolSchema -_8: typing_extensions.TypeAlias = schemas.NoneSchema -Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class _9Tuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[_9TupleInput, _9Tuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return _9.validate(arg, configuration=configuration) -_9TupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class _9( - schemas.Schema[schemas.immutabledict, _9Tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: _9Tuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _9TupleInput, - _9Tuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _9Tuple: - return super().validate_base( - arg, - configuration=configuration, - ) -_10: typing_extensions.TypeAlias = schemas.NumberSchema -_11: typing_extensions.TypeAlias = schemas.Float32Schema -_12: typing_extensions.TypeAlias = schemas.Float64Schema -_13: typing_extensions.TypeAlias = schemas.IntSchema -_14: typing_extensions.TypeAlias = schemas.Int32Schema -_15: typing_extensions.TypeAlias = schemas.Int64Schema -AnyOf = typing.Tuple[ - typing.Type[_0], - typing.Type[_1], - typing.Type[_2], - typing.Type[_3], - typing.Type[_4], - typing.Type[_5], - typing.Type[_6], - typing.Type[_7], - typing.Type[_8], - typing.Type[_9], - typing.Type[_10], - typing.Type[_11], - typing.Type[_12], - typing.Type[_13], - typing.Type[_14], - typing.Type[_15], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedAnyOfDifferentTypesNoValidations( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py deleted file mode 100644 index 4e7cbe09efd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_array.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class ComposedArrayTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ComposedArrayTupleInput, ComposedArrayTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ComposedArray.validate(arg, configuration=configuration) -ComposedArrayTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ComposedArray( - schemas.Schema[schemas.immutabledict, ComposedArrayTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ComposedArrayTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ComposedArrayTupleInput, - ComposedArrayTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ComposedArrayTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py deleted file mode 100644 index 30109a4921e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_bool.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedBool( - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - schemas.Bool, - }) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py deleted file mode 100644 index e14ab0e5173..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_none.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedNone( - schemas.NoneSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - }) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py deleted file mode 100644 index 30bf62b62e0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_number.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedNumber( - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py deleted file mode 100644 index 21ee542d153..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_object.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedObject( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py deleted file mode 100644 index 3509b805cf0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_one_of_different_types.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_2: typing_extensions.TypeAlias = schemas.NoneSchema -_3: typing_extensions.TypeAlias = schemas.DateSchema - - -@dataclasses.dataclass(frozen=True) -class _4( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - max_properties: int = 4 - min_properties: int = 4 - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - -Items: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class _5Tuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[_5TupleInput, _5Tuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return _5.validate(arg, configuration=configuration) -_5TupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class _5( - schemas.Schema[schemas.immutabledict, _5Tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - max_items: int = 4 - min_items: int = 4 - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: _5Tuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _5TupleInput, - _5Tuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _5Tuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -@dataclasses.dataclass(frozen=True) -class _6( - schemas.DateTimeSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'date-time' - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^2020.*' # noqa: E501 - ) -OneOf = typing.Tuple[ - typing.Type[number_with_validations.NumberWithValidations], - typing.Type[animal.Animal], - typing.Type[_2], - typing.Type[_3], - typing.Type[_4], - typing.Type[_5], - typing.Type[_6], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedOneOfDifferentTypes( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - this is a model that allows payloads of type object or number - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py deleted file mode 100644 index 3c7731aed1d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/composed_string.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.AnyTypeSchema -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class ComposedString( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/currency.py b/samples/client/petstore/python/src/openapi_client/components/schema/currency.py deleted file mode 100644 index 6f87503ad0b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/currency.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class CurrencyEnums: - - @schemas.classproperty - def EUR(cls) -> typing.Literal["eur"]: - return Currency.validate("eur") - - @schemas.classproperty - def USD(cls) -> typing.Literal["usd"]: - return Currency.validate("usd") - - -@dataclasses.dataclass(frozen=True) -class Currency( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "eur": "EUR", - "usd": "USD", - } - ) - enums = CurrencyEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["eur"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["eur"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["usd"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["usd"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["eur","usd",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "eur", - "usd", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "eur", - "usd", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py deleted file mode 100644 index d6d17afe1eb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/danish_pig.py +++ /dev/null @@ -1,158 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ClassNameEnums: - - @schemas.classproperty - def DANISH_PIG(cls) -> typing.Literal["DanishPig"]: - return ClassName.validate("DanishPig") - - -@dataclasses.dataclass(frozen=True) -class ClassName( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "DanishPig": "DANISH_PIG", - } - ) - enums = ClassNameEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["DanishPig"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["DanishPig"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["DanishPig",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "DanishPig", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "DanishPig", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "className": typing.Type[ClassName], - } -) - - -class DanishPigDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "className", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - className: typing.Literal[ - "DanishPig" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "className": className, - } - arg_.update(kwargs) - used_arg_ = typing.cast(DanishPigDictInput, arg_) - return DanishPig.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - DanishPigDictInput, - DanishPigDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DanishPigDict: - return DanishPig.validate(arg, configuration=configuration) - - @property - def className(self) -> typing.Literal["DanishPig"]: - return typing.cast( - typing.Literal["DanishPig"], - self.__getitem__("className") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -DanishPigDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class DanishPig( - schemas.Schema[DanishPigDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "className", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: DanishPigDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - DanishPigDictInput, - DanishPigDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DanishPigDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py deleted file mode 100644 index 121afc68898..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_test.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateTimeTest( - schemas.DateTimeSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'date-time' - default: typing.Literal["2010-01-01T10:10:10.000111+01:00"] = "2010-01-01T10:10:10.000111+01:00" diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py deleted file mode 100644 index 19b0c354e0e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/date_time_with_validations.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateTimeWithValidations( - schemas.DateTimeSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'date-time' - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^2020.*' # noqa: E501 - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py deleted file mode 100644 index f1a03aad7ab..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/date_with_validations.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class DateWithValidations( - schemas.DateSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'date' - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^2020.*' # noqa: E501 - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py b/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py deleted file mode 100644 index 0254a80e7f1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/decimal_payload.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -DecimalPayload: typing_extensions.TypeAlias = schemas.DecimalSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/dog.py b/samples/client/petstore/python/src/openapi_client/components/schema/dog.py deleted file mode 100644 index 3996fe05066..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/dog.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Breed: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "breed": typing.Type[Breed], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "breed", - }) - - def __new__( - cls, - *, - breed: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("breed", breed), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def breed(self) -> typing.Union[str, schemas.Unset]: - val = self.get("breed", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[animal.Animal], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class Dog( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py b/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py deleted file mode 100644 index 45022f7e57a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/drawing.py +++ /dev/null @@ -1,259 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import fruit -from openapi_client.components.schema import nullable_shape -from openapi_client.components.schema import shape -from openapi_client.components.schema import shape_or_null - - -class ShapesTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[ShapesTupleInput, ShapesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Shapes.validate(arg, configuration=configuration) -ShapesTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Shapes( - schemas.Schema[schemas.immutabledict, ShapesTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[shape.Shape] = dataclasses.field(default_factory=lambda: shape.Shape) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ShapesTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ShapesTupleInput, - ShapesTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ShapesTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "mainShape": typing.Type[shape.Shape], - "shapeOrNull": typing.Type[shape_or_null.ShapeOrNull], - "nullableShape": typing.Type[nullable_shape.NullableShape], - "shapes": typing.Type[Shapes], - } -) - - -class DrawingDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "mainShape", - "shapeOrNull", - "nullableShape", - "shapes", - }) - - def __new__( - cls, - *, - mainShape: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - shapeOrNull: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - nullableShape: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - shapes: typing.Union[ - ShapesTupleInput, - ShapesTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("mainShape", mainShape), - ("shapeOrNull", shapeOrNull), - ("nullableShape", nullableShape), - ("shapes", shapes), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(DrawingDictInput, arg_) - return Drawing.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - DrawingDictInput, - DrawingDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DrawingDict: - return Drawing.validate(arg, configuration=configuration) - - @property - def mainShape(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("mainShape", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - @property - def shapeOrNull(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("shapeOrNull", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - @property - def nullableShape(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("nullableShape", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - @property - def shapes(self) -> typing.Union[ShapesTuple, schemas.Unset]: - val = self.get("shapes", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ShapesTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -DrawingDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - ShapesTupleInput, - ShapesTuple - ], - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ] -] - - -@dataclasses.dataclass(frozen=True) -class Drawing( - schemas.Schema[DrawingDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[fruit.Fruit] = dataclasses.field(default_factory=lambda: fruit.Fruit) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: DrawingDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - DrawingDictInput, - DrawingDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DrawingDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py deleted file mode 100644 index f2aca519745..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/enum_arrays.py +++ /dev/null @@ -1,322 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class JustSymbolEnums: - - @schemas.classproperty - def GREATER_THAN_SIGN_EQUALS_SIGN(cls) -> typing.Literal[">="]: - return JustSymbol.validate(">=") - - @schemas.classproperty - def DOLLAR_SIGN(cls) -> typing.Literal["$"]: - return JustSymbol.validate("$") - - -@dataclasses.dataclass(frozen=True) -class JustSymbol( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - ">=": "GREATER_THAN_SIGN_EQUALS_SIGN", - "$": "DOLLAR_SIGN", - } - ) - enums = JustSymbolEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[">="], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">="]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["$"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["$"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">=","$",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - ">=", - "$", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - ">=", - "$", - ], - validated_arg - ) - - -class ItemsEnums: - - @schemas.classproperty - def FISH(cls) -> typing.Literal["fish"]: - return Items.validate("fish") - - @schemas.classproperty - def CRAB(cls) -> typing.Literal["crab"]: - return Items.validate("crab") - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "fish": "FISH", - "crab": "CRAB", - } - ) - enums = ItemsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["fish"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["fish"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["crab"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["crab"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["fish","crab",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "fish", - "crab", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "fish", - "crab", - ], - validated_arg - ) - - -class ArrayEnumTuple( - typing.Tuple[ - typing.Literal["fish", "crab"], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayEnumTupleInput, ArrayEnumTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayEnum.validate(arg, configuration=configuration) -ArrayEnumTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - "fish", - "crab" - ], - ], - typing.Tuple[ - typing.Literal[ - "fish", - "crab" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayEnum( - schemas.Schema[schemas.immutabledict, ArrayEnumTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayEnumTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayEnumTupleInput, - ArrayEnumTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayEnumTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "just_symbol": typing.Type[JustSymbol], - "array_enum": typing.Type[ArrayEnum], - } -) - - -class EnumArraysDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "just_symbol", - "array_enum", - }) - - def __new__( - cls, - *, - just_symbol: typing.Union[ - typing.Literal[ - ">=", - "$" - ], - schemas.Unset - ] = schemas.unset, - array_enum: typing.Union[ - ArrayEnumTupleInput, - ArrayEnumTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("just_symbol", just_symbol), - ("array_enum", array_enum), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(EnumArraysDictInput, arg_) - return EnumArrays.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - EnumArraysDictInput, - EnumArraysDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumArraysDict: - return EnumArrays.validate(arg, configuration=configuration) - - @property - def just_symbol(self) -> typing.Union[typing.Literal[">=", "$"], schemas.Unset]: - val = self.get("just_symbol", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[">=", "$"], - val - ) - - @property - def array_enum(self) -> typing.Union[ArrayEnumTuple, schemas.Unset]: - val = self.get("array_enum", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayEnumTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -EnumArraysDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class EnumArrays( - schemas.Schema[EnumArraysDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: EnumArraysDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EnumArraysDictInput, - EnumArraysDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumArraysDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py deleted file mode 100644 index e8a7a816a82..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/enum_class.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumClassEnums: - - @schemas.classproperty - def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: - return EnumClass.validate("_abc") - - @schemas.classproperty - def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: - return EnumClass.validate("-efg") - - @schemas.classproperty - def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: - return EnumClass.validate("(xyz)") - - @schemas.classproperty - def COUNT_1M(cls) -> typing.Literal["COUNT_1M"]: - return EnumClass.validate("COUNT_1M") - - @schemas.classproperty - def COUNT_50M(cls) -> typing.Literal["COUNT_50M"]: - return EnumClass.validate("COUNT_50M") - - -@dataclasses.dataclass(frozen=True) -class EnumClass( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["-efg"] = "-efg" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "_abc": "LOW_LINE_ABC", - "-efg": "HYPHEN_MINUS_EFG", - "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", - "COUNT_1M": "COUNT_1M", - "COUNT_50M": "COUNT_50M", - } - ) - enums = EnumClassEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["_abc"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["-efg"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["-efg"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["(xyz)"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["(xyz)"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["COUNT_1M"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["COUNT_1M"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["COUNT_50M"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["COUNT_50M"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc","-efg","(xyz)","COUNT_1M","COUNT_50M",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py deleted file mode 100644 index 14b84ce607a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/enum_test.py +++ /dev/null @@ -1,563 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class EnumStringEnums: - - @schemas.classproperty - def UPPER(cls) -> typing.Literal["UPPER"]: - return EnumString.validate("UPPER") - - @schemas.classproperty - def LOWER(cls) -> typing.Literal["lower"]: - return EnumString.validate("lower") - - @schemas.classproperty - def EMPTY(cls) -> typing.Literal[""]: - return EnumString.validate("") - - -@dataclasses.dataclass(frozen=True) -class EnumString( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "UPPER": "UPPER", - "lower": "LOWER", - "": "EMPTY", - } - ) - enums = EnumStringEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["UPPER"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["lower"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["lower"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[""], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[""]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER","lower","",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "UPPER", - "lower", - "", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "UPPER", - "lower", - "", - ], - validated_arg - ) - - -class EnumStringRequiredEnums: - - @schemas.classproperty - def UPPER(cls) -> typing.Literal["UPPER"]: - return EnumStringRequired.validate("UPPER") - - @schemas.classproperty - def LOWER(cls) -> typing.Literal["lower"]: - return EnumStringRequired.validate("lower") - - @schemas.classproperty - def EMPTY(cls) -> typing.Literal[""]: - return EnumStringRequired.validate("") - - -@dataclasses.dataclass(frozen=True) -class EnumStringRequired( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "UPPER": "UPPER", - "lower": "LOWER", - "": "EMPTY", - } - ) - enums = EnumStringRequiredEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["UPPER"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["lower"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["lower"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[""], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[""]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER","lower","",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "UPPER", - "lower", - "", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "UPPER", - "lower", - "", - ], - validated_arg - ) - - -class EnumIntegerEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return EnumInteger.validate(1) - - @schemas.classproperty - def NEGATIVE_1(cls) -> typing.Literal[-1]: - return EnumInteger.validate(-1) - - -@dataclasses.dataclass(frozen=True) -class EnumInteger( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int32' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - -1: "NEGATIVE_1", - } - ) - enums = EnumIntegerEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[-1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[-1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,-1,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 1, - -1, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 1, - -1, - ], - validated_arg - ) - - -class EnumNumberEnums: - - @schemas.classproperty - def POSITIVE_1_PT_1(cls) -> typing.Union[int, float]: - return EnumNumber.validate(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls) -> typing.Union[int, float]: - return EnumNumber.validate(-1.2) - - -@dataclasses.dataclass(frozen=True) -class EnumNumber( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'double' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1.1: "POSITIVE_1_PT_1", - -1.2: "NEGATIVE_1_PT_2", - } - ) - enums = EnumNumberEnums - - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg - -from openapi_client.components.schema import integer_enum -from openapi_client.components.schema import integer_enum_one_value -from openapi_client.components.schema import integer_enum_with_default_value -from openapi_client.components.schema import string_enum -from openapi_client.components.schema import string_enum_with_default_value -Properties = typing.TypedDict( - 'Properties', - { - "enum_string": typing.Type[EnumString], - "enum_string_required": typing.Type[EnumStringRequired], - "enum_integer": typing.Type[EnumInteger], - "enum_number": typing.Type[EnumNumber], - "stringEnum": typing.Type[string_enum.StringEnum], - "IntegerEnum": typing.Type[integer_enum.IntegerEnum], - "StringEnumWithDefaultValue": typing.Type[string_enum_with_default_value.StringEnumWithDefaultValue], - "IntegerEnumWithDefaultValue": typing.Type[integer_enum_with_default_value.IntegerEnumWithDefaultValue], - "IntegerEnumOneValue": typing.Type[integer_enum_one_value.IntegerEnumOneValue], - } -) - - -class EnumTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "enum_string_required", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "enum_string", - "enum_integer", - "enum_number", - "stringEnum", - "IntegerEnum", - "StringEnumWithDefaultValue", - "IntegerEnumWithDefaultValue", - "IntegerEnumOneValue", - }) - - def __new__( - cls, - *, - enum_string_required: typing.Literal[ - "UPPER", - "lower", - "" - ], - enum_string: typing.Union[ - typing.Literal[ - "UPPER", - "lower", - "" - ], - schemas.Unset - ] = schemas.unset, - enum_integer: typing.Union[ - typing.Literal[ - 1, - -1 - ], - schemas.Unset - ] = schemas.unset, - enum_number: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - stringEnum: typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - schemas.Unset - ] = schemas.unset, - IntegerEnum: typing.Union[ - typing.Literal[ - 0, - 1, - 2 - ], - schemas.Unset - ] = schemas.unset, - StringEnumWithDefaultValue: typing.Union[ - typing.Literal[ - "placed", - "approved", - "delivered" - ], - schemas.Unset - ] = schemas.unset, - IntegerEnumWithDefaultValue: typing.Union[ - typing.Literal[ - 0, - 1, - 2 - ], - schemas.Unset - ] = schemas.unset, - IntegerEnumOneValue: typing.Union[ - typing.Literal[ - 0 - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "enum_string_required": enum_string_required, - } - for key_, val in ( - ("enum_string", enum_string), - ("enum_integer", enum_integer), - ("enum_number", enum_number), - ("stringEnum", stringEnum), - ("IntegerEnum", IntegerEnum), - ("StringEnumWithDefaultValue", StringEnumWithDefaultValue), - ("IntegerEnumWithDefaultValue", IntegerEnumWithDefaultValue), - ("IntegerEnumOneValue", IntegerEnumOneValue), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(EnumTestDictInput, arg_) - return EnumTest.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - EnumTestDictInput, - EnumTestDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumTestDict: - return EnumTest.validate(arg, configuration=configuration) - - @property - def enum_string_required(self) -> typing.Literal["UPPER", "lower", ""]: - return typing.cast( - typing.Literal["UPPER", "lower", ""], - self.__getitem__("enum_string_required") - ) - - @property - def enum_string(self) -> typing.Union[typing.Literal["UPPER", "lower", ""], schemas.Unset]: - val = self.get("enum_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["UPPER", "lower", ""], - val - ) - - @property - def enum_integer(self) -> typing.Union[typing.Literal[1, -1], schemas.Unset]: - val = self.get("enum_integer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[1, -1], - val - ) - - @property - def enum_number(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("enum_number", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def stringEnum(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], schemas.Unset], - ]: - val = self.get("stringEnum", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], - ], - val - ) - - @property - def IntegerEnum(self) -> typing.Union[typing.Literal[0, 1, 2], schemas.Unset]: - val = self.get("IntegerEnum", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[0, 1, 2], - val - ) - - @property - def StringEnumWithDefaultValue(self) -> typing.Union[typing.Literal["placed", "approved", "delivered"], schemas.Unset]: - val = self.get("StringEnumWithDefaultValue", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["placed", "approved", "delivered"], - val - ) - - @property - def IntegerEnumWithDefaultValue(self) -> typing.Union[typing.Literal[0, 1, 2], schemas.Unset]: - val = self.get("IntegerEnumWithDefaultValue", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[0, 1, 2], - val - ) - - @property - def IntegerEnumOneValue(self) -> typing.Union[typing.Literal[0], schemas.Unset]: - val = self.get("IntegerEnumOneValue", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[0], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -EnumTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class EnumTest( - schemas.Schema[EnumTestDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "enum_string_required", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: EnumTestDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EnumTestDictInput, - EnumTestDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumTestDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py deleted file mode 100644 index 7d0b8184c7f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/equilateral_triangle.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class TriangleTypeEnums: - - @schemas.classproperty - def EQUILATERAL_TRIANGLE(cls) -> typing.Literal["EquilateralTriangle"]: - return TriangleType.validate("EquilateralTriangle") - - -@dataclasses.dataclass(frozen=True) -class TriangleType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "EquilateralTriangle": "EQUILATERAL_TRIANGLE", - } - ) - enums = TriangleTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["EquilateralTriangle"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["EquilateralTriangle"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["EquilateralTriangle",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "EquilateralTriangle", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "EquilateralTriangle", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "triangleType": typing.Type[TriangleType], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "triangleType", - }) - - def __new__( - cls, - *, - triangleType: typing.Union[ - typing.Literal[ - "EquilateralTriangle" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("triangleType", triangleType), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def triangleType(self) -> typing.Union[typing.Literal["EquilateralTriangle"], schemas.Unset]: - val = self.get("triangleType", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["EquilateralTriangle"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[triangle_interface.TriangleInterface], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class EquilateralTriangle( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/file.py b/samples/client/petstore/python/src/openapi_client/components/schema/file.py deleted file mode 100644 index 6b940fc04dc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/file.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -SourceURI: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "sourceURI": typing.Type[SourceURI], - } -) - - -class FileDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "sourceURI", - }) - - def __new__( - cls, - *, - sourceURI: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("sourceURI", sourceURI), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FileDictInput, arg_) - return File.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FileDictInput, - FileDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileDict: - return File.validate(arg, configuration=configuration) - - @property - def sourceURI(self) -> typing.Union[str, schemas.Unset]: - val = self.get("sourceURI", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FileDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class File( - schemas.Schema[FileDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Must be named `File` for test. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FileDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FileDictInput, - FileDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py deleted file mode 100644 index be24e3474cd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/file_schema_test_class.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import file - - -class FilesTuple( - typing.Tuple[ - file.FileDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[FilesTupleInput, FilesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Files.validate(arg, configuration=configuration) -FilesTupleInput = typing.Union[ - typing.List[ - typing.Union[ - file.FileDictInput, - file.FileDict, - ], - ], - typing.Tuple[ - typing.Union[ - file.FileDictInput, - file.FileDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Files( - schemas.Schema[schemas.immutabledict, FilesTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[file.File] = dataclasses.field(default_factory=lambda: file.File) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: FilesTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FilesTupleInput, - FilesTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FilesTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "file": typing.Type[file.File], - "files": typing.Type[Files], - } -) - - -class FileSchemaTestClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "file", - "files", - }) - - def __new__( - cls, - *, - file: typing.Union[ - file.FileDictInput, - file.FileDict, - schemas.Unset - ] = schemas.unset, - files: typing.Union[ - FilesTupleInput, - FilesTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("file", file), - ("files", files), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FileSchemaTestClassDictInput, arg_) - return FileSchemaTestClass.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FileSchemaTestClassDictInput, - FileSchemaTestClassDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileSchemaTestClassDict: - return FileSchemaTestClass.validate(arg, configuration=configuration) - - @property - def file(self) -> typing.Union[file.FileDict, schemas.Unset]: - val = self.get("file", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - file.FileDict, - val - ) - - @property - def files(self) -> typing.Union[FilesTuple, schemas.Unset]: - val = self.get("files", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - FilesTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FileSchemaTestClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class FileSchemaTestClass( - schemas.Schema[FileSchemaTestClassDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FileSchemaTestClassDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FileSchemaTestClassDictInput, - FileSchemaTestClassDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileSchemaTestClassDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/foo.py b/samples/client/petstore/python/src/openapi_client/components/schema/foo.py deleted file mode 100644 index a072a27b174..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/foo.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import bar -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[bar.Bar], - } -) - - -class FooDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - }) - - def __new__( - cls, - *, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("bar", bar), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FooDictInput, arg_) - return Foo.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FooDictInput, - FooDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FooDict: - return Foo.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FooDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Foo( - schemas.Schema[FooDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FooDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FooDictInput, - FooDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FooDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py deleted file mode 100644 index acb35fe65ad..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/format_test.py +++ /dev/null @@ -1,632 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Integer( - schemas.IntSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - inclusive_maximum: typing.Union[int, float] = 100 - inclusive_minimum: typing.Union[int, float] = 10 - multiple_of: typing.Union[int, float] = 2 -Int32: typing_extensions.TypeAlias = schemas.Int32Schema - - -@dataclasses.dataclass(frozen=True) -class Int32withValidations( - schemas.Int32Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int32' - inclusive_maximum: typing.Union[int, float] = 200 - inclusive_minimum: typing.Union[int, float] = 20 -Int64: typing_extensions.TypeAlias = schemas.Int64Schema - - -@dataclasses.dataclass(frozen=True) -class Number( - schemas.NumberSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - inclusive_maximum: typing.Union[int, float] = 543.2 - inclusive_minimum: typing.Union[int, float] = 32.1 - multiple_of: typing.Union[int, float] = 32.5 - - -@dataclasses.dataclass(frozen=True) -class Float( - schemas.Float32Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'float' - inclusive_maximum: typing.Union[int, float] = 987.6 - inclusive_minimum: typing.Union[int, float] = 54.3 -Float32: typing_extensions.TypeAlias = schemas.Float32Schema - - -@dataclasses.dataclass(frozen=True) -class Double( - schemas.Float64Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'double' - inclusive_maximum: typing.Union[int, float] = 123.4 - inclusive_minimum: typing.Union[int, float] = 67.8 -Float64: typing_extensions.TypeAlias = schemas.Float64Schema -Items: typing_extensions.TypeAlias = schemas.NumberSchema - - -class ArrayWithUniqueItemsTuple( - typing.Tuple[ - typing.Union[int, float], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayWithUniqueItemsTupleInput, ArrayWithUniqueItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayWithUniqueItems.validate(arg, configuration=configuration) -ArrayWithUniqueItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - int, - float - ], - ], - typing.Tuple[ - typing.Union[ - int, - float - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayWithUniqueItems( - schemas.Schema[schemas.immutabledict, ArrayWithUniqueItemsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - unique_items: bool = True - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayWithUniqueItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayWithUniqueItemsTupleInput, - ArrayWithUniqueItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayWithUniqueItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -@dataclasses.dataclass(frozen=True) -class String( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'[a-z]', # noqa: E501 - flags=re.I, - ) -Byte: typing_extensions.TypeAlias = schemas.StrSchema -Binary: typing_extensions.TypeAlias = schemas.BinarySchema -Date: typing_extensions.TypeAlias = schemas.DateSchema -DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema -Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema -UuidNoExample: typing_extensions.TypeAlias = schemas.UUIDSchema - - -@dataclasses.dataclass(frozen=True) -class Password( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'password' - max_length: int = 64 - min_length: int = 10 - - -@dataclasses.dataclass(frozen=True) -class PatternWithDigits( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^\d{10}$' # noqa: E501 - ) - - -@dataclasses.dataclass(frozen=True) -class PatternWithDigitsAndDelimiter( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^image_\d{1,3}$', # noqa: E501 - flags=re.I, - ) -NoneProp: typing_extensions.TypeAlias = schemas.NoneSchema -Properties = typing.TypedDict( - 'Properties', - { - "integer": typing.Type[Integer], - "int32": typing.Type[Int32], - "int32withValidations": typing.Type[Int32withValidations], - "int64": typing.Type[Int64], - "number": typing.Type[Number], - "float": typing.Type[Float], - "float32": typing.Type[Float32], - "double": typing.Type[Double], - "float64": typing.Type[Float64], - "arrayWithUniqueItems": typing.Type[ArrayWithUniqueItems], - "string": typing.Type[String], - "byte": typing.Type[Byte], - "binary": typing.Type[Binary], - "date": typing.Type[Date], - "dateTime": typing.Type[DateTime], - "uuid": typing.Type[Uuid], - "uuidNoExample": typing.Type[UuidNoExample], - "password": typing.Type[Password], - "pattern_with_digits": typing.Type[PatternWithDigits], - "pattern_with_digits_and_delimiter": typing.Type[PatternWithDigitsAndDelimiter], - "noneProp": typing.Type[NoneProp], - } -) - - -class FormatTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "byte", - "date", - "number", - "password", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "integer", - "int32", - "int32withValidations", - "int64", - "float", - "float32", - "double", - "float64", - "arrayWithUniqueItems", - "string", - "binary", - "dateTime", - "uuid", - "uuidNoExample", - "pattern_with_digits", - "pattern_with_digits_and_delimiter", - "noneProp", - }) - - def __new__( - cls, - *, - byte: str, - date: typing.Union[ - str, - datetime.date - ], - number: typing.Union[ - int, - float - ], - password: str, - integer: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - int32: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - int32withValidations: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - int64: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - float: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - float32: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - double: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - float64: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - arrayWithUniqueItems: typing.Union[ - ArrayWithUniqueItemsTupleInput, - ArrayWithUniqueItemsTuple, - schemas.Unset - ] = schemas.unset, - string: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - binary: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO, - schemas.Unset - ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, - uuid: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, - uuidNoExample: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, - pattern_with_digits: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - pattern_with_digits_and_delimiter: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - noneProp: typing.Union[ - None, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "byte": byte, - "date": date, - "number": number, - "password": password, - } - for key_, val in ( - ("integer", integer), - ("int32", int32), - ("int32withValidations", int32withValidations), - ("int64", int64), - ("float", float), - ("float32", float32), - ("double", double), - ("float64", float64), - ("arrayWithUniqueItems", arrayWithUniqueItems), - ("string", string), - ("binary", binary), - ("dateTime", dateTime), - ("uuid", uuid), - ("uuidNoExample", uuidNoExample), - ("pattern_with_digits", pattern_with_digits), - ("pattern_with_digits_and_delimiter", pattern_with_digits_and_delimiter), - ("noneProp", noneProp), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FormatTestDictInput, arg_) - return FormatTest.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FormatTestDictInput, - FormatTestDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FormatTestDict: - return FormatTest.validate(arg, configuration=configuration) - - @property - def byte(self) -> str: - return typing.cast( - str, - self.__getitem__("byte") - ) - - @property - def date(self) -> str: - return typing.cast( - str, - self.__getitem__("date") - ) - - @property - def number(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("number") - ) - - @property - def password(self) -> str: - return typing.cast( - str, - self.__getitem__("password") - ) - - @property - def integer(self) -> typing.Union[int, schemas.Unset]: - val = self.get("integer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def int32(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int32", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def int32withValidations(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int32withValidations", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def int64(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int64", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def float(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def float32(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float32", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def double(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("double", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def float64(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float64", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def arrayWithUniqueItems(self) -> typing.Union[ArrayWithUniqueItemsTuple, schemas.Unset]: - val = self.get("arrayWithUniqueItems", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayWithUniqueItemsTuple, - val - ) - - @property - def string(self) -> typing.Union[str, schemas.Unset]: - val = self.get("string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def binary(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: - val = self.get("binary", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[bytes, schemas.FileIO], - val - ) - - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def uuid(self) -> typing.Union[str, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def uuidNoExample(self) -> typing.Union[str, schemas.Unset]: - val = self.get("uuidNoExample", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def pattern_with_digits(self) -> typing.Union[str, schemas.Unset]: - val = self.get("pattern_with_digits", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def pattern_with_digits_and_delimiter(self) -> typing.Union[str, schemas.Unset]: - val = self.get("pattern_with_digits_and_delimiter", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def noneProp(self) -> typing.Union[None, schemas.Unset]: - val = self.get("noneProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - None, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FormatTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class FormatTest( - schemas.Schema[FormatTestDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "byte", - "date", - "number", - "password", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FormatTestDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FormatTestDictInput, - FormatTestDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FormatTestDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py deleted file mode 100644 index 35ddb4a6213..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/from_schema.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Data: typing_extensions.TypeAlias = schemas.StrSchema -Id: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "data": typing.Type[Data], - "id": typing.Type[Id], - } -) - - -class FromSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "data", - "id", - }) - - def __new__( - cls, - *, - data: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("data", data), - ("id", id), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FromSchemaDictInput, arg_) - return FromSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FromSchemaDictInput, - FromSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FromSchemaDict: - return FromSchema.validate(arg, configuration=configuration) - - @property - def data(self) -> typing.Union[str, schemas.Unset]: - val = self.get("data", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FromSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class FromSchema( - schemas.Schema[FromSchemaDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FromSchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FromSchemaDictInput, - FromSchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FromSchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py b/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py deleted file mode 100644 index 94bfd315b6a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/fruit.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Color: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "color": typing.Type[Color], - } -) - - -class FruitDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "color", - }) - - def __new__( - cls, - *, - color: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("color", color), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(FruitDictInput, arg_) - return Fruit.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - FruitDictInput, - FruitDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FruitDict: - return Fruit.validate(arg, configuration=configuration) - - @property - def color(self) -> typing.Union[str, schemas.Unset]: - val = self.get("color", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -FruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] -OneOf = typing.Tuple[ - typing.Type[apple.Apple], - typing.Type[banana.Banana], -] - - -@dataclasses.dataclass(frozen=True) -class Fruit( - schemas.AnyTypeSchema[FruitDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: FruitDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py b/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py deleted file mode 100644 index 788b4549c9c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/fruit_req.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NoneSchema -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[apple_req.AppleReq], - typing.Type[banana_req.BananaReq], -] - - -@dataclasses.dataclass(frozen=True) -class FruitReq( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py b/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py deleted file mode 100644 index b2711051b4a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/gm_fruit.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Color: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "color": typing.Type[Color], - } -) - - -class GmFruitDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "color", - }) - - def __new__( - cls, - *, - color: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("color", color), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(GmFruitDictInput, arg_) - return GmFruit.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - GmFruitDictInput, - GmFruitDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> GmFruitDict: - return GmFruit.validate(arg, configuration=configuration) - - @property - def color(self) -> typing.Union[str, schemas.Unset]: - val = self.get("color", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -GmFruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] -AnyOf = typing.Tuple[ - typing.Type[apple.Apple], - typing.Type[banana.Banana], -] - - -@dataclasses.dataclass(frozen=True) -class GmFruit( - schemas.AnyTypeSchema[GmFruitDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - any_of: AnyOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AnyOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: GmFruitDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py b/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py deleted file mode 100644 index f73fa3a5dc7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/grandparent_animal.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -PetType: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "pet_type": typing.Type[PetType], - } -) - - -class GrandparentAnimalDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "pet_type", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - pet_type: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "pet_type": pet_type, - } - arg_.update(kwargs) - used_arg_ = typing.cast(GrandparentAnimalDictInput, arg_) - return GrandparentAnimal.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - GrandparentAnimalDictInput, - GrandparentAnimalDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> GrandparentAnimalDict: - return GrandparentAnimal.validate(arg, configuration=configuration) - - @property - def pet_type(self) -> str: - return typing.cast( - str, - self.__getitem__("pet_type") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -GrandparentAnimalDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class GrandparentAnimal( - schemas.Schema[GrandparentAnimalDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "pet_type", - }) - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'pet_type': { - 'ChildCat': child_cat.ChildCat, - 'ParentPet': parent_pet.ParentPet, - } - } - ) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: GrandparentAnimalDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - GrandparentAnimalDictInput, - GrandparentAnimalDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> GrandparentAnimalDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - -from openapi_client.components.schema import child_cat -from openapi_client.components.schema import parent_pet diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py deleted file mode 100644 index 94db8602b9d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/has_only_read_only.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.StrSchema -Foo: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - "foo": typing.Type[Foo], - } -) - - -class HasOnlyReadOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - "foo", - }) - - def __new__( - cls, - *, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - foo: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("bar", bar), - ("foo", foo), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(HasOnlyReadOnlyDictInput, arg_) - return HasOnlyReadOnly.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HasOnlyReadOnlyDictInput, - HasOnlyReadOnlyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HasOnlyReadOnlyDict: - return HasOnlyReadOnly.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def foo(self) -> typing.Union[str, schemas.Unset]: - val = self.get("foo", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -HasOnlyReadOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class HasOnlyReadOnly( - schemas.Schema[HasOnlyReadOnlyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HasOnlyReadOnlyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HasOnlyReadOnlyDictInput, - HasOnlyReadOnlyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HasOnlyReadOnlyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py b/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py deleted file mode 100644 index 8f6f2834be6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/health_check_result.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class NullableMessage( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - -Properties = typing.TypedDict( - 'Properties', - { - "NullableMessage": typing.Type[NullableMessage], - } -) - - -class HealthCheckResultDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "NullableMessage", - }) - - def __new__( - cls, - *, - NullableMessage: typing.Union[ - None, - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("NullableMessage", NullableMessage), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(HealthCheckResultDictInput, arg_) - return HealthCheckResult.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HealthCheckResultDictInput, - HealthCheckResultDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HealthCheckResultDict: - return HealthCheckResult.validate(arg, configuration=configuration) - - @property - def NullableMessage(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[str, schemas.Unset], - ]: - val = self.get("NullableMessage", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - str, - ], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -HealthCheckResultDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class HealthCheckResult( - schemas.Schema[HealthCheckResultDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HealthCheckResultDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HealthCheckResultDictInput, - HealthCheckResultDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HealthCheckResultDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py deleted file mode 100644 index 032e64c2a00..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class IntegerEnumEnums: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal[0]: - return IntegerEnum.validate(0) - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return IntegerEnum.validate(1) - - @schemas.classproperty - def POSITIVE_2(cls) -> typing.Literal[2]: - return IntegerEnum.validate(2) - - -@dataclasses.dataclass(frozen=True) -class IntegerEnum( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 0: "POSITIVE_0", - 1: "POSITIVE_1", - 2: "POSITIVE_2", - } - ) - enums = IntegerEnumEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[0], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[2], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[2]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0,1,2,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 0, - 1, - 2, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 0, - 1, - 2, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py deleted file mode 100644 index faf3f6bbd55..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_big.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class IntegerEnumBigEnums: - - @schemas.classproperty - def POSITIVE_10(cls) -> typing.Literal[10]: - return IntegerEnumBig.validate(10) - - @schemas.classproperty - def POSITIVE_11(cls) -> typing.Literal[11]: - return IntegerEnumBig.validate(11) - - @schemas.classproperty - def POSITIVE_12(cls) -> typing.Literal[12]: - return IntegerEnumBig.validate(12) - - -@dataclasses.dataclass(frozen=True) -class IntegerEnumBig( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 10: "POSITIVE_10", - 11: "POSITIVE_11", - 12: "POSITIVE_12", - } - ) - enums = IntegerEnumBigEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[10], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[10]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[11], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[11]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[12], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[12]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[10,11,12,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 10, - 11, - 12, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 10, - 11, - 12, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py deleted file mode 100644 index f11517cfc2e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_one_value.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class IntegerEnumOneValueEnums: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal[0]: - return IntegerEnumOneValue.validate(0) - - -@dataclasses.dataclass(frozen=True) -class IntegerEnumOneValue( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 0: "POSITIVE_0", - } - ) - enums = IntegerEnumOneValueEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[0], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 0, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 0, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py deleted file mode 100644 index 88f3dc6b497..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_enum_with_default_value.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class IntegerEnumWithDefaultValueEnums: - - @schemas.classproperty - def POSITIVE_0(cls) -> typing.Literal[0]: - return IntegerEnumWithDefaultValue.validate(0) - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return IntegerEnumWithDefaultValue.validate(1) - - @schemas.classproperty - def POSITIVE_2(cls) -> typing.Literal[2]: - return IntegerEnumWithDefaultValue.validate(2) - - -@dataclasses.dataclass(frozen=True) -class IntegerEnumWithDefaultValue( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 0: "POSITIVE_0", - 1: "POSITIVE_1", - 2: "POSITIVE_2", - } - ) - enums = IntegerEnumWithDefaultValueEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[0], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[2], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[2]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[0,1,2,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 0, - 1, - 2, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 0, - 1, - 2, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py deleted file mode 100644 index cbe7a1b9f80..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_max10.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IntegerMax10( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int64' - inclusive_maximum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py b/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py deleted file mode 100644 index d85d58eb8d9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/integer_min15.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class IntegerMin15( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int64' - inclusive_minimum: typing.Union[int, float] = 15 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py deleted file mode 100644 index b86cdc2d5f1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/isosceles_triangle.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class TriangleTypeEnums: - - @schemas.classproperty - def ISOSCELES_TRIANGLE(cls) -> typing.Literal["IsoscelesTriangle"]: - return TriangleType.validate("IsoscelesTriangle") - - -@dataclasses.dataclass(frozen=True) -class TriangleType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "IsoscelesTriangle": "ISOSCELES_TRIANGLE", - } - ) - enums = TriangleTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["IsoscelesTriangle"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["IsoscelesTriangle"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["IsoscelesTriangle",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "IsoscelesTriangle", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "IsoscelesTriangle", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "triangleType": typing.Type[TriangleType], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "triangleType", - }) - - def __new__( - cls, - *, - triangleType: typing.Union[ - typing.Literal[ - "IsoscelesTriangle" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("triangleType", triangleType), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def triangleType(self) -> typing.Union[typing.Literal["IsoscelesTriangle"], schemas.Unset]: - val = self.get("triangleType", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["IsoscelesTriangle"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[triangle_interface.TriangleInterface], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class IsoscelesTriangle( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/items.py b/samples/client/petstore/python/src/openapi_client/components/schema/items.py deleted file mode 100644 index cffe311cb86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/items.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items2: typing_extensions.TypeAlias = schemas.DictSchema - - -class ItemsTuple( - typing.Tuple[ - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ... - ] -): - - def __new__(cls, arg: typing.Union[ItemsTupleInput, ItemsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Items.validate(arg, configuration=configuration) -ItemsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - typing.Tuple[ - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema[schemas.immutabledict, ItemsTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - component's name collides with the inner schema name - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ItemsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsTupleInput, - ItemsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py deleted file mode 100644 index a6a840dbf02..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/items_schema.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.StrSchema -SomeProperty: typing_extensions.TypeAlias = schemas.StrSchema -SecondAdditionalProperty: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - "someProperty": typing.Type[SomeProperty], - "secondAdditionalProperty": typing.Type[SecondAdditionalProperty], - } -) - - -class ItemsSchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - "someProperty", - "secondAdditionalProperty", - }) - - def __new__( - cls, - *, - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - someProperty: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - secondAdditionalProperty: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("name", name), - ("someProperty", someProperty), - ("secondAdditionalProperty", secondAdditionalProperty), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ItemsSchemaDictInput, arg_) - return ItemsSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ItemsSchemaDictInput, - ItemsSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsSchemaDict: - return ItemsSchema.validate(arg, configuration=configuration) - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def someProperty(self) -> typing.Union[str, schemas.Unset]: - val = self.get("someProperty", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def secondAdditionalProperty(self) -> typing.Union[str, schemas.Unset]: - val = self.get("secondAdditionalProperty", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ItemsSchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ItemsSchema( - schemas.Schema[ItemsSchemaDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ItemsSchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ItemsSchemaDictInput, - ItemsSchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ItemsSchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py deleted file mode 100644 index 53134dcca19..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -OneOf = typing.Tuple[ - typing.Type[json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest], - typing.Type[json_patch_request_remove.JSONPatchRequestRemove], - typing.Type[json_patch_request_move_copy.JSONPatchRequestMoveCopy], -] - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - - - -class JSONPatchRequestTuple( - typing.Tuple[ - schemas.OUTPUT_BASE_TYPES, - ... - ] -): - - def __new__(cls, arg: typing.Union[JSONPatchRequestTupleInput, JSONPatchRequestTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return JSONPatchRequest.validate(arg, configuration=configuration) -JSONPatchRequestTupleInput = typing.Union[ - typing.List[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ], - typing.Tuple[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class JSONPatchRequest( - schemas.Schema[schemas.immutabledict, JSONPatchRequestTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: JSONPatchRequestTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - JSONPatchRequestTupleInput, - JSONPatchRequestTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py deleted file mode 100644 index 4ba34865720..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_add_replace_test.py +++ /dev/null @@ -1,224 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Path: typing_extensions.TypeAlias = schemas.StrSchema -Value: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class OpEnums: - - @schemas.classproperty - def ADD(cls) -> typing.Literal["add"]: - return Op.validate("add") - - @schemas.classproperty - def REPLACE(cls) -> typing.Literal["replace"]: - return Op.validate("replace") - - @schemas.classproperty - def TEST(cls) -> typing.Literal["test"]: - return Op.validate("test") - - -@dataclasses.dataclass(frozen=True) -class Op( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "add": "ADD", - "replace": "REPLACE", - "test": "TEST", - } - ) - enums = OpEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["add"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["add"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["replace"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["replace"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["test"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["test"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["add","replace","test",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "add", - "replace", - "test", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "add", - "replace", - "test", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "path": typing.Type[Path], - "value": typing.Type[Value], - "op": typing.Type[Op], - } -) - - -class JSONPatchRequestAddReplaceTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "op", - "path", - "value", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - op: typing.Literal[ - "add", - "replace", - "test" - ], - path: str, - value: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "op": op, - "path": path, - "value": value, - } - used_arg_ = typing.cast(JSONPatchRequestAddReplaceTestDictInput, arg_) - return JSONPatchRequestAddReplaceTest.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - JSONPatchRequestAddReplaceTestDictInput, - JSONPatchRequestAddReplaceTestDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestAddReplaceTestDict: - return JSONPatchRequestAddReplaceTest.validate(arg, configuration=configuration) - - @property - def op(self) -> typing.Literal["add", "replace", "test"]: - return typing.cast( - typing.Literal["add", "replace", "test"], - self.__getitem__("op") - ) - - @property - def path(self) -> str: - return typing.cast( - str, - self.__getitem__("path") - ) - - @property - def value(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("value") -JSONPatchRequestAddReplaceTestDictInput = typing.TypedDict( - 'JSONPatchRequestAddReplaceTestDictInput', - { - "op": typing.Literal[ - "add", - "replace", - "test" - ], - "path": str, - "value": typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class JSONPatchRequestAddReplaceTest( - schemas.Schema[JSONPatchRequestAddReplaceTestDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "op", - "path", - "value", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: JSONPatchRequestAddReplaceTestDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - JSONPatchRequestAddReplaceTestDictInput, - JSONPatchRequestAddReplaceTestDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestAddReplaceTestDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py deleted file mode 100644 index a7b7a81acbc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_move_copy.py +++ /dev/null @@ -1,199 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -From: typing_extensions.TypeAlias = schemas.StrSchema -Path: typing_extensions.TypeAlias = schemas.StrSchema - - -class OpEnums: - - @schemas.classproperty - def MOVE(cls) -> typing.Literal["move"]: - return Op.validate("move") - - @schemas.classproperty - def COPY(cls) -> typing.Literal["copy"]: - return Op.validate("copy") - - -@dataclasses.dataclass(frozen=True) -class Op( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "move": "MOVE", - "copy": "COPY", - } - ) - enums = OpEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["move"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["move"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["copy"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["copy"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["move","copy",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "move", - "copy", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "move", - "copy", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "from": typing.Type[From], - "path": typing.Type[Path], - "op": typing.Type[Op], - } -) - - -class JSONPatchRequestMoveCopyDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "from", - "op", - "path", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - from: str, - op: typing.Literal[ - "move", - "copy" - ], - path: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "from": from, - "op": op, - "path": path, - } - used_arg_ = typing.cast(JSONPatchRequestMoveCopyDictInput, arg_) - return JSONPatchRequestMoveCopy.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - JSONPatchRequestMoveCopyDictInput, - JSONPatchRequestMoveCopyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestMoveCopyDict: - return JSONPatchRequestMoveCopy.validate(arg, configuration=configuration) - - @property - def from(self) -> str: - return self.__getitem__("from") - - @property - def op(self) -> typing.Literal["move", "copy"]: - return typing.cast( - typing.Literal["move", "copy"], - self.__getitem__("op") - ) - - @property - def path(self) -> str: - return self.__getitem__("path") -JSONPatchRequestMoveCopyDictInput = typing.TypedDict( - 'JSONPatchRequestMoveCopyDictInput', - { - "from": str, - "op": typing.Literal[ - "move", - "copy" - ], - "path": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class JSONPatchRequestMoveCopy( - schemas.Schema[JSONPatchRequestMoveCopyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "from", - "op", - "path", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: JSONPatchRequestMoveCopyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - JSONPatchRequestMoveCopyDictInput, - JSONPatchRequestMoveCopyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestMoveCopyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py b/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py deleted file mode 100644 index 53db226e2de..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/json_patch_request_remove.py +++ /dev/null @@ -1,172 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Path: typing_extensions.TypeAlias = schemas.StrSchema - - -class OpEnums: - - @schemas.classproperty - def REMOVE(cls) -> typing.Literal["remove"]: - return Op.validate("remove") - - -@dataclasses.dataclass(frozen=True) -class Op( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "remove": "REMOVE", - } - ) - enums = OpEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["remove"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["remove"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["remove",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "remove", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "remove", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "path": typing.Type[Path], - "op": typing.Type[Op], - } -) - - -class JSONPatchRequestRemoveDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "op", - "path", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - op: typing.Literal[ - "remove" - ], - path: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "op": op, - "path": path, - } - used_arg_ = typing.cast(JSONPatchRequestRemoveDictInput, arg_) - return JSONPatchRequestRemove.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - JSONPatchRequestRemoveDictInput, - JSONPatchRequestRemoveDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestRemoveDict: - return JSONPatchRequestRemove.validate(arg, configuration=configuration) - - @property - def op(self) -> typing.Literal["remove"]: - return typing.cast( - typing.Literal["remove"], - self.__getitem__("op") - ) - - @property - def path(self) -> str: - return self.__getitem__("path") -JSONPatchRequestRemoveDictInput = typing.TypedDict( - 'JSONPatchRequestRemoveDictInput', - { - "op": typing.Literal[ - "remove" - ], - "path": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class JSONPatchRequestRemove( - schemas.Schema[JSONPatchRequestRemoveDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "op", - "path", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: JSONPatchRequestRemoveDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - JSONPatchRequestRemoveDictInput, - JSONPatchRequestRemoveDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> JSONPatchRequestRemoveDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py b/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py deleted file mode 100644 index 688e15627a2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/mammal.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import pig -from openapi_client.components.schema import whale -from openapi_client.components.schema import zebra -OneOf = typing.Tuple[ - typing.Type[whale.Whale], - typing.Type[zebra.Zebra], - typing.Type[pig.Pig], -] - - -@dataclasses.dataclass(frozen=True) -class Mammal( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'className': { - 'Pig': pig.Pig, - 'whale': whale.Whale, - 'zebra': zebra.Zebra, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py b/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py deleted file mode 100644 index e2486777e5b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/map_test.py +++ /dev/null @@ -1,528 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties2: typing_extensions.TypeAlias = schemas.StrSchema - - -class AdditionalPropertiesDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - used_kwargs = typing.cast(AdditionalPropertiesDictInput, kwargs) - return AdditionalProperties.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesDict: - return AdditionalProperties.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -AdditionalPropertiesDictInput = typing.Mapping[ - str, - str, -] - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties( - schemas.Schema[AdditionalPropertiesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: AdditionalPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> AdditionalPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class MapMapOfStringDict(schemas.immutabledict[str, AdditionalPropertiesDict]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], - ): - used_kwargs = typing.cast(MapMapOfStringDictInput, kwargs) - return MapMapOfString.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapMapOfStringDictInput, - MapMapOfStringDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapMapOfStringDict: - return MapMapOfString.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[AdditionalPropertiesDict, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - AdditionalPropertiesDict, - val - ) -MapMapOfStringDictInput = typing.Mapping[ - str, - typing.Union[ - AdditionalPropertiesDictInput, - AdditionalPropertiesDict, - ], -] - - -@dataclasses.dataclass(frozen=True) -class MapMapOfString( - schemas.Schema[MapMapOfStringDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapMapOfStringDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapMapOfStringDictInput, - MapMapOfStringDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapMapOfStringDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class AdditionalPropertiesEnums: - - @schemas.classproperty - def UPPER(cls) -> typing.Literal["UPPER"]: - return AdditionalProperties3.validate("UPPER") - - @schemas.classproperty - def LOWER(cls) -> typing.Literal["lower"]: - return AdditionalProperties3.validate("lower") - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties3( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "UPPER": "UPPER", - "lower": "LOWER", - } - ) - enums = AdditionalPropertiesEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["UPPER"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["lower"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["lower"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["UPPER","lower",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "UPPER", - "lower", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "UPPER", - "lower", - ], - validated_arg - ) - - -class MapOfEnumStringDict(schemas.immutabledict[str, typing.Literal["UPPER", "lower"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Literal[ - "UPPER", - "lower" - ], - ): - used_kwargs = typing.cast(MapOfEnumStringDictInput, kwargs) - return MapOfEnumString.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapOfEnumStringDictInput, - MapOfEnumStringDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapOfEnumStringDict: - return MapOfEnumString.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[typing.Literal["UPPER", "lower"], schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["UPPER", "lower"], - val - ) -MapOfEnumStringDictInput = typing.Mapping[ - str, - typing.Literal[ - "UPPER", - "lower" - ], -] - - -@dataclasses.dataclass(frozen=True) -class MapOfEnumString( - schemas.Schema[MapOfEnumStringDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapOfEnumStringDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapOfEnumStringDictInput, - MapOfEnumStringDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapOfEnumStringDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AdditionalProperties4: typing_extensions.TypeAlias = schemas.BoolSchema - - -class DirectMapDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(DirectMapDictInput, kwargs) - return DirectMap.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - DirectMapDictInput, - DirectMapDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DirectMapDict: - return DirectMap.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -DirectMapDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class DirectMap( - schemas.Schema[DirectMapDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: DirectMapDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - DirectMapDictInput, - DirectMapDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DirectMapDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - -from openapi_client.components.schema import string_boolean_map -Properties = typing.TypedDict( - 'Properties', - { - "map_map_of_string": typing.Type[MapMapOfString], - "map_of_enum_string": typing.Type[MapOfEnumString], - "direct_map": typing.Type[DirectMap], - "indirect_map": typing.Type[string_boolean_map.StringBooleanMap], - } -) - - -class MapTestDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "map_map_of_string", - "map_of_enum_string", - "direct_map", - "indirect_map", - }) - - def __new__( - cls, - *, - map_map_of_string: typing.Union[ - MapMapOfStringDictInput, - MapMapOfStringDict, - schemas.Unset - ] = schemas.unset, - map_of_enum_string: typing.Union[ - MapOfEnumStringDictInput, - MapOfEnumStringDict, - schemas.Unset - ] = schemas.unset, - direct_map: typing.Union[ - DirectMapDictInput, - DirectMapDict, - schemas.Unset - ] = schemas.unset, - indirect_map: typing.Union[ - string_boolean_map.StringBooleanMapDictInput, - string_boolean_map.StringBooleanMapDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("map_map_of_string", map_map_of_string), - ("map_of_enum_string", map_of_enum_string), - ("direct_map", direct_map), - ("indirect_map", indirect_map), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(MapTestDictInput, arg_) - return MapTest.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapTestDictInput, - MapTestDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapTestDict: - return MapTest.validate(arg, configuration=configuration) - - @property - def map_map_of_string(self) -> typing.Union[MapMapOfStringDict, schemas.Unset]: - val = self.get("map_map_of_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapMapOfStringDict, - val - ) - - @property - def map_of_enum_string(self) -> typing.Union[MapOfEnumStringDict, schemas.Unset]: - val = self.get("map_of_enum_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapOfEnumStringDict, - val - ) - - @property - def direct_map(self) -> typing.Union[DirectMapDict, schemas.Unset]: - val = self.get("direct_map", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - DirectMapDict, - val - ) - - @property - def indirect_map(self) -> typing.Union[string_boolean_map.StringBooleanMapDict, schemas.Unset]: - val = self.get("indirect_map", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - string_boolean_map.StringBooleanMapDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -MapTestDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class MapTest( - schemas.Schema[MapTestDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapTestDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapTestDictInput, - MapTestDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapTestDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py deleted file mode 100644 index 7d5aa2dbd8c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py +++ /dev/null @@ -1,226 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema -DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema - -from openapi_client.components.schema import animal - - -class MapDict(schemas.immutabledict[str, animal.AnimalDict]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - animal.AnimalDictInput, - animal.AnimalDict, - ], - ): - used_kwargs = typing.cast(MapDictInput, kwargs) - return Map.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MapDictInput, - MapDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapDict: - return Map.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[animal.AnimalDict, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - animal.AnimalDict, - val - ) -MapDictInput = typing.Mapping[ - str, - typing.Union[ - animal.AnimalDictInput, - animal.AnimalDict, - ], -] - - -@dataclasses.dataclass(frozen=True) -class Map( - schemas.Schema[MapDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[animal.Animal] = dataclasses.field(default_factory=lambda: animal.Animal) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MapDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MapDictInput, - MapDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MapDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -Properties = typing.TypedDict( - 'Properties', - { - "uuid": typing.Type[Uuid], - "dateTime": typing.Type[DateTime], - "map": typing.Type[Map], - } -) - - -class MixedPropertiesAndAdditionalPropertiesClassDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "uuid", - "dateTime", - "map", - }) - - def __new__( - cls, - *, - uuid: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, - map: typing.Union[ - MapDictInput, - MapDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("uuid", uuid), - ("dateTime", dateTime), - ("map", map), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(MixedPropertiesAndAdditionalPropertiesClassDictInput, arg_) - return MixedPropertiesAndAdditionalPropertiesClass.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MixedPropertiesAndAdditionalPropertiesClassDictInput, - MixedPropertiesAndAdditionalPropertiesClassDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MixedPropertiesAndAdditionalPropertiesClassDict: - return MixedPropertiesAndAdditionalPropertiesClass.validate(arg, configuration=configuration) - - @property - def uuid(self) -> typing.Union[str, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def map(self) -> typing.Union[MapDict, schemas.Unset]: - val = self.get("map", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - MapDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -MixedPropertiesAndAdditionalPropertiesClassDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class MixedPropertiesAndAdditionalPropertiesClass( - schemas.Schema[MixedPropertiesAndAdditionalPropertiesClassDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MixedPropertiesAndAdditionalPropertiesClassDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MixedPropertiesAndAdditionalPropertiesClassDictInput, - MixedPropertiesAndAdditionalPropertiesClassDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MixedPropertiesAndAdditionalPropertiesClassDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/money.py b/samples/client/petstore/python/src/openapi_client/components/schema/money.py deleted file mode 100644 index 0533edbf3c3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/money.py +++ /dev/null @@ -1,125 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Amount: typing_extensions.TypeAlias = schemas.DecimalSchema - -from openapi_client.components.schema import currency -Properties = typing.TypedDict( - 'Properties', - { - "amount": typing.Type[Amount], - "currency": typing.Type[currency.Currency], - } -) - - -class MoneyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "amount", - "currency", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - amount: str, - currency: typing.Literal[ - "eur", - "usd" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "amount": amount, - "currency": currency, - } - used_arg_ = typing.cast(MoneyDictInput, arg_) - return Money.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MoneyDictInput, - MoneyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MoneyDict: - return Money.validate(arg, configuration=configuration) - - @property - def amount(self) -> str: - return typing.cast( - str, - self.__getitem__("amount") - ) - - @property - def currency(self) -> typing.Literal["eur", "usd"]: - return typing.cast( - typing.Literal["eur", "usd"], - self.__getitem__("currency") - ) -MoneyDictInput = typing.TypedDict( - 'MoneyDictInput', - { - "amount": str, - "currency": typing.Literal[ - "eur", - "usd" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class Money( - schemas.Schema[MoneyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "amount", - "currency", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MoneyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MoneyDictInput, - MoneyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MoneyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py b/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py deleted file mode 100644 index 6c356159bc7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/multi_properties_schema.py +++ /dev/null @@ -1,222 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Status: typing_extensions.TypeAlias = schemas.Int32Schema -Message: typing_extensions.TypeAlias = schemas.StrSchema -MultiPropertiesSchemaRequiredDictInput = typing.TypedDict( - 'MultiPropertiesSchemaRequiredDictInput', - { - "status": int, - } -) - -from openapi_client.components.schema import items_schema - - -class DataTuple( - typing.Tuple[ - items_schema.ItemsSchemaDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[DataTupleInput, DataTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Data.validate(arg, configuration=configuration) -DataTupleInput = typing.Union[ - typing.List[ - typing.Union[ - items_schema.ItemsSchemaDictInput, - items_schema.ItemsSchemaDict, - ], - ], - typing.Tuple[ - typing.Union[ - items_schema.ItemsSchemaDictInput, - items_schema.ItemsSchemaDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Data( - schemas.Schema[schemas.immutabledict, DataTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[items_schema.ItemsSchema] = dataclasses.field(default_factory=lambda: items_schema.ItemsSchema) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: DataTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - DataTupleInput, - DataTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> DataTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "status": typing.Type[Status], - "data": typing.Type[Data], - "message": typing.Type[Message], - } -) -MultiPropertiesSchemaOptionalDictInput = typing.TypedDict( - 'MultiPropertiesSchemaOptionalDictInput', - { - "data": typing.Union[ - DataTupleInput, - DataTuple - ], - "message": str, - }, - total=False -) - - -class MultiPropertiesSchemaDict(schemas.immutabledict[str, typing.Union[ - str, - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - int, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "status", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "data", - "message", - }) - - def __new__( - cls, - *, - status: int, - data: typing.Union[ - DataTupleInput, - DataTuple, - schemas.Unset - ] = schemas.unset, - message: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "status": status, - } - for key_, val in ( - ("data", data), - ("message", message), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(MultiPropertiesSchemaDictInput, arg_) - return MultiPropertiesSchema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MultiPropertiesSchemaDictInput, - MultiPropertiesSchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MultiPropertiesSchemaDict: - return MultiPropertiesSchema.validate(arg, configuration=configuration) - - @property - def status(self) -> int: - return typing.cast( - int, - self.__getitem__("status") - ) - - @property - def data(self) -> typing.Union[DataTuple, schemas.Unset]: - val = self.get("data", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - DataTuple, - val - ) - - @property - def message(self) -> typing.Union[str, schemas.Unset]: - val = self.get("message", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - -class MultiPropertiesSchemaDictInput(MultiPropertiesSchemaRequiredDictInput, MultiPropertiesSchemaOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class MultiPropertiesSchema( - schemas.Schema[MultiPropertiesSchemaDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "status", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MultiPropertiesSchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MultiPropertiesSchemaDictInput, - MultiPropertiesSchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MultiPropertiesSchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py b/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py deleted file mode 100644 index 6d2a61bf19e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/my_object_dto.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Id: typing_extensions.TypeAlias = schemas.UUIDSchema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - } -) - - -class MyObjectDtoDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - }) - - def __new__( - cls, - *, - id: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("id", id), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(MyObjectDtoDictInput, arg_) - return MyObjectDto.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - MyObjectDtoDictInput, - MyObjectDtoDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MyObjectDtoDict: - return MyObjectDto.validate(arg, configuration=configuration) - - @property - def id(self) -> typing.Union[str, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -MyObjectDtoDictInput = typing.TypedDict( - 'MyObjectDtoDictInput', - { - "id": typing.Union[ - str, - uuid.UUID - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class MyObjectDto( - schemas.Schema[MyObjectDtoDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: MyObjectDtoDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - MyObjectDtoDictInput, - MyObjectDtoDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> MyObjectDtoDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/name.py b/samples/client/petstore/python/src/openapi_client/components/schema/name.py deleted file mode 100644 index 7030d71b423..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/name.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name2: typing_extensions.TypeAlias = schemas.Int32Schema -SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema -Property: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name2], - "snake_case": typing.Type[SnakeCase], - "property": typing.Type[Property], - } -) - - -class NameDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "name", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "snake_case", - "property", - }) - - def __new__( - cls, - *, - name: int, - snake_case: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - property: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "name": name, - } - for key_, val in ( - ("snake_case", snake_case), - ("property", property), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(NameDictInput, arg_) - return Name.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NameDictInput, - NameDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NameDict: - return Name.validate(arg, configuration=configuration) - - @property - def name(self) -> int: - return typing.cast( - int, - self.__getitem__("name") - ) - - @property - def snake_case(self) -> typing.Union[int, schemas.Unset]: - val = self.get("snake_case", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def property(self) -> typing.Union[str, schemas.Unset]: - val = self.get("property", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -NameDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Name( - schemas.AnyTypeSchema[NameDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Model for testing model name same as property name - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "name", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NameDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py deleted file mode 100644 index a751b482402..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/no_additional_properties.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Id: typing_extensions.TypeAlias = schemas.Int64Schema -PetId: typing_extensions.TypeAlias = schemas.Int64Schema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "petId": typing.Type[PetId], - } -) -NoAdditionalPropertiesRequiredDictInput = typing.TypedDict( - 'NoAdditionalPropertiesRequiredDictInput', - { - "id": int, - } -) -NoAdditionalPropertiesOptionalDictInput = typing.TypedDict( - 'NoAdditionalPropertiesOptionalDictInput', - { - "petId": int, - }, - total=False -) - - -class NoAdditionalPropertiesDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - - def __new__( - cls, - *, - id: int, - petId: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "id": id, - } - for key_, val in ( - ("petId", petId), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(NoAdditionalPropertiesDictInput, arg_) - return NoAdditionalProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NoAdditionalPropertiesDictInput, - NoAdditionalPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NoAdditionalPropertiesDict: - return NoAdditionalProperties.validate(arg, configuration=configuration) - - @property - def id(self) -> int: - return self.__getitem__("id") - - @property - def petId(self) -> typing.Union[int, schemas.Unset]: - val = self.get("petId", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - -class NoAdditionalPropertiesDictInput(NoAdditionalPropertiesRequiredDictInput, NoAdditionalPropertiesOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class NoAdditionalProperties( - schemas.Schema[NoAdditionalPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NoAdditionalPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NoAdditionalPropertiesDictInput, - NoAdditionalPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NoAdditionalPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py deleted file mode 100644 index 06e22208f41..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_class.py +++ /dev/null @@ -1,1412 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties4( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class IntegerProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - int, - }) - format: str = 'int' - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class NumberProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - float, - int, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class BooleanProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.Bool, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class StringProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class DateProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - format: str = 'date' - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class DatetimeProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - format: str = 'date-time' - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - -Items: typing_extensions.TypeAlias = schemas.DictSchema - - -class ArrayNullablePropTuple( - typing.Tuple[ - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayNullablePropTupleInput, ArrayNullablePropTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayNullableProp.validate(arg, configuration=configuration) -ArrayNullablePropTupleInput = typing.Union[ - typing.List[ - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - typing.Tuple[ - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayNullableProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayNullablePropTuple], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - tuple, - }) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayNullablePropTuple, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayNullablePropTupleInput, - ArrayNullablePropTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayNullablePropTuple: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class Items2( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class ArrayAndItemsNullablePropTuple( - typing.Tuple[ - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayAndItemsNullablePropTupleInput, ArrayAndItemsNullablePropTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayAndItemsNullableProp.validate(arg, configuration=configuration) -ArrayAndItemsNullablePropTupleInput = typing.Union[ - typing.List[ - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ], - typing.Tuple[ - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayAndItemsNullableProp( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayAndItemsNullablePropTuple], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - tuple, - }) - items: typing.Type[Items2] = dataclasses.field(default_factory=lambda: Items2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayAndItemsNullablePropTuple, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayAndItemsNullablePropTupleInput, - ArrayAndItemsNullablePropTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayAndItemsNullablePropTuple: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class Items3( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class ArrayItemsNullableTuple( - typing.Tuple[ - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayItemsNullableTupleInput, ArrayItemsNullableTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayItemsNullable.validate(arg, configuration=configuration) -ArrayItemsNullableTupleInput = typing.Union[ - typing.List[ - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ], - typing.Tuple[ - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayItemsNullable( - schemas.Schema[schemas.immutabledict, ArrayItemsNullableTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items3] = dataclasses.field(default_factory=lambda: Items3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayItemsNullableTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayItemsNullableTupleInput, - ArrayItemsNullableTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayItemsNullableTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -AdditionalProperties: typing_extensions.TypeAlias = schemas.DictSchema - - -class ObjectNullablePropDict(schemas.immutabledict[str, schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ): - used_kwargs = typing.cast(ObjectNullablePropDictInput, kwargs) - return ObjectNullableProp.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectNullablePropDictInput, - ObjectNullablePropDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectNullablePropDict: - return ObjectNullableProp.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) -ObjectNullablePropDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], -] - - -@dataclasses.dataclass(frozen=True) -class ObjectNullableProp( - schemas.Schema[ObjectNullablePropDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectNullablePropDict, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectNullablePropDictInput, - ObjectNullablePropDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectNullablePropDict: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties2( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class ObjectAndItemsNullablePropDict(schemas.immutabledict[str, typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ): - used_kwargs = typing.cast(ObjectAndItemsNullablePropDictInput, kwargs) - return ObjectAndItemsNullableProp.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectAndItemsNullablePropDictInput, - ObjectAndItemsNullablePropDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectAndItemsNullablePropDict: - return ObjectAndItemsNullableProp.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], - ]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - val - ) -ObjectAndItemsNullablePropDictInput = typing.Mapping[ - str, - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], -] - - -@dataclasses.dataclass(frozen=True) -class ObjectAndItemsNullableProp( - schemas.Schema[ObjectAndItemsNullablePropDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - additional_properties: typing.Type[AdditionalProperties2] = dataclasses.field(default_factory=lambda: AdditionalProperties2) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectAndItemsNullablePropDict, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectAndItemsNullablePropDictInput, - ObjectAndItemsNullablePropDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectAndItemsNullablePropDict: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass(frozen=True) -class AdditionalProperties3( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - - - -class ObjectItemsNullableDict(schemas.immutabledict[str, typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ): - used_kwargs = typing.cast(ObjectItemsNullableDictInput, kwargs) - return ObjectItemsNullable.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectItemsNullableDictInput, - ObjectItemsNullableDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectItemsNullableDict: - return ObjectItemsNullable.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], - ]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - val - ) -ObjectItemsNullableDictInput = typing.Mapping[ - str, - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], -] - - -@dataclasses.dataclass(frozen=True) -class ObjectItemsNullable( - schemas.Schema[ObjectItemsNullableDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties3] = dataclasses.field(default_factory=lambda: AdditionalProperties3) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectItemsNullableDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectItemsNullableDictInput, - ObjectItemsNullableDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectItemsNullableDict: - return super().validate_base( - arg, - configuration=configuration, - ) - -Properties = typing.TypedDict( - 'Properties', - { - "integer_prop": typing.Type[IntegerProp], - "number_prop": typing.Type[NumberProp], - "boolean_prop": typing.Type[BooleanProp], - "string_prop": typing.Type[StringProp], - "date_prop": typing.Type[DateProp], - "datetime_prop": typing.Type[DatetimeProp], - "array_nullable_prop": typing.Type[ArrayNullableProp], - "array_and_items_nullable_prop": typing.Type[ArrayAndItemsNullableProp], - "array_items_nullable": typing.Type[ArrayItemsNullable], - "object_nullable_prop": typing.Type[ObjectNullableProp], - "object_and_items_nullable_prop": typing.Type[ObjectAndItemsNullableProp], - "object_items_nullable": typing.Type[ObjectItemsNullable], - } -) - - -class NullableClassDict(schemas.immutabledict[str, typing.Union[ - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - None, - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - str, - bool, - typing.Union[int, float], - int, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "integer_prop", - "number_prop", - "boolean_prop", - "string_prop", - "date_prop", - "datetime_prop", - "array_nullable_prop", - "array_and_items_nullable_prop", - "array_items_nullable", - "object_nullable_prop", - "object_and_items_nullable_prop", - "object_items_nullable", - }) - - def __new__( - cls, - *, - integer_prop: typing.Union[ - None, - int, - schemas.Unset - ] = schemas.unset, - number_prop: typing.Union[ - None, - typing.Union[ - int, - float - ], - schemas.Unset - ] = schemas.unset, - boolean_prop: typing.Union[ - None, - bool, - schemas.Unset - ] = schemas.unset, - string_prop: typing.Union[ - None, - str, - schemas.Unset - ] = schemas.unset, - date_prop: typing.Union[ - None, - typing.Union[ - str, - datetime.date - ], - schemas.Unset - ] = schemas.unset, - datetime_prop: typing.Union[ - None, - typing.Union[ - str, - datetime.datetime - ], - schemas.Unset - ] = schemas.unset, - array_nullable_prop: typing.Union[ - None, - typing.Union[ - ArrayNullablePropTupleInput, - ArrayNullablePropTuple - ], - schemas.Unset - ] = schemas.unset, - array_and_items_nullable_prop: typing.Union[ - None, - typing.Union[ - ArrayAndItemsNullablePropTupleInput, - ArrayAndItemsNullablePropTuple - ], - schemas.Unset - ] = schemas.unset, - array_items_nullable: typing.Union[ - ArrayItemsNullableTupleInput, - ArrayItemsNullableTuple, - schemas.Unset - ] = schemas.unset, - object_nullable_prop: typing.Union[ - None, - typing.Union[ - ObjectNullablePropDictInput, - ObjectNullablePropDict, - ], - schemas.Unset - ] = schemas.unset, - object_and_items_nullable_prop: typing.Union[ - None, - typing.Union[ - ObjectAndItemsNullablePropDictInput, - ObjectAndItemsNullablePropDict, - ], - schemas.Unset - ] = schemas.unset, - object_items_nullable: typing.Union[ - ObjectItemsNullableDictInput, - ObjectItemsNullableDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("integer_prop", integer_prop), - ("number_prop", number_prop), - ("boolean_prop", boolean_prop), - ("string_prop", string_prop), - ("date_prop", date_prop), - ("datetime_prop", datetime_prop), - ("array_nullable_prop", array_nullable_prop), - ("array_and_items_nullable_prop", array_and_items_nullable_prop), - ("array_items_nullable", array_items_nullable), - ("object_nullable_prop", object_nullable_prop), - ("object_and_items_nullable_prop", object_and_items_nullable_prop), - ("object_items_nullable", object_items_nullable), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(NullableClassDictInput, arg_) - return NullableClass.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NullableClassDictInput, - NullableClassDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NullableClassDict: - return NullableClass.validate(arg, configuration=configuration) - - @property - def integer_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[int, schemas.Unset], - ]: - val = self.get("integer_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - int, - ], - val - ) - - @property - def number_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[int, float, schemas.Unset], - ]: - val = self.get("number_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - typing.Union[int, float], - ], - val - ) - - @property - def boolean_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[bool, schemas.Unset], - ]: - val = self.get("boolean_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - bool, - ], - val - ) - - @property - def string_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[str, schemas.Unset], - ]: - val = self.get("string_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - str, - ], - val - ) - - @property - def date_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[str, schemas.Unset], - ]: - val = self.get("date_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - str, - ], - val - ) - - @property - def datetime_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[str, schemas.Unset], - ]: - val = self.get("datetime_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - str, - ], - val - ) - - @property - def array_nullable_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[ArrayNullablePropTuple, schemas.Unset], - ]: - val = self.get("array_nullable_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - ArrayNullablePropTuple, - ], - val - ) - - @property - def array_and_items_nullable_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[ArrayAndItemsNullablePropTuple, schemas.Unset], - ]: - val = self.get("array_and_items_nullable_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - ArrayAndItemsNullablePropTuple, - ], - val - ) - - @property - def array_items_nullable(self) -> typing.Union[ArrayItemsNullableTuple, schemas.Unset]: - val = self.get("array_items_nullable", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ArrayItemsNullableTuple, - val - ) - - @property - def object_nullable_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[ObjectNullablePropDict, schemas.Unset], - ]: - val = self.get("object_nullable_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - ObjectNullablePropDict, - ], - val - ) - - @property - def object_and_items_nullable_prop(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[ObjectAndItemsNullablePropDict, schemas.Unset], - ]: - val = self.get("object_and_items_nullable_prop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - ObjectAndItemsNullablePropDict, - ], - val - ) - - @property - def object_items_nullable(self) -> typing.Union[ObjectItemsNullableDict, schemas.Unset]: - val = self.get("object_items_nullable", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - ObjectItemsNullableDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], - ]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - val - ) -NullableClassDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - None, - int, - ], - typing.Union[ - None, - typing.Union[ - int, - float - ], - ], - typing.Union[ - None, - bool, - ], - typing.Union[ - None, - str, - ], - typing.Union[ - None, - typing.Union[ - str, - datetime.date - ], - ], - typing.Union[ - None, - typing.Union[ - str, - datetime.datetime - ], - ], - typing.Union[ - None, - typing.Union[ - ArrayNullablePropTupleInput, - ArrayNullablePropTuple - ], - ], - typing.Union[ - None, - typing.Union[ - ArrayAndItemsNullablePropTupleInput, - ArrayAndItemsNullablePropTuple - ], - ], - typing.Union[ - ArrayItemsNullableTupleInput, - ArrayItemsNullableTuple - ], - typing.Union[ - None, - typing.Union[ - ObjectNullablePropDictInput, - ObjectNullablePropDict, - ], - ], - typing.Union[ - None, - typing.Union[ - ObjectAndItemsNullablePropDictInput, - ObjectAndItemsNullablePropDict, - ], - ], - typing.Union[ - ObjectItemsNullableDictInput, - ObjectItemsNullableDict, - ], - typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - ], - ] -] - - -@dataclasses.dataclass(frozen=True) -class NullableClass( - schemas.Schema[NullableClassDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties4] = dataclasses.field(default_factory=lambda: AdditionalProperties4) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NullableClassDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NullableClassDictInput, - NullableClassDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NullableClassDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py deleted file mode 100644 index 68376c81c0b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_shape.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_2: typing_extensions.TypeAlias = schemas.NoneSchema -OneOf = typing.Tuple[ - typing.Type[triangle.Triangle], - typing.Type[quadrilateral.Quadrilateral], - typing.Type[_2], -] - - -@dataclasses.dataclass(frozen=True) -class NullableShape( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) - """ - # any type - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py deleted file mode 100644 index c263e53376e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/nullable_string.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class NullableString( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number.py b/samples/client/petstore/python/src/openapi_client/components/schema/number.py deleted file mode 100644 index 1ea05776faa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/number.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Number: typing_extensions.TypeAlias = schemas.NumberSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py deleted file mode 100644 index 2f927f8d960..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/number_only.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -JustNumber: typing_extensions.TypeAlias = schemas.NumberSchema -Properties = typing.TypedDict( - 'Properties', - { - "JustNumber": typing.Type[JustNumber], - } -) - - -class NumberOnlyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "JustNumber", - }) - - def __new__( - cls, - *, - JustNumber: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("JustNumber", JustNumber), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(NumberOnlyDictInput, arg_) - return NumberOnly.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - NumberOnlyDictInput, - NumberOnlyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NumberOnlyDict: - return NumberOnly.validate(arg, configuration=configuration) - - @property - def JustNumber(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("JustNumber", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -NumberOnlyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class NumberOnly( - schemas.Schema[NumberOnlyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: NumberOnlyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - NumberOnlyDictInput, - NumberOnlyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> NumberOnlyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py deleted file mode 100644 index a5bacab32d2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_exclusive_min_max.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class NumberWithExclusiveMinMax( - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - exclusive_maximum: typing.Union[int, float] = 12 - exclusive_minimum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py deleted file mode 100644 index b8a978621dc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/number_with_validations.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class NumberWithValidations( - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - inclusive_maximum: typing.Union[int, float] = 20 - inclusive_minimum: typing.Union[int, float] = 10 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py deleted file mode 100644 index 02540b7788a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -A: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - } -) - - -class ObjWithRequiredPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "a", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - a: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "a": a, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ObjWithRequiredPropsDictInput, arg_) - return ObjWithRequiredProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjWithRequiredPropsDictInput, - ObjWithRequiredPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjWithRequiredPropsDict: - return ObjWithRequiredProps.validate(arg, configuration=configuration) - - @property - def a(self) -> str: - return typing.cast( - str, - self.__getitem__("a") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjWithRequiredPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] -AllOf = typing.Tuple[ - typing.Type[obj_with_required_props_base.ObjWithRequiredPropsBase], -] - - -@dataclasses.dataclass(frozen=True) -class ObjWithRequiredProps( - schemas.Schema[ObjWithRequiredPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "a", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjWithRequiredPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjWithRequiredPropsDictInput, - ObjWithRequiredPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjWithRequiredPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py b/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py deleted file mode 100644 index 3009e56b59b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/obj_with_required_props_base.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -B: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "b": typing.Type[B], - } -) - - -class ObjWithRequiredPropsBaseDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "b", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - b: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "b": b, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ObjWithRequiredPropsBaseDictInput, arg_) - return ObjWithRequiredPropsBase.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjWithRequiredPropsBaseDictInput, - ObjWithRequiredPropsBaseDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjWithRequiredPropsBaseDict: - return ObjWithRequiredPropsBase.validate(arg, configuration=configuration) - - @property - def b(self) -> str: - return typing.cast( - str, - self.__getitem__("b") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjWithRequiredPropsBaseDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjWithRequiredPropsBase( - schemas.Schema[ObjWithRequiredPropsBaseDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "b", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjWithRequiredPropsBaseDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjWithRequiredPropsBaseDictInput, - ObjWithRequiredPropsBaseDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjWithRequiredPropsBaseDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py deleted file mode 100644 index fb9ab4c7c15..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_interface.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -ObjectInterface: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py deleted file mode 100644 index cabbb2a3623..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Arg: typing_extensions.TypeAlias = schemas.StrSchema -Args: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "arg": typing.Type[Arg], - "args": typing.Type[Args], - } -) - - -class ObjectModelWithArgAndArgsPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "arg", - "args", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - arg: str, - args: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "arg": arg, - "args": args, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectModelWithArgAndArgsPropertiesDictInput, arg_) - return ObjectModelWithArgAndArgsProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectModelWithArgAndArgsPropertiesDictInput, - ObjectModelWithArgAndArgsPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectModelWithArgAndArgsPropertiesDict: - return ObjectModelWithArgAndArgsProperties.validate(arg, configuration=configuration) - - @property - def arg(self) -> str: - return typing.cast( - str, - self.__getitem__("arg") - ) - - @property - def args(self) -> str: - return typing.cast( - str, - self.__getitem__("args") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectModelWithArgAndArgsPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectModelWithArgAndArgsProperties( - schemas.Schema[ObjectModelWithArgAndArgsPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "arg", - "args", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectModelWithArgAndArgsPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectModelWithArgAndArgsPropertiesDictInput, - ObjectModelWithArgAndArgsPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectModelWithArgAndArgsPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py deleted file mode 100644 index ed6dfbe5a07..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_model_with_ref_props.py +++ /dev/null @@ -1,150 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import boolean -from openapi_client.components.schema import number_with_validations -from openapi_client.components.schema import string -Properties = typing.TypedDict( - 'Properties', - { - "myNumber": typing.Type[number_with_validations.NumberWithValidations], - "myString": typing.Type[string.String], - "myBoolean": typing.Type[boolean.Boolean], - } -) - - -class ObjectModelWithRefPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "myNumber", - "myString", - "myBoolean", - }) - - def __new__( - cls, - *, - myNumber: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - myString: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - myBoolean: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("myNumber", myNumber), - ("myString", myString), - ("myBoolean", myBoolean), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectModelWithRefPropsDictInput, arg_) - return ObjectModelWithRefProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectModelWithRefPropsDictInput, - ObjectModelWithRefPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectModelWithRefPropsDict: - return ObjectModelWithRefProps.validate(arg, configuration=configuration) - - @property - def myNumber(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("myNumber", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def myString(self) -> typing.Union[str, schemas.Unset]: - val = self.get("myString", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def myBoolean(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("myBoolean", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectModelWithRefPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectModelWithRefProps( - schemas.Schema[ObjectModelWithRefPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectModelWithRefPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectModelWithRefPropsDictInput, - ObjectModelWithRefPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectModelWithRefPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py deleted file mode 100644 index 9a74696cd1d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "test", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - }) - - def __new__( - cls, - *, - test: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "test": test, - } - for key_, val in ( - ("name", name), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def test(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("test") - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "test", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[object_with_optional_test_prop.ObjectWithOptionalTestProp], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py deleted file mode 100644 index 738c2e61ad2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_colliding_properties.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -SomeProp: typing_extensions.TypeAlias = schemas.DictSchema -Someprop2: typing_extensions.TypeAlias = schemas.DictSchema -Properties = typing.TypedDict( - 'Properties', - { - "someProp": typing.Type[SomeProp], - "someprop": typing.Type[Someprop2], - } -) - - -class ObjectWithCollidingPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someProp", - "someprop", - }) - - def __new__( - cls, - *, - someProp: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - schemas.Unset - ] = schemas.unset, - someprop: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someProp", someProp), - ("someprop", someprop), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithCollidingPropertiesDictInput, arg_) - return ObjectWithCollidingProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithCollidingPropertiesDictInput, - ObjectWithCollidingPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithCollidingPropertiesDict: - return ObjectWithCollidingProperties.validate(arg, configuration=configuration) - - @property - def someProp(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("someProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) - - @property - def someprop(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("someprop", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithCollidingPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithCollidingProperties( - schemas.Schema[ObjectWithCollidingPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - component with properties that have name collisions - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithCollidingPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithCollidingPropertiesDictInput, - ObjectWithCollidingPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithCollidingPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py deleted file mode 100644 index ff658ab2a64..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_decimal_properties.py +++ /dev/null @@ -1,148 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Width: typing_extensions.TypeAlias = schemas.DecimalSchema - -from openapi_client.components.schema import decimal_payload -from openapi_client.components.schema import money -Properties = typing.TypedDict( - 'Properties', - { - "length": typing.Type[decimal_payload.DecimalPayload], - "width": typing.Type[Width], - "cost": typing.Type[money.Money], - } -) - - -class ObjectWithDecimalPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "length", - "width", - "cost", - }) - - def __new__( - cls, - *, - length: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - width: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - cost: typing.Union[ - money.MoneyDictInput, - money.MoneyDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("length", length), - ("width", width), - ("cost", cost), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithDecimalPropertiesDictInput, arg_) - return ObjectWithDecimalProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithDecimalPropertiesDictInput, - ObjectWithDecimalPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithDecimalPropertiesDict: - return ObjectWithDecimalProperties.validate(arg, configuration=configuration) - - @property - def length(self) -> typing.Union[str, schemas.Unset]: - val = self.get("length", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def width(self) -> typing.Union[str, schemas.Unset]: - val = self.get("width", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def cost(self) -> typing.Union[money.MoneyDict, schemas.Unset]: - val = self.get("cost", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - money.MoneyDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithDecimalPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithDecimalProperties( - schemas.Schema[ObjectWithDecimalPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithDecimalPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithDecimalPropertiesDictInput, - ObjectWithDecimalPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithDecimalPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py deleted file mode 100644 index 732254311da..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_difficultly_named_props.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -SpecialPropertyName: typing_extensions.TypeAlias = schemas.Int64Schema -_123List: typing_extensions.TypeAlias = schemas.StrSchema -_123Number: typing_extensions.TypeAlias = schemas.IntSchema -Properties = typing.TypedDict( - 'Properties', - { - "$special[property.name]": typing.Type[SpecialPropertyName], - "123-list": typing.Type[_123List], - "123Number": typing.Type[_123Number], - } -) - - -class ObjectWithDifficultlyNamedPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "123-list", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "$special[property.name]", - "123Number", - }) - - def __new__( - cls, - *, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - } - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithDifficultlyNamedPropsDictInput, arg_) - return ObjectWithDifficultlyNamedProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithDifficultlyNamedPropsDictInput, - ObjectWithDifficultlyNamedPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithDifficultlyNamedPropsDict: - return ObjectWithDifficultlyNamedProps.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithDifficultlyNamedPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithDifficultlyNamedProps( - schemas.Schema[ObjectWithDifficultlyNamedPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - model with properties that have invalid names for python - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "123-list", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithDifficultlyNamedPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithDifficultlyNamedPropsDictInput, - ObjectWithDifficultlyNamedPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithDifficultlyNamedPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py deleted file mode 100644 index d187881e16e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_inline_composition_property.py +++ /dev/null @@ -1,129 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class SomeProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -Properties = typing.TypedDict( - 'Properties', - { - "someProp": typing.Type[SomeProp], - } -) - - -class ObjectWithInlineCompositionPropertyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someProp", - }) - - def __new__( - cls, - *, - someProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someProp", someProp), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithInlineCompositionPropertyDictInput, arg_) - return ObjectWithInlineCompositionProperty.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithInlineCompositionPropertyDictInput, - ObjectWithInlineCompositionPropertyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithInlineCompositionPropertyDict: - return ObjectWithInlineCompositionProperty.validate(arg, configuration=configuration) - - @property - def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("someProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithInlineCompositionPropertyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithInlineCompositionProperty( - schemas.Schema[ObjectWithInlineCompositionPropertyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithInlineCompositionPropertyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithInlineCompositionPropertyDictInput, - ObjectWithInlineCompositionPropertyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithInlineCompositionPropertyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py deleted file mode 100644 index 328ab930691..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import array_with_validations_in_items -from openapi_client.components.schema import from_schema -Properties = typing.TypedDict( - 'Properties', - { - "from": typing.Type[from_schema.FromSchema], - "!reference": typing.Type[array_with_validations_in_items.ArrayWithValidationsInItems], - } -) - - -class ObjectWithInvalidNamedRefedPropertiesDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "!reference", - "from", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - from: typing.Union[ - from_schema.FromSchemaDictInput, - from_schema.FromSchemaDict, - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "from": from, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithInvalidNamedRefedPropertiesDictInput, arg_) - return ObjectWithInvalidNamedRefedProperties.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithInvalidNamedRefedPropertiesDictInput, - ObjectWithInvalidNamedRefedPropertiesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithInvalidNamedRefedPropertiesDict: - return ObjectWithInvalidNamedRefedProperties.validate(arg, configuration=configuration) - - @property - def from(self) -> from_schema.FromSchemaDict: - return typing.cast( - from_schema.FromSchemaDict, - self.__getitem__("from") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithInvalidNamedRefedPropertiesDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithInvalidNamedRefedProperties( - schemas.Schema[ObjectWithInvalidNamedRefedPropertiesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "!reference", - "from", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithInvalidNamedRefedPropertiesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithInvalidNamedRefedPropertiesDictInput, - ObjectWithInvalidNamedRefedPropertiesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithInvalidNamedRefedPropertiesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py deleted file mode 100644 index 7037916edb4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_non_intersecting_values.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema -A: typing_extensions.TypeAlias = schemas.NumberSchema -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - } -) - - -class ObjectWithNonIntersectingValuesDict(schemas.immutabledict[str, typing.Union[ - typing.Union[int, float], - str, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "a", - }) - - def __new__( - cls, - *, - a: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("a", a), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithNonIntersectingValuesDictInput, arg_) - return ObjectWithNonIntersectingValues.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithNonIntersectingValuesDictInput, - ObjectWithNonIntersectingValuesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithNonIntersectingValuesDict: - return ObjectWithNonIntersectingValues.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("a", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -ObjectWithNonIntersectingValuesDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - int, - float - ], - str, - ] -] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithNonIntersectingValues( - schemas.Schema[ObjectWithNonIntersectingValuesDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithNonIntersectingValuesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithNonIntersectingValuesDictInput, - ObjectWithNonIntersectingValuesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithNonIntersectingValuesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py deleted file mode 100644 index 393fd12fbc5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_only_optional_props.py +++ /dev/null @@ -1,256 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -A: typing_extensions.TypeAlias = schemas.StrSchema -B: typing_extensions.TypeAlias = schemas.NumberSchema - -from openapi_client.components.schema import enum_class - - -class ArrayPropertyTuple( - typing.Tuple[ - typing.Literal["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M"], - ... - ] -): - - def __new__(cls, arg: typing.Union[ArrayPropertyTupleInput, ArrayPropertyTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return ArrayProperty.validate(arg, configuration=configuration) -ArrayPropertyTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M" - ], - ], - typing.Tuple[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)", - "COUNT_1M", - "COUNT_50M" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class ArrayProperty( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], ArrayPropertyTuple], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - tuple, - }) - items: typing.Type[enum_class.EnumClass] = dataclasses.field(default_factory=lambda: enum_class.EnumClass) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ArrayPropertyTuple, - } - ) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - ArrayPropertyTupleInput, - ArrayPropertyTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ArrayPropertyTuple: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - "b": typing.Type[B], - "ArrayProperty": typing.Type[ArrayProperty], - } -) - - -class ObjectWithOnlyOptionalPropsDict(schemas.immutabledict[str, typing.Union[ - None, - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - typing.Union[int, float], - str, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "a", - "b", - "ArrayProperty", - }) - - def __new__( - cls, - *, - a: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - b: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - ArrayProperty: typing.Union[ - None, - typing.Union[ - ArrayPropertyTupleInput, - ArrayPropertyTuple - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("a", a), - ("b", b), - ("ArrayProperty", ArrayProperty), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(ObjectWithOnlyOptionalPropsDictInput, arg_) - return ObjectWithOnlyOptionalProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithOnlyOptionalPropsDictInput, - ObjectWithOnlyOptionalPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithOnlyOptionalPropsDict: - return ObjectWithOnlyOptionalProps.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[str, schemas.Unset]: - val = self.get("a", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def b(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("b", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def ArrayProperty(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[ArrayPropertyTuple, schemas.Unset], - ]: - val = self.get("ArrayProperty", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - ArrayPropertyTuple, - ], - val - ) -ObjectWithOnlyOptionalPropsDictInput = typing.TypedDict( - 'ObjectWithOnlyOptionalPropsDictInput', - { - "a": str, - "b": typing.Union[ - int, - float - ], - "ArrayProperty": typing.Union[ - None, - typing.Union[ - ArrayPropertyTupleInput, - ArrayPropertyTuple - ], - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class ObjectWithOnlyOptionalProps( - schemas.Schema[ObjectWithOnlyOptionalPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithOnlyOptionalPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithOnlyOptionalPropsDictInput, - ObjectWithOnlyOptionalPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithOnlyOptionalPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py deleted file mode 100644 index 3e1be601c8b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_optional_test_prop.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Test: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "test": typing.Type[Test], - } -) - - -class ObjectWithOptionalTestPropDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "test", - }) - - def __new__( - cls, - *, - test: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("test", test), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ObjectWithOptionalTestPropDictInput, arg_) - return ObjectWithOptionalTestProp.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ObjectWithOptionalTestPropDictInput, - ObjectWithOptionalTestPropDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithOptionalTestPropDict: - return ObjectWithOptionalTestProp.validate(arg, configuration=configuration) - - @property - def test(self) -> typing.Union[str, schemas.Unset]: - val = self.get("test", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ObjectWithOptionalTestPropDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ObjectWithOptionalTestProp( - schemas.Schema[ObjectWithOptionalTestPropDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ObjectWithOptionalTestPropDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ObjectWithOptionalTestPropDictInput, - ObjectWithOptionalTestPropDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ObjectWithOptionalTestPropDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py b/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py deleted file mode 100644 index a2d8318b89d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/object_with_validations.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ObjectWithValidations( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - min_properties: int = 2 - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/order.py b/samples/client/petstore/python/src/openapi_client/components/schema/order.py deleted file mode 100644 index 8935eea8128..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/order.py +++ /dev/null @@ -1,286 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Id: typing_extensions.TypeAlias = schemas.Int64Schema -PetId: typing_extensions.TypeAlias = schemas.Int64Schema -Quantity: typing_extensions.TypeAlias = schemas.Int32Schema -ShipDate: typing_extensions.TypeAlias = schemas.DateTimeSchema - - -class StatusEnums: - - @schemas.classproperty - def PLACED(cls) -> typing.Literal["placed"]: - return Status.validate("placed") - - @schemas.classproperty - def APPROVED(cls) -> typing.Literal["approved"]: - return Status.validate("approved") - - @schemas.classproperty - def DELIVERED(cls) -> typing.Literal["delivered"]: - return Status.validate("delivered") - - -@dataclasses.dataclass(frozen=True) -class Status( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - } - ) - enums = StatusEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["placed"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["approved"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["approved"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["delivered"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["delivered"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed","approved","delivered",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "placed", - "approved", - "delivered", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "placed", - "approved", - "delivered", - ], - validated_arg - ) -Complete: typing_extensions.TypeAlias = schemas.BoolSchema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "petId": typing.Type[PetId], - "quantity": typing.Type[Quantity], - "shipDate": typing.Type[ShipDate], - "status": typing.Type[Status], - "complete": typing.Type[Complete], - } -) - - -class OrderDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - "petId", - "quantity", - "shipDate", - "status", - "complete", - }) - - def __new__( - cls, - *, - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - petId: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - quantity: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - shipDate: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, - status: typing.Union[ - typing.Literal[ - "placed", - "approved", - "delivered" - ], - schemas.Unset - ] = schemas.unset, - complete: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("id", id), - ("petId", petId), - ("quantity", quantity), - ("shipDate", shipDate), - ("status", status), - ("complete", complete), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(OrderDictInput, arg_) - return Order.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - OrderDictInput, - OrderDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> OrderDict: - return Order.validate(arg, configuration=configuration) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def petId(self) -> typing.Union[int, schemas.Unset]: - val = self.get("petId", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def quantity(self) -> typing.Union[int, schemas.Unset]: - val = self.get("quantity", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def shipDate(self) -> typing.Union[str, schemas.Unset]: - val = self.get("shipDate", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def status(self) -> typing.Union[typing.Literal["placed", "approved", "delivered"], schemas.Unset]: - val = self.get("status", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["placed", "approved", "delivered"], - val - ) - - @property - def complete(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("complete", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -OrderDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Order( - schemas.Schema[OrderDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: OrderDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - OrderDictInput, - OrderDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> OrderDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py b/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py deleted file mode 100644 index a46ede7f616..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/paginated_result_my_object_dto.py +++ /dev/null @@ -1,184 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -Count: typing_extensions.TypeAlias = schemas.IntSchema - -from openapi_client.components.schema import my_object_dto - - -class ResultsTuple( - typing.Tuple[ - my_object_dto.MyObjectDtoDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[ResultsTupleInput, ResultsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Results.validate(arg, configuration=configuration) -ResultsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - my_object_dto.MyObjectDtoDictInput, - my_object_dto.MyObjectDtoDict, - ], - ], - typing.Tuple[ - typing.Union[ - my_object_dto.MyObjectDtoDictInput, - my_object_dto.MyObjectDtoDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Results( - schemas.Schema[schemas.immutabledict, ResultsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[my_object_dto.MyObjectDto] = dataclasses.field(default_factory=lambda: my_object_dto.MyObjectDto) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: ResultsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ResultsTupleInput, - ResultsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ResultsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "count": typing.Type[Count], - "results": typing.Type[Results], - } -) - - -class PaginatedResultMyObjectDtoDict(schemas.immutabledict[str, typing.Union[ - typing.Tuple[schemas.OUTPUT_BASE_TYPES], - int, -]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "count", - "results", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - count: int, - results: typing.Union[ - ResultsTupleInput, - ResultsTuple - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "count": count, - "results": results, - } - used_arg_ = typing.cast(PaginatedResultMyObjectDtoDictInput, arg_) - return PaginatedResultMyObjectDto.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PaginatedResultMyObjectDtoDictInput, - PaginatedResultMyObjectDtoDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PaginatedResultMyObjectDtoDict: - return PaginatedResultMyObjectDto.validate(arg, configuration=configuration) - - @property - def count(self) -> int: - return typing.cast( - int, - self.__getitem__("count") - ) - - @property - def results(self) -> ResultsTuple: - return typing.cast( - ResultsTuple, - self.__getitem__("results") - ) -PaginatedResultMyObjectDtoDictInput = typing.TypedDict( - 'PaginatedResultMyObjectDtoDictInput', - { - "count": int, - "results": typing.Union[ - ResultsTupleInput, - ResultsTuple - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class PaginatedResultMyObjectDto( - schemas.Schema[PaginatedResultMyObjectDtoDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "count", - "results", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PaginatedResultMyObjectDtoDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PaginatedResultMyObjectDtoDictInput, - PaginatedResultMyObjectDtoDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PaginatedResultMyObjectDtoDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py deleted file mode 100644 index 1ccc06b18ae..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/parent_pet.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import child_cat -AllOf = typing.Tuple[ - typing.Type[grandparent_animal.GrandparentAnimal], -] - - -@dataclasses.dataclass(frozen=True) -class ParentPet( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'pet_type': { - 'ChildCat': child_cat.ChildCat, - } - } - ) - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/pet.py deleted file mode 100644 index 99f95fa2957..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/pet.py +++ /dev/null @@ -1,392 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Id: typing_extensions.TypeAlias = schemas.Int64Schema -Name: typing_extensions.TypeAlias = schemas.StrSchema -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class PhotoUrlsTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[PhotoUrlsTupleInput, PhotoUrlsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return PhotoUrls.validate(arg, configuration=configuration) -PhotoUrlsTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class PhotoUrls( - schemas.Schema[schemas.immutabledict, PhotoUrlsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: PhotoUrlsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PhotoUrlsTupleInput, - PhotoUrlsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PhotoUrlsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class StatusEnums: - - @schemas.classproperty - def AVAILABLE(cls) -> typing.Literal["available"]: - return Status.validate("available") - - @schemas.classproperty - def PENDING(cls) -> typing.Literal["pending"]: - return Status.validate("pending") - - @schemas.classproperty - def SOLD(cls) -> typing.Literal["sold"]: - return Status.validate("sold") - - -@dataclasses.dataclass(frozen=True) -class Status( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "available": "AVAILABLE", - "pending": "PENDING", - "sold": "SOLD", - } - ) - enums = StatusEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["available"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["available"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["pending"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["pending"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["sold"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["sold"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["available","pending","sold",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "available", - "pending", - "sold", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "available", - "pending", - "sold", - ], - validated_arg - ) - -from openapi_client.components.schema import category -from openapi_client.components.schema import tag - - -class TagsTuple( - typing.Tuple[ - tag.TagDict, - ... - ] -): - - def __new__(cls, arg: typing.Union[TagsTupleInput, TagsTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Tags.validate(arg, configuration=configuration) -TagsTupleInput = typing.Union[ - typing.List[ - typing.Union[ - tag.TagDictInput, - tag.TagDict, - ], - ], - typing.Tuple[ - typing.Union[ - tag.TagDictInput, - tag.TagDict, - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Tags( - schemas.Schema[schemas.immutabledict, TagsTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[tag.Tag] = dataclasses.field(default_factory=lambda: tag.Tag) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: TagsTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - TagsTupleInput, - TagsTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TagsTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "category": typing.Type[category.Category], - "name": typing.Type[Name], - "photoUrls": typing.Type[PhotoUrls], - "tags": typing.Type[Tags], - "status": typing.Type[Status], - } -) - - -class PetDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "name", - "photoUrls", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - "category", - "tags", - "status", - }) - - def __new__( - cls, - *, - name: str, - photoUrls: typing.Union[ - PhotoUrlsTupleInput, - PhotoUrlsTuple - ], - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - category: typing.Union[ - category.CategoryDictInput, - category.CategoryDict, - schemas.Unset - ] = schemas.unset, - tags: typing.Union[ - TagsTupleInput, - TagsTuple, - schemas.Unset - ] = schemas.unset, - status: typing.Union[ - typing.Literal[ - "available", - "pending", - "sold" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "name": name, - "photoUrls": photoUrls, - } - for key_, val in ( - ("id", id), - ("category", category), - ("tags", tags), - ("status", status), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PetDictInput, arg_) - return Pet.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PetDictInput, - PetDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PetDict: - return Pet.validate(arg, configuration=configuration) - - @property - def name(self) -> str: - return typing.cast( - str, - self.__getitem__("name") - ) - - @property - def photoUrls(self) -> PhotoUrlsTuple: - return typing.cast( - PhotoUrlsTuple, - self.__getitem__("photoUrls") - ) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def category(self) -> typing.Union[category.CategoryDict, schemas.Unset]: - val = self.get("category", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - category.CategoryDict, - val - ) - - @property - def tags(self) -> typing.Union[TagsTuple, schemas.Unset]: - val = self.get("tags", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - TagsTuple, - val - ) - - @property - def status(self) -> typing.Union[typing.Literal["available", "pending", "sold"], schemas.Unset]: - val = self.get("status", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["available", "pending", "sold"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PetDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Pet( - schemas.Schema[PetDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Pet object that needs to be added to the store - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "name", - "photoUrls", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PetDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PetDictInput, - PetDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PetDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/pig.py b/samples/client/petstore/python/src/openapi_client/components/schema/pig.py deleted file mode 100644 index 1cbda2f37ba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/pig.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import basque_pig -from openapi_client.components.schema import danish_pig -OneOf = typing.Tuple[ - typing.Type[basque_pig.BasquePig], - typing.Type[danish_pig.DanishPig], -] - - -@dataclasses.dataclass(frozen=True) -class Pig( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'className': { - 'BasquePig': basque_pig.BasquePig, - 'DanishPig': danish_pig.DanishPig, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/player.py b/samples/client/petstore/python/src/openapi_client/components/schema/player.py deleted file mode 100644 index 2dfaae073a3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/player.py +++ /dev/null @@ -1,130 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - "enemyPlayer": typing.Type['Player'], - } -) - - -class PlayerDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - "enemyPlayer", - }) - - def __new__( - cls, - *, - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - enemyPlayer: typing.Union[ - PlayerDictInput, - PlayerDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("name", name), - ("enemyPlayer", enemyPlayer), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PlayerDictInput, arg_) - return Player.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PlayerDictInput, - PlayerDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PlayerDict: - return Player.validate(arg, configuration=configuration) - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def enemyPlayer(self) -> typing.Union[PlayerDict, schemas.Unset]: - val = self.get("enemyPlayer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - PlayerDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PlayerDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Player( - schemas.Schema[PlayerDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - 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 - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PlayerDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PlayerDictInput, - PlayerDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PlayerDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py b/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py deleted file mode 100644 index 60a7eb442a1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/public_key.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Key: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "key": typing.Type[Key], - } -) - - -class PublicKeyDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "key", - }) - - def __new__( - cls, - *, - key: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("key", key), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(PublicKeyDictInput, arg_) - return PublicKey.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PublicKeyDictInput, - PublicKeyDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PublicKeyDict: - return PublicKey.validate(arg, configuration=configuration) - - @property - def key(self) -> typing.Union[str, schemas.Unset]: - val = self.get("key", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -PublicKeyDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class PublicKey( - schemas.Schema[PublicKeyDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - schema that contains a property named key - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PublicKeyDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PublicKeyDictInput, - PublicKeyDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PublicKeyDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py deleted file mode 100644 index e2324682f6f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import complex_quadrilateral -from openapi_client.components.schema import simple_quadrilateral -OneOf = typing.Tuple[ - typing.Type[simple_quadrilateral.SimpleQuadrilateral], - typing.Type[complex_quadrilateral.ComplexQuadrilateral], -] - - -@dataclasses.dataclass(frozen=True) -class Quadrilateral( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'quadrilateralType': { - 'ComplexQuadrilateral': complex_quadrilateral.ComplexQuadrilateral, - 'SimpleQuadrilateral': simple_quadrilateral.SimpleQuadrilateral, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py deleted file mode 100644 index ed3e127c447..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/quadrilateral_interface.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ShapeTypeEnums: - - @schemas.classproperty - def QUADRILATERAL(cls) -> typing.Literal["Quadrilateral"]: - return ShapeType.validate("Quadrilateral") - - -@dataclasses.dataclass(frozen=True) -class ShapeType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "Quadrilateral": "QUADRILATERAL", - } - ) - enums = ShapeTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["Quadrilateral"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["Quadrilateral"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["Quadrilateral",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "Quadrilateral", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "Quadrilateral", - ], - validated_arg - ) -QuadrilateralType: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "shapeType": typing.Type[ShapeType], - "quadrilateralType": typing.Type[QuadrilateralType], - } -) - - -class QuadrilateralInterfaceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "quadrilateralType", - "shapeType", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - quadrilateralType: str, - shapeType: typing.Literal[ - "Quadrilateral" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "quadrilateralType": quadrilateralType, - "shapeType": shapeType, - } - arg_.update(kwargs) - used_arg_ = typing.cast(QuadrilateralInterfaceDictInput, arg_) - return QuadrilateralInterface.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QuadrilateralInterfaceDictInput, - QuadrilateralInterfaceDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QuadrilateralInterfaceDict: - return QuadrilateralInterface.validate(arg, configuration=configuration) - - @property - def quadrilateralType(self) -> str: - return typing.cast( - str, - self.__getitem__("quadrilateralType") - ) - - @property - def shapeType(self) -> typing.Literal["Quadrilateral"]: - return typing.cast( - typing.Literal["Quadrilateral"], - self.__getitem__("shapeType") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -QuadrilateralInterfaceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class QuadrilateralInterface( - schemas.AnyTypeSchema[QuadrilateralInterfaceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "quadrilateralType", - "shapeType", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QuadrilateralInterfaceDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py b/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py deleted file mode 100644 index 8717a6da487..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/read_only_first.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Bar: typing_extensions.TypeAlias = schemas.StrSchema -Baz: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "bar": typing.Type[Bar], - "baz": typing.Type[Baz], - } -) - - -class ReadOnlyFirstDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "bar", - "baz", - }) - - def __new__( - cls, - *, - bar: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - baz: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("bar", bar), - ("baz", baz), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ReadOnlyFirstDictInput, arg_) - return ReadOnlyFirst.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReadOnlyFirstDictInput, - ReadOnlyFirstDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReadOnlyFirstDict: - return ReadOnlyFirst.validate(arg, configuration=configuration) - - @property - def bar(self) -> typing.Union[str, schemas.Unset]: - val = self.get("bar", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def baz(self) -> typing.Union[str, schemas.Unset]: - val = self.get("baz", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ReadOnlyFirstDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ReadOnlyFirst( - schemas.Schema[ReadOnlyFirstDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReadOnlyFirstDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ReadOnlyFirstDictInput, - ReadOnlyFirstDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReadOnlyFirstDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py b/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py deleted file mode 100644 index 72a171a380d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/ref_pet.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pet -RefPet: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py deleted file mode 100644 index 9dfe2f61a34..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_explicit_add_props.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema - - -class ReqPropsFromExplicitAddPropsDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - validName: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - arg_: typing.Dict[str, typing.Any] = { - "validName": validName, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ReqPropsFromExplicitAddPropsDictInput, arg_) - return ReqPropsFromExplicitAddProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReqPropsFromExplicitAddPropsDictInput, - ReqPropsFromExplicitAddPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromExplicitAddPropsDict: - return ReqPropsFromExplicitAddProps.validate(arg, configuration=configuration) - - @property - def validName(self) -> str: - return self.__getitem__("validName") - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -ReqPropsFromExplicitAddPropsDictInput = typing.Mapping[ - str, - typing.Union[ - str, - str, - str, - ] -] - - -@dataclasses.dataclass(frozen=True) -class ReqPropsFromExplicitAddProps( - schemas.Schema[ReqPropsFromExplicitAddPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReqPropsFromExplicitAddPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ReqPropsFromExplicitAddPropsDictInput, - ReqPropsFromExplicitAddPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromExplicitAddPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py deleted file mode 100644 index 4a8892b558c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_true_add_props.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class ReqPropsFromTrueAddPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - validName: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "validName": validName, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ReqPropsFromTrueAddPropsDictInput, arg_) - return ReqPropsFromTrueAddProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReqPropsFromTrueAddPropsDictInput, - ReqPropsFromTrueAddPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromTrueAddPropsDict: - return ReqPropsFromTrueAddProps.validate(arg, configuration=configuration) - - @property - def validName(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("validName") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -ReqPropsFromTrueAddPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ReqPropsFromTrueAddProps( - schemas.Schema[ReqPropsFromTrueAddPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReqPropsFromTrueAddPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ReqPropsFromTrueAddPropsDictInput, - ReqPropsFromTrueAddPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromTrueAddPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py b/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py deleted file mode 100644 index cf147bb581a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/req_props_from_unset_add_props.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ReqPropsFromUnsetAddPropsDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - validName: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "validName": validName, - } - arg_.update(kwargs) - used_arg_ = typing.cast(ReqPropsFromUnsetAddPropsDictInput, arg_) - return ReqPropsFromUnsetAddProps.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReqPropsFromUnsetAddPropsDictInput, - ReqPropsFromUnsetAddPropsDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromUnsetAddPropsDict: - return ReqPropsFromUnsetAddProps.validate(arg, configuration=configuration) - - @property - def validName(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("validName") - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ReqPropsFromUnsetAddPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class ReqPropsFromUnsetAddProps( - schemas.Schema[ReqPropsFromUnsetAddPropsDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "invalid-name", - "validName", - }) - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReqPropsFromUnsetAddPropsDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ReqPropsFromUnsetAddPropsDictInput, - ReqPropsFromUnsetAddPropsDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReqPropsFromUnsetAddPropsDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/return.py b/samples/client/petstore/python/src/openapi_client/components/schema/return.py deleted file mode 100644 index 1aabce1ba89..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/return.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Return2: typing_extensions.TypeAlias = schemas.Int32Schema -Properties = typing.TypedDict( - 'Properties', - { - "return": typing.Type[Return2], - } -) - - -class ReturnDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "return", - }) - - def __new__( - cls, - *, - return: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("return", return), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ReturnDictInput, arg_) - return Return.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReturnDictInput, - ReturnDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReturnDict: - return Return.validate(arg, configuration=configuration) - - @property - def return(self) -> typing.Union[int, schemas.Unset]: - val = self.get("return", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ReturnDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Return( - schemas.AnyTypeSchema[ReturnDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Model for testing reserved words - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReturnDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py deleted file mode 100644 index d7fcd7e88e1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/scalene_triangle.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class TriangleTypeEnums: - - @schemas.classproperty - def SCALENE_TRIANGLE(cls) -> typing.Literal["ScaleneTriangle"]: - return TriangleType.validate("ScaleneTriangle") - - -@dataclasses.dataclass(frozen=True) -class TriangleType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "ScaleneTriangle": "SCALENE_TRIANGLE", - } - ) - enums = TriangleTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["ScaleneTriangle"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["ScaleneTriangle"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["ScaleneTriangle",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "ScaleneTriangle", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "ScaleneTriangle", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "triangleType": typing.Type[TriangleType], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "triangleType", - }) - - def __new__( - cls, - *, - triangleType: typing.Union[ - typing.Literal[ - "ScaleneTriangle" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("triangleType", triangleType), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def triangleType(self) -> typing.Union[typing.Literal["ScaleneTriangle"], schemas.Unset]: - val = self.get("triangleType", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["ScaleneTriangle"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[triangle_interface.TriangleInterface], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class ScaleneTriangle( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py deleted file mode 100644 index f7ef803b38a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_array_model.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SelfReferencingArrayModelTuple( - typing.Tuple[ - 'SelfReferencingArrayModelTuple', - ... - ] -): - - def __new__(cls, arg: typing.Union[SelfReferencingArrayModelTupleInput, SelfReferencingArrayModelTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return SelfReferencingArrayModel.validate(arg, configuration=configuration) -SelfReferencingArrayModelTupleInput = typing.Union[ - typing.List[ - typing.Union[ - 'SelfReferencingArrayModelTupleInput', - SelfReferencingArrayModelTuple - ], - ], - typing.Tuple[ - typing.Union[ - 'SelfReferencingArrayModelTupleInput', - SelfReferencingArrayModelTuple - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class SelfReferencingArrayModel( - schemas.Schema[schemas.immutabledict, SelfReferencingArrayModelTuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[SelfReferencingArrayModel] = dataclasses.field(default_factory=lambda: SelfReferencingArrayModel) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SelfReferencingArrayModelTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SelfReferencingArrayModelTupleInput, - SelfReferencingArrayModelTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SelfReferencingArrayModelTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py b/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py deleted file mode 100644 index ba78a936454..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/self_referencing_object_model.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Properties = typing.TypedDict( - 'Properties', - { - "selfRef": typing.Type['SelfReferencingObjectModel'], - } -) - - -class SelfReferencingObjectModelDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "selfRef", - }) - - def __new__( - cls, - *, - selfRef: typing.Union[ - SelfReferencingObjectModelDictInput, - SelfReferencingObjectModelDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[ - SelfReferencingObjectModelDictInput, - SelfReferencingObjectModelDict, - ], - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("selfRef", selfRef), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SelfReferencingObjectModelDictInput, arg_) - return SelfReferencingObjectModel.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SelfReferencingObjectModelDictInput, - SelfReferencingObjectModelDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SelfReferencingObjectModelDict: - return SelfReferencingObjectModel.validate(arg, configuration=configuration) - - @property - def selfRef(self) -> typing.Union[SelfReferencingObjectModelDict, schemas.Unset]: - val = self.get("selfRef", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - SelfReferencingObjectModelDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[SelfReferencingObjectModelDict, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - SelfReferencingObjectModelDict, - val - ) -SelfReferencingObjectModelDictInput = typing.Mapping[ - str, - typing.Union[ - typing.Union[ - 'SelfReferencingObjectModelDictInput', - SelfReferencingObjectModelDict, - ], - typing.Union[ - 'SelfReferencingObjectModelDictInput', - SelfReferencingObjectModelDict, - ], - ] -] - - -@dataclasses.dataclass(frozen=True) -class SelfReferencingObjectModel( - schemas.Schema[SelfReferencingObjectModelDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[SelfReferencingObjectModel] = dataclasses.field(default_factory=lambda: SelfReferencingObjectModel) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SelfReferencingObjectModelDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SelfReferencingObjectModelDictInput, - SelfReferencingObjectModelDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SelfReferencingObjectModelDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/shape.py b/samples/client/petstore/python/src/openapi_client/components/schema/shape.py deleted file mode 100644 index ced16f850ee..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/shape.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import quadrilateral -from openapi_client.components.schema import triangle -OneOf = typing.Tuple[ - typing.Type[triangle.Triangle], - typing.Type[quadrilateral.Quadrilateral], -] - - -@dataclasses.dataclass(frozen=True) -class Shape( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'shapeType': { - 'Quadrilateral': quadrilateral.Quadrilateral, - 'Triangle': triangle.Triangle, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py b/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py deleted file mode 100644 index a82c46c5225..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/shape_or_null.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -_0: typing_extensions.TypeAlias = schemas.NoneSchema - -from openapi_client.components.schema import quadrilateral -from openapi_client.components.schema import triangle -OneOf = typing.Tuple[ - typing.Type[_0], - typing.Type[triangle.Triangle], - typing.Type[quadrilateral.Quadrilateral], -] - - -@dataclasses.dataclass(frozen=True) -class ShapeOrNull( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'shapeType': { - 'Quadrilateral': quadrilateral.Quadrilateral, - 'Triangle': triangle.Triangle, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py b/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py deleted file mode 100644 index ec979df6533..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/simple_quadrilateral.py +++ /dev/null @@ -1,178 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class QuadrilateralTypeEnums: - - @schemas.classproperty - def SIMPLE_QUADRILATERAL(cls) -> typing.Literal["SimpleQuadrilateral"]: - return QuadrilateralType.validate("SimpleQuadrilateral") - - -@dataclasses.dataclass(frozen=True) -class QuadrilateralType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "SimpleQuadrilateral": "SIMPLE_QUADRILATERAL", - } - ) - enums = QuadrilateralTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["SimpleQuadrilateral"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["SimpleQuadrilateral"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["SimpleQuadrilateral",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "SimpleQuadrilateral", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "SimpleQuadrilateral", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "quadrilateralType": typing.Type[QuadrilateralType], - } -) - - -class _1Dict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "quadrilateralType", - }) - - def __new__( - cls, - *, - quadrilateralType: typing.Union[ - typing.Literal[ - "SimpleQuadrilateral" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("quadrilateralType", quadrilateralType), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(_1DictInput, arg_) - return _1.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - _1DictInput, - _1Dict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return _1.validate(arg, configuration=configuration) - - @property - def quadrilateralType(self) -> typing.Union[typing.Literal["SimpleQuadrilateral"], schemas.Unset]: - val = self.get("quadrilateralType", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["SimpleQuadrilateral"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -_1DictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class _1( - schemas.Schema[_1Dict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: _1Dict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - _1DictInput, - _1Dict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> _1Dict: - return super().validate_base( - arg, - configuration=configuration, - ) - -AllOf = typing.Tuple[ - typing.Type[quadrilateral_interface.QuadrilateralInterface], - typing.Type[_1], -] - - -@dataclasses.dataclass(frozen=True) -class SimpleQuadrilateral( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py b/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py deleted file mode 100644 index 47d2dd088f6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/some_object.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AllOf = typing.Tuple[ - typing.Type[object_interface.ObjectInterface], -] - - -@dataclasses.dataclass(frozen=True) -class SomeObject( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py b/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py deleted file mode 100644 index 0861cb66dc7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/special_model_name.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -A: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - } -) - - -class SpecialModelNameDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "a", - }) - - def __new__( - cls, - *, - a: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("a", a), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SpecialModelNameDictInput, arg_) - return SpecialModelName.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SpecialModelNameDictInput, - SpecialModelNameDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SpecialModelNameDict: - return SpecialModelName.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[str, schemas.Unset]: - val = self.get("a", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SpecialModelNameDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class SpecialModelName( - schemas.Schema[SpecialModelNameDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - model with an invalid class name for python - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SpecialModelNameDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SpecialModelNameDictInput, - SpecialModelNameDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SpecialModelNameDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string.py b/samples/client/petstore/python/src/openapi_client/components/schema/string.py deleted file mode 100644 index c9b8b25e4fa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/string.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -String: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py deleted file mode 100644 index 3c39700c5ee..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/string_boolean_map.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.BoolSchema - - -class StringBooleanMapDict(schemas.immutabledict[str, bool]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: bool, - ): - used_kwargs = typing.cast(StringBooleanMapDictInput, kwargs) - return StringBooleanMap.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - StringBooleanMapDictInput, - StringBooleanMapDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> StringBooleanMapDict: - return StringBooleanMap.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[bool, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) -StringBooleanMapDictInput = typing.Mapping[ - str, - bool, -] - - -@dataclasses.dataclass(frozen=True) -class StringBooleanMap( - schemas.Schema[StringBooleanMapDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: StringBooleanMapDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - StringBooleanMapDictInput, - StringBooleanMapDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> StringBooleanMapDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py deleted file mode 100644 index 5a234676e46..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class StringEnumEnums: - - @schemas.classproperty - def PLACED(cls) -> typing.Literal["placed"]: - return StringEnum.validate("placed") - - @schemas.classproperty - def APPROVED(cls) -> typing.Literal["approved"]: - return StringEnum.validate("approved") - - @schemas.classproperty - def DELIVERED(cls) -> typing.Literal["delivered"]: - return StringEnum.validate("delivered") - - @schemas.classproperty - def SINGLE_QUOTED(cls) -> typing.Literal["single quoted"]: - return StringEnum.validate("single quoted") - - @schemas.classproperty - def MULTIPLE_LINE_FEED_LF_LINES(cls) -> typing.Literal["multiple\nlines"]: - return StringEnum.validate("multiple\nlines") - - @schemas.classproperty - def DOUBLE_QUOTE_LINE_FEED_LF_WITH_NEWLINE(cls) -> typing.Literal["double quote \n with newline"]: - return StringEnum.validate("double quote \n with newline") - - @schemas.classproperty - def NONE(cls) -> typing.Literal[None]: - return StringEnum.validate(None) - - -@dataclasses.dataclass(frozen=True) -class StringEnum( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - "single quoted": "SINGLE_QUOTED", - "multiple\nlines": "MULTIPLE_LINE_FEED_LF_LINES", - "double quote \n with newline": "DOUBLE_QUOTE_LINE_FEED_LF_WITH_NEWLINE", - None: "NONE", - } - ) - enums = StringEnumEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["placed"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["approved"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["approved"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["delivered"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["delivered"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["single quoted"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["single quoted"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["multiple\nlines"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["multiple\nlines"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["double quote \n with newline"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["double quote \n with newline"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed","approved","delivered","single quoted","multiple\nlines","double quote \n with newline",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py deleted file mode 100644 index affad234da4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/string_enum_with_default_value.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class StringEnumWithDefaultValueEnums: - - @schemas.classproperty - def PLACED(cls) -> typing.Literal["placed"]: - return StringEnumWithDefaultValue.validate("placed") - - @schemas.classproperty - def APPROVED(cls) -> typing.Literal["approved"]: - return StringEnumWithDefaultValue.validate("approved") - - @schemas.classproperty - def DELIVERED(cls) -> typing.Literal["delivered"]: - return StringEnumWithDefaultValue.validate("delivered") - - -@dataclasses.dataclass(frozen=True) -class StringEnumWithDefaultValue( - schemas.Schema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["placed"] = "placed" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - } - ) - enums = StringEnumWithDefaultValueEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["placed"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["approved"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["approved"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["delivered"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["delivered"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["placed","approved","delivered",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "placed", - "approved", - "delivered", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "placed", - "approved", - "delivered", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py b/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py deleted file mode 100644 index 5080202634e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/string_with_validation.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class StringWithValidation( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 7 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/tag.py b/samples/client/petstore/python/src/openapi_client/components/schema/tag.py deleted file mode 100644 index 0ae80cc09e8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/tag.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Id: typing_extensions.TypeAlias = schemas.Int64Schema -Name: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "name": typing.Type[Name], - } -) - - -class TagDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - "name", - }) - - def __new__( - cls, - *, - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("id", id), - ("name", name), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(TagDictInput, arg_) - return Tag.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - TagDictInput, - TagDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TagDict: - return Tag.validate(arg, configuration=configuration) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -TagDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Tag( - schemas.Schema[TagDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: TagDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - TagDictInput, - TagDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TagDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py b/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py deleted file mode 100644 index d399f79f244..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/triangle.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import equilateral_triangle -from openapi_client.components.schema import isosceles_triangle -from openapi_client.components.schema import scalene_triangle -OneOf = typing.Tuple[ - typing.Type[equilateral_triangle.EquilateralTriangle], - typing.Type[isosceles_triangle.IsoscelesTriangle], - typing.Type[scalene_triangle.ScaleneTriangle], -] - - -@dataclasses.dataclass(frozen=True) -class Triangle( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[schemas.Schema]]] = dataclasses.field( - default_factory=lambda: { - 'triangleType': { - 'EquilateralTriangle': equilateral_triangle.EquilateralTriangle, - 'IsoscelesTriangle': isosceles_triangle.IsoscelesTriangle, - 'ScaleneTriangle': scalene_triangle.ScaleneTriangle, - } - } - ) - one_of: OneOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(OneOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py b/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py deleted file mode 100644 index c359c749359..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/triangle_interface.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ShapeTypeEnums: - - @schemas.classproperty - def TRIANGLE(cls) -> typing.Literal["Triangle"]: - return ShapeType.validate("Triangle") - - -@dataclasses.dataclass(frozen=True) -class ShapeType( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "Triangle": "TRIANGLE", - } - ) - enums = ShapeTypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["Triangle"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["Triangle"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["Triangle",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "Triangle", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "Triangle", - ], - validated_arg - ) -TriangleType: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "shapeType": typing.Type[ShapeType], - "triangleType": typing.Type[TriangleType], - } -) - - -class TriangleInterfaceDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "shapeType", - "triangleType", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - shapeType: typing.Literal[ - "Triangle" - ], - triangleType: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "shapeType": shapeType, - "triangleType": triangleType, - } - arg_.update(kwargs) - used_arg_ = typing.cast(TriangleInterfaceDictInput, arg_) - return TriangleInterface.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - TriangleInterfaceDictInput, - TriangleInterfaceDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> TriangleInterfaceDict: - return TriangleInterface.validate(arg, configuration=configuration) - - @property - def shapeType(self) -> typing.Literal["Triangle"]: - return typing.cast( - typing.Literal["Triangle"], - self.__getitem__("shapeType") - ) - - @property - def triangleType(self) -> str: - return typing.cast( - str, - self.__getitem__("triangleType") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -TriangleInterfaceDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class TriangleInterface( - schemas.AnyTypeSchema[TriangleInterfaceDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - required: typing.FrozenSet[str] = frozenset({ - "shapeType", - "triangleType", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: TriangleInterfaceDict, - } - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/user.py b/samples/client/petstore/python/src/openapi_client/components/schema/user.py deleted file mode 100644 index 92cbd04031a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/user.py +++ /dev/null @@ -1,375 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Id: typing_extensions.TypeAlias = schemas.Int64Schema -Username: typing_extensions.TypeAlias = schemas.StrSchema -FirstName: typing_extensions.TypeAlias = schemas.StrSchema -LastName: typing_extensions.TypeAlias = schemas.StrSchema -Email: typing_extensions.TypeAlias = schemas.StrSchema -Password: typing_extensions.TypeAlias = schemas.StrSchema -Phone: typing_extensions.TypeAlias = schemas.StrSchema -UserStatus: typing_extensions.TypeAlias = schemas.Int32Schema -ObjectWithNoDeclaredProps: typing_extensions.TypeAlias = schemas.DictSchema - - -@dataclasses.dataclass(frozen=True) -class ObjectWithNoDeclaredPropsNullable( - schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - types: typing.FrozenSet[typing.Type] = frozenset({ - type(None), - schemas.immutabledict, - }) - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schemas.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base( - arg, - configuration=configuration, - ) - -AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Not: typing_extensions.TypeAlias = schemas.NoneSchema - - -@dataclasses.dataclass(frozen=True) -class AnyTypeExceptNullProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore - -AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[Id], - "username": typing.Type[Username], - "firstName": typing.Type[FirstName], - "lastName": typing.Type[LastName], - "email": typing.Type[Email], - "password": typing.Type[Password], - "phone": typing.Type[Phone], - "userStatus": typing.Type[UserStatus], - "objectWithNoDeclaredProps": typing.Type[ObjectWithNoDeclaredProps], - "objectWithNoDeclaredPropsNullable": typing.Type[ObjectWithNoDeclaredPropsNullable], - "anyTypeProp": typing.Type[AnyTypeProp], - "anyTypeExceptNullProp": typing.Type[AnyTypeExceptNullProp], - "anyTypePropNullable": typing.Type[AnyTypePropNullable], - } -) - - -class UserDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "id", - "username", - "firstName", - "lastName", - "email", - "password", - "phone", - "userStatus", - "objectWithNoDeclaredProps", - "objectWithNoDeclaredPropsNullable", - "anyTypeProp", - "anyTypeExceptNullProp", - "anyTypePropNullable", - }) - - def __new__( - cls, - *, - id: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - username: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - firstName: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - lastName: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - email: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - password: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - phone: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - userStatus: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - objectWithNoDeclaredProps: typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - schemas.Unset - ] = schemas.unset, - objectWithNoDeclaredPropsNullable: typing.Union[ - None, - typing.Union[ - typing.Mapping[str, schemas.INPUT_TYPES_ALL], - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - schemas.Unset - ] = schemas.unset, - anyTypeProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - anyTypeExceptNullProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - anyTypePropNullable: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("id", id), - ("username", username), - ("firstName", firstName), - ("lastName", lastName), - ("email", email), - ("password", password), - ("phone", phone), - ("userStatus", userStatus), - ("objectWithNoDeclaredProps", objectWithNoDeclaredProps), - ("objectWithNoDeclaredPropsNullable", objectWithNoDeclaredPropsNullable), - ("anyTypeProp", anyTypeProp), - ("anyTypeExceptNullProp", anyTypeExceptNullProp), - ("anyTypePropNullable", anyTypePropNullable), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(UserDictInput, arg_) - return User.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - UserDictInput, - UserDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> UserDict: - return User.validate(arg, configuration=configuration) - - @property - def id(self) -> typing.Union[int, schemas.Unset]: - val = self.get("id", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def username(self) -> typing.Union[str, schemas.Unset]: - val = self.get("username", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def firstName(self) -> typing.Union[str, schemas.Unset]: - val = self.get("firstName", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def lastName(self) -> typing.Union[str, schemas.Unset]: - val = self.get("lastName", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def email(self) -> typing.Union[str, schemas.Unset]: - val = self.get("email", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def password(self) -> typing.Union[str, schemas.Unset]: - val = self.get("password", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def phone(self) -> typing.Union[str, schemas.Unset]: - val = self.get("phone", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def userStatus(self) -> typing.Union[int, schemas.Unset]: - val = self.get("userStatus", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def objectWithNoDeclaredProps(self) -> typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset]: - val = self.get("objectWithNoDeclaredProps", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - val - ) - - @property - def objectWithNoDeclaredPropsNullable(self) -> typing.Union[ - typing.Union[None, schemas.Unset], - typing.Union[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], schemas.Unset], - ]: - val = self.get("objectWithNoDeclaredPropsNullable", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[ - None, - schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], - ], - val - ) - - @property - def anyTypeProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("anyTypeProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def anyTypeExceptNullProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("anyTypeExceptNullProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - @property - def anyTypePropNullable(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("anyTypePropNullable", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -UserDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class User( - schemas.Schema[UserDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: UserDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - UserDictInput, - UserDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> UserDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py b/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py deleted file mode 100644 index bbd36527460..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/uuid_string.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class UUIDString( - schemas.UUIDSchema -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'uuid' - min_length: int = 1 diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/whale.py b/samples/client/petstore/python/src/openapi_client/components/schema/whale.py deleted file mode 100644 index 98ff77d87f8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/whale.py +++ /dev/null @@ -1,199 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -HasBaleen: typing_extensions.TypeAlias = schemas.BoolSchema -HasTeeth: typing_extensions.TypeAlias = schemas.BoolSchema - - -class ClassNameEnums: - - @schemas.classproperty - def WHALE(cls) -> typing.Literal["whale"]: - return ClassName.validate("whale") - - -@dataclasses.dataclass(frozen=True) -class ClassName( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "whale": "WHALE", - } - ) - enums = ClassNameEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["whale"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["whale"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["whale",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "whale", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "whale", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "hasBaleen": typing.Type[HasBaleen], - "hasTeeth": typing.Type[HasTeeth], - "className": typing.Type[ClassName], - } -) - - -class WhaleDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "className", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "hasBaleen", - "hasTeeth", - }) - - def __new__( - cls, - *, - className: typing.Literal[ - "whale" - ], - hasBaleen: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - hasTeeth: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "className": className, - } - for key_, val in ( - ("hasBaleen", hasBaleen), - ("hasTeeth", hasTeeth), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(WhaleDictInput, arg_) - return Whale.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - WhaleDictInput, - WhaleDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> WhaleDict: - return Whale.validate(arg, configuration=configuration) - - @property - def className(self) -> typing.Literal["whale"]: - return typing.cast( - typing.Literal["whale"], - self.__getitem__("className") - ) - - @property - def hasBaleen(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("hasBaleen", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - @property - def hasTeeth(self) -> typing.Union[bool, schemas.Unset]: - val = self.get("hasTeeth", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - bool, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -WhaleDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Whale( - schemas.Schema[WhaleDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "className", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: WhaleDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - WhaleDictInput, - WhaleDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> WhaleDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py b/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py deleted file mode 100644 index 2eba13ab364..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schema/zebra.py +++ /dev/null @@ -1,274 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.AnyTypeSchema - - -class TypeEnums: - - @schemas.classproperty - def PLAINS(cls) -> typing.Literal["plains"]: - return Type.validate("plains") - - @schemas.classproperty - def MOUNTAIN(cls) -> typing.Literal["mountain"]: - return Type.validate("mountain") - - @schemas.classproperty - def GREVYS(cls) -> typing.Literal["grevys"]: - return Type.validate("grevys") - - -@dataclasses.dataclass(frozen=True) -class Type( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "plains": "PLAINS", - "mountain": "MOUNTAIN", - "grevys": "GREVYS", - } - ) - enums = TypeEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["plains"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["plains"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["mountain"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["mountain"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["grevys"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["grevys"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["plains","mountain","grevys",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "plains", - "mountain", - "grevys", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "plains", - "mountain", - "grevys", - ], - validated_arg - ) - - -class ClassNameEnums: - - @schemas.classproperty - def ZEBRA(cls) -> typing.Literal["zebra"]: - return ClassName.validate("zebra") - - -@dataclasses.dataclass(frozen=True) -class ClassName( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "zebra": "ZEBRA", - } - ) - enums = ClassNameEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["zebra"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["zebra"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["zebra",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "zebra", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "zebra", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "type": typing.Type[Type], - "className": typing.Type[ClassName], - } -) - - -class ZebraDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "className", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "type", - }) - - def __new__( - cls, - *, - className: typing.Literal[ - "zebra" - ], - type: typing.Union[ - typing.Literal[ - "plains", - "mountain", - "grevys" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "className": className, - } - for key_, val in ( - ("type", type), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ZebraDictInput, arg_) - return Zebra.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ZebraDictInput, - ZebraDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ZebraDict: - return Zebra.validate(arg, configuration=configuration) - - @property - def className(self) -> typing.Literal["zebra"]: - return typing.cast( - typing.Literal["zebra"], - self.__getitem__("className") - ) - - @property - def type(self) -> typing.Union[typing.Literal["plains", "mountain", "grevys"], schemas.Unset]: - val = self.get("type", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["plains", "mountain", "grevys"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) -ZebraDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Zebra( - schemas.Schema[ZebraDict, tuple] -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "className", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ZebraDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - ZebraDictInput, - ZebraDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ZebraDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py b/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py deleted file mode 100644 index df81ea92b61..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/schemas/__init__.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from from petstore_api.components.schema.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from petstore_api.components.schema._200_response import _200Response -from petstore_api.components.schema.abstract_step_message import AbstractStepMessage -from petstore_api.components.schema.additional_properties_class import AdditionalPropertiesClass -from petstore_api.components.schema.additional_properties_schema import AdditionalPropertiesSchema -from petstore_api.components.schema.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -from petstore_api.components.schema.address import Address -from petstore_api.components.schema.animal import Animal -from petstore_api.components.schema.animal_farm import AnimalFarm -from petstore_api.components.schema.any_type_and_format import AnyTypeAndFormat -from petstore_api.components.schema.any_type_not_string import AnyTypeNotString -from petstore_api.components.schema.api_response import ApiResponse -from petstore_api.components.schema.array_holding_any_type import ArrayHoldingAnyType -from petstore_api.components.schema.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly -from petstore_api.components.schema.array_of_enums import ArrayOfEnums -from petstore_api.components.schema.array_of_number_only import ArrayOfNumberOnly -from petstore_api.components.schema.array_test import ArrayTest -from petstore_api.components.schema.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api.components.schema.bar import Bar -from petstore_api.components.schema.basque_pig import BasquePig -from petstore_api.components.schema.boolean import Boolean -from petstore_api.components.schema.boolean_enum import BooleanEnum -from petstore_api.components.schema.capitalization import Capitalization -from petstore_api.components.schema.cat import Cat -from petstore_api.components.schema.category import Category -from petstore_api.components.schema.child_cat import ChildCat -from petstore_api.components.schema.class_model import ClassModel -from petstore_api.components.schema.client import Client -from petstore_api.components.schema.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.components.schema.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations -from petstore_api.components.schema.composed_array import ComposedArray -from petstore_api.components.schema.composed_bool import ComposedBool -from petstore_api.components.schema.composed_none import ComposedNone -from petstore_api.components.schema.composed_number import ComposedNumber -from petstore_api.components.schema.composed_object import ComposedObject -from petstore_api.components.schema.composed_one_of_different_types import ComposedOneOfDifferentTypes -from petstore_api.components.schema.composed_string import ComposedString -from petstore_api.components.schema.currency import Currency -from petstore_api.components.schema.danish_pig import DanishPig -from petstore_api.components.schema.date_time_test import DateTimeTest -from petstore_api.components.schema.date_time_with_validations import DateTimeWithValidations -from petstore_api.components.schema.date_with_validations import DateWithValidations -from petstore_api.components.schema.decimal_payload import DecimalPayload -from petstore_api.components.schema.dog import Dog -from petstore_api.components.schema.drawing import Drawing -from petstore_api.components.schema.enum_arrays import EnumArrays -from petstore_api.components.schema.enum_class import EnumClass -from petstore_api.components.schema.enum_test import EnumTest -from petstore_api.components.schema.equilateral_triangle import EquilateralTriangle -from petstore_api.components.schema.file import File -from petstore_api.components.schema.file_schema_test_class import FileSchemaTestClass -from petstore_api.components.schema.foo import Foo -from petstore_api.components.schema.format_test import FormatTest -from petstore_api.components.schema.from_schema import FromSchema -from petstore_api.components.schema.grandparent_animal import GrandparentAnimal -from petstore_api.components.schema.health_check_result import HealthCheckResult -from petstore_api.components.schema.integer_enum import IntegerEnum -from petstore_api.components.schema.integer_enum_big import IntegerEnumBig -from petstore_api.components.schema.integer_enum_one_value import IntegerEnumOneValue -from petstore_api.components.schema.integer_enum_with_default_value import IntegerEnumWithDefaultValue -from petstore_api.components.schema.integer_max10 import IntegerMax10 -from petstore_api.components.schema.integer_min15 import IntegerMin15 -from petstore_api.components.schema.isosceles_triangle import IsoscelesTriangle -from petstore_api.components.schema.items import Items -from petstore_api.components.schema.items_schema import ItemsSchema -from petstore_api.components.schema.json_patch_request import JSONPatchRequest -from petstore_api.components.schema.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest -from petstore_api.components.schema.json_patch_request_move_copy import JSONPatchRequestMoveCopy -from petstore_api.components.schema.json_patch_request_remove import JSONPatchRequestRemove -from petstore_api.components.schema.map_test import MapTest -from petstore_api.components.schema.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass -from petstore_api.components.schema.money import Money -from petstore_api.components.schema.multi_properties_schema import MultiPropertiesSchema -from petstore_api.components.schema.my_object_dto import MyObjectDto -from petstore_api.components.schema.name import Name -from petstore_api.components.schema.no_additional_properties import NoAdditionalProperties -from petstore_api.components.schema.nullable_class import NullableClass -from petstore_api.components.schema.nullable_shape import NullableShape -from petstore_api.components.schema.nullable_string import NullableString -from petstore_api.components.schema.number import Number -from petstore_api.components.schema.number_only import NumberOnly -from petstore_api.components.schema.number_with_exclusive_min_max import NumberWithExclusiveMinMax -from petstore_api.components.schema.number_with_validations import NumberWithValidations -from petstore_api.components.schema.obj_with_required_props import ObjWithRequiredProps -from petstore_api.components.schema.obj_with_required_props_base import ObjWithRequiredPropsBase -from petstore_api.components.schema.object_interface import ObjectInterface -from petstore_api.components.schema.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties -from petstore_api.components.schema.object_model_with_ref_props import ObjectModelWithRefProps -from petstore_api.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp -from petstore_api.components.schema.object_with_colliding_properties import ObjectWithCollidingProperties -from petstore_api.components.schema.object_with_decimal_properties import ObjectWithDecimalProperties -from petstore_api.components.schema.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps -from petstore_api.components.schema.object_with_inline_composition_property import ObjectWithInlineCompositionProperty -from petstore_api.components.schema.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties -from petstore_api.components.schema.object_with_non_intersecting_values import ObjectWithNonIntersectingValues -from petstore_api.components.schema.object_with_only_optional_props import ObjectWithOnlyOptionalProps -from petstore_api.components.schema.object_with_optional_test_prop import ObjectWithOptionalTestProp -from petstore_api.components.schema.object_with_validations import ObjectWithValidations -from petstore_api.components.schema.order import Order -from petstore_api.components.schema.paginated_result_my_object_dto import PaginatedResultMyObjectDto -from petstore_api.components.schema.parent_pet import ParentPet -from petstore_api.components.schema.pet import Pet -from petstore_api.components.schema.pig import Pig -from petstore_api.components.schema.player import Player -from petstore_api.components.schema.public_key import PublicKey -from petstore_api.components.schema.quadrilateral import Quadrilateral -from petstore_api.components.schema.quadrilateral_interface import QuadrilateralInterface -from petstore_api.components.schema.read_only_first import ReadOnlyFirst -from petstore_api.components.schema.ref_pet import RefPet -from petstore_api.components.schema.req_props_from_explicit_add_props import ReqPropsFromExplicitAddProps -from petstore_api.components.schema.req_props_from_true_add_props import ReqPropsFromTrueAddProps -from petstore_api.components.schema.req_props_from_unset_add_props import ReqPropsFromUnsetAddProps -from petstore_api.components.schema.return import Return -from petstore_api.components.schema.scalene_triangle import ScaleneTriangle -from petstore_api.components.schema.self_referencing_array_model import SelfReferencingArrayModel -from petstore_api.components.schema.self_referencing_object_model import SelfReferencingObjectModel -from petstore_api.components.schema.shape import Shape -from petstore_api.components.schema.shape_or_null import ShapeOrNull -from petstore_api.components.schema.simple_quadrilateral import SimpleQuadrilateral -from petstore_api.components.schema.some_object import SomeObject -from petstore_api.components.schema.string import String -from petstore_api.components.schema.string_boolean_map import StringBooleanMap -from petstore_api.components.schema.string_enum import StringEnum -from petstore_api.components.schema.string_enum_with_default_value import StringEnumWithDefaultValue -from petstore_api.components.schema.string_with_validation import StringWithValidation -from petstore_api.components.schema.tag import Tag -from petstore_api.components.schema.triangle import Triangle -from petstore_api.components.schema.triangle_interface import TriangleInterface -from petstore_api.components.schema.uuid_string import UUIDString -from petstore_api.components.schema.user import User -from petstore_api.components.schema.special_model_name import SpecialModelName -from petstore_api.components.schema.apple import Apple -from petstore_api.components.schema.apple_req import AppleReq -from petstore_api.components.schema.banana import Banana -from petstore_api.components.schema.banana_req import BananaReq -from petstore_api.components.schema.fruit import Fruit -from petstore_api.components.schema.fruit_req import FruitReq -from petstore_api.components.schema.gm_fruit import GmFruit -from petstore_api.components.schema.has_only_read_only import HasOnlyReadOnly -from petstore_api.components.schema.mammal import Mammal -from petstore_api.components.schema.whale import Whale -from petstore_api.components.schema.zebra import Zebra diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py deleted file mode 100644 index af1161a5619..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class ApiKey(security_schemes.ApiKeySecurityScheme): - ''' - apiKey in header - ''' - name: str = "api_key" - in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.HEADER diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py deleted file mode 100644 index 275c4b0dbb1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_api_key_query.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class ApiKeyQuery(security_schemes.ApiKeySecurityScheme): - ''' - apiKey in query - ''' - name: str = "api_key_query" - in_location: security_schemes.ApiKeyInLocation = security_schemes.ApiKeyInLocation.QUERY diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py deleted file mode 100644 index 375405a8ed7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_bearer_test.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class BearerTest(security_schemes.HTTPBearerSecurityScheme): - ''' - http bearer with JWT bearer format - ''' - bearer_format = "JWT" diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py deleted file mode 100644 index 27ec3411805..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class HttpBasicTest(security_schemes.HTTPBasicSecurityScheme): - ''' - http basic - ''' diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py deleted file mode 100644 index 40845d0ea17..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class HttpSignatureTest(security_schemes.HTTPSignatureSecurityScheme): - ''' - http + signature - ''' diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py deleted file mode 100644 index a9d8819cc12..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class OpenIdConnectTest(security_schemes.OpenIdConnectSecurityScheme): - ''' - openIdConnect - ''' - openid_connect_url = "https://somesite.com/.well-known/openid-configuration" diff --git a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py b/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py deleted file mode 100644 index 04cbf91aa30..00000000000 --- a/samples/client/petstore/python/src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py +++ /dev/null @@ -1,25 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.security_scheme_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -@dataclasses.dataclass -class PetstoreAuth(security_schemes.OAuth2SecurityScheme): - ''' - oauth2 implicit flow with two scopes - ''' - flows = security_schemes.OAuthFlows( - implicit=security_schemes.ImplicitOAuthFlow( - authorization_url="http://petstore.swagger.io/api/oauth/dialog", - scopes={ - "write:pets": "modify pets in your account", - "read:pets": "read your pets", - }, - ) - ) diff --git a/samples/client/petstore/python/src/openapi_client/configurations/__init__.py b/samples/client/petstore/python/src/openapi_client/configurations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py b/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py deleted file mode 100644 index 9376e4ca194..00000000000 --- a/samples/client/petstore/python/src/openapi_client/configurations/api_configuration.py +++ /dev/null @@ -1,407 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import copy -from http import client as http_client -import logging -import multiprocessing -import sys -import typing -import typing_extensions - -import urllib3 - -from petstore_api import exceptions -from petstore_api import security_schemes -from petstore_api.components.security_schemes import security_scheme_api_key -from petstore_api.components.security_schemes import security_scheme_api_key_query -from petstore_api.components.security_schemes import security_scheme_bearer_test -from petstore_api.components.security_schemes import security_scheme_http_basic_test -from petstore_api.components.security_schemes import security_scheme_http_signature_test -from petstore_api.components.security_schemes import security_scheme_open_id_connect_test -from petstore_api.components.security_schemes import security_scheme_petstore_auth -from petstore_api.servers import server_0 -from petstore_api.servers import server_1 -from petstore_api.servers import server_2 -from petstore_api.paths.foo.get.servers import server_0 as foo_get_server_0 -from petstore_api.paths.foo.get.servers import server_1 as foo_get_server_1 -from petstore_api.paths.pet_find_by_status.servers import server_0 as pet_find_by_status_server_0 -from petstore_api.paths.pet_find_by_status.servers import server_1 as pet_find_by_status_server_1 - -# security scheme key identifier to security scheme instance -SecuritySchemeInfo = typing.TypedDict( - 'SecuritySchemeInfo', - { - "api_key": security_scheme_api_key.ApiKey, - "api_key_query": security_scheme_api_key_query.ApiKeyQuery, - "bearer_test": security_scheme_bearer_test.BearerTest, - "http_basic_test": security_scheme_http_basic_test.HttpBasicTest, - "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest, - "openIdConnect_test": security_scheme_open_id_connect_test.OpenIdConnectTest, - "petstore_auth": security_scheme_petstore_auth.PetstoreAuth, - }, - total=False -) - - -class SecurityIndexInfoRequired(typing.TypedDict): - security: int - -SecurityIndexInfoOptional = typing.TypedDict( - 'SecurityIndexInfoOptional', - { - "paths//fake/delete/security": typing.Literal[0], - "paths//fake/post/security": typing.Literal[0], - "paths//fake/multipleSecurities/get/security": typing.Literal[0, 1, 2], - "paths//fake/{petId}/uploadImageWithRequiredFile/post/security": typing.Literal[0], - "paths//fake_classname_test/patch/security": typing.Literal[0], - "paths//pet/post/security": typing.Literal[0, 1, 2], - "paths//pet/put/security": typing.Literal[0, 1], - "paths//pet/findByStatus/get/security": typing.Literal[0, 1, 2], - "paths//pet/findByTags/get/security": typing.Literal[0, 1], - "paths//pet/{petId}/delete/security": typing.Literal[0, 1], - "paths//pet/{petId}/get/security": typing.Literal[0], - "paths//pet/{petId}/post/security": typing.Literal[0, 1], - "paths//pet/{petId}/uploadImage/post/security": typing.Literal[0], - "paths//store/inventory/get/security": typing.Literal[0], - }, - total=False -) - - -class SecurityIndexInfo(SecurityIndexInfoRequired, SecurityIndexInfoOptional): - """ - the default security_index to use at each openapi document json path - the fallback value is stored in the 'security' key - """ - -# the server to use at each openapi document json path -ServerInfo = typing.TypedDict( - 'ServerInfo', - { - 'servers/0': server_0.Server0, - 'servers/1': server_1.Server1, - 'servers/2': server_2.Server2, - "paths//foo/get/servers/0": foo_get_server_0.Server0, - "paths//foo/get/servers/1": foo_get_server_1.Server1, - "paths//pet/findByStatus/servers/0": pet_find_by_status_server_0.Server0, - "paths//pet/findByStatus/servers/1": pet_find_by_status_server_1.Server1, - }, - total=False -) - - -class ServerIndexInfoRequired(typing.TypedDict): - servers: typing.Literal[0, 1, 2] - -ServerIndexInfoOptional = typing.TypedDict( - 'ServerIndexInfoOptional', - { - "paths//foo/get/servers": typing.Literal[0, 1], - "paths//pet/findByStatus/servers": typing.Literal[0, 1], - }, - total=False -) - - -class ServerIndexInfo(ServerIndexInfoRequired, ServerIndexInfoOptional): - """ - the default server_index to use at each openapi document json path - the fallback value is stored in the 'servers' key - """ - - -class ApiConfiguration(object): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param security_scheme_info: the security scheme auth info that can be used when calling endpoints - The key is a string that identifies the component security scheme that one is adding auth info for - The value is an instance of the component security scheme class for that security scheme - See the SecuritySchemeInfo TypedDict definition - :param security_index_info: path to security_index information - :param server_info: the servers that can be used to make endpoint calls - :param server_index_info: index to servers configuration - """ - - def __init__( - self, - security_scheme_info: typing.Optional[SecuritySchemeInfo] = None, - security_index_info: typing.Optional[SecurityIndexInfo] = None, - server_info: typing.Optional[ServerInfo] = None, - server_index_info: typing.Optional[ServerIndexInfo] = None, - ): - """Constructor - """ - # Authentication Settings - self.security_scheme_info: SecuritySchemeInfo = security_scheme_info or SecuritySchemeInfo() - self.security_index_info: SecurityIndexInfo = security_index_info or {'security': 0} - # Server Info - self.server_info: ServerInfo = server_info or { - 'servers/0': server_0.Server0(), - 'servers/1': server_1.Server1(), - 'servers/2': server_2.Server2(), - "paths//foo/get/servers/0": foo_get_server_0.Server0(), - "paths//foo/get/servers/1": foo_get_server_1.Server1(), - "paths//pet/findByStatus/servers/0": pet_find_by_status_server_0.Server0(), - "paths//pet/findByStatus/servers/1": pet_find_by_status_server_1.Server1(), - } - self.server_index_info: ServerIndexInfo = server_index_info or {'servers': 0} - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("petstore_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_server_url( - self, - key_prefix: typing.Literal[ - "servers", - "paths//foo/get/servers", - "paths//pet/findByStatus/servers", - ], - index: typing.Optional[int], - ) -> str: - """Gets host URL based on the index - :param index: array index of the host settings - :return: URL based on host settings - """ - if index: - used_index = index - else: - try: - used_index = self.server_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.server_index_info.get("servers", 0) - server_info_key = typing.cast( - typing.Literal[ - "servers/0", - "servers/1", - "servers/2", - "paths//foo/get/servers/0", - "paths//foo/get/servers/1", - "paths//pet/findByStatus/servers/0", - "paths//pet/findByStatus/servers/1", - ], - f"{key_prefix}/{used_index}" - ) - try: - server = self.server_info[server_info_key] - except KeyError as ex: - raise ex - return server.url - - def get_security_requirement_object( - self, - key_prefix: typing.Literal[ - "security", - "paths//fake/delete/security", - "paths//fake/post/security", - "paths//fake/multipleSecurities/get/security", - "paths//fake/{petId}/uploadImageWithRequiredFile/post/security", - "paths//fake_classname_test/patch/security", - "paths//pet/post/security", - "paths//pet/put/security", - "paths//pet/findByStatus/get/security", - "paths//pet/findByTags/get/security", - "paths//pet/{petId}/delete/security", - "paths//pet/{petId}/get/security", - "paths//pet/{petId}/post/security", - "paths//pet/{petId}/uploadImage/post/security", - "paths//store/inventory/get/security", - ], - security_requirement_objects: typing.List[security_schemes.SecurityRequirementObject], - index: typing.Optional[int], - ) -> security_schemes.SecurityRequirementObject: - """Gets security_schemes.SecurityRequirementObject based on the index - :param index: array index of the SecurityRequirementObject - :return: the selected security_schemes.SecurityRequirementObject - """ - if index: - used_index = index - else: - try: - used_index = self.security_index_info[key_prefix] - except KeyError: - # fallback and use the default index - used_index = self.security_index_info.get("security", 0) - return security_requirement_objects[used_index] diff --git a/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py b/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py deleted file mode 100644 index ceba07a8db7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/configurations/schema_configuration.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -from petstore_api import exceptions - - -PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD = { - 'additional_properties': 'additionalProperties', - 'all_of': 'allOf', - 'any_of': 'anyOf', - 'const_value_to_name': 'const', - 'contains': 'contains', - 'dependent_required': 'dependentRequired', - 'dependent_schemas': 'dependentSchemas', - 'discriminator': 'discriminator', - # default omitted because it has no validation impact - 'else_': 'else', - 'enum_value_to_name': 'enum', - 'exclusive_maximum': 'exclusiveMaximum', - 'exclusive_minimum': 'exclusiveMinimum', - 'format': 'format', - 'if_': 'if', - 'inclusive_maximum': 'maximum', - 'inclusive_minimum': 'minimum', - 'items': 'items', - 'max_contains': 'maxContains', - 'max_items': 'maxItems', - 'max_length': 'maxLength', - 'max_properties': 'maxProperties', - 'min_contains': 'minContains', - 'min_items': 'minItems', - 'min_length': 'minLength', - 'min_properties': 'minProperties', - 'multiple_of': 'multipleOf', - 'not_': 'not', - 'one_of': 'oneOf', - 'pattern': 'pattern', - 'pattern_properties': 'patternProperties', - 'prefix_items': 'prefixItems', - 'properties': 'properties', - 'property_names': 'propertyNames', - 'required': 'required', - 'then': 'then', - 'types': 'type', - 'unique_items': 'uniqueItems', - 'unevaluated_items': 'unevaluatedItems', - 'unevaluated_properties': 'unevaluatedProperties' -} - -class SchemaConfiguration: - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param disabled_json_schema_keywords (set): Set of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_json_schema_keywords is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - """ - - def __init__( - self, - disabled_json_schema_keywords = set(), - ): - """Constructor - """ - self.disabled_json_schema_keywords = disabled_json_schema_keywords - - @property - def disabled_json_schema_python_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_python_keywords - - @property - def disabled_json_schema_keywords(self) -> typing.Set[str]: - return self.__disabled_json_schema_keywords - - @disabled_json_schema_keywords.setter - def disabled_json_schema_keywords(self, json_keywords: typing.Set[str]): - disabled_json_schema_keywords = set() - disabled_json_schema_python_keywords = set() - for k in json_keywords: - python_keywords = {key for key, val in PYTHON_KEYWORD_TO_JSON_SCHEMA_KEYWORD.items() if val == k} - if not python_keywords: - raise exceptions.ApiValueError( - "Invalid keyword: '{0}''".format(k)) - disabled_json_schema_keywords.add(k) - disabled_json_schema_python_keywords.update(python_keywords) - self.__disabled_json_schema_keywords = disabled_json_schema_keywords - self.__disabled_json_schema_python_keywords = disabled_json_schema_python_keywords \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/exceptions.py b/samples/client/petstore/python/src/openapi_client/exceptions.py deleted file mode 100644 index 23ce72d541c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/exceptions.py +++ /dev/null @@ -1,132 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import dataclasses -import typing - -from petstore_api import api_response - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - -T = typing.TypeVar('T', bound=api_response.ApiResponse) - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: typing.Optional[str] = None - api_response: typing.Optional[T] = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.api_response: - if self.api_response.response.headers: - error_message += "HTTP response headers: {0}\n".format( - self.api_response.response.headers) - if self.api_response.response.data: - error_message += "HTTP response body: {0}\n".format(self.api_response.response.data) - - return error_message diff --git a/samples/client/petstore/python/src/openapi_client/paths/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/__init__.py deleted file mode 100644 index 2c2c9cc4bdc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis import path_to_api diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py deleted file mode 100644 index 88a7395a37f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.another_fake_dummy import AnotherFakeDummy - -path = "/another-fake/dummy" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py deleted file mode 100644 index 2726b000ad9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/operation.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _call_123_test__special_tags( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _call_123_test__special_tags( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _call_123_test__special_tags( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - To test special tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='patch', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class _123TestSpecialTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - call_123_test__special_tags = BaseApi._call_123_test__special_tags - - -class ApiForPatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - patch = BaseApi._call_123_test__special_tags diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py deleted file mode 100644 index cb468c24c28..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_client -RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py deleted file mode 100644 index 1ffbaf1e85a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.client.ClientDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c1e1b8bec36..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client -Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py deleted file mode 100644 index 6b2b3dd4592..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.common_param_sub_dir import CommonParamSubDir - -path = "/commonParam/{subDir}/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py deleted file mode 100644 index 6d457920a80..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.delete.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "someHeader": typing.Type[schema.Schema], - } -) - - -class HeaderParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someHeader", - }) - - def __new__( - cls, - *, - someHeader: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someHeader", someHeader), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def someHeader(self) -> typing.Union[str, schemas.Unset]: - val = self.get("someHeader", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -HeaderParametersDictInput = typing.TypedDict( - 'HeaderParametersDictInput', - { - "someHeader": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py deleted file mode 100644 index a18e50e63e1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/operation.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import ( - parameter_0, - parameter_1, -) -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -header_parameter_classes = ( - parameter_0.Parameter0, -) -path_parameter_classes = ( - parameter_1.Parameter1, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _delete_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _delete_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - if header_params is not None: - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='delete', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class DeleteCommonParam(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - delete_common_param = BaseApi._delete_common_param - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._delete_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 0aff1ee1cb3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.HeaderParameter): - name = "someHeader" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py deleted file mode 100644 index 4737b725a2e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.PathParameter): - name = "subDir" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py deleted file mode 100644 index e5a24d789ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def C(cls) -> typing.Literal["c"]: - return Schema.validate("c") - - @schemas.classproperty - def D(cls) -> typing.Literal["d"]: - return Schema.validate("d") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "c": "C", - "d": "D", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["c"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["c"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["d"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["d"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["c","d",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "c", - "d", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "c", - "d", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py deleted file mode 100644 index c0767ebe284..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.delete.parameters.parameter_1 import schema -Properties = typing.TypedDict( - 'Properties', - { - "subDir": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, typing.Literal["c", "d"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - subDir: typing.Literal[ - "c", - "d" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "subDir": subDir, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def subDir(self) -> typing.Literal["c", "d"]: - return self.__getitem__("subDir") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "subDir": typing.Literal[ - "c", - "d" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py deleted file mode 100644 index f1c322b347e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/operation.py +++ /dev/null @@ -1,161 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import parameter_0 -from ..parameters import parameter_0 as path_item_parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) -path_parameter_classes = ( - path_item_parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _get_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _get_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GetCommonParam(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - get_common_param = BaseApi._get_common_param - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._get_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 55cf738f631..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "searchStr" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py deleted file mode 100644 index 47e568499b9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "subDir": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, typing.Literal["a", "b"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - subDir: typing.Literal[ - "a", - "b" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "subDir": subDir, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def subDir(self) -> typing.Literal["a", "b"]: - return self.__getitem__("subDir") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "subDir": typing.Literal[ - "a", - "b" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py deleted file mode 100644 index 616d06cb286..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "searchStr": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "searchStr", - }) - - def __new__( - cls, - *, - searchStr: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("searchStr", searchStr), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def searchStr(self) -> typing.Union[str, schemas.Unset]: - val = self.get("searchStr", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "searchStr": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py deleted file mode 100644 index 4144dcfbaba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "subDir" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py deleted file mode 100644 index 19bce4dcc27..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def A(cls) -> typing.Literal["a"]: - return Schema.validate("a") - - @schemas.classproperty - def B(cls) -> typing.Literal["b"]: - return Schema.validate("b") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "a": "A", - "b": "B", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["a"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["a"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["b"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["b"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["a","b",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "a", - "b", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "a", - "b", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py deleted file mode 100644 index 2b47892aef5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.post.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "someHeader": typing.Type[schema.Schema], - } -) - - -class HeaderParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someHeader", - }) - - def __new__( - cls, - *, - someHeader: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someHeader", someHeader), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def someHeader(self) -> typing.Union[str, schemas.Unset]: - val = self.get("someHeader", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -HeaderParametersDictInput = typing.TypedDict( - 'HeaderParametersDictInput', - { - "someHeader": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py deleted file mode 100644 index 8a30e31fd38..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/operation.py +++ /dev/null @@ -1,164 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import parameter_0 -from ..parameters import parameter_0 as path_item_parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -header_parameter_classes = ( - parameter_0.Parameter0, -) -path_parameter_classes = ( - path_item_parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _post_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _post_common_param( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - if header_params is not None: - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PostCommonParam(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - post_common_param = BaseApi._post_common_param - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._post_common_param diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py deleted file mode 100644 index 0aff1ee1cb3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.HeaderParameter): - name = "someHeader" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py deleted file mode 100644 index 47e568499b9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.common_param_sub_dir.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "subDir": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, typing.Literal["a", "b"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - subDir: typing.Literal[ - "a", - "b" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "subDir": subDir, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def subDir(self) -> typing.Literal["a", "b"]: - return self.__getitem__("subDir") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "subDir": typing.Literal[ - "a", - "b" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "subDir", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py deleted file mode 100644 index 1f9ea556af0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake import Fake - -path = "/fake" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py deleted file mode 100644 index f0b9ed17678..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/header_parameters.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake.delete.parameters.parameter_1 import schema -from openapi_client.paths.fake.delete.parameters.parameter_4 import schema as schema_2 -Properties = typing.TypedDict( - 'Properties', - { - "required_boolean_group": typing.Type[schema.Schema], - "boolean_group": typing.Type[schema_2.Schema], - } -) -HeaderParametersRequiredDictInput = typing.TypedDict( - 'HeaderParametersRequiredDictInput', - { - "required_boolean_group": typing.Literal[ - "true", - "false" - ], - } -) -HeaderParametersOptionalDictInput = typing.TypedDict( - 'HeaderParametersOptionalDictInput', - { - "boolean_group": typing.Literal[ - "true", - "false" - ], - }, - total=False -) - - -class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "required_boolean_group", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "boolean_group", - }) - - def __new__( - cls, - *, - required_boolean_group: typing.Literal[ - "true", - "false" - ], - boolean_group: typing.Union[ - typing.Literal[ - "true", - "false" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "required_boolean_group": required_boolean_group, - } - for key_, val in ( - ("boolean_group", boolean_group), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def required_boolean_group(self) -> typing.Literal["true", "false"]: - return typing.cast( - typing.Literal["true", "false"], - self.__getitem__("required_boolean_group") - ) - - @property - def boolean_group(self) -> typing.Union[typing.Literal["true", "false"], schemas.Unset]: - val = self.get("boolean_group", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["true", "false"], - val - ) - - -class HeaderParametersDictInput(HeaderParametersRequiredDictInput, HeaderParametersOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "required_boolean_group", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py deleted file mode 100644 index 93b334a4d3b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/operation.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import ( - parameter_0, - parameter_1, - parameter_2, - parameter_3, - parameter_4, - parameter_5, -) -from .security import security_requirement_object_0 -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_2.Parameter2, - parameter_3.Parameter3, - parameter_5.Parameter5, -) -header_parameter_classes = ( - parameter_1.Parameter1, - parameter_4.Parameter4, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _group_parameters( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _group_parameters( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _group_parameters( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Fake endpoint to test group parameters (optional) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//fake/delete/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='delete', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GroupParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - group_parameters = BaseApi._group_parameters - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._group_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 0c879952986..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "required_string_group" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py deleted file mode 100644 index 13be1c4f047..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.HeaderParameter): - name = "required_boolean_group" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py deleted file mode 100644 index a0e8558dbad..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def TRUE(cls) -> typing.Literal["true"]: - return Schema.validate("true") - - @schemas.classproperty - def FALSE(cls) -> typing.Literal["false"]: - return Schema.validate("false") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "true": "TRUE", - "false": "FALSE", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["true"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["true"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["false"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["false"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["true","false",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "true", - "false", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "true", - "false", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py deleted file mode 100644 index 61986d9021c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter2(api_client.QueryParameter): - name = "required_int64_group" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py deleted file mode 100644 index 4d7a82e7aca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter3(api_client.QueryParameter): - name = "string_group" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py deleted file mode 100644 index b0ab1c63e2b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter4(api_client.HeaderParameter): - name = "boolean_group" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py deleted file mode 100644 index a0e8558dbad..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def TRUE(cls) -> typing.Literal["true"]: - return Schema.validate("true") - - @schemas.classproperty - def FALSE(cls) -> typing.Literal["false"]: - return Schema.validate("false") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "true": "TRUE", - "false": "FALSE", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["true"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["true"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["false"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["false"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["true","false",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "true", - "false", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "true", - "false", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py deleted file mode 100644 index 59fd6db10bf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter5(api_client.QueryParameter): - name = "int64_group" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py deleted file mode 100644 index 845a564889c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/query_parameters.py +++ /dev/null @@ -1,167 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake.delete.parameters.parameter_0 import schema -from openapi_client.paths.fake.delete.parameters.parameter_2 import schema as schema_4 -from openapi_client.paths.fake.delete.parameters.parameter_3 import schema as schema_3 -from openapi_client.paths.fake.delete.parameters.parameter_5 import schema as schema_2 -Properties = typing.TypedDict( - 'Properties', - { - "required_string_group": typing.Type[schema.Schema], - "int64_group": typing.Type[schema_2.Schema], - "string_group": typing.Type[schema_3.Schema], - "required_int64_group": typing.Type[schema_4.Schema], - } -) -QueryParametersRequiredDictInput = typing.TypedDict( - 'QueryParametersRequiredDictInput', - { - "required_int64_group": int, - "required_string_group": str, - } -) -QueryParametersOptionalDictInput = typing.TypedDict( - 'QueryParametersOptionalDictInput', - { - "int64_group": int, - "string_group": str, - }, - total=False -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "required_int64_group", - "required_string_group", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "int64_group", - "string_group", - }) - - def __new__( - cls, - *, - required_int64_group: int, - required_string_group: str, - int64_group: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - string_group: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "required_int64_group": required_int64_group, - "required_string_group": required_string_group, - } - for key_, val in ( - ("int64_group", int64_group), - ("string_group", string_group), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def required_int64_group(self) -> int: - return typing.cast( - int, - self.__getitem__("required_int64_group") - ) - - @property - def required_string_group(self) -> str: - return typing.cast( - str, - self.__getitem__("required_string_group") - ) - - @property - def int64_group(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int64_group", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def string_group(self) -> typing.Union[str, schemas.Unset]: - val = self.get("string_group", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - -class QueryParametersDictInput(QueryParametersRequiredDictInput, QueryParametersOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "required_int64_group", - "required_string_group", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py deleted file mode 100644 index 71364283d46..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "bearer_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py deleted file mode 100644 index 3c220d0a7a1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/header_parameters.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake.get.parameters.parameter_0 import schema as schema_2 -from openapi_client.paths.fake.get.parameters.parameter_1 import schema -Properties = typing.TypedDict( - 'Properties', - { - "enum_header_string": typing.Type[schema.Schema], - "enum_header_string_array": typing.Type[schema_2.Schema], - } -) - - -class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "enum_header_string", - "enum_header_string_array", - }) - - def __new__( - cls, - *, - enum_header_string: typing.Union[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)" - ], - schemas.Unset - ] = schemas.unset, - enum_header_string_array: typing.Union[ - schema_2.SchemaTupleInput, - schema_2.SchemaTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("enum_header_string", enum_header_string), - ("enum_header_string_array", enum_header_string_array), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def enum_header_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: - val = self.get("enum_header_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["_abc", "-efg", "(xyz)"], - val - ) - - @property - def enum_header_string_array(self) -> typing.Union[schema_2.SchemaTuple, schemas.Unset]: - val = self.get("enum_header_string_array", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schema_2.SchemaTuple, - val - ) -HeaderParametersDictInput = typing.TypedDict( - 'HeaderParametersDictInput', - { - "enum_header_string": typing.Literal[ - "_abc", - "-efg", - "(xyz)" - ], - "enum_header_string_array": typing.Union[ - schema_2.SchemaTupleInput, - schema_2.SchemaTuple - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py deleted file mode 100644 index 6980f8dc0e9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/operation.py +++ /dev/null @@ -1,239 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake.get.request_body.content.application_x_www_form_urlencoded import schema - -from .. import path -from .responses import ( - response_200, - response_404, -) -from . import request_body -from .parameters import ( - parameter_0, - parameter_1, - parameter_2, - parameter_3, - parameter_4, - parameter_5, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -query_parameter_classes = ( - parameter_2.Parameter2, - parameter_3.Parameter3, - parameter_4.Parameter4, - parameter_5.Parameter5, -) -header_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '404', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enum_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _enum_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _enum_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - To test enum parameters - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - if header_params is not None: - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - accept_content_types=accept_content_types, - skip_validation=True - ) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class EnumParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - enum_parameters = BaseApi._enum_parameters - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._enum_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py deleted file mode 100644 index a357ebcaecc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.HeaderParameter): - name = "enum_header_string_array" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py deleted file mode 100644 index 9b4a0147d88..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ItemsEnums: - - @schemas.classproperty - def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: - return Items.validate(">") - - @schemas.classproperty - def DOLLAR_SIGN(cls) -> typing.Literal["$"]: - return Items.validate("$") - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["$"] = "$" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - ">": "GREATER_THAN_SIGN", - "$": "DOLLAR_SIGN", - } - ) - enums = ItemsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[">"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["$"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["$"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">","$",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - ">", - "$", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - ">", - "$", - ], - validated_arg - ) - - -class SchemaTuple( - typing.Tuple[ - typing.Literal[">", "$"], - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - ">", - "$" - ], - ], - typing.Tuple[ - typing.Literal[ - ">", - "$" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py deleted file mode 100644 index 2b9bcbd953a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.HeaderParameter): - name = "enum_header_string" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py deleted file mode 100644 index e379e0bc782..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: - return Schema.validate("_abc") - - @schemas.classproperty - def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: - return Schema.validate("-efg") - - @schemas.classproperty - def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: - return Schema.validate("(xyz)") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["-efg"] = "-efg" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "_abc": "LOW_LINE_ABC", - "-efg": "HYPHEN_MINUS_EFG", - "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["_abc"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["-efg"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["-efg"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["(xyz)"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["(xyz)"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc","-efg","(xyz)",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py deleted file mode 100644 index e100952eea3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter2(api_client.QueryParameter): - name = "enum_query_string_array" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py deleted file mode 100644 index 9b4a0147d88..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ItemsEnums: - - @schemas.classproperty - def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: - return Items.validate(">") - - @schemas.classproperty - def DOLLAR_SIGN(cls) -> typing.Literal["$"]: - return Items.validate("$") - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["$"] = "$" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - ">": "GREATER_THAN_SIGN", - "$": "DOLLAR_SIGN", - } - ) - enums = ItemsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[">"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["$"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["$"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">","$",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - ">", - "$", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - ">", - "$", - ], - validated_arg - ) - - -class SchemaTuple( - typing.Tuple[ - typing.Literal[">", "$"], - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - ">", - "$" - ], - ], - typing.Tuple[ - typing.Literal[ - ">", - "$" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py deleted file mode 100644 index 2d8026d8923..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter3(api_client.QueryParameter): - name = "enum_query_string" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py deleted file mode 100644 index e379e0bc782..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: - return Schema.validate("_abc") - - @schemas.classproperty - def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: - return Schema.validate("-efg") - - @schemas.classproperty - def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: - return Schema.validate("(xyz)") - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["-efg"] = "-efg" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "_abc": "LOW_LINE_ABC", - "-efg": "HYPHEN_MINUS_EFG", - "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["_abc"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["-efg"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["-efg"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["(xyz)"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["(xyz)"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc","-efg","(xyz)",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py deleted file mode 100644 index 73a688e1a31..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter4(api_client.QueryParameter): - name = "enum_query_integer" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py deleted file mode 100644 index 18accea208f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def POSITIVE_1(cls) -> typing.Literal[1]: - return Schema.validate(1) - - @schemas.classproperty - def NEGATIVE_2(cls) -> typing.Literal[-2]: - return Schema.validate(-2) - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int32' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1: "POSITIVE_1", - -2: "NEGATIVE_2", - } - ) - enums = SchemaEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[1], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[-2], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[-2]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[1,-2,]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - 1, - -2, - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - 1, - -2, - ], - validated_arg - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py deleted file mode 100644 index f9659b3f221..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter5(api_client.QueryParameter): - name = "enum_query_double" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py deleted file mode 100644 index e53684bdcee..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class SchemaEnums: - - @schemas.classproperty - def POSITIVE_1_PT_1(cls) -> typing.Union[int, float]: - return Schema.validate(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls) -> typing.Union[int, float]: - return Schema.validate(-1.2) - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'double' - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - 1.1: "POSITIVE_1_PT_1", - -1.2: "NEGATIVE_1_PT_2", - } - ) - enums = SchemaEnums - - @classmethod - def validate( - cls, - arg: typing.Union[int, float], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[int, float]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return validated_arg diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py deleted file mode 100644 index 2056527d17c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/query_parameters.py +++ /dev/null @@ -1,187 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake.get.parameters.parameter_2 import schema as schema_4 -from openapi_client.paths.fake.get.parameters.parameter_3 import schema as schema_2 -from openapi_client.paths.fake.get.parameters.parameter_4 import schema as schema_3 -from openapi_client.paths.fake.get.parameters.parameter_5 import schema -Properties = typing.TypedDict( - 'Properties', - { - "enum_query_double": typing.Type[schema.Schema], - "enum_query_string": typing.Type[schema_2.Schema], - "enum_query_integer": typing.Type[schema_3.Schema], - "enum_query_string_array": typing.Type[schema_4.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "enum_query_double", - "enum_query_string", - "enum_query_integer", - "enum_query_string_array", - }) - - def __new__( - cls, - *, - enum_query_double: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - enum_query_string: typing.Union[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)" - ], - schemas.Unset - ] = schemas.unset, - enum_query_integer: typing.Union[ - typing.Literal[ - 1, - -2 - ], - schemas.Unset - ] = schemas.unset, - enum_query_string_array: typing.Union[ - schema_4.SchemaTupleInput, - schema_4.SchemaTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("enum_query_double", enum_query_double), - ("enum_query_string", enum_query_string), - ("enum_query_integer", enum_query_integer), - ("enum_query_string_array", enum_query_string_array), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def enum_query_double(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("enum_query_double", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def enum_query_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: - val = self.get("enum_query_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["_abc", "-efg", "(xyz)"], - val - ) - - @property - def enum_query_integer(self) -> typing.Union[typing.Literal[1, -2], schemas.Unset]: - val = self.get("enum_query_integer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal[1, -2], - val - ) - - @property - def enum_query_string_array(self) -> typing.Union[schema_4.SchemaTuple, schemas.Unset]: - val = self.get("enum_query_string_array", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schema_4.SchemaTuple, - val - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "enum_query_double": typing.Union[ - int, - float - ], - "enum_query_string": typing.Literal[ - "_abc", - "-efg", - "(xyz)" - ], - "enum_query_integer": typing.Literal[ - 1, - -2 - ], - "enum_query_string_array": typing.Union[ - schema_4.SchemaTupleInput, - schema_4.SchemaTuple - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py deleted file mode 100644 index 04c6511e057..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema - content = { - 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py deleted file mode 100644 index a3da0790d14..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ /dev/null @@ -1,334 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ItemsEnums: - - @schemas.classproperty - def GREATER_THAN_SIGN(cls) -> typing.Literal[">"]: - return Items.validate(">") - - @schemas.classproperty - def DOLLAR_SIGN(cls) -> typing.Literal["$"]: - return Items.validate("$") - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["$"] = "$" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - ">": "GREATER_THAN_SIGN", - "$": "DOLLAR_SIGN", - } - ) - enums = ItemsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[">"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["$"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["$"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[">","$",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - ">", - "$", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - ">", - "$", - ], - validated_arg - ) - - -class EnumFormStringArrayTuple( - typing.Tuple[ - typing.Literal[">", "$"], - ... - ] -): - - def __new__(cls, arg: typing.Union[EnumFormStringArrayTupleInput, EnumFormStringArrayTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return EnumFormStringArray.validate(arg, configuration=configuration) -EnumFormStringArrayTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - ">", - "$" - ], - ], - typing.Tuple[ - typing.Literal[ - ">", - "$" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class EnumFormStringArray( - schemas.Schema[schemas.immutabledict, EnumFormStringArrayTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: EnumFormStringArrayTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - EnumFormStringArrayTupleInput, - EnumFormStringArrayTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> EnumFormStringArrayTuple: - return super().validate_base( - arg, - configuration=configuration, - ) - - -class EnumFormStringEnums: - - @schemas.classproperty - def LOW_LINE_ABC(cls) -> typing.Literal["_abc"]: - return EnumFormString.validate("_abc") - - @schemas.classproperty - def HYPHEN_MINUS_EFG(cls) -> typing.Literal["-efg"]: - return EnumFormString.validate("-efg") - - @schemas.classproperty - def LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS(cls) -> typing.Literal["(xyz)"]: - return EnumFormString.validate("(xyz)") - - -@dataclasses.dataclass(frozen=True) -class EnumFormString( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["-efg"] = "-efg" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "_abc": "LOW_LINE_ABC", - "-efg": "HYPHEN_MINUS_EFG", - "(xyz)": "LEFT_PARENTHESIS_XYZ_RIGHT_PARENTHESIS", - } - ) - enums = EnumFormStringEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["_abc"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["-efg"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["-efg"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["(xyz)"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["(xyz)"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["_abc","-efg","(xyz)",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "_abc", - "-efg", - "(xyz)", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "enum_form_string_array": typing.Type[EnumFormStringArray], - "enum_form_string": typing.Type[EnumFormString], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "enum_form_string_array", - "enum_form_string", - }) - - def __new__( - cls, - *, - enum_form_string_array: typing.Union[ - EnumFormStringArrayTupleInput, - EnumFormStringArrayTuple, - schemas.Unset - ] = schemas.unset, - enum_form_string: typing.Union[ - typing.Literal[ - "_abc", - "-efg", - "(xyz)" - ], - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("enum_form_string_array", enum_form_string_array), - ("enum_form_string", enum_form_string), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def enum_form_string_array(self) -> typing.Union[EnumFormStringArrayTuple, schemas.Unset]: - val = self.get("enum_form_string_array", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - EnumFormStringArrayTuple, - val - ) - - @property - def enum_form_string(self) -> typing.Union[typing.Literal["_abc", "-efg", "(xyz)"], schemas.Unset]: - val = self.get("enum_form_string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Literal["_abc", "-efg", "(xyz)"], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py deleted file mode 100644 index 7a93ab791c1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py deleted file mode 100644 index 3b50a65df5d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.DictSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py deleted file mode 100644 index 6d305b17569..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/operation.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _client_model( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _client_model( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _client_model( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - To test \\\"client\\\" model - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='patch', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ClientModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - client_model = BaseApi._client_model - - -class ApiForPatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - patch = BaseApi._client_model diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py deleted file mode 100644 index cb468c24c28..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_client -RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py deleted file mode 100644 index 1ffbaf1e85a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.client.ClientDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c1e1b8bec36..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client -Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py deleted file mode 100644 index 24575769cbc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/operation.py +++ /dev/null @@ -1,175 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake.post.request_body.content.application_x_www_form_urlencoded import schema - -from .. import path -from .responses import ( - response_200, - response_404, -) -from . import request_body -from .security import security_requirement_object_0 - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '404', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _endpoint_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _endpoint_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _endpoint_parameters( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//fake/post/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class EndpointParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - endpoint_parameters = BaseApi._endpoint_parameters - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._endpoint_parameters diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py deleted file mode 100644 index 04c6511e057..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema - content = { - 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py deleted file mode 100644 index 49d1338baed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ /dev/null @@ -1,434 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Integer( - schemas.IntSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int' - inclusive_maximum: typing.Union[int, float] = 100 - inclusive_minimum: typing.Union[int, float] = 10 - - -@dataclasses.dataclass(frozen=True) -class Int32( - schemas.Int32Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int32' - inclusive_maximum: typing.Union[int, float] = 200 - inclusive_minimum: typing.Union[int, float] = 20 -Int64: typing_extensions.TypeAlias = schemas.Int64Schema - - -@dataclasses.dataclass(frozen=True) -class Number( - schemas.NumberSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - inclusive_maximum: typing.Union[int, float] = 543.2 - inclusive_minimum: typing.Union[int, float] = 32.1 - - -@dataclasses.dataclass(frozen=True) -class Float( - schemas.Float32Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'float' - inclusive_maximum: typing.Union[int, float] = 987.6 - - -@dataclasses.dataclass(frozen=True) -class Double( - schemas.Float64Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - float, - int, - }) - format: str = 'double' - inclusive_maximum: typing.Union[int, float] = 123.4 - inclusive_minimum: typing.Union[int, float] = 67.8 - - -@dataclasses.dataclass(frozen=True) -class String( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'[a-z]', # noqa: E501 - flags=re.I, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternWithoutDelimiter( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - pattern: schemas.PatternInfo = schemas.PatternInfo( - pattern=r'^[A-Z].*' # noqa: E501 - ) -Byte: typing_extensions.TypeAlias = schemas.StrSchema -Binary: typing_extensions.TypeAlias = schemas.BinarySchema -Date: typing_extensions.TypeAlias = schemas.DateSchema - - -@dataclasses.dataclass(frozen=True) -class DateTime( - schemas.DateTimeSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'date-time' - default: typing.Literal["2010-02-01T10:20:10.111110+01:00"] = "2010-02-01T10:20:10.111110+01:00" - - -@dataclasses.dataclass(frozen=True) -class Password( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - format: str = 'password' - max_length: int = 64 - min_length: int = 10 -Callback: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "integer": typing.Type[Integer], - "int32": typing.Type[Int32], - "int64": typing.Type[Int64], - "number": typing.Type[Number], - "float": typing.Type[Float], - "double": typing.Type[Double], - "string": typing.Type[String], - "pattern_without_delimiter": typing.Type[PatternWithoutDelimiter], - "byte": typing.Type[Byte], - "binary": typing.Type[Binary], - "date": typing.Type[Date], - "dateTime": typing.Type[DateTime], - "password": typing.Type[Password], - "callback": typing.Type[Callback], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "byte", - "double", - "number", - "pattern_without_delimiter", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "integer", - "int32", - "int64", - "float", - "string", - "binary", - "date", - "dateTime", - "password", - "callback", - }) - - def __new__( - cls, - *, - byte: str, - double: typing.Union[ - int, - float - ], - number: typing.Union[ - int, - float - ], - pattern_without_delimiter: str, - integer: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - int32: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - int64: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - float: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - string: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - binary: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO, - schemas.Unset - ] = schemas.unset, - date: typing.Union[ - str, - datetime.date, - schemas.Unset - ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, - password: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - callback: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "byte": byte, - "double": double, - "number": number, - "pattern_without_delimiter": pattern_without_delimiter, - } - for key_, val in ( - ("integer", integer), - ("int32", int32), - ("int64", int64), - ("float", float), - ("string", string), - ("binary", binary), - ("date", date), - ("dateTime", dateTime), - ("password", password), - ("callback", callback), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def byte(self) -> str: - return typing.cast( - str, - self.__getitem__("byte") - ) - - @property - def double(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("double") - ) - - @property - def number(self) -> typing.Union[int, float]: - return typing.cast( - typing.Union[int, float], - self.__getitem__("number") - ) - - @property - def pattern_without_delimiter(self) -> str: - return typing.cast( - str, - self.__getitem__("pattern_without_delimiter") - ) - - @property - def integer(self) -> typing.Union[int, schemas.Unset]: - val = self.get("integer", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def int32(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int32", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def int64(self) -> typing.Union[int, schemas.Unset]: - val = self.get("int64", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - @property - def float(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - - @property - def string(self) -> typing.Union[str, schemas.Unset]: - val = self.get("string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def binary(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: - val = self.get("binary", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[bytes, schemas.FileIO], - val - ) - - @property - def date(self) -> typing.Union[str, schemas.Unset]: - val = self.get("date", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def password(self) -> typing.Union[str, schemas.Unset]: - val = self.get("password", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def callback(self) -> typing.Union[str, schemas.Unset]: - val = self.get("callback", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "byte", - "double", - "number", - "pattern_without_delimiter", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py deleted file mode 100644 index 10e691b5c05..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake/post/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_basic_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py deleted file mode 100644 index ad543149c62..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_additional_properties_with_array_of_enums import FakeAdditionalPropertiesWithArrayOfEnums - -path = "/fake/additional-properties-with-array-of-enums" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py deleted file mode 100644 index b4401042d37..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_properties_with_array_of_enums - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _additional_properties_with_array_of_enums( - self, - body: typing.Union[ - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _additional_properties_with_array_of_enums( - self, - body: typing.Union[ - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _additional_properties_with_array_of_enums( - self, - body: typing.Union[ - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDictInput, - additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Additional Properties with Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class AdditionalPropertiesWithArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - additional_properties_with_array_of_enums = BaseApi._additional_properties_with_array_of_enums - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._additional_properties_with_array_of_enums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py deleted file mode 100644 index 71e55c75dac..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_properties_with_array_of_enums -Schema: typing_extensions.TypeAlias = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py deleted file mode 100644 index 9a6cb1a8be5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnumsDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 71e55c75dac..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import additional_properties_with_array_of_enums -Schema: typing_extensions.TypeAlias = additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py deleted file mode 100644 index 46fee76a281..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema - -path = "/fake/body-with-file-schema" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py deleted file mode 100644 index 12b1379b8cc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/operation.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import file_schema_test_class - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_file_schema( - self, - body: typing.Union[ - file_schema_test_class.FileSchemaTestClassDictInput, - file_schema_test_class.FileSchemaTestClassDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _body_with_file_schema( - self, - body: typing.Union[ - file_schema_test_class.FileSchemaTestClassDictInput, - file_schema_test_class.FileSchemaTestClassDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _body_with_file_schema( - self, - body: typing.Union[ - file_schema_test_class.FileSchemaTestClassDictInput, - file_schema_test_class.FileSchemaTestClassDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='put', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class BodyWithFileSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - body_with_file_schema = BaseApi._body_with_file_schema - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._body_with_file_schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py deleted file mode 100644 index 2c45897df78..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import file_schema_test_class -Schema: typing_extensions.TypeAlias = file_schema_test_class.FileSchemaTestClass diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py deleted file mode 100644 index 3b1fb238011..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_body_with_query_params import FakeBodyWithQueryParams - -path = "/fake/body-with-query-params" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py deleted file mode 100644 index a8db188122f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/operation.py +++ /dev/null @@ -1,162 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user - -from .. import path -from .responses import response_200 -from . import request_body -from .parameters import parameter_0 -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_query_params( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _body_with_query_params( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _body_with_query_params( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='put', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class BodyWithQueryParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - body_with_query_params = BaseApi._body_with_query_params - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._body_with_query_params diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py deleted file mode 100644 index bd1b90dc135..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "query" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py deleted file mode 100644 index 7f2aeddb817..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_body_with_query_params.put.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "query": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "query", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - query: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "query": query, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def query(self) -> str: - return self.__getitem__("query") -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "query": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "query", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py deleted file mode 100644 index 8e004303999..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user -Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py deleted file mode 100644 index 4481cd944eb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams - -path = "/fake/case-sensitive-params" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py deleted file mode 100644 index 840b3169040..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/operation.py +++ /dev/null @@ -1,140 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import ( - parameter_0, - parameter_1, - parameter_2, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, - parameter_2.Parameter2, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _case_sensitive_params( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _case_sensitive_params( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _case_sensitive_params( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='put', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class CaseSensitiveParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - case_sensitive_params = BaseApi._case_sensitive_params - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._case_sensitive_params diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py deleted file mode 100644 index 5eaf87fcf23..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "someVar" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py deleted file mode 100644 index 178565d8afe..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.QueryParameter): - name = "SomeVar" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py deleted file mode 100644 index 571512f5d7e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter2(api_client.QueryParameter): - name = "some_var" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py deleted file mode 100644 index 83bb92ea397..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_0 import schema -from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_1 import schema as schema_3 -from openapi_client.paths.fake_case_sensitive_params.put.parameters.parameter_2 import schema as schema_2 -Properties = typing.TypedDict( - 'Properties', - { - "someVar": typing.Type[schema.Schema], - "some_var": typing.Type[schema_2.Schema], - "SomeVar": typing.Type[schema_3.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "SomeVar", - "someVar", - "some_var", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - SomeVar: str, - someVar: str, - some_var: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "SomeVar": SomeVar, - "someVar": someVar, - "some_var": some_var, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def SomeVar(self) -> str: - return typing.cast( - str, - self.__getitem__("SomeVar") - ) - - @property - def someVar(self) -> str: - return typing.cast( - str, - self.__getitem__("someVar") - ) - - @property - def some_var(self) -> str: - return typing.cast( - str, - self.__getitem__("some_var") - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "SomeVar": str, - "someVar": str, - "some_var": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "SomeVar", - "someVar", - "some_var", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py deleted file mode 100644 index 00f1d0d933f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_classname_test import FakeClassnameTest - -path = "/fake_classname_test" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py deleted file mode 100644 index fa6056c176f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/operation.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client - -from .. import path -from .responses import response_200 -from . import request_body -from .security import security_requirement_object_0 - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _classname( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _classname( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _classname( - self, - body: typing.Union[ - client.ClientDictInput, - client.ClientDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - To test class name in snake case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//fake_classname_test/patch/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='patch', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class Classname(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - classname = BaseApi._classname - - -class ApiForPatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - patch = BaseApi._classname diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py deleted file mode 100644 index cb468c24c28..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_client -RequestBody = request_body_client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py deleted file mode 100644 index 1ffbaf1e85a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.client.ClientDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py deleted file mode 100644 index c1e1b8bec36..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import client -Schema: typing_extensions.TypeAlias = client.Client diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py deleted file mode 100644 index 7ec708e256b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key_query": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py deleted file mode 100644 index d030685ff6e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId - -path = "/fake/deleteCoffee/{id}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py deleted file mode 100644 index 183b1fa2cb5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_default, -) -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -default_response = response_default.Default -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_coffee( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> typing.Union[ - response_200.ApiResponse, - response_default.ApiResponse, - ]: ... - - @typing.overload - def _delete_coffee( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _delete_coffee( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Delete coffee - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='delete', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class DeleteCoffee(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - delete_coffee = BaseApi._delete_coffee - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._delete_coffee diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 69b8c284b4d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "id" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py deleted file mode 100644 index 5ad8b700ddf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_delete_coffee_id.delete.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "id": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - id: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "id": id, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def id(self) -> str: - return self.__getitem__("id") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "id": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py deleted file mode 100644 index b2dbf46535b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class Default(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py deleted file mode 100644 index 9e5ced1c16a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_health/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_health import FakeHealth - -path = "/fake/health" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py deleted file mode 100644 index 906e0058097..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/operation.py +++ /dev/null @@ -1,117 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _fake_health_get( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _fake_health_get( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _fake_health_get( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Health check endpoint - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class FakeHealthGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - fake_health_get = BaseApi._fake_health_get - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._fake_health_get diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py deleted file mode 100644 index 9bee19c0dbb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.health_check_result.HealthCheckResultDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e0a6f5a070e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import health_check_result -Schema: typing_extensions.TypeAlias = health_check_result.HealthCheckResult diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py deleted file mode 100644 index 2c7383f3c77..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_inline_additional_properties import FakeInlineAdditionalProperties - -path = "/fake/inline-additionalProperties" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py deleted file mode 100644 index c5c9ab857a5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/operation.py +++ /dev/null @@ -1,136 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_inline_additional_properties.post.request_body.content.application_json import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_additional_properties( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _inline_additional_properties( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _inline_additional_properties( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - test inline additionalProperties - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class InlineAdditionalProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - inline_additional_properties = BaseApi._inline_additional_properties - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._inline_additional_properties diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py deleted file mode 100644 index 038be680d09..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - def __new__( - cls, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: str, - ): - used_kwargs = typing.cast(SchemaDictInput, kwargs) - return Schema.validate(used_kwargs, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - def get_additional_property_(self, name: str) -> typing.Union[str, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - val = self.get(name, schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -SchemaDictInput = typing.Mapping[ - str, - str, -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py deleted file mode 100644 index c18e383633e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_inline_composition import FakeInlineComposition - -path = "/fake/inlineComposition/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py deleted file mode 100644 index 69d1576d446..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/operation.py +++ /dev/null @@ -1,236 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_inline_composition.post.request_body.content.application_json import schema -from openapi_client.paths.fake_inline_composition.post.request_body.content.multipart_form_data import schema as schema_2 - -from .. import path -from .responses import response_200 -from . import request_body -from .parameters import ( - parameter_0, - parameter_1, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", - "multipart/form-data", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_composition( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _inline_composition( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _inline_composition( - self, - body: typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _inline_composition( - self, - body: typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _inline_composition( - self, - body: typing.Union[ - typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - ], - schemas.Unset, - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - content_type: typing.Literal[ - "application/json", - "multipart/form-data", - ] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - testing composed schemas at inline locations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class InlineComposition(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - inline_composition = BaseApi._inline_composition - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._inline_composition diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py deleted file mode 100644 index 081e40b3136..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "compositionAtRoot" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py deleted file mode 100644 index 68bb5cd1208..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py deleted file mode 100644 index 3d7fcbff1a0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.QueryParameter): - name = "compositionInProperty" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py deleted file mode 100644 index c1496a36b86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class SomeProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -Properties = typing.TypedDict( - 'Properties', - { - "someProp": typing.Type[SomeProp], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someProp", - }) - - def __new__( - cls, - *, - someProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someProp", someProp), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("someProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py deleted file mode 100644 index 4c16099399b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/query_parameters.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_inline_composition.post.parameters.parameter_0 import schema -from openapi_client.paths.fake_inline_composition.post.parameters.parameter_1 import schema as schema_2 -Properties = typing.TypedDict( - 'Properties', - { - "compositionAtRoot": typing.Type[schema.Schema], - "compositionInProperty": typing.Type[schema_2.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "compositionAtRoot", - "compositionInProperty", - }) - - def __new__( - cls, - *, - compositionAtRoot: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - compositionInProperty: typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("compositionAtRoot", compositionAtRoot), - ("compositionInProperty", compositionInProperty), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def compositionAtRoot(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("compositionAtRoot", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schemas.OUTPUT_BASE_TYPES, - val - ) - - @property - def compositionInProperty(self) -> typing.Union[schema_2.SchemaDict, schemas.Unset]: - val = self.get("compositionInProperty", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - schema_2.SchemaDict, - val - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "compositionAtRoot": typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - "compositionInProperty": typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py deleted file mode 100644 index 97431fadf5a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py deleted file mode 100644 index 68bb5cd1208..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index c1496a36b86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class SomeProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -Properties = typing.TypedDict( - 'Properties', - { - "someProp": typing.Type[SomeProp], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someProp", - }) - - def __new__( - cls, - *, - someProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someProp", someProp), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("someProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py deleted file mode 100644 index 81af2ac13c2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .content.multipart_form_data import schema as multipart_form_data_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - schemas.OUTPUT_BASE_TYPES, - multipart_form_data_schema.SchemaDict, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 68bb5cd1208..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py deleted file mode 100644 index c1496a36b86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class _0( - schemas.StrSchema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - min_length: int = 1 -AllOf = typing.Tuple[ - typing.Type[_0], -] - - -@dataclasses.dataclass(frozen=True) -class SomeProp( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - # any type - all_of: AllOf = dataclasses.field(default_factory=lambda: schemas.tuple_to_instance(AllOf)) # type: ignore - -Properties = typing.TypedDict( - 'Properties', - { - "someProp": typing.Type[SomeProp], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "someProp", - }) - - def __new__( - cls, - *, - someProp: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("someProp", someProp), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def someProp(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("someProp", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py deleted file mode 100644 index 7820add345f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_json_form_data import FakeJsonFormData - -path = "/fake/jsonFormData" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py deleted file mode 100644 index 5af1775a4de..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/operation.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_json_form_data.get.request_body.content.application_x_www_form_urlencoded import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_form_data( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _json_form_data( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _json_form_data( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - test json serialization of form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class JsonFormData(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - json_form_data = BaseApi._json_form_data - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._json_form_data diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py deleted file mode 100644 index 04c6511e057..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema - content = { - 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py deleted file mode 100644 index e5f79af4d86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Param: typing_extensions.TypeAlias = schemas.StrSchema -Param2: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "param": typing.Type[Param], - "param2": typing.Type[Param2], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "param", - "param2", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - param: str, - param2: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "param": param, - "param2": param2, - } - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def param(self) -> str: - return typing.cast( - str, - self.__getitem__("param") - ) - - @property - def param2(self) -> str: - return typing.cast( - str, - self.__getitem__("param2") - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "param", - "param2", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py deleted file mode 100644 index 361506286d6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_json_patch import FakeJsonPatch - -path = "/fake/jsonPatch" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py deleted file mode 100644 index 79482207b12..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/operation.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_patch_request - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_patch( - self, - body: typing.Union[ - json_patch_request.JSONPatchRequestTupleInput, - json_patch_request.JSONPatchRequestTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _json_patch( - self, - body: typing.Union[ - json_patch_request.JSONPatchRequestTupleInput, - json_patch_request.JSONPatchRequestTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _json_patch( - self, - body: typing.Union[ - json_patch_request.JSONPatchRequestTupleInput, - json_patch_request.JSONPatchRequestTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json-patch+json"] = "application/json-patch+json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - json patch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='patch', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class JsonPatch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - json_patch = BaseApi._json_patch - - -class ApiForPatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - patch = BaseApi._json_patch diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py deleted file mode 100644 index 277f35d126a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json_patchjson import schema as application_json_patchjson_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonPatchjsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_patchjson_schema.Schema - content = { - 'application/json-patch+json': ApplicationJsonPatchjsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py deleted file mode 100644 index 5d38fffc83e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import json_patch_request -Schema: typing_extensions.TypeAlias = json_patch_request.JSONPatchRequest diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py deleted file mode 100644 index 50efb5ac083..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_json_with_charset import FakeJsonWithCharset - -path = "/fake/jsonWithCharset" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py deleted file mode 100644 index 74aec626d47..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_json_with_charset.post.request_body.content.application_json_charsetutf8 import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json; charset=utf-8", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_with_charset( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _json_with_charset( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _json_with_charset( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - json with charset tx and rx - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class JsonWithCharset(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - json_with_charset = BaseApi._json_with_charset - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._json_with_charset diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py deleted file mode 100644 index b2720876332..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json_charsetutf8 import schema as application_json_charsetutf8_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonCharsetutf8MediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_charsetutf8_schema.Schema - content = { - 'application/json; charset=utf-8': ApplicationJsonCharsetutf8MediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py deleted file mode 100644 index f6ede698a4a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json_charsetutf8 import schema as application_json_charsetutf8_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonCharsetutf8MediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_charsetutf8_schema.Schema - content = { - 'application/json; charset=utf-8': ApplicationJsonCharsetutf8MediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py deleted file mode 100644 index a263c05cfa7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_multiple_request_body_content_types import FakeMultipleRequestBodyContentTypes - -path = "/fake/multipleRequestBodyContentTypes/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py deleted file mode 100644 index 1c132d5bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py +++ /dev/null @@ -1,190 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_multiple_request_body_content_types.post.request_body.content.application_json import schema -from openapi_client.paths.fake_multiple_request_body_content_types.post.request_body.content.multipart_form_data import schema as schema_2 - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _multiple_request_body_content_types( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _multiple_request_body_content_types( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _multiple_request_body_content_types( - self, - body: typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _multiple_request_body_content_types( - self, - body: typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _multiple_request_body_content_types( - self, - body: typing.Union[ - typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - ], - typing.Union[ - schema_2.SchemaDictInput, - schema_2.SchemaDict, - ], - schemas.Unset, - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal[ - "application/json", - "multipart/form-data", - ] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - testing composed schemas at inline locations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class MultipleRequestBodyContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - multiple_request_body_content_types = BaseApi._multiple_request_body_content_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._multiple_request_body_content_types diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py deleted file mode 100644 index 97431fadf5a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py deleted file mode 100644 index e01f4f47343..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -A: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "a": typing.Type[A], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "a", - }) - - def __new__( - cls, - *, - a: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("a", a), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def a(self) -> typing.Union[str, schemas.Unset]: - val = self.get("a", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index 81a6e94a48c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -B: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "b": typing.Type[B], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "b", - }) - - def __new__( - cls, - *, - b: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("b", b), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def b(self) -> typing.Union[str, schemas.Unset]: - val = self.get("b", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py deleted file mode 100644 index deeea6afc89..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_multiple_response_bodies import FakeMultipleResponseBodies - -path = "/fake/multipleResponseBodies" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py deleted file mode 100644 index e8cae9b634a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py +++ /dev/null @@ -1,127 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_202, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '202': typing.Type[response_202.ResponseFor202], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '202': response_202.ResponseFor202, -} -_non_error_status_codes = frozenset({ - '200', - '202', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _multiple_response_bodies( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> typing.Union[ - response_200.ApiResponse, - response_202.ApiResponse, - ]: ... - - @typing.overload - def _multiple_response_bodies( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _multiple_response_bodies( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - multiple responses have response bodies - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - '202', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class MultipleResponseBodies(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - multiple_response_bodies = BaseApi._multiple_response_bodies - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._multiple_response_bodies diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py deleted file mode 100644 index 496d00b6352..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor202(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py deleted file mode 100644 index d5b975c0083..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_multiple_securities import FakeMultipleSecurities - -path = "/fake/multipleSecurities" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py deleted file mode 100644 index 9956064e494..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/operation.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .security import ( - security_requirement_object_0, - security_requirement_object_1, - security_requirement_object_2, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, - security_requirement_object_2.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _multiple_securities( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _multiple_securities( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _multiple_securities( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - multiple security requirements - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//fake/multipleSecurities/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class MultipleSecurities(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - multiple_securities = BaseApi._multiple_securities - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._multiple_securities diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py deleted file mode 100644 index d2abad55619..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py deleted file mode 100644 index 3bd125859d2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py +++ /dev/null @@ -1,15 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_basic_test": (), - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py deleted file mode 100644 index 1af9fd3ec87..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_obj_in_query import FakeObjInQuery - -path = "/fake/objInQuery" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py deleted file mode 100644 index 4d65cbbba86..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/operation.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import parameter_0 -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - object_in_query = BaseApi._object_in_query - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._object_in_query diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 11281fbe42d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "mapBean" - style=api_client.ParameterStyle.DEEP_OBJECT - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py deleted file mode 100644 index a563d9ce057..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Keyword: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "keyword": typing.Type[Keyword], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "keyword", - }) - - def __new__( - cls, - *, - keyword: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("keyword", keyword), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def keyword(self) -> typing.Union[str, schemas.Unset]: - val = self.get("keyword", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py deleted file mode 100644 index 4780f4981b6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_obj_in_query.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "mapBean": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schema.SchemaDict]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "mapBean", - }) - - def __new__( - cls, - *, - mapBean: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("mapBean", mapBean), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def mapBean(self) -> typing.Union[schema.SchemaDict, schemas.Unset]: - val = self.get("mapBean", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "mapBean": typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py deleted file mode 100644 index e5a1bbc24a4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_parameter_collisions1_abab_self_ab import FakeParameterCollisions1AbabSelfAb - -path = "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py deleted file mode 100644 index 0f0259b7a92..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_14 import schema -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_15 import schema as schema_2 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_16 import schema as schema_3 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_17 import schema as schema_5 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_18 import schema as schema_4 -Properties = typing.TypedDict( - 'Properties', - { - "1": typing.Type[schema.Schema], - "aB": typing.Type[schema_2.Schema], - "Ab": typing.Type[schema_3.Schema], - "A-B": typing.Type[schema_4.Schema], - "self": typing.Type[schema_5.Schema], - } -) - - -class CookieParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "1", - "aB", - "Ab", - "A-B", - "self", - }) - - def __new__( - cls, - *, - aB: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - Ab: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("aB", aB), - ("Ab", Ab), - ("self", self), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(CookieParametersDictInput, arg_) - return CookieParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - CookieParametersDictInput, - CookieParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CookieParametersDict: - return CookieParameters.validate(arg, configuration=configuration) - - @property - def aB(self) -> typing.Union[str, schemas.Unset]: - val = self.get("aB", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def Ab(self) -> typing.Union[str, schemas.Unset]: - val = self.get("Ab", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -CookieParametersDictInput = typing.TypedDict( - 'CookieParametersDictInput', - { - "1": str, - "aB": str, - "Ab": str, - "A-B": str, - "self": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class CookieParameters( - schemas.Schema[CookieParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: CookieParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - CookieParametersDictInput, - CookieParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> CookieParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py deleted file mode 100644 index 6c482f937e6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_5 import schema -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_6 import schema as schema_2 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_7 import schema as schema_4 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_8 import schema as schema_3 -Properties = typing.TypedDict( - 'Properties', - { - "1": typing.Type[schema.Schema], - "aB": typing.Type[schema_2.Schema], - "A-B": typing.Type[schema_3.Schema], - "self": typing.Type[schema_4.Schema], - } -) - - -class HeaderParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "1", - "aB", - "A-B", - "self", - }) - - def __new__( - cls, - *, - aB: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("aB", aB), - ("self", self), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def aB(self) -> typing.Union[str, schemas.Unset]: - val = self.get("aB", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -HeaderParametersDictInput = typing.TypedDict( - 'HeaderParametersDictInput', - { - "1": str, - "aB": str, - "A-B": str, - "self": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py deleted file mode 100644 index 7027f52ab2d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py +++ /dev/null @@ -1,287 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.request_body.content.application_json import schema - -from .. import path -from .responses import response_200 -from . import request_body -from .parameters import ( - parameter_0, - parameter_1, - parameter_2, - parameter_3, - parameter_4, - parameter_5, - parameter_6, - parameter_7, - parameter_8, - parameter_9, - parameter_10, - parameter_11, - parameter_12, - parameter_13, - parameter_14, - parameter_15, - parameter_16, - parameter_17, - parameter_18, -) -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -from .cookie_parameters import CookieParameters, CookieParametersDictInput, CookieParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, - parameter_2.Parameter2, - parameter_3.Parameter3, - parameter_4.Parameter4, -) -header_parameter_classes = ( - parameter_5.Parameter5, - parameter_6.Parameter6, - parameter_7.Parameter7, - parameter_8.Parameter8, -) -path_parameter_classes = ( - parameter_9.Parameter9, - parameter_10.Parameter10, - parameter_11.Parameter11, - parameter_12.Parameter12, - parameter_13.Parameter13, -) -cookie_parameter_classes = ( - parameter_9.Parameter9, - parameter_10.Parameter10, - parameter_11.Parameter11, - parameter_12.Parameter12, - parameter_13.Parameter13, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _parameter_collisions( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - cookie_params: typing.Union[ - CookieParametersDictInput, - CookieParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _parameter_collisions( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - cookie_params: typing.Union[ - CookieParametersDictInput, - CookieParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _parameter_collisions( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - cookie_params: typing.Union[ - CookieParametersDictInput, - CookieParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - parameter collision case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - if header_params is not None: - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - if cookie_params is not None: - cookie_params = CookieParameters.validate( - cookie_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - accept_content_types=accept_content_types, - skip_validation=True - ) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ParameterCollisions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - parameter_collisions = BaseApi._parameter_collisions - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._parameter_collisions diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py deleted file mode 100644 index c3e56a0071c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "1" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py deleted file mode 100644 index 42d3c28a201..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.QueryParameter): - name = "aB" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py deleted file mode 100644 index a032f10d400..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter10(api_client.PathParameter): - name = "aB" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py deleted file mode 100644 index 0a84c1425b6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter11(api_client.PathParameter): - name = "Ab" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py deleted file mode 100644 index 3046c447b3a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter12(api_client.PathParameter): - name = "self" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py deleted file mode 100644 index 6528508b8d2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter13(api_client.PathParameter): - name = "A-B" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py deleted file mode 100644 index 724f6cd8c85..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter14(api_client.CookieParameter): - name = "1" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py deleted file mode 100644 index 34a6af7117d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter15(api_client.CookieParameter): - name = "aB" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py deleted file mode 100644 index bbcefa69573..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter16(api_client.CookieParameter): - name = "Ab" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py deleted file mode 100644 index 91a591c289a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter17(api_client.CookieParameter): - name = "self" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py deleted file mode 100644 index f8023ef9902..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter18(api_client.CookieParameter): - name = "A-B" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py deleted file mode 100644 index 58909088f52..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter2(api_client.QueryParameter): - name = "Ab" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py deleted file mode 100644 index 428cf357caf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter3(api_client.QueryParameter): - name = "self" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py deleted file mode 100644 index 0d9cee81ff8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter4(api_client.QueryParameter): - name = "A-B" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py deleted file mode 100644 index 06acca46ea2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter5(api_client.HeaderParameter): - name = "1" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py deleted file mode 100644 index 2d90f7a46cb..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter6(api_client.HeaderParameter): - name = "aB" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py deleted file mode 100644 index 4fc3881b870..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter7(api_client.HeaderParameter): - name = "self" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py deleted file mode 100644 index ba0106e7390..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter8(api_client.HeaderParameter): - name = "A-B" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py deleted file mode 100644 index 2fd448fbcaa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter9(api_client.PathParameter): - name = "1" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py deleted file mode 100644 index 8c093f85931..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_10 import schema as schema_2 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_11 import schema as schema_3 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_12 import schema as schema_5 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_13 import schema as schema_4 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_9 import schema -Properties = typing.TypedDict( - 'Properties', - { - "1": typing.Type[schema.Schema], - "aB": typing.Type[schema_2.Schema], - "Ab": typing.Type[schema_3.Schema], - "A-B": typing.Type[schema_4.Schema], - "self": typing.Type[schema_5.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "1", - "A-B", - "Ab", - "aB", - "self", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - Ab: str, - aB: str, - self: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "Ab": Ab, - "aB": aB, - "self": self, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def Ab(self) -> str: - return typing.cast( - str, - self.__getitem__("Ab") - ) - - @property - def aB(self) -> str: - return typing.cast( - str, - self.__getitem__("aB") - ) - - @property - def self(self) -> str: - return typing.cast( - str, - self.__getitem__("self") - ) -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "1": str, - "A-B": str, - "Ab": str, - "aB": str, - "self": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "1", - "A-B", - "Ab", - "aB", - "self", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py deleted file mode 100644 index 75e7b6e9fa8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py +++ /dev/null @@ -1,154 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_0 import schema -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_1 import schema as schema_2 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_2 import schema as schema_3 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_3 import schema as schema_5 -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post.parameters.parameter_4 import schema as schema_4 -Properties = typing.TypedDict( - 'Properties', - { - "1": typing.Type[schema.Schema], - "aB": typing.Type[schema_2.Schema], - "Ab": typing.Type[schema_3.Schema], - "A-B": typing.Type[schema_4.Schema], - "self": typing.Type[schema_5.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "1", - "aB", - "Ab", - "A-B", - "self", - }) - - def __new__( - cls, - *, - aB: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - Ab: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("aB", aB), - ("Ab", Ab), - ("self", self), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def aB(self) -> typing.Union[str, schemas.Unset]: - val = self.get("aB", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def Ab(self) -> typing.Union[str, schemas.Unset]: - val = self.get("Ab", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "1": str, - "aB": str, - "Ab": str, - "A-B": str, - "self": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py deleted file mode 100644 index 467c5d090d5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_pem_content_type import FakePemContentType - -path = "/fake/pemContentType" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py deleted file mode 100644 index 0e801e2a335..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/operation.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_pem_content_type.get.request_body.content.application_x_pem_file import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/x-pem-file", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _pem_content_type( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _pem_content_type( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _pem_content_type( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/x-pem-file"] = "application/x-pem-file", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - route with tx and rx pem content type - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PemContentType(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - pem_content_type = BaseApi._pem_content_type - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._pem_content_type diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py deleted file mode 100644 index 164558c77d6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_pem_file import schema as application_x_pem_file_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationXPemFileMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_pem_file_schema.Schema - content = { - 'application/x-pem-file': ApplicationXPemFileMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py deleted file mode 100644 index b682fb4bb4e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_pem_file import schema as application_x_pem_file_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXPemFileMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_pem_file_schema.Schema - content = { - 'application/x-pem-file': ApplicationXPemFileMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py deleted file mode 100644 index 13f907adb75..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile - -path = "/fake/{petId}/uploadImageWithRequiredFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py deleted file mode 100644 index c9a5dabde43..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.request_body.content.multipart_form_data import schema - -from .. import path -from .responses import response_200 -from . import request_body -from .parameters import parameter_0 -from .security import security_requirement_object_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file_with_required_file( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _upload_file_with_required_file( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _upload_file_with_required_file( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - uploads an image (required) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//fake/{petId}/uploadImageWithRequiredFile/post/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UploadFileWithRequiredFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - upload_file_with_required_file = BaseApi._upload_file_with_required_file - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._upload_file_with_required_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py deleted file mode 100644 index 18d9059d05f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "petId" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py deleted file mode 100644 index 4cff18e37af..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "petId": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - petId: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "petId": petId, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def petId(self) -> int: - return self.__getitem__("petId") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "petId": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "petId", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py deleted file mode 100644 index fa0a08ad486..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index b0a024249a2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema -RequiredFile: typing_extensions.TypeAlias = schemas.BinarySchema -Properties = typing.TypedDict( - 'Properties', - { - "additionalMetadata": typing.Type[AdditionalMetadata], - "requiredFile": typing.Type[RequiredFile], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "requiredFile", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "additionalMetadata", - }) - - def __new__( - cls, - *, - requiredFile: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - additionalMetadata: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "requiredFile": requiredFile, - } - for key_, val in ( - ("additionalMetadata", additionalMetadata), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def requiredFile(self) -> typing.Union[bytes, schemas.FileIO]: - return typing.cast( - typing.Union[bytes, schemas.FileIO], - self.__getitem__("requiredFile") - ) - - @property - def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: - val = self.get("additionalMetadata", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "requiredFile", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py deleted file mode 100644 index 7b75d37c85f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.api_response.ApiResponseDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d3dc5adb905..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import api_response -Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py deleted file mode 100644 index 7dae1fb1aa5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType - -path = "/fake/queryParamWithJsonContentType" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py deleted file mode 100644 index 889f6b04342..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py +++ /dev/null @@ -1,144 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import parameter_0 -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_param_with_json_content_type( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _query_param_with_json_content_type( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _query_param_with_json_content_type( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - query param with json content-type - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class QueryParamWithJsonContentType(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - query_param_with_json_content_type = BaseApi._query_param_with_json_content_type - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._query_param_with_json_content_type diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py deleted file mode 100644 index cabb63456ce..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class Parameter0(api_client.QueryParameter): - name = "someParam" - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py deleted file mode 100644 index 9f3583d942e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.fake_query_param_with_json_content_type.get.parameters.parameter_0.content.application_json import schema -Properties = typing.TypedDict( - 'Properties', - { - "someParam": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "someParam", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - someParam: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "someParam": someParam, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def someParam(self) -> schemas.OUTPUT_BASE_TYPES: - return self.__getitem__("someParam") -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "someParam": typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "someParam", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py deleted file mode 100644 index a917d6801dd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_redirection import FakeRedirection - -path = "/fake/redirection" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py deleted file mode 100644 index 23671668525..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/operation.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_303, - response_3xx, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '303': typing.Type[response_303.ResponseFor303], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '303': response_303.ResponseFor303, -} -__RangedStatusCodeToResponse = typing.TypedDict( - '__RangedStatusCodeToResponse', - { - '3': typing.Type[response_3xx.ResponseFor3XX], - } -) -_ranged_status_code_to_response: __RangedStatusCodeToResponse = { - '3': response_3xx.ResponseFor3XX, -} -_non_error_status_codes = frozenset({ - '303', -}) -_non_error_ranged_status_codes = frozenset({ - '3', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _redirection( - self, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> typing.Union[ - response_3xx.ApiResponse, - response_303.ApiResponse, - ]: ... - - @typing.overload - def _redirection( - self, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _redirection( - self, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - operation with redirection responses - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '303', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - ranged_response_status_code = str(raw_response.status)[0] - if ranged_response_status_code in _non_error_ranged_status_codes: - ranged_status_code = typing.cast( - typing.Literal[ - '3', - ], - ranged_response_status_code - ) - return _ranged_status_code_to_response[ranged_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class Redirection(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - redirection = BaseApi._redirection - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._redirection diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py deleted file mode 100644 index 8078c7de794..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor303(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py deleted file mode 100644 index 2e094cea7ae..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor3XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py deleted file mode 100644 index 0a75e663aae..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_ref_obj_in_query import FakeRefObjInQuery - -path = "/fake/refObjInQuery" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py deleted file mode 100644 index 118a305d662..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import parameter_0 -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _ref_object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _ref_object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _ref_object_in_query( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - if query_params is not None: - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class RefObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - ref_object_in_query = BaseApi._ref_object_in_query - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._ref_object_in_query diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 11281fbe42d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "mapBean" - style=api_client.ParameterStyle.DEEP_OBJECT - schema: typing_extensions.TypeAlias = schema.Schema - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py deleted file mode 100644 index 153544eaf8e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import foo -Schema: typing_extensions.TypeAlias = foo.Foo diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py deleted file mode 100644 index 1dac16b0313..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.schema import foo -Properties = typing.TypedDict( - 'Properties', - { - "mapBean": typing.Type[foo.Foo], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, foo.FooDict]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "mapBean", - }) - - def __new__( - cls, - *, - mapBean: typing.Union[ - foo.FooDictInput, - foo.FooDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("mapBean", mapBean), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def mapBean(self) -> typing.Union[foo.FooDict, schemas.Unset]: - val = self.get("mapBean", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "mapBean": typing.Union[ - foo.FooDictInput, - foo.FooDict, - ], - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py deleted file mode 100644 index a99368bff5c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_array_of_enums import FakeRefsArrayOfEnums - -path = "/fake/refs/array-of-enums" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py deleted file mode 100644 index 3757529b998..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_of_enums - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_of_enums( - self, - body: typing.Union[ - array_of_enums.ArrayOfEnumsTupleInput, - array_of_enums.ArrayOfEnumsTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _array_of_enums( - self, - body: typing.Union[ - array_of_enums.ArrayOfEnumsTupleInput, - array_of_enums.ArrayOfEnumsTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _array_of_enums( - self, - body: typing.Union[ - array_of_enums.ArrayOfEnumsTupleInput, - array_of_enums.ArrayOfEnumsTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - array_of_enums = BaseApi._array_of_enums - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._array_of_enums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py deleted file mode 100644 index f8a5babef80..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_of_enums -Schema: typing_extensions.TypeAlias = array_of_enums.ArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py deleted file mode 100644 index 93cd34f9bc8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.array_of_enums.ArrayOfEnumsTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index f8a5babef80..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import array_of_enums -Schema: typing_extensions.TypeAlias = array_of_enums.ArrayOfEnums diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py deleted file mode 100644 index c8ee0b34c4a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_arraymodel import FakeRefsArraymodel - -path = "/fake/refs/arraymodel" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py deleted file mode 100644 index 316488c7f81..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/operation.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import animal_farm - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_model( - self, - body: typing.Union[ - animal_farm.AnimalFarmTupleInput, - animal_farm.AnimalFarmTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _array_model( - self, - body: typing.Union[ - animal_farm.AnimalFarmTupleInput, - animal_farm.AnimalFarmTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _array_model( - self, - body: typing.Union[ - animal_farm.AnimalFarmTupleInput, - animal_farm.AnimalFarmTuple, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ArrayModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - array_model = BaseApi._array_model - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._array_model diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py deleted file mode 100644 index 604d22170f5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import animal_farm -Schema: typing_extensions.TypeAlias = animal_farm.AnimalFarm diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py deleted file mode 100644 index 5a41ab3a7f9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.animal_farm.AnimalFarmTuple - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 604d22170f5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import animal_farm -Schema: typing_extensions.TypeAlias = animal_farm.AnimalFarm diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py deleted file mode 100644 index 82a55f25888..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_boolean import FakeRefsBoolean - -path = "/fake/refs/boolean" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py deleted file mode 100644 index 9400a38b0f5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/operation.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _boolean( - self, - body: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _boolean( - self, - body: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _boolean( - self, - body: typing.Union[ - bool, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class Boolean(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - boolean = BaseApi._boolean - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py deleted file mode 100644 index 03bad95ad24..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean -Schema: typing_extensions.TypeAlias = boolean.Boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py deleted file mode 100644 index 11ef550d513..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: bool - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 03bad95ad24..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import boolean -Schema: typing_extensions.TypeAlias = boolean.Boolean diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py deleted file mode 100644 index 6db2f53aa48..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_composed_one_of_number_with_validations import FakeRefsComposedOneOfNumberWithValidations - -path = "/fake/refs/composed_one_of_number_with_validations" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py deleted file mode 100644 index fa14dfd5b97..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import composed_one_of_different_types - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _composed_one_of_different_types( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _composed_one_of_different_types( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _composed_one_of_different_types( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ComposedOneOfDifferentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - composed_one_of_different_types = BaseApi._composed_one_of_different_types - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._composed_one_of_different_types diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py deleted file mode 100644 index 1fdda306d7e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import composed_one_of_different_types -Schema: typing_extensions.TypeAlias = composed_one_of_different_types.ComposedOneOfDifferentTypes diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 1fdda306d7e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import composed_one_of_different_types -Schema: typing_extensions.TypeAlias = composed_one_of_different_types.ComposedOneOfDifferentTypes diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py deleted file mode 100644 index 207ae9a7bc3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_enum import FakeRefsEnum - -path = "/fake/refs/enum" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py deleted file mode 100644 index 0df44787245..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/operation.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_enum - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string_enum( - self, - body: typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _string_enum( - self, - body: typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _string_enum( - self, - body: typing.Union[ - None, - typing.Literal[ - "placed", - "approved", - "delivered", - "single quoted", - "multiple\nlines", - "double quote \n with newline" - ], - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class StringEnum(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - string_enum = BaseApi._string_enum - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._string_enum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8cebf7e115a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_enum -Schema: typing_extensions.TypeAlias = string_enum.StringEnum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py deleted file mode 100644 index 03d0d4590a8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - None, - typing.Literal["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline"], - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8cebf7e115a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_enum -Schema: typing_extensions.TypeAlias = string_enum.StringEnum diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py deleted file mode 100644 index 1ed561eab88..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_mammal import FakeRefsMammal - -path = "/fake/refs/mammal" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py deleted file mode 100644 index 1e541aeecca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/operation.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mammal - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mammal( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _mammal( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _mammal( - self, - body: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class Mammal(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - mammal = BaseApi._mammal - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9b391a51f3a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mammal -Schema: typing_extensions.TypeAlias = mammal.Mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9b391a51f3a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import mammal -Schema: typing_extensions.TypeAlias = mammal.Mammal diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py deleted file mode 100644 index f9bb209fd19..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_number import FakeRefsNumber - -path = "/fake/refs/number" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py deleted file mode 100644 index 0f495897036..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/operation.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_with_validations - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _number_with_validations( - self, - body: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _number_with_validations( - self, - body: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _number_with_validations( - self, - body: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class NumberWithValidations(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - number_with_validations = BaseApi._number_with_validations - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._number_with_validations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py deleted file mode 100644 index 9033322743d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_with_validations -Schema: typing_extensions.TypeAlias = number_with_validations.NumberWithValidations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py deleted file mode 100644 index 40210f5f787..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[int, float] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 9033322743d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import number_with_validations -Schema: typing_extensions.TypeAlias = number_with_validations.NumberWithValidations diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py deleted file mode 100644 index a4d319c6991..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_object_model_with_ref_props import FakeRefsObjectModelWithRefProps - -path = "/fake/refs/object_model_with_ref_props" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py deleted file mode 100644 index 05066e03396..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_model_with_ref_props - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_model_with_ref_props( - self, - body: typing.Union[ - object_model_with_ref_props.ObjectModelWithRefPropsDictInput, - object_model_with_ref_props.ObjectModelWithRefPropsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _object_model_with_ref_props( - self, - body: typing.Union[ - object_model_with_ref_props.ObjectModelWithRefPropsDictInput, - object_model_with_ref_props.ObjectModelWithRefPropsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _object_model_with_ref_props( - self, - body: typing.Union[ - object_model_with_ref_props.ObjectModelWithRefPropsDictInput, - object_model_with_ref_props.ObjectModelWithRefPropsDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ObjectModelWithRefProps(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - object_model_with_ref_props = BaseApi._object_model_with_ref_props - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._object_model_with_ref_props diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py deleted file mode 100644 index 35b5b46c933..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_model_with_ref_props -Schema: typing_extensions.TypeAlias = object_model_with_ref_props.ObjectModelWithRefProps diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py deleted file mode 100644 index 14b88a94296..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.object_model_with_ref_props.ObjectModelWithRefPropsDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 35b5b46c933..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import object_model_with_ref_props -Schema: typing_extensions.TypeAlias = object_model_with_ref_props.ObjectModelWithRefProps diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py deleted file mode 100644 index ae88d57af4b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_refs_string import FakeRefsString - -path = "/fake/refs/string" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py deleted file mode 100644 index 4a80b355b21..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/operation.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _string( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _string( - self, - body: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class String(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - string = BaseApi._string - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._string diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py deleted file mode 100644 index 06b13966ce1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py deleted file mode 100644 index 7b426ea6594..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string -Schema: typing_extensions.TypeAlias = string.String diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py deleted file mode 100644 index 989e596bf91..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: str - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 7b426ea6594..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string -Schema: typing_extensions.TypeAlias = string.String diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py deleted file mode 100644 index 5c0c523c16c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema - -path = "/fake/responseWithoutSchema" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py deleted file mode 100644 index a5e0d1a6b87..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/operation.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", - "application/xml", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _response_without_schema( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _response_without_schema( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _response_without_schema( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - receives a response without schema - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class ResponseWithoutSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - response_without_schema = BaseApi._response_without_schema - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._response_without_schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py deleted file mode 100644 index 75cf69b30b8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - pass - - - class ApplicationXmlMediaType(api_client.MediaType): - pass - content = { - 'application/json': ApplicationJsonMediaType, - 'application/xml': ApplicationXmlMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py deleted file mode 100644 index c77e0b18f5b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_test_query_paramters import FakeTestQueryParamters - -path = "/fake/test-query-paramters" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py deleted file mode 100644 index 7e8a07ba44f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .parameters import ( - parameter_0, - parameter_1, - parameter_2, - parameter_3, - parameter_4, - parameter_5, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, - parameter_2.Parameter2, - parameter_3.Parameter3, - parameter_4.Parameter4, - parameter_5.Parameter5, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_parameter_collection_format( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _query_parameter_collection_format( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _query_parameter_collection_format( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='put', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class QueryParameterCollectionFormat(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - query_parameter_collection_format = BaseApi._query_parameter_collection_format - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._query_parameter_collection_format diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py deleted file mode 100644 index c84d0013bfd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "pipe" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py deleted file mode 100644 index 6a7b8bb82b3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.QueryParameter): - name = "ioutil" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py deleted file mode 100644 index 75c683b3ad2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter2(api_client.QueryParameter): - name = "http" - style = api_client.ParameterStyle.SPACE_DELIMITED - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py deleted file mode 100644 index a872b4e7a0d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter3(api_client.QueryParameter): - name = "url" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py deleted file mode 100644 index 31859f8d187..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter4(api_client.QueryParameter): - name = "context" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py deleted file mode 100644 index 73c6a47448b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter5(api_client.QueryParameter): - name = "refParam" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py deleted file mode 100644 index c85ecf13950..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import string_with_validation -Schema: typing_extensions.TypeAlias = string_with_validation.StringWithValidation diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py deleted file mode 100644 index 21676c8c099..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py +++ /dev/null @@ -1,200 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.schema import string_with_validation -from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_0 import schema as schema_4 -from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_1 import schema -from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_2 import schema as schema_3 -from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_3 import schema as schema_5 -from openapi_client.paths.fake_test_query_paramters.put.parameters.parameter_4 import schema as schema_2 -Properties = typing.TypedDict( - 'Properties', - { - "refParam": typing.Type[string_with_validation.StringWithValidation], - "ioutil": typing.Type[schema.Schema], - "context": typing.Type[schema_2.Schema], - "http": typing.Type[schema_3.Schema], - "pipe": typing.Type[schema_4.Schema], - "url": typing.Type[schema_5.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "context", - "http", - "ioutil", - "pipe", - "refParam", - "url", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - context: typing.Union[ - schema_2.SchemaTupleInput, - schema_2.SchemaTuple - ], - http: typing.Union[ - schema_3.SchemaTupleInput, - schema_3.SchemaTuple - ], - ioutil: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - pipe: typing.Union[ - schema_4.SchemaTupleInput, - schema_4.SchemaTuple - ], - refParam: str, - url: typing.Union[ - schema_5.SchemaTupleInput, - schema_5.SchemaTuple - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "context": context, - "http": http, - "ioutil": ioutil, - "pipe": pipe, - "refParam": refParam, - "url": url, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def context(self) -> schema_2.SchemaTuple: - return typing.cast( - schema_2.SchemaTuple, - self.__getitem__("context") - ) - - @property - def http(self) -> schema_3.SchemaTuple: - return typing.cast( - schema_3.SchemaTuple, - self.__getitem__("http") - ) - - @property - def ioutil(self) -> schema.SchemaTuple: - return typing.cast( - schema.SchemaTuple, - self.__getitem__("ioutil") - ) - - @property - def pipe(self) -> schema_4.SchemaTuple: - return typing.cast( - schema_4.SchemaTuple, - self.__getitem__("pipe") - ) - - @property - def refParam(self) -> str: - return typing.cast( - str, - self.__getitem__("refParam") - ) - - @property - def url(self) -> schema_5.SchemaTuple: - return typing.cast( - schema_5.SchemaTuple, - self.__getitem__("url") - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "context": typing.Union[ - schema_2.SchemaTupleInput, - schema_2.SchemaTuple - ], - "http": typing.Union[ - schema_3.SchemaTupleInput, - schema_3.SchemaTuple - ], - "ioutil": typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - "pipe": typing.Union[ - schema_4.SchemaTupleInput, - schema_4.SchemaTuple - ], - "refParam": str, - "url": typing.Union[ - schema_5.SchemaTupleInput, - schema_5.SchemaTuple - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "context", - "http", - "ioutil", - "pipe", - "refParam", - "url", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py deleted file mode 100644 index 66a4e102c1e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_upload_download_file import FakeUploadDownloadFile - -path = "/fake/uploadDownloadFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py deleted file mode 100644 index eedc7f7f406..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/operation.py +++ /dev/null @@ -1,149 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_upload_download_file.post.request_body.content.application_octet_stream import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/octet-stream", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_download_file( - self, - body: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _upload_download_file( - self, - body: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _upload_download_file( - self, - body: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/octet-stream"] = "application/octet-stream", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - uploads a file and downloads a file using application/octet-stream - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UploadDownloadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - upload_download_file = BaseApi._upload_download_file - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._upload_download_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py deleted file mode 100644 index 6718046a9bf..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_octet_stream import schema as application_octet_stream_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationOctetStreamMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_octet_stream_schema.Schema - content = { - 'application/octet-stream': ApplicationOctetStreamMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py deleted file mode 100644 index d74b5d7ff57..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.BinarySchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py deleted file mode 100644 index d47f3fd53b8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_octet_stream import schema as application_octet_stream_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[bytes, schemas.FileIO] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationOctetStreamMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_octet_stream_schema.Schema - content = { - 'application/octet-stream': ApplicationOctetStreamMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py deleted file mode 100644 index d74b5d7ff57..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.BinarySchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py deleted file mode 100644 index 5276fc2136f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_upload_file import FakeUploadFile - -path = "/fake/uploadFile" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py deleted file mode 100644 index 17610b2a730..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_upload_file.post.request_body.content.multipart_form_data import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _upload_file( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _upload_file( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - uploads a file using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UploadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - upload_file = BaseApi._upload_file - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._upload_file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py deleted file mode 100644 index fa0a08ad486..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index cc0ef23f4ae..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema -File: typing_extensions.TypeAlias = schemas.BinarySchema -Properties = typing.TypedDict( - 'Properties', - { - "additionalMetadata": typing.Type[AdditionalMetadata], - "file": typing.Type[File], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "file", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "additionalMetadata", - }) - - def __new__( - cls, - *, - file: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - additionalMetadata: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = { - "file": file, - } - for key_, val in ( - ("additionalMetadata", additionalMetadata), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def file(self) -> typing.Union[bytes, schemas.FileIO]: - return typing.cast( - typing.Union[bytes, schemas.FileIO], - self.__getitem__("file") - ) - - @property - def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: - val = self.get("additionalMetadata", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "file", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py deleted file mode 100644 index 7b75d37c85f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.api_response.ApiResponseDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d3dc5adb905..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import api_response -Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py deleted file mode 100644 index 240977634b3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_upload_files import FakeUploadFiles - -path = "/fake/uploadFiles" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py deleted file mode 100644 index b9ba2c65542..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/operation.py +++ /dev/null @@ -1,146 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.fake_upload_files.post.request_body.content.multipart_form_data import schema - -from .. import path -from .responses import response_200 -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_files( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _upload_files( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _upload_files( - self, - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - uploads files using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UploadFiles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - upload_files = BaseApi._upload_files - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._upload_files diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py deleted file mode 100644 index fa0a08ad486..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index 4b136291e17..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.BinarySchema - - -class FilesTuple( - typing.Tuple[ - typing.Union[bytes, schemas.FileIO], - ... - ] -): - - def __new__(cls, arg: typing.Union[FilesTupleInput, FilesTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Files.validate(arg, configuration=configuration) -FilesTupleInput = typing.Union[ - typing.List[ - typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - ], - typing.Tuple[ - typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Files( - schemas.Schema[schemas.immutabledict, FilesTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: FilesTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - FilesTupleInput, - FilesTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FilesTuple: - return super().validate_base( - arg, - configuration=configuration, - ) -Properties = typing.TypedDict( - 'Properties', - { - "files": typing.Type[Files], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "files", - }) - - def __new__( - cls, - *, - files: typing.Union[ - FilesTupleInput, - FilesTuple, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("files", files), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def files(self) -> typing.Union[FilesTuple, schemas.Unset]: - val = self.get("files", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - FilesTuple, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py deleted file mode 100644 index 7b75d37c85f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.api_response.ApiResponseDict - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index d3dc5adb905..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import api_response -Schema: typing_extensions.TypeAlias = api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py deleted file mode 100644 index 431fc7d5367..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.fake_wild_card_responses import FakeWildCardResponses - -path = "/fake/wildCardResponses" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py deleted file mode 100644 index 2673117ca9d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/operation.py +++ /dev/null @@ -1,183 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_1xx, - response_200, - response_2xx, - response_3xx, - response_4xx, - response_5xx, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -__RangedStatusCodeToResponse = typing.TypedDict( - '__RangedStatusCodeToResponse', - { - '1': typing.Type[response_1xx.ResponseFor1XX], - '2': typing.Type[response_2xx.ResponseFor2XX], - '3': typing.Type[response_3xx.ResponseFor3XX], - '4': typing.Type[response_4xx.ResponseFor4XX], - '5': typing.Type[response_5xx.ResponseFor5XX], - } -) -_ranged_status_code_to_response: __RangedStatusCodeToResponse = { - '1': response_1xx.ResponseFor1XX, - '2': response_2xx.ResponseFor2XX, - '3': response_3xx.ResponseFor3XX, - '4': response_4xx.ResponseFor4XX, - '5': response_5xx.ResponseFor5XX, -} -_non_error_status_codes = frozenset({ - '200', -}) -_non_error_ranged_status_codes = frozenset({ - '1', - '2', - '3', -}) -_error_ranged_status_codes = frozenset({ - '4', - '5', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _wild_card_responses( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> typing.Union[ - response_1xx.ApiResponse, - response_2xx.ApiResponse, - response_200.ApiResponse, - response_3xx.ApiResponse, - ]: ... - - @typing.overload - def _wild_card_responses( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _wild_card_responses( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - operation with wildcard responses - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - ranged_response_status_code = str(raw_response.status)[0] - if ranged_response_status_code in _non_error_ranged_status_codes: - ranged_status_code = typing.cast( - typing.Literal[ - '1', - '2', - '3', - ], - ranged_response_status_code - ) - return _ranged_status_code_to_response[ranged_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif ranged_response_status_code in _error_ranged_status_codes: - error_ranged_status_code = typing.cast( - typing.Literal[ - '4', - '5', - ], - ranged_response_status_code - ) - error_response = _ranged_status_code_to_response[error_ranged_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class WildCardResponses(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - wild_card_responses = BaseApi._wild_card_responses - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._wild_card_responses diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py deleted file mode 100644 index 11f39de18a8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor1XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py deleted file mode 100644 index e4ea548bd7a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py deleted file mode 100644 index 4a136b298a1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor2XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py deleted file mode 100644 index f1b797b6e21..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor3XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py deleted file mode 100644 index 29f652d1862..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor4XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py deleted file mode 100644 index 012d45c5b79..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.OUTPUT_BASE_TYPES - headers: schemas.Unset - - -class ResponseFor5XX(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py deleted file mode 100644 index 3d5eb99c3ed..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.AnyTypeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py deleted file mode 100644 index 7251b5d50b8..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.foo import Foo - -path = "/foo" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py deleted file mode 100644 index 827f212e40c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/get/operation.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_default - - -default_response = response_default.Default - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _foo_get( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_default.ApiResponse: ... - - @typing.overload - def _foo_get( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _foo_get( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "paths//foo/get/servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class FooGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - foo_get = BaseApi._foo_get - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._foo_get diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py deleted file mode 100644 index 08ea7ee51a4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: application_json_schema.SchemaDict - headers: schemas.Unset - - -class Default(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py deleted file mode 100644 index d14d6424f11..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -from openapi_client.components.schema import foo -Properties = typing.TypedDict( - 'Properties', - { - "string": typing.Type[foo.Foo], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "string", - }) - - def __new__( - cls, - *, - string: typing.Union[ - foo.FooDictInput, - foo.FooDict, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("string", string), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def string(self) -> typing.Union[foo.FooDict, schemas.Unset]: - val = self.get("string", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - foo.FooDict, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py deleted file mode 100644 index c6566a153aa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "https://path-server-test.petstore.local/v2" diff --git a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py deleted file mode 100644 index 66ca05135b9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/foo/get/servers/server_1.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -class VersionEnums: - - @schemas.classproperty - def V1(cls) -> typing.Literal["v1"]: - return Version.validate("v1") - - @schemas.classproperty - def V2(cls) -> typing.Literal["v2"]: - return Version.validate("v2") - - -@dataclasses.dataclass(frozen=True) -class Version( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["v1"] = "v1" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "v1": "V1", - "v2": "V2", - } - ) - enums = VersionEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v1"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v2"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v2"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1","v2",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "v1", - "v2", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "v1", - "v2", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "version": typing.Type[Version], - } -) - - -class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "version", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - version: typing.Literal[ - "v1", - "v2" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "version": version, - } - used_arg_ = typing.cast(VariablesDictInput, arg_) - return Variables.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - VariablesDictInput, - VariablesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return Variables.validate(arg, configuration=configuration) - - @property - def version(self) -> typing.Literal["v1", "v2"]: - return self.__getitem__("version") -VariablesDictInput = typing.TypedDict( - 'VariablesDictInput', - { - "version": typing.Literal[ - "v1", - "v2" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class Variables( - schemas.Schema[VariablesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "version", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: VariablesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - VariablesDictInput, - VariablesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass -class Server1(server.ServerWithVariables): - variables: VariablesDict = dataclasses.field( - default_factory=lambda: Variables.validate({ - "version": Version.default, - }) - ) - variables_schema: typing.Type[Variables] = Variables - _url: str = "https://petstore.swagger.io/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py deleted file mode 100644 index e5de8990bb7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.pet import Pet - -path = "/pet" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py deleted file mode 100644 index 520cbec342f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/operation.py +++ /dev/null @@ -1,219 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pet - -from .. import path -from .responses import ( - response_200, - response_405, -) -from . import request_body -from .security import ( - security_requirement_object_0, - security_requirement_object_1, - security_requirement_object_2, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, - security_requirement_object_2.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '405': typing.Type[response_405.ResponseFor405], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '405': response_405.ResponseFor405, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '405', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _add_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/xml"], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _add_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/xml"], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _add_pet( - self, - body: typing.Union[ - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal[ - "application/json", - "application/xml", - ] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Add a new pet to the store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/post/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '405', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class AddPet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - add_pet = BaseApi._add_pet - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._add_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py deleted file mode 100644 index 52220997dba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_pet -RequestBody = request_body_pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py deleted file mode 100644 index 5e341f81217..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/responses/response_405/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py deleted file mode 100644 index 9afd8ea15a6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_signature_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/post/security/security_requirement_object_2.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py deleted file mode 100644 index 6010c5c7879..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/operation.py +++ /dev/null @@ -1,210 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pet - -from .. import path -from .responses import ( - response_400, - response_404, - response_405, -) -from . import request_body -from .security import ( - security_requirement_object_0, - security_requirement_object_1, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - '405': typing.Type[response_405.ResponseFor405], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, - '405': response_405.ResponseFor405, -} -_error_status_codes = frozenset({ - '400', - '404', - '405', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/xml"], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet( - self, - body: typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/xml"], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _update_pet( - self, - body: typing.Union[ - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - typing.Union[ - pet.PetDictInput, - pet.PetDict, - ], - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal[ - "application/json", - "application/xml", - ] = "application/json", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Update an existing pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/put/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='put', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - '405', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UpdatePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - update_pet = BaseApi._update_pet - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._update_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py deleted file mode 100644 index 52220997dba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_pet -RequestBody = request_body_pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py deleted file mode 100644 index 5e341f81217..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/responses/response_405/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py deleted file mode 100644 index 9afd8ea15a6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_signature_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet/put/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py deleted file mode 100644 index b340004d90c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.pet_find_by_status import PetFindByStatus - -path = "/pet/findByStatus" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py deleted file mode 100644 index ed30321fbc9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/operation.py +++ /dev/null @@ -1,187 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, -) -from .parameters import parameter_0 -from .security import ( - security_requirement_object_0, - security_requirement_object_1, - security_requirement_object_2, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, - security_requirement_object_2.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_status( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _find_pets_by_status( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _find_pets_by_status( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Finds Pets by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "paths//pet/findByStatus/servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/findByStatus/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class FindPetsByStatus(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - find_pets_by_status = BaseApi._find_pets_by_status - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._find_pets_by_status diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 7f02a842cef..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "status" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py deleted file mode 100644 index 6110790eb7e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,153 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -class ItemsEnums: - - @schemas.classproperty - def AVAILABLE(cls) -> typing.Literal["available"]: - return Items.validate("available") - - @schemas.classproperty - def PENDING(cls) -> typing.Literal["pending"]: - return Items.validate("pending") - - @schemas.classproperty - def SOLD(cls) -> typing.Literal["sold"]: - return Items.validate("sold") - - -@dataclasses.dataclass(frozen=True) -class Items( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["available"] = "available" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "available": "AVAILABLE", - "pending": "PENDING", - "sold": "SOLD", - } - ) - enums = ItemsEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["available"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["available"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["pending"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["pending"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["sold"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["sold"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["available","pending","sold",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "available", - "pending", - "sold", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "available", - "pending", - "sold", - ], - validated_arg - ) - - -class SchemaTuple( - typing.Tuple[ - typing.Literal["available", "pending", "sold"], - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - typing.Literal[ - "available", - "pending", - "sold" - ], - ], - typing.Tuple[ - typing.Literal[ - "available", - "pending", - "sold" - ], - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py deleted file mode 100644 index 63ecd32e0d2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/query_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_find_by_status.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "status": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schema.SchemaTuple]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "status", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - status: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "status": status, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def status(self) -> schema.SchemaTuple: - return self.__getitem__("status") -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "status": typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "status", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py deleted file mode 100644 index ba2d7a3d526..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_successful_xml_and_json_array_of_pet -ResponseFor200 = response_successful_xml_and_json_array_of_pet.SuccessfulXmlAndJsonArrayOfPet -ApiResponse = response_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py deleted file mode 100644 index 9afd8ea15a6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_signature_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py deleted file mode 100644 index c6566a153aa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server0(server.ServerWithoutVariables): - url: str = "https://path-server-test.petstore.local/v2" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py deleted file mode 100644 index 66ca05135b9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_status/servers/server_1.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -class VersionEnums: - - @schemas.classproperty - def V1(cls) -> typing.Literal["v1"]: - return Version.validate("v1") - - @schemas.classproperty - def V2(cls) -> typing.Literal["v2"]: - return Version.validate("v2") - - -@dataclasses.dataclass(frozen=True) -class Version( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["v1"] = "v1" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "v1": "V1", - "v2": "V2", - } - ) - enums = VersionEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v1"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v2"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v2"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1","v2",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "v1", - "v2", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "v1", - "v2", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "version": typing.Type[Version], - } -) - - -class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "version", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - version: typing.Literal[ - "v1", - "v2" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "version": version, - } - used_arg_ = typing.cast(VariablesDictInput, arg_) - return Variables.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - VariablesDictInput, - VariablesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return Variables.validate(arg, configuration=configuration) - - @property - def version(self) -> typing.Literal["v1", "v2"]: - return self.__getitem__("version") -VariablesDictInput = typing.TypedDict( - 'VariablesDictInput', - { - "version": typing.Literal[ - "v1", - "v2" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class Variables( - schemas.Schema[VariablesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "version", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: VariablesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - VariablesDictInput, - VariablesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass -class Server1(server.ServerWithVariables): - variables: VariablesDict = dataclasses.field( - default_factory=lambda: Variables.validate({ - "version": Version.default, - }) - ) - variables_schema: typing.Type[Variables] = Variables - _url: str = "https://petstore.swagger.io/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py deleted file mode 100644 index d4ab183cc4b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.pet_find_by_tags import PetFindByTags - -path = "/pet/findByTags" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py deleted file mode 100644 index 81d1ce2a76d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/operation.py +++ /dev/null @@ -1,175 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, -) -from .parameters import parameter_0 -from .security import ( - security_requirement_object_0, - security_requirement_object_1, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_tags( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _find_pets_by_tags( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _find_pets_by_tags( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Finds Pets by tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/findByTags/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class FindPetsByTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - find_pets_by_tags = BaseApi._find_pets_by_tags - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._find_pets_by_tags diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py deleted file mode 100644 index b4188fc1042..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "tags" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py deleted file mode 100644 index 66c900f298b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Items: typing_extensions.TypeAlias = schemas.StrSchema - - -class SchemaTuple( - typing.Tuple[ - str, - ... - ] -): - - def __new__(cls, arg: typing.Union[SchemaTupleInput, SchemaTuple], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None): - return Schema.validate(arg, configuration=configuration) -SchemaTupleInput = typing.Union[ - typing.List[ - str, - ], - typing.Tuple[ - str, - ... - ] -] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[schemas.immutabledict, SchemaTuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - items: typing.Type[Items] = dataclasses.field(default_factory=lambda: Items) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - tuple: SchemaTuple - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaTupleInput, - SchemaTuple, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaTuple: - return super().validate_base( - arg, - configuration=configuration, - ) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py deleted file mode 100644 index d1b70043f84..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_find_by_tags.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "tags": typing.Type[schema.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schema.SchemaTuple]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "tags", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - tags: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "tags": tags, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def tags(self) -> schema.SchemaTuple: - return self.__getitem__("tags") -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "tags": typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "tags", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py deleted file mode 100644 index d4ebce99525..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_ref_successful_xml_and_json_array_of_pet -ResponseFor200 = response_ref_successful_xml_and_json_array_of_pet.RefSuccessfulXmlAndJsonArrayOfPet -ApiResponse = response_ref_successful_xml_and_json_array_of_pet.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py deleted file mode 100644 index 9afd8ea15a6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "http_signature_test": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py deleted file mode 100644 index 34d43d091bc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.pet_pet_id import PetPetId - -path = "/pet/{petId}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py deleted file mode 100644 index 441b8c75b13..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/header_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_pet_id.delete.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "api_key": typing.Type[schema.Schema], - } -) - - -class HeaderParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "api_key", - }) - - def __new__( - cls, - *, - api_key: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("api_key", api_key), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeaderParametersDictInput, arg_) - return HeaderParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return HeaderParameters.validate(arg, configuration=configuration) - - @property - def api_key(self) -> typing.Union[str, schemas.Unset]: - val = self.get("api_key", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val -HeaderParametersDictInput = typing.TypedDict( - 'HeaderParametersDictInput', - { - "api_key": str, - }, - total=False -) - - -@dataclasses.dataclass(frozen=True) -class HeaderParameters( - schemas.Schema[HeaderParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeaderParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeaderParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py deleted file mode 100644 index ded25f1c460..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/operation.py +++ /dev/null @@ -1,189 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_400 -from .parameters import ( - parameter_0, - parameter_1, -) -from .security import ( - security_requirement_object_0, - security_requirement_object_1, -) -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -from .header_parameters import HeaderParameters, HeaderParametersDictInput, HeaderParametersDict -header_parameter_classes = ( - parameter_0.Parameter0, -) -path_parameter_classes = ( - parameter_1.Parameter1, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '400': typing.Type[response_400.ResponseFor400], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '400': response_400.ResponseFor400, -} -_error_status_codes = frozenset({ - '400', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_pet( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[False] = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_pet( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: typing.Literal[True], - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _delete_pet( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - header_params: typing.Union[ - HeaderParametersDictInput, - HeaderParametersDict, - None - ] = None, - *, - skip_deserialization: bool = False, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Deletes a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - if header_params is not None: - header_params = HeaderParameters.validate( - header_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers( - header_parameters=header_parameter_classes, - header_params=header_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/{petId}/delete/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='delete', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class DeletePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - delete_pet = BaseApi._delete_pet - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._delete_pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 5f79a5e5fa6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.HeaderParameter): - name = "api_key" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py deleted file mode 100644 index 487a9f61b1c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.PathParameter): - name = "petId" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py deleted file mode 100644 index 3fd1346af72..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_pet_id.delete.parameters.parameter_1 import schema -Properties = typing.TypedDict( - 'Properties', - { - "petId": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - petId: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "petId": petId, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def petId(self) -> int: - return self.__getitem__("petId") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "petId": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "petId", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py deleted file mode 100644 index e57d8d4bff2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/operation.py +++ /dev/null @@ -1,185 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, - response_404, -) -from .parameters import parameter_0 -from .security import security_requirement_object_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', - '404', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_pet_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _get_pet_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _get_pet_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Find pet by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/{petId}/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GetPetById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - get_pet_by_id = BaseApi._get_pet_by_id - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._get_pet_by_id diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 18d9059d05f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "petId" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py deleted file mode 100644 index 19aa79641ab..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_pet_id.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "petId": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - petId: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "petId": petId, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def petId(self) -> int: - return self.__getitem__("petId") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "petId": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "petId", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py deleted file mode 100644 index b5e5fb46352..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - application_xml_schema.pet.PetDict, - application_json_schema.ref_pet.pet.PetDict, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 926c64496e4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import ref_pet -Schema: typing_extensions.TypeAlias = ref_pet.RefPet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py deleted file mode 100644 index 0259ab108b6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import pet -Schema: typing_extensions.TypeAlias = pet.Pet diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py deleted file mode 100644 index ef47cc2b309..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/operation.py +++ /dev/null @@ -1,187 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.pet_pet_id.post.request_body.content.application_x_www_form_urlencoded import schema - -from .. import path -from .responses import response_405 -from . import request_body -from .parameters import parameter_0 -from .security import ( - security_requirement_object_0, - security_requirement_object_1, -) -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, - security_requirement_object_1.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '405': typing.Type[response_405.ResponseFor405], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '405': response_405.ResponseFor405, -} -_error_status_codes = frozenset({ - '405', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet_with_form( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _update_pet_with_form( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Updates a pet in the store with form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/{petId}/post/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '405', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UpdatePetWithForm(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - update_pet_with_form = BaseApi._update_pet_with_form - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._update_pet_with_form diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py deleted file mode 100644 index 18d9059d05f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "petId" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py deleted file mode 100644 index 9ea4fc9d889..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_pet_id.post.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "petId": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - petId: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "petId": petId, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def petId(self) -> int: - return self.__getitem__("petId") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "petId": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "petId", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py deleted file mode 100644 index 04c6511e057..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_x_www_form_urlencoded import schema as application_x_www_form_urlencoded_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema - content = { - 'application/x-www-form-urlencoded': ApplicationXWwwFormUrlencodedMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py deleted file mode 100644 index 5b00655e45b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Name: typing_extensions.TypeAlias = schemas.StrSchema -Status: typing_extensions.TypeAlias = schemas.StrSchema -Properties = typing.TypedDict( - 'Properties', - { - "name": typing.Type[Name], - "status": typing.Type[Status], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "name", - "status", - }) - - def __new__( - cls, - *, - name: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - status: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("name", name), - ("status", status), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def name(self) -> typing.Union[str, schemas.Unset]: - val = self.get("name", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def status(self) -> typing.Union[str, schemas.Unset]: - val = self.get("status", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py deleted file mode 100644 index 5e341f81217..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor405(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py deleted file mode 100644 index 8ae329f0324..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.pet_pet_id_upload_image import PetPetIdUploadImage - -path = "/pet/{petId}/uploadImage" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py deleted file mode 100644 index 373fd0298e4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py +++ /dev/null @@ -1,186 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.paths.pet_pet_id_upload_image.post.request_body.content.multipart_form_data import schema - -from .. import path -from .responses import response_200 -from . import request_body -from .parameters import parameter_0 -from .security import security_requirement_object_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_image( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _upload_image( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _upload_image( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - body: typing.Union[ - schema.SchemaDictInput, - schema.SchemaDict, - schemas.Unset - ] = schemas.unset, - *, - skip_deserialization: bool = False, - content_type: typing.Literal["multipart/form-data"] = "multipart/form-data", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - uploads an image - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//pet/{petId}/uploadImage/post/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UploadImage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - upload_image = BaseApi._upload_image - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._upload_image diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py deleted file mode 100644 index 18d9059d05f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "petId" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py deleted file mode 100644 index 17a29526207..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int64Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py deleted file mode 100644 index 45dffab9e4f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.pet_pet_id_upload_image.post.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "petId": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "petId", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - petId: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "petId": petId, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def petId(self) -> int: - return self.__getitem__("petId") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "petId": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "petId", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py deleted file mode 100644 index fa0a08ad486..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.multipart_form_data import schema as multipart_form_data_schema - - -class RequestBody(api_client.RequestBody): - - - class MultipartFormDataMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema - content = { - 'multipart/form-data': MultipartFormDataMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py deleted file mode 100644 index 7fb449f5fc9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalMetadata: typing_extensions.TypeAlias = schemas.StrSchema -File: typing_extensions.TypeAlias = schemas.BinarySchema -Properties = typing.TypedDict( - 'Properties', - { - "additionalMetadata": typing.Type[AdditionalMetadata], - "file": typing.Type[File], - } -) - - -class SchemaDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "additionalMetadata", - "file", - }) - - def __new__( - cls, - *, - additionalMetadata: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - file: typing.Union[ - bytes, - io.FileIO, - io.BufferedReader, - schemas.FileIO, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("additionalMetadata", additionalMetadata), - ("file", file), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(SchemaDictInput, arg_) - return Schema.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - SchemaDictInput, - SchemaDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return Schema.validate(arg, configuration=configuration) - - @property - def additionalMetadata(self) -> typing.Union[str, schemas.Unset]: - val = self.get("additionalMetadata", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def file(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: - val = self.get("file", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[bytes, schemas.FileIO], - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -SchemaDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Schema[SchemaDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: SchemaDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - SchemaDictInput, - SchemaDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> SchemaDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py deleted file mode 100644 index eb192348132..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_with_json_api_response -ResponseFor200 = response_success_with_json_api_response.SuccessWithJsonApiResponse -ApiResponse = response_success_with_json_api_response.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py deleted file mode 100644 index 6af76077f7b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "petstore_auth": ("write:pets", "read:pets", ), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py deleted file mode 100644 index 9e8e8e030e1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/solidus/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.solidus import Solidus - -path = "/" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py deleted file mode 100644 index 213c4a75ad9..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/operation.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _slash_route( - self, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _slash_route( - self, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _slash_route( - self, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - slash route - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class SlashRoute(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - slash_route = BaseApi._slash_route - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._slash_route diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/solidus/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py deleted file mode 100644 index 4cba3f3a269..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.store_inventory import StoreInventory - -path = "/store/inventory" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py deleted file mode 100644 index 9bd7fe0dced..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/operation.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, security_schemes -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_200 -from .security import security_requirement_object_0 - -_security: typing.List[security_schemes.SecurityRequirementObject] = [ - security_requirement_object_0.security_requirement_object, -] - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, -} -_non_error_status_codes = frozenset({ - '200', -}) - -_all_accept_content_types = ( - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_inventory( - self, - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _get_inventory( - self, - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _get_inventory( - self, - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Returns pet inventories by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - security_requirement_object = self.api_client.configuration.get_security_requirement_object( - "paths//store/inventory/get/security", - _security, - security_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - security_requirement_object=security_requirement_object, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GetInventory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - get_inventory = BaseApi._get_inventory - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._get_inventory diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py deleted file mode 100644 index 21f06235a37..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_inline_content_and_header -ResponseFor200 = response_success_inline_content_and_header.SuccessInlineContentAndHeader -ApiResponse = response_success_inline_content_and_header.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py b/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py deleted file mode 100644 index dddc4276ed1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import security_schemes - -security_requirement_object: security_schemes.SecurityRequirementObject = { - "api_key": (), -} diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py deleted file mode 100644 index 07b8e84f685..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.store_order import StoreOrder - -path = "/store/order" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py deleted file mode 100644 index 1d550b8e2a6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/operation.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order - -from .. import path -from .responses import ( - response_200, - response_400, -) -from . import request_body - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _place_order( - self, - body: typing.Union[ - order.OrderDictInput, - order.OrderDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _place_order( - self, - body: typing.Union[ - order.OrderDictInput, - order.OrderDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _place_order( - self, - body: typing.Union[ - order.OrderDictInput, - order.OrderDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Place an order for a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class PlaceOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - place_order = BaseApi._place_order - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._place_order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py deleted file mode 100644 index e1500eb3c2c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order -Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py deleted file mode 100644 index 4c3ac2eaab3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - application_xml_schema.order.OrderDict, - application_json_schema.order.OrderDict, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e1500eb3c2c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order -Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py deleted file mode 100644 index e1500eb3c2c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order -Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order/post/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py deleted file mode 100644 index fccb4ea5eb5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.store_order_order_id import StoreOrderOrderId - -path = "/store/order/{order_id}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py deleted file mode 100644 index e08d28b3656..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/operation.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_400, - response_404, -) -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, -} -_error_status_codes = frozenset({ - '400', - '404', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_order( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_order( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _delete_order( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Delete purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='delete', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class DeleteOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - delete_order = BaseApi._delete_order - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._delete_order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 2a9544ac7b4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "order_id" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py deleted file mode 100644 index 77e3ee024ff..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.store_order_order_id.delete.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "order_id": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "order_id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - order_id: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "order_id": order_id, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def order_id(self) -> str: - return self.__getitem__("order_id") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "order_id": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "order_id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py deleted file mode 100644 index d50b6aefcc0..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/operation.py +++ /dev/null @@ -1,171 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, - response_404, -) -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', - '404', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_order_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _get_order_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _get_order_by_id( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Find purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GetOrderById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - get_order_by_id = BaseApi._get_order_by_id - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._get_order_by_id diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 2a9544ac7b4..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.PathParameter): - name = "order_id" - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py deleted file mode 100644 index e3ca2790e60..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - - -@dataclasses.dataclass(frozen=True) -class Schema( - schemas.Int64Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - int, - }) - format: str = 'int64' - inclusive_maximum: typing.Union[int, float] = 5 - inclusive_minimum: typing.Union[int, float] = 1 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py deleted file mode 100644 index c4dd7ae0849..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.store_order_order_id.get.parameters.parameter_0 import schema -Properties = typing.TypedDict( - 'Properties', - { - "order_id": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, int]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "order_id", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - order_id: int, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "order_id": order_id, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def order_id(self) -> int: - return self.__getitem__("order_id") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "order_id": int, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "order_id", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py deleted file mode 100644 index 4c3ac2eaab3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - application_xml_schema.order.OrderDict, - application_json_schema.order.OrderDict, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e1500eb3c2c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order -Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py deleted file mode 100644 index e1500eb3c2c..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import order -Schema: typing_extensions.TypeAlias = order.Order diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py deleted file mode 100644 index 842d957d392..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user import User - -path = "/user" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py deleted file mode 100644 index c6722a378a1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user/post/operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user - -from .. import path -from .responses import response_default -from . import request_body - - -default_response = response_default.Default - - -class BaseApi(api_client.Api): - @typing.overload - def _create_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_default.ApiResponse: ... - - @typing.overload - def _create_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _create_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Create user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class CreateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - create_user = BaseApi._create_user - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._create_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py deleted file mode 100644 index 8e004303999..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user/post/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user -Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py deleted file mode 100644 index b2dbf46535b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user/post/responses/response_default/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class Default(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py deleted file mode 100644 index 3d135485dba..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user_create_with_array import UserCreateWithArray - -path = "/user/createWithArray" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py deleted file mode 100644 index d2696db9842..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.request_bodies.request_body_user_array.content.application_json import schema - -from .. import path -from .responses import response_default -from . import request_body - - -default_response = response_default.Default - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_array_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_default.ApiResponse: ... - - @typing.overload - def _create_users_with_array_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _create_users_with_array_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class CreateUsersWithArrayInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - create_users_with_array_input = BaseApi._create_users_with_array_input - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._create_users_with_array_input diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py deleted file mode 100644 index 62cc92a3c1b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_user_array -RequestBody = request_body_user_array.UserArray diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py deleted file mode 100644 index b2dbf46535b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class Default(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py deleted file mode 100644 index f7e6691eff1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user_create_with_list import UserCreateWithList - -path = "/user/createWithList" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py deleted file mode 100644 index fff0348e73b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/operation.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.request_bodies.request_body_user_array.content.application_json import schema - -from .. import path -from .responses import response_default -from . import request_body - - -default_response = response_default.Default - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_list_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_default.ApiResponse: ... - - @typing.overload - def _create_users_with_list_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _create_users_with_list_input( - self, - body: typing.Union[ - schema.SchemaTupleInput, - schema.SchemaTuple - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='post', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class CreateUsersWithListInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - create_users_with_list_input = BaseApi._create_users_with_list_input - - -class ApiForPost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - post = BaseApi._create_users_with_list_input diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py deleted file mode 100644 index d67b26e375e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.request_bodies import request_body_ref_user_array -RequestBody = request_body_ref_user_array.RefUserArray diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py deleted file mode 100644 index b2dbf46535b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class Default(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py deleted file mode 100644 index ae1e0c2ced6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user_login import UserLogin - -path = "/user/login" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py deleted file mode 100644 index 82fe9dbedb5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/operation.py +++ /dev/null @@ -1,171 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, -) -from .parameters import ( - parameter_0, - parameter_1, -) -from .query_parameters import QueryParameters, QueryParametersDictInput, QueryParametersDict -query_parameter_classes = ( - parameter_0.Parameter0, - parameter_1.Parameter1, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _login_user( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _login_user( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _login_user( - self, - query_params: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Logs user into the system - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - query_params = QueryParameters.validate( - query_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - query_parameters=query_parameter_classes, - query_params=query_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - query_params_suffix=query_params_suffix, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class LoginUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - login_user = BaseApi._login_user - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._login_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py deleted file mode 100644 index bda172d39cd..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter0(api_client.QueryParameter): - name = "username" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py deleted file mode 100644 index 448e308cffc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class Parameter1(api_client.QueryParameter): - name = "password" - style = api_client.ParameterStyle.FORM - schema: typing_extensions.TypeAlias = schema.Schema - required = True - explode = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py deleted file mode 100644 index c4898ed4da6..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/query_parameters.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.paths.user_login.get.parameters.parameter_0 import schema as schema_2 -from openapi_client.paths.user_login.get.parameters.parameter_1 import schema -Properties = typing.TypedDict( - 'Properties', - { - "password": typing.Type[schema.Schema], - "username": typing.Type[schema_2.Schema], - } -) - - -class QueryParametersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "password", - "username", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - password: str, - username: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "password": password, - "username": username, - } - used_arg_ = typing.cast(QueryParametersDictInput, arg_) - return QueryParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return QueryParameters.validate(arg, configuration=configuration) - - @property - def password(self) -> str: - return typing.cast( - str, - self.__getitem__("password") - ) - - @property - def username(self) -> str: - return typing.cast( - str, - self.__getitem__("username") - ) -QueryParametersDictInput = typing.TypedDict( - 'QueryParametersDictInput', - { - "password": str, - "username": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class QueryParameters( - schemas.Schema[QueryParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "password", - "username", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: QueryParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - QueryParametersDictInput, - QueryParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> QueryParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py deleted file mode 100644 index 5e09aa41725..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/__init__.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema -from .headers import header_x_rate_limit -from .headers import header_int32 -from .headers import header_x_expires_after -from .headers import header_ref_content_schema_header -from .headers import header_number_header -from . import header_parameters -parameters: typing.Dict[str, typing.Type[api_client.HeaderParameterWithoutName]] = { - 'X-Rate-Limit': header_x_rate_limit.XRateLimit, - 'int32': header_int32.Int32, - 'X-Expires-After': header_x_expires_after.XExpiresAfter, - 'ref-content-schema-header': header_ref_content_schema_header.RefContentSchemaHeader, - 'numberHeader': header_number_header.NumberHeader, -} - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - str, - str, - ] - headers: header_parameters.HeadersDict - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } - headers=parameters - headers_schema = header_parameters.Headers diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py deleted file mode 100644 index e97bc729143..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.StrSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py deleted file mode 100644 index 2b410ee3cb5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py +++ /dev/null @@ -1,151 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.headers.header_int32_json_content_type_header.content.application_json import schema as schema_2 -from openapi_client.components.headers.header_number_header import schema as schema_4 -from openapi_client.components.schema import string_with_validation -from openapi_client.paths.user_login.get.responses.response_200.headers.header_x_expires_after import schema as schema_3 -from openapi_client.paths.user_login.get.responses.response_200.headers.header_x_rate_limit.content.application_json import schema -Properties = typing.TypedDict( - 'Properties', - { - "X-Rate-Limit": typing.Type[schema.Schema], - "int32": typing.Type[schema_2.Schema], - "X-Expires-After": typing.Type[schema_3.Schema], - "ref-content-schema-header": typing.Type[string_with_validation.StringWithValidation], - "numberHeader": typing.Type[schema_4.Schema], - } -) -HeadersRequiredDictInput = typing.TypedDict( - 'HeadersRequiredDictInput', - { - "X-Rate-Limit": int, - "int32": int, - "ref-content-schema-header": str, - } -) -HeadersOptionalDictInput = typing.TypedDict( - 'HeadersOptionalDictInput', - { - "X-Expires-After": typing.Union[ - str, - datetime.datetime - ], - "numberHeader": str, - }, - total=False -) - - -class HeadersDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "X-Rate-Limit", - "int32", - "ref-content-schema-header", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "X-Expires-After", - "numberHeader", - }) - - def __new__( - cls, - *, - int32: int, - numberHeader: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "int32": int32, - } - for key_, val in ( - ("numberHeader", numberHeader), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - used_arg_ = typing.cast(HeadersDictInput, arg_) - return Headers.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - HeadersDictInput, - HeadersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return Headers.validate(arg, configuration=configuration) - - @property - def int32(self) -> int: - return typing.cast( - int, - self.__getitem__("int32") - ) - - @property - def numberHeader(self) -> typing.Union[str, schemas.Unset]: - val = self.get("numberHeader", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - -class HeadersDictInput(HeadersRequiredDictInput, HeadersOptionalDictInput): - pass - - -@dataclasses.dataclass(frozen=True) -class Headers( - schemas.Schema[HeadersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "X-Rate-Limit", - "int32", - "ref-content-schema-header", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: HeadersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - HeadersDictInput, - HeadersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> HeadersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py deleted file mode 100644 index 661b9f2d216..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_int32_json_content_type_header -Int32 = header_int32_json_content_type_header.Int32JsonContentTypeHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py deleted file mode 100644 index 2fb16e7186a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_number_header -NumberHeader = header_number_header.NumberHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py deleted file mode 100644 index 9d425ecc610..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.headers import header_ref_content_schema_header -RefContentSchemaHeader = header_ref_content_schema_header.RefContentSchemaHeader diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py deleted file mode 100644 index f25ccf8739b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from . import schema - - -class XExpiresAfter(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - schema: typing_extensions.TypeAlias = schema.Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py deleted file mode 100644 index 9bcc0240bd7..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.DateTimeSchema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py deleted file mode 100644 index 65e1c326dc5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from .content.application_json import schema as application_json_schema - - -class XRateLimit(api_client.HeaderParameterWithoutName): - style = api_client.ParameterStyle.SIMPLE - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py deleted file mode 100644 index 6e99ff53420..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Schema: typing_extensions.TypeAlias = schemas.Int32Schema diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_login/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py deleted file mode 100644 index f6b0212b14b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_logout/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user_logout import UserLogout - -path = "/user/logout" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py deleted file mode 100644 index c0fe56e62cc..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/operation.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import response_default - - -default_response = response_default.Default - - -class BaseApi(api_client.Api): - @typing.overload - def _logout_user( - self, - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_default.ApiResponse: ... - - @typing.overload - def _logout_user( - self, - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _logout_user( - self, - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Logs out current logged in user session - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - response = default_response.deserialize(raw_response, self.api_client.schema_configuration) - self._verify_response_status(response) - return response - - -class LogoutUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - logout_user = BaseApi._logout_user - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._logout_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py deleted file mode 100644 index 4d63fa47365..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_ref_success_description_only -Default = response_ref_success_description_only.RefSuccessDescriptionOnly -ApiResponse = response_ref_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py deleted file mode 100644 index 062efcf21ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from openapi_client.apis.paths.user_username import UserUsername - -path = "/user/{username}" \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py deleted file mode 100644 index ef732e30475..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/operation.py +++ /dev/null @@ -1,156 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_404, -) -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '404', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_user( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _delete_user( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _delete_user( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Delete user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='delete', - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class DeleteUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - delete_user = BaseApi._delete_user - - -class ApiForDelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - delete = BaseApi._delete_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py deleted file mode 100644 index 9ce0ebd2c4d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.parameters import parameter_ref_path_user_name -Parameter0 = parameter_ref_path_user_name.RefPathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py deleted file mode 100644 index 7e269d7352f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.parameters.parameter_path_user_name import schema -Properties = typing.TypedDict( - 'Properties', - { - "username": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "username", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - username: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "username": username, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def username(self) -> str: - return self.__getitem__("username") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "username": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "username", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py deleted file mode 100644 index 89e5686c48a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.responses import response_success_description_only -ResponseFor200 = response_success_description_only.SuccessDescriptionOnly -ApiResponse = response_success_description_only.ApiResponse diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py deleted file mode 100644 index 6d4e3b40daa..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/operation.py +++ /dev/null @@ -1,171 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .. import path -from .responses import ( - response_200, - response_400, - response_404, -) -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '200': typing.Type[response_200.ResponseFor200], - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '200': response_200.ResponseFor200, - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, -} -_non_error_status_codes = frozenset({ - '200', -}) -_error_status_codes = frozenset({ - '400', - '404', -}) - -_all_accept_content_types = ( - "application/xml", - "application/json", -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_by_name( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> response_200.ApiResponse: ... - - @typing.overload - def _get_user_by_name( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _get_user_by_name( - self, - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Get user by user name - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers(accept_content_types=accept_content_types) - # TODO add cookie handling - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='get', - host=host, - headers=headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _non_error_status_codes: - status_code = typing.cast( - typing.Literal[ - '200', - ], - status - ) - return _status_code_to_response[status_code].deserialize( - raw_response, self.api_client.schema_configuration) - elif status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class GetUserByName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - get_user_by_name = BaseApi._get_user_by_name - - -class ApiForGet(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - get = BaseApi._get_user_by_name diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py deleted file mode 100644 index 1a399d1caf5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.parameters import parameter_path_user_name -Parameter0 = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py deleted file mode 100644 index 7e269d7352f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.parameters.parameter_path_user_name import schema -Properties = typing.TypedDict( - 'Properties', - { - "username": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "username", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - username: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "username": username, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def username(self) -> str: - return self.__getitem__("username") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "username": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "username", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py deleted file mode 100644 index 583d8d372c1..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_xml import schema as application_xml_schema -from .content.application_json import schema as application_json_schema - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: typing.Union[ - application_xml_schema.user.UserDict, - application_json_schema.user.UserDict, - ] - headers: schemas.Unset - - -class ResponseFor200(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) - - - class ApplicationXmlMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_xml_schema.Schema - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/xml': ApplicationXmlMediaType, - 'application/json': ApplicationJsonMediaType, - } diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py deleted file mode 100644 index 8e004303999..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user -Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py deleted file mode 100644 index 8e004303999..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user -Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/get/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py deleted file mode 100644 index 11c1bcdc752..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/operation.py +++ /dev/null @@ -1,173 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client import api_client, exceptions -from openapi_client.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user - -from .. import path -from .responses import ( - response_400, - response_404, -) -from . import request_body -from .parameters import parameter_0 -from .path_parameters import PathParameters, PathParametersDictInput, PathParametersDict -path_parameter_classes = ( - parameter_0.Parameter0, -) - - -__StatusCodeToResponse = typing.TypedDict( - '__StatusCodeToResponse', - { - '400': typing.Type[response_400.ResponseFor400], - '404': typing.Type[response_404.ResponseFor404], - } -) -_status_code_to_response: __StatusCodeToResponse = { - '400': response_400.ResponseFor400, - '404': response_404.ResponseFor404, -} -_error_status_codes = frozenset({ - '400', - '404', -}) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[False] = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: typing.Literal[True], - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - def _update_user( - self, - body: typing.Union[ - user.UserDictInput, - user.UserDict, - ], - path_params: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - *, - skip_deserialization: bool = False, - content_type: typing.Literal["application/json"] = "application/json", - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ): - """ - Updated user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - path_params = PathParameters.validate( - path_params, - configuration=self.api_client.schema_configuration - ) - used_path, query_params_suffix = self._get_used_path( - path, - path_parameters=path_parameter_classes, - path_params=path_params, - skip_validation=True - ) - headers = self._get_headers() - # TODO add cookie handling - - fields, serialized_body = self._get_fields_and_body( - request_body=request_body.RequestBody, - body=body, - content_type=content_type, - headers=headers - ) - host = self.api_client.configuration.get_server_url( - "servers", server_index - ) - - raw_response = self.api_client.call_api( - resource_path=used_path, - method='put', - host=host, - headers=headers, - fields=fields, - body=serialized_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - skip_deser_response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(skip_deser_response) - return skip_deser_response - - status = str(raw_response.status) - if status in _error_status_codes: - error_status_code = typing.cast( - typing.Literal[ - '400', - '404', - ], - status - ) - error_response = _status_code_to_response[error_status_code].deserialize( - raw_response, self.api_client.schema_configuration) - raise exceptions.ApiException( - status=error_response.response.status, - reason=error_response.response.reason, - api_response=error_response - ) - - response = api_response.ApiResponseWithoutDeserialization(response=raw_response) - self._verify_response_status(response) - return response - - -class UpdateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId.snakeCase fn names - update_user = BaseApi._update_user - - -class ApiForPut(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - put = BaseApi._update_user diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py deleted file mode 100644 index 1a399d1caf5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.components.parameters import parameter_path_user_name -Parameter0 = parameter_path_user_name.PathUserName diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py deleted file mode 100644 index 7e269d7352f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/path_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - -from openapi_client.components.parameters.parameter_path_user_name import schema -Properties = typing.TypedDict( - 'Properties', - { - "username": typing.Type[schema.Schema], - } -) - - -class PathParametersDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "username", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - username: str, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "username": username, - } - used_arg_ = typing.cast(PathParametersDictInput, arg_) - return PathParameters.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return PathParameters.validate(arg, configuration=configuration) - - @property - def username(self) -> str: - return self.__getitem__("username") -PathParametersDictInput = typing.TypedDict( - 'PathParametersDictInput', - { - "username": str, - } -) - - -@dataclasses.dataclass(frozen=True) -class PathParameters( - schemas.Schema[PathParametersDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "username", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: PathParametersDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - PathParametersDictInput, - PathParametersDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> PathParametersDict: - return super().validate_base( - arg, - configuration=configuration, - ) - diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py deleted file mode 100644 index 89e5cda511a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.header_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from .content.application_json import schema as application_json_schema - - -class RequestBody(api_client.RequestBody): - - - class ApplicationJsonMediaType(api_client.MediaType): - schema: typing_extensions.TypeAlias = application_json_schema.Schema - content = { - 'application/json': ApplicationJsonMediaType, - } - required = True diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py deleted file mode 100644 index 8e004303999..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - - -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.components.schema import user -Schema: typing_extensions.TypeAlias = user.User diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py deleted file mode 100644 index f4edd8046ca..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_400/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor400(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py b/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py deleted file mode 100644 index 13bb18c2137..00000000000 --- a/samples/client/petstore/python/src/openapi_client/paths/user_username/put/responses/response_404/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.response_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass(frozen=True) -class ApiResponse(api_response.ApiResponse): - body: schemas.Unset - headers: schemas.Unset - - -class ResponseFor404(api_client.OpenApiResponse[ApiResponse]): - @classmethod - def get_response(cls, response, headers, body) -> ApiResponse: - return ApiResponse(response=response, body=body, headers=headers) diff --git a/samples/client/petstore/python/src/openapi_client/py.typed b/samples/client/petstore/python/src/openapi_client/py.typed deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/rest.py b/samples/client/petstore/python/src/openapi_client/rest.py deleted file mode 100644 index 50f1b297c4d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/rest.py +++ /dev/null @@ -1,270 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi # type: ignore[import] -import urllib3 -from urllib3 import fields -from urllib3 import exceptions as urllib3_exceptions -from urllib3._collections import HTTPHeaderDict - -from petstore_api import exceptions - - -logger = logging.getLogger(__name__) -_TYPE_FIELD_VALUE = typing.Union[str, bytes] - - -class RequestField(fields.RequestField): - def __init__( - self, - name: str, - data: _TYPE_FIELD_VALUE, - filename: typing.Optional[str] = None, - headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, - header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, - ): - super().__init__(name, data, filename, headers, header_formatter) # type: ignore - - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise exceptions.ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - headers = headers or HTTPHeaderDict() - - used_timeout: typing.Optional[urllib3.Timeout] = None - if timeout: - if isinstance(timeout, (int, float)): - used_timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - used_timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in {'POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE'}: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=used_timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - encode_multipart=False, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise exceptions.ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=used_timeout, - headers=headers) - except urllib3_exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise exceptions.ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def get(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def head(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def options(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def delete(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def post(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def put(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def patch(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/client/petstore/python/src/openapi_client/schemas/__init__.py b/samples/client/petstore/python/src/openapi_client/schemas/__init__.py deleted file mode 100644 index dee640c72f5..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/__init__.py +++ /dev/null @@ -1,148 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import typing - -import typing_extensions - -from .schema import ( - get_class, - none_type_, - classproperty, - Bool, - FileIO, - Schema, - SingletonMeta, - AnyTypeSchema, - UnsetAnyTypeSchema, - INPUT_TYPES_ALL -) - -from .schemas import ( - ListSchema, - NoneSchema, - NumberSchema, - IntSchema, - Int32Schema, - Int64Schema, - Float32Schema, - Float64Schema, - StrSchema, - UUIDSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - BytesSchema, - FileSchema, - BinarySchema, - BoolSchema, - NotAnyTypeSchema, - OUTPUT_BASE_TYPES, - DictSchema -) -from .validation import ( - PatternInfo, - ValidationMetadata, - immutabledict -) -from .format import ( - as_date, - as_datetime, - as_decimal, - as_uuid -) - -def typed_dict_to_instance(t_dict: typing_extensions._TypedDictMeta) -> typing.Mapping: # type: ignore - res = {} - for key, val in t_dict.__annotations__.items(): - if isinstance(val, typing._GenericAlias): # type: ignore - # typing.Type[W] -> W - val_cls = typing.get_args(val)[0] - res[key] = val_cls - return res - -X = typing.TypeVar('X', bound=typing.Tuple) - -def tuple_to_instance(tup: typing.Type[X]) -> X: - res = [] - for arg in typing.get_args(tup): - if isinstance(arg, typing._GenericAlias): # type: ignore - # typing.Type[Schema] -> Schema - arg_cls = typing.get_args(arg)[0] - res.append(arg_cls) - return tuple(res) # type: ignore - - -class Unset: - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset: Unset = Unset() - -def key_unknown_error_msg(key: str) -> str: - return (f"Invalid key. The key {key} is not a known key in this payload. " - "If this key is an additional property, use get_additional_property_" - ) - -def raise_if_key_known( - key: str, - required_keys: typing.FrozenSet[str], - optional_keys: typing.FrozenSet[str] -): - if key in required_keys or key in optional_keys: - raise ValueError(f"The key {key} is a known property, use get_property to access its value") - -__all__ = [ - 'get_class', - 'none_type_', - 'classproperty', - 'Bool', - 'FileIO', - 'Schema', - 'SingletonMeta', - 'AnyTypeSchema', - 'UnsetAnyTypeSchema', - 'INPUT_TYPES_ALL', - 'ListSchema', - 'NoneSchema', - 'NumberSchema', - 'IntSchema', - 'Int32Schema', - 'Int64Schema', - 'Float32Schema', - 'Float64Schema', - 'StrSchema', - 'UUIDSchema', - 'DateSchema', - 'DateTimeSchema', - 'DecimalSchema', - 'BytesSchema', - 'FileSchema', - 'BinarySchema', - 'BoolSchema', - 'NotAnyTypeSchema', - 'OUTPUT_BASE_TYPES', - 'DictSchema', - 'PatternInfo', - 'ValidationMetadata', - 'immutabledict', - 'as_date', - 'as_datetime', - 'as_decimal', - 'as_uuid', - 'typed_dict_to_instance', - 'tuple_to_instance', - 'Unset', - 'unset', - 'key_unknown_error_msg', - 'raise_if_key_known' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/format.py b/samples/client/petstore/python/src/openapi_client/schemas/format.py deleted file mode 100644 index bb614903b82..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/format.py +++ /dev/null @@ -1,115 +0,0 @@ -import datetime -import decimal -import functools -import typing -import uuid - -from dateutil import parser, tz - - -class CustomIsoparser(parser.isoparser): - def __init__(self, sep: typing.Optional[str] = None): - """ - :param sep: - A single character that separates date and time portions. If - ``None``, the parser will accept any single character. - For strict ISO-8601 adherence, pass ``'T'``. - """ - if sep is not None: - if (len(sep) != 1 or ord(sep) >= 128 or sep in '0123456789'): - raise ValueError('Separator must be a single, non-numeric ' + - 'ASCII character') - - used_sep = sep.encode('ascii') - else: - used_sep = None - - self._sep = used_sep - - @staticmethod - def __get_ascii_bytes(str_in: str) -> bytes: - # If it's unicode, turn it into bytes, since ISO-8601 only covers ASCII - # ASCII is the same in UTF-8 - try: - return str_in.encode('ascii') - except UnicodeEncodeError as e: - msg = 'ISO-8601 strings should contain only ASCII characters' - raise ValueError(msg) from e - - def __parse_isodate(self, dt_str: str) -> typing.Tuple[typing.Tuple[int, int, int], int]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isodate(dt_str_ascii) # type: ignore - values = typing.cast(typing.Tuple[typing.List[int], int], values) - components = typing.cast( typing.Tuple[int, int, int], tuple(values[0])) - pos = values[1] - return components, pos - - def __parse_isotime(self, dt_str: str) -> typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]]: - dt_str_ascii = self.__get_ascii_bytes(dt_str) - values = self._parse_isotime(dt_str_ascii) # type: ignore - components: typing.Tuple[int, int, int, int, typing.Optional[typing.Union[tz.tzutc, tz.tzoffset]]] = tuple(values) # type: ignore - return components - - def parse_isodatetime(self, dt_str: str) -> datetime.datetime: - date_components, pos = self.__parse_isodate(dt_str) - if len(dt_str) <= pos: - # len(components) <= 3 - raise ValueError('Value is not a datetime') - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - hour, minute, second, microsecond, tzinfo = self.__parse_isotime(dt_str[pos + 1:]) - if hour == 24: - hour = 0 - components = (*date_components, hour, minute, second, microsecond, tzinfo) - return datetime.datetime(*components) + datetime.timedelta(days=1) - else: - components = (*date_components, hour, minute, second, microsecond, tzinfo) - else: - raise ValueError('String contains unknown ISO components') - - return datetime.datetime(*components) - - def parse_isodate_str(self, datestr: str) -> datetime.date: - components, pos = self.__parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return datetime.date(*components) - -DEFAULT_ISOPARSER = CustomIsoparser() - -@functools.lru_cache() -def as_date(arg: str) -> datetime.date: - """ - type = "string" - format = "date" - """ - return DEFAULT_ISOPARSER.parse_isodate_str(arg) - -@functools.lru_cache() -def as_datetime(arg: str) -> datetime.datetime: - """ - type = "string" - format = "date-time" - """ - return DEFAULT_ISOPARSER.parse_isodatetime(arg) - -@functools.lru_cache() -def as_decimal(arg: str) -> decimal.Decimal: - """ - Applicable when storing decimals that are sent over the wire as strings - type = "string" - format = "number" - """ - return decimal.Decimal(arg) - -@functools.lru_cache() -def as_uuid(arg: str) -> uuid.UUID: - """ - type = "string" - format = "uuid" - """ - return uuid.UUID(arg) \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py b/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py deleted file mode 100644 index 3897e140a4a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/original_immutabledict.py +++ /dev/null @@ -1,97 +0,0 @@ -""" -MIT License - -Copyright (c) 2020 Corentin Garcia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -""" -from __future__ import annotations -import typing -import typing_extensions - -_K = typing.TypeVar("_K") -_V = typing.TypeVar("_V", covariant=True) - - -class immutabledict(typing.Mapping[_K, _V]): - """ - An immutable wrapper around dictionaries that implements - the complete :py:class:`collections.Mapping` interface. - It can be used as a drop-in replacement for dictionaries - where immutability is desired. - - Note: custom version of this class made to remove __init__ - """ - - dict_cls: typing.Type[typing.Dict[typing.Any, typing.Any]] = dict - _dict: typing.Dict[_K, _V] - _hash: typing.Optional[int] - - @classmethod - def fromkeys( - cls, seq: typing.Iterable[_K], value: typing.Optional[_V] = None - ) -> "immutabledict[_K, _V]": - return cls(dict.fromkeys(seq, value)) - - def __new__(cls, *args: typing.Any) -> typing_extensions.Self: - inst = super().__new__(cls) - setattr(inst, '_dict', cls.dict_cls(*args)) - setattr(inst, '_hash', None) - return inst - - def __getitem__(self, key: _K) -> _V: - return self._dict[key] - - def __contains__(self, key: object) -> bool: - return key in self._dict - - def __iter__(self) -> typing.Iterator[_K]: - return iter(self._dict) - - def __len__(self) -> int: - return len(self._dict) - - def __repr__(self) -> str: - return "%s(%r)" % (self.__class__.__name__, self._dict) - - def __hash__(self) -> int: - if self._hash is None: - h = 0 - for key, value in self.items(): - h ^= hash((key, value)) - self._hash = h - - return self._hash - - def __or__(self, other: typing.Any) -> immutabledict[_K, _V]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(self) - new.update(other) - return self.__class__(new) - - def __ror__(self, other: typing.Any) -> typing.Dict[typing.Any, typing.Any]: - if not isinstance(other, (dict, self.__class__)): - return NotImplemented - new = dict(other) - new.update(self) - return new - - def __ior__(self, other: typing.Any) -> immutabledict[_K, _V]: - raise TypeError(f"'{self.__class__.__name__}' object is not mutable") diff --git a/samples/client/petstore/python/src/openapi_client/schemas/schema.py b/samples/client/petstore/python/src/openapi_client/schemas/schema.py deleted file mode 100644 index fe663116e61..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/schema.py +++ /dev/null @@ -1,729 +0,0 @@ -from __future__ import annotations -import datetime -import dataclasses -import io -import types -import typing -import uuid - -import functools -import typing_extensions - -from petstore_api import exceptions -from petstore_api.configurations import schema_configuration - -from . import validation - -_T_co = typing.TypeVar("_T_co", covariant=True) - - -class SequenceNotStr(typing.Protocol[_T_co]): - """ - if a Protocol would define the interface of Sequence, this protocol - would NOT allow str/bytes as their __contains__ methods are incompatible with the definition in Sequence - methods from: https://docs.python.org/3/library/collections.abc.html#collections.abc.Collection - """ - def __contains__(self, value: object, /) -> bool: - raise NotImplementedError - - def __getitem__(self, index, /): - raise NotImplementedError - - def __len__(self) -> int: - raise NotImplementedError - - def __iter__(self) -> typing.Iterator[_T_co]: - raise NotImplementedError - - def __reversed__(self, /) -> typing.Iterator[_T_co]: - raise NotImplementedError - -none_type_ = type(None) -T = typing.TypeVar('T', bound=typing.Mapping) -U = typing.TypeVar('U', bound=SequenceNotStr) -W = typing.TypeVar('W') - - -class SchemaTyped: - additional_properties: typing.Type[Schema] - all_of: typing.Tuple[typing.Type[Schema], ...] - any_of: typing.Tuple[typing.Type[Schema], ...] - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[Schema]]] - default: typing.Union[str, int, float, bool, None] - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, Bool, None], str] - exclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - format: str - inclusive_maximum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - items: typing.Type[Schema] - max_items: int - max_length: int - max_properties: int - min_items: int - min_length: int - min_properties: int - multiple_of: typing.Union[int, float] - not_: typing.Type[Schema] - one_of: typing.Tuple[typing.Type[Schema], ...] - pattern: validation.PatternInfo - properties: typing.Mapping[str, typing.Type[Schema]] - required: typing.FrozenSet[str] - types: typing.FrozenSet[typing.Type] - unique_items: bool - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: - raise exceptions.ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) # type: ignore - super(FileIO, inst).__init__(arg.name) - return inst - raise exceptions.ApiValueError('FileIO must be passed arg which contains the open file') - - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): - """ - Needed for instantiation when passing in arguments of the above type - """ - pass - - -class classproperty(typing.Generic[W]): - def __init__(self, method: typing.Callable[..., W]): - self.__method = method - functools.update_wrapper(self, method) # type: ignore - - def __get__(self, obj, cls=None) -> W: - if cls is None: - cls = type(obj) - return self.__method(cls) - - -class Bool: - _instances: typing.Dict[typing.Tuple[type, bool], Bool] = {} - """ - This class is needed to replace bool during validation processing - json schema requires that 0 != False and 1 != True - python implementation defines 0 == False and 1 == True - To meet the json schema requirements, all bool instances are replaced with Bool singletons - during validation only, and then bool values are returned from validation - """ - - def __new__(cls, arg_: bool, **kwargs): - """ - Method that implements singleton - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg_ ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, arg_) - if key not in cls._instances: - inst = super().__new__(cls) - cls._instances[key] = inst - return cls._instances[key] - - def __repr__(self): - if bool(self): - return f'' - return f'' - - @classproperty - def TRUE(cls): - return cls(True) # type: ignore - - @classproperty - def FALSE(cls): - return cls(False) # type: ignore - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -def cast_to_allowed_types( - arg: typing.Union[ - dict, - validation.immutabledict, - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - ], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] -) -> typing.Union[ - validation.immutabledict, - tuple, - float, - int, - str, - bytes, - Bool, - None, - FileIO -]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - type_error = exceptions.ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - path_to_type[path_to_item] = str - return str(arg) - elif isinstance(arg, (dict, validation.immutabledict)): - path_to_type[path_to_item] = validation.immutabledict - return validation.immutabledict( - { - key: cast_to_allowed_types( - val, - from_server, - validated_path_to_schemas, - path_to_item + (key,), - path_to_type, - ) - for key, val in arg.items() - } - ) - elif isinstance(arg, bool): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - path_to_type[path_to_item] = Bool - if arg: - return Bool.TRUE - return Bool.FALSE - elif isinstance(arg, int): - path_to_type[path_to_item] = int - return arg - elif isinstance(arg, float): - path_to_type[path_to_item] = float - return arg - elif isinstance(arg, (tuple, list)): - path_to_type[path_to_item] = tuple - return tuple( - [ - cast_to_allowed_types( - item, - from_server, - validated_path_to_schemas, - path_to_item + (i,), - path_to_type, - ) - for i, item in enumerate(arg) - ] - ) - elif arg is None: - path_to_type[path_to_item] = type(None) - return None - elif isinstance(arg, (datetime.date, datetime.datetime)): - path_to_type[path_to_item] = str - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - path_to_type[path_to_item] = str - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, bytes): - path_to_type[path_to_item] = bytes - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - path_to_type[path_to_item] = FileIO - return FileIO(arg) - raise exceptions.ApiTypeError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class SingletonMeta(type): - """ - A singleton class for schemas - Schemas are frozen classes that are never instantiated with init args - All args come from defaults - """ - _instances: typing.Dict[type, typing.Any] = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super().__call__(*args, **kwargs) - return cls._instances[cls] - - -class Schema(typing.Generic[T, U], validation.SchemaValidator, metaclass=SingletonMeta): - - @classmethod - def __get_path_to_schemas( - cls, - arg, - validation_metadata: validation.ValidationMetadata, - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type] - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]]: - """ - Run all validations in the json schema and return a dict of - json schema to tuple of validated schemas - """ - _path_to_schemas: validation.PathToSchemasType = {} - if validation_metadata.validation_ran_earlier(cls): - validation.add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate(arg, validation_metadata=validation_metadata) - validation.update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] = {} - for path, schema_classes in _path_to_schemas.items(): - schema = typing.cast(typing.Type[Schema], tuple(schema_classes)[-1]) - path_to_schemas[path] = schema - """ - For locations that validation did not check - the code still needs to store type + schema information for instantiation - All of those schemas will be UnsetAnyTypeSchema - """ - missing_paths = path_to_type.keys() - path_to_schemas.keys() - for missing_path in missing_paths: - path_to_schemas[missing_path] = UnsetAnyTypeSchema - - return path_to_schemas - - @staticmethod - def __get_items( - arg: tuple, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - ''' - Schema __get_items - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return tuple(cast_items) - - @staticmethod - def __get_properties( - arg: validation.immutabledict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - """ - Schema __get_properties, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return validation.immutabledict(dict_items) - - @classmethod - def _get_new_instance_without_conversion( - cls, - arg: typing.Union[int, float, None, Bool, str, validation.immutabledict, tuple, FileIO, bytes], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type[Schema]] - ): - # We have a Dynamic class and we are making an instance of it - if isinstance(arg, validation.immutabledict): - used_arg = cls.__get_properties(arg, path_to_item, path_to_schemas) - elif isinstance(arg, tuple): - used_arg = cls.__get_items(arg, path_to_item, path_to_schemas) - elif isinstance(arg, Bool): - return bool(arg) - else: - """ - str, int, float, FileIO, bytes - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return arg - arg_type = type(arg) - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is None: - return used_arg - if arg_type not in type_to_output_cls: - return used_arg - output_cls = type_to_output_cls[arg_type] - if arg_type is tuple: - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(U, inst) - return inst - assert issubclass(output_cls, validation.immutabledict) - inst = super(output_cls, output_cls).__new__(output_cls, used_arg) # type: ignore - inst = typing.cast(T, inst) - return inst - - @typing.overload - @classmethod - def validate_base( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Mapping[str, object], # object needed as value type for typeddict inputs - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate_base( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate_base( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - """ - Schema validate_base - - Args: - arg (int/float/str/list/tuple/dict/validation.immutabledict/bool/None): the value - configuration: contains the schema_configuration.SchemaConfiguration that enables json schema validation keywords - like minItems, minLength etc - """ - if isinstance(arg, (tuple, validation.immutabledict)): - type_to_output_cls = cls.__get_type_to_output_cls() - if type_to_output_cls is not None: - for output_cls in type_to_output_cls.values(): - if isinstance(arg, output_cls): - # U + T use case, don't run validations twice - return arg - - from_server = False - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union[str, int, float, bool, None, validation.immutabledict, tuple]] - ] = {} - path_to_type: typing.Dict[typing.Tuple[typing.Union[str, int], ...], type] = {} - cast_arg = cast_to_allowed_types( - arg, from_server, validated_path_to_schemas, ('args[0]',), path_to_type) - validation_metadata = validation.ValidationMetadata( - path_to_item=('args[0]',), - configuration=configuration or schema_configuration.SchemaConfiguration(), - validated_path_to_schemas=validation.immutabledict(validated_path_to_schemas) - ) - path_to_schemas = cls.__get_path_to_schemas(cast_arg, validation_metadata, path_to_type) - return cls._get_new_instance_without_conversion( - cast_arg, - validation_metadata.path_to_item, - path_to_schemas, - ) - - @classmethod - def __get_type_to_output_cls(cls) -> typing.Optional[typing.Mapping[type, type]]: - type_to_output_cls = getattr(cls(), 'type_to_output_cls', None) - type_to_output_cls = typing.cast(typing.Optional[typing.Mapping[type, type]], type_to_output_cls) - return type_to_output_cls - - -def get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[Schema]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[Schema]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - return item_cls._evaluate(None, local_namespace) - raise ValueError('invalid class value passed in') - - -@dataclasses.dataclass(frozen=True) -class AnyTypeSchema(Schema[T, U]): - # Python representation of a schema defined as true or {} - - @typing.overload - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date, datetime.datetime, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: SequenceNotStr[INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: U, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Mapping[str, INPUT_TYPES_ALL], - T - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> T: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> FileIO: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return cls.validate_base( - arg, - configuration=configuration - ) - -class UnsetAnyTypeSchema(AnyTypeSchema[T, U]): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - -INPUT_TYPES_ALL = typing.Union[ - dict, - validation.immutabledict, - typing.Mapping[str, object], # for TypedDict - list, - tuple, - float, - int, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - bool, - None, - bytes, - io.FileIO, - io.BufferedReader, - FileIO -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/schemas/schemas.py b/samples/client/petstore/python/src/openapi_client/schemas/schemas.py deleted file mode 100644 index 21b01c63ede..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/schemas.py +++ /dev/null @@ -1,375 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import datetime -import dataclasses -import io -import typing -import uuid - -import typing_extensions - -from petstore_api.configurations import schema_configuration - -from . import schema, validation - - -@dataclasses.dataclass(frozen=True) -class ListSchema(schema.Schema[validation.immutabledict, tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({tuple}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.List[schema.INPUT_TYPES_ALL], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Union[ - typing.Tuple[schema.INPUT_TYPES_ALL, ...], - schema.U - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.U: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NoneSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({type(None)}) - - @classmethod - def validate( - cls, - arg: None, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> None: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NumberSchema(schema.Schema): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - types: typing.FrozenSet[typing.Type] = frozenset({float, int}) - - @typing.overload - @classmethod - def validate( - cls, - arg: int, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> int: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: float, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> float: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class IntSchema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int' - - -@dataclasses.dataclass(frozen=True) -class Int32Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int32' - - -@dataclasses.dataclass(frozen=True) -class Int64Schema(IntSchema): - types: typing.FrozenSet[typing.Type] = frozenset({int, float}) - format: str = 'int64' - - -@dataclasses.dataclass(frozen=True) -class Float32Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'float' - - -@dataclasses.dataclass(frozen=True) -class Float64Schema(NumberSchema): - types: typing.FrozenSet[typing.Type] = frozenset({float}) - format: str = 'double' - - -@dataclasses.dataclass(frozen=True) -class StrSchema(schema.Schema): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - types: typing.FrozenSet[typing.Type] = frozenset({str}) - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class UUIDSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'uuid' - - @classmethod - def validate( - cls, - arg: typing.Union[str, uuid.UUID], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.date], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DateTimeSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'date-time' - - @classmethod - def validate( - cls, - arg: typing.Union[str, datetime.datetime], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class DecimalSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({str}) - format: str = 'number' - - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> str: - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class BytesSchema(schema.Schema): - """ - this class will subclass bytes and is immutable - """ - types: typing.FrozenSet[typing.Type] = frozenset({bytes}) - - @classmethod - def validate( - cls, - arg: bytes, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bytes: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class FileSchema(schema.Schema): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO}) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.FileIO: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BinarySchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.FileIO, bytes}) - format: str = 'binary' - - one_of: typing.Tuple[typing.Type[schema.Schema], ...] = ( - BytesSchema, - FileSchema, - ) - - @classmethod - def validate( - cls, - arg: typing.Union[io.FileIO, io.BufferedReader, bytes], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Union[schema.FileIO, bytes]: - return cls.validate_base(arg) - - -@dataclasses.dataclass(frozen=True) -class BoolSchema(schema.Schema): - types: typing.FrozenSet[typing.Type] = frozenset({schema.Bool}) - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[True], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[True]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal[False], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[False]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: bool, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> bool: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ): - return super().validate_base(arg, configuration=configuration) - - -@dataclasses.dataclass(frozen=True) -class NotAnyTypeSchema(schema.AnyTypeSchema): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - not_: typing.Type[schema.Schema] = schema.AnyTypeSchema - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - return super().validate_base(arg, configuration=configuration) - -OUTPUT_BASE_TYPES = typing.Union[ - validation.immutabledict[str, 'OUTPUT_BASE_TYPES'], - str, - int, - float, - bool, - schema.none_type_, - typing.Tuple['OUTPUT_BASE_TYPES', ...], - bytes, - schema.FileIO -] - - -@dataclasses.dataclass(frozen=True) -class DictSchema(schema.Schema[schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], tuple]): - types: typing.FrozenSet[typing.Type] = frozenset({validation.immutabledict}) - - @typing.overload - @classmethod - def validate( - cls, - arg: schema.validation.immutabledict[str, OUTPUT_BASE_TYPES], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Mapping[str, schema.INPUT_TYPES_ALL], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: ... - - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ) -> schema.validation.immutabledict[str, OUTPUT_BASE_TYPES]: - return super().validate_base(arg, configuration=configuration) diff --git a/samples/client/petstore/python/src/openapi_client/schemas/validation.py b/samples/client/petstore/python/src/openapi_client/schemas/validation.py deleted file mode 100644 index c7dc596bb2d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/schemas/validation.py +++ /dev/null @@ -1,1446 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import collections -import dataclasses -import decimal -import re -import sys -import types -import typing -import uuid - -import typing_extensions - -from petstore_api import exceptions -from petstore_api.configurations import schema_configuration - -from . import format, original_immutabledict - -immutabledict = original_immutabledict.immutabledict - - -@dataclasses.dataclass -class ValidationMetadata: - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - path_to_item: typing.Tuple[typing.Union[str, int], ...] - configuration: schema_configuration.SchemaConfiguration - validated_path_to_schemas: typing.Mapping[ - typing.Tuple[typing.Union[str, int], ...], - typing.Mapping[type, None] - ] = dataclasses.field(default_factory=dict) - seen_classes: typing.FrozenSet[type] = frozenset() - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas: typing.Union[typing.Mapping[type, None], None] = self.validated_path_to_schemas.get(self.path_to_item) - if validated_schemas and cls in validated_schemas: - return True - if cls in self.seen_classes: - return True - return False - -def _raise_validation_error_message(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise exceptions.ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class SchemaValidator: - __excluded_cls_properties = { - '__module__', - '__dict__', - '__weakref__', - '__doc__', - '__annotations__', - 'default', # excluded because it has no impact on validation - 'type_to_output_cls', # used to pluck the output class for instantiation - } - - @classmethod - def _validate( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> PathToSchemasType: - """ - SchemaValidator validate - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - """ - cls_schema = cls() - json_schema_data = { - k: v - for k, v in vars(cls_schema).items() - if k not in cls.__excluded_cls_properties - and k - not in validation_metadata.configuration.disabled_json_schema_python_keywords - } - contains_path_to_schemas = [] - path_to_schemas: PathToSchemasType = {} - if 'contains' in vars(cls_schema): - contains_path_to_schemas = _get_contains_path_to_schemas( - arg, - vars(cls_schema)['contains'], - validation_metadata, - path_to_schemas - ) - if_path_to_schemas = None - if 'if_' in vars(cls_schema): - if_path_to_schemas = _get_if_path_to_schemas( - arg, - vars(cls_schema)['if_'], - validation_metadata, - ) - validated_pattern_properties: typing.Optional[PathToSchemasType] = None - if 'pattern_properties' in vars(cls_schema): - validated_pattern_properties = _get_validated_pattern_properties( - arg, - vars(cls_schema)['pattern_properties'], - cls, - validation_metadata - ) - prefix_items_length = 0 - if 'prefix_items' in vars(cls_schema): - prefix_items_length = len(vars(cls_schema)['prefix_items']) - for keyword, val in json_schema_data.items(): - used_val: typing.Any - if keyword in {'contains', 'min_contains', 'max_contains'}: - used_val = (val, contains_path_to_schemas) - elif keyword == 'items': - used_val = (val, prefix_items_length) - elif keyword in {'unevaluated_items', 'unevaluated_properties'}: - used_val = (val, path_to_schemas) - elif keyword in {'types'}: - format: typing.Optional[str] = vars(cls_schema).get('format', None) - used_val = (val, format) - elif keyword in {'pattern_properties', 'additional_properties'}: - used_val = (val, validated_pattern_properties) - elif keyword in {'if_', 'then', 'else_'}: - used_val = (val, if_path_to_schemas) - else: - used_val = val - validator = json_schema_keyword_to_validator[keyword] - - other_path_to_schemas = validator( - arg, - used_val, - cls, - validation_metadata, - ) - if other_path_to_schemas: - update(path_to_schemas, other_path_to_schemas) - - base_class = type(arg) - if validation_metadata.path_to_item not in path_to_schemas: - path_to_schemas[validation_metadata.path_to_item] = dict() - path_to_schemas[validation_metadata.path_to_item][base_class] = None - path_to_schemas[validation_metadata.path_to_item][cls] = None - return path_to_schemas - -PathToSchemasType = typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Dict[ - typing.Union[ - typing.Type[SchemaValidator], - typing.Type[str], - typing.Type[int], - typing.Type[float], - typing.Type[bool], - typing.Type[None], - typing.Type[immutabledict], - typing.Type[tuple] - ], - None - ] -] - -def _get_class( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type[SchemaValidator]], - local_namespace: typing.Optional[dict] = None -) -> typing.Type[SchemaValidator]: - if isinstance(item_cls, typing._GenericAlias): # type: ignore - # petstore_api.schemas.StrSchema[~U] -> petstore_api.schemas.StrSchema - origin_cls = typing.get_origin(item_cls) - if origin_cls is None: - raise ValueError('origin class must not be None') - return origin_cls - elif isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - elif isinstance(item_cls, type): - return item_cls - elif isinstance(item_cls, typing.ForwardRef): - if sys.version_info < (3, 9): - return item_cls._evaluate(None, local_namespace) - return item_cls._evaluate(None, local_namespace, set()) - raise ValueError('invalid class value passed in') - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is collections.defaultdict(dict) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k].update(v) - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def __type_error_message( - var_value=None, var_name=None, valid_classes=None, key_type=None -): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = __get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {0} type {1} and " "passed type was {2}".format( - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - -def __get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = __type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return exceptions.ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - -@dataclasses.dataclass(frozen=True) -class PatternInfo: - pattern: str - flags: typing.Optional[re.RegexFlag] = None - - -def validate_types( - arg: typing.Any, - allowed_types_format: typing.Tuple[typing.Set[typing.Type], typing.Optional[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - allowed_types = allowed_types_format[0] - if type(arg) not in allowed_types: - raise __get_type_error( - arg, - validation_metadata.path_to_item, - allowed_types, - key_type=False, - ) - if isinstance(arg, bool) or not isinstance(arg, (int, float)): - return None - format = allowed_types_format[1] - if format and format == 'int' and arg != int(arg): - # there is a json schema test where 1.0 validates as an integer - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - return None - - -def validate_enum( - arg: typing.Any, - enum_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in enum_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, enum_value_to_name.keys())) - return None - - -def validate_unique_items( - arg: typing.Any, - unique_items_value: bool, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not unique_items_value or not isinstance(arg, tuple): - return None - if len(arg) == len(set(arg)): - return None - _raise_validation_error_message( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - -def validate_min_items( - arg: typing.Any, - min_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) < min_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=min_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_items( - arg: typing.Any, - max_items: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, tuple): - return None - if len(arg) > max_items: - _raise_validation_error_message( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=max_items, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_properties( - arg: typing.Any, - min_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) < min_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=min_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_properties( - arg: typing.Any, - max_properties: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - if len(arg) > max_properties: - _raise_validation_error_message( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=max_properties, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_min_length( - arg: typing.Any, - min_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) < min_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=min_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_max_length( - arg: typing.Any, - max_length: int, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - if len(arg) > max_length: - _raise_validation_error_message( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=max_length, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_minimum( - arg: typing.Any, - inclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg < inclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_minimum( - arg: typing.Any, - exclusive_minimum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg <= exclusive_minimum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=exclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_inclusive_maximum( - arg: typing.Any, - inclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg > inclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_exclusive_maximum( - arg: typing.Any, - exclusive_maximum: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if arg >= exclusive_maximum: - _raise_validation_error_message( - value=arg, - constraint_msg="must be a value less than", - constraint_value=exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - return None - -def validate_multiple_of( - arg: typing.Any, - multiple_of: typing.Union[int, float], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, (int, float)): - return None - if (not (float(arg) / multiple_of).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - _raise_validation_error_message( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of, - path_to_item=validation_metadata.path_to_item - ) - return None - - -def validate_pattern( - arg: typing.Any, - pattern_info: PatternInfo, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, str): - return None - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - _raise_validation_error_message( - value=arg, - constraint_msg="must match regular expression", - constraint_value=pattern_info.pattern, - path_to_item=validation_metadata.path_to_item - ) - return None - - -__int32_inclusive_minimum = -2147483648 -__int32_inclusive_maximum = 2147483647 -__int64_inclusive_minimum = -9223372036854775808 -__int64_inclusive_maximum = 9223372036854775807 -__float_inclusive_minimum = -3.4028234663852886e+38 -__float_inclusive_maximum = 3.4028234663852886e+38 -__double_inclusive_minimum = -1.7976931348623157E+308 -__double_inclusive_maximum = 1.7976931348623157E+308 - -def __validate_numeric_format( - arg: typing.Union[int, float], - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value[:3] == 'int': - # there is a json schema test where 1.0 validates as an integer - if arg != int(arg): - raise exceptions.ApiValueError( - "Invalid non-integer value '{}' for type {} at {}".format( - arg, format, validation_metadata.path_to_item - ) - ) - if format_value == 'int32': - if not __int32_inclusive_minimum <= arg <= __int32_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - elif format_value == 'int64': - if not __int64_inclusive_minimum <= arg <= __int64_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - elif format_value in {'float', 'double'}: - if format_value == 'float': - if not __float_inclusive_minimum <= arg <= __float_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - return None - # double - if not __double_inclusive_minimum <= arg <= __double_inclusive_maximum: - raise exceptions.ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - return None - return None - - -def __validate_string_format( - arg: str, - format_value: str, - validation_metadata: ValidationMetadata -) -> None: - if format_value == 'uuid': - try: - uuid.UUID(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'number': - try: - decimal.Decimal(arg) - return None - except decimal.InvalidOperation: - raise exceptions.ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date': - try: - format.DEFAULT_ISOPARSER.parse_isodate_str(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - elif format_value == 'date-time': - try: - format.DEFAULT_ISOPARSER.parse_isodatetime(arg) - return None - except ValueError: - raise exceptions.ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - return None - - -def validate_format( - arg: typing.Union[str, int, float], - format_value: str, - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - # formats work for strings + numbers - if isinstance(arg, (int, float)): - return __validate_numeric_format( - arg, - format_value, - validation_metadata - ) - elif isinstance(arg, str): - return __validate_string_format( - arg, - format_value, - validation_metadata - ) - return None - - -def validate_required( - arg: typing.Any, - required: typing.Set[str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - missing_req_args = required - arg.keys() - if missing_req_args: - missing_required_arguments = list(missing_req_args) - missing_required_arguments.sort() - raise exceptions.ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - return None - - -def validate_items( - arg: typing.Any, - item_cls_prefix_items_length: typing.Tuple[typing.Type[SchemaValidator], int], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - item_cls = _get_class(item_cls_prefix_items_length[0]) - prefix_items_length = item_cls_prefix_items_length[1] - path_to_schemas: PathToSchemasType = {} - for i in range(prefix_items_length, len(arg)): - value = arg[i] - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_properties( - arg: typing.Any, - properties: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - present_properties = {k: v for k, v, in arg.items() if k in properties} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, value in present_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - schema = properties[property_name] - schema = _get_class(schema, module_namespace) - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_additional_properties( - arg: typing.Any, - additional_properties_cls_val_pprops: typing.Tuple[ - typing.Type[SchemaValidator], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - schema = _get_class(additional_properties_cls_val_pprops[0]) - path_to_schemas: PathToSchemasType = {} - cls_schema = cls() - properties = cls_schema.properties if hasattr(cls_schema, 'properties') else {} - present_additional_properties = {k: v for k, v, in arg.items() if k not in properties} - validated_pattern_properties = additional_properties_cls_val_pprops[1] - for property_name, value in present_additional_properties.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if validated_pattern_properties and path_to_item in validated_pattern_properties: - continue - arg_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_one_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - oneof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(schema) - continue - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - oneof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - oneof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate oneof_classes - continue - oneof_classes.append(schema) - if not oneof_classes: - raise exceptions.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: - raise exceptions.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 - - -def validate_any_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - anyof_classes = [] - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - module_namespace = vars(sys.modules[cls.__module__]) - for schema in classes: - schema = _get_class(schema, module_namespace) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - anyof_classes.append(schema) - continue - if validation_metadata.validation_ran_earlier(schema): - anyof_classes.append(schema) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError) as ex: - # silence exceptions because the code needs to accumulate anyof_classes - continue - anyof_classes.append(schema) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise exceptions.ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - -def validate_all_of( - arg: typing.Any, - classes: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - path_to_schemas: PathToSchemasType = collections.defaultdict(dict) - for schema in classes: - schema = _get_class(schema) - if schema is cls: - """ - optimistically assume that cls schema will pass validation - do not invoke _validate on it because that is recursive - """ - continue - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_not( - arg: typing.Any, - not_cls: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - not_schema = _get_class(not_cls) - other_path_to_schemas = None - not_exception = exceptions.ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_schema.__name__, - ) - ) - if validation_metadata.validation_ran_earlier(not_schema): - raise not_exception - - try: - other_path_to_schemas = not_schema._validate(arg, validation_metadata=validation_metadata) - except (exceptions.ApiValueError, exceptions.ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - return None - - -def __ensure_discriminator_value_present( - disc_property_name: str, - validation_metadata: ValidationMetadata, - arg -): - if disc_property_name not in arg: - # The input data does not contain the discriminator property - raise exceptions.ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - -def __get_discriminated_class(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - cls_schema = cls() - if not hasattr(cls_schema, 'discriminator'): - return None - disc = cls_schema.discriminator - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not ( - hasattr(cls_schema, 'all_of') or - hasattr(cls_schema, 'one_of') or - hasattr(cls_schema, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls_schema, 'all_of'): - for allof_cls in cls_schema.all_of: - discriminated_cls = __get_discriminated_class( - allof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'one_of'): - for oneof_cls in cls_schema.one_of: - discriminated_cls = __get_discriminated_class( - oneof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls_schema, 'any_of'): - for anyof_cls in cls_schema.any_of: - discriminated_cls = __get_discriminated_class( - anyof_cls, disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -def validate_discriminator( - arg: typing.Any, - discriminator: typing.Mapping[str, typing.Mapping[str, typing.Type[SchemaValidator]]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - disc_prop_name = list(discriminator.keys())[0] - __ensure_discriminator_value_present(disc_prop_name, validation_metadata, arg) - discriminated_cls = __get_discriminated_class( - cls, disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ) - if discriminated_cls is None: - raise exceptions.ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - if discriminated_cls is cls: - """ - Optimistically assume that cls will pass validation - If the code invoked _validate on cls it would infinitely recurse - """ - return None - if validation_metadata.validation_ran_earlier(discriminated_cls): - path_to_schemas: PathToSchemasType = {} - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - return path_to_schemas - updated_vm = ValidationMetadata( - path_to_item=validation_metadata.path_to_item, - configuration=validation_metadata.configuration, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - return discriminated_cls._validate(arg, validation_metadata=updated_vm) - - -def _get_if_path_to_schemas( - arg: typing.Any, - if_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, -) -> PathToSchemasType: - if_cls = _get_class(if_cls) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = if_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, other_path_to_schemas) - except exceptions.OpenApiException: - pass - return these_path_to_schemas - - -def validate_if( - arg: typing.Any, - if_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = if_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - raise exceptions.OpenApiException('Invalid type for if_path_to_schemas') - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - - if true, then true -> true for whole schema - so validate_then will add if_path_to_schemas data to path_to_schemas - """ - return None - - -def validate_then( - arg: typing.Any, - then_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = then_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - """ - if is false use case - if_path_to_schemas == {} - no need to add any data to path_to_schemas - """ - if not if_path_to_schemas: - return None - then_cls = _get_class(then_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = then_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # then False case - raise ex - - -def validate_else( - arg: typing.Any, - else_cls_if_path_to_schemas: typing.Tuple[ - typing.Type[SchemaValidator], typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if_path_to_schemas = else_cls_if_path_to_schemas[1] - if if_path_to_schemas is None: - # use case: there is no if - return None - if if_path_to_schemas: - # skip validation if if_path_to_schemas was true - return None - """ - if is false use case - if_path_to_schemas == {} - """ - else_cls = _get_class(else_cls_if_path_to_schemas[0]) - these_path_to_schemas: PathToSchemasType = {} - try: - other_path_to_schemas = else_cls._validate( - arg, validation_metadata=validation_metadata) - update(these_path_to_schemas, if_path_to_schemas) - update(these_path_to_schemas, other_path_to_schemas) - return these_path_to_schemas - except exceptions.OpenApiException as ex: - # else False case - raise ex - - -def _get_contains_path_to_schemas( - arg: typing.Any, - contains_cls: typing.Type[SchemaValidator], - validation_metadata: ValidationMetadata, - path_to_schemas: PathToSchemasType -) -> typing.List[PathToSchemasType]: - if not isinstance(arg, tuple): - return [] - contains_cls = _get_class(contains_cls) - contains_path_to_schemas = [] - for i, value in enumerate(arg): - these_path_to_schemas: PathToSchemasType = {} - item_validation_metadata = ValidationMetadata( - path_to_item=validation_metadata.path_to_item+(i,), - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(contains_cls): - add_deeper_validated_schemas(item_validation_metadata, these_path_to_schemas) - contains_path_to_schemas.append(these_path_to_schemas) - continue - try: - other_path_to_schemas = contains_cls._validate( - value, validation_metadata=item_validation_metadata) - contains_path_to_schemas.append(other_path_to_schemas) - except exceptions.OpenApiException: - pass - return contains_path_to_schemas - - -def validate_contains( - arg: typing.Any, - contains_cls_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - many_path_to_schemas = contains_cls_path_to_schemas[1] - if not many_path_to_schemas: - raise exceptions.ApiValueError( - "Validation failed for contains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - these_path_to_schemas: PathToSchemasType = {} - for other_path_to_schema in many_path_to_schemas: - update(these_path_to_schemas, other_path_to_schema) - return these_path_to_schemas - - -def validate_min_contains( - arg: typing.Any, - min_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - min_contains = min_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = min_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) < min_contains: - raise exceptions.ApiValueError( - "Validation failed for minContains keyword in class={} at path_to_item={}. No " - "items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_max_contains( - arg: typing.Any, - max_contains_and_contains_path_to_schemas: typing.Tuple[int, typing.List[PathToSchemasType]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - max_contains = max_contains_and_contains_path_to_schemas[0] - contains_path_to_schemas = max_contains_and_contains_path_to_schemas[1] - if len(contains_path_to_schemas) > max_contains: - raise exceptions.ApiValueError( - "Validation failed for maxContains keyword in class={} at path_to_item={}. Too " - "many items validated to the contains schema.".format(cls, validation_metadata.path_to_item) - ) - return None - - -def validate_const( - arg: typing.Any, - const_value_to_name: typing.Dict[typing.Any, str], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if arg not in const_value_to_name: - raise exceptions.ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, const_value_to_name.keys())) - return None - - -def validate_dependent_required( - arg: typing.Any, - dependent_required: typing.Mapping[str, typing.Set[str]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - for key, keys_that_must_exist in dependent_required.items(): - if key not in arg: - continue - missing_keys = keys_that_must_exist - arg.keys() - if missing_keys: - raise exceptions.ApiValueError( - f"Validation failed for dependentRequired because these_keys={missing_keys} are " - f"missing at path_to_item={validation_metadata.path_to_item} in class {cls}" - ) - return None - - -def validate_dependent_schemas( - arg: typing.Any, - dependent_schemas: typing.Mapping[str, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for key, schema in dependent_schemas.items(): - if key not in arg: - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_property_names( - arg: typing.Any, - property_names_schema: typing.Type[SchemaValidator], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> None: - if not isinstance(arg, immutabledict): - return None - module_namespace = vars(sys.modules[cls.__module__]) - property_names_schema = _get_class(property_names_schema, module_namespace) - for key in arg.keys(): - path_to_item = validation_metadata.path_to_item + (key,) - key_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - property_names_schema._validate(key, validation_metadata=key_validation_metadata) - return None - - -def _get_validated_pattern_properties( - arg: typing.Any, - pattern_properties: typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for property_name, property_value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - for pattern_info, schema in pattern_properties.items(): - flags = pattern_info.flags if pattern_info.flags is not None else 0 - if not re.search(pattern_info.pattern, property_name, flags=flags): - continue - schema = _get_class(schema, module_namespace) - if validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(property_value, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_pattern_properties( - arg: typing.Any, - pattern_properties_validation_results: typing.Tuple[ - typing.Mapping[PatternInfo, typing.Type[SchemaValidator]], - typing.Optional[PathToSchemasType] - ], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - validation_results = pattern_properties_validation_results[1] - return validation_results - - -def validate_prefix_items( - arg: typing.Any, - prefix_items: typing.Tuple[typing.Type[SchemaValidator], ...], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - for i, val in enumerate(arg): - if i >= len(prefix_items): - break - schema = _get_class(prefix_items[i], module_namespace) - path_to_item = validation_metadata.path_to_item + (i,) - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_items( - arg: typing.Any, - unevaluated_items_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, tuple): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_items_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_items_validated_path_to_schemas[1] - for i, val in enumerate(arg): - path_to_item = validation_metadata.path_to_item + (i,) - if path_to_item in validated_path_to_schemas: - continue - item_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -def validate_unevaluated_properties( - arg: typing.Any, - unevaluated_properties_validated_path_to_schemas: typing.Tuple[typing.Type[SchemaValidator], PathToSchemasType], - cls: typing.Type, - validation_metadata: ValidationMetadata, -) -> typing.Optional[PathToSchemasType]: - if not isinstance(arg, immutabledict): - return None - path_to_schemas: PathToSchemasType = {} - module_namespace = vars(sys.modules[cls.__module__]) - schema = _get_class(unevaluated_properties_validated_path_to_schemas[0], module_namespace) - validated_path_to_schemas = unevaluated_properties_validated_path_to_schemas[1] - for property_name, val in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) - if path_to_item in validated_path_to_schemas: - continue - property_validation_metadata = ValidationMetadata( - path_to_item=path_to_item, - configuration=validation_metadata.configuration, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = schema._validate(val, validation_metadata=property_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - -validator_type = typing.Callable[[typing.Any, typing.Any, type, ValidationMetadata], typing.Optional[PathToSchemasType]] -json_schema_keyword_to_validator: typing.Mapping[str, validator_type] = { - 'types': validate_types, - 'enum_value_to_name': validate_enum, - 'unique_items': validate_unique_items, - 'min_items': validate_min_items, - 'max_items': validate_max_items, - 'min_properties': validate_min_properties, - 'max_properties': validate_max_properties, - 'min_length': validate_min_length, - 'max_length': validate_max_length, - 'inclusive_minimum': validate_inclusive_minimum, - 'exclusive_minimum': validate_exclusive_minimum, - 'inclusive_maximum': validate_inclusive_maximum, - 'exclusive_maximum': validate_exclusive_maximum, - 'multiple_of': validate_multiple_of, - 'pattern': validate_pattern, - 'format': validate_format, - 'required': validate_required, - 'items': validate_items, - 'properties': validate_properties, - 'additional_properties': validate_additional_properties, - 'one_of': validate_one_of, - 'any_of': validate_any_of, - 'all_of': validate_all_of, - 'not_': validate_not, - 'discriminator': validate_discriminator, - 'contains': validate_contains, - 'min_contains': validate_min_contains, - 'max_contains': validate_max_contains, - 'const_value_to_name': validate_const, - 'dependent_required': validate_dependent_required, - 'dependent_schemas': validate_dependent_schemas, - 'property_names': validate_property_names, - 'pattern_properties': validate_pattern_properties, - 'prefix_items': validate_prefix_items, - 'unevaluated_items': validate_unevaluated_items, - 'unevaluated_properties': validate_unevaluated_properties, - 'if_': validate_if, - 'then': validate_then, - 'else_': validate_else -} \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/security_schemes.py b/samples/client/petstore/python/src/openapi_client/security_schemes.py deleted file mode 100644 index 1ca5047f3e3..00000000000 --- a/samples/client/petstore/python/src/openapi_client/security_schemes.py +++ /dev/null @@ -1,257 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import abc -import base64 -import dataclasses -import enum -import typing -import typing_extensions - -from urllib3 import _collections - -from petstore_api import signing - - -class SecuritySchemeType(enum.Enum): - API_KEY = 'apiKey' - HTTP = 'http' - MUTUAL_TLS = 'mutualTLS' - OAUTH_2 = 'oauth2' - OPENID_CONNECT = 'openIdConnect' - - -class ApiKeyInLocation(enum.Enum): - QUERY = 'query' - HEADER = 'header' - COOKIE = 'cookie' - - -class __SecuritySchemeBase(metaclass=abc.ABCMeta): - @abc.abstractmethod - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - pass - - -@dataclasses.dataclass -class ApiKeySecurityScheme(__SecuritySchemeBase, abc.ABC): - api_key: str # this must be set by the developer - name: str = '' - in_location: ApiKeyInLocation = ApiKeyInLocation.QUERY - type: SecuritySchemeType = SecuritySchemeType.API_KEY - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - if self.in_location is ApiKeyInLocation.COOKIE: - headers.add('Cookie', self.api_key) - elif self.in_location is ApiKeyInLocation.HEADER: - headers.add(self.name, self.api_key) - elif self.in_location is ApiKeyInLocation.QUERY: - # todo add query handling - raise NotImplementedError("ApiKeySecurityScheme in query not yet implemented") - return - - -class HTTPSchemeType(enum.Enum): - BASIC = 'basic' - BEARER = 'bearer' - DIGEST = 'digest' - SIGNATURE = 'signature' # https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ - - -@dataclasses.dataclass -class HTTPBasicSecurityScheme(__SecuritySchemeBase): - user_id: str # user name - password: str - scheme: HTTPSchemeType = HTTPSchemeType.BASIC - encoding: str = 'utf-8' - type: SecuritySchemeType = SecuritySchemeType.HTTP - """ - https://www.rfc-editor.org/rfc/rfc7617.html - """ - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - user_pass = f"{self.user_id}:{self.password}" - b64_user_pass = base64.b64encode(user_pass.encode(encoding=self.encoding)) - headers.add('Authorization', f"Basic {b64_user_pass.decode()}") - - -@dataclasses.dataclass -class HTTPBearerSecurityScheme(__SecuritySchemeBase): - access_token: str - bearer_format: typing.Optional[str] = None - scheme: HTTPSchemeType = HTTPSchemeType.BEARER - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - headers.add('Authorization', f"Bearer {self.access_token}") - - -@dataclasses.dataclass -class HTTPSignatureSecurityScheme(__SecuritySchemeBase): - signing_info: signing.HttpSigningConfiguration - scheme: HTTPSchemeType = HTTPSchemeType.SIGNATURE - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - auth_headers = self.signing_info.get_http_signature_headers( - resource_path, method, headers, body, query_params_suffix) - for key, value in auth_headers.items(): - headers.add(key, value) - - -@dataclasses.dataclass -class HTTPDigestSecurityScheme(__SecuritySchemeBase): - scheme: HTTPSchemeType = HTTPSchemeType.DIGEST - type: SecuritySchemeType = SecuritySchemeType.HTTP - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("HTTPDigestSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class MutualTLSSecurityScheme(__SecuritySchemeBase): - type: SecuritySchemeType = SecuritySchemeType.MUTUAL_TLS - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("MutualTLSSecurityScheme not yet implemented") - - -@dataclasses.dataclass -class ImplicitOAuthFlow: - authorization_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class TokenUrlOauthFlow: - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class AuthorizationCodeOauthFlow: - authorization_url: str - token_url: str - scopes: typing.Dict[str, str] - refresh_url: typing.Optional[str] = None - - -@dataclasses.dataclass -class OAuthFlows: - implicit: typing.Optional[ImplicitOAuthFlow] = None - password: typing.Optional[TokenUrlOauthFlow] = None - client_credentials: typing.Optional[TokenUrlOauthFlow] = None - authorization_code: typing.Optional[AuthorizationCodeOauthFlow] = None - - -class OAuth2SecurityScheme(__SecuritySchemeBase, abc.ABC): - flows: OAuthFlows - type: SecuritySchemeType = SecuritySchemeType.OAUTH_2 - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OAuth2SecurityScheme not yet implemented") - - -class OpenIdConnectSecurityScheme(__SecuritySchemeBase, abc.ABC): - openid_connect_url: str - type: SecuritySchemeType = SecuritySchemeType.OPENID_CONNECT - - def apply_auth( - self, - headers: _collections.HTTPHeaderDict, - resource_path: str, - method: str, - body: typing.Optional[typing.Union[str, bytes]], - query_params_suffix: typing.Optional[str], - scope_names: typing.Tuple[str, ...] = (), - ) -> None: - raise NotImplementedError("OpenIdConnectSecurityScheme not yet implemented") - -""" -Key is the Security scheme class -Value is the list of scopes -""" -SecurityRequirementObject = typing.TypedDict( - 'SecurityRequirementObject', - { - 'api_key': typing.Tuple[str, ...], - 'api_key_query': typing.Tuple[str, ...], - 'bearer_test': typing.Tuple[str, ...], - 'http_basic_test': typing.Tuple[str, ...], - 'http_signature_test': typing.Tuple[str, ...], - 'openIdConnect_test': typing.Tuple[str, ...], - 'petstore_auth': typing.Tuple[str, ...], - }, - total=False -) \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/server.py b/samples/client/petstore/python/src/openapi_client/server.py deleted file mode 100644 index 3385eefc92a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/server.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -import abc -import dataclasses -import typing - -from petstore_api.schemas import validation, schema - - -@dataclasses.dataclass -class ServerWithoutVariables(abc.ABC): - url: str - - -@dataclasses.dataclass -class ServerWithVariables(abc.ABC): - _url: str - variables: validation.immutabledict[str, str] - variables_schema: typing.Type[schema.Schema] - url: str = dataclasses.field(init=False) - - def __post_init__(self): - url = self._url - assert isinstance (self.variables, self.variables_schema().type_to_output_cls[validation.immutabledict]) - for (key, value) in self.variables.items(): - url = url.replace("{" + key + "}", value) - self.url = url diff --git a/samples/client/petstore/python/src/openapi_client/servers/__init__.py b/samples/client/petstore/python/src/openapi_client/servers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_0.py b/samples/client/petstore/python/src/openapi_client/servers/server_0.py deleted file mode 100644 index 70abd9a4e0f..00000000000 --- a/samples/client/petstore/python/src/openapi_client/servers/server_0.py +++ /dev/null @@ -1,291 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -class ServerEnums: - - @schemas.classproperty - def PETSTORE(cls) -> typing.Literal["petstore"]: - return Server.validate("petstore") - - @schemas.classproperty - def QA_HYPHEN_MINUS_PETSTORE(cls) -> typing.Literal["qa-petstore"]: - return Server.validate("qa-petstore") - - @schemas.classproperty - def DEV_HYPHEN_MINUS_PETSTORE(cls) -> typing.Literal["dev-petstore"]: - return Server.validate("dev-petstore") - - -@dataclasses.dataclass(frozen=True) -class Server( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["petstore"] = "petstore" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "petstore": "PETSTORE", - "qa-petstore": "QA_HYPHEN_MINUS_PETSTORE", - "dev-petstore": "DEV_HYPHEN_MINUS_PETSTORE", - } - ) - enums = ServerEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["petstore"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["petstore"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["qa-petstore"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["qa-petstore"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["dev-petstore"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["dev-petstore"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["petstore","qa-petstore","dev-petstore",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "petstore", - "qa-petstore", - "dev-petstore", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "petstore", - "qa-petstore", - "dev-petstore", - ], - validated_arg - ) - - -class PortEnums: - - @schemas.classproperty - def POSITIVE_80(cls) -> typing.Literal["80"]: - return Port.validate("80") - - @schemas.classproperty - def POSITIVE_8080(cls) -> typing.Literal["8080"]: - return Port.validate("8080") - - -@dataclasses.dataclass(frozen=True) -class Port( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["80"] = "80" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "80": "POSITIVE_80", - "8080": "POSITIVE_8080", - } - ) - enums = PortEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["80"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["80"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["8080"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["8080"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["80","8080",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "80", - "8080", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "80", - "8080", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "server": typing.Type[Server], - "port": typing.Type[Port], - } -) - - -class VariablesDict(schemas.immutabledict[str, str]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "port", - "server", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - port: typing.Literal[ - "80", - "8080" - ], - server: typing.Literal[ - "petstore", - "qa-petstore", - "dev-petstore" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "port": port, - "server": server, - } - used_arg_ = typing.cast(VariablesDictInput, arg_) - return Variables.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - VariablesDictInput, - VariablesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return Variables.validate(arg, configuration=configuration) - - @property - def port(self) -> typing.Literal["80", "8080"]: - return typing.cast( - typing.Literal["80", "8080"], - self.__getitem__("port") - ) - - @property - def server(self) -> typing.Literal["petstore", "qa-petstore", "dev-petstore"]: - return typing.cast( - typing.Literal["petstore", "qa-petstore", "dev-petstore"], - self.__getitem__("server") - ) -VariablesDictInput = typing.TypedDict( - 'VariablesDictInput', - { - "port": typing.Literal[ - "80", - "8080" - ], - "server": typing.Literal[ - "petstore", - "qa-petstore", - "dev-petstore" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class Variables( - schemas.Schema[VariablesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "port", - "server", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: VariablesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - VariablesDictInput, - VariablesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass -class Server0(server.ServerWithVariables): - ''' - petstore server - ''' - variables: VariablesDict = dataclasses.field( - default_factory=lambda: Variables.validate({ - "server": Server.default, - "port": Port.default, - }) - ) - variables_schema: typing.Type[Variables] = Variables - _url: str = "http://{server}.swagger.io:{port}/v2" diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_1.py b/samples/client/petstore/python/src/openapi_client/servers/server_1.py deleted file mode 100644 index 1dcb7062c58..00000000000 --- a/samples/client/petstore/python/src/openapi_client/servers/server_1.py +++ /dev/null @@ -1,183 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from openapi_client.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema - - -class VersionEnums: - - @schemas.classproperty - def V1(cls) -> typing.Literal["v1"]: - return Version.validate("v1") - - @schemas.classproperty - def V2(cls) -> typing.Literal["v2"]: - return Version.validate("v2") - - -@dataclasses.dataclass(frozen=True) -class Version( - schemas.Schema -): - types: typing.FrozenSet[typing.Type] = frozenset({ - str, - }) - default: typing.Literal["v2"] = "v2" - enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field( - default_factory=lambda: { - "v1": "V1", - "v2": "V2", - } - ) - enums = VersionEnums - - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v1"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: typing.Literal["v2"], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v2"]: ... - @typing.overload - @classmethod - def validate( - cls, - arg: str, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal["v1","v2",]: ... - @classmethod - def validate( - cls, - arg, - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> typing.Literal[ - "v1", - "v2", - ]: - validated_arg = super().validate_base( - arg, - configuration=configuration, - ) - return typing.cast(typing.Literal[ - "v1", - "v2", - ], - validated_arg - ) -Properties = typing.TypedDict( - 'Properties', - { - "version": typing.Type[Version], - } -) - - -class VariablesDict(schemas.immutabledict[str, typing.Literal["v1", "v2"]]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - "version", - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - }) - - def __new__( - cls, - *, - version: typing.Literal[ - "v1", - "v2" - ], - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - ): - arg_: typing.Dict[str, typing.Any] = { - "version": version, - } - used_arg_ = typing.cast(VariablesDictInput, arg_) - return Variables.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - VariablesDictInput, - VariablesDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return Variables.validate(arg, configuration=configuration) - - @property - def version(self) -> typing.Literal["v1", "v2"]: - return self.__getitem__("version") -VariablesDictInput = typing.TypedDict( - 'VariablesDictInput', - { - "version": typing.Literal[ - "v1", - "v2" - ], - } -) - - -@dataclasses.dataclass(frozen=True) -class Variables( - schemas.Schema[VariablesDict, tuple] -): - types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) - required: typing.FrozenSet[str] = frozenset({ - "version", - }) - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - additional_properties: typing.Type[AdditionalProperties] = dataclasses.field(default_factory=lambda: AdditionalProperties) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: VariablesDict - } - ) - - @classmethod - def validate( - cls, - arg: typing.Union[ - VariablesDictInput, - VariablesDict, - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> VariablesDict: - return super().validate_base( - arg, - configuration=configuration, - ) - - - -@dataclasses.dataclass -class Server1(server.ServerWithVariables): - ''' - The local server - ''' - variables: VariablesDict = dataclasses.field( - default_factory=lambda: Variables.validate({ - "version": Version.default, - }) - ) - variables_schema: typing.Type[Variables] = Variables - _url: str = "https://localhost:8080/{version}" diff --git a/samples/client/petstore/python/src/openapi_client/servers/server_2.py b/samples/client/petstore/python/src/openapi_client/servers/server_2.py deleted file mode 100644 index dcc94c54227..00000000000 --- a/samples/client/petstore/python/src/openapi_client/servers/server_2.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from openapi_client.shared_imports.server_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - - -@dataclasses.dataclass -class Server2(server.ServerWithoutVariables): - ''' - staging server with no variables - ''' - url: str = "https://localhost:8080" diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py b/samples/client/petstore/python/src/openapi_client/shared_imports/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py deleted file mode 100644 index b96b4e45ae2..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/header_imports.py +++ /dev/null @@ -1,15 +0,0 @@ -import decimal -import io -import typing -import typing_extensions - -from petstore_api import api_client, schemas - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'api_client', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py deleted file mode 100644 index 5d69234d96a..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/operation_imports.py +++ /dev/null @@ -1,18 +0,0 @@ -import datetime -import decimal -import io -import typing -import typing_extensions -import uuid - -from petstore_api import schemas, api_response - -__all__ = [ - 'decimal', - 'io', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py deleted file mode 100644 index cff9047338d..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/response_imports.py +++ /dev/null @@ -1,25 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import typing -import uuid - -import typing_extensions -import urllib3 - -from petstore_api import api_client, schemas, api_response - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'typing', - 'uuid', - 'typing_extensions', - 'urllib3', - 'api_client', - 'schemas', - 'api_response' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py deleted file mode 100644 index 90b7a255c0e..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/schema_imports.py +++ /dev/null @@ -1,28 +0,0 @@ -import dataclasses -import datetime -import decimal -import io -import numbers -import re -import typing -import typing_extensions -import uuid - -from petstore_api import schemas -from petstore_api.configurations import schema_configuration - -U = typing.TypeVar('U') - -__all__ = [ - 'dataclasses', - 'datetime', - 'decimal', - 'io', - 'numbers', - 're', - 'typing', - 'typing_extensions', - 'uuid', - 'schemas', - 'schema_configuration' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py deleted file mode 100644 index 2eb5123f05b..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/security_scheme_imports.py +++ /dev/null @@ -1,12 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from petstore_api import security_schemes - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'security_schemes' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py b/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py deleted file mode 100644 index 64c064e1840..00000000000 --- a/samples/client/petstore/python/src/openapi_client/shared_imports/server_imports.py +++ /dev/null @@ -1,13 +0,0 @@ -import dataclasses -import typing -import typing_extensions - -from petstore_api import server, schemas - -__all__ = [ - 'dataclasses', - 'typing', - 'typing_extensions', - 'server', - 'schemas' -] \ No newline at end of file diff --git a/samples/client/petstore/python/src/openapi_client/signing.py b/samples/client/petstore/python/src/openapi_client/signing.py deleted file mode 100644 index c4cd9630553..00000000000 --- a/samples/client/petstore/python/src/openapi_client/signing.py +++ /dev/null @@ -1,415 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from base64 import b64encode -from Crypto.IO import PEM, PKCS8 # type: ignore[import] -from Crypto.Hash import SHA256, SHA512 # type: ignore[import] -from Crypto.PublicKey import RSA, ECC # type: ignore[import] -from Crypto.Signature import PKCS1_v1_5, pss, DSS # type: ignore[import] -from email.utils import formatdate -import json -import os -import re -from time import time -import typing -from urllib.parse import urlencode, urlparse - -# The constants below define a subset of HTTP headers that can be included in the -# HTTP signature scheme. Additional headers may be included in the signature. - -# The '(request-target)' header is a calculated field that includes the HTTP verb, -# the URL path and the URL query. -HEADER_REQUEST_TARGET = '(request-target)' -# The time when the HTTP signature was generated. -HEADER_CREATED = '(created)' -# The time when the HTTP signature expires. The API server should reject HTTP requests -# that have expired. -HEADER_EXPIRES = '(expires)' -# The 'Host' header. -HEADER_HOST = 'Host' -# The 'Date' header. -HEADER_DATE = 'Date' -# When the 'Digest' header is included in the HTTP signature, the client automatically -# computes the digest of the HTTP request body, per RFC 3230. -HEADER_DIGEST = 'Digest' -# The 'Authorization' header is automatically generated by the client. It includes -# the list of signed headers and a base64-encoded signature. -HEADER_AUTHORIZATION = 'Authorization' - -# The constants below define the cryptographic schemes for the HTTP signature scheme. -SCHEME_HS2019 = 'hs2019' -SCHEME_RSA_SHA256 = 'rsa-sha256' -SCHEME_RSA_SHA512 = 'rsa-sha512' - -# The constants below define the signature algorithms that can be used for the HTTP -# signature scheme. -ALGORITHM_RSASSA_PSS = 'RSASSA-PSS' -ALGORITHM_RSASSA_PKCS1v15 = 'RSASSA-PKCS1-v1_5' - -ALGORITHM_ECDSA_MODE_FIPS_186_3 = 'fips-186-3' -ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 = 'deterministic-rfc6979' -ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS = { - ALGORITHM_ECDSA_MODE_FIPS_186_3, - ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 -} - -# The cryptographic hash algorithm for the message signature. -HASH_SHA256 = 'sha256' -HASH_SHA512 = 'sha512' - - -class HttpSigningConfiguration(object): - """The configuration parameters for the HTTP signature security scheme. - The HTTP signature security scheme is used to sign HTTP requests with a private key - which is in possession of the API client. - An 'Authorization' header is calculated by creating a hash of select headers, - and optionally the body of the HTTP request, then signing the hash value using - a private key. The 'Authorization' header is added to outbound HTTP requests. - - NOTE: This class is auto generated by OpenAPI JSON Schema Generator - - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - Do not edit the class manually. - - :param key_id: A string value specifying the identifier of the cryptographic key, - when signing HTTP requests. - :param signing_scheme: A string value specifying the signature scheme, when - signing HTTP requests. - Supported value are hs2019, rsa-sha256, rsa-sha512. - Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are - available for server-side applications that only support the older - HTTP signature algorithms. - :param private_key_path: A string value specifying the path of the file containing - a private key. The private key is used to sign HTTP requests. - :param private_key_passphrase: A string value specifying the passphrase to decrypt - the private key. - :param signed_headers: A list of strings. Each value is the name of a HTTP header - that must be included in the HTTP signature calculation. - The two special signature headers '(request-target)' and '(created)' SHOULD be - included in SignedHeaders. - The '(created)' header expresses when the signature was created. - The '(request-target)' header is a concatenation of the lowercased :method, an - ASCII space, and the :path pseudo-headers. - When signed_headers is not specified, the client defaults to a single value, - '(created)', in the list of HTTP headers. - When SignedHeaders contains the 'Digest' value, the client performs the - following operations: - 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. - 2. Set the 'Digest' header in the request body. - 3. Include the 'Digest' header and value in the HTTP signature. - :param signing_algorithm: A string value specifying the signature algorithm, when - signing HTTP requests. - Supported values are: - 1. For RSA keys: RSASSA-PSS, RSASSA-PKCS1-v1_5. - 2. For ECDSA keys: fips-186-3, deterministic-rfc6979. - If None, the signing algorithm is inferred from the private key. - The default signing algorithm for RSA keys is RSASSA-PSS. - The default signing algorithm for ECDSA keys is fips-186-3. - :param hash_algorithm: The hash algorithm for the signature. Supported values are - sha256 and sha512. - If the signing_scheme is rsa-sha256, the hash algorithm must be set - to None or sha256. - If the signing_scheme is rsa-sha512, the hash algorithm must be set - to None or sha512. - :param signature_max_validity: The signature max validity, expressed as - a datetime.timedelta value. It must be a positive value. - """ - def __init__(self, key_id, signing_scheme, private_key_path, - private_key_passphrase=None, - signed_headers=None, - signing_algorithm=None, - hash_algorithm=None, - signature_max_validity=None): - self.key_id = key_id - if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: - raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) - self.signing_scheme = signing_scheme - if not os.path.exists(private_key_path): - raise Exception("Private key file does not exist") - self.private_key_path = private_key_path - self.private_key_passphrase = private_key_passphrase - self.signing_algorithm = signing_algorithm - self.hash_algorithm = hash_algorithm - if signing_scheme == SCHEME_RSA_SHA256: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA256 - elif self.hash_algorithm != HASH_SHA256: - raise Exception("Hash algorithm must be sha256 when security scheme is %s" % - SCHEME_RSA_SHA256) - elif signing_scheme == SCHEME_RSA_SHA512: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA512 - elif self.hash_algorithm != HASH_SHA512: - raise Exception("Hash algorithm must be sha512 when security scheme is %s" % - SCHEME_RSA_SHA512) - elif signing_scheme == SCHEME_HS2019: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA256 - elif self.hash_algorithm not in {HASH_SHA256, HASH_SHA512}: - raise Exception("Invalid hash algorithm") - if signature_max_validity is not None and signature_max_validity.total_seconds() < 0: - raise Exception("The signature max validity must be a positive value") - self.signature_max_validity = signature_max_validity - # If the user has not provided any signed_headers, the default must be set to '(created)', - # as specified in the 'HTTP signature' standard. - if signed_headers is None or len(signed_headers) == 0: - signed_headers = [HEADER_CREATED] - if self.signature_max_validity is None and HEADER_EXPIRES in signed_headers: - raise Exception( - "Signature max validity must be set when " - "'(expires)' signature parameter is specified") - if len(signed_headers) != len(set(signed_headers)): - raise Exception("Cannot have duplicates in the signed_headers parameter") - if HEADER_AUTHORIZATION in signed_headers: - raise Exception("'Authorization' header cannot be included in signed headers") - self.signed_headers = signed_headers - self.private_key = None - """The private key used to sign HTTP requests. - Initialized when the PEM-encoded private key is loaded from a file. - """ - self.host = None - """The host name, optionally followed by a colon and TCP port number. - """ - self._load_private_key() - - def get_http_signature_headers(self, resource_path, method, headers, body, query_params: typing.Optional[str]): - """Create a cryptographic message signature for the HTTP request and add the signed headers. - - :param resource_path : A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method, e.g. GET, POST. - :param headers: A dict containing the HTTP request headers. - :param body: The object representing the HTTP request body. - :param query_params: A string representing the HTTP request query parameters. - :return: A dict of HTTP headers that must be added to the outbound HTTP request. - """ - if method is None: - raise Exception("HTTP method must be set") - if resource_path is None: - raise Exception("Resource path must be set") - - signed_headers_list, request_headers_dict = self._get_signed_header_info( - resource_path, method, headers, body, query_params) - - header_items = [ - "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] - string_to_sign = "\n".join(header_items) - - digest, digest_prefix = self._get_message_digest(string_to_sign.encode()) - b64_signed_msg = self._sign_digest(digest) - - request_headers_dict[HEADER_AUTHORIZATION] = self._get_authorization_header( - signed_headers_list, b64_signed_msg) - - return request_headers_dict - - def get_public_key(self): - """Returns the public key object associated with the private key. - """ - pubkey = None - if isinstance(self.private_key, RSA.RsaKey): - pubkey = self.private_key.publickey() - elif isinstance(self.private_key, ECC.EccKey): - pubkey = self.private_key.public_key() - return pubkey - - def _load_private_key(self): - """Load the private key used to sign HTTP requests. - The private key is used to sign HTTP requests as defined in - https://datatracker.ietf.org/doc/draft-cavage-http-signatures/. - """ - if self.private_key is not None: - return - with open(self.private_key_path, 'r') as f: - pem_data = f.read() - # Verify PEM Pre-Encapsulation Boundary - r = re.compile(r"\s*-----BEGIN (.*)-----\s+") - m = r.match(pem_data) - if not m: - raise ValueError("Not a valid PEM pre boundary") - pem_header = m.group(1) - if pem_header == 'RSA PRIVATE KEY': - self.private_key = RSA.importKey(pem_data, self.private_key_passphrase) - elif pem_header == 'EC PRIVATE KEY': - self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) - elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: - # Key is in PKCS8 format, which is capable of holding many different - # types of private keys, not just EC keys. - (key_binary, pem_header, is_encrypted) = \ - PEM.decode(pem_data, self.private_key_passphrase) - (oid, privkey, params) = \ - PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) - if oid == '1.2.840.10045.2.1': - self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) - else: - raise Exception("Unsupported key: {0}. OID: {1}".format(pem_header, oid)) - else: - raise Exception("Unsupported key: {0}".format(pem_header)) - # Validate the specified signature algorithm is compatible with the private key. - if self.signing_algorithm is not None: - supported_algs = None - if isinstance(self.private_key, RSA.RsaKey): - supported_algs = {ALGORITHM_RSASSA_PSS, ALGORITHM_RSASSA_PKCS1v15} - elif isinstance(self.private_key, ECC.EccKey): - supported_algs = ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS - if supported_algs is not None and self.signing_algorithm not in supported_algs: - raise Exception( - "Signing algorithm {0} is not compatible with private key".format( - self.signing_algorithm)) - - def _get_signed_header_info(self, resource_path, method, headers, body, query_params: typing.Optional[str]): - """Build the HTTP headers (name, value) that need to be included in - the HTTP signature scheme. - - :param resource_path : A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method, e.g. GET, POST. - :param headers: A dict containing the HTTP request headers. - :param body: The object (e.g. a dict) representing the HTTP request body. - :param query_params: A string representing the HTTP request query parameters. - :return: A tuple containing two dict objects: - The first dict contains the HTTP headers that are used to calculate - the HTTP signature. - The second dict contains the HTTP headers that must be added to - the outbound HTTP request. - """ - - if body is None: - body = '' - else: - body = json.dumps(body) - - # Build the '(request-target)' HTTP signature parameter. - target_host = urlparse(self.host).netloc - target_path = urlparse(self.host).path - request_target = method.lower() + " " + target_path + resource_path - if query_params: - request_target += query_params - - # Get UNIX time, e.g. seconds since epoch, not including leap seconds. - now = time() - # Format date per RFC 7231 section-7.1.1.2. An example is: - # Date: Wed, 21 Oct 2015 07:28:00 GMT - cdate = formatdate(timeval=now, localtime=False, usegmt=True) - # The '(created)' value MUST be a Unix timestamp integer value. - # Subsecond precision is not supported. - created = int(now) - if self.signature_max_validity is not None: - expires = now + self.signature_max_validity.total_seconds() - - signed_headers_list = [] - request_headers_dict = {} - for hdr_key in self.signed_headers: - hdr_key = hdr_key.lower() - if hdr_key == HEADER_REQUEST_TARGET: - value = request_target - elif hdr_key == HEADER_CREATED: - value = '{0}'.format(created) - elif hdr_key == HEADER_EXPIRES: - value = '{0}'.format(expires) - elif hdr_key == HEADER_DATE.lower(): - value = cdate - request_headers_dict[HEADER_DATE] = '{0}'.format(cdate) - elif hdr_key == HEADER_DIGEST.lower(): - request_body = body.encode() - body_digest, digest_prefix = self._get_message_digest(request_body) - b64_body_digest = b64encode(body_digest.digest()) - value = digest_prefix + b64_body_digest.decode('ascii') - request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( - digest_prefix, b64_body_digest.decode('ascii')) - elif hdr_key == HEADER_HOST.lower(): - value = target_host - request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) - else: - value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) - if value is None: - raise Exception( - "Cannot sign HTTP request. " - "Request does not contain the '{0}' header".format(hdr_key)) - signed_headers_list.append((hdr_key, value)) - - return signed_headers_list, request_headers_dict - - def _get_message_digest(self, data): - """Calculates and returns a cryptographic digest of a specified HTTP request. - - :param data: The string representation of the date to be hashed with a cryptographic hash. - :return: A tuple of (digest, prefix). - The digest is a hashing object that contains the cryptographic digest of - the HTTP request. - The prefix is a string that identifies the cryptographc hash. It is used - to generate the 'Digest' header as specified in RFC 3230. - """ - if self.hash_algorithm == HASH_SHA512: - digest = SHA512.new() - prefix = 'SHA-512=' - elif self.hash_algorithm == HASH_SHA256: - digest = SHA256.new() - prefix = 'SHA-256=' - else: - raise Exception("Unsupported hash algorithm: {0}".format(self.hash_algorithm)) - digest.update(data) - return digest, prefix - - def _sign_digest(self, digest): - """Signs a message digest with a private key specified in the signing_info. - - :param digest: A hashing object that contains the cryptographic digest of the HTTP request. - :return: A base-64 string representing the cryptographic signature of the input digest. - """ - sig_alg = self.signing_algorithm - if isinstance(self.private_key, RSA.RsaKey): - if sig_alg is None or sig_alg == ALGORITHM_RSASSA_PSS: - # RSASSA-PSS in Section 8.1 of RFC8017. - signature = pss.new(self.private_key).sign(digest) - elif sig_alg == ALGORITHM_RSASSA_PKCS1v15: - # RSASSA-PKCS1-v1_5 in Section 8.2 of RFC8017. - signature = PKCS1_v1_5.new(self.private_key).sign(digest) - else: - raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) - elif isinstance(self.private_key, ECC.EccKey): - if sig_alg is None: - sig_alg = ALGORITHM_ECDSA_MODE_FIPS_186_3 - if sig_alg in ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS: - # draft-ietf-httpbis-message-signatures-00 does not specify the ECDSA encoding. - # Issue: https://github.com/w3c-ccg/http-signatures/issues/107 - signature = DSS.new(key=self.private_key, mode=sig_alg, - encoding='der').sign(digest) - else: - raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) - else: - raise Exception("Unsupported private key: {0}".format(type(self.private_key))) - return b64encode(signature) - - def _get_authorization_header(self, signed_headers, signed_msg): - """Calculates and returns the value of the 'Authorization' header when signing HTTP requests. - - :param signed_headers : A list of tuples. Each value is the name of a HTTP header that - must be included in the HTTP signature calculation. - :param signed_msg: A base-64 encoded string representation of the signature. - :return: The string value of the 'Authorization' header, representing the signature - of the HTTP request. - """ - created_ts = None - expires_ts = None - for k, v in signed_headers: - if k == HEADER_CREATED: - created_ts = v - elif k == HEADER_EXPIRES: - expires_ts = v - lower_keys = [k.lower() for k, v in signed_headers] - headers_value = " ".join(lower_keys) - - auth_str = "Signature keyId=\"{0}\",algorithm=\"{1}\",".format( - self.key_id, self.signing_scheme) - if created_ts is not None: - auth_str = auth_str + "created={0},".format(created_ts) - if expires_ts is not None: - auth_str = auth_str + "expires={0},".format(expires_ts) - auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( - headers_value, signed_msg.decode('ascii')) - - return auth_str diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 906a633a051..d1d2d1e982b 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -11,12 +11,12 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] Name: typing_extensions.TypeAlias = schemas.Int32Schema -_Class: typing_extensions.TypeAlias = schemas.StrSchema +Class: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { "name": typing.Type[Name], - "class": typing.Type[_Class], + "class": typing.Type[Class], } ) @@ -37,12 +37,17 @@ def __new__( int, schemas.Unset ] = schemas.unset, + class: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("name", name), + ("class", class), ): if isinstance(val, schemas.Unset): continue @@ -71,6 +76,16 @@ def name(self) -> typing.Union[int, schemas.Unset]: val ) + @property + def class(self) -> typing.Union[str, schemas.Unset]: + val = self.get("class", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index 5918550f9b3..c581055677d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -365,13 +365,13 @@ public void execute() { } if (!isNotEmpty(artifactId) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("artifactId"))) { // if packageName is passed as an additional property warn them - LOGGER.warn("Deprecated command line arg: artifactId should be passed in using --artifact-id from now on"); + LOGGER.warn("Deprecated --additional-properties command line arg: artifactId should be passed in using --artifact-id from now on"); artifactId = (String) configurator.getAdditionalProperties().get("artifactId"); configurator.setArtifactId(artifactId); } if (hideGenerationTimestamp == null && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("hideGenerationTimestamp"))) { // if packageName is passed as an additional property warn them - LOGGER.warn("Deprecated command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); + LOGGER.warn("Deprecated --additional-properties command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); hideGenerationTimestamp = (Boolean) configurator.getAdditionalProperties().get("hideGenerationTimestamp"); configurator.setHideGenerationTimestamp(hideGenerationTimestamp); } diff --git a/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java index 384c239d1a9..1d9a516c73d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java @@ -6,8 +6,11 @@ import com.fasterxml.jackson.annotation.JsonUnwrapped; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.apache.commons.lang3.StringUtils; +import org.openapijsonschematools.codegen.clicommands.Generate; import org.openapijsonschematools.codegen.templating.TemplateDefinition; import org.openapijsonschematools.codegen.templating.TemplateFileType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.lang.reflect.Field; import java.util.*; @@ -20,6 +23,7 @@ */ @SuppressWarnings({"unused", "WeakerAccess"}) public class DynamicSettings { + private final Logger LOGGER = LoggerFactory.getLogger(DynamicSettings.class); @JsonAnySetter private Map dynamicProperties = new HashMap<>(); @@ -70,7 +74,14 @@ public GeneratorSettings getGeneratorSettings() { for (Map.Entry entry : dynamicProperties.entrySet()) { builder.withAdditionalProperty(entry.getKey(), entry.getValue()); } - + if (generatorSettings.getArtifactId() == null && generatorSettings.getAdditionalProperties().containsKey("artifactId")) { + LOGGER.warn("Deprecated additionalProperties arg: artifactId should be passed in at the root level of the config file from now on"); + builder.withArtifactId((String) generatorSettings.getAdditionalProperties().get("artifactId")); + } + if (generatorSettings.getPackageName() == null && generatorSettings.getAdditionalProperties().containsKey("packageName")) { + LOGGER.warn("Deprecated additionalProperties arg: packageName should be passed in at the root level of the config file from now on"); + builder.withPackageName((String) generatorSettings.getAdditionalProperties().get("packageName")); + } return builder.build(); } @@ -81,8 +92,13 @@ public GeneratorSettings getGeneratorSettings() { */ public WorkflowSettings getWorkflowSettings() { excludeSettingsFromDynamicProperties(); - return WorkflowSettings.newBuilder(workflowSettings) - .build(); + WorkflowSettings.Builder builder = WorkflowSettings.newBuilder(workflowSettings); + if (generatorSettings.getAdditionalProperties().containsKey("hideGenerationTimestamp")) { + LOGGER.warn("Deprecated additionalProperties arg: hideGenerationTimestamp should be passed in at the root level of the config file from now on"); + Boolean hideGenerationTimestamp = Boolean.valueOf((String) generatorSettings.getAdditionalProperties().get("hideGenerationTimestamp")); + builder.withHideGenerationTimestamp(hideGenerationTimestamp); + } + return builder.build(); } /** diff --git a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java index 70bacc92453..7768bb5ffdb 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/WorkflowSettings.java @@ -67,7 +67,7 @@ public class WorkflowSettings { private String ignoreFileOverride; private Map globalProperties = DEFAULT_GLOBAL_PROPERTIES; private boolean removeEnumValuePrefix = DEFAULT_REMOVE_ENUM_VALUE_PREFIX; - private boolean hideGenerationTimestamp = DEFAULT_HIDE_GENERATION_TIMESTAMP; + private Boolean hideGenerationTimestamp = DEFAULT_HIDE_GENERATION_TIMESTAMP; private WorkflowSettings(Builder builder) { this.inputSpec = builder.inputSpec; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 51ae3c1578d..2a849831d33 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -156,8 +156,8 @@ private static Map getInitialAdditionalProperties(GeneratorSetti return initialAddProps; } - protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { - this.generatorSettings = CodeGeneratorSettings.of(generatorSettings, workflowSettings, embeddedTemplateDir, packageNameDefault, outputFolderDefault); + protected DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String artifactIdDefault, String outputFolderDefault) { + this.generatorSettings = CodeGeneratorSettings.of(generatorSettings, workflowSettings, embeddedTemplateDir, packageNameDefault, artifactIdDefault, outputFolderDefault); additionalProperties = getInitialAdditionalProperties(generatorSettings, this.generatorSettings); // name formatting options @@ -177,6 +177,7 @@ public DefaultGenerator(GeneratorSettings generatorSettings, WorkflowSettings wo workflowSettings, "java", "openapiclient", + "openapiclient", "generated-code" + File.separator + "java" ); } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index f1201806d8b..94fd11132fa 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -92,6 +92,7 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, "java", "org.openapijsonschematools.client", + "openapi-java-client", "generated-code" + File.separator + "java" ); if (this.outputTestFolder.isEmpty()) { @@ -103,7 +104,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC).defaultValue(this.getInvokerPackage())); cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC).defaultValue(this.getGroupId())); - cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC).defaultValue(this.getArtifactId())); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC).defaultValue(ARTIFACT_VERSION_DEFAULT_VALUE)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_URL, CodegenConstants.ARTIFACT_URL_DESC).defaultValue(this.getArtifactUrl())); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_DESCRIPTION, CodegenConstants.ARTIFACT_DESCRIPTION_DESC).defaultValue(this.getArtifactDescription())); @@ -139,13 +139,10 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings arrayObjectInputClassNameSuffix = "Builder"; invokerPackage = "org.openapijsonschematools.client"; - artifactId = "openapi-java-client"; modelPackage = "components.schemas"; // cliOptions default redefinition need to be updated updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); - updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); -// updateOption(CodegenConstants.API_PACKAGE, apiPackage); jsonPathTestTemplateFiles.put( CodegenConstants.JSON_PATH_LOCATION_TYPE.SCHEMA, @@ -167,7 +164,6 @@ public JavaClientGenerator(GeneratorSettings generatorSettings, WorkflowSettings protected String invokerPackage = "org.openapijsonschematools"; protected String groupId = "org.openapijsonschematools"; - protected String artifactId = "openapi-java"; protected String artifactVersion = null; protected String artifactUrl = "https://github.com/openapi-json-schema-tools/openapi-json-schema-generator"; protected String artifactDescription = "OpenAPI Java"; @@ -463,13 +459,6 @@ public void processOpts() { additionalProperties.put(CodegenConstants.GROUP_ID, groupId); } - if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_ID)) { - this.setArtifactId((String) additionalProperties.get(CodegenConstants.ARTIFACT_ID)); - } else { - //not set, use to be passed to template - additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId); - } - if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_URL)) { this.setArtifactUrl((String) additionalProperties.get(CodegenConstants.ARTIFACT_URL)); } else { @@ -3270,14 +3259,6 @@ public void setGroupId(String groupId) { this.groupId = groupId; } - public String getArtifactId() { - return artifactId; - } - - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - public String getArtifactVersion() { return artifactVersion; } diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java index 0e6741bb0b5..b524ab0312d 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/PythonClientGenerator.java @@ -316,6 +316,7 @@ public PythonClientGenerator(GeneratorSettings generatorSettings, WorkflowSettin workflowSettings, "python", "openapi_client", + "openapi_client", "generated_code" + File.separator + "python" ); testFolder = "test"; diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java index b4fd1e0e865..8f1a4bfa682 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/models/CodeGeneratorSettings.java @@ -7,6 +7,7 @@ public class CodeGeneratorSettings { public final String apiPackage; + public final String artifactId; public final String outputFolder; public final String templateDir; public final String embeddedTemplateDir; @@ -24,6 +25,7 @@ public class CodeGeneratorSettings { public final boolean hideGenerationTimestamp; public CodeGeneratorSettings( String apiPackage, + String artifactId, String outputFolder, String templateDir, String embeddedTemplateDir, @@ -41,6 +43,7 @@ public CodeGeneratorSettings( boolean hideGenerationTimestamp ) { this.apiPackage = apiPackage; + this.artifactId = artifactId; this.outputFolder = outputFolder; this.templateDir = templateDir; this.embeddedTemplateDir = embeddedTemplateDir; @@ -58,9 +61,10 @@ public CodeGeneratorSettings( this.hideGenerationTimestamp = hideGenerationTimestamp; } - public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String outputFolderDefault) { - String defaultApiPackage = "apis"; - String apiPackage = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getApiPackage(), defaultApiPackage) : defaultApiPackage; + public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, WorkflowSettings workflowSettings, String embeddedTemplateDir, String packageNameDefault, String artifactIdDefault, String outputFolderDefault) { + String apiPackageDefault = "apis"; + String apiPackage = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getApiPackage(), apiPackageDefault) : apiPackageDefault; + String artifactId = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getArtifactId(), artifactIdDefault) : artifactIdDefault; String packageName = generatorSettings != null ? Objects.requireNonNullElse(generatorSettings.getPackageName(), packageNameDefault) : packageNameDefault; String outputDir = workflowSettings != null ? workflowSettings.getOutputDir() : outputFolderDefault; String templateDir = workflowSettings != null ? workflowSettings.getTemplateDir() : null; @@ -77,6 +81,7 @@ public static CodeGeneratorSettings of(GeneratorSettings generatorSettings, Work boolean hideGenerationTimestamp = workflowSettings != null ? workflowSettings.isHideGenerationTimestamp() : WorkflowSettings.DEFAULT_HIDE_GENERATION_TIMESTAMP; return new CodeGeneratorSettings( apiPackage, + artifactId, outputDir, templateDir, embeddedTemplateDir, From 4d54774c98d0b5b71f8d1f9b9c6bd02690cc88ce Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 12:52:41 -0700 Subject: [PATCH 34/44] Samples regen --- .../python/.openapi-generator/FILES | 3606 +++++----- .../client/3_0_3_unit_test/python/README.md | 2 +- .../apis/tags/additional_properties_api.md | 2 +- .../python/docs/apis/tags/all_of_api.md | 2 +- .../python/docs/apis/tags/any_of_api.md | 2 +- .../docs/apis/tags/content_type_json_api.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../python/docs/apis/tags/enum_api.md | 2 +- .../python/docs/apis/tags/format_api.md | 2 +- .../python/docs/apis/tags/items_api.md | 2 +- .../python/docs/apis/tags/max_items_api.md | 2 +- .../python/docs/apis/tags/max_length_api.md | 2 +- .../docs/apis/tags/max_properties_api.md | 2 +- .../python/docs/apis/tags/maximum_api.md | 2 +- .../python/docs/apis/tags/min_items_api.md | 2 +- .../python/docs/apis/tags/min_length_api.md | 2 +- .../docs/apis/tags/min_properties_api.md | 2 +- .../python/docs/apis/tags/minimum_api.md | 2 +- .../python/docs/apis/tags/multiple_of_api.md | 2 +- .../python/docs/apis/tags/not_api.md | 2 +- .../python/docs/apis/tags/one_of_api.md | 2 +- .../apis/tags/operation_request_body_api.md | 2 +- .../python/docs/apis/tags/path_post_api.md | 2 +- .../python/docs/apis/tags/pattern_api.md | 2 +- .../python/docs/apis/tags/properties_api.md | 2 +- .../python/docs/apis/tags/ref_api.md | 2 +- .../python/docs/apis/tags/required_api.md | 2 +- ...esponse_content_content_type_schema_api.md | 2 +- .../python/docs/apis/tags/type_api.md | 2 +- .../python/docs/apis/tags/unique_items_api.md | 2 +- ...s_allows_a_schema_which_should_validate.md | 2 +- ...tionalproperties_are_allowed_by_default.md | 2 +- ...dditionalproperties_can_exist_by_itself.md | 2 +- ...operties_should_not_look_in_applicators.md | 2 +- .../python/docs/components/schema/allof.md | 2 +- .../schema/allof_combined_with_anyof_oneof.md | 2 +- .../components/schema/allof_simple_types.md | 2 +- .../schema/allof_with_base_schema.md | 2 +- .../schema/allof_with_one_empty_schema.md | 2 +- .../allof_with_the_first_empty_schema.md | 2 +- .../allof_with_the_last_empty_schema.md | 2 +- .../schema/allof_with_two_empty_schemas.md | 2 +- .../python/docs/components/schema/anyof.md | 2 +- .../components/schema/anyof_complex_types.md | 2 +- .../schema/anyof_with_base_schema.md | 2 +- .../schema/anyof_with_one_empty_schema.md | 2 +- .../schema/array_type_matches_arrays.md | 2 +- .../schema/boolean_type_matches_booleans.md | 2 +- .../python/docs/components/schema/by_int.md | 2 +- .../docs/components/schema/by_number.md | 2 +- .../docs/components/schema/by_small_number.md | 2 +- .../components/schema/date_time_format.md | 2 +- .../docs/components/schema/email_format.md | 2 +- .../schema/enum_with0_does_not_match_false.md | 2 +- .../schema/enum_with1_does_not_match_true.md | 2 +- .../schema/enum_with_escaped_characters.md | 2 +- .../schema/enum_with_false_does_not_match0.md | 2 +- .../schema/enum_with_true_does_not_match1.md | 2 +- .../components/schema/enums_in_properties.md | 2 +- .../components/schema/forbidden_property.md | 2 +- .../docs/components/schema/hostname_format.md | 2 +- .../schema/integer_type_matches_integers.md | 2 +- ...not_raise_error_when_float_division_inf.md | 2 +- .../invalid_string_value_for_default.md | 2 +- .../docs/components/schema/ipv4_format.md | 2 +- .../docs/components/schema/ipv6_format.md | 2 +- .../components/schema/json_pointer_format.md | 2 +- .../components/schema/maximum_validation.md | 2 +- ...aximum_validation_with_unsigned_integer.md | 2 +- .../components/schema/maxitems_validation.md | 2 +- .../components/schema/maxlength_validation.md | 2 +- ...axproperties0_means_the_object_is_empty.md | 2 +- .../schema/maxproperties_validation.md | 2 +- .../components/schema/minimum_validation.md | 2 +- .../minimum_validation_with_signed_integer.md | 2 +- .../components/schema/minitems_validation.md | 2 +- .../components/schema/minlength_validation.md | 2 +- .../schema/minproperties_validation.md | 2 +- ...ted_allof_to_check_validation_semantics.md | 2 +- ...ted_anyof_to_check_validation_semantics.md | 2 +- .../docs/components/schema/nested_items.md | 2 +- ...ted_oneof_to_check_validation_semantics.md | 2 +- .../python/docs/components/schema/not.md | 2 +- .../schema/not_more_complex_schema.md | 2 +- .../schema/nul_characters_in_strings.md | 2 +- .../null_type_matches_only_the_null_object.md | 2 +- .../schema/number_type_matches_numbers.md | 2 +- .../schema/object_properties_validation.md | 2 +- .../schema/object_type_matches_objects.md | 2 +- .../python/docs/components/schema/oneof.md | 2 +- .../components/schema/oneof_complex_types.md | 2 +- .../schema/oneof_with_base_schema.md | 2 +- .../schema/oneof_with_empty_schema.md | 2 +- .../components/schema/oneof_with_required.md | 2 +- .../schema/pattern_is_not_anchored.md | 2 +- .../components/schema/pattern_validation.md | 2 +- .../properties_with_escaped_characters.md | 2 +- ...perty_named_ref_that_is_not_a_reference.md | 2 +- .../schema/ref_in_additionalproperties.md | 2 +- .../docs/components/schema/ref_in_allof.md | 2 +- .../docs/components/schema/ref_in_anyof.md | 2 +- .../docs/components/schema/ref_in_items.md | 2 +- .../docs/components/schema/ref_in_not.md | 2 +- .../docs/components/schema/ref_in_oneof.md | 2 +- .../docs/components/schema/ref_in_property.md | 2 +- .../schema/required_default_validation.md | 2 +- .../components/schema/required_validation.md | 2 +- .../schema/required_with_empty_array.md | 2 +- .../required_with_escaped_characters.md | 2 +- .../schema/simple_enum_validation.md | 2 +- .../schema/string_type_matches_strings.md | 2 +- ..._do_anything_if_the_property_is_missing.md | 2 +- .../schema/uniqueitems_false_validation.md | 2 +- .../schema/uniqueitems_validation.md | 2 +- .../docs/components/schema/uri_format.md | 2 +- .../components/schema/uri_reference_format.md | 2 +- .../components/schema/uri_template_format.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../3_0_3_unit_test/python/pyproject.toml | 2 +- .../src/unit_test_api/apis/tag_to_api.py | 6 +- .../src/unit_test_api/apis/tags/not_api.py | 31 + .../unit_test_api/components/schema/not.py | 27 + .../schema/not_more_complex_schema.py | 8 +- .../components/schema/ref_in_allof.py | 2 - .../components/schema/ref_in_anyof.py | 2 - .../components/schema/ref_in_not.py | 2 - .../components/schema/ref_in_oneof.py | 2 - .../components/schemas/__init__.py | 2 +- .../post/operation.py | 2 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../java/.openapi-generator/FILES | 771 ++- samples/client/3_1_0_unit_test/java/README.md | 8 +- .../schemas/ASchemaGivenForPrefixitems.md | 6 +- .../AdditionalItemsAreAllowedByDefault.md | 4 +- ...AdditionalpropertiesAreAllowedByDefault.md | 6 +- .../AdditionalpropertiesCanExistByItself.md | 18 +- ...ionalpropertiesDoesNotLookInApplicators.md | 6 +- ...pertiesWithNullValuedInstanceProperties.md | 18 +- .../schemas/AdditionalpropertiesWithSchema.md | 22 +- .../java/docs/components/schemas/Allof.md | 6 +- .../schemas/AllofCombinedWithAnyofOneof.md | 2 +- .../components/schemas/AllofSimpleTypes.md | 2 +- .../components/schemas/AllofWithBaseSchema.md | 8 +- .../schemas/AllofWithOneEmptySchema.md | 4 +- .../schemas/AllofWithTheFirstEmptySchema.md | 6 +- .../schemas/AllofWithTheLastEmptySchema.md | 6 +- .../schemas/AllofWithTwoEmptySchemas.md | 6 +- .../java/docs/components/schemas/Anyof.md | 4 +- .../components/schemas/AnyofComplexTypes.md | 6 +- .../components/schemas/AnyofWithBaseSchema.md | 16 +- .../schemas/AnyofWithOneEmptySchema.md | 6 +- .../schemas/ArrayTypeMatchesArrays.md | 4 +- .../schemas/BooleanTypeMatchesBooleans.md | 4 +- .../java/docs/components/schemas/ByInt.md | 2 +- .../java/docs/components/schemas/ByNumber.md | 2 +- .../docs/components/schemas/BySmallNumber.md | 2 +- .../schemas/ConstNulCharactersInStrings.md | 2 +- .../schemas/ContainsKeywordValidation.md | 2 +- .../ContainsWithNullInstanceElements.md | 4 +- .../docs/components/schemas/DateFormat.md | 2 +- .../docs/components/schemas/DateTimeFormat.md | 2 +- ...chemasDependenciesWithEscapedCharacters.md | 2 +- ...sDependentSubschemaIncompatibleWithRoot.md | 22 +- .../DependentSchemasSingleDependency.md | 6 +- .../docs/components/schemas/DurationFormat.md | 2 +- .../docs/components/schemas/EmailFormat.md | 2 +- .../components/schemas/EmptyDependents.md | 2 +- .../schemas/EnumWith0DoesNotMatchFalse.md | 16 +- .../schemas/EnumWith1DoesNotMatchTrue.md | 16 +- .../schemas/EnumWithEscapedCharacters.md | 16 +- .../schemas/EnumWithFalseDoesNotMatch0.md | 16 +- .../schemas/EnumWithTrueDoesNotMatch1.md | 16 +- .../components/schemas/EnumsInProperties.md | 44 +- .../schemas/ExclusivemaximumValidation.md | 2 +- .../schemas/ExclusiveminimumValidation.md | 2 +- .../components/schemas/FloatDivisionInf.md | 16 +- .../components/schemas/ForbiddenProperty.md | 4 +- .../docs/components/schemas/HostnameFormat.md | 2 +- .../docs/components/schemas/IdnEmailFormat.md | 2 +- .../components/schemas/IdnHostnameFormat.md | 2 +- .../schemas/IfAndElseWithoutThen.md | 2 +- .../schemas/IfAndThenWithoutElse.md | 2 +- ...WhenSerializedKeywordProcessingSequence.md | 2 +- .../components/schemas/IgnoreElseWithoutIf.md | 2 +- .../schemas/IgnoreIfWithoutThenOrElse.md | 2 +- .../components/schemas/IgnoreThenWithoutIf.md | 2 +- .../schemas/IntegerTypeMatchesIntegers.md | 4 +- .../docs/components/schemas/Ipv4Format.md | 2 +- .../docs/components/schemas/Ipv6Format.md | 2 +- .../java/docs/components/schemas/IriFormat.md | 2 +- .../components/schemas/IriReferenceFormat.md | 2 +- .../docs/components/schemas/ItemsContains.md | 16 +- .../ItemsDoesNotLookInApplicatorsValidCase.md | 16 +- .../schemas/ItemsWithNullInstanceElements.md | 18 +- .../components/schemas/JsonPointerFormat.md | 2 +- .../MaxcontainsWithoutContainsIsIgnored.md | 2 +- .../components/schemas/MaximumValidation.md | 2 +- .../MaximumValidationWithUnsignedInteger.md | 2 +- .../components/schemas/MaxitemsValidation.md | 2 +- .../components/schemas/MaxlengthValidation.md | 2 +- .../Maxproperties0MeansTheObjectIsEmpty.md | 2 +- .../schemas/MaxpropertiesValidation.md | 2 +- .../MincontainsWithoutContainsIsIgnored.md | 2 +- .../components/schemas/MinimumValidation.md | 2 +- .../MinimumValidationWithSignedInteger.md | 2 +- .../components/schemas/MinitemsValidation.md | 2 +- .../components/schemas/MinlengthValidation.md | 2 +- .../schemas/MinpropertiesValidation.md | 2 +- .../schemas/MultipleDependentsRequired.md | 2 +- ...multaneousPatternpropertiesAreValidated.md | 4 +- .../MultipleTypesCanBeSpecifiedInAnArray.md | 16 +- .../NestedAllofToCheckValidationSemantics.md | 4 +- .../NestedAnyofToCheckValidationSemantics.md | 4 +- .../docs/components/schemas/NestedItems.md | 60 +- .../NestedOneofToCheckValidationSemantics.md | 4 +- ...NonAsciiPatternWithAdditionalproperties.md | 20 +- .../NonInterferenceAcrossCombinedSchemas.md | 2 +- .../java/docs/components/schemas/Not.md | 4 +- .../schemas/NotMoreComplexSchema.md | 18 +- .../components/schemas/NotMultipleTypes.md | 16 +- .../schemas/NulCharactersInStrings.md | 16 +- .../NullTypeMatchesOnlyTheNullObject.md | 4 +- .../schemas/NumberTypeMatchesNumbers.md | 4 +- .../schemas/ObjectPropertiesValidation.md | 6 +- .../schemas/ObjectTypeMatchesObjects.md | 4 +- .../java/docs/components/schemas/Oneof.md | 4 +- .../components/schemas/OneofComplexTypes.md | 6 +- .../components/schemas/OneofWithBaseSchema.md | 16 +- .../schemas/OneofWithEmptySchema.md | 6 +- .../components/schemas/OneofWithRequired.md | 2 +- .../schemas/PatternIsNotAnchored.md | 2 +- .../components/schemas/PatternValidation.md | 2 +- ...ertiesValidatesPropertiesMatchingARegex.md | 4 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- ...lidationAdjustsTheStartingIndexForItems.md | 20 +- .../PrefixitemsWithNullInstanceElements.md | 4 +- ...opertiesAdditionalpropertiesInteraction.md | 20 +- ...seNamesAreJavascriptObjectPropertyNames.md | 8 +- .../PropertiesWithEscapedCharacters.md | 14 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- .../PropertyNamedRefThatIsNotAReference.md | 4 +- .../schemas/PropertynamesValidation.md | 16 +- .../docs/components/schemas/RegexFormat.md | 2 +- ...NotAnchoredByDefaultAndAreCaseSensitive.md | 6 +- .../schemas/RelativeJsonPointerFormat.md | 2 +- .../schemas/RequiredDefaultValidation.md | 4 +- ...seNamesAreJavascriptObjectPropertyNames.md | 2 +- .../components/schemas/RequiredValidation.md | 6 +- .../schemas/RequiredWithEmptyArray.md | 4 +- .../schemas/RequiredWithEscapedCharacters.md | 2 +- .../schemas/SimpleEnumValidation.md | 16 +- .../components/schemas/SingleDependency.md | 2 +- .../schemas/SmallMultipleOfLargeInteger.md | 16 +- .../schemas/StringTypeMatchesStrings.md | 4 +- .../docs/components/schemas/TimeFormat.md | 2 +- .../schemas/TypeArrayObjectOrNull.md | 16 +- .../components/schemas/TypeArrayOrObject.md | 2 +- .../schemas/TypeAsArrayWithOneItem.md | 4 +- .../schemas/UnevaluateditemsAsSchema.md | 4 +- ...teditemsDependsOnMultipleNestedContains.md | 2 +- .../schemas/UnevaluateditemsWithItems.md | 20 +- ...nevaluateditemsWithNullInstanceElements.md | 4 +- ...tedpropertiesNotAffectedByPropertynames.md | 18 +- .../schemas/UnevaluatedpropertiesSchema.md | 16 +- ...pertiesWithAdjacentAdditionalproperties.md | 22 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- .../schemas/UniqueitemsFalseValidation.md | 2 +- .../UniqueitemsFalseWithAnArrayOfItems.md | 6 +- .../schemas/UniqueitemsValidation.md | 2 +- .../schemas/UniqueitemsWithAnArrayOfItems.md | 6 +- .../java/docs/components/schemas/UriFormat.md | 2 +- .../components/schemas/UriReferenceFormat.md | 2 +- .../components/schemas/UriTemplateFormat.md | 2 +- .../docs/components/schemas/UuidFormat.md | 2 +- .../ValidateAgainstCorrectBranchThenVsElse.md | 2 +- .../java/docs/servers/RootServer0.md | 2 +- samples/client/3_1_0_unit_test/java/pom.xml | 4 +- .../java/unit_test_api/RootServerInfo.java | 46 + .../unit_test_api/apiclient/ApiClient.java | 39 + .../schemas/ASchemaGivenForPrefixitems.java | 426 ++ .../AdditionalItemsAreAllowedByDefault.java | 413 ++ ...ditionalpropertiesAreAllowedByDefault.java | 531 ++ .../AdditionalpropertiesCanExistByItself.java | 194 + ...nalpropertiesDoesNotLookInApplicators.java | 806 +++ ...rtiesWithNullValuedInstanceProperties.java | 189 + .../AdditionalpropertiesWithSchema.java | 357 + .../components/schemas/Allof.java | 1098 +++ .../schemas/AllofCombinedWithAnyofOneof.java | 1190 ++++ .../components/schemas/AllofSimpleTypes.java | 900 +++ .../schemas/AllofWithBaseSchema.java | 1192 ++++ .../schemas/AllofWithOneEmptySchema.java | 340 + .../schemas/AllofWithTheFirstEmptySchema.java | 352 + .../schemas/AllofWithTheLastEmptySchema.java | 352 + .../schemas/AllofWithTwoEmptySchemas.java | 352 + .../components/schemas/Anyof.java | 626 ++ .../components/schemas/AnyofComplexTypes.java | 1098 +++ .../schemas/AnyofWithBaseSchema.java | 669 ++ .../schemas/AnyofWithOneEmptySchema.java | 352 + .../schemas/ArrayTypeMatchesArrays.java | 20 + .../schemas/BooleanTypeMatchesBooleans.java | 19 + .../components/schemas/ByInt.java | 328 + .../components/schemas/ByNumber.java | 328 + .../components/schemas/BySmallNumber.java | 328 + .../schemas/ConstNulCharactersInStrings.java | 341 + .../schemas/ContainsKeywordValidation.java | 612 ++ .../ContainsWithNullInstanceElements.java | 339 + .../components/schemas/DateFormat.java | 327 + .../components/schemas/DateTimeFormat.java | 327 + ...emasDependenciesWithEscapedCharacters.java | 1018 +++ ...ependentSubschemaIncompatibleWithRoot.java | 672 ++ .../DependentSchemasSingleDependency.java | 770 +++ .../components/schemas/DurationFormat.java | 327 + .../components/schemas/EmailFormat.java | 327 + .../components/schemas/EmptyDependents.java | 336 + .../schemas/EnumWith0DoesNotMatchFalse.java | 195 + .../schemas/EnumWith1DoesNotMatchTrue.java | 195 + .../schemas/EnumWithEscapedCharacters.java | 120 + .../schemas/EnumWithFalseDoesNotMatch0.java | 119 + .../schemas/EnumWithTrueDoesNotMatch1.java | 119 + .../components/schemas/EnumsInProperties.java | 427 ++ .../schemas/ExclusivemaximumValidation.java | 327 + .../schemas/ExclusiveminimumValidation.java | 327 + .../components/schemas/FloatDivisionInf.java | 117 + .../components/schemas/ForbiddenProperty.java | 735 +++ .../components/schemas/HostnameFormat.java | 327 + .../components/schemas/IdnEmailFormat.java | 327 + .../components/schemas/IdnHostnameFormat.java | 327 + .../schemas/IfAndElseWithoutThen.java | 899 +++ .../schemas/IfAndThenWithoutElse.java | 898 +++ ...enSerializedKeywordProcessingSequence.java | 1210 ++++ .../schemas/IgnoreElseWithoutIf.java | 626 ++ .../schemas/IgnoreIfWithoutThenOrElse.java | 626 ++ .../schemas/IgnoreThenWithoutIf.java | 626 ++ .../schemas/IntegerTypeMatchesIntegers.java | 19 + .../components/schemas/Ipv4Format.java | 327 + .../components/schemas/Ipv6Format.java | 327 + .../components/schemas/IriFormat.java | 327 + .../schemas/IriReferenceFormat.java | 327 + .../components/schemas/ItemsContains.java | 773 +++ ...temsDoesNotLookInApplicatorsValidCase.java | 486 ++ .../ItemsWithNullInstanceElements.java | 163 + .../components/schemas/JsonPointerFormat.java | 327 + .../MaxcontainsWithoutContainsIsIgnored.java | 327 + .../components/schemas/MaximumValidation.java | 327 + .../MaximumValidationWithUnsignedInteger.java | 327 + .../schemas/MaxitemsValidation.java | 327 + .../schemas/MaxlengthValidation.java | 327 + .../Maxproperties0MeansTheObjectIsEmpty.java | 327 + .../schemas/MaxpropertiesValidation.java | 327 + .../MincontainsWithoutContainsIsIgnored.java | 327 + .../components/schemas/MinimumValidation.java | 327 + .../MinimumValidationWithSignedInteger.java | 327 + .../schemas/MinitemsValidation.java | 327 + .../schemas/MinlengthValidation.java | 327 + .../schemas/MinpropertiesValidation.java | 327 + .../schemas/MultipleDependentsRequired.java | 338 + ...ltaneousPatternpropertiesAreValidated.java | 629 ++ .../MultipleTypesCanBeSpecifiedInAnArray.java | 146 + ...NestedAllofToCheckValidationSemantics.java | 627 ++ ...NestedAnyofToCheckValidationSemantics.java | 627 ++ .../components/schemas/NestedItems.java | 544 ++ ...NestedOneofToCheckValidationSemantics.java | 627 ++ ...nAsciiPatternWithAdditionalproperties.java | 180 + .../NonInterferenceAcrossCombinedSchemas.java | 2041 ++++++ .../unit_test_api/components/schemas/Not.java | 338 + .../schemas/NotMoreComplexSchema.java | 497 ++ .../components/schemas/NotMultipleTypes.java | 448 ++ .../schemas/NulCharactersInStrings.java | 118 + .../NullTypeMatchesOnlyTheNullObject.java | 19 + .../schemas/NumberTypeMatchesNumbers.java | 19 + .../schemas/ObjectPropertiesValidation.java | 466 ++ .../schemas/ObjectTypeMatchesObjects.java | 20 + .../components/schemas/Oneof.java | 626 ++ .../components/schemas/OneofComplexTypes.java | 1098 +++ .../schemas/OneofWithBaseSchema.java | 669 ++ .../schemas/OneofWithEmptySchema.java | 352 + .../components/schemas/OneofWithRequired.java | 1143 ++++ .../schemas/PatternIsNotAnchored.java | 330 + .../components/schemas/PatternValidation.java | 330 + ...tiesValidatesPropertiesMatchingARegex.java | 343 + ...rtiesWithNullValuedInstanceProperties.java | 343 + ...dationAdjustsTheStartingIndexForItems.java | 198 + .../PrefixitemsWithNullInstanceElements.java | 413 ++ ...ertiesAdditionalpropertiesInteraction.java | 673 ++ ...NamesAreJavascriptObjectPropertyNames.java | 913 +++ .../PropertiesWithEscapedCharacters.java | 647 ++ ...rtiesWithNullValuedInstanceProperties.java | 409 ++ .../PropertyNamedRefThatIsNotAReference.java | 399 ++ .../schemas/PropertynamesValidation.java | 397 ++ .../components/schemas/RegexFormat.java | 327 + ...tAnchoredByDefaultAndAreCaseSensitive.java | 356 + .../schemas/RelativeJsonPointerFormat.java | 327 + .../schemas/RequiredDefaultValidation.java | 451 ++ ...NamesAreJavascriptObjectPropertyNames.java | 677 ++ .../schemas/RequiredValidation.java | 549 ++ .../schemas/RequiredWithEmptyArray.java | 451 ++ .../RequiredWithEscapedCharacters.java | 1947 ++++++ .../schemas/SimpleEnumValidation.java | 205 + .../components/schemas/SingleDependency.java | 337 + .../schemas/SmallMultipleOfLargeInteger.java | 117 + .../schemas/StringTypeMatchesStrings.java | 19 + .../components/schemas/TimeFormat.java | 327 + .../schemas/TypeArrayObjectOrNull.java | 205 + .../components/schemas/TypeArrayOrObject.java | 174 + .../schemas/TypeAsArrayWithOneItem.java | 19 + .../schemas/UnevaluateditemsAsSchema.java | 339 + ...ditemsDependsOnMultipleNestedContains.java | 1757 +++++ .../schemas/UnevaluateditemsWithItems.java | 191 + ...valuateditemsWithNullInstanceElements.java | 339 + ...dpropertiesNotAffectedByPropertynames.java | 410 ++ .../schemas/UnevaluatedpropertiesSchema.java | 195 + ...rtiesWithAdjacentAdditionalproperties.java | 301 + ...rtiesWithNullValuedInstanceProperties.java | 339 + .../schemas/UniqueitemsFalseValidation.java | 327 + .../UniqueitemsFalseWithAnArrayOfItems.java | 426 ++ .../schemas/UniqueitemsValidation.java | 327 + .../UniqueitemsWithAnArrayOfItems.java | 426 ++ .../components/schemas/UriFormat.java | 327 + .../schemas/UriReferenceFormat.java | 327 + .../components/schemas/UriTemplateFormat.java | 327 + .../components/schemas/UuidFormat.java | 327 + ...alidateAgainstCorrectBranchThenVsElse.java | 1185 ++++ .../configurations/ApiConfiguration.java | 101 + .../JsonSchemaKeywordFlags.java | 334 + .../configurations/SchemaConfiguration.java | 4 + .../contenttype/ContentTypeDeserializer.java | 18 + .../contenttype/ContentTypeDetector.java | 18 + .../contenttype/ContentTypeSerializer.java | 18 + .../exceptions/ApiException.java | 13 + .../exceptions/BaseException.java | 8 + .../InvalidAdditionalPropertyException.java | 8 + .../exceptions/NotImplementedException.java | 8 + .../exceptions/UnsetPropertyException.java | 8 + .../exceptions/ValidationException.java | 8 + .../unit_test_api/header/ContentHeader.java | 59 + .../java/unit_test_api/header/Header.java | 14 + .../java/unit_test_api/header/HeaderBase.java | 18 + .../header/PrefixSeparatorIterator.java | 27 + .../header/Rfc6570Serializer.java | 193 + .../unit_test_api/header/SchemaHeader.java | 97 + .../unit_test_api/header/StyleSerializer.java | 99 + .../unit_test_api/mediatype/Encoding.java | 30 + .../unit_test_api/mediatype/MediaType.java | 16 + .../parameter/ContentParameter.java | 30 + .../parameter/CookieSerializer.java | 36 + .../parameter/HeadersSerializer.java | 32 + .../unit_test_api/parameter/Parameter.java | 10 + .../parameter/ParameterBase.java | 15 + .../parameter/ParameterInType.java | 8 + .../parameter/ParameterStyle.java | 11 + .../parameter/PathSerializer.java | 30 + .../parameter/QuerySerializer.java | 48 + .../parameter/SchemaParameter.java | 60 + .../requestbody/GenericRequestBody.java | 6 + .../requestbody/RequestBodySerializer.java | 47 + .../requestbody/SerializedRequestBody.java | 13 + .../unit_test_api/response/ApiResponse.java | 9 + .../response/DeserializedHttpResponse.java | 6 + .../response/HeadersDeserializer.java | 37 + .../response/ResponseDeserializer.java | 74 + .../response/ResponsesDeserializer.java | 11 + .../unit_test_api/restclient/RestClient.java | 67 + .../schemas/AnyTypeJsonSchema.java | 315 + .../schemas/BooleanJsonSchema.java | 88 + .../unit_test_api/schemas/DateJsonSchema.java | 94 + .../schemas/DateTimeJsonSchema.java | 94 + .../schemas/DecimalJsonSchema.java | 87 + .../schemas/DoubleJsonSchema.java | 91 + .../schemas/FloatJsonSchema.java | 91 + .../unit_test_api/schemas/GenericBuilder.java | 9 + .../schemas/Int32JsonSchema.java | 98 + .../schemas/Int64JsonSchema.java | 108 + .../unit_test_api/schemas/IntJsonSchema.java | 108 + .../unit_test_api/schemas/ListJsonSchema.java | 108 + .../unit_test_api/schemas/MapJsonSchema.java | 112 + .../schemas/NotAnyTypeJsonSchema.java | 317 + .../unit_test_api/schemas/NullJsonSchema.java | 87 + .../schemas/NumberJsonSchema.java | 107 + .../java/unit_test_api/schemas/SetMaker.java | 20 + .../schemas/StringJsonSchema.java | 106 + .../schemas/UnsetAddPropsSetter.java | 77 + .../unit_test_api/schemas/UuidJsonSchema.java | 94 + .../AdditionalPropertiesValidator.java | 58 + .../schemas/validation/AllOfValidator.java | 23 + .../schemas/validation/AnyOfValidator.java | 45 + .../validation/BigDecimalValidator.java | 21 + .../validation/BooleanEnumValidator.java | 8 + .../validation/BooleanSchemaValidator.java | 9 + .../validation/BooleanValueMethod.java | 5 + .../schemas/validation/ConstValidator.java | 33 + .../schemas/validation/ContainsValidator.java | 30 + .../schemas/validation/CustomIsoparser.java | 16 + .../validation/DefaultValueMethod.java | 7 + .../DependentRequiredValidator.java | 42 + .../validation/DependentSchemasValidator.java | 41 + .../validation/DoubleEnumValidator.java | 8 + .../schemas/validation/DoubleValueMethod.java | 5 + .../schemas/validation/ElseValidator.java | 31 + .../schemas/validation/EnumValidator.java | 43 + .../validation/ExclusiveMaximumValidator.java | 45 + .../validation/ExclusiveMinimumValidator.java | 45 + .../validation/FloatEnumValidator.java | 8 + .../schemas/validation/FloatValueMethod.java | 5 + .../schemas/validation/FormatValidator.java | 158 + .../schemas/validation/FrozenList.java | 30 + .../schemas/validation/FrozenMap.java | 54 + .../schemas/validation/IfValidator.java | 28 + .../validation/IntegerEnumValidator.java | 8 + .../validation/IntegerValueMethod.java | 5 + .../schemas/validation/ItemsValidator.java | 45 + .../schemas/validation/JsonSchema.java | 499 ++ .../schemas/validation/JsonSchemaFactory.java | 32 + .../schemas/validation/JsonSchemaInfo.java | 210 + .../schemas/validation/KeywordEntry.java | 10 + .../schemas/validation/KeywordValidator.java | 11 + .../schemas/validation/LengthValidator.java | 16 + .../validation/ListSchemaValidator.java | 12 + .../schemas/validation/LongEnumValidator.java | 8 + .../schemas/validation/LongValueMethod.java | 5 + .../validation/MapSchemaValidator.java | 13 + .../schemas/validation/MapUtils.java | 37 + .../validation/MaxContainsValidator.java | 32 + .../schemas/validation/MaxItemsValidator.java | 25 + .../validation/MaxLengthValidator.java | 24 + .../validation/MaxPropertiesValidator.java | 25 + .../schemas/validation/MaximumValidator.java | 45 + .../validation/MinContainsValidator.java | 31 + .../schemas/validation/MinItemsValidator.java | 25 + .../validation/MinLengthValidator.java | 24 + .../validation/MinPropertiesValidator.java | 25 + .../schemas/validation/MinimumValidator.java | 45 + .../validation/MultipleOfValidator.java | 27 + .../schemas/validation/NotValidator.java | 30 + .../schemas/validation/NullEnumValidator.java | 8 + .../validation/NullSchemaValidator.java | 9 + .../schemas/validation/NullValueMethod.java | 5 + .../validation/NumberSchemaValidator.java | 9 + .../schemas/validation/OneOfValidator.java | 50 + .../schemas/validation/PathToSchemasMap.java | 21 + .../PatternPropertiesValidator.java | 21 + .../schemas/validation/PatternValidator.java | 23 + .../validation/PrefixItemsValidator.java | 41 + .../validation/PropertiesValidator.java | 56 + .../schemas/validation/PropertyEntry.java | 10 + .../validation/PropertyNamesValidator.java | 38 + .../schemas/validation/RequiredValidator.java | 41 + .../validation/StringEnumValidator.java | 8 + .../validation/StringSchemaValidator.java | 9 + .../schemas/validation/StringValueMethod.java | 5 + .../schemas/validation/ThenValidator.java | 32 + .../schemas/validation/TypeValidator.java | 34 + .../validation/UnevaluatedItemsValidator.java | 52 + .../UnevaluatedPropertiesValidator.java | 49 + .../validation/UniqueItemsValidator.java | 35 + .../validation/UnsetAnyTypeJsonSchema.java | 302 + .../schemas/validation/ValidationData.java | 23 + .../validation/ValidationMetadata.java | 26 + .../unit_test_api/servers/RootServer0.java | 9 + .../java/unit_test_api/servers/Server.java | 6 + .../unit_test_api/servers/ServerProvider.java | 6 + .../servers/ServerWithVariables.java | 21 + .../servers/ServerWithoutVariables.java | 14 + .../ASchemaGivenForPrefixitemsTest.java | 115 + ...dditionalItemsAreAllowedByDefaultTest.java | 35 + ...onalpropertiesAreAllowedByDefaultTest.java | 41 + ...itionalpropertiesCanExistByItselfTest.java | 53 + ...ropertiesDoesNotLookInApplicatorsTest.java | 42 + ...sWithNullValuedInstancePropertiesTest.java | 33 + .../AdditionalpropertiesWithSchemaTest.java | 84 + .../AllofCombinedWithAnyofOneofTest.java | 133 + .../schemas/AllofSimpleTypesTest.java | 43 + .../components/schemas/AllofTest.java | 101 + .../schemas/AllofWithBaseSchemaTest.java | 133 + .../schemas/AllofWithOneEmptySchemaTest.java | 28 + .../AllofWithTheFirstEmptySchemaTest.java | 43 + .../AllofWithTheLastEmptySchemaTest.java | 43 + .../schemas/AllofWithTwoEmptySchemasTest.java | 28 + .../schemas/AnyofComplexTypesTest.java | 91 + .../components/schemas/AnyofTest.java | 63 + .../schemas/AnyofWithBaseSchemaTest.java | 58 + .../schemas/AnyofWithOneEmptySchemaTest.java | 38 + .../schemas/ArrayTypeMatchesArraysTest.java | 120 + .../BooleanTypeMatchesBooleansTest.java | 160 + .../components/schemas/ByIntTest.java | 53 + .../components/schemas/ByNumberTest.java | 53 + .../components/schemas/BySmallNumberTest.java | 43 + .../ConstNulCharactersInStringsTest.java | 43 + .../ContainsKeywordValidationTest.java | 107 + .../ContainsWithNullInstanceElementsTest.java | 30 + .../components/schemas/DateFormatTest.java | 90 + .../schemas/DateTimeFormatTest.java | 90 + ...DependenciesWithEscapedCharactersTest.java | 114 + ...dentSubschemaIncompatibleWithRootTest.java | 92 + .../DependentSchemasSingleDependencyTest.java | 156 + .../schemas/DurationFormatTest.java | 90 + .../components/schemas/EmailFormatTest.java | 90 + .../schemas/EmptyDependentsTest.java | 54 + .../EnumWith0DoesNotMatchFalseTest.java | 53 + .../EnumWith1DoesNotMatchTrueTest.java | 53 + .../EnumWithEscapedCharactersTest.java | 53 + .../EnumWithFalseDoesNotMatch0Test.java | 58 + .../EnumWithTrueDoesNotMatch1Test.java | 58 + .../schemas/EnumsInPropertiesTest.java | 136 + .../ExclusivemaximumValidationTest.java | 68 + .../ExclusiveminimumValidationTest.java | 68 + .../schemas/FloatDivisionInfTest.java | 33 + .../schemas/ForbiddenPropertyTest.java | 61 + .../schemas/HostnameFormatTest.java | 90 + .../schemas/IdnEmailFormatTest.java | 90 + .../schemas/IdnHostnameFormatTest.java | 90 + .../schemas/IfAndElseWithoutThenTest.java | 53 + .../schemas/IfAndThenWithoutElseTest.java | 53 + ...rializedKeywordProcessingSequenceTest.java | 68 + .../schemas/IgnoreElseWithoutIfTest.java | 38 + .../IgnoreIfWithoutThenOrElseTest.java | 38 + .../schemas/IgnoreThenWithoutIfTest.java | 38 + .../IntegerTypeMatchesIntegersTest.java | 145 + .../components/schemas/Ipv4FormatTest.java | 90 + .../components/schemas/Ipv6FormatTest.java | 90 + .../components/schemas/IriFormatTest.java | 90 + .../schemas/IriReferenceFormatTest.java | 90 + .../components/schemas/ItemsContainsTest.java | 89 + ...DoesNotLookInApplicatorsValidCaseTest.java | 51 + .../ItemsWithNullInstanceElementsTest.java | 31 + .../schemas/JsonPointerFormatTest.java | 90 + ...xcontainsWithoutContainsIsIgnoredTest.java | 43 + .../schemas/MaximumValidationTest.java | 63 + ...imumValidationWithUnsignedIntegerTest.java | 63 + .../schemas/MaxitemsValidationTest.java | 72 + .../schemas/MaxlengthValidationTest.java | 73 + ...xproperties0MeansTheObjectIsEmptyTest.java | 49 + .../schemas/MaxpropertiesValidationTest.java | 114 + ...ncontainsWithoutContainsIsIgnoredTest.java | 41 + .../schemas/MinimumValidationTest.java | 63 + ...inimumValidationWithSignedIntegerTest.java | 98 + .../schemas/MinitemsValidationTest.java | 69 + .../schemas/MinlengthValidationTest.java | 78 + .../schemas/MinpropertiesValidationTest.java | 99 + .../MultipleDependentsRequiredTest.java | 139 + ...eousPatternpropertiesAreValidatedTest.java | 131 + ...tipleTypesCanBeSpecifiedInAnArrayTest.java | 115 + ...edAllofToCheckValidationSemanticsTest.java | 43 + ...edAnyofToCheckValidationSemanticsTest.java | 43 + .../components/schemas/NestedItemsTest.java | 143 + ...edOneofToCheckValidationSemanticsTest.java | 43 + ...iiPatternWithAdditionalpropertiesTest.java | 53 + ...InterferenceAcrossCombinedSchemasTest.java | 38 + .../schemas/NotMoreComplexSchemaTest.java | 63 + .../schemas/NotMultipleTypesTest.java | 58 + .../components/schemas/NotTest.java | 43 + .../schemas/NulCharactersInStringsTest.java | 43 + .../NullTypeMatchesOnlyTheNullObjectTest.java | 165 + .../schemas/NumberTypeMatchesNumbersTest.java | 140 + .../ObjectPropertiesValidationTest.java | 125 + .../schemas/ObjectTypeMatchesObjectsTest.java | 120 + .../schemas/OneofComplexTypesTest.java | 96 + .../components/schemas/OneofTest.java | 68 + .../schemas/OneofWithBaseSchemaTest.java | 58 + .../schemas/OneofWithEmptySchemaTest.java | 43 + .../schemas/OneofWithRequiredTest.java | 104 + .../schemas/PatternIsNotAnchoredTest.java | 28 + .../schemas/PatternValidationTest.java | 105 + ...ValidatesPropertiesMatchingARegexTest.java | 132 + ...sWithNullValuedInstancePropertiesTest.java | 33 + ...onAdjustsTheStartingIndexForItemsTest.java | 53 + ...efixitemsWithNullInstanceElementsTest.java | 31 + ...esAdditionalpropertiesInteractionTest.java | 172 + ...sAreJavascriptObjectPropertyNamesTest.java | 148 + .../PropertiesWithEscapedCharactersTest.java | 93 + ...sWithNullValuedInstancePropertiesTest.java | 33 + ...opertyNamedRefThatIsNotAReferenceTest.java | 53 + .../schemas/PropertynamesValidationTest.java | 111 + .../components/schemas/RegexFormatTest.java | 90 + ...horedByDefaultAndAreCaseSensitiveTest.java | 88 + .../RelativeJsonPointerFormatTest.java | 90 + .../RequiredDefaultValidationTest.java | 29 + ...sAreJavascriptObjectPropertyNamesTest.java | 153 + .../schemas/RequiredValidationTest.java | 84 + .../schemas/RequiredWithEmptyArrayTest.java | 29 + .../RequiredWithEscapedCharactersTest.java | 77 + .../schemas/SimpleEnumValidationTest.java | 43 + .../schemas/SingleDependencyTest.java | 115 + .../SmallMultipleOfLargeIntegerTest.java | 28 + .../schemas/StringTypeMatchesStringsTest.java | 140 + .../components/schemas/TimeFormatTest.java | 90 + .../schemas/TypeArrayObjectOrNullTest.java | 87 + .../schemas/TypeArrayOrObjectTest.java | 92 + .../schemas/TypeAsArrayWithOneItemTest.java | 43 + .../schemas/UnevaluateditemsAsSchemaTest.java | 58 + ...msDependsOnMultipleNestedContainsTest.java | 55 + .../UnevaluateditemsWithItemsTest.java | 56 + ...ateditemsWithNullInstanceElementsTest.java | 30 + ...pertiesNotAffectedByPropertynamesTest.java | 53 + .../UnevaluatedpropertiesSchemaTest.java | 64 + ...sWithAdjacentAdditionalpropertiesTest.java | 52 + ...sWithNullValuedInstancePropertiesTest.java | 33 + .../UniqueitemsFalseValidationTest.java | 316 + ...niqueitemsFalseWithAnArrayOfItemsTest.java | 154 + .../schemas/UniqueitemsValidationTest.java | 627 ++ .../UniqueitemsWithAnArrayOfItemsTest.java | 162 + .../components/schemas/UriFormatTest.java | 90 + .../schemas/UriReferenceFormatTest.java | 90 + .../schemas/UriTemplateFormatTest.java | 90 + .../components/schemas/UuidFormatTest.java | 90 + ...ateAgainstCorrectBranchThenVsElseTest.java | 68 + .../JsonSchemaKeywordFlagsTest.java | 143 + .../header/ContentHeaderTest.java | 120 + .../header/SchemaHeaderTest.java | 162 + .../parameter/CookieSerializerTest.java | 45 + .../parameter/HeadersSerializerTest.java | 49 + .../parameter/PathSerializerTest.java | 46 + .../parameter/QuerySerializerTest.java | 52 + .../SchemaNonQueryParameterTest.java | 397 ++ .../parameter/SchemaQueryParameterTest.java | 193 + .../RequestBodySerializerTest.java | 181 + .../response/ResponseDeserializerTest.java | 248 + .../schemas/AnyTypeSchemaTest.java | 106 + .../schemas/ArrayTypeSchemaTest.java | 252 + .../schemas/BooleanSchemaTest.java | 45 + .../schemas/ListBuilderTest.java | 61 + .../unit_test_api/schemas/ListSchemaTest.java | 46 + .../unit_test_api/schemas/MapSchemaTest.java | 48 + .../unit_test_api/schemas/NullSchemaTest.java | 41 + .../schemas/NumberSchemaTest.java | 57 + .../schemas/ObjectTypeSchemaTest.java | 538 ++ .../schemas/RefBooleanSchemaTest.java | 49 + .../AdditionalPropertiesValidatorTest.java | 149 + .../validation/CustomIsoparserTest.java | 28 + .../validation/FormatValidatorTest.java | 363 + .../validation/ItemsValidatorTest.java | 131 + .../schemas/validation/JsonSchemaTest.java | 80 + .../validation/PropertiesValidatorTest.java | 134 + .../validation/RequiredValidatorTest.java | 120 + .../schemas/validation/TypeValidatorTest.java | 56 + .../python/.openapi-generator/FILES | 5872 ++++++++--------- .../client/3_1_0_unit_test/python/README.md | 2 +- .../apis/tags/additional_properties_api.md | 2 +- .../python/docs/apis/tags/all_of_api.md | 2 +- .../python/docs/apis/tags/any_of_api.md | 2 +- .../python/docs/apis/tags/const_api.md | 2 +- .../python/docs/apis/tags/contains_api.md | 2 +- .../docs/apis/tags/content_type_json_api.md | 2 +- .../docs/apis/tags/dependent_required_api.md | 2 +- .../docs/apis/tags/dependent_schemas_api.md | 2 +- .../python/docs/apis/tags/enum_api.md | 2 +- .../docs/apis/tags/exclusive_maximum_api.md | 2 +- .../docs/apis/tags/exclusive_minimum_api.md | 2 +- .../python/docs/apis/tags/format_api.md | 2 +- .../python/docs/apis/tags/if_then_else_api.md | 2 +- .../python/docs/apis/tags/items_api.md | 2 +- .../python/docs/apis/tags/max_contains_api.md | 2 +- .../python/docs/apis/tags/max_items_api.md | 2 +- .../python/docs/apis/tags/max_length_api.md | 2 +- .../docs/apis/tags/max_properties_api.md | 2 +- .../python/docs/apis/tags/maximum_api.md | 2 +- .../python/docs/apis/tags/min_contains_api.md | 2 +- .../python/docs/apis/tags/min_items_api.md | 2 +- .../python/docs/apis/tags/min_length_api.md | 2 +- .../docs/apis/tags/min_properties_api.md | 2 +- .../python/docs/apis/tags/minimum_api.md | 2 +- .../python/docs/apis/tags/multiple_of_api.md | 2 +- .../python/docs/apis/tags/not_api.md | 2 +- .../python/docs/apis/tags/one_of_api.md | 2 +- .../apis/tags/operation_request_body_api.md | 2 +- .../python/docs/apis/tags/path_post_api.md | 2 +- .../python/docs/apis/tags/pattern_api.md | 2 +- .../docs/apis/tags/pattern_properties_api.md | 2 +- .../python/docs/apis/tags/prefix_items_api.md | 2 +- .../python/docs/apis/tags/properties_api.md | 2 +- .../docs/apis/tags/property_names_api.md | 2 +- .../python/docs/apis/tags/ref_api.md | 2 +- .../python/docs/apis/tags/required_api.md | 2 +- ...esponse_content_content_type_schema_api.md | 2 +- .../python/docs/apis/tags/type_api.md | 2 +- .../docs/apis/tags/unevaluated_items_api.md | 2 +- .../apis/tags/unevaluated_properties_api.md | 2 +- .../python/docs/apis/tags/unique_items_api.md | 2 +- .../schema/a_schema_given_for_prefixitems.md | 2 +- ...additional_items_are_allowed_by_default.md | 2 +- ...tionalproperties_are_allowed_by_default.md | 2 +- ...dditionalproperties_can_exist_by_itself.md | 2 +- ...properties_does_not_look_in_applicators.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- .../additionalproperties_with_schema.md | 2 +- .../python/docs/components/schema/allof.md | 2 +- .../schema/allof_combined_with_anyof_oneof.md | 2 +- .../components/schema/allof_simple_types.md | 2 +- .../schema/allof_with_base_schema.md | 2 +- .../schema/allof_with_one_empty_schema.md | 2 +- .../allof_with_the_first_empty_schema.md | 2 +- .../allof_with_the_last_empty_schema.md | 2 +- .../schema/allof_with_two_empty_schemas.md | 2 +- .../python/docs/components/schema/anyof.md | 2 +- .../components/schema/anyof_complex_types.md | 2 +- .../schema/anyof_with_base_schema.md | 2 +- .../schema/anyof_with_one_empty_schema.md | 2 +- .../schema/array_type_matches_arrays.md | 2 +- .../schema/boolean_type_matches_booleans.md | 2 +- .../python/docs/components/schema/by_int.md | 2 +- .../docs/components/schema/by_number.md | 2 +- .../docs/components/schema/by_small_number.md | 2 +- .../schema/const_nul_characters_in_strings.md | 2 +- .../schema/contains_keyword_validation.md | 2 +- .../contains_with_null_instance_elements.md | 2 +- .../docs/components/schema/date_format.md | 2 +- .../components/schema/date_time_format.md | 2 +- ...as_dependencies_with_escaped_characters.md | 2 +- ...endent_subschema_incompatible_with_root.md | 2 +- .../dependent_schemas_single_dependency.md | 2 +- .../docs/components/schema/duration_format.md | 2 +- .../docs/components/schema/email_format.md | 2 +- .../components/schema/empty_dependents.md | 2 +- .../schema/enum_with0_does_not_match_false.md | 2 +- .../schema/enum_with1_does_not_match_true.md | 2 +- .../schema/enum_with_escaped_characters.md | 2 +- .../schema/enum_with_false_does_not_match0.md | 2 +- .../schema/enum_with_true_does_not_match1.md | 2 +- .../components/schema/enums_in_properties.md | 2 +- .../schema/exclusivemaximum_validation.md | 2 +- .../schema/exclusiveminimum_validation.md | 2 +- .../components/schema/float_division_inf.md | 2 +- .../components/schema/forbidden_property.md | 2 +- .../docs/components/schema/hostname_format.md | 2 +- .../components/schema/idn_email_format.md | 2 +- .../components/schema/idn_hostname_format.md | 2 +- .../schema/if_and_else_without_then.md | 2 +- .../schema/if_and_then_without_else.md | 2 +- ..._serialized_keyword_processing_sequence.md | 2 +- .../schema/ignore_else_without_if.md | 2 +- .../schema/ignore_if_without_then_or_else.md | 2 +- .../schema/ignore_then_without_if.md | 2 +- .../schema/integer_type_matches_integers.md | 2 +- .../docs/components/schema/ipv4_format.md | 2 +- .../docs/components/schema/ipv6_format.md | 2 +- .../docs/components/schema/iri_format.md | 2 +- .../components/schema/iri_reference_format.md | 2 +- .../docs/components/schema/items_contains.md | 2 +- ...does_not_look_in_applicators_valid_case.md | 2 +- .../items_with_null_instance_elements.md | 2 +- .../components/schema/json_pointer_format.md | 2 +- ...maxcontains_without_contains_is_ignored.md | 2 +- .../components/schema/maximum_validation.md | 2 +- ...aximum_validation_with_unsigned_integer.md | 2 +- .../components/schema/maxitems_validation.md | 2 +- .../components/schema/maxlength_validation.md | 2 +- ...axproperties0_means_the_object_is_empty.md | 2 +- .../schema/maxproperties_validation.md | 2 +- ...mincontains_without_contains_is_ignored.md | 2 +- .../components/schema/minimum_validation.md | 2 +- .../minimum_validation_with_signed_integer.md | 2 +- .../components/schema/minitems_validation.md | 2 +- .../components/schema/minlength_validation.md | 2 +- .../schema/minproperties_validation.md | 2 +- .../schema/multiple_dependents_required.md | 2 +- ...taneous_patternproperties_are_validated.md | 2 +- ...iple_types_can_be_specified_in_an_array.md | 2 +- ...ted_allof_to_check_validation_semantics.md | 2 +- ...ted_anyof_to_check_validation_semantics.md | 2 +- .../docs/components/schema/nested_items.md | 2 +- ...ted_oneof_to_check_validation_semantics.md | 2 +- ...ascii_pattern_with_additionalproperties.md | 2 +- ...on_interference_across_combined_schemas.md | 2 +- .../python/docs/components/schema/not.md | 2 +- .../schema/not_more_complex_schema.md | 2 +- .../components/schema/not_multiple_types.md | 2 +- .../schema/nul_characters_in_strings.md | 2 +- .../null_type_matches_only_the_null_object.md | 2 +- .../schema/number_type_matches_numbers.md | 2 +- .../schema/object_properties_validation.md | 2 +- .../schema/object_type_matches_objects.md | 2 +- .../python/docs/components/schema/oneof.md | 2 +- .../components/schema/oneof_complex_types.md | 2 +- .../schema/oneof_with_base_schema.md | 2 +- .../schema/oneof_with_empty_schema.md | 2 +- .../components/schema/oneof_with_required.md | 2 +- .../schema/pattern_is_not_anchored.md | 2 +- .../components/schema/pattern_validation.md | 2 +- ...s_validates_properties_matching_a_regex.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- ...on_adjusts_the_starting_index_for_items.md | 2 +- ...prefixitems_with_null_instance_elements.md | 2 +- ...erties_additionalproperties_interaction.md | 2 +- ...es_are_javascript_object_property_names.md | 2 +- .../properties_with_escaped_characters.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- ...perty_named_ref_that_is_not_a_reference.md | 2 +- .../schema/propertynames_validation.md | 2 +- .../docs/components/schema/regex_format.md | 2 +- ...hored_by_default_and_are_case_sensitive.md | 2 +- .../schema/relative_json_pointer_format.md | 2 +- .../schema/required_default_validation.md | 2 +- ...es_are_javascript_object_property_names.md | 2 +- .../components/schema/required_validation.md | 2 +- .../schema/required_with_empty_array.md | 2 +- .../required_with_escaped_characters.md | 2 +- .../schema/simple_enum_validation.md | 2 +- .../components/schema/single_dependency.md | 2 +- .../schema/small_multiple_of_large_integer.md | 2 +- .../schema/string_type_matches_strings.md | 2 +- .../docs/components/schema/time_format.md | 2 +- .../schema/type_array_object_or_null.md | 2 +- .../components/schema/type_array_or_object.md | 2 +- .../schema/type_as_array_with_one_item.md | 2 +- .../schema/unevaluateditems_as_schema.md | 2 +- ...ems_depends_on_multiple_nested_contains.md | 2 +- .../schema/unevaluateditems_with_items.md | 2 +- ...luateditems_with_null_instance_elements.md | 2 +- ...roperties_not_affected_by_propertynames.md | 2 +- .../schema/unevaluatedproperties_schema.md | 2 +- ...ties_with_adjacent_additionalproperties.md | 2 +- ...es_with_null_valued_instance_properties.md | 2 +- .../schema/uniqueitems_false_validation.md | 2 +- ...niqueitems_false_with_an_array_of_items.md | 2 +- .../schema/uniqueitems_validation.md | 2 +- .../uniqueitems_with_an_array_of_items.md | 2 +- .../docs/components/schema/uri_format.md | 2 +- .../components/schema/uri_reference_format.md | 2 +- .../components/schema/uri_template_format.md | 2 +- .../docs/components/schema/uuid_format.md | 2 +- ...ate_against_correct_branch_then_vs_else.md | 2 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../3_1_0_unit_test/python/pyproject.toml | 2 +- .../src/unit_test_api/apis/tag_to_api.py | 6 +- .../src/unit_test_api/apis/tags/not_api.py | 35 + .../components/schema/forbidden_property.py | 4 +- .../schema/if_and_else_without_then.py | 8 +- .../schema/if_and_then_without_else.py | 4 +- ..._serialized_keyword_processing_sequence.py | 10 +- .../schema/ignore_else_without_if.py | 6 +- .../schema/ignore_if_without_then_or_else.py | 6 +- ...on_interference_across_combined_schemas.py | 8 +- .../unit_test_api/components/schema/not.py | 27 + .../schema/not_more_complex_schema.py | 8 +- .../components/schema/not_multiple_types.py | 4 +- ...ate_against_correct_branch_then_vs_else.py | 8 +- .../components/schemas/__init__.py | 2 +- .../post/operation.py | 2 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../python/.openapi-generator/FILES | 98 +- .../python/README.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../components/schema/addition_operator.md | 2 +- .../python/docs/components/schema/operator.md | 2 +- .../components/schema/subtraction_operator.md | 2 +- .../python/docs/paths/operators/post.md | 12 +- .../python/docs/servers/server_0.md | 2 +- .../python/pyproject.toml | 2 +- .../security/python/.openapi-generator/FILES | 144 +- .../security/python/README.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../security_scheme_api_key.md | 2 +- .../security_scheme_bearer_test.md | 2 +- .../security_scheme_http_basic_test.md | 2 +- .../path_with_no_explicit_security/get.md | 12 +- .../path_with_one_explicit_security/get.md | 14 +- .../paths/path_with_security_from_root/get.md | 20 +- .../path_with_two_explicit_security/get.md | 16 +- .../security/python/docs/servers/server_0.md | 2 +- .../security/python/pyproject.toml | 2 +- .../petstore/java/.openapi-generator/FILES | 3 - .../petstore/python/.openapi-generator/FILES | 2390 +++---- samples/client/petstore/python/README.md | 2 +- .../python/docs/apis/tags/another_fake_api.md | 2 +- .../python/docs/apis/tags/default_api.md | 2 +- .../python/docs/apis/tags/fake_api.md | 2 +- .../apis/tags/fake_classname_tags123_api.md | 2 +- .../petstore/python/docs/apis/tags/pet_api.md | 2 +- .../python/docs/apis/tags/store_api.md | 2 +- .../python/docs/apis/tags/user_api.md | 2 +- .../header_int32_json_content_type_header.md | 2 +- .../headers/header_number_header.md | 2 +- .../header_ref_content_schema_header.md | 2 +- .../headers/header_ref_schema_header.md | 2 +- .../headers/header_ref_string_header.md | 2 +- .../headers/header_string_header.md | 2 +- ...onent_ref_schema_string_with_validation.md | 2 +- .../parameters/parameter_path_user_name.md | 2 +- .../parameter_ref_path_user_name.md | 2 +- ...meter_ref_schema_string_with_validation.md | 2 +- .../request_bodies/request_body_client.md | 2 +- .../request_bodies/request_body_pet.md | 2 +- .../request_body_ref_user_array.md | 2 +- .../request_bodies/request_body_user_array.md | 2 +- .../response_headers_with_no_body.md | 2 +- .../response_ref_success_description_only.md | 2 +- ...ef_successful_xml_and_json_array_of_pet.md | 2 +- .../response_success_description_only.md | 2 +- ...ponse_success_inline_content_and_header.md | 2 +- ...response_success_with_json_api_response.md | 2 +- ...se_successful_xml_and_json_array_of_pet.md | 2 +- .../schema/additional_properties_class.md | 2 +- .../schema/additional_properties_schema.md | 2 +- ...ditional_properties_with_array_of_enums.md | 2 +- .../python/docs/components/schema/address.md | 2 +- .../python/docs/components/schema/animal.md | 2 +- .../docs/components/schema/animal_farm.md | 2 +- .../components/schema/any_type_and_format.md | 2 +- .../components/schema/any_type_not_string.md | 2 +- .../docs/components/schema/api_response.md | 2 +- .../python/docs/components/schema/apple.md | 2 +- .../docs/components/schema/apple_req.md | 2 +- .../schema/array_holding_any_type.md | 2 +- .../schema/array_of_array_of_number_only.md | 2 +- .../docs/components/schema/array_of_enums.md | 2 +- .../components/schema/array_of_number_only.md | 2 +- .../docs/components/schema/array_test.md | 2 +- .../schema/array_with_validations_in_items.md | 2 +- .../python/docs/components/schema/banana.md | 2 +- .../docs/components/schema/banana_req.md | 2 +- .../python/docs/components/schema/bar.md | 2 +- .../docs/components/schema/basque_pig.md | 2 +- .../python/docs/components/schema/boolean.md | 2 +- .../docs/components/schema/boolean_enum.md | 2 +- .../docs/components/schema/capitalization.md | 2 +- .../python/docs/components/schema/cat.md | 2 +- .../python/docs/components/schema/category.md | 2 +- .../docs/components/schema/child_cat.md | 2 +- .../docs/components/schema/class_model.md | 2 +- .../python/docs/components/schema/client.md | 2 +- .../schema/complex_quadrilateral.md | 2 +- ...d_any_of_different_types_no_validations.md | 2 +- .../docs/components/schema/composed_array.md | 2 +- .../docs/components/schema/composed_bool.md | 2 +- .../docs/components/schema/composed_none.md | 2 +- .../docs/components/schema/composed_number.md | 2 +- .../docs/components/schema/composed_object.md | 2 +- .../schema/composed_one_of_different_types.md | 2 +- .../docs/components/schema/composed_string.md | 2 +- .../python/docs/components/schema/currency.md | 2 +- .../docs/components/schema/danish_pig.md | 2 +- .../docs/components/schema/date_time_test.md | 2 +- .../schema/date_time_with_validations.md | 2 +- .../schema/date_with_validations.md | 2 +- .../docs/components/schema/decimal_payload.md | 2 +- .../python/docs/components/schema/dog.md | 2 +- .../python/docs/components/schema/drawing.md | 2 +- .../docs/components/schema/enum_arrays.md | 2 +- .../docs/components/schema/enum_class.md | 2 +- .../docs/components/schema/enum_test.md | 2 +- .../components/schema/equilateral_triangle.md | 2 +- .../python/docs/components/schema/file.md | 2 +- .../schema/file_schema_test_class.md | 2 +- .../python/docs/components/schema/foo.md | 2 +- .../docs/components/schema/format_test.md | 2 +- .../docs/components/schema/from_schema.md | 2 +- .../python/docs/components/schema/fruit.md | 2 +- .../docs/components/schema/fruit_req.md | 2 +- .../python/docs/components/schema/gm_fruit.md | 2 +- .../components/schema/grandparent_animal.md | 2 +- .../components/schema/has_only_read_only.md | 2 +- .../components/schema/health_check_result.md | 2 +- .../docs/components/schema/integer_enum.md | 2 +- .../components/schema/integer_enum_big.md | 2 +- .../schema/integer_enum_one_value.md | 2 +- .../schema/integer_enum_with_default_value.md | 2 +- .../docs/components/schema/integer_max10.md | 2 +- .../docs/components/schema/integer_min15.md | 2 +- .../components/schema/isosceles_triangle.md | 2 +- .../python/docs/components/schema/items.md | 2 +- .../docs/components/schema/items_schema.md | 2 +- .../components/schema/json_patch_request.md | 2 +- .../json_patch_request_add_replace_test.md | 2 +- .../schema/json_patch_request_move_copy.md | 2 +- .../schema/json_patch_request_remove.md | 2 +- .../python/docs/components/schema/mammal.md | 2 +- .../python/docs/components/schema/map_test.md | 2 +- ...perties_and_additional_properties_class.md | 2 +- .../python/docs/components/schema/money.md | 2 +- .../schema/multi_properties_schema.md | 2 +- .../docs/components/schema/my_object_dto.md | 2 +- .../python/docs/components/schema/name.md | 2 +- .../schema/no_additional_properties.md | 2 +- .../docs/components/schema/nullable_class.md | 2 +- .../docs/components/schema/nullable_shape.md | 2 +- .../docs/components/schema/nullable_string.md | 2 +- .../python/docs/components/schema/number.md | 2 +- .../docs/components/schema/number_only.md | 2 +- .../schema/number_with_exclusive_min_max.md | 2 +- .../schema/number_with_validations.md | 2 +- .../schema/obj_with_required_props.md | 2 +- .../schema/obj_with_required_props_base.md | 2 +- .../components/schema/object_interface.md | 2 +- ...ject_model_with_arg_and_args_properties.md | 2 +- .../schema/object_model_with_ref_props.md | 2 +- ..._with_req_test_prop_from_unset_add_prop.md | 2 +- .../object_with_colliding_properties.md | 2 +- .../schema/object_with_decimal_properties.md | 2 +- .../object_with_difficultly_named_props.md | 2 +- ...object_with_inline_composition_property.md | 2 +- ...ect_with_invalid_named_refed_properties.md | 2 +- .../object_with_non_intersecting_values.md | 2 +- .../schema/object_with_only_optional_props.md | 2 +- .../schema/object_with_optional_test_prop.md | 2 +- .../schema/object_with_validations.md | 2 +- .../python/docs/components/schema/order.md | 2 +- .../schema/paginated_result_my_object_dto.md | 2 +- .../docs/components/schema/parent_pet.md | 2 +- .../python/docs/components/schema/pet.md | 2 +- .../python/docs/components/schema/pig.md | 2 +- .../python/docs/components/schema/player.md | 2 +- .../docs/components/schema/public_key.md | 2 +- .../docs/components/schema/quadrilateral.md | 2 +- .../schema/quadrilateral_interface.md | 2 +- .../docs/components/schema/read_only_first.md | 2 +- .../python/docs/components/schema/ref_pet.md | 2 +- .../req_props_from_explicit_add_props.md | 2 +- .../schema/req_props_from_true_add_props.md | 2 +- .../schema/req_props_from_unset_add_props.md | 2 +- .../python/docs/components/schema/return.md | 2 +- .../components/schema/scalene_triangle.md | 2 +- .../schema/self_referencing_array_model.md | 2 +- .../schema/self_referencing_object_model.md | 2 +- .../python/docs/components/schema/shape.md | 2 +- .../docs/components/schema/shape_or_null.md | 2 +- .../components/schema/simple_quadrilateral.md | 2 +- .../docs/components/schema/some_object.md | 2 +- .../components/schema/special_model_name.md | 2 +- .../python/docs/components/schema/string.md | 2 +- .../components/schema/string_boolean_map.md | 2 +- .../docs/components/schema/string_enum.md | 2 +- .../schema/string_enum_with_default_value.md | 2 +- .../schema/string_with_validation.md | 2 +- .../python/docs/components/schema/tag.md | 2 +- .../python/docs/components/schema/triangle.md | 2 +- .../components/schema/triangle_interface.md | 2 +- .../python/docs/components/schema/user.md | 2 +- .../docs/components/schema/uuid_string.md | 2 +- .../python/docs/components/schema/whale.md | 2 +- .../python/docs/components/schema/zebra.md | 2 +- .../security_scheme_api_key.md | 2 +- .../security_scheme_api_key_query.md | 2 +- .../security_scheme_bearer_test.md | 2 +- .../security_scheme_http_basic_test.md | 2 +- .../security_scheme_http_signature_test.md | 4 +- .../security_scheme_open_id_connect_test.md | 2 +- .../security_scheme_petstore_auth.md | 2 +- .../docs/paths/another_fake_dummy/patch.md | 12 +- .../docs/paths/common_param_sub_dir/delete.md | 16 +- .../docs/paths/common_param_sub_dir/get.md | 16 +- .../docs/paths/common_param_sub_dir/post.md | 16 +- .../petstore/python/docs/paths/fake/delete.md | 18 +- .../petstore/python/docs/paths/fake/get.md | 14 +- .../petstore/python/docs/paths/fake/patch.md | 12 +- .../petstore/python/docs/paths/fake/post.md | 14 +- .../get.md | 12 +- .../paths/fake_body_with_file_schema/put.md | 12 +- .../paths/fake_body_with_query_params/put.md | 14 +- .../paths/fake_case_sensitive_params/put.md | 14 +- .../docs/paths/fake_classname_test/patch.md | 14 +- .../paths/fake_delete_coffee_id/delete.md | 14 +- .../python/docs/paths/fake_health/get.md | 12 +- .../fake_inline_additional_properties/post.md | 12 +- .../paths/fake_inline_composition/post.md | 14 +- .../docs/paths/fake_json_form_data/get.md | 12 +- .../docs/paths/fake_json_patch/patch.md | 12 +- .../docs/paths/fake_json_with_charset/post.md | 12 +- .../post.md | 12 +- .../fake_multiple_response_bodies/get.md | 12 +- .../paths/fake_multiple_securities/get.md | 18 +- .../docs/paths/fake_obj_in_query/get.md | 14 +- .../post.md | 16 +- .../docs/paths/fake_pem_content_type/get.md | 12 +- .../post.md | 18 +- .../get.md | 14 +- .../python/docs/paths/fake_redirection/get.md | 12 +- .../docs/paths/fake_ref_obj_in_query/get.md | 14 +- .../paths/fake_refs_array_of_enums/post.md | 12 +- .../docs/paths/fake_refs_arraymodel/post.md | 12 +- .../docs/paths/fake_refs_boolean/post.md | 12 +- .../post.md | 12 +- .../python/docs/paths/fake_refs_enum/post.md | 12 +- .../docs/paths/fake_refs_mammal/post.md | 12 +- .../docs/paths/fake_refs_number/post.md | 12 +- .../post.md | 12 +- .../docs/paths/fake_refs_string/post.md | 12 +- .../paths/fake_response_without_schema/get.md | 12 +- .../paths/fake_test_query_paramters/put.md | 14 +- .../paths/fake_upload_download_file/post.md | 12 +- .../docs/paths/fake_upload_file/post.md | 12 +- .../docs/paths/fake_upload_files/post.md | 12 +- .../paths/fake_wild_card_responses/get.md | 12 +- .../petstore/python/docs/paths/foo/get.md | 12 +- .../petstore/python/docs/paths/pet/post.md | 36 +- .../petstore/python/docs/paths/pet/put.md | 34 +- .../docs/paths/pet_find_by_status/get.md | 38 +- .../python/docs/paths/pet_find_by_tags/get.md | 36 +- .../python/docs/paths/pet_pet_id/delete.md | 20 +- .../python/docs/paths/pet_pet_id/get.md | 16 +- .../python/docs/paths/pet_pet_id/post.md | 20 +- .../paths/pet_pet_id_upload_image/post.md | 18 +- .../petstore/python/docs/paths/solidus/get.md | 12 +- .../python/docs/paths/store_inventory/get.md | 14 +- .../python/docs/paths/store_order/post.md | 12 +- .../docs/paths/store_order_order_id/delete.md | 14 +- .../docs/paths/store_order_order_id/get.md | 14 +- .../petstore/python/docs/paths/user/post.md | 12 +- .../docs/paths/user_create_with_array/post.md | 12 +- .../docs/paths/user_create_with_list/post.md | 12 +- .../python/docs/paths/user_login/get.md | 14 +- .../python/docs/paths/user_logout/get.md | 12 +- .../python/docs/paths/user_username/delete.md | 14 +- .../python/docs/paths/user_username/get.md | 14 +- .../python/docs/paths/user_username/put.md | 14 +- .../petstore/python/docs/servers/server_0.md | 2 +- .../petstore/python/docs/servers/server_1.md | 2 +- .../petstore/python/docs/servers/server_2.md | 2 +- samples/client/petstore/python/pyproject.toml | 2 +- .../components/schema/any_type_and_format.py | 17 +- .../components/schema/any_type_not_string.py | 4 +- .../src/petstore_api/components/schema/cat.py | 2 - .../components/schema/child_cat.py | 2 - .../components/schema/class_model.py | 4 +- .../schema/complex_quadrilateral.py | 2 - .../schema/composed_one_of_different_types.py | 3 - .../src/petstore_api/components/schema/dog.py | 2 - .../components/schema/equilateral_triangle.py | 2 - .../components/schema/format_test.py | 20 +- .../petstore_api/components/schema/fruit.py | 3 - .../components/schema/fruit_req.py | 3 - .../components/schema/gm_fruit.py | 3 - .../components/schema/isosceles_triangle.py | 2 - .../components/schema/json_patch_request.py | 4 - .../schema/json_patch_request_move_copy.py | 10 +- .../petstore_api/components/schema/name.py | 19 +- .../components/schema/nullable_shape.py | 3 - .../schema/obj_with_required_props.py | 2 - ..._with_req_test_prop_from_unset_add_prop.py | 2 - ...ect_with_invalid_named_refed_properties.py | 12 + .../components/schema/parent_pet.py | 1 - .../petstore_api/components/schema/return.py | 98 + .../components/schema/scalene_triangle.py | 2 - .../components/schema/simple_quadrilateral.py | 2 - .../components/schema/some_object.py | 2 - .../petstore_api/components/schema/user.py | 4 +- .../components/schemas/__init__.py | 2 +- .../schema.py | 20 +- .../post/cookie_parameters.py | 15 + .../post/header_parameters.py | 15 + .../post/path_parameters.py | 9 + .../post/query_parameters.py | 15 + 1702 files changed, 98917 insertions(+), 10795 deletions(-) create mode 100644 samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py create mode 100644 samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java create mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java create mode 100644 samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py create mode 100644 samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py create mode 100644 samples/client/petstore/python/src/petstore_api/components/schema/return.py diff --git a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES index 193f59241a2..4b9ece83d3f 100644 --- a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -471,1809 +471,1809 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/openapi_client/__init__.py -src/openapi_client/api_client.py -src/openapi_client/api_response.py -src/openapi_client/apis/__init__.py -src/openapi_client/apis/path_to_api.py -src/openapi_client/apis/paths/__init__.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py -src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py -src/openapi_client/apis/paths/request_body_post_by_int_request_body.py -src/openapi_client/apis/paths/request_body_post_by_number_request_body.py -src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py -src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py -src/openapi_client/apis/paths/request_body_post_email_format_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py -src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py -src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py -src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py -src/openapi_client/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py -src/openapi_client/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py -src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py -src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py -src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py -src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py -src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py -src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py -src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_not_request_body.py -src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py -src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py -src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py -src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py -src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py -src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_allof_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_anyof_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_items_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_not_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_oneof_request_body.py -src/openapi_client/apis/paths/request_body_post_ref_in_property_request_body.py -src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py -src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py -src/openapi_client/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py -src/openapi_client/apis/tag_to_api.py -src/openapi_client/apis/tags/__init__.py -src/openapi_client/apis/tags/additional_properties_api.py -src/openapi_client/apis/tags/all_of_api.py -src/openapi_client/apis/tags/any_of_api.py -src/openapi_client/apis/tags/content_type_json_api.py -src/openapi_client/apis/tags/default_api.py -src/openapi_client/apis/tags/enum_api.py -src/openapi_client/apis/tags/format_api.py -src/openapi_client/apis/tags/items_api.py -src/openapi_client/apis/tags/max_items_api.py -src/openapi_client/apis/tags/max_length_api.py -src/openapi_client/apis/tags/max_properties_api.py -src/openapi_client/apis/tags/maximum_api.py -src/openapi_client/apis/tags/min_items_api.py -src/openapi_client/apis/tags/min_length_api.py -src/openapi_client/apis/tags/min_properties_api.py -src/openapi_client/apis/tags/minimum_api.py -src/openapi_client/apis/tags/multiple_of_api.py -src/openapi_client/apis/tags/not_api.py -src/openapi_client/apis/tags/one_of_api.py -src/openapi_client/apis/tags/operation_request_body_api.py -src/openapi_client/apis/tags/path_post_api.py -src/openapi_client/apis/tags/pattern_api.py -src/openapi_client/apis/tags/properties_api.py -src/openapi_client/apis/tags/ref_api.py -src/openapi_client/apis/tags/required_api.py -src/openapi_client/apis/tags/response_content_content_type_schema_api.py -src/openapi_client/apis/tags/type_api.py -src/openapi_client/apis/tags/unique_items_api.py -src/openapi_client/components/__init__.py -src/openapi_client/components/schema/__init__.py -src/openapi_client/components/schema/additionalproperties_allows_a_schema_which_should_validate.py -src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py -src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py -src/openapi_client/components/schema/additionalproperties_should_not_look_in_applicators.py -src/openapi_client/components/schema/allof.py -src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py -src/openapi_client/components/schema/allof_simple_types.py -src/openapi_client/components/schema/allof_with_base_schema.py -src/openapi_client/components/schema/allof_with_one_empty_schema.py -src/openapi_client/components/schema/allof_with_the_first_empty_schema.py -src/openapi_client/components/schema/allof_with_the_last_empty_schema.py -src/openapi_client/components/schema/allof_with_two_empty_schemas.py -src/openapi_client/components/schema/anyof.py -src/openapi_client/components/schema/anyof_complex_types.py -src/openapi_client/components/schema/anyof_with_base_schema.py -src/openapi_client/components/schema/anyof_with_one_empty_schema.py -src/openapi_client/components/schema/array_type_matches_arrays.py -src/openapi_client/components/schema/boolean_type_matches_booleans.py -src/openapi_client/components/schema/by_int.py -src/openapi_client/components/schema/by_number.py -src/openapi_client/components/schema/by_small_number.py -src/openapi_client/components/schema/date_time_format.py -src/openapi_client/components/schema/email_format.py -src/openapi_client/components/schema/enum_with0_does_not_match_false.py -src/openapi_client/components/schema/enum_with1_does_not_match_true.py -src/openapi_client/components/schema/enum_with_escaped_characters.py -src/openapi_client/components/schema/enum_with_false_does_not_match0.py -src/openapi_client/components/schema/enum_with_true_does_not_match1.py -src/openapi_client/components/schema/enums_in_properties.py -src/openapi_client/components/schema/forbidden_property.py -src/openapi_client/components/schema/hostname_format.py -src/openapi_client/components/schema/integer_type_matches_integers.py -src/openapi_client/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py -src/openapi_client/components/schema/invalid_string_value_for_default.py -src/openapi_client/components/schema/ipv4_format.py -src/openapi_client/components/schema/ipv6_format.py -src/openapi_client/components/schema/json_pointer_format.py -src/openapi_client/components/schema/maximum_validation.py -src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py -src/openapi_client/components/schema/maxitems_validation.py -src/openapi_client/components/schema/maxlength_validation.py -src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py -src/openapi_client/components/schema/maxproperties_validation.py -src/openapi_client/components/schema/minimum_validation.py -src/openapi_client/components/schema/minimum_validation_with_signed_integer.py -src/openapi_client/components/schema/minitems_validation.py -src/openapi_client/components/schema/minlength_validation.py -src/openapi_client/components/schema/minproperties_validation.py -src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py -src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py -src/openapi_client/components/schema/nested_items.py -src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py -src/openapi_client/components/schema/not.py -src/openapi_client/components/schema/not_more_complex_schema.py -src/openapi_client/components/schema/nul_characters_in_strings.py -src/openapi_client/components/schema/null_type_matches_only_the_null_object.py -src/openapi_client/components/schema/number_type_matches_numbers.py -src/openapi_client/components/schema/object_properties_validation.py -src/openapi_client/components/schema/object_type_matches_objects.py -src/openapi_client/components/schema/oneof.py -src/openapi_client/components/schema/oneof_complex_types.py -src/openapi_client/components/schema/oneof_with_base_schema.py -src/openapi_client/components/schema/oneof_with_empty_schema.py -src/openapi_client/components/schema/oneof_with_required.py -src/openapi_client/components/schema/pattern_is_not_anchored.py -src/openapi_client/components/schema/pattern_validation.py -src/openapi_client/components/schema/properties_with_escaped_characters.py -src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py -src/openapi_client/components/schema/ref_in_additionalproperties.py -src/openapi_client/components/schema/ref_in_allof.py -src/openapi_client/components/schema/ref_in_anyof.py -src/openapi_client/components/schema/ref_in_items.py -src/openapi_client/components/schema/ref_in_not.py -src/openapi_client/components/schema/ref_in_oneof.py -src/openapi_client/components/schema/ref_in_property.py -src/openapi_client/components/schema/required_default_validation.py -src/openapi_client/components/schema/required_validation.py -src/openapi_client/components/schema/required_with_empty_array.py -src/openapi_client/components/schema/required_with_escaped_characters.py -src/openapi_client/components/schema/simple_enum_validation.py -src/openapi_client/components/schema/string_type_matches_strings.py -src/openapi_client/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py -src/openapi_client/components/schema/uniqueitems_false_validation.py -src/openapi_client/components/schema/uniqueitems_validation.py -src/openapi_client/components/schema/uri_format.py -src/openapi_client/components/schema/uri_reference_format.py -src/openapi_client/components/schema/uri_template_format.py -src/openapi_client/components/schemas/__init__.py -src/openapi_client/configurations/__init__.py -src/openapi_client/configurations/api_configuration.py -src/openapi_client/configurations/schema_configuration.py -src/openapi_client/exceptions.py -src/openapi_client/paths/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/operation.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/py.typed -src/openapi_client/rest.py -src/openapi_client/schemas/__init__.py -src/openapi_client/schemas/format.py -src/openapi_client/schemas/original_immutabledict.py -src/openapi_client/schemas/schema.py -src/openapi_client/schemas/schemas.py -src/openapi_client/schemas/validation.py -src/openapi_client/security_schemes.py -src/openapi_client/server.py -src/openapi_client/servers/__init__.py -src/openapi_client/servers/server_0.py -src/openapi_client/shared_imports/__init__.py -src/openapi_client/shared_imports/header_imports.py -src/openapi_client/shared_imports/operation_imports.py -src/openapi_client/shared_imports/response_imports.py -src/openapi_client/shared_imports/schema_imports.py -src/openapi_client/shared_imports/security_scheme_imports.py -src/openapi_client/shared_imports/server_imports.py +src/unit_test_api/__init__.py +src/unit_test_api/api_client.py +src/unit_test_api/api_response.py +src/unit_test_api/apis/__init__.py +src/unit_test_api/apis/path_to_api.py +src/unit_test_api/apis/paths/__init__.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +src/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_int_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_number_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py +src/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_email_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +src/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py +src/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +src/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py +src/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py +src/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +src/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_not_request_body.py +src/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +src/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +src/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +src/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py +src/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +src/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py +src/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py +src/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +src/unit_test_api/apis/tag_to_api.py +src/unit_test_api/apis/tags/__init__.py +src/unit_test_api/apis/tags/additional_properties_api.py +src/unit_test_api/apis/tags/all_of_api.py +src/unit_test_api/apis/tags/any_of_api.py +src/unit_test_api/apis/tags/content_type_json_api.py +src/unit_test_api/apis/tags/default_api.py +src/unit_test_api/apis/tags/enum_api.py +src/unit_test_api/apis/tags/format_api.py +src/unit_test_api/apis/tags/items_api.py +src/unit_test_api/apis/tags/max_items_api.py +src/unit_test_api/apis/tags/max_length_api.py +src/unit_test_api/apis/tags/max_properties_api.py +src/unit_test_api/apis/tags/maximum_api.py +src/unit_test_api/apis/tags/min_items_api.py +src/unit_test_api/apis/tags/min_length_api.py +src/unit_test_api/apis/tags/min_properties_api.py +src/unit_test_api/apis/tags/minimum_api.py +src/unit_test_api/apis/tags/multiple_of_api.py +src/unit_test_api/apis/tags/not_api.py +src/unit_test_api/apis/tags/one_of_api.py +src/unit_test_api/apis/tags/operation_request_body_api.py +src/unit_test_api/apis/tags/path_post_api.py +src/unit_test_api/apis/tags/pattern_api.py +src/unit_test_api/apis/tags/properties_api.py +src/unit_test_api/apis/tags/ref_api.py +src/unit_test_api/apis/tags/required_api.py +src/unit_test_api/apis/tags/response_content_content_type_schema_api.py +src/unit_test_api/apis/tags/type_api.py +src/unit_test_api/apis/tags/unique_items_api.py +src/unit_test_api/components/__init__.py +src/unit_test_api/components/schema/__init__.py +src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py +src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py +src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py +src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py +src/unit_test_api/components/schema/allof.py +src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py +src/unit_test_api/components/schema/allof_simple_types.py +src/unit_test_api/components/schema/allof_with_base_schema.py +src/unit_test_api/components/schema/allof_with_one_empty_schema.py +src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py +src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py +src/unit_test_api/components/schema/allof_with_two_empty_schemas.py +src/unit_test_api/components/schema/anyof.py +src/unit_test_api/components/schema/anyof_complex_types.py +src/unit_test_api/components/schema/anyof_with_base_schema.py +src/unit_test_api/components/schema/anyof_with_one_empty_schema.py +src/unit_test_api/components/schema/array_type_matches_arrays.py +src/unit_test_api/components/schema/boolean_type_matches_booleans.py +src/unit_test_api/components/schema/by_int.py +src/unit_test_api/components/schema/by_number.py +src/unit_test_api/components/schema/by_small_number.py +src/unit_test_api/components/schema/date_time_format.py +src/unit_test_api/components/schema/email_format.py +src/unit_test_api/components/schema/enum_with0_does_not_match_false.py +src/unit_test_api/components/schema/enum_with1_does_not_match_true.py +src/unit_test_api/components/schema/enum_with_escaped_characters.py +src/unit_test_api/components/schema/enum_with_false_does_not_match0.py +src/unit_test_api/components/schema/enum_with_true_does_not_match1.py +src/unit_test_api/components/schema/enums_in_properties.py +src/unit_test_api/components/schema/forbidden_property.py +src/unit_test_api/components/schema/hostname_format.py +src/unit_test_api/components/schema/integer_type_matches_integers.py +src/unit_test_api/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.py +src/unit_test_api/components/schema/invalid_string_value_for_default.py +src/unit_test_api/components/schema/ipv4_format.py +src/unit_test_api/components/schema/ipv6_format.py +src/unit_test_api/components/schema/json_pointer_format.py +src/unit_test_api/components/schema/maximum_validation.py +src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py +src/unit_test_api/components/schema/maxitems_validation.py +src/unit_test_api/components/schema/maxlength_validation.py +src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py +src/unit_test_api/components/schema/maxproperties_validation.py +src/unit_test_api/components/schema/minimum_validation.py +src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py +src/unit_test_api/components/schema/minitems_validation.py +src/unit_test_api/components/schema/minlength_validation.py +src/unit_test_api/components/schema/minproperties_validation.py +src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py +src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py +src/unit_test_api/components/schema/nested_items.py +src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py +src/unit_test_api/components/schema/not.py +src/unit_test_api/components/schema/not_more_complex_schema.py +src/unit_test_api/components/schema/nul_characters_in_strings.py +src/unit_test_api/components/schema/null_type_matches_only_the_null_object.py +src/unit_test_api/components/schema/number_type_matches_numbers.py +src/unit_test_api/components/schema/object_properties_validation.py +src/unit_test_api/components/schema/object_type_matches_objects.py +src/unit_test_api/components/schema/oneof.py +src/unit_test_api/components/schema/oneof_complex_types.py +src/unit_test_api/components/schema/oneof_with_base_schema.py +src/unit_test_api/components/schema/oneof_with_empty_schema.py +src/unit_test_api/components/schema/oneof_with_required.py +src/unit_test_api/components/schema/pattern_is_not_anchored.py +src/unit_test_api/components/schema/pattern_validation.py +src/unit_test_api/components/schema/properties_with_escaped_characters.py +src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py +src/unit_test_api/components/schema/ref_in_additionalproperties.py +src/unit_test_api/components/schema/ref_in_allof.py +src/unit_test_api/components/schema/ref_in_anyof.py +src/unit_test_api/components/schema/ref_in_items.py +src/unit_test_api/components/schema/ref_in_not.py +src/unit_test_api/components/schema/ref_in_oneof.py +src/unit_test_api/components/schema/ref_in_property.py +src/unit_test_api/components/schema/required_default_validation.py +src/unit_test_api/components/schema/required_validation.py +src/unit_test_api/components/schema/required_with_empty_array.py +src/unit_test_api/components/schema/required_with_escaped_characters.py +src/unit_test_api/components/schema/simple_enum_validation.py +src/unit_test_api/components/schema/string_type_matches_strings.py +src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +src/unit_test_api/components/schema/uniqueitems_false_validation.py +src/unit_test_api/components/schema/uniqueitems_validation.py +src/unit_test_api/components/schema/uri_format.py +src/unit_test_api/components/schema/uri_reference_format.py +src/unit_test_api/components/schema/uri_template_format.py +src/unit_test_api/components/schemas/__init__.py +src/unit_test_api/configurations/__init__.py +src/unit_test_api/configurations/api_configuration.py +src/unit_test_api/configurations/schema_configuration.py +src/unit_test_api/exceptions.py +src/unit_test_api/paths/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_not_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py +src/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/__init__.py +src/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/operation.py +src/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/responses/__init__.py +src/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/responses/response_200/__init__.py +src/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/responses/response_200/content/__init__.py +src/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/responses/response_200/content/application_json/__init__.py +src/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/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/py.typed +src/unit_test_api/rest.py +src/unit_test_api/schemas/__init__.py +src/unit_test_api/schemas/format.py +src/unit_test_api/schemas/original_immutabledict.py +src/unit_test_api/schemas/schema.py +src/unit_test_api/schemas/schemas.py +src/unit_test_api/schemas/validation.py +src/unit_test_api/security_schemes.py +src/unit_test_api/server.py +src/unit_test_api/servers/__init__.py +src/unit_test_api/servers/server_0.py +src/unit_test_api/shared_imports/__init__.py +src/unit_test_api/shared_imports/header_imports.py +src/unit_test_api/shared_imports/operation_imports.py +src/unit_test_api/shared_imports/response_imports.py +src/unit_test_api/shared_imports/schema_imports.py +src/unit_test_api/shared_imports/security_scheme_imports.py +src/unit_test_api/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/3_0_3_unit_test/python/README.md b/samples/client/3_0_3_unit_test/python/README.md index fba2362ddc2..a601d645a3d 100644 --- a/samples/client/3_0_3_unit_test/python/README.md +++ b/samples/client/3_0_3_unit_test/python/README.md @@ -1,4 +1,4 @@ -# openapi-client +# unit-test-api sample spec for testing openapi functionality, built from json schema tests for draft6 This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md index 3e4f24ac50c..397fce370e0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/additional_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.additional_properties_api +unit_test_api.apis.tags.additional_properties_api # AdditionalPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md index 417b34edee4..a8fc70cc41f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/all_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.all_of_api +unit_test_api.apis.tags.all_of_api # AllOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md index 47da9b1b87e..db24138c8f9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/any_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.any_of_api +unit_test_api.apis.tags.any_of_api # AnyOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md index 6172fcc3636..04d4743de09 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/content_type_json_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.content_type_json_api +unit_test_api.apis.tags.content_type_json_api # ContentTypeJsonApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md index a9621a5414b..b207e3320f0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.default_api +unit_test_api.apis.tags.default_api # DefaultApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md index 9ed8b5a134b..529224b8e7b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/enum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.enum_api +unit_test_api.apis.tags.enum_api # EnumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md index 5df99056e47..5f25edf69da 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/format_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.format_api +unit_test_api.apis.tags.format_api # FormatApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md index cf23e008d52..7d4b0563bbb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.items_api +unit_test_api.apis.tags.items_api # ItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md index fa7a6b881ab..3c2f39b81d9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_items_api +unit_test_api.apis.tags.max_items_api # MaxItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md index e50f6427b47..581d53251b9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_length_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_length_api +unit_test_api.apis.tags.max_length_api # MaxLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md index 7c7f221dc03..6274432bfaf 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/max_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_properties_api +unit_test_api.apis.tags.max_properties_api # MaxPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md index f93c66a5928..431e5c64ad4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/maximum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.maximum_api +unit_test_api.apis.tags.maximum_api # MaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md index 189af58359c..eac5307be28 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_items_api +unit_test_api.apis.tags.min_items_api # MinItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md index bf1b6a0c13c..76d6f3acdbe 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_length_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_length_api +unit_test_api.apis.tags.min_length_api # MinLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md index 861a30f1b6d..fc7595be9e2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/min_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_properties_api +unit_test_api.apis.tags.min_properties_api # MinPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md index 671bbf4f58d..62d9b842e22 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/minimum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.minimum_api +unit_test_api.apis.tags.minimum_api # MinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md index f4ffed0e3fc..91592db4255 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/multiple_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.multiple_of_api +unit_test_api.apis.tags.multiple_of_api # MultipleOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md index 84d064377fd..21b54a5d8cd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.not_api +unit_test_api.apis.tags.not_api # NotApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md index 58d2f471203..42058af96dd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/one_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.one_of_api +unit_test_api.apis.tags.one_of_api # OneOfApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md index bbdea3f4db6..e49b4cfb7bb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/operation_request_body_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.operation_request_body_api +unit_test_api.apis.tags.operation_request_body_api # OperationRequestBodyApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md index 1b12a7912d9..72bc6e90636 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/path_post_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.path_post_api +unit_test_api.apis.tags.path_post_api # PathPostApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md index 12cd14bde98..e36a5db710f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/pattern_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.pattern_api +unit_test_api.apis.tags.pattern_api # PatternApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md index 53a25c96d3b..49bc5901215 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.properties_api +unit_test_api.apis.tags.properties_api # PropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md index be9cd309ef4..eef0c1721f6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/ref_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.ref_api +unit_test_api.apis.tags.ref_api # RefApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md index 1ea58597191..a37631ea5ea 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/required_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.required_api +unit_test_api.apis.tags.required_api # RequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md index 04b83ad2d7d..31eea7f8cea 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.response_content_content_type_schema_api +unit_test_api.apis.tags.response_content_content_type_schema_api # ResponseContentContentTypeSchemaApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md index c40837dd708..547c75e6739 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/type_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.type_api +unit_test_api.apis.tags.type_api # TypeApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md index d470c375c00..8c687b43559 100644 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md +++ b/samples/client/3_0_3_unit_test/python/docs/apis/tags/unique_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.unique_items_api +unit_test_api.apis.tags.unique_items_api # UniqueItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md index 82d42b75243..30dd79f1dfd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAllowsASchemaWhichShouldValidate -openapi_client.components.schema.additionalproperties_allows_a_schema_which_should_validate +unit_test_api.components.schema.additionalproperties_allows_a_schema_which_should_validate ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md index c26435c74a3..8dd38499643 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -openapi_client.components.schema.additionalproperties_are_allowed_by_default +unit_test_api.components.schema.additionalproperties_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md index fbb9f34b100..91734799218 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -openapi_client.components.schema.additionalproperties_can_exist_by_itself +unit_test_api.components.schema.additionalproperties_can_exist_by_itself ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md index 86107570eb7..d3f57310681 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/additionalproperties_should_not_look_in_applicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesShouldNotLookInApplicators -openapi_client.components.schema.additionalproperties_should_not_look_in_applicators +unit_test_api.components.schema.additionalproperties_should_not_look_in_applicators ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md index 17aff8377b3..dba78598a7f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof.md @@ -1,5 +1,5 @@ # Allof -openapi_client.components.schema.allof +unit_test_api.components.schema.allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md index ba71a7fa107..5c3d9d5885c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -openapi_client.components.schema.allof_combined_with_anyof_oneof +unit_test_api.components.schema.allof_combined_with_anyof_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md index 63e6fc23071..9253a5b8437 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_simple_types.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -openapi_client.components.schema.allof_simple_types +unit_test_api.components.schema.allof_simple_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md index e4d86154e75..cc5d8d960b8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_base_schema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -openapi_client.components.schema.allof_with_base_schema +unit_test_api.components.schema.allof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md index 79097635223..5cf9db40ba4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -openapi_client.components.schema.allof_with_one_empty_schema +unit_test_api.components.schema.allof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md index 5c2b8248e88..356803ec24c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -openapi_client.components.schema.allof_with_the_first_empty_schema +unit_test_api.components.schema.allof_with_the_first_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md index 40a9ccfae05..1b2e4fb7e53 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -openapi_client.components.schema.allof_with_the_last_empty_schema +unit_test_api.components.schema.allof_with_the_last_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md index 699a57ce756..aa9c99a101f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -openapi_client.components.schema.allof_with_two_empty_schemas +unit_test_api.components.schema.allof_with_two_empty_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md index ef4898eb423..042780da106 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof.md @@ -1,5 +1,5 @@ # Anyof -openapi_client.components.schema.anyof +unit_test_api.components.schema.anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md index 763d73b2aab..2c3cdca3cfd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_complex_types.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -openapi_client.components.schema.anyof_complex_types +unit_test_api.components.schema.anyof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md index ea33c52d4a2..5c150ef6fa1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_base_schema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -openapi_client.components.schema.anyof_with_base_schema +unit_test_api.components.schema.anyof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md index c634c1d761c..d4243c366e9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -openapi_client.components.schema.anyof_with_one_empty_schema +unit_test_api.components.schema.anyof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md index 9412c214057..c16d15867d8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/array_type_matches_arrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -openapi_client.components.schema.array_type_matches_arrays +unit_test_api.components.schema.array_type_matches_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md index ccf66cfebdb..40353276217 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -openapi_client.components.schema.boolean_type_matches_booleans +unit_test_api.components.schema.boolean_type_matches_booleans ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md index ba7c4b17f7f..1945ad2240f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_int.md @@ -1,5 +1,5 @@ # ByInt -openapi_client.components.schema.by_int +unit_test_api.components.schema.by_int ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md index 0851beb6291..46ce873dcf1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_number.md @@ -1,5 +1,5 @@ # ByNumber -openapi_client.components.schema.by_number +unit_test_api.components.schema.by_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md index 2621ab7ee8f..e69123a95f8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/by_small_number.md @@ -1,5 +1,5 @@ # BySmallNumber -openapi_client.components.schema.by_small_number +unit_test_api.components.schema.by_small_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md index 4280a29b11e..672d9536be7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/date_time_format.md @@ -1,5 +1,5 @@ # DateTimeFormat -openapi_client.components.schema.date_time_format +unit_test_api.components.schema.date_time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md index 0ffd547dadd..19c83e8d25b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/email_format.md @@ -1,5 +1,5 @@ # EmailFormat -openapi_client.components.schema.email_format +unit_test_api.components.schema.email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md index ed83e936da4..15b5dc53b6e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -openapi_client.components.schema.enum_with0_does_not_match_false +unit_test_api.components.schema.enum_with0_does_not_match_false ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md index 2025ed9ff16..6615b73908f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -openapi_client.components.schema.enum_with1_does_not_match_true +unit_test_api.components.schema.enum_with1_does_not_match_true ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md index c0a9f43b53d..3c0ea810a81 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_escaped_characters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -openapi_client.components.schema.enum_with_escaped_characters +unit_test_api.components.schema.enum_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md index 212e10809ad..fdc3978854d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -openapi_client.components.schema.enum_with_false_does_not_match0 +unit_test_api.components.schema.enum_with_false_does_not_match0 ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md index 8710e6dfd45..b77e0d0ce8c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -openapi_client.components.schema.enum_with_true_does_not_match1 +unit_test_api.components.schema.enum_with_true_does_not_match1 ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md index cd9a1e817aa..70957943d7e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/enums_in_properties.md @@ -1,5 +1,5 @@ # EnumsInProperties -openapi_client.components.schema.enums_in_properties +unit_test_api.components.schema.enums_in_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md index 578716cefa4..f1d695dc38b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md @@ -1,5 +1,5 @@ # ForbiddenProperty -openapi_client.components.schema.forbidden_property +unit_test_api.components.schema.forbidden_property ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md index 7e9e71ee21d..df9411b9603 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/hostname_format.md @@ -1,5 +1,5 @@ # HostnameFormat -openapi_client.components.schema.hostname_format +unit_test_api.components.schema.hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md index 011382ff502..6630731f225 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/integer_type_matches_integers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -openapi_client.components.schema.integer_type_matches_integers +unit_test_api.components.schema.integer_type_matches_integers ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md index 27f1c8cb209..c20ec1b1bde 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_instance_should_not_raise_error_when_float_division_inf.md @@ -1,5 +1,5 @@ # InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -openapi_client.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf +unit_test_api.components.schema.invalid_instance_should_not_raise_error_when_float_division_inf ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md index 4d99da2dfee..75e7eebfd95 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/invalid_string_value_for_default.md @@ -1,5 +1,5 @@ # InvalidStringValueForDefault -openapi_client.components.schema.invalid_string_value_for_default +unit_test_api.components.schema.invalid_string_value_for_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md index 4d85e2dfc50..78d8cc1092c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv4_format.md @@ -1,5 +1,5 @@ # Ipv4Format -openapi_client.components.schema.ipv4_format +unit_test_api.components.schema.ipv4_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md index ddfd419ea10..a72f9736166 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ipv6_format.md @@ -1,5 +1,5 @@ # Ipv6Format -openapi_client.components.schema.ipv6_format +unit_test_api.components.schema.ipv6_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md index 14b8237cdc1..98e8b61825c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/json_pointer_format.md @@ -1,5 +1,5 @@ # JsonPointerFormat -openapi_client.components.schema.json_pointer_format +unit_test_api.components.schema.json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md index e2d0d04a242..378b58f8023 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation.md @@ -1,5 +1,5 @@ # MaximumValidation -openapi_client.components.schema.maximum_validation +unit_test_api.components.schema.maximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md index 99f6aba50fb..d67df0a95ec 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -openapi_client.components.schema.maximum_validation_with_unsigned_integer +unit_test_api.components.schema.maximum_validation_with_unsigned_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md index cad99d77c77..e7b2d56546b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxitems_validation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -openapi_client.components.schema.maxitems_validation +unit_test_api.components.schema.maxitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md index 681922c6d72..5f3a102065f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxlength_validation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -openapi_client.components.schema.maxlength_validation +unit_test_api.components.schema.maxlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md index 15bb489c9b0..5477108f943 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -openapi_client.components.schema.maxproperties0_means_the_object_is_empty +unit_test_api.components.schema.maxproperties0_means_the_object_is_empty ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md index a949f7516bf..cd9d2b02984 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/maxproperties_validation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -openapi_client.components.schema.maxproperties_validation +unit_test_api.components.schema.maxproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md index 50e38f4b416..d90d5b573de 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation.md @@ -1,5 +1,5 @@ # MinimumValidation -openapi_client.components.schema.minimum_validation +unit_test_api.components.schema.minimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md index 75dba36ce70..b3c9f3dba7f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -openapi_client.components.schema.minimum_validation_with_signed_integer +unit_test_api.components.schema.minimum_validation_with_signed_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md index 9e2902ac5dc..76b3b846a9f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minitems_validation.md @@ -1,5 +1,5 @@ # MinitemsValidation -openapi_client.components.schema.minitems_validation +unit_test_api.components.schema.minitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md index f4eec7c22e6..149cd02b965 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minlength_validation.md @@ -1,5 +1,5 @@ # MinlengthValidation -openapi_client.components.schema.minlength_validation +unit_test_api.components.schema.minlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md index 9bfa96bb61b..87f643e4e40 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/minproperties_validation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -openapi_client.components.schema.minproperties_validation +unit_test_api.components.schema.minproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md index 27517ae43a8..216fa2e6bbc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -openapi_client.components.schema.nested_allof_to_check_validation_semantics +unit_test_api.components.schema.nested_allof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md index 00cfa1e5d02..69dbb3c5ed1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -openapi_client.components.schema.nested_anyof_to_check_validation_semantics +unit_test_api.components.schema.nested_anyof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md index dd71cf121cc..12858c9191b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_items.md @@ -1,5 +1,5 @@ # NestedItems -openapi_client.components.schema.nested_items +unit_test_api.components.schema.nested_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md index 7c0a3a84ce7..95a56bdfb5a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -openapi_client.components.schema.nested_oneof_to_check_validation_semantics +unit_test_api.components.schema.nested_oneof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md index c5d503ba001..e10c6adbdbe 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md @@ -1,5 +1,5 @@ # Not -openapi_client.components.schema.not +unit_test_api.components.schema.not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md index c042b4880c3..b0ca5d6504f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -openapi_client.components.schema.not_more_complex_schema +unit_test_api.components.schema.not_more_complex_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md index 87432dbc863..6b2ae0f5596 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/nul_characters_in_strings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -openapi_client.components.schema.nul_characters_in_strings +unit_test_api.components.schema.nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md index 6c8fa175936..d61c3f1ddd1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -openapi_client.components.schema.null_type_matches_only_the_null_object +unit_test_api.components.schema.null_type_matches_only_the_null_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md index 9de89f93f7b..cac70e72fdc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/number_type_matches_numbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -openapi_client.components.schema.number_type_matches_numbers +unit_test_api.components.schema.number_type_matches_numbers ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md index cdcc6d319d4..119d76f77a0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_properties_validation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -openapi_client.components.schema.object_properties_validation +unit_test_api.components.schema.object_properties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md index 28386703ab2..71b0fb1fa2c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/object_type_matches_objects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -openapi_client.components.schema.object_type_matches_objects +unit_test_api.components.schema.object_type_matches_objects ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md index 78e3bdfe366..1d897561347 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof.md @@ -1,5 +1,5 @@ # Oneof -openapi_client.components.schema.oneof +unit_test_api.components.schema.oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md index cd63a9482c7..a7f15deadb7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_complex_types.md @@ -1,5 +1,5 @@ # OneofComplexTypes -openapi_client.components.schema.oneof_complex_types +unit_test_api.components.schema.oneof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md index 7ff0bf6191c..4230ca82320 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_base_schema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -openapi_client.components.schema.oneof_with_base_schema +unit_test_api.components.schema.oneof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md index 55ed638a799..9a5e93ffe25 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_empty_schema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -openapi_client.components.schema.oneof_with_empty_schema +unit_test_api.components.schema.oneof_with_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md index 5e71f9061e7..bde6e8f36ee 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/oneof_with_required.md @@ -1,5 +1,5 @@ # OneofWithRequired -openapi_client.components.schema.oneof_with_required +unit_test_api.components.schema.oneof_with_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md index 448f029fad1..172c789e202 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_is_not_anchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -openapi_client.components.schema.pattern_is_not_anchored +unit_test_api.components.schema.pattern_is_not_anchored ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md index 54835339351..97fc2c367fd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/pattern_validation.md @@ -1,5 +1,5 @@ # PatternValidation -openapi_client.components.schema.pattern_validation +unit_test_api.components.schema.pattern_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md index 1e62c04f7c6..830a047b516 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/properties_with_escaped_characters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -openapi_client.components.schema.properties_with_escaped_characters +unit_test_api.components.schema.properties_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md index 1133a853c9b..d70dd946f15 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -openapi_client.components.schema.property_named_ref_that_is_not_a_reference +unit_test_api.components.schema.property_named_ref_that_is_not_a_reference ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md index dc89dd91c6b..a51bdc1ffaa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_additionalproperties.md @@ -1,5 +1,5 @@ # RefInAdditionalproperties -openapi_client.components.schema.ref_in_additionalproperties +unit_test_api.components.schema.ref_in_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md index 54ebfdfd545..6c563963f4b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_allof.md @@ -1,5 +1,5 @@ # RefInAllof -openapi_client.components.schema.ref_in_allof +unit_test_api.components.schema.ref_in_allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md index 387efbc9f22..012b7825ee8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_anyof.md @@ -1,5 +1,5 @@ # RefInAnyof -openapi_client.components.schema.ref_in_anyof +unit_test_api.components.schema.ref_in_anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md index 7b12e8822b3..e5bffd4b68b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_items.md @@ -1,5 +1,5 @@ # RefInItems -openapi_client.components.schema.ref_in_items +unit_test_api.components.schema.ref_in_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md index f860a97d77b..9b083bb46dc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_not.md @@ -1,5 +1,5 @@ # RefInNot -openapi_client.components.schema.ref_in_not +unit_test_api.components.schema.ref_in_not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md index 04330bc4330..0d03c124ece 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_oneof.md @@ -1,5 +1,5 @@ # RefInOneof -openapi_client.components.schema.ref_in_oneof +unit_test_api.components.schema.ref_in_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md index b49b4a1c30c..87bf1615763 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/ref_in_property.md @@ -1,5 +1,5 @@ # RefInProperty -openapi_client.components.schema.ref_in_property +unit_test_api.components.schema.ref_in_property ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md index 013b2b6c3e9..a1923bc3370 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_default_validation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -openapi_client.components.schema.required_default_validation +unit_test_api.components.schema.required_default_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md index ca5e4fb2b5c..3dc9958f88b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_validation.md @@ -1,5 +1,5 @@ # RequiredValidation -openapi_client.components.schema.required_validation +unit_test_api.components.schema.required_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md index 31f72b12cda..06ca142ed71 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_empty_array.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -openapi_client.components.schema.required_with_empty_array +unit_test_api.components.schema.required_with_empty_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md index ef7a12c740d..b59d46f5094 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/required_with_escaped_characters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -openapi_client.components.schema.required_with_escaped_characters +unit_test_api.components.schema.required_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md index 8913312182e..76d4e96d6cb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/simple_enum_validation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -openapi_client.components.schema.simple_enum_validation +unit_test_api.components.schema.simple_enum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md index c8cba112eb4..5ad002dcdb6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/string_type_matches_strings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -openapi_client.components.schema.string_type_matches_strings +unit_test_api.components.schema.string_type_matches_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md index 7f367c94368..cfe27e462ba 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.md @@ -1,5 +1,5 @@ # TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -openapi_client.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing +unit_test_api.components.schema.the_default_keyword_does_not_do_anything_if_the_property_is_missing ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md index 34fa0acc529..a6d90d841c2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_false_validation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -openapi_client.components.schema.uniqueitems_false_validation +unit_test_api.components.schema.uniqueitems_false_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md index 6d824238bf2..21ecd3794ff 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uniqueitems_validation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -openapi_client.components.schema.uniqueitems_validation +unit_test_api.components.schema.uniqueitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md index a903ae2744a..8d178c0bec8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_format.md @@ -1,5 +1,5 @@ # UriFormat -openapi_client.components.schema.uri_format +unit_test_api.components.schema.uri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md index a656995619f..1cb2c8ad458 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_reference_format.md @@ -1,5 +1,5 @@ # UriReferenceFormat -openapi_client.components.schema.uri_reference_format +unit_test_api.components.schema.uri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md index 4f1b8fc8806..45598bd12a6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/uri_template_format.md @@ -1,5 +1,5 @@ # UriTemplateFormat -openapi_client.components.schema.uri_template_format +unit_test_api.components.schema.uri_template_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md index 341f9e65f99..f312006f588 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md index bda1c84a172..95bb88f6efa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md index b82af170bfd..29d067da7f4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md index c744330e50b..3d963691b62 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md index 5b603004df3..02f06c8e2fd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation +unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md index 50da0fd2f89..d8a24db91a3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_request_body.operation +unit_test_api.paths.request_body_post_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md index b44a20dc03b..0a01c74cdef 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_simple_types_request_body.operation +unit_test_api.paths.request_body_post_allof_simple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md index 5f232725445..874d4202513 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md index b1f42f34a0a..8117298865b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md index ba8da971840..646a46f821c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md index b8efef16203..c365d970a7d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md index 51e9d99a4a4..b22331cb592 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation +unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md index 1cd4866b4aa..33f97e54a7d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_complex_types_request_body.operation +unit_test_api.paths.request_body_post_anyof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md index 873b2cfc20e..f7b5e3192df 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_request_body.operation +unit_test_api.paths.request_body_post_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md index a8e1996eab3..4c2144060f2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md index 2afb748ca22..664c433e340 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md index 4ea2dec9161..5a8aaeaf958 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.operation +unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md index f013047d6eb..8ba76b13aea 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.operation +unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md index e510a52ea3f..abfc5dc782b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_int_request_body.operation +unit_test_api.paths.request_body_post_by_int_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md index 57fc5f3cbf3..c3dfeb70aff 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_number_request_body.operation +unit_test_api.paths.request_body_post_by_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md index 134a7a32553..a30753fa279 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_small_number_request_body.operation +unit_test_api.paths.request_body_post_by_small_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md index 05c7a3fe507..a94bc64b45b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_date_time_format_request_body.operation +unit_test_api.paths.request_body_post_date_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md index 14b7d2c0807..879b019c0e8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_email_format_request_body.operation +unit_test_api.paths.request_body_post_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md index c47b85a5ef8..3cb6bb40948 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation +unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md index e88cabcbb65..585fa7bcd29 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation +unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md index 662c62e5d48..367d822ce51 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md index 84be01b709b..fdebcdb5e8b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation +unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md index c89070ae61e..c29caa01a4f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation +unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md index 6fa42c97cec..3b98655662a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enums_in_properties_request_body.operation +unit_test_api.paths.request_body_post_enums_in_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md index f5577711145..4cfe00679d2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_forbidden_property_request_body.operation +unit_test_api.paths.request_body_post_forbidden_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md index 93cdc6bb193..906a0d48a8f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_hostname_format_request_body.operation +unit_test_api.paths.request_body_post_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md index f7b513def06..67742a752ed 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.operation +unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md index e50b9f882f3..76a914d85cd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.operation +unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md index cbcf6977992..9fc35ff3ca9 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_invalid_string_value_for_default_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_invalid_string_value_for_default_request_body.operation +unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_invalid_string_value_for_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md index f9a0977b65a..c3b02f62215 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ipv4_format_request_body.operation +unit_test_api.paths.request_body_post_ipv4_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md index ead74b40169..582fccd68cb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ipv6_format_request_body.operation +unit_test_api.paths.request_body_post_ipv6_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md index 7abd81d3415..7568f619f63 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_json_pointer_format_request_body.operation +unit_test_api.paths.request_body_post_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md index ea07c977b28..fd36d29c7a3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maximum_validation_request_body.operation +unit_test_api.paths.request_body_post_maximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md index d35e9ef5d55..2f08e39701f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation +unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md index f128d463072..fcf803c693a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxitems_validation_request_body.operation +unit_test_api.paths.request_body_post_maxitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md index 55c54771958..0584da67055 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxlength_validation_request_body.operation +unit_test_api.paths.request_body_post_maxlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md index 9c70ec7981c..5d8aaf47802 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation +unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md index b1e875e6989..ed12e4e58a1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxproperties_validation_request_body.operation +unit_test_api.paths.request_body_post_maxproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md index dfc8f9d22a8..7b4705230e8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minimum_validation_request_body.operation +unit_test_api.paths.request_body_post_minimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md index 4bf82cf4383..9f55b8327a4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation +unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md index 464655cc7bf..71b3ce83f04 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minitems_validation_request_body.operation +unit_test_api.paths.request_body_post_minitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import min_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md index 1cb3d563040..f856f019042 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minlength_validation_request_body.operation +unit_test_api.paths.request_body_post_minlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md index ec6a804f869..3d02d50edd2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minproperties_validation_request_body.operation +unit_test_api.paths.request_body_post_minproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md index cf0fc95b9c3..9dfb6bae67f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md index fc38bbd03d4..7e8b7a3693a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md index eeddaa49319..5f95380db08 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_items_request_body.operation +unit_test_api.paths.request_body_post_nested_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -111,7 +111,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md index 67dd488dee4..9b85d89b160 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md index 4a406a0d1f4..e65fd623351 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_not_more_complex_schema_request_body.operation +unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md index 78a21137fe9..efb4c5a68aa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_not_request_body.operation +unit_test_api.paths.request_body_post_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md index 0d1c940b66f..fcb18059c74 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.operation +unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md index 21b67e43383..f0407d66210 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation +unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md index c02e707469e..d63b60c0bdb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.operation +unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md index afeedb5a671..9feda9546c6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_object_properties_validation_request_body.operation +unit_test_api.paths.request_body_post_object_properties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md index d262776fea7..278955397cd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_object_type_matches_objects_request_body.operation +unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md index 7682cf80abf..dd031f2605a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_complex_types_request_body.operation +unit_test_api.paths.request_body_post_oneof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md index 80e82088cdd..63934610975 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_request_body.operation +unit_test_api.paths.request_body_post_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md index cb887f5e8ed..14474108fbd 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md index 99894444d7b..a2bdcf86c7d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md index 1021ca85272..80d854e7eff 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_required_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md index df1c37ca96a..a6a269f1aa8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.operation +unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md index 35a6a6bcf14..2b65e49f06f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_pattern_validation_request_body.operation +unit_test_api.paths.request_body_post_pattern_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md index c207c982ff2..0109a423ba3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md index 1e49eca8e08..ad9024103e1 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation +unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md index 1a2b19a0891..fc06e65a94b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_additionalproperties_request_body.operation +unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md index 4f8dd3ca601..b615be824fc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_allof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_allof_request_body.operation +unit_test_api.paths.request_body_post_ref_in_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md index 23e1c1c7e84..6fe1cd79b59 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_anyof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_anyof_request_body.operation +unit_test_api.paths.request_body_post_ref_in_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md index f32602fc100..277bc05982f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_items_request_body.operation +unit_test_api.paths.request_body_post_ref_in_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md index 371fb17af57..26a9d8c05a8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_not_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_not_request_body.operation +unit_test_api.paths.request_body_post_ref_in_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_not_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md index 4912f00e4ba..9b35bb34df3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_oneof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_oneof_request_body.operation +unit_test_api.paths.request_body_post_ref_in_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md index ca6c72abb68..4da5bb2fd84 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_ref_in_property_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ref_in_property_request_body.operation +unit_test_api.paths.request_body_post_ref_in_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ref_in_property_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md index 8367ce59c2a..fb32df32606 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_default_validation_request_body.operation +unit_test_api.paths.request_body_post_required_default_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md index 5a6bb47bcc1..5fc5aaa3826 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_validation_request_body.operation +unit_test_api.paths.request_body_post_required_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md index 04c5a178a49..d1917bcb221 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_with_empty_array_request_body.operation +unit_test_api.paths.request_body_post_required_with_empty_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md index d34a75a81ac..610ddd56ed3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md index 1a229cb5379..b3f6e45925d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_simple_enum_validation_request_body.operation +unit_test_api.paths.request_body_post_simple_enum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md index c9024916b51..074b8897c69 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_string_type_matches_strings_request_body.operation +unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md index 118257e94f3..9eaa98dd9f5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.operation +unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md index 417268d3f58..bbf28e27903 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md index ab030a1d830..93d2f0fdb0b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_validation_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md index 9db906cbe32..4dfc24b9078 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_format_request_body.operation +unit_test_api.paths.request_body_post_uri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md index 7ce4885346e..5c728aa410c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_reference_format_request_body.operation +unit_test_api.paths.request_body_post_uri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md index bcad1cd0ae3..180e3ca0df7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_template_format_request_body.operation +unit_test_api.paths.request_body_post_uri_template_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md index f608d5cfa60..bd1196899f6 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md index 0596834e70a..07083960d51 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md index 487e6567ea5..04bde18e729 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md index 56d01915ab7..68c0cda5fdc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md index c4829841abb..47030a2a18a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md index 856e639b551..ecb1c4c6895 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md index 6d0d1b9cd24..0704807b953 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_simple_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md index bb6e0c8cbbc..d1a08bab46a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md index a9a621ed118..f5478360d53 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md index f1de4ab7814..4b7ecfdee21 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md index fa38624754a..f3d05d5b297 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md index 82a608eb386..55efb17dc6d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md index 0730924c09a..2ffbe705bc7 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md index eb448faec46..83d0e41e710 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md index d3244c2cb28..ef42615db00 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md index bd1f6aed5b5..699da1d4991 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md index db364155874..0afe2389f97 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md index 211306a1fcb..f9373d2dded 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md index 9e4bc7796b5..21e489b8ead 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_int_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_int_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md index b0db091d735..03c1ef622ef 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_number_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_number_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md index 5c5bad58393..9b2fbafcf1a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_small_number_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md index 0a51292b3de..0384cee6fd8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_time_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md index ea3230be1df..e3655122704 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_email_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_email_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md index b592169bbce..1f46d7858e0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md index bd1982a1363..77cc20dba1c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md index 6841460dcb6..6a6f86ee7b5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md index 8e9ffe3ceec..ecee92a82ef 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md index b5acb325f34..4fc607b4218 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md index 429ec4185e7..0f9751af197 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enums_in_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md index 527e0b34476..da449217a99 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_forbidden_property_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md index f6165eaf700..54e96e04d29 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_hostname_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md index 6b67c3c6cd0..2e7e049149e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md index 8a5e2b2e895..19124c89afc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md index a2969e02713..b57190613a8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DefaultApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md index a905adc3e7d..d49ab322652 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv4_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md index 849037c07a7..6f0bdf65c4e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv6_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md index 68f5dde4db9..38f99af75bc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_json_pointer_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md index cc480f20114..33382572340 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md index 24b85834a3c..2ad2c0f44f5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md index a5aa3d2b6f3..9194f4e92ce 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import max_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import max_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = max_items_api.MaxItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MaxItemsApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md index 62ae29a3fbb..94f4da2a652 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxlength_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md index 97673270682..1e3d5ea62a8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md index 8f6b460106b..f24bc02e54f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md index 02cb30532db..f4de026b01e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md index 1b0e8b89345..f0623319deb 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md index c84e65d3e40..a2e80f516cc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import min_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md index 9111767d199..605f4403388 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minlength_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md index 80932686545..c32fe29c801 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minproperties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md index f10ac3a803d..97f7bcff1fa 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md index eb26f10a11e..cc0db50ccda 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md index 4f533bab19c..4373c46f801 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md index a24312df58d..f2e92c6f914 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index eea10ff93a7..627eda73e39 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index 17e0ba13835..b3332703e5a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_not_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md index 9013325a6cb..478075ffb53 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md index f25bbd07afc..8da9e975d92 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md index 057563b61a5..3c29f230822 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md index ad32384d076..7ee2932fe63 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_properties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md index f6d247c86c7..0ad8829e9e3 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md index c06d779c64a..802d049b6cf 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md index 5646db61dc2..7da75e80400 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md index fcded015635..b3db8a20701 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md index c76147da3fc..c3f84a2d1af 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md index c62f4232298..2f30af9a726 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_required_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md index 59a8aed90c5..acd43473cf5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md index 0a2e14b510c..d9691bb1341 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md index 1c1046391b4..e0fed3c6a05 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md index 6ad155a731f..c74b71131ec 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md index ef9a315b211..58360debb67 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md index 3813ad35d0c..53de549744e 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_allof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_allof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md index ddad8a526b4..4979ec2517c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_anyof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md index a0ad34ebd46..a9fed183002 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md index 2ba3f228614..152f0f7a3ab 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_not_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_not_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_not_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md index cf5c9406e14..e06989ea1cc 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_oneof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md index 7bf1d993033..bfb6aa2c942 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_ref_in_property_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ref_in_property_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ref_in_property_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md index f33377c06e7..27dbc3b144d 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_default_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md index 875d378e0af..b1bbd780334 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md index ed7206b4edb..12fa5e0375a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md index 9ab2652ec1f..dcdd0878a37 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md index 79e3d1b3af0..ab8212b4d81 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md index face0e8d0d9..f221b5fd41a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md index bc8ebb0545f..6c6d5295b7a 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DefaultApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md index 8af53b5ab51..ea686f3d9a0 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md index ea563853c4b..b7c6bd6708f 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md index 863eb3729a6..145c150a3ff 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md index c4abca1e181..d3ee1f0955c 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_reference_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md index a6c76d1210f..b3c216c87d2 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_template_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md b/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md index 7055662bd76..b37c67353d5 100644 --- a/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md +++ b/samples/client/3_0_3_unit_test/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_0 +unit_test_api.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/3_0_3_unit_test/python/pyproject.toml b/samples/client/3_0_3_unit_test/python/pyproject.toml index e28712644f2..f930d6ed010 100644 --- a/samples/client/3_0_3_unit_test/python/pyproject.toml +++ b/samples/client/3_0_3_unit_test/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "unit_test_api" = ["py.typed"] [project] -name = "openapi-client" +name = "unit-test-api" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py index 62866c1972f..8d5e7a3ebac 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py @@ -11,7 +11,7 @@ from unit_test_api.apis.tags.multiple_of_api import MultipleOfApi from unit_test_api.apis.tags.format_api import FormatApi from unit_test_api.apis.tags.enum_api import EnumApi -from unit_test_api.apis.tags._not_api import _NotApi +from unit_test_api.apis.tags.not_api import NotApi from unit_test_api.apis.tags.default_api import DefaultApi from unit_test_api.apis.tags.maximum_api import MaximumApi from unit_test_api.apis.tags.max_items_api import MaxItemsApi @@ -43,7 +43,7 @@ "multipleOf": typing.Type[MultipleOfApi], "format": typing.Type[FormatApi], "enum": typing.Type[EnumApi], - "not": typing.Type[_NotApi], + "not": typing.Type[NotApi], "default": typing.Type[DefaultApi], "maximum": typing.Type[MaximumApi], "maxItems": typing.Type[MaxItemsApi], @@ -76,7 +76,7 @@ "multipleOf": MultipleOfApi, "format": FormatApi, "enum": EnumApi, - "not": _NotApi, + "not": NotApi, "default": DefaultApi, "maximum": MaximumApi, "maxItems": MaxItemsApi, diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py new file mode 100644 index 00000000000..ffada1b468c --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from unit_test_api.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from unit_test_api.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes + + +class NotApi( + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py new file mode 100644 index 00000000000..56d010fd571 --- /dev/null +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.0.3 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not2: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore + diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index 43fe91544f3..00f00f63247 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -46,7 +46,7 @@ def __new__( arg_[key_] = val arg_.update(kwargs) used_arg_ = typing.cast(NotDictInput, arg_) - return _Not.validate(used_arg_, configuration=configuration_) + return Not.validate(used_arg_, configuration=configuration_) @staticmethod def from_dict_( @@ -56,7 +56,7 @@ def from_dict_( ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> NotDict: - return _Not.validate(arg, configuration=configuration) + return Not.validate(arg, configuration=configuration) @property def foo(self) -> typing.Union[str, schemas.Unset]: @@ -75,7 +75,7 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS @dataclasses.dataclass(frozen=True) -class _Not( +class Not( schemas.Schema[NotDict, tuple] ): types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) @@ -115,5 +115,5 @@ class NotMoreComplexSchema( Do not edit the class manually. """ # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py index 01293605bb2..1764bbf1f22 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py @@ -10,8 +10,6 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference AllOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py index 8552478f77b..070c9eaffe6 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py @@ -10,8 +10,6 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference AnyOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py index 207b523b5be..e7d8fad7430 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py @@ -24,5 +24,3 @@ class RefInNot( # any type not_: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore - -from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py index 1b4425f219e..af3526bcaaf 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py @@ -10,8 +10,6 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference OneOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py index 7244d2f60b7..68c8f77e506 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py @@ -63,7 +63,7 @@ from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics from unit_test_api.components.schema.nested_items import NestedItems from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api.components.schema._not import _Not +from unit_test_api.components.schema.not import Not from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py index 538a42fdf50..ca1d6ae6f0a 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py @@ -9,7 +9,7 @@ from unit_test_api import api_client from unit_test_api.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not +from unit_test_api.components.schema import not from .. import path from .responses import response_200 diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py index ed5c9c4760f..74344df6988 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not -Schema: typing_extensions.TypeAlias = _not._Not +from unit_test_api.components.schema import not +Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py index ed5c9c4760f..74344df6988 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not -Schema: typing_extensions.TypeAlias = _not._Not +from unit_test_api.components.schema import not +Schema: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES b/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES index e00760803ba..8d6988f333a 100644 --- a/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES +++ b/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES @@ -145,317 +145,460 @@ docs/components/schemas/UuidFormat.md docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md docs/servers/RootServer0.md pom.xml -src/main/java/org/openapijsonschematools/client/RootServerInfo.java -src/main/java/org/openapijsonschematools/client/apiclient/ApiClient.java -src/main/java/org/openapijsonschematools/client/components/schemas/ASchemaGivenForPrefixitems.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalItemsAreAllowedByDefault.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesWithSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java -src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java -src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java -src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java -src/main/java/org/openapijsonschematools/client/components/schemas/BooleanTypeMatchesBooleans.java -src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java -src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java -src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java -src/main/java/org/openapijsonschematools/client/components/schemas/ConstNulCharactersInStrings.java -src/main/java/org/openapijsonschematools/client/components/schemas/ContainsKeywordValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/ContainsWithNullInstanceElements.java -src/main/java/org/openapijsonschematools/client/components/schemas/DateFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java -src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java -src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasSingleDependency.java -src/main/java/org/openapijsonschematools/client/components/schemas/DurationFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/EmptyDependents.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java -src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/ExclusivemaximumValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/ExclusiveminimumValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/FloatDivisionInf.java -src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java -src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/IdnEmailFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/IdnHostnameFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java -src/main/java/org/openapijsonschematools/client/components/schemas/IfAndThenWithoutElse.java -src/main/java/org/openapijsonschematools/client/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java -src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java -src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreIfWithoutThenOrElse.java -src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreThenWithoutIf.java -src/main/java/org/openapijsonschematools/client/components/schemas/IntegerTypeMatchesIntegers.java -src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java -src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java -src/main/java/org/openapijsonschematools/client/components/schemas/IriFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/IriReferenceFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/ItemsContains.java -src/main/java/org/openapijsonschematools/client/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java -src/main/java/org/openapijsonschematools/client/components/schemas/ItemsWithNullInstanceElements.java -src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaxcontainsWithoutContainsIsIgnored.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java -src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MincontainsWithoutContainsIsIgnored.java -src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java -src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/MultipleDependentsRequired.java -src/main/java/org/openapijsonschematools/client/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java -src/main/java/org/openapijsonschematools/client/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java -src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java -src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java -src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java -src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java -src/main/java/org/openapijsonschematools/client/components/schemas/NonAsciiPatternWithAdditionalproperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/NonInterferenceAcrossCombinedSchemas.java -src/main/java/org/openapijsonschematools/client/components/schemas/Not.java -src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/NotMultipleTypes.java -src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java -src/main/java/org/openapijsonschematools/client/components/schemas/NullTypeMatchesOnlyTheNullObject.java -src/main/java/org/openapijsonschematools/client/components/schemas/NumberTypeMatchesNumbers.java -src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/ObjectTypeMatchesObjects.java -src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java -src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java -src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java -src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java -src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java -src/main/java/org/openapijsonschematools/client/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java -src/main/java/org/openapijsonschematools/client/components/schemas/PrefixitemsWithNullInstanceElements.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithNullValuedInstanceProperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java -src/main/java/org/openapijsonschematools/client/components/schemas/PropertynamesValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/RegexFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java -src/main/java/org/openapijsonschematools/client/components/schemas/RelativeJsonPointerFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java -src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java -src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java -src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/SingleDependency.java -src/main/java/org/openapijsonschematools/client/components/schemas/SmallMultipleOfLargeInteger.java -src/main/java/org/openapijsonschematools/client/components/schemas/StringTypeMatchesStrings.java -src/main/java/org/openapijsonschematools/client/components/schemas/TimeFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/TypeArrayObjectOrNull.java -src/main/java/org/openapijsonschematools/client/components/schemas/TypeArrayOrObject.java -src/main/java/org/openapijsonschematools/client/components/schemas/TypeAsArrayWithOneItem.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsAsSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsWithItems.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsWithNullInstanceElements.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesSchema.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java -src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java -src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java -src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsWithAnArrayOfItems.java -src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/UuidFormat.java -src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java -src/main/java/org/openapijsonschematools/client/configurations/ApiConfiguration.java -src/main/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlags.java -src/main/java/org/openapijsonschematools/client/configurations/SchemaConfiguration.java -src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeDeserializer.java -src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeDetector.java -src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeSerializer.java -src/main/java/org/openapijsonschematools/client/exceptions/ApiException.java -src/main/java/org/openapijsonschematools/client/exceptions/BaseException.java -src/main/java/org/openapijsonschematools/client/exceptions/InvalidAdditionalPropertyException.java -src/main/java/org/openapijsonschematools/client/exceptions/NotImplementedException.java -src/main/java/org/openapijsonschematools/client/exceptions/UnsetPropertyException.java -src/main/java/org/openapijsonschematools/client/exceptions/ValidationException.java -src/main/java/org/openapijsonschematools/client/header/ContentHeader.java -src/main/java/org/openapijsonschematools/client/header/Header.java -src/main/java/org/openapijsonschematools/client/header/HeaderBase.java -src/main/java/org/openapijsonschematools/client/header/PrefixSeparatorIterator.java -src/main/java/org/openapijsonschematools/client/header/Rfc6570Serializer.java -src/main/java/org/openapijsonschematools/client/header/SchemaHeader.java -src/main/java/org/openapijsonschematools/client/header/StyleSerializer.java -src/main/java/org/openapijsonschematools/client/mediatype/Encoding.java -src/main/java/org/openapijsonschematools/client/mediatype/MediaType.java -src/main/java/org/openapijsonschematools/client/parameter/ContentParameter.java -src/main/java/org/openapijsonschematools/client/parameter/CookieSerializer.java -src/main/java/org/openapijsonschematools/client/parameter/HeadersSerializer.java -src/main/java/org/openapijsonschematools/client/parameter/Parameter.java -src/main/java/org/openapijsonschematools/client/parameter/ParameterBase.java -src/main/java/org/openapijsonschematools/client/parameter/ParameterInType.java -src/main/java/org/openapijsonschematools/client/parameter/ParameterStyle.java -src/main/java/org/openapijsonschematools/client/parameter/PathSerializer.java -src/main/java/org/openapijsonschematools/client/parameter/QuerySerializer.java -src/main/java/org/openapijsonschematools/client/parameter/SchemaParameter.java -src/main/java/org/openapijsonschematools/client/requestbody/GenericRequestBody.java -src/main/java/org/openapijsonschematools/client/requestbody/RequestBodySerializer.java -src/main/java/org/openapijsonschematools/client/requestbody/SerializedRequestBody.java -src/main/java/org/openapijsonschematools/client/response/ApiResponse.java -src/main/java/org/openapijsonschematools/client/response/DeserializedHttpResponse.java -src/main/java/org/openapijsonschematools/client/response/HeadersDeserializer.java -src/main/java/org/openapijsonschematools/client/response/ResponseDeserializer.java -src/main/java/org/openapijsonschematools/client/response/ResponsesDeserializer.java -src/main/java/org/openapijsonschematools/client/restclient/RestClient.java -src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/GenericBuilder.java -src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/SetMaker.java -src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/UnsetAddPropsSetter.java -src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/AllOfValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/AnyOfValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/BigDecimalValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ConstValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ContainsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/CustomIsoparser.java -src/main/java/org/openapijsonschematools/client/schemas/validation/DefaultValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/DependentRequiredValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/DependentSchemasValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/DoubleEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/DoubleValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ElseValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/EnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ExclusiveMaximumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ExclusiveMinimumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/FloatEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/FloatValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/FormatValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenList.java -src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenMap.java -src/main/java/org/openapijsonschematools/client/schemas/validation/IfValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/IntegerEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/IntegerValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaFactory.java -src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java -src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordEntry.java -src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/LengthValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ListSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/LongEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/LongValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MapSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MapUtils.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MaxContainsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MaxItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MaxLengthValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MaxPropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MaximumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MinContainsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MinItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MinLengthValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MinPropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MinimumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/NotValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/NullEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/NullSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/NullValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/NumberSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/OneOfValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PathToSchemasMap.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PatternPropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PatternValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PrefixItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PropertyEntry.java -src/main/java/org/openapijsonschematools/client/schemas/validation/PropertyNamesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/RequiredValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/StringEnumValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/StringSchemaValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/StringValueMethod.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ThenValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/UnevaluatedItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/UnevaluatedPropertiesValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java -src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationData.java -src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java -src/main/java/org/openapijsonschematools/client/servers/RootServer0.java -src/main/java/org/openapijsonschematools/client/servers/Server.java -src/main/java/org/openapijsonschematools/client/servers/ServerProvider.java -src/main/java/org/openapijsonschematools/client/servers/ServerWithVariables.java -src/main/java/org/openapijsonschematools/client/servers/ServerWithoutVariables.java -src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java -src/test/java/org/openapijsonschematools/client/header/ContentHeaderTest.java -src/test/java/org/openapijsonschematools/client/header/SchemaHeaderTest.java -src/test/java/org/openapijsonschematools/client/parameter/CookieSerializerTest.java -src/test/java/org/openapijsonschematools/client/parameter/HeadersSerializerTest.java -src/test/java/org/openapijsonschematools/client/parameter/PathSerializerTest.java -src/test/java/org/openapijsonschematools/client/parameter/QuerySerializerTest.java -src/test/java/org/openapijsonschematools/client/parameter/SchemaNonQueryParameterTest.java -src/test/java/org/openapijsonschematools/client/parameter/SchemaQueryParameterTest.java -src/test/java/org/openapijsonschematools/client/requestbody/RequestBodySerializerTest.java -src/test/java/org/openapijsonschematools/client/response/ResponseDeserializerTest.java -src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/BooleanSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/ListBuilderTest.java -src/test/java/org/openapijsonschematools/client/schemas/ListSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/MapSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/NullSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/NumberSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/RefBooleanSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/CustomIsoparserTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/FormatValidatorTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/ItemsValidatorTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/PropertiesValidatorTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/RequiredValidatorTest.java -src/test/java/org/openapijsonschematools/client/schemas/validation/TypeValidatorTest.java +src/main/java/unit_test_api/RootServerInfo.java +src/main/java/unit_test_api/apiclient/ApiClient.java +src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java +src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java +src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java +src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java +src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java +src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java +src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java +src/main/java/unit_test_api/components/schemas/Allof.java +src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java +src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java +src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java +src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java +src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java +src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java +src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java +src/main/java/unit_test_api/components/schemas/Anyof.java +src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java +src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java +src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java +src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java +src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java +src/main/java/unit_test_api/components/schemas/ByInt.java +src/main/java/unit_test_api/components/schemas/ByNumber.java +src/main/java/unit_test_api/components/schemas/BySmallNumber.java +src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java +src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java +src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java +src/main/java/unit_test_api/components/schemas/DateFormat.java +src/main/java/unit_test_api/components/schemas/DateTimeFormat.java +src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java +src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java +src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java +src/main/java/unit_test_api/components/schemas/DurationFormat.java +src/main/java/unit_test_api/components/schemas/EmailFormat.java +src/main/java/unit_test_api/components/schemas/EmptyDependents.java +src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java +src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java +src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java +src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java +src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java +src/main/java/unit_test_api/components/schemas/EnumsInProperties.java +src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java +src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java +src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java +src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java +src/main/java/unit_test_api/components/schemas/HostnameFormat.java +src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java +src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java +src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java +src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java +src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java +src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java +src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java +src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java +src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java +src/main/java/unit_test_api/components/schemas/Ipv4Format.java +src/main/java/unit_test_api/components/schemas/Ipv6Format.java +src/main/java/unit_test_api/components/schemas/IriFormat.java +src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java +src/main/java/unit_test_api/components/schemas/ItemsContains.java +src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java +src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java +src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java +src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java +src/main/java/unit_test_api/components/schemas/MaximumValidation.java +src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java +src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java +src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java +src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java +src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java +src/main/java/unit_test_api/components/schemas/MinimumValidation.java +src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java +src/main/java/unit_test_api/components/schemas/MinitemsValidation.java +src/main/java/unit_test_api/components/schemas/MinlengthValidation.java +src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java +src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java +src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java +src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java +src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java +src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java +src/main/java/unit_test_api/components/schemas/NestedItems.java +src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java +src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java +src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java +src/main/java/unit_test_api/components/schemas/Not.java +src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java +src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java +src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java +src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java +src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java +src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java +src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java +src/main/java/unit_test_api/components/schemas/Oneof.java +src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java +src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java +src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java +src/main/java/unit_test_api/components/schemas/OneofWithRequired.java +src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java +src/main/java/unit_test_api/components/schemas/PatternValidation.java +src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java +src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java +src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java +src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java +src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java +src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java +src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java +src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java +src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java +src/main/java/unit_test_api/components/schemas/RegexFormat.java +src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java +src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java +src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java +src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +src/main/java/unit_test_api/components/schemas/RequiredValidation.java +src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java +src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java +src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java +src/main/java/unit_test_api/components/schemas/SingleDependency.java +src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java +src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java +src/main/java/unit_test_api/components/schemas/TimeFormat.java +src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java +src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java +src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java +src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java +src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java +src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java +src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java +src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java +src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java +src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java +src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java +src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java +src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java +src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java +src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java +src/main/java/unit_test_api/components/schemas/UriFormat.java +src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java +src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java +src/main/java/unit_test_api/components/schemas/UuidFormat.java +src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java +src/main/java/unit_test_api/configurations/ApiConfiguration.java +src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java +src/main/java/unit_test_api/configurations/SchemaConfiguration.java +src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java +src/main/java/unit_test_api/contenttype/ContentTypeDetector.java +src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java +src/main/java/unit_test_api/exceptions/ApiException.java +src/main/java/unit_test_api/exceptions/BaseException.java +src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java +src/main/java/unit_test_api/exceptions/NotImplementedException.java +src/main/java/unit_test_api/exceptions/UnsetPropertyException.java +src/main/java/unit_test_api/exceptions/ValidationException.java +src/main/java/unit_test_api/header/ContentHeader.java +src/main/java/unit_test_api/header/Header.java +src/main/java/unit_test_api/header/HeaderBase.java +src/main/java/unit_test_api/header/PrefixSeparatorIterator.java +src/main/java/unit_test_api/header/Rfc6570Serializer.java +src/main/java/unit_test_api/header/SchemaHeader.java +src/main/java/unit_test_api/header/StyleSerializer.java +src/main/java/unit_test_api/mediatype/Encoding.java +src/main/java/unit_test_api/mediatype/MediaType.java +src/main/java/unit_test_api/parameter/ContentParameter.java +src/main/java/unit_test_api/parameter/CookieSerializer.java +src/main/java/unit_test_api/parameter/HeadersSerializer.java +src/main/java/unit_test_api/parameter/Parameter.java +src/main/java/unit_test_api/parameter/ParameterBase.java +src/main/java/unit_test_api/parameter/ParameterInType.java +src/main/java/unit_test_api/parameter/ParameterStyle.java +src/main/java/unit_test_api/parameter/PathSerializer.java +src/main/java/unit_test_api/parameter/QuerySerializer.java +src/main/java/unit_test_api/parameter/SchemaParameter.java +src/main/java/unit_test_api/requestbody/GenericRequestBody.java +src/main/java/unit_test_api/requestbody/RequestBodySerializer.java +src/main/java/unit_test_api/requestbody/SerializedRequestBody.java +src/main/java/unit_test_api/response/ApiResponse.java +src/main/java/unit_test_api/response/DeserializedHttpResponse.java +src/main/java/unit_test_api/response/HeadersDeserializer.java +src/main/java/unit_test_api/response/ResponseDeserializer.java +src/main/java/unit_test_api/response/ResponsesDeserializer.java +src/main/java/unit_test_api/restclient/RestClient.java +src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java +src/main/java/unit_test_api/schemas/BooleanJsonSchema.java +src/main/java/unit_test_api/schemas/DateJsonSchema.java +src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java +src/main/java/unit_test_api/schemas/DecimalJsonSchema.java +src/main/java/unit_test_api/schemas/DoubleJsonSchema.java +src/main/java/unit_test_api/schemas/FloatJsonSchema.java +src/main/java/unit_test_api/schemas/GenericBuilder.java +src/main/java/unit_test_api/schemas/Int32JsonSchema.java +src/main/java/unit_test_api/schemas/Int64JsonSchema.java +src/main/java/unit_test_api/schemas/IntJsonSchema.java +src/main/java/unit_test_api/schemas/ListJsonSchema.java +src/main/java/unit_test_api/schemas/MapJsonSchema.java +src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java +src/main/java/unit_test_api/schemas/NullJsonSchema.java +src/main/java/unit_test_api/schemas/NumberJsonSchema.java +src/main/java/unit_test_api/schemas/SetMaker.java +src/main/java/unit_test_api/schemas/StringJsonSchema.java +src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java +src/main/java/unit_test_api/schemas/UuidJsonSchema.java +src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/AllOfValidator.java +src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java +src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java +src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java +src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java +src/main/java/unit_test_api/schemas/validation/ConstValidator.java +src/main/java/unit_test_api/schemas/validation/ContainsValidator.java +src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java +src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java +src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java +src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java +src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java +src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java +src/main/java/unit_test_api/schemas/validation/ElseValidator.java +src/main/java/unit_test_api/schemas/validation/EnumValidator.java +src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java +src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java +src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java +src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java +src/main/java/unit_test_api/schemas/validation/FormatValidator.java +src/main/java/unit_test_api/schemas/validation/FrozenList.java +src/main/java/unit_test_api/schemas/validation/FrozenMap.java +src/main/java/unit_test_api/schemas/validation/IfValidator.java +src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java +src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java +src/main/java/unit_test_api/schemas/validation/ItemsValidator.java +src/main/java/unit_test_api/schemas/validation/JsonSchema.java +src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java +src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java +src/main/java/unit_test_api/schemas/validation/KeywordEntry.java +src/main/java/unit_test_api/schemas/validation/KeywordValidator.java +src/main/java/unit_test_api/schemas/validation/LengthValidator.java +src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java +src/main/java/unit_test_api/schemas/validation/LongValueMethod.java +src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/MapUtils.java +src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java +src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java +src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java +src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/MaximumValidator.java +src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java +src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java +src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java +src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/MinimumValidator.java +src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java +src/main/java/unit_test_api/schemas/validation/NotValidator.java +src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java +src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/NullValueMethod.java +src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/OneOfValidator.java +src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java +src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/PatternValidator.java +src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java +src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/PropertyEntry.java +src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java +src/main/java/unit_test_api/schemas/validation/RequiredValidator.java +src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java +src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java +src/main/java/unit_test_api/schemas/validation/StringValueMethod.java +src/main/java/unit_test_api/schemas/validation/ThenValidator.java +src/main/java/unit_test_api/schemas/validation/TypeValidator.java +src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java +src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java +src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java +src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java +src/main/java/unit_test_api/schemas/validation/ValidationData.java +src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java +src/main/java/unit_test_api/servers/RootServer0.java +src/main/java/unit_test_api/servers/Server.java +src/main/java/unit_test_api/servers/ServerProvider.java +src/main/java/unit_test_api/servers/ServerWithVariables.java +src/main/java/unit_test_api/servers/ServerWithoutVariables.java +src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java +src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java +src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java +src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java +src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java +src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java +src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java +src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java +src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java +src/test/java/unit_test_api/components/schemas/AllofTest.java +src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java +src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java +src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java +src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java +src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java +src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java +src/test/java/unit_test_api/components/schemas/AnyofTest.java +src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java +src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java +src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java +src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java +src/test/java/unit_test_api/components/schemas/ByIntTest.java +src/test/java/unit_test_api/components/schemas/ByNumberTest.java +src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java +src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java +src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java +src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java +src/test/java/unit_test_api/components/schemas/DateFormatTest.java +src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java +src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java +src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java +src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java +src/test/java/unit_test_api/components/schemas/DurationFormatTest.java +src/test/java/unit_test_api/components/schemas/EmailFormatTest.java +src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java +src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java +src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java +src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java +src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java +src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java +src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java +src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java +src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java +src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java +src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java +src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java +src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java +src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java +src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java +src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java +src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java +src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java +src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java +src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java +src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java +src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java +src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java +src/test/java/unit_test_api/components/schemas/IriFormatTest.java +src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java +src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java +src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java +src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java +src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java +src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java +src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java +src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java +src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java +src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java +src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java +src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java +src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java +src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java +src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java +src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java +src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java +src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java +src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java +src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java +src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java +src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java +src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java +src/test/java/unit_test_api/components/schemas/NestedItemsTest.java +src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java +src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java +src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java +src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java +src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java +src/test/java/unit_test_api/components/schemas/NotTest.java +src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java +src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java +src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java +src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java +src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java +src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java +src/test/java/unit_test_api/components/schemas/OneofTest.java +src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java +src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java +src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java +src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java +src/test/java/unit_test_api/components/schemas/PatternValidationTest.java +src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java +src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java +src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java +src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java +src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java +src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java +src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java +src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java +src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java +src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java +src/test/java/unit_test_api/components/schemas/RegexFormatTest.java +src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java +src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java +src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java +src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java +src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java +src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java +src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java +src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java +src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java +src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java +src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java +src/test/java/unit_test_api/components/schemas/TimeFormatTest.java +src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java +src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java +src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java +src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java +src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java +src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java +src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java +src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java +src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java +src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java +src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java +src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java +src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java +src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java +src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java +src/test/java/unit_test_api/components/schemas/UriFormatTest.java +src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java +src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java +src/test/java/unit_test_api/components/schemas/UuidFormatTest.java +src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java +src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java +src/test/java/unit_test_api/header/ContentHeaderTest.java +src/test/java/unit_test_api/header/SchemaHeaderTest.java +src/test/java/unit_test_api/parameter/CookieSerializerTest.java +src/test/java/unit_test_api/parameter/HeadersSerializerTest.java +src/test/java/unit_test_api/parameter/PathSerializerTest.java +src/test/java/unit_test_api/parameter/QuerySerializerTest.java +src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java +src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java +src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java +src/test/java/unit_test_api/response/ResponseDeserializerTest.java +src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java +src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java +src/test/java/unit_test_api/schemas/BooleanSchemaTest.java +src/test/java/unit_test_api/schemas/ListBuilderTest.java +src/test/java/unit_test_api/schemas/ListSchemaTest.java +src/test/java/unit_test_api/schemas/MapSchemaTest.java +src/test/java/unit_test_api/schemas/NullSchemaTest.java +src/test/java/unit_test_api/schemas/NumberSchemaTest.java +src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java +src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java +src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java +src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java +src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java +src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java +src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java +src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java +src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java +src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java diff --git a/samples/client/3_1_0_unit_test/java/README.md b/samples/client/3_1_0_unit_test/java/README.md index d72c17316bd..0845d55bcb8 100644 --- a/samples/client/3_1_0_unit_test/java/README.md +++ b/samples/client/3_1_0_unit_test/java/README.md @@ -1,4 +1,4 @@ -# openapi-java-client +# sample spec for testing openapi functionality, built from json schema tests for draft2020-12 This Java package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: @@ -35,7 +35,7 @@ Add this dependency to your project's POM: ```xml org.openapijsonschematools - openapi-java-client + 0.0.1 compile @@ -51,7 +51,7 @@ mvn clean package Then manually install the following JARs: -- `target/openapi-java-client-0.0.1.jar` +- `target/-0.0.1.jar` - `target/lib/*.jar` @@ -142,7 +142,7 @@ is stored as a string. ## Getting Started Please follow the [installation procedure](#installation) and then use the JsonSchema classes in -org.openapijsonschematools.client.components.schemas to validate input payloads and instances of validated Map and List +unit_test_api.components.schemas to validate input payloads and instances of validated Map and List output classes. Json schemas allow multiple types for one schema, so a schema's validate method can have allowed input and output types. diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md index 4e7390d7215..4ef6a85c8d6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md @@ -1,5 +1,5 @@ # ASchemaGivenForPrefixitems -org.openapijsonschematools.client.components.schemas.ASchemaGivenForPrefixitems.java +unit_test_api.components.schemas.ASchemaGivenForPrefixitems.java public class ASchemaGivenForPrefixitems
          A class that contains necessary nested @@ -206,7 +206,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -241,7 +241,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md index 05046febeb6..0c950234a79 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md @@ -1,5 +1,5 @@ # AdditionalItemsAreAllowedByDefault -org.openapijsonschematools.client.components.schemas.AdditionalItemsAreAllowedByDefault.java +unit_test_api.components.schemas.AdditionalItemsAreAllowedByDefault.java public class AdditionalItemsAreAllowedByDefault
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md index b7e5ca27e35..43742e47485 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -org.openapijsonschematools.client.components.schemas.AdditionalpropertiesAreAllowedByDefault.java +unit_test_api.components.schemas.AdditionalpropertiesAreAllowedByDefault.java public class AdditionalpropertiesAreAllowedByDefault
          A class that contains necessary nested @@ -363,7 +363,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -488,7 +488,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md index 4b4177aa3aa..9b110f82e71 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -org.openapijsonschematools.client.components.schemas.AdditionalpropertiesCanExistByItself.java +unit_test_api.components.schemas.AdditionalpropertiesCanExistByItself.java public class AdditionalpropertiesCanExistByItself
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesCanExistByItself; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.AdditionalpropertiesCanExistByItself; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md index d76f03d1168..da1c4d303c6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesDoesNotLookInApplicators -org.openapijsonschematools.client.components.schemas.AdditionalpropertiesDoesNotLookInApplicators.java +unit_test_api.components.schemas.AdditionalpropertiesDoesNotLookInApplicators.java public class AdditionalpropertiesDoesNotLookInApplicators
          A class that contains necessary nested @@ -535,7 +535,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -570,7 +570,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md index 6695fe35a49..f0cdca7009a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithNullValuedInstanceProperties -org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties.java +unit_test_api.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties.java public class AdditionalpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md index 8cc723bb7e6..815ef959e19 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithSchema -org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithSchema.java +unit_test_api.components.schemas.AdditionalpropertiesWithSchema.java public class AdditionalpropertiesWithSchema
          A class that contains necessary nested @@ -69,13 +69,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithSchema; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.AdditionalpropertiesWithSchema; import java.util.Arrays; import java.util.List; @@ -278,7 +278,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -403,7 +403,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -438,7 +438,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md index 079e4fe18ca..753e839ffd1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md @@ -1,5 +1,5 @@ # Allof -org.openapijsonschematools.client.components.schemas.Allof.java +unit_test_api.components.schemas.Allof.java public class Allof
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md index 8aa4f4859ce..649bd2d6673 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -org.openapijsonschematools.client.components.schemas.AllofCombinedWithAnyofOneof.java +unit_test_api.components.schemas.AllofCombinedWithAnyofOneof.java public class AllofCombinedWithAnyofOneof
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md index 6e506fe215a..6e87c68ba67 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -org.openapijsonschematools.client.components.schemas.AllofSimpleTypes.java +unit_test_api.components.schemas.AllofSimpleTypes.java public class AllofSimpleTypes
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index 81125243a09..a75c46117e0 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -org.openapijsonschematools.client.components.schemas.AllofWithBaseSchema.java +unit_test_api.components.schemas.AllofWithBaseSchema.java public class AllofWithBaseSchema
          A class that contains necessary nested @@ -288,7 +288,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -525,7 +525,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -762,7 +762,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md index 353eef7b1a4..60227abeae2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -org.openapijsonschematools.client.components.schemas.AllofWithOneEmptySchema.java +unit_test_api.components.schemas.AllofWithOneEmptySchema.java public class AllofWithOneEmptySchema
          A class that contains necessary nested @@ -294,7 +294,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md index f4341590119..d76896938ca 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -org.openapijsonschematools.client.components.schemas.AllofWithTheFirstEmptySchema.java +unit_test_api.components.schemas.AllofWithTheFirstEmptySchema.java public class AllofWithTheFirstEmptySchema
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md index 6d626d52eb9..09febfa0056 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -org.openapijsonschematools.client.components.schemas.AllofWithTheLastEmptySchema.java +unit_test_api.components.schemas.AllofWithTheLastEmptySchema.java public class AllofWithTheLastEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md index 4875f70770c..8513231195c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -org.openapijsonschematools.client.components.schemas.AllofWithTwoEmptySchemas.java +unit_test_api.components.schemas.AllofWithTwoEmptySchemas.java public class AllofWithTwoEmptySchemas
          A class that contains necessary nested @@ -302,7 +302,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -427,7 +427,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md index 316b94bb0d9..bd92dc52feb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md @@ -1,5 +1,5 @@ # Anyof -org.openapijsonschematools.client.components.schemas.Anyof.java +unit_test_api.components.schemas.Anyof.java public class Anyof
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index 9d0ee6763c9..c2bb5ab263a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -org.openapijsonschematools.client.components.schemas.AnyofComplexTypes.java +unit_test_api.components.schemas.AnyofComplexTypes.java public class AnyofComplexTypes
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md index 90d702e5191..cdb743b16b3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -org.openapijsonschematools.client.components.schemas.AnyofWithBaseSchema.java +unit_test_api.components.schemas.AnyofWithBaseSchema.java public class AnyofWithBaseSchema
          A class that contains necessary nested @@ -62,13 +62,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.AnyofWithBaseSchema; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.AnyofWithBaseSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md index 863a2b98c1b..f54f814aca9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -org.openapijsonschematools.client.components.schemas.AnyofWithOneEmptySchema.java +unit_test_api.components.schemas.AnyofWithOneEmptySchema.java public class AnyofWithOneEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index a81c51803a8..304cdf0b483 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -org.openapijsonschematools.client.components.schemas.ArrayTypeMatchesArrays.java +unit_test_api.components.schemas.ArrayTypeMatchesArrays.java public class ArrayTypeMatchesArrays
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends ListJsonSchema.ListJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.ListJsonSchema.ListJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.ListJsonSchema.ListJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md index 96a41c9abfc..792ac41e5ab 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -org.openapijsonschematools.client.components.schemas.BooleanTypeMatchesBooleans.java +unit_test_api.components.schemas.BooleanTypeMatchesBooleans.java public class BooleanTypeMatchesBooleans
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md index a403f2e86af..641497f5f07 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md @@ -1,5 +1,5 @@ # ByInt -org.openapijsonschematools.client.components.schemas.ByInt.java +unit_test_api.components.schemas.ByInt.java public class ByInt
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md index 18757b1d71f..a59346ab71a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md @@ -1,5 +1,5 @@ # ByNumber -org.openapijsonschematools.client.components.schemas.ByNumber.java +unit_test_api.components.schemas.ByNumber.java public class ByNumber
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md index db570d6827a..1662e93d9d3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md @@ -1,5 +1,5 @@ # BySmallNumber -org.openapijsonschematools.client.components.schemas.BySmallNumber.java +unit_test_api.components.schemas.BySmallNumber.java public class BySmallNumber
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md index e406aa2b1d1..dedb518e1f3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md @@ -1,5 +1,5 @@ # ConstNulCharactersInStrings -org.openapijsonschematools.client.components.schemas.ConstNulCharactersInStrings.java +unit_test_api.components.schemas.ConstNulCharactersInStrings.java public class ConstNulCharactersInStrings
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md index 939c4213f16..a7053ba88b8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md @@ -1,5 +1,5 @@ # ContainsKeywordValidation -org.openapijsonschematools.client.components.schemas.ContainsKeywordValidation.java +unit_test_api.components.schemas.ContainsKeywordValidation.java public class ContainsKeywordValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md index ff7b6e33b02..adb32bfe538 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # ContainsWithNullInstanceElements -org.openapijsonschematools.client.components.schemas.ContainsWithNullInstanceElements.java +unit_test_api.components.schemas.ContainsWithNullInstanceElements.java public class ContainsWithNullInstanceElements
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md index 8e7001d5b91..7ad1c8521f5 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md @@ -1,5 +1,5 @@ # DateFormat -org.openapijsonschematools.client.components.schemas.DateFormat.java +unit_test_api.components.schemas.DateFormat.java public class DateFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md index dc179875fd1..dedfc63e009 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md @@ -1,5 +1,5 @@ # DateTimeFormat -org.openapijsonschematools.client.components.schemas.DateTimeFormat.java +unit_test_api.components.schemas.DateTimeFormat.java public class DateTimeFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md index d1ec58ee656..e26993eaecb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md @@ -1,5 +1,5 @@ # DependentSchemasDependenciesWithEscapedCharacters -org.openapijsonschematools.client.components.schemas.DependentSchemasDependenciesWithEscapedCharacters.java +unit_test_api.components.schemas.DependentSchemasDependenciesWithEscapedCharacters.java public class DependentSchemasDependenciesWithEscapedCharacters
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md index b2cb24f5ce9..0566b2cf794 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md @@ -1,5 +1,5 @@ # DependentSchemasDependentSubschemaIncompatibleWithRoot -org.openapijsonschematools.client.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot.java +unit_test_api.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot.java public class DependentSchemasDependentSubschemaIncompatibleWithRoot
          A class that contains necessary nested @@ -367,7 +367,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -404,13 +404,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot; import java.util.Arrays; import java.util.List; @@ -599,7 +599,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -724,7 +724,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md index 89850d5e1b3..f8819337c12 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md @@ -1,5 +1,5 @@ # DependentSchemasSingleDependency -org.openapijsonschematools.client.components.schemas.DependentSchemasSingleDependency.java +unit_test_api.components.schemas.DependentSchemasSingleDependency.java public class DependentSchemasSingleDependency
          A class that contains necessary nested @@ -408,7 +408,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -443,7 +443,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md index 9c74f82ceda..edb5b87329c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md @@ -1,5 +1,5 @@ # DurationFormat -org.openapijsonschematools.client.components.schemas.DurationFormat.java +unit_test_api.components.schemas.DurationFormat.java public class DurationFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md index b3448fb331a..f8854e93d2b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md @@ -1,5 +1,5 @@ # EmailFormat -org.openapijsonschematools.client.components.schemas.EmailFormat.java +unit_test_api.components.schemas.EmailFormat.java public class EmailFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md index 61fd3611c08..fdc9605acfa 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md @@ -1,5 +1,5 @@ # EmptyDependents -org.openapijsonschematools.client.components.schemas.EmptyDependents.java +unit_test_api.components.schemas.EmptyDependents.java public class EmptyDependents
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md index 40344018d18..12cfbc2ae4e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -org.openapijsonschematools.client.components.schemas.EnumWith0DoesNotMatchFalse.java +unit_test_api.components.schemas.EnumWith0DoesNotMatchFalse.java public class EnumWith0DoesNotMatchFalse
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumWith0DoesNotMatchFalse; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumWith0DoesNotMatchFalse; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md index c8b731041b0..13e67fc2bd3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -org.openapijsonschematools.client.components.schemas.EnumWith1DoesNotMatchTrue.java +unit_test_api.components.schemas.EnumWith1DoesNotMatchTrue.java public class EnumWith1DoesNotMatchTrue
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumWith1DoesNotMatchTrue; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumWith1DoesNotMatchTrue; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md index 633a79af9af..938983886ad 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -org.openapijsonschematools.client.components.schemas.EnumWithEscapedCharacters.java +unit_test_api.components.schemas.EnumWithEscapedCharacters.java public class EnumWithEscapedCharacters
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumWithEscapedCharacters; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumWithEscapedCharacters; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index dfbab8589b3..1caa8ee0250 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -org.openapijsonschematools.client.components.schemas.EnumWithFalseDoesNotMatch0.java +unit_test_api.components.schemas.EnumWithFalseDoesNotMatch0.java public class EnumWithFalseDoesNotMatch0
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumWithFalseDoesNotMatch0; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumWithFalseDoesNotMatch0; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index d5060d82ffb..c1d6de1a711 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -org.openapijsonschematools.client.components.schemas.EnumWithTrueDoesNotMatch1.java +unit_test_api.components.schemas.EnumWithTrueDoesNotMatch1.java public class EnumWithTrueDoesNotMatch1
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumWithTrueDoesNotMatch1; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumWithTrueDoesNotMatch1; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md index d8817265151..6b2495212af 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -1,5 +1,5 @@ # EnumsInProperties -org.openapijsonschematools.client.components.schemas.EnumsInProperties.java +unit_test_api.components.schemas.EnumsInProperties.java public class EnumsInProperties
          A class that contains necessary nested @@ -59,13 +59,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumsInProperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; @@ -191,13 +191,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumsInProperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; @@ -270,13 +270,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.EnumsInProperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md index ca6f30db8cb..fba825f7cff 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md @@ -1,5 +1,5 @@ # ExclusivemaximumValidation -org.openapijsonschematools.client.components.schemas.ExclusivemaximumValidation.java +unit_test_api.components.schemas.ExclusivemaximumValidation.java public class ExclusivemaximumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md index e9c2e63c0af..58f2f9a69ca 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md @@ -1,5 +1,5 @@ # ExclusiveminimumValidation -org.openapijsonschematools.client.components.schemas.ExclusiveminimumValidation.java +unit_test_api.components.schemas.ExclusiveminimumValidation.java public class ExclusiveminimumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md index 3c961a255fc..0370dfb1b14 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md @@ -1,5 +1,5 @@ # FloatDivisionInf -org.openapijsonschematools.client.components.schemas.FloatDivisionInf.java +unit_test_api.components.schemas.FloatDivisionInf.java public class FloatDivisionInf
          A class that contains necessary nested @@ -46,13 +46,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.FloatDivisionInf; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.FloatDivisionInf; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md index a0b819b97ca..5a09febeb6a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md @@ -1,5 +1,5 @@ # ForbiddenProperty -org.openapijsonschematools.client.components.schemas.ForbiddenProperty.java +unit_test_api.components.schemas.ForbiddenProperty.java public class ForbiddenProperty
          A class that contains necessary nested @@ -500,7 +500,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md index 085ff0c08a1..ec578b68951 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md @@ -1,5 +1,5 @@ # HostnameFormat -org.openapijsonschematools.client.components.schemas.HostnameFormat.java +unit_test_api.components.schemas.HostnameFormat.java public class HostnameFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md index 0b756db3627..efd774890dd 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md @@ -1,5 +1,5 @@ # IdnEmailFormat -org.openapijsonschematools.client.components.schemas.IdnEmailFormat.java +unit_test_api.components.schemas.IdnEmailFormat.java public class IdnEmailFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md index 046d158dc78..bc9f5486850 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md @@ -1,5 +1,5 @@ # IdnHostnameFormat -org.openapijsonschematools.client.components.schemas.IdnHostnameFormat.java +unit_test_api.components.schemas.IdnHostnameFormat.java public class IdnHostnameFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md index 23bad84b6e8..572667636c8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md @@ -1,5 +1,5 @@ # IfAndElseWithoutThen -org.openapijsonschematools.client.components.schemas.IfAndElseWithoutThen.java +unit_test_api.components.schemas.IfAndElseWithoutThen.java public class IfAndElseWithoutThen
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md index 30168d5f831..0b9d1b5dd5c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md @@ -1,5 +1,5 @@ # IfAndThenWithoutElse -org.openapijsonschematools.client.components.schemas.IfAndThenWithoutElse.java +unit_test_api.components.schemas.IfAndThenWithoutElse.java public class IfAndThenWithoutElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md index cf769cf4aa2..13f8945cce9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md @@ -1,5 +1,5 @@ # IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence -org.openapijsonschematools.client.components.schemas.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java +unit_test_api.components.schemas.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md index 242395210ce..00704723e95 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md @@ -1,5 +1,5 @@ # IgnoreElseWithoutIf -org.openapijsonschematools.client.components.schemas.IgnoreElseWithoutIf.java +unit_test_api.components.schemas.IgnoreElseWithoutIf.java public class IgnoreElseWithoutIf
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md index 7a3b61ef811..ea600d96557 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md @@ -1,5 +1,5 @@ # IgnoreIfWithoutThenOrElse -org.openapijsonschematools.client.components.schemas.IgnoreIfWithoutThenOrElse.java +unit_test_api.components.schemas.IgnoreIfWithoutThenOrElse.java public class IgnoreIfWithoutThenOrElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md index 22c93058573..9179e78a9cf 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md @@ -1,5 +1,5 @@ # IgnoreThenWithoutIf -org.openapijsonschematools.client.components.schemas.IgnoreThenWithoutIf.java +unit_test_api.components.schemas.IgnoreThenWithoutIf.java public class IgnoreThenWithoutIf
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md index 1e84368f22a..99ca2b2708c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -org.openapijsonschematools.client.components.schemas.IntegerTypeMatchesIntegers.java +unit_test_api.components.schemas.IntegerTypeMatchesIntegers.java public class IntegerTypeMatchesIntegers
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md index fc4821b8b70..a97f33672a6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md @@ -1,5 +1,5 @@ # Ipv4Format -org.openapijsonschematools.client.components.schemas.Ipv4Format.java +unit_test_api.components.schemas.Ipv4Format.java public class Ipv4Format
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md index b7e6fa306b8..0759a0f3407 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md @@ -1,5 +1,5 @@ # Ipv6Format -org.openapijsonschematools.client.components.schemas.Ipv6Format.java +unit_test_api.components.schemas.Ipv6Format.java public class Ipv6Format
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md index 2a8f1ba9564..fe0477d22e0 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md @@ -1,5 +1,5 @@ # IriFormat -org.openapijsonschematools.client.components.schemas.IriFormat.java +unit_test_api.components.schemas.IriFormat.java public class IriFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md index d7d17b32f51..d8ec145cc95 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md @@ -1,5 +1,5 @@ # IriReferenceFormat -org.openapijsonschematools.client.components.schemas.IriReferenceFormat.java +unit_test_api.components.schemas.IriReferenceFormat.java public class IriReferenceFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md index ce3c0ad26f3..e4838689e31 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md @@ -1,5 +1,5 @@ # ItemsContains -org.openapijsonschematools.client.components.schemas.ItemsContains.java +unit_test_api.components.schemas.ItemsContains.java public class ItemsContains
          A class that contains necessary nested @@ -66,13 +66,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.ItemsContains; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.ItemsContains; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md index 70b39df59f3..7e3a8d63046 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md @@ -1,5 +1,5 @@ # ItemsDoesNotLookInApplicatorsValidCase -org.openapijsonschematools.client.components.schemas.ItemsDoesNotLookInApplicatorsValidCase.java +unit_test_api.components.schemas.ItemsDoesNotLookInApplicatorsValidCase.java public class ItemsDoesNotLookInApplicatorsValidCase
          A class that contains necessary nested @@ -58,13 +58,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.ItemsDoesNotLookInApplicatorsValidCase; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.ItemsDoesNotLookInApplicatorsValidCase; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md index e0801cd8a5a..4a418dc3a94 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # ItemsWithNullInstanceElements -org.openapijsonschematools.client.components.schemas.ItemsWithNullInstanceElements.java +unit_test_api.components.schemas.ItemsWithNullInstanceElements.java public class ItemsWithNullInstanceElements
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.ItemsWithNullInstanceElements; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.ItemsWithNullInstanceElements; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md index 65c23c09e6c..cb265c809d9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md @@ -1,5 +1,5 @@ # JsonPointerFormat -org.openapijsonschematools.client.components.schemas.JsonPointerFormat.java +unit_test_api.components.schemas.JsonPointerFormat.java public class JsonPointerFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md index 34f9ac593c7..3a2f3946d2c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md @@ -1,5 +1,5 @@ # MaxcontainsWithoutContainsIsIgnored -org.openapijsonschematools.client.components.schemas.MaxcontainsWithoutContainsIsIgnored.java +unit_test_api.components.schemas.MaxcontainsWithoutContainsIsIgnored.java public class MaxcontainsWithoutContainsIsIgnored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md index ea90b82fd0b..55ccc37adb1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md @@ -1,5 +1,5 @@ # MaximumValidation -org.openapijsonschematools.client.components.schemas.MaximumValidation.java +unit_test_api.components.schemas.MaximumValidation.java public class MaximumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md index 319d16fd33e..0d3c9e0ea62 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -org.openapijsonschematools.client.components.schemas.MaximumValidationWithUnsignedInteger.java +unit_test_api.components.schemas.MaximumValidationWithUnsignedInteger.java public class MaximumValidationWithUnsignedInteger
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md index 1fd4640fa8a..19fd08cb032 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -org.openapijsonschematools.client.components.schemas.MaxitemsValidation.java +unit_test_api.components.schemas.MaxitemsValidation.java public class MaxitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md index e828355331e..c9a3645e921 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -org.openapijsonschematools.client.components.schemas.MaxlengthValidation.java +unit_test_api.components.schemas.MaxlengthValidation.java public class MaxlengthValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md index 0f8c895fdcd..f75e42f9c2e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -org.openapijsonschematools.client.components.schemas.Maxproperties0MeansTheObjectIsEmpty.java +unit_test_api.components.schemas.Maxproperties0MeansTheObjectIsEmpty.java public class Maxproperties0MeansTheObjectIsEmpty
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md index 0ee228096d5..2b7d6be86e9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -org.openapijsonschematools.client.components.schemas.MaxpropertiesValidation.java +unit_test_api.components.schemas.MaxpropertiesValidation.java public class MaxpropertiesValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md index 4bfad67b17b..0fa75c955e3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md @@ -1,5 +1,5 @@ # MincontainsWithoutContainsIsIgnored -org.openapijsonschematools.client.components.schemas.MincontainsWithoutContainsIsIgnored.java +unit_test_api.components.schemas.MincontainsWithoutContainsIsIgnored.java public class MincontainsWithoutContainsIsIgnored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md index 26df31b73bd..8042a55985c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md @@ -1,5 +1,5 @@ # MinimumValidation -org.openapijsonschematools.client.components.schemas.MinimumValidation.java +unit_test_api.components.schemas.MinimumValidation.java public class MinimumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md index 8cf8b08f2a7..1cabf4e36e9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -org.openapijsonschematools.client.components.schemas.MinimumValidationWithSignedInteger.java +unit_test_api.components.schemas.MinimumValidationWithSignedInteger.java public class MinimumValidationWithSignedInteger
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md index 0f8a46474b2..c991619e956 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md @@ -1,5 +1,5 @@ # MinitemsValidation -org.openapijsonschematools.client.components.schemas.MinitemsValidation.java +unit_test_api.components.schemas.MinitemsValidation.java public class MinitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md index bf689a4ffa4..664fb21bd9e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md @@ -1,5 +1,5 @@ # MinlengthValidation -org.openapijsonschematools.client.components.schemas.MinlengthValidation.java +unit_test_api.components.schemas.MinlengthValidation.java public class MinlengthValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md index 43f7370e423..00ddf738001 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -org.openapijsonschematools.client.components.schemas.MinpropertiesValidation.java +unit_test_api.components.schemas.MinpropertiesValidation.java public class MinpropertiesValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md index 11eb2987149..07e0e79b621 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md @@ -1,5 +1,5 @@ # MultipleDependentsRequired -org.openapijsonschematools.client.components.schemas.MultipleDependentsRequired.java +unit_test_api.components.schemas.MultipleDependentsRequired.java public class MultipleDependentsRequired
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md index 618e43d1420..de3eb9d4ce3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md @@ -1,5 +1,5 @@ # MultipleSimultaneousPatternpropertiesAreValidated -org.openapijsonschematools.client.components.schemas.MultipleSimultaneousPatternpropertiesAreValidated.java +unit_test_api.components.schemas.MultipleSimultaneousPatternpropertiesAreValidated.java public class MultipleSimultaneousPatternpropertiesAreValidated
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md index 06690dbdf66..f1437b08dad 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md @@ -1,5 +1,5 @@ # MultipleTypesCanBeSpecifiedInAnArray -org.openapijsonschematools.client.components.schemas.MultipleTypesCanBeSpecifiedInAnArray.java +unit_test_api.components.schemas.MultipleTypesCanBeSpecifiedInAnArray.java public class MultipleTypesCanBeSpecifiedInAnArray
          A class that contains necessary nested @@ -65,13 +65,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.MultipleTypesCanBeSpecifiedInAnArray; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.MultipleTypesCanBeSpecifiedInAnArray; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md index ebf65ca84c7..4326297da84 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -org.openapijsonschematools.client.components.schemas.NestedAllofToCheckValidationSemantics.java +unit_test_api.components.schemas.NestedAllofToCheckValidationSemantics.java public class NestedAllofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md index dc2de71feb0..3fc7ee694c9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -org.openapijsonschematools.client.components.schemas.NestedAnyofToCheckValidationSemantics.java +unit_test_api.components.schemas.NestedAnyofToCheckValidationSemantics.java public class NestedAnyofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md index ad403371444..8c88cf74646 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md @@ -1,5 +1,5 @@ # NestedItems -org.openapijsonschematools.client.components.schemas.NestedItems.java +unit_test_api.components.schemas.NestedItems.java public class NestedItems
          A class that contains necessary nested @@ -68,13 +68,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NestedItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -175,13 +175,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NestedItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -280,13 +280,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NestedItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -383,13 +383,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NestedItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -484,7 +484,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md index ee3e1712834..9344a3cd40e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -org.openapijsonschematools.client.components.schemas.NestedOneofToCheckValidationSemantics.java +unit_test_api.components.schemas.NestedOneofToCheckValidationSemantics.java public class NestedOneofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md index 6a63f2af1d2..f988f39da3f 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md @@ -1,5 +1,5 @@ # NonAsciiPatternWithAdditionalproperties -org.openapijsonschematools.client.components.schemas.NonAsciiPatternWithAdditionalproperties.java +unit_test_api.components.schemas.NonAsciiPatternWithAdditionalproperties.java public class NonAsciiPatternWithAdditionalproperties
          A class that contains necessary nested @@ -66,13 +66,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NonAsciiPatternWithAdditionalproperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NonAsciiPatternWithAdditionalproperties; import java.util.Arrays; import java.util.List; @@ -251,7 +251,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -376,7 +376,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md index 980d373f1f4..caa0f4a586f 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md @@ -1,5 +1,5 @@ # NonInterferenceAcrossCombinedSchemas -org.openapijsonschematools.client.components.schemas.NonInterferenceAcrossCombinedSchemas.java +unit_test_api.components.schemas.NonInterferenceAcrossCombinedSchemas.java public class NonInterferenceAcrossCombinedSchemas
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md index 8358d5d2f6e..3f5593a4988 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md @@ -1,5 +1,5 @@ # Not -org.openapijsonschematools.client.components.schemas.Not.java +unit_test_api.components.schemas.Not.java public class Not
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index 6663a4c2e36..4f329c5db3d 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -org.openapijsonschematools.client.components.schemas.NotMoreComplexSchema.java +unit_test_api.components.schemas.NotMoreComplexSchema.java public class NotMoreComplexSchema
          A class that contains necessary nested @@ -208,13 +208,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NotMoreComplexSchema; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NotMoreComplexSchema; import java.util.Arrays; import java.util.List; @@ -316,7 +316,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md index bc0434cc3ef..babce8c862e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md @@ -1,5 +1,5 @@ # NotMultipleTypes -org.openapijsonschematools.client.components.schemas.NotMultipleTypes.java +unit_test_api.components.schemas.NotMultipleTypes.java public class NotMultipleTypes
          A class that contains necessary nested @@ -220,13 +220,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NotMultipleTypes; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NotMultipleTypes; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md index ec4d57963c7..755c5137d35 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -org.openapijsonschematools.client.components.schemas.NulCharactersInStrings.java +unit_test_api.components.schemas.NulCharactersInStrings.java public class NulCharactersInStrings
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.NulCharactersInStrings; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.NulCharactersInStrings; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md index a7bf060e212..3d82aa77257 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -org.openapijsonschematools.client.components.schemas.NullTypeMatchesOnlyTheNullObject.java +unit_test_api.components.schemas.NullTypeMatchesOnlyTheNullObject.java public class NullTypeMatchesOnlyTheNullObject
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md index 76a1b65da1a..67611072686 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -org.openapijsonschematools.client.components.schemas.NumberTypeMatchesNumbers.java +unit_test_api.components.schemas.NumberTypeMatchesNumbers.java public class NumberTypeMatchesNumbers
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md index 2427b5219d5..ac1394472b7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -org.openapijsonschematools.client.components.schemas.ObjectPropertiesValidation.java +unit_test_api.components.schemas.ObjectPropertiesValidation.java public class ObjectPropertiesValidation
          A class that contains necessary nested @@ -250,7 +250,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -285,7 +285,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md index f169645577b..b1ad71a13d3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -org.openapijsonschematools.client.components.schemas.ObjectTypeMatchesObjects.java +unit_test_api.components.schemas.ObjectTypeMatchesObjects.java public class ObjectTypeMatchesObjects
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends MapJsonSchema.MapJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.MapJsonSchema.MapJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.MapJsonSchema.MapJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md index f4c0b682e27..b7657b3f123 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md @@ -1,5 +1,5 @@ # Oneof -org.openapijsonschematools.client.components.schemas.Oneof.java +unit_test_api.components.schemas.Oneof.java public class Oneof
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md index 182a53d6956..02c0f0b08a4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -1,5 +1,5 @@ # OneofComplexTypes -org.openapijsonschematools.client.components.schemas.OneofComplexTypes.java +unit_test_api.components.schemas.OneofComplexTypes.java public class OneofComplexTypes
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md index 48247523768..e3d01cf99c6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -org.openapijsonschematools.client.components.schemas.OneofWithBaseSchema.java +unit_test_api.components.schemas.OneofWithBaseSchema.java public class OneofWithBaseSchema
          A class that contains necessary nested @@ -62,13 +62,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.OneofWithBaseSchema; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.OneofWithBaseSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md index a3b4f2933cb..1cee29e9a90 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -org.openapijsonschematools.client.components.schemas.OneofWithEmptySchema.java +unit_test_api.components.schemas.OneofWithEmptySchema.java public class OneofWithEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md index b5daaad8023..800c6eacd2e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -1,5 +1,5 @@ # OneofWithRequired -org.openapijsonschematools.client.components.schemas.OneofWithRequired.java +unit_test_api.components.schemas.OneofWithRequired.java public class OneofWithRequired
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md index 15a76dd0a5d..5995571dece 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -org.openapijsonschematools.client.components.schemas.PatternIsNotAnchored.java +unit_test_api.components.schemas.PatternIsNotAnchored.java public class PatternIsNotAnchored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md index ddec1547b2a..e47d6ad566e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md @@ -1,5 +1,5 @@ # PatternValidation -org.openapijsonschematools.client.components.schemas.PatternValidation.java +unit_test_api.components.schemas.PatternValidation.java public class PatternValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md index 837555c8491..f33b038e4a3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md @@ -1,5 +1,5 @@ # PatternpropertiesValidatesPropertiesMatchingARegex -org.openapijsonschematools.client.components.schemas.PatternpropertiesValidatesPropertiesMatchingARegex.java +unit_test_api.components.schemas.PatternpropertiesValidatesPropertiesMatchingARegex.java public class PatternpropertiesValidatesPropertiesMatchingARegex
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md index 74e030b224e..09bfc0a8916 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # PatternpropertiesWithNullValuedInstanceProperties -org.openapijsonschematools.client.components.schemas.PatternpropertiesWithNullValuedInstanceProperties.java +unit_test_api.components.schemas.PatternpropertiesWithNullValuedInstanceProperties.java public class PatternpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md index 3e224cac359..6e420a942a2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md @@ -1,5 +1,5 @@ # PrefixitemsValidationAdjustsTheStartingIndexForItems -org.openapijsonschematools.client.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems.java +unit_test_api.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems.java public class PrefixitemsValidationAdjustsTheStartingIndexForItems
          A class that contains necessary nested @@ -56,13 +56,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems; import java.util.Arrays; import java.util.List; @@ -126,7 +126,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -194,7 +194,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md index 7ca15c2ac9e..97cb7e3bfc7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # PrefixitemsWithNullInstanceElements -org.openapijsonschematools.client.components.schemas.PrefixitemsWithNullInstanceElements.java +unit_test_api.components.schemas.PrefixitemsWithNullInstanceElements.java public class PrefixitemsWithNullInstanceElements
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md index bf391634266..c921ebfc750 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md @@ -1,5 +1,5 @@ # PropertiesPatternpropertiesAdditionalpropertiesInteraction -org.openapijsonschematools.client.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction.java +unit_test_api.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction.java public class PropertiesPatternpropertiesAdditionalpropertiesInteraction
          A class that contains necessary nested @@ -67,13 +67,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction; import java.util.Arrays; import java.util.List; @@ -174,7 +174,7 @@ extends ListJsonSchema.ListJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.ListJsonSchema.ListJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.ListJsonSchema.ListJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -400,7 +400,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 79d86cedacc..061f1f4edf6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -1,5 +1,5 @@ # PropertiesWhoseNamesAreJavascriptObjectPropertyNames -org.openapijsonschematools.client.components.schemas.PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +unit_test_api.components.schemas.PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java public class PropertiesWhoseNamesAreJavascriptObjectPropertyNames
          A class that contains necessary nested @@ -276,7 +276,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -497,7 +497,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -532,7 +532,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md index de3e6fe1410..1af2b6bfdcd 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -org.openapijsonschematools.client.components.schemas.PropertiesWithEscapedCharacters.java +unit_test_api.components.schemas.PropertiesWithEscapedCharacters.java public class PropertiesWithEscapedCharacters
          A class that contains necessary nested @@ -280,7 +280,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -315,7 +315,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -350,7 +350,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -385,7 +385,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -420,7 +420,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -455,7 +455,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md index fed56234823..625097b1e51 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # PropertiesWithNullValuedInstanceProperties -org.openapijsonschematools.client.components.schemas.PropertiesWithNullValuedInstanceProperties.java +unit_test_api.components.schemas.PropertiesWithNullValuedInstanceProperties.java public class PropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -242,7 +242,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md index f0a45813afa..ddde0b2def1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -org.openapijsonschematools.client.components.schemas.PropertyNamedRefThatIsNotAReference.java +unit_test_api.components.schemas.PropertyNamedRefThatIsNotAReference.java public class PropertyNamedRefThatIsNotAReference
          A class that contains necessary nested @@ -242,7 +242,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md index abdbb806289..71a9ec5b087 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md @@ -1,5 +1,5 @@ # PropertynamesValidation -org.openapijsonschematools.client.components.schemas.PropertynamesValidation.java +unit_test_api.components.schemas.PropertynamesValidation.java public class PropertynamesValidation
          A class that contains necessary nested @@ -201,13 +201,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.PropertynamesValidation; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.PropertynamesValidation; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md index 11d63e7de13..5405448fe04 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md @@ -1,5 +1,5 @@ # RegexFormat -org.openapijsonschematools.client.components.schemas.RegexFormat.java +unit_test_api.components.schemas.RegexFormat.java public class RegexFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md index 0947b3fc9e2..26ee6f55e4d 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md @@ -1,5 +1,5 @@ # RegexesAreNotAnchoredByDefaultAndAreCaseSensitive -org.openapijsonschematools.client.components.schemas.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java +unit_test_api.components.schemas.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive
          A class that contains necessary nested @@ -202,7 +202,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -237,7 +237,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md index ec19588c4a7..b4086a9b8e9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md @@ -1,5 +1,5 @@ # RelativeJsonPointerFormat -org.openapijsonschematools.client.components.schemas.RelativeJsonPointerFormat.java +unit_test_api.components.schemas.RelativeJsonPointerFormat.java public class RelativeJsonPointerFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md index 365a4f96ff4..0cb7742bef9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -org.openapijsonschematools.client.components.schemas.RequiredDefaultValidation.java +unit_test_api.components.schemas.RequiredDefaultValidation.java public class RequiredDefaultValidation
          A class that contains necessary nested @@ -345,7 +345,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index a11d3f1046e..57b218aa3b2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -1,5 +1,5 @@ # RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames -org.openapijsonschematools.client.components.schemas.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +unit_test_api.components.schemas.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md index 8db2b0fbc2b..b88dd290a39 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md @@ -1,5 +1,5 @@ # RequiredValidation -org.openapijsonschematools.client.components.schemas.RequiredValidation.java +unit_test_api.components.schemas.RequiredValidation.java public class RequiredValidation
          A class that contains necessary nested @@ -379,7 +379,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -504,7 +504,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md index a1761569c18..afb5b32fbc7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -org.openapijsonschematools.client.components.schemas.RequiredWithEmptyArray.java +unit_test_api.components.schemas.RequiredWithEmptyArray.java public class RequiredWithEmptyArray
          A class that contains necessary nested @@ -345,7 +345,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md index 905a7663e37..be4a766d2d8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -org.openapijsonschematools.client.components.schemas.RequiredWithEscapedCharacters.java +unit_test_api.components.schemas.RequiredWithEscapedCharacters.java public class RequiredWithEscapedCharacters
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md index 365e67c9a68..29276a8120b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -org.openapijsonschematools.client.components.schemas.SimpleEnumValidation.java +unit_test_api.components.schemas.SimpleEnumValidation.java public class SimpleEnumValidation
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.SimpleEnumValidation; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.SimpleEnumValidation; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md index feb7bdac989..3faba9520b1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md @@ -1,5 +1,5 @@ # SingleDependency -org.openapijsonschematools.client.components.schemas.SingleDependency.java +unit_test_api.components.schemas.SingleDependency.java public class SingleDependency
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md index 62c43b97063..ebbdd196e68 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md @@ -1,5 +1,5 @@ # SmallMultipleOfLargeInteger -org.openapijsonschematools.client.components.schemas.SmallMultipleOfLargeInteger.java +unit_test_api.components.schemas.SmallMultipleOfLargeInteger.java public class SmallMultipleOfLargeInteger
          A class that contains necessary nested @@ -46,13 +46,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.SmallMultipleOfLargeInteger; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.SmallMultipleOfLargeInteger; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md index 5166ec0ed59..31c0a2e3314 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -org.openapijsonschematools.client.components.schemas.StringTypeMatchesStrings.java +unit_test_api.components.schemas.StringTypeMatchesStrings.java public class StringTypeMatchesStrings
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md index aadc93a5b33..2083d945ad2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md @@ -1,5 +1,5 @@ # TimeFormat -org.openapijsonschematools.client.components.schemas.TimeFormat.java +unit_test_api.components.schemas.TimeFormat.java public class TimeFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md index 0a9655e6820..6a37377f639 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md @@ -1,5 +1,5 @@ # TypeArrayObjectOrNull -org.openapijsonschematools.client.components.schemas.TypeArrayObjectOrNull.java +unit_test_api.components.schemas.TypeArrayObjectOrNull.java public class TypeArrayObjectOrNull
          A class that contains necessary nested @@ -84,13 +84,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.TypeArrayObjectOrNull; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.TypeArrayObjectOrNull; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md index 5bb799c1fdb..32ad7a9d991 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md @@ -1,5 +1,5 @@ # TypeArrayOrObject -org.openapijsonschematools.client.components.schemas.TypeArrayOrObject.java +unit_test_api.components.schemas.TypeArrayOrObject.java public class TypeArrayOrObject
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md index a50422c5a6f..fa6baf032ff 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md @@ -1,5 +1,5 @@ # TypeAsArrayWithOneItem -org.openapijsonschematools.client.components.schemas.TypeAsArrayWithOneItem.java +unit_test_api.components.schemas.TypeAsArrayWithOneItem.java public class TypeAsArrayWithOneItem
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md index 0d9460530b0..8c48bc142e7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md @@ -1,5 +1,5 @@ # UnevaluateditemsAsSchema -org.openapijsonschematools.client.components.schemas.UnevaluateditemsAsSchema.java +unit_test_api.components.schemas.UnevaluateditemsAsSchema.java public class UnevaluateditemsAsSchema
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md index 419b1e650e2..14d3164f4a7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md @@ -1,5 +1,5 @@ # UnevaluateditemsDependsOnMultipleNestedContains -org.openapijsonschematools.client.components.schemas.UnevaluateditemsDependsOnMultipleNestedContains.java +unit_test_api.components.schemas.UnevaluateditemsDependsOnMultipleNestedContains.java public class UnevaluateditemsDependsOnMultipleNestedContains
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md index 60a1ad340b8..4f36765573c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithItems -org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithItems.java +unit_test_api.components.schemas.UnevaluateditemsWithItems.java public class UnevaluateditemsWithItems
          A class that contains necessary nested @@ -56,13 +56,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithItems; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.UnevaluateditemsWithItems; import java.util.Arrays; import java.util.List; @@ -126,7 +126,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -193,7 +193,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md index 3fc8d9e757c..1469924eba9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithNullInstanceElements -org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithNullInstanceElements.java +unit_test_api.components.schemas.UnevaluateditemsWithNullInstanceElements.java public class UnevaluateditemsWithNullInstanceElements
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md index 0eac3865a05..252c966dd48 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesNotAffectedByPropertynames -org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames.java +unit_test_api.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames.java public class UnevaluatedpropertiesNotAffectedByPropertynames
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -240,13 +240,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md index bae10cae359..3f88e89340d 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesSchema -org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesSchema.java +unit_test_api.components.schemas.UnevaluatedpropertiesSchema.java public class UnevaluatedpropertiesSchema
          A class that contains necessary nested @@ -93,13 +93,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesSchema; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.UnevaluatedpropertiesSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md index b0158a7076f..daf74e7c5e4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithAdjacentAdditionalproperties -org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties.java +unit_test_api.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties.java public class UnevaluatedpropertiesWithAdjacentAdditionalproperties
          A class that contains necessary nested @@ -69,13 +69,13 @@ A schema class that validates payloads ### Code Sample ``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties; import java.util.Arrays; import java.util.List; @@ -230,7 +230,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -304,7 +304,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -429,7 +429,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md index 128bdcf42de..d51a8a53046 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithNullValuedInstanceProperties -org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithNullValuedInstanceProperties.java +unit_test_api.components.schemas.UnevaluatedpropertiesWithNullValuedInstanceProperties.java public class UnevaluatedpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md index 322fd231596..3a52a034075 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -org.openapijsonschematools.client.components.schemas.UniqueitemsFalseValidation.java +unit_test_api.components.schemas.UniqueitemsFalseValidation.java public class UniqueitemsFalseValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md index 1ecfacb8e78..634c076c35d 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md @@ -1,5 +1,5 @@ # UniqueitemsFalseWithAnArrayOfItems -org.openapijsonschematools.client.components.schemas.UniqueitemsFalseWithAnArrayOfItems.java +unit_test_api.components.schemas.UniqueitemsFalseWithAnArrayOfItems.java public class UniqueitemsFalseWithAnArrayOfItems
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -242,7 +242,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md index be6b794fe51..56bd58729fb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -org.openapijsonschematools.client.components.schemas.UniqueitemsValidation.java +unit_test_api.components.schemas.UniqueitemsValidation.java public class UniqueitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md index ca977d4c703..6417e3cf453 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md @@ -1,5 +1,5 @@ # UniqueitemsWithAnArrayOfItems -org.openapijsonschematools.client.components.schemas.UniqueitemsWithAnArrayOfItems.java +unit_test_api.components.schemas.UniqueitemsWithAnArrayOfItems.java public class UniqueitemsWithAnArrayOfItems
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -242,7 +242,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md index 86070ed0198..571b7215c64 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md @@ -1,5 +1,5 @@ # UriFormat -org.openapijsonschematools.client.components.schemas.UriFormat.java +unit_test_api.components.schemas.UriFormat.java public class UriFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md index 9b8f21979a3..fa20d965144 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md @@ -1,5 +1,5 @@ # UriReferenceFormat -org.openapijsonschematools.client.components.schemas.UriReferenceFormat.java +unit_test_api.components.schemas.UriReferenceFormat.java public class UriReferenceFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md index a95971b7ca9..49d873f014b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md @@ -1,5 +1,5 @@ # UriTemplateFormat -org.openapijsonschematools.client.components.schemas.UriTemplateFormat.java +unit_test_api.components.schemas.UriTemplateFormat.java public class UriTemplateFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md index ed984bd9617..d7fcc2c5f9c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md @@ -1,5 +1,5 @@ # UuidFormat -org.openapijsonschematools.client.components.schemas.UuidFormat.java +unit_test_api.components.schemas.UuidFormat.java public class UuidFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md index 92addae6f95..1d688e2a04c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md @@ -1,5 +1,5 @@ # ValidateAgainstCorrectBranchThenVsElse -org.openapijsonschematools.client.components.schemas.ValidateAgainstCorrectBranchThenVsElse.java +unit_test_api.components.schemas.ValidateAgainstCorrectBranchThenVsElse.java public class ValidateAgainstCorrectBranchThenVsElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md b/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md index 08ddb1be947..b9c92985f32 100644 --- a/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md +++ b/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md @@ -1,4 +1,4 @@ -org.openapijsonschematools.client.servers.RootServer0 +unit_test_api.servers.RootServer0 # Server RootServer0 public class RootServer0 diff --git a/samples/client/3_1_0_unit_test/java/pom.xml b/samples/client/3_1_0_unit_test/java/pom.xml index ebb2e4b2c11..17ed5c19822 100644 --- a/samples/client/3_1_0_unit_test/java/pom.xml +++ b/samples/client/3_1_0_unit_test/java/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.openapijsonschematools - openapi-java-client + jar - openapi-java-client + 0.0.1 https://github.com/openapi-json-schema-tools/openapi-json-schema-generator OpenAPI Java diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java new file mode 100644 index 00000000000..7e4a833b231 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java @@ -0,0 +1,46 @@ +package unit_test_api; + +import unit_test_api.servers.RootServer0; +import unit_test_api.servers.Server; +import unit_test_api.servers.ServerProvider; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Objects; + +public class RootServerInfo { + public static class RootServerInfo1 implements ServerProvider { + private final RootServer0 server0; + + RootServerInfo1( + @Nullable RootServer0 server0 + ) { + this.server0 = Objects.requireNonNullElseGet(server0, RootServer0::new); + } + + @Override + public Server getServer(ServerIndex serverIndex) { + return server0; + } + } + + public static class RootServerInfoBuilder { + private @Nullable RootServer0 server0; + + public RootServerInfoBuilder() {} + + public RootServerInfoBuilder rootServer0(RootServer0 server0) { + this.server0 = server0; + return this; + } + + public RootServerInfo1 build() { + return new RootServerInfo1( + server0 + ); + } + } + + public enum ServerIndex { + SERVER_0 + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java new file mode 100644 index 00000000000..d5941c8d212 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java @@ -0,0 +1,39 @@ +package unit_test_api.apiclient; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.ApiConfiguration; +import unit_test_api.configurations.SchemaConfiguration; + +import java.net.http.HttpClient; +import java.time.Duration; + +public class ApiClient { + protected final ApiConfiguration apiConfiguration; + protected final SchemaConfiguration schemaConfiguration; + protected final HttpClient client; + + public ApiClient(ApiConfiguration apiConfiguration, SchemaConfiguration schemaConfiguration) { + this.apiConfiguration = apiConfiguration; + this.schemaConfiguration = schemaConfiguration; + @Nullable Duration timeout = apiConfiguration.getTimeout(); + if (timeout != null) { + this.client = HttpClient.newBuilder() + .connectTimeout(timeout) + .build(); + } else { + this.client = HttpClient.newHttpClient(); + } + } + + public ApiConfiguration getApiConfiguration() { + return apiConfiguration; + } + + public SchemaConfiguration getSchemaConfiguration() { + return schemaConfiguration; + } + + public HttpClient getClient() { + return client; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java new file mode 100644 index 00000000000..4b0af6c4a32 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java @@ -0,0 +1,426 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ASchemaGivenForPrefixitems { + // nest classes so all schemas and input/output classes can be public + + + public static class ASchemaGivenForPrefixitemsList extends FrozenList<@Nullable Object> { + protected ASchemaGivenForPrefixitemsList(FrozenList<@Nullable Object> m) { + super(m); + } + public static ASchemaGivenForPrefixitemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return ASchemaGivenForPrefixitems1.getInstance().validate(arg, configuration); + } + } + + public static class ASchemaGivenForPrefixitemsListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public ASchemaGivenForPrefixitemsListBuilder() { + list = new ArrayList<>(); + } + + public ASchemaGivenForPrefixitemsListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public ASchemaGivenForPrefixitemsListBuilder add(Void item) { + list.add(null); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(boolean item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(String item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(int item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(float item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(long item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(double item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(List item) { + list.add(item); + return this; + } + + public ASchemaGivenForPrefixitemsListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface ASchemaGivenForPrefixitems1Boxed permits ASchemaGivenForPrefixitems1BoxedVoid, ASchemaGivenForPrefixitems1BoxedBoolean, ASchemaGivenForPrefixitems1BoxedNumber, ASchemaGivenForPrefixitems1BoxedString, ASchemaGivenForPrefixitems1BoxedList, ASchemaGivenForPrefixitems1BoxedMap { + @Nullable Object getData(); + } + + public record ASchemaGivenForPrefixitems1BoxedVoid(Void data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ASchemaGivenForPrefixitems1BoxedBoolean(boolean data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ASchemaGivenForPrefixitems1BoxedNumber(Number data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ASchemaGivenForPrefixitems1BoxedString(String data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ASchemaGivenForPrefixitems1BoxedList(ASchemaGivenForPrefixitemsList data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ASchemaGivenForPrefixitems1BoxedMap(FrozenMap<@Nullable Object> data) implements ASchemaGivenForPrefixitems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ASchemaGivenForPrefixitems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, ASchemaGivenForPrefixitems1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ASchemaGivenForPrefixitems1 instance = null; + + protected ASchemaGivenForPrefixitems1() { + super(new JsonSchemaInfo() + .prefixItems(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static ASchemaGivenForPrefixitems1 getInstance() { + if (instance == null) { + instance = new ASchemaGivenForPrefixitems1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public ASchemaGivenForPrefixitemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new ASchemaGivenForPrefixitemsList(newInstanceItems); + } + + public ASchemaGivenForPrefixitemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ASchemaGivenForPrefixitems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedVoid(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedNumber(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedString(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedList(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ASchemaGivenForPrefixitems1BoxedMap(validate(arg, configuration)); + } + @Override + public ASchemaGivenForPrefixitems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java new file mode 100644 index 00000000000..56d8e08be28 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java @@ -0,0 +1,413 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalItemsAreAllowedByDefault { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalItemsAreAllowedByDefaultList extends FrozenList<@Nullable Object> { + protected AdditionalItemsAreAllowedByDefaultList(FrozenList<@Nullable Object> m) { + super(m); + } + public static AdditionalItemsAreAllowedByDefaultList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalItemsAreAllowedByDefault1.getInstance().validate(arg, configuration); + } + } + + public static class AdditionalItemsAreAllowedByDefaultListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public AdditionalItemsAreAllowedByDefaultListBuilder() { + list = new ArrayList<>(); + } + + public AdditionalItemsAreAllowedByDefaultListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(Void item) { + list.add(null); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(boolean item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(String item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(int item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(float item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(long item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(double item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(List item) { + list.add(item); + return this; + } + + public AdditionalItemsAreAllowedByDefaultListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface AdditionalItemsAreAllowedByDefault1Boxed permits AdditionalItemsAreAllowedByDefault1BoxedVoid, AdditionalItemsAreAllowedByDefault1BoxedBoolean, AdditionalItemsAreAllowedByDefault1BoxedNumber, AdditionalItemsAreAllowedByDefault1BoxedString, AdditionalItemsAreAllowedByDefault1BoxedList, AdditionalItemsAreAllowedByDefault1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalItemsAreAllowedByDefault1BoxedVoid(Void data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalItemsAreAllowedByDefault1BoxedBoolean(boolean data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalItemsAreAllowedByDefault1BoxedNumber(Number data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalItemsAreAllowedByDefault1BoxedString(String data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalItemsAreAllowedByDefault1BoxedList(AdditionalItemsAreAllowedByDefaultList data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalItemsAreAllowedByDefault1BoxedMap(FrozenMap<@Nullable Object> data) implements AdditionalItemsAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalItemsAreAllowedByDefault1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, AdditionalItemsAreAllowedByDefault1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalItemsAreAllowedByDefault1 instance = null; + + protected AdditionalItemsAreAllowedByDefault1() { + super(new JsonSchemaInfo() + .prefixItems(List.of( + Schema0.class + )) + ); + } + + public static AdditionalItemsAreAllowedByDefault1 getInstance() { + if (instance == null) { + instance = new AdditionalItemsAreAllowedByDefault1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public AdditionalItemsAreAllowedByDefaultList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new AdditionalItemsAreAllowedByDefaultList(newInstanceItems); + } + + public AdditionalItemsAreAllowedByDefaultList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedVoid(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedNumber(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedString(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedList(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalItemsAreAllowedByDefault1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalItemsAreAllowedByDefault1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java new file mode 100644 index 00000000000..d806004bbed --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java @@ -0,0 +1,531 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalpropertiesAreAllowedByDefault { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class AdditionalpropertiesAreAllowedByDefaultMap extends FrozenMap<@Nullable Object> { + protected AdditionalpropertiesAreAllowedByDefaultMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo", + "bar" + ); + public static AdditionalpropertiesAreAllowedByDefaultMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalpropertiesAreAllowedByDefault1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object bar() throws UnsetPropertyException { + return getOrThrow("bar"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(Void value) { + var instance = getInstance(); + instance.put("bar", null); + return getBuilderAfterBar(instance); + } + + default T bar(boolean value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(List value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(Map value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class AdditionalpropertiesAreAllowedByDefaultMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public AdditionalpropertiesAreAllowedByDefaultMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterBar(Map instance) { + return this; + } + public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface AdditionalpropertiesAreAllowedByDefault1Boxed permits AdditionalpropertiesAreAllowedByDefault1BoxedVoid, AdditionalpropertiesAreAllowedByDefault1BoxedBoolean, AdditionalpropertiesAreAllowedByDefault1BoxedNumber, AdditionalpropertiesAreAllowedByDefault1BoxedString, AdditionalpropertiesAreAllowedByDefault1BoxedList, AdditionalpropertiesAreAllowedByDefault1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedVoid(Void data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedBoolean(boolean data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedNumber(Number data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedString(String data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedList(FrozenList<@Nullable Object> data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesAreAllowedByDefault1BoxedMap(AdditionalpropertiesAreAllowedByDefaultMap data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalpropertiesAreAllowedByDefault1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AdditionalpropertiesAreAllowedByDefault1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalpropertiesAreAllowedByDefault1 instance = null; + + protected AdditionalpropertiesAreAllowedByDefault1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + ); + } + + public static AdditionalpropertiesAreAllowedByDefault1 getInstance() { + if (instance == null) { + instance = new AdditionalpropertiesAreAllowedByDefault1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public AdditionalpropertiesAreAllowedByDefaultMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new AdditionalpropertiesAreAllowedByDefaultMap(castProperties); + } + + public AdditionalpropertiesAreAllowedByDefaultMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedVoid(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedNumber(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedString(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedList(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesAreAllowedByDefault1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesAreAllowedByDefault1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java new file mode 100644 index 00000000000..9ff86fe8c48 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java @@ -0,0 +1,194 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalpropertiesCanExistByItself { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class AdditionalpropertiesCanExistByItselfMap extends FrozenMap { + protected AdditionalpropertiesCanExistByItselfMap(FrozenMap m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of(); + public static AdditionalpropertiesCanExistByItselfMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalpropertiesCanExistByItself1.getInstance().validate(arg, configuration); + } + + public boolean getAdditionalProperty(String name) throws UnsetPropertyException { + throwIfKeyNotPresent(name); + Boolean value = get(name); + if (value == null) { + throw new RuntimeException("Value may not be null"); + } + return (boolean) value; + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class AdditionalpropertiesCanExistByItselfMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of(); + public Set getKnownKeys() { + return knownKeys; + } + public AdditionalpropertiesCanExistByItselfMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AdditionalpropertiesCanExistByItselfMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface AdditionalpropertiesCanExistByItself1Boxed permits AdditionalpropertiesCanExistByItself1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalpropertiesCanExistByItself1BoxedMap(AdditionalpropertiesCanExistByItselfMap data) implements AdditionalpropertiesCanExistByItself1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalpropertiesCanExistByItself1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalpropertiesCanExistByItself1 instance = null; + + protected AdditionalpropertiesCanExistByItself1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .additionalProperties(AdditionalProperties.class) + ); + } + + public static AdditionalpropertiesCanExistByItself1 getInstance() { + if (instance == null) { + instance = new AdditionalpropertiesCanExistByItself1(); + } + return instance; + } + + public AdditionalpropertiesCanExistByItselfMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + if (!(propertyInstance instanceof Boolean)) { + throw new RuntimeException("Invalid instantiated value"); + } + properties.put(propertyName, (Boolean) propertyInstance); + } + FrozenMap castProperties = new FrozenMap<>(properties); + return new AdditionalpropertiesCanExistByItselfMap(castProperties); + } + + public AdditionalpropertiesCanExistByItselfMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalpropertiesCanExistByItself1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesCanExistByItself1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesCanExistByItself1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java new file mode 100644 index 00000000000..ef3e054f1d9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java @@ -0,0 +1,806 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalpropertiesDoesNotLookInApplicators { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema0MapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0MapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public Schema0MapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class AdditionalpropertiesDoesNotLookInApplicatorsMap extends FrozenMap { + protected AdditionalpropertiesDoesNotLookInApplicatorsMap(FrozenMap m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of(); + public static AdditionalpropertiesDoesNotLookInApplicatorsMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalpropertiesDoesNotLookInApplicators1.getInstance().validate(arg, configuration); + } + + public boolean getAdditionalProperty(String name) throws UnsetPropertyException { + throwIfKeyNotPresent(name); + Boolean value = get(name); + if (value == null) { + throw new RuntimeException("Value may not be null"); + } + return (boolean) value; + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of(); + public Set getKnownKeys() { + return knownKeys; + } + public AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface AdditionalpropertiesDoesNotLookInApplicators1Boxed permits AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid, AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean, AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber, AdditionalpropertiesDoesNotLookInApplicators1BoxedString, AdditionalpropertiesDoesNotLookInApplicators1BoxedList, AdditionalpropertiesDoesNotLookInApplicators1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid(Void data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean(boolean data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber(Number data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedString(String data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedList(FrozenList<@Nullable Object> data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AdditionalpropertiesDoesNotLookInApplicators1BoxedMap(AdditionalpropertiesDoesNotLookInApplicatorsMap data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalpropertiesDoesNotLookInApplicators1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AdditionalpropertiesDoesNotLookInApplicators1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalpropertiesDoesNotLookInApplicators1 instance = null; + + protected AdditionalpropertiesDoesNotLookInApplicators1() { + super(new JsonSchemaInfo() + .additionalProperties(AdditionalProperties.class) + .allOf(List.of( + Schema0.class + )) + ); + } + + public static AdditionalpropertiesDoesNotLookInApplicators1 getInstance() { + if (instance == null) { + instance = new AdditionalpropertiesDoesNotLookInApplicators1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public AdditionalpropertiesDoesNotLookInApplicatorsMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + if (!(propertyInstance instanceof Boolean)) { + throw new RuntimeException("Invalid instantiated value"); + } + properties.put(propertyName, (Boolean) propertyInstance); + } + FrozenMap castProperties = new FrozenMap<>(properties); + return new AdditionalpropertiesDoesNotLookInApplicatorsMap(castProperties); + } + + public AdditionalpropertiesDoesNotLookInApplicatorsMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedString(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedList(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesDoesNotLookInApplicators1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesDoesNotLookInApplicators1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java new file mode 100644 index 00000000000..b8d2412bc0d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java @@ -0,0 +1,189 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalpropertiesWithNullValuedInstanceProperties { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class AdditionalpropertiesWithNullValuedInstancePropertiesMap extends FrozenMap { + protected AdditionalpropertiesWithNullValuedInstancePropertiesMap(FrozenMap m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of(); + public static AdditionalpropertiesWithNullValuedInstancePropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalpropertiesWithNullValuedInstanceProperties1.getInstance().validate(arg, configuration); + } + + public Void getAdditionalProperty(String name) throws UnsetPropertyException { + return getOrThrow(name); + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, null); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of(); + public Set getKnownKeys() { + return knownKeys; + } + public AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface AdditionalpropertiesWithNullValuedInstanceProperties1Boxed permits AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap(AdditionalpropertiesWithNullValuedInstancePropertiesMap data) implements AdditionalpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalpropertiesWithNullValuedInstanceProperties1 instance = null; + + protected AdditionalpropertiesWithNullValuedInstanceProperties1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .additionalProperties(AdditionalProperties.class) + ); + } + + public static AdditionalpropertiesWithNullValuedInstanceProperties1 getInstance() { + if (instance == null) { + instance = new AdditionalpropertiesWithNullValuedInstanceProperties1(); + } + return instance; + } + + public AdditionalpropertiesWithNullValuedInstancePropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + if (!(propertyInstance == null || propertyInstance instanceof Void)) { + throw new RuntimeException("Invalid instantiated value"); + } + properties.put(propertyName, (Void) propertyInstance); + } + FrozenMap castProperties = new FrozenMap<>(properties); + return new AdditionalpropertiesWithNullValuedInstancePropertiesMap(castProperties); + } + + public AdditionalpropertiesWithNullValuedInstancePropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java new file mode 100644 index 00000000000..3ce0364bc37 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java @@ -0,0 +1,357 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AdditionalpropertiesWithSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class AdditionalpropertiesWithSchemaMap extends FrozenMap<@Nullable Object> { + protected AdditionalpropertiesWithSchemaMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo", + "bar" + ); + public static AdditionalpropertiesWithSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AdditionalpropertiesWithSchema1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object bar() throws UnsetPropertyException { + return getOrThrow("bar"); + } + + public boolean getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + var value = getOrThrow(name); + if (!(value instanceof Boolean)) { + throw new RuntimeException("Invalid value stored for " + name); + } + return (boolean) value; + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(Void value) { + var instance = getInstance(); + instance.put("bar", null); + return getBuilderAfterBar(instance); + } + + default T bar(boolean value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(List value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(Map value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class AdditionalpropertiesWithSchemaMapBuilder implements GenericBuilder>, SetterForFoo, SetterForBar, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public AdditionalpropertiesWithSchemaMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterBar(Map instance) { + return this; + } + public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface AdditionalpropertiesWithSchema1Boxed permits AdditionalpropertiesWithSchema1BoxedMap { + @Nullable Object getData(); + } + + public record AdditionalpropertiesWithSchema1BoxedMap(AdditionalpropertiesWithSchemaMap data) implements AdditionalpropertiesWithSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AdditionalpropertiesWithSchema1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AdditionalpropertiesWithSchema1 instance = null; + + protected AdditionalpropertiesWithSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + .additionalProperties(AdditionalProperties.class) + ); + } + + public static AdditionalpropertiesWithSchema1 getInstance() { + if (instance == null) { + instance = new AdditionalpropertiesWithSchema1(); + } + return instance; + } + + public AdditionalpropertiesWithSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new AdditionalpropertiesWithSchemaMap(castProperties); + } + + public AdditionalpropertiesWithSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AdditionalpropertiesWithSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AdditionalpropertiesWithSchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AdditionalpropertiesWithSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java new file mode 100644 index 00000000000..c4b24728846 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java @@ -0,0 +1,1098 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Allof { + // nest classes so all schemas and input/output classes can be public + + + public static class Bar extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar" + ); + public static final Set optionalKeys = Set.of(); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public Number bar() { + @Nullable Object value = get("bar"); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema0MapBuilder implements SetterForBar { + private final Map instance; + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterBar(Map instance) { + return new Schema0Map0Builder(instance); + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "bar" + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Schema1Map extends FrozenMap<@Nullable Object> { + protected Schema1Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema1.getInstance().validate(arg, configuration); + } + + public String foo() { + @Nullable Object value = get("foo"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema1Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema1MapBuilder implements SetterForFoo { + private final Map instance; + public Schema1MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterFoo(Map instance) { + return new Schema1Map0Builder(instance); + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .required(Set.of( + "foo" + )) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema1Map(castProperties); + } + + public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Allof1Boxed permits Allof1BoxedVoid, Allof1BoxedBoolean, Allof1BoxedNumber, Allof1BoxedString, Allof1BoxedList, Allof1BoxedMap { + @Nullable Object getData(); + } + + public record Allof1BoxedVoid(Void data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Allof1BoxedBoolean(boolean data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Allof1BoxedNumber(Number data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Allof1BoxedString(String data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Allof1BoxedList(FrozenList<@Nullable Object> data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Allof1BoxedMap(FrozenMap<@Nullable Object> data) implements Allof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Allof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Allof1BoxedList>, MapSchemaValidator, Allof1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Allof1 instance = null; + + protected Allof1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static Allof1 getInstance() { + if (instance == null) { + instance = new Allof1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Allof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedVoid(validate(arg, configuration)); + } + @Override + public Allof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Allof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedNumber(validate(arg, configuration)); + } + @Override + public Allof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedString(validate(arg, configuration)); + } + @Override + public Allof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedList(validate(arg, configuration)); + } + @Override + public Allof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Allof1BoxedMap(validate(arg, configuration)); + } + @Override + public Allof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java new file mode 100644 index 00000000000..835afc78ef2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java @@ -0,0 +1,1190 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofCombinedWithAnyofOneof { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Schema02Boxed permits Schema02BoxedVoid, Schema02BoxedBoolean, Schema02BoxedNumber, Schema02BoxedString, Schema02BoxedList, Schema02BoxedMap { + @Nullable Object getData(); + } + + public record Schema02BoxedVoid(Void data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema02BoxedBoolean(boolean data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema02BoxedNumber(Number data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema02BoxedString(String data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema02BoxedList(FrozenList<@Nullable Object> data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema02BoxedMap(FrozenMap<@Nullable Object> data) implements Schema02Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema02 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema02BoxedList>, MapSchemaValidator, Schema02BoxedMap> { + private static @Nullable Schema02 instance = null; + + protected Schema02() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Schema02 getInstance() { + if (instance == null) { + instance = new Schema02(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema02BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema02BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema02BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema02BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedString(validate(arg, configuration)); + } + @Override + public Schema02BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedList(validate(arg, configuration)); + } + @Override + public Schema02BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema02BoxedMap(validate(arg, configuration)); + } + @Override + public Schema02Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema01Boxed permits Schema01BoxedVoid, Schema01BoxedBoolean, Schema01BoxedNumber, Schema01BoxedString, Schema01BoxedList, Schema01BoxedMap { + @Nullable Object getData(); + } + + public record Schema01BoxedVoid(Void data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema01BoxedBoolean(boolean data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema01BoxedNumber(Number data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema01BoxedString(String data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema01BoxedList(FrozenList<@Nullable Object> data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema01BoxedMap(FrozenMap<@Nullable Object> data) implements Schema01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema01 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema01BoxedList>, MapSchemaValidator, Schema01BoxedMap> { + private static @Nullable Schema01 instance = null; + + protected Schema01() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("3")) + ); + } + + public static Schema01 getInstance() { + if (instance == null) { + instance = new Schema01(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema01BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema01BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema01BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema01BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedString(validate(arg, configuration)); + } + @Override + public Schema01BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedList(validate(arg, configuration)); + } + @Override + public Schema01BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema01BoxedMap(validate(arg, configuration)); + } + @Override + public Schema01Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("5")) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface AllofCombinedWithAnyofOneof1Boxed permits AllofCombinedWithAnyofOneof1BoxedVoid, AllofCombinedWithAnyofOneof1BoxedBoolean, AllofCombinedWithAnyofOneof1BoxedNumber, AllofCombinedWithAnyofOneof1BoxedString, AllofCombinedWithAnyofOneof1BoxedList, AllofCombinedWithAnyofOneof1BoxedMap { + @Nullable Object getData(); + } + + public record AllofCombinedWithAnyofOneof1BoxedVoid(Void data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofCombinedWithAnyofOneof1BoxedBoolean(boolean data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofCombinedWithAnyofOneof1BoxedNumber(Number data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofCombinedWithAnyofOneof1BoxedString(String data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofCombinedWithAnyofOneof1BoxedList(FrozenList<@Nullable Object> data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofCombinedWithAnyofOneof1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofCombinedWithAnyofOneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofCombinedWithAnyofOneof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofCombinedWithAnyofOneof1BoxedList>, MapSchemaValidator, AllofCombinedWithAnyofOneof1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofCombinedWithAnyofOneof1 instance = null; + + protected AllofCombinedWithAnyofOneof1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema02.class + )) + .anyOf(List.of( + Schema01.class + )) + .oneOf(List.of( + Schema0.class + )) + ); + } + + public static AllofCombinedWithAnyofOneof1 getInstance() { + if (instance == null) { + instance = new AllofCombinedWithAnyofOneof1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedString(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedList(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofCombinedWithAnyofOneof1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofCombinedWithAnyofOneof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java new file mode 100644 index 00000000000..cccee81abec --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java @@ -0,0 +1,900 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofSimpleTypes { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .maximum(30) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .minimum(20) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface AllofSimpleTypes1Boxed permits AllofSimpleTypes1BoxedVoid, AllofSimpleTypes1BoxedBoolean, AllofSimpleTypes1BoxedNumber, AllofSimpleTypes1BoxedString, AllofSimpleTypes1BoxedList, AllofSimpleTypes1BoxedMap { + @Nullable Object getData(); + } + + public record AllofSimpleTypes1BoxedVoid(Void data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofSimpleTypes1BoxedBoolean(boolean data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofSimpleTypes1BoxedNumber(Number data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofSimpleTypes1BoxedString(String data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofSimpleTypes1BoxedList(FrozenList<@Nullable Object> data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofSimpleTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofSimpleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofSimpleTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofSimpleTypes1BoxedList>, MapSchemaValidator, AllofSimpleTypes1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofSimpleTypes1 instance = null; + + protected AllofSimpleTypes1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AllofSimpleTypes1 getInstance() { + if (instance == null) { + instance = new AllofSimpleTypes1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofSimpleTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedString(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedList(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofSimpleTypes1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofSimpleTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java new file mode 100644 index 00000000000..cf3e347145a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java @@ -0,0 +1,1192 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofWithBaseSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public String foo() { + @Nullable Object value = get("foo"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema0MapBuilder implements SetterForFoo { + private final Map instance; + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterFoo(Map instance) { + return new Schema0Map0Builder(instance); + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .required(Set.of( + "foo" + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Baz extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Baz instance = null; + public static Baz getInstance() { + if (instance == null) { + instance = new Baz(); + } + return instance; + } + } + + + public static class Schema1Map extends FrozenMap<@Nullable Object> { + protected Schema1Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "baz" + ); + public static final Set optionalKeys = Set.of(); + public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema1.getInstance().validate(arg, configuration); + } + + public Void baz() { + @Nullable Object value = get("baz"); + if (!(value == null || value instanceof Void)) { + throw new RuntimeException("Invalid value stored for baz"); + } + return (Void) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBaz { + Map getInstance(); + T getBuilderAfterBaz(Map instance); + + default T baz(Void value) { + var instance = getInstance(); + instance.put("baz", null); + return getBuilderAfterBaz(instance); + } + } + + public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "baz" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema1Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema1MapBuilder implements SetterForBaz { + private final Map instance; + public Schema1MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterBaz(Map instance) { + return new Schema1Map0Builder(instance); + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("baz", Baz.class) + )) + .required(Set.of( + "baz" + )) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema1Map(castProperties); + } + + public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Bar extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class AllofWithBaseSchemaMap extends FrozenMap<@Nullable Object> { + protected AllofWithBaseSchemaMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar" + ); + public static final Set optionalKeys = Set.of(); + public static AllofWithBaseSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return AllofWithBaseSchema1.getInstance().validate(arg, configuration); + } + + public Number bar() { + @Nullable Object value = get("bar"); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class AllofWithBaseSchemaMap0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public AllofWithBaseSchemaMap0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public AllofWithBaseSchemaMap0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class AllofWithBaseSchemaMapBuilder implements SetterForBar { + private final Map instance; + public AllofWithBaseSchemaMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public AllofWithBaseSchemaMap0Builder getBuilderAfterBar(Map instance) { + return new AllofWithBaseSchemaMap0Builder(instance); + } + } + + + public sealed interface AllofWithBaseSchema1Boxed permits AllofWithBaseSchema1BoxedVoid, AllofWithBaseSchema1BoxedBoolean, AllofWithBaseSchema1BoxedNumber, AllofWithBaseSchema1BoxedString, AllofWithBaseSchema1BoxedList, AllofWithBaseSchema1BoxedMap { + @Nullable Object getData(); + } + + public record AllofWithBaseSchema1BoxedVoid(Void data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithBaseSchema1BoxedBoolean(boolean data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithBaseSchema1BoxedNumber(Number data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithBaseSchema1BoxedString(String data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithBaseSchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithBaseSchema1BoxedMap(AllofWithBaseSchemaMap data) implements AllofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofWithBaseSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithBaseSchema1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofWithBaseSchema1 instance = null; + + protected AllofWithBaseSchema1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "bar" + )) + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AllofWithBaseSchema1 getInstance() { + if (instance == null) { + instance = new AllofWithBaseSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public AllofWithBaseSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new AllofWithBaseSchemaMap(castProperties); + } + + public AllofWithBaseSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofWithBaseSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedString(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedList(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithBaseSchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java new file mode 100644 index 00000000000..05ac64179fa --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java @@ -0,0 +1,340 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofWithOneEmptySchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface AllofWithOneEmptySchema1Boxed permits AllofWithOneEmptySchema1BoxedVoid, AllofWithOneEmptySchema1BoxedBoolean, AllofWithOneEmptySchema1BoxedNumber, AllofWithOneEmptySchema1BoxedString, AllofWithOneEmptySchema1BoxedList, AllofWithOneEmptySchema1BoxedMap { + @Nullable Object getData(); + } + + public record AllofWithOneEmptySchema1BoxedVoid(Void data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithOneEmptySchema1BoxedBoolean(boolean data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithOneEmptySchema1BoxedNumber(Number data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithOneEmptySchema1BoxedString(String data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithOneEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithOneEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofWithOneEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithOneEmptySchema1BoxedList>, MapSchemaValidator, AllofWithOneEmptySchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofWithOneEmptySchema1 instance = null; + + protected AllofWithOneEmptySchema1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class + )) + ); + } + + public static AllofWithOneEmptySchema1 getInstance() { + if (instance == null) { + instance = new AllofWithOneEmptySchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofWithOneEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedString(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedList(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithOneEmptySchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofWithOneEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java new file mode 100644 index 00000000000..8a53f25875f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java @@ -0,0 +1,352 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofWithTheFirstEmptySchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface AllofWithTheFirstEmptySchema1Boxed permits AllofWithTheFirstEmptySchema1BoxedVoid, AllofWithTheFirstEmptySchema1BoxedBoolean, AllofWithTheFirstEmptySchema1BoxedNumber, AllofWithTheFirstEmptySchema1BoxedString, AllofWithTheFirstEmptySchema1BoxedList, AllofWithTheFirstEmptySchema1BoxedMap { + @Nullable Object getData(); + } + + public record AllofWithTheFirstEmptySchema1BoxedVoid(Void data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheFirstEmptySchema1BoxedBoolean(boolean data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheFirstEmptySchema1BoxedNumber(Number data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheFirstEmptySchema1BoxedString(String data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheFirstEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheFirstEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTheFirstEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofWithTheFirstEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTheFirstEmptySchema1BoxedList>, MapSchemaValidator, AllofWithTheFirstEmptySchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofWithTheFirstEmptySchema1 instance = null; + + protected AllofWithTheFirstEmptySchema1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AllofWithTheFirstEmptySchema1 getInstance() { + if (instance == null) { + instance = new AllofWithTheFirstEmptySchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedString(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedList(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheFirstEmptySchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofWithTheFirstEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java new file mode 100644 index 00000000000..4c077c7d902 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java @@ -0,0 +1,352 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofWithTheLastEmptySchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface AllofWithTheLastEmptySchema1Boxed permits AllofWithTheLastEmptySchema1BoxedVoid, AllofWithTheLastEmptySchema1BoxedBoolean, AllofWithTheLastEmptySchema1BoxedNumber, AllofWithTheLastEmptySchema1BoxedString, AllofWithTheLastEmptySchema1BoxedList, AllofWithTheLastEmptySchema1BoxedMap { + @Nullable Object getData(); + } + + public record AllofWithTheLastEmptySchema1BoxedVoid(Void data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheLastEmptySchema1BoxedBoolean(boolean data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheLastEmptySchema1BoxedNumber(Number data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheLastEmptySchema1BoxedString(String data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheLastEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTheLastEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTheLastEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofWithTheLastEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTheLastEmptySchema1BoxedList>, MapSchemaValidator, AllofWithTheLastEmptySchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofWithTheLastEmptySchema1 instance = null; + + protected AllofWithTheLastEmptySchema1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AllofWithTheLastEmptySchema1 getInstance() { + if (instance == null) { + instance = new AllofWithTheLastEmptySchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofWithTheLastEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedString(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedList(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTheLastEmptySchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofWithTheLastEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java new file mode 100644 index 00000000000..44032baf2de --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java @@ -0,0 +1,352 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AllofWithTwoEmptySchemas { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface AllofWithTwoEmptySchemas1Boxed permits AllofWithTwoEmptySchemas1BoxedVoid, AllofWithTwoEmptySchemas1BoxedBoolean, AllofWithTwoEmptySchemas1BoxedNumber, AllofWithTwoEmptySchemas1BoxedString, AllofWithTwoEmptySchemas1BoxedList, AllofWithTwoEmptySchemas1BoxedMap { + @Nullable Object getData(); + } + + public record AllofWithTwoEmptySchemas1BoxedVoid(Void data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTwoEmptySchemas1BoxedBoolean(boolean data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTwoEmptySchemas1BoxedNumber(Number data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTwoEmptySchemas1BoxedString(String data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTwoEmptySchemas1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AllofWithTwoEmptySchemas1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTwoEmptySchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AllofWithTwoEmptySchemas1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTwoEmptySchemas1BoxedList>, MapSchemaValidator, AllofWithTwoEmptySchemas1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AllofWithTwoEmptySchemas1 instance = null; + + protected AllofWithTwoEmptySchemas1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AllofWithTwoEmptySchemas1 getInstance() { + if (instance == null) { + instance = new AllofWithTwoEmptySchemas1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AllofWithTwoEmptySchemas1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedVoid(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedNumber(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedString(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedList(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AllofWithTwoEmptySchemas1BoxedMap(validate(arg, configuration)); + } + @Override + public AllofWithTwoEmptySchemas1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java new file mode 100644 index 00000000000..cb359083622 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java @@ -0,0 +1,626 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Anyof { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .minimum(2) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Anyof1Boxed permits Anyof1BoxedVoid, Anyof1BoxedBoolean, Anyof1BoxedNumber, Anyof1BoxedString, Anyof1BoxedList, Anyof1BoxedMap { + @Nullable Object getData(); + } + + public record Anyof1BoxedVoid(Void data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Anyof1BoxedBoolean(boolean data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Anyof1BoxedNumber(Number data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Anyof1BoxedString(String data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Anyof1BoxedList(FrozenList<@Nullable Object> data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Anyof1BoxedMap(FrozenMap<@Nullable Object> data) implements Anyof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Anyof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Anyof1BoxedList>, MapSchemaValidator, Anyof1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Anyof1 instance = null; + + protected Anyof1() { + super(new JsonSchemaInfo() + .anyOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static Anyof1 getInstance() { + if (instance == null) { + instance = new Anyof1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Anyof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedVoid(validate(arg, configuration)); + } + @Override + public Anyof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Anyof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedNumber(validate(arg, configuration)); + } + @Override + public Anyof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedString(validate(arg, configuration)); + } + @Override + public Anyof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedList(validate(arg, configuration)); + } + @Override + public Anyof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Anyof1BoxedMap(validate(arg, configuration)); + } + @Override + public Anyof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java new file mode 100644 index 00000000000..1d13e88fe38 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java @@ -0,0 +1,1098 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AnyofComplexTypes { + // nest classes so all schemas and input/output classes can be public + + + public static class Bar extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar" + ); + public static final Set optionalKeys = Set.of(); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public Number bar() { + @Nullable Object value = get("bar"); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema0MapBuilder implements SetterForBar { + private final Map instance; + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterBar(Map instance) { + return new Schema0Map0Builder(instance); + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "bar" + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Schema1Map extends FrozenMap<@Nullable Object> { + protected Schema1Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema1.getInstance().validate(arg, configuration); + } + + public String foo() { + @Nullable Object value = get("foo"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema1Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema1MapBuilder implements SetterForFoo { + private final Map instance; + public Schema1MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterFoo(Map instance) { + return new Schema1Map0Builder(instance); + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .required(Set.of( + "foo" + )) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema1Map(castProperties); + } + + public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface AnyofComplexTypes1Boxed permits AnyofComplexTypes1BoxedVoid, AnyofComplexTypes1BoxedBoolean, AnyofComplexTypes1BoxedNumber, AnyofComplexTypes1BoxedString, AnyofComplexTypes1BoxedList, AnyofComplexTypes1BoxedMap { + @Nullable Object getData(); + } + + public record AnyofComplexTypes1BoxedVoid(Void data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofComplexTypes1BoxedBoolean(boolean data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofComplexTypes1BoxedNumber(Number data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofComplexTypes1BoxedString(String data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofComplexTypes1BoxedList(FrozenList<@Nullable Object> data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofComplexTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AnyofComplexTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyofComplexTypes1BoxedList>, MapSchemaValidator, AnyofComplexTypes1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AnyofComplexTypes1 instance = null; + + protected AnyofComplexTypes1() { + super(new JsonSchemaInfo() + .anyOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AnyofComplexTypes1 getInstance() { + if (instance == null) { + instance = new AnyofComplexTypes1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AnyofComplexTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedVoid(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedNumber(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedString(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedList(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofComplexTypes1BoxedMap(validate(arg, configuration)); + } + @Override + public AnyofComplexTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java new file mode 100644 index 00000000000..eea4bf0ea6d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java @@ -0,0 +1,669 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AnyofWithBaseSchema { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .maxLength(2) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .minLength(4) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface AnyofWithBaseSchema1Boxed permits AnyofWithBaseSchema1BoxedString { + @Nullable Object getData(); + } + + public record AnyofWithBaseSchema1BoxedString(String data) implements AnyofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class AnyofWithBaseSchema1 extends JsonSchema implements StringSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AnyofWithBaseSchema1 instance = null; + + protected AnyofWithBaseSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .anyOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AnyofWithBaseSchema1 getInstance() { + if (instance == null) { + instance = new AnyofWithBaseSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AnyofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithBaseSchema1BoxedString(validate(arg, configuration)); + } + @Override + public AnyofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java new file mode 100644 index 00000000000..a58887e5c4b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java @@ -0,0 +1,352 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class AnyofWithOneEmptySchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface AnyofWithOneEmptySchema1Boxed permits AnyofWithOneEmptySchema1BoxedVoid, AnyofWithOneEmptySchema1BoxedBoolean, AnyofWithOneEmptySchema1BoxedNumber, AnyofWithOneEmptySchema1BoxedString, AnyofWithOneEmptySchema1BoxedList, AnyofWithOneEmptySchema1BoxedMap { + @Nullable Object getData(); + } + + public record AnyofWithOneEmptySchema1BoxedVoid(Void data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofWithOneEmptySchema1BoxedBoolean(boolean data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofWithOneEmptySchema1BoxedNumber(Number data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofWithOneEmptySchema1BoxedString(String data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofWithOneEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AnyofWithOneEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyofWithOneEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class AnyofWithOneEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyofWithOneEmptySchema1BoxedList>, MapSchemaValidator, AnyofWithOneEmptySchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable AnyofWithOneEmptySchema1 instance = null; + + protected AnyofWithOneEmptySchema1() { + super(new JsonSchemaInfo() + .anyOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static AnyofWithOneEmptySchema1 getInstance() { + if (instance == null) { + instance = new AnyofWithOneEmptySchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AnyofWithOneEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedString(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedList(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyofWithOneEmptySchema1BoxedMap(validate(arg, configuration)); + } + @Override + public AnyofWithOneEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java new file mode 100644 index 00000000000..0721ab38434 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java @@ -0,0 +1,20 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.ListJsonSchema; +import unit_test_api.schemas.validation.FrozenList; + +public class ArrayTypeMatchesArrays extends ListJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class ArrayTypeMatchesArrays1 extends ListJsonSchema.ListJsonSchema1 { + private static @Nullable ArrayTypeMatchesArrays1 instance = null; + public static ArrayTypeMatchesArrays1 getInstance() { + if (instance == null) { + instance = new ArrayTypeMatchesArrays1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java new file mode 100644 index 00000000000..c3c3e9d3a4d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.BooleanJsonSchema; + +public class BooleanTypeMatchesBooleans extends BooleanJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class BooleanTypeMatchesBooleans1 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable BooleanTypeMatchesBooleans1 instance = null; + public static BooleanTypeMatchesBooleans1 getInstance() { + if (instance == null) { + instance = new BooleanTypeMatchesBooleans1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java new file mode 100644 index 00000000000..45a5b815b99 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java @@ -0,0 +1,328 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ByInt { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ByInt1Boxed permits ByInt1BoxedVoid, ByInt1BoxedBoolean, ByInt1BoxedNumber, ByInt1BoxedString, ByInt1BoxedList, ByInt1BoxedMap { + @Nullable Object getData(); + } + + public record ByInt1BoxedVoid(Void data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByInt1BoxedBoolean(boolean data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByInt1BoxedNumber(Number data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByInt1BoxedString(String data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByInt1BoxedList(FrozenList<@Nullable Object> data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByInt1BoxedMap(FrozenMap<@Nullable Object> data) implements ByInt1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ByInt1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ByInt1BoxedList>, MapSchemaValidator, ByInt1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ByInt1 instance = null; + + protected ByInt1() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static ByInt1 getInstance() { + if (instance == null) { + instance = new ByInt1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ByInt1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedVoid(validate(arg, configuration)); + } + @Override + public ByInt1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ByInt1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedNumber(validate(arg, configuration)); + } + @Override + public ByInt1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedString(validate(arg, configuration)); + } + @Override + public ByInt1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedList(validate(arg, configuration)); + } + @Override + public ByInt1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ByInt1BoxedMap(validate(arg, configuration)); + } + @Override + public ByInt1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java new file mode 100644 index 00000000000..d740e736c23 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java @@ -0,0 +1,328 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ByNumber { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ByNumber1Boxed permits ByNumber1BoxedVoid, ByNumber1BoxedBoolean, ByNumber1BoxedNumber, ByNumber1BoxedString, ByNumber1BoxedList, ByNumber1BoxedMap { + @Nullable Object getData(); + } + + public record ByNumber1BoxedVoid(Void data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByNumber1BoxedBoolean(boolean data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByNumber1BoxedNumber(Number data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByNumber1BoxedString(String data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByNumber1BoxedList(FrozenList<@Nullable Object> data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ByNumber1BoxedMap(FrozenMap<@Nullable Object> data) implements ByNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ByNumber1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ByNumber1BoxedList>, MapSchemaValidator, ByNumber1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ByNumber1 instance = null; + + protected ByNumber1() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("1.5")) + ); + } + + public static ByNumber1 getInstance() { + if (instance == null) { + instance = new ByNumber1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ByNumber1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedVoid(validate(arg, configuration)); + } + @Override + public ByNumber1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ByNumber1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedNumber(validate(arg, configuration)); + } + @Override + public ByNumber1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedString(validate(arg, configuration)); + } + @Override + public ByNumber1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedList(validate(arg, configuration)); + } + @Override + public ByNumber1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ByNumber1BoxedMap(validate(arg, configuration)); + } + @Override + public ByNumber1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java new file mode 100644 index 00000000000..e4059dfbec1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java @@ -0,0 +1,328 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class BySmallNumber { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface BySmallNumber1Boxed permits BySmallNumber1BoxedVoid, BySmallNumber1BoxedBoolean, BySmallNumber1BoxedNumber, BySmallNumber1BoxedString, BySmallNumber1BoxedList, BySmallNumber1BoxedMap { + @Nullable Object getData(); + } + + public record BySmallNumber1BoxedVoid(Void data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BySmallNumber1BoxedBoolean(boolean data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BySmallNumber1BoxedNumber(Number data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BySmallNumber1BoxedString(String data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BySmallNumber1BoxedList(FrozenList<@Nullable Object> data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BySmallNumber1BoxedMap(FrozenMap<@Nullable Object> data) implements BySmallNumber1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class BySmallNumber1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, BySmallNumber1BoxedList>, MapSchemaValidator, BySmallNumber1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable BySmallNumber1 instance = null; + + protected BySmallNumber1() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("0.00010")) + ); + } + + public static BySmallNumber1 getInstance() { + if (instance == null) { + instance = new BySmallNumber1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public BySmallNumber1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedVoid(validate(arg, configuration)); + } + @Override + public BySmallNumber1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedBoolean(validate(arg, configuration)); + } + @Override + public BySmallNumber1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedNumber(validate(arg, configuration)); + } + @Override + public BySmallNumber1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedString(validate(arg, configuration)); + } + @Override + public BySmallNumber1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedList(validate(arg, configuration)); + } + @Override + public BySmallNumber1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new BySmallNumber1BoxedMap(validate(arg, configuration)); + } + @Override + public BySmallNumber1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java new file mode 100644 index 00000000000..4ab141a836b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java @@ -0,0 +1,341 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ConstNulCharactersInStrings { + // nest classes so all schemas and input/output classes can be public + + public enum StringConstNulCharactersInStringsConst implements StringValueMethod { + HELLO_NULL_THERE("hello\0there"); + private final String value; + + StringConstNulCharactersInStringsConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface ConstNulCharactersInStrings1Boxed permits ConstNulCharactersInStrings1BoxedVoid, ConstNulCharactersInStrings1BoxedBoolean, ConstNulCharactersInStrings1BoxedNumber, ConstNulCharactersInStrings1BoxedString, ConstNulCharactersInStrings1BoxedList, ConstNulCharactersInStrings1BoxedMap { + @Nullable Object getData(); + } + + public record ConstNulCharactersInStrings1BoxedVoid(Void data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ConstNulCharactersInStrings1BoxedBoolean(boolean data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ConstNulCharactersInStrings1BoxedNumber(Number data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ConstNulCharactersInStrings1BoxedString(String data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ConstNulCharactersInStrings1BoxedList(FrozenList<@Nullable Object> data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ConstNulCharactersInStrings1BoxedMap(FrozenMap<@Nullable Object> data) implements ConstNulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ConstNulCharactersInStrings1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ConstNulCharactersInStrings1BoxedList>, MapSchemaValidator, ConstNulCharactersInStrings1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ConstNulCharactersInStrings1 instance = null; + + protected ConstNulCharactersInStrings1() { + super(new JsonSchemaInfo() + .constValue("hello\0there") + ); + } + + public static ConstNulCharactersInStrings1 getInstance() { + if (instance == null) { + instance = new ConstNulCharactersInStrings1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ConstNulCharactersInStrings1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedVoid(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedNumber(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedString(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedList(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ConstNulCharactersInStrings1BoxedMap(validate(arg, configuration)); + } + @Override + public ConstNulCharactersInStrings1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java new file mode 100644 index 00000000000..34efb44fa10 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java @@ -0,0 +1,612 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ContainsKeywordValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { + @Nullable Object getData(); + } + + public record ContainsBoxedVoid(Void data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedNumber(Number data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedString(String data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { + private static @Nullable Contains instance = null; + + protected Contains() { + super(new JsonSchemaInfo() + .minimum(5) + ); + } + + public static Contains getInstance() { + if (instance == null) { + instance = new Contains(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedVoid(validate(arg, configuration)); + } + @Override + public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedBoolean(validate(arg, configuration)); + } + @Override + public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedNumber(validate(arg, configuration)); + } + @Override + public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedString(validate(arg, configuration)); + } + @Override + public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedList(validate(arg, configuration)); + } + @Override + public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedMap(validate(arg, configuration)); + } + @Override + public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ContainsKeywordValidation1Boxed permits ContainsKeywordValidation1BoxedVoid, ContainsKeywordValidation1BoxedBoolean, ContainsKeywordValidation1BoxedNumber, ContainsKeywordValidation1BoxedString, ContainsKeywordValidation1BoxedList, ContainsKeywordValidation1BoxedMap { + @Nullable Object getData(); + } + + public record ContainsKeywordValidation1BoxedVoid(Void data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsKeywordValidation1BoxedBoolean(boolean data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsKeywordValidation1BoxedNumber(Number data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsKeywordValidation1BoxedString(String data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsKeywordValidation1BoxedList(FrozenList<@Nullable Object> data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsKeywordValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ContainsKeywordValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ContainsKeywordValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsKeywordValidation1BoxedList>, MapSchemaValidator, ContainsKeywordValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ContainsKeywordValidation1 instance = null; + + protected ContainsKeywordValidation1() { + super(new JsonSchemaInfo() + .contains(Contains.class) + ); + } + + public static ContainsKeywordValidation1 getInstance() { + if (instance == null) { + instance = new ContainsKeywordValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ContainsKeywordValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedString(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedList(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsKeywordValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public ContainsKeywordValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java new file mode 100644 index 00000000000..94656644bf4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java @@ -0,0 +1,339 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ContainsWithNullInstanceElements { + // nest classes so all schemas and input/output classes can be public + + + public static class Contains extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Contains instance = null; + public static Contains getInstance() { + if (instance == null) { + instance = new Contains(); + } + return instance; + } + } + + + public sealed interface ContainsWithNullInstanceElements1Boxed permits ContainsWithNullInstanceElements1BoxedVoid, ContainsWithNullInstanceElements1BoxedBoolean, ContainsWithNullInstanceElements1BoxedNumber, ContainsWithNullInstanceElements1BoxedString, ContainsWithNullInstanceElements1BoxedList, ContainsWithNullInstanceElements1BoxedMap { + @Nullable Object getData(); + } + + public record ContainsWithNullInstanceElements1BoxedVoid(Void data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsWithNullInstanceElements1BoxedBoolean(boolean data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsWithNullInstanceElements1BoxedNumber(Number data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsWithNullInstanceElements1BoxedString(String data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsWithNullInstanceElements1BoxedList(FrozenList<@Nullable Object> data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements ContainsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ContainsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsWithNullInstanceElements1BoxedList>, MapSchemaValidator, ContainsWithNullInstanceElements1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ContainsWithNullInstanceElements1 instance = null; + + protected ContainsWithNullInstanceElements1() { + super(new JsonSchemaInfo() + .contains(Contains.class) + ); + } + + public static ContainsWithNullInstanceElements1 getInstance() { + if (instance == null) { + instance = new ContainsWithNullInstanceElements1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ContainsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedString(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedList(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); + } + @Override + public ContainsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java new file mode 100644 index 00000000000..7b2e395efbb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DateFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface DateFormat1Boxed permits DateFormat1BoxedVoid, DateFormat1BoxedBoolean, DateFormat1BoxedNumber, DateFormat1BoxedString, DateFormat1BoxedList, DateFormat1BoxedMap { + @Nullable Object getData(); + } + + public record DateFormat1BoxedVoid(Void data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateFormat1BoxedBoolean(boolean data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateFormat1BoxedNumber(Number data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateFormat1BoxedString(String data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateFormat1BoxedList(FrozenList<@Nullable Object> data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DateFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DateFormat1BoxedList>, MapSchemaValidator, DateFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DateFormat1 instance = null; + + protected DateFormat1() { + super(new JsonSchemaInfo() + .format("date") + ); + } + + public static DateFormat1 getInstance() { + if (instance == null) { + instance = new DateFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DateFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public DateFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DateFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public DateFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedString(validate(arg, configuration)); + } + @Override + public DateFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedList(validate(arg, configuration)); + } + @Override + public DateFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DateFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public DateFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java new file mode 100644 index 00000000000..06d9e36ce0b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DateTimeFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface DateTimeFormat1Boxed permits DateTimeFormat1BoxedVoid, DateTimeFormat1BoxedBoolean, DateTimeFormat1BoxedNumber, DateTimeFormat1BoxedString, DateTimeFormat1BoxedList, DateTimeFormat1BoxedMap { + @Nullable Object getData(); + } + + public record DateTimeFormat1BoxedVoid(Void data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateTimeFormat1BoxedBoolean(boolean data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateTimeFormat1BoxedNumber(Number data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateTimeFormat1BoxedString(String data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateTimeFormat1BoxedList(FrozenList<@Nullable Object> data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DateTimeFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DateTimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DateTimeFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DateTimeFormat1BoxedList>, MapSchemaValidator, DateTimeFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DateTimeFormat1 instance = null; + + protected DateTimeFormat1() { + super(new JsonSchemaInfo() + .format("date-time") + ); + } + + public static DateTimeFormat1 getInstance() { + if (instance == null) { + instance = new DateTimeFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DateTimeFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public DateTimeFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DateTimeFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public DateTimeFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedString(validate(arg, configuration)); + } + @Override + public DateTimeFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedList(validate(arg, configuration)); + } + @Override + public DateTimeFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public DateTimeFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java new file mode 100644 index 00000000000..ac7c584bbe9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java @@ -0,0 +1,1018 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DependentSchemasDependenciesWithEscapedCharacters { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface FootbarBoxed permits FootbarBoxedVoid, FootbarBoxedBoolean, FootbarBoxedNumber, FootbarBoxedString, FootbarBoxedList, FootbarBoxedMap { + @Nullable Object getData(); + } + + public record FootbarBoxedVoid(Void data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FootbarBoxedBoolean(boolean data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FootbarBoxedNumber(Number data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FootbarBoxedString(String data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FootbarBoxedList(FrozenList<@Nullable Object> data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FootbarBoxedMap(FrozenMap<@Nullable Object> data) implements FootbarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Footbar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FootbarBoxedList>, MapSchemaValidator, FootbarBoxedMap> { + private static @Nullable Footbar instance = null; + + protected Footbar() { + super(new JsonSchemaInfo() + .minProperties(4) + ); + } + + public static Footbar getInstance() { + if (instance == null) { + instance = new Footbar(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FootbarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedVoid(validate(arg, configuration)); + } + @Override + public FootbarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedBoolean(validate(arg, configuration)); + } + @Override + public FootbarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedNumber(validate(arg, configuration)); + } + @Override + public FootbarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedString(validate(arg, configuration)); + } + @Override + public FootbarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedList(validate(arg, configuration)); + } + @Override + public FootbarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FootbarBoxedMap(validate(arg, configuration)); + } + @Override + public FootbarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class FoobarMap extends FrozenMap<@Nullable Object> { + protected FoobarMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo\"bar" + ); + public static final Set optionalKeys = Set.of(); + public static FoobarMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Foobar.getInstance().validate(arg, configuration); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoobar1 { + Map getInstance(); + T getBuilderAfterFoobar1(Map instance); + + default T fooReverseSolidusQuotationMarkBar(Void value) { + var instance = getInstance(); + instance.put("foo\"bar", null); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(boolean value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(String value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(int value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(float value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(long value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(double value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(List value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusQuotationMarkBar(Map value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar1(instance); + } + } + + public static class FoobarMap0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo\"bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public FoobarMap0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public FoobarMap0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class FoobarMapBuilder implements SetterForFoobar1 { + private final Map instance; + public FoobarMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public FoobarMap0Builder getBuilderAfterFoobar1(Map instance) { + return new FoobarMap0Builder(instance); + } + } + + + public sealed interface FoobarBoxed permits FoobarBoxedVoid, FoobarBoxedBoolean, FoobarBoxedNumber, FoobarBoxedString, FoobarBoxedList, FoobarBoxedMap { + @Nullable Object getData(); + } + + public record FoobarBoxedVoid(Void data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoobarBoxedBoolean(boolean data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoobarBoxedNumber(Number data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoobarBoxedString(String data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoobarBoxedList(FrozenList<@Nullable Object> data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoobarBoxedMap(FoobarMap data) implements FoobarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Foobar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FoobarBoxedList>, MapSchemaValidator { + private static @Nullable Foobar instance = null; + + protected Foobar() { + super(new JsonSchemaInfo() + .required(Set.of( + "foo\"bar" + )) + ); + } + + public static Foobar getInstance() { + if (instance == null) { + instance = new Foobar(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FoobarMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new FoobarMap(castProperties); + } + + public FoobarMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FoobarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedVoid(validate(arg, configuration)); + } + @Override + public FoobarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedBoolean(validate(arg, configuration)); + } + @Override + public FoobarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedNumber(validate(arg, configuration)); + } + @Override + public FoobarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedString(validate(arg, configuration)); + } + @Override + public FoobarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedList(validate(arg, configuration)); + } + @Override + public FoobarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FoobarBoxedMap(validate(arg, configuration)); + } + @Override + public FoobarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface DependentSchemasDependenciesWithEscapedCharacters1Boxed permits DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid, DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean, DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber, DependentSchemasDependenciesWithEscapedCharacters1BoxedString, DependentSchemasDependenciesWithEscapedCharacters1BoxedList, DependentSchemasDependenciesWithEscapedCharacters1BoxedMap { + @Nullable Object getData(); + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid(Void data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean(boolean data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber(Number data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedString(String data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependenciesWithEscapedCharacters1BoxedMap(FrozenMap<@Nullable Object> data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DependentSchemasDependenciesWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasDependenciesWithEscapedCharacters1BoxedList>, MapSchemaValidator, DependentSchemasDependenciesWithEscapedCharacters1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DependentSchemasDependenciesWithEscapedCharacters1 instance = null; + + protected DependentSchemasDependenciesWithEscapedCharacters1() { + super(new JsonSchemaInfo() + .dependentSchemas(Map.ofEntries( + new PropertyEntry("foo\tbar", Footbar.class), + new PropertyEntry("foo'bar", Foobar.class) + )) + ); + } + + public static DependentSchemasDependenciesWithEscapedCharacters1 getInstance() { + if (instance == null) { + instance = new DependentSchemasDependenciesWithEscapedCharacters1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedString(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedList(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependenciesWithEscapedCharacters1BoxedMap(validate(arg, configuration)); + } + @Override + public DependentSchemasDependenciesWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java new file mode 100644 index 00000000000..a1ac2622688 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java @@ -0,0 +1,672 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NotAnyTypeJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DependentSchemasDependentSubschemaIncompatibleWithRoot { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { + // NotAnyTypeSchema + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class FooMap extends FrozenMap<@Nullable Object> { + protected FooMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "bar" + ); + public static FooMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Foo1.getInstance().validate(arg, configuration); + } + + public @Nullable Object bar() throws UnsetPropertyException { + return getOrThrow("bar"); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(Void value) { + var instance = getInstance(); + instance.put("bar", null); + return getBuilderAfterBar(instance); + } + + default T bar(boolean value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(List value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(Map value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class FooMapBuilder1 implements GenericBuilder>, SetterForBar { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public FooMapBuilder1() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public FooMapBuilder1 getBuilderAfterBar(Map instance) { + return this; + } + } + + + public sealed interface Foo1Boxed permits Foo1BoxedMap { + @Nullable Object getData(); + } + + public record Foo1BoxedMap(FooMap data) implements Foo1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Foo1 extends JsonSchema implements MapSchemaValidator { + private static @Nullable Foo1 instance = null; + + protected Foo1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + .additionalProperties(AdditionalProperties.class) + ); + } + + public static Foo1 getInstance() { + if (instance == null) { + instance = new Foo1(); + } + return instance; + } + + public FooMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new FooMap(castProperties); + } + + public FooMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Foo1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Foo1BoxedMap(validate(arg, configuration)); + } + @Override + public Foo1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class DependentSchemasDependentSubschemaIncompatibleWithRootMap extends FrozenMap<@Nullable Object> { + protected DependentSchemasDependentSubschemaIncompatibleWithRootMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static DependentSchemasDependentSubschemaIncompatibleWithRootMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed permits DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap { + @Nullable Object getData(); + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid(Void data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean(boolean data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber(Number data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString(String data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap(DependentSchemasDependentSubschemaIncompatibleWithRootMap data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DependentSchemasDependentSubschemaIncompatibleWithRoot1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DependentSchemasDependentSubschemaIncompatibleWithRoot1 instance = null; + + protected DependentSchemasDependentSubschemaIncompatibleWithRoot1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .dependentSchemas(Map.ofEntries( + new PropertyEntry("foo", Foo1.class) + )) + ); + } + + public static DependentSchemasDependentSubschemaIncompatibleWithRoot1 getInstance() { + if (instance == null) { + instance = new DependentSchemasDependentSubschemaIncompatibleWithRoot1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRootMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new DependentSchemasDependentSubschemaIncompatibleWithRootMap(castProperties); + } + + public DependentSchemasDependentSubschemaIncompatibleWithRootMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap(validate(arg, configuration)); + } + @Override + public DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java new file mode 100644 index 00000000000..243b1117529 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java @@ -0,0 +1,770 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DependentSchemasSingleDependency { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Bar1 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Bar1 instance = null; + public static Bar1 getInstance() { + if (instance == null) { + instance = new Bar1(); + } + return instance; + } + } + + + public static class BarMap extends FrozenMap<@Nullable Object> { + protected BarMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo", + "bar" + ); + public static BarMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Bar.getInstance().validate(arg, configuration); + } + + public Number foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (Number) value; + } + + public Number bar() throws UnsetPropertyException { + String key = "bar"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar1 { + Map getInstance(); + T getBuilderAfterBar1(Map instance); + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar1(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar1(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar1(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar1(instance); + } + } + + public static class BarMapBuilder1 extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar1 { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public BarMapBuilder1() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public BarMapBuilder1 getBuilderAfterFoo(Map instance) { + return this; + } + public BarMapBuilder1 getBuilderAfterBar1(Map instance) { + return this; + } + public BarMapBuilder1 getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface BarBoxed permits BarBoxedVoid, BarBoxedBoolean, BarBoxedNumber, BarBoxedString, BarBoxedList, BarBoxedMap { + @Nullable Object getData(); + } + + public record BarBoxedVoid(Void data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BarBoxedBoolean(boolean data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BarBoxedNumber(Number data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BarBoxedString(String data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BarBoxedList(FrozenList<@Nullable Object> data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record BarBoxedMap(BarMap data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Bar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, BarBoxedList>, MapSchemaValidator { + private static @Nullable Bar instance = null; + + protected Bar() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar1.class) + )) + ); + } + + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public BarMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new BarMap(castProperties); + } + + public BarMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public BarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedVoid(validate(arg, configuration)); + } + @Override + public BarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedBoolean(validate(arg, configuration)); + } + @Override + public BarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedNumber(validate(arg, configuration)); + } + @Override + public BarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedString(validate(arg, configuration)); + } + @Override + public BarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedList(validate(arg, configuration)); + } + @Override + public BarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedMap(validate(arg, configuration)); + } + @Override + public BarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface DependentSchemasSingleDependency1Boxed permits DependentSchemasSingleDependency1BoxedVoid, DependentSchemasSingleDependency1BoxedBoolean, DependentSchemasSingleDependency1BoxedNumber, DependentSchemasSingleDependency1BoxedString, DependentSchemasSingleDependency1BoxedList, DependentSchemasSingleDependency1BoxedMap { + @Nullable Object getData(); + } + + public record DependentSchemasSingleDependency1BoxedVoid(Void data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasSingleDependency1BoxedBoolean(boolean data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasSingleDependency1BoxedNumber(Number data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasSingleDependency1BoxedString(String data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasSingleDependency1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DependentSchemasSingleDependency1BoxedMap(FrozenMap<@Nullable Object> data) implements DependentSchemasSingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DependentSchemasSingleDependency1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasSingleDependency1BoxedList>, MapSchemaValidator, DependentSchemasSingleDependency1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DependentSchemasSingleDependency1 instance = null; + + protected DependentSchemasSingleDependency1() { + super(new JsonSchemaInfo() + .dependentSchemas(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + ); + } + + public static DependentSchemasSingleDependency1 getInstance() { + if (instance == null) { + instance = new DependentSchemasSingleDependency1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DependentSchemasSingleDependency1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedVoid(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedNumber(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedString(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedList(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DependentSchemasSingleDependency1BoxedMap(validate(arg, configuration)); + } + @Override + public DependentSchemasSingleDependency1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java new file mode 100644 index 00000000000..f53210d9a21 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class DurationFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface DurationFormat1Boxed permits DurationFormat1BoxedVoid, DurationFormat1BoxedBoolean, DurationFormat1BoxedNumber, DurationFormat1BoxedString, DurationFormat1BoxedList, DurationFormat1BoxedMap { + @Nullable Object getData(); + } + + public record DurationFormat1BoxedVoid(Void data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DurationFormat1BoxedBoolean(boolean data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DurationFormat1BoxedNumber(Number data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DurationFormat1BoxedString(String data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DurationFormat1BoxedList(FrozenList<@Nullable Object> data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record DurationFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DurationFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class DurationFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DurationFormat1BoxedList>, MapSchemaValidator, DurationFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable DurationFormat1 instance = null; + + protected DurationFormat1() { + super(new JsonSchemaInfo() + .format("duration") + ); + } + + public static DurationFormat1 getInstance() { + if (instance == null) { + instance = new DurationFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public DurationFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public DurationFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public DurationFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public DurationFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedString(validate(arg, configuration)); + } + @Override + public DurationFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedList(validate(arg, configuration)); + } + @Override + public DurationFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DurationFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public DurationFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java new file mode 100644 index 00000000000..50f340981a8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EmailFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface EmailFormat1Boxed permits EmailFormat1BoxedVoid, EmailFormat1BoxedBoolean, EmailFormat1BoxedNumber, EmailFormat1BoxedString, EmailFormat1BoxedList, EmailFormat1BoxedMap { + @Nullable Object getData(); + } + + public record EmailFormat1BoxedVoid(Void data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmailFormat1BoxedBoolean(boolean data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmailFormat1BoxedNumber(Number data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmailFormat1BoxedString(String data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmailFormat1BoxedList(FrozenList<@Nullable Object> data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmailFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements EmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class EmailFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, EmailFormat1BoxedList>, MapSchemaValidator, EmailFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EmailFormat1 instance = null; + + protected EmailFormat1() { + super(new JsonSchemaInfo() + .format("email") + ); + } + + public static EmailFormat1 getInstance() { + if (instance == null) { + instance = new EmailFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EmailFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public EmailFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public EmailFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public EmailFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedString(validate(arg, configuration)); + } + @Override + public EmailFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedList(validate(arg, configuration)); + } + @Override + public EmailFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new EmailFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public EmailFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java new file mode 100644 index 00000000000..130cc394a7e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java @@ -0,0 +1,336 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EmptyDependents { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface EmptyDependents1Boxed permits EmptyDependents1BoxedVoid, EmptyDependents1BoxedBoolean, EmptyDependents1BoxedNumber, EmptyDependents1BoxedString, EmptyDependents1BoxedList, EmptyDependents1BoxedMap { + @Nullable Object getData(); + } + + public record EmptyDependents1BoxedVoid(Void data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmptyDependents1BoxedBoolean(boolean data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmptyDependents1BoxedNumber(Number data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmptyDependents1BoxedString(String data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmptyDependents1BoxedList(FrozenList<@Nullable Object> data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record EmptyDependents1BoxedMap(FrozenMap<@Nullable Object> data) implements EmptyDependents1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class EmptyDependents1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, EmptyDependents1BoxedList>, MapSchemaValidator, EmptyDependents1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EmptyDependents1 instance = null; + + protected EmptyDependents1() { + super(new JsonSchemaInfo() + .dependentRequired(MapUtils.makeMap( + new AbstractMap.SimpleEntry<>( + "bar", + SetMaker.makeSet( + ) + ) + )) + ); + } + + public static EmptyDependents1 getInstance() { + if (instance == null) { + instance = new EmptyDependents1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EmptyDependents1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedVoid(validate(arg, configuration)); + } + @Override + public EmptyDependents1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedBoolean(validate(arg, configuration)); + } + @Override + public EmptyDependents1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedNumber(validate(arg, configuration)); + } + @Override + public EmptyDependents1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedString(validate(arg, configuration)); + } + @Override + public EmptyDependents1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedList(validate(arg, configuration)); + } + @Override + public EmptyDependents1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new EmptyDependents1BoxedMap(validate(arg, configuration)); + } + @Override + public EmptyDependents1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java new file mode 100644 index 00000000000..6ef97970a39 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java @@ -0,0 +1,195 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.DoubleEnumValidator; +import unit_test_api.schemas.validation.DoubleValueMethod; +import unit_test_api.schemas.validation.FloatEnumValidator; +import unit_test_api.schemas.validation.FloatValueMethod; +import unit_test_api.schemas.validation.IntegerEnumValidator; +import unit_test_api.schemas.validation.IntegerValueMethod; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.LongEnumValidator; +import unit_test_api.schemas.validation.LongValueMethod; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumWith0DoesNotMatchFalse { + // nest classes so all schemas and input/output classes can be public + + public enum IntegerEnumWith0DoesNotMatchFalseEnums implements IntegerValueMethod { + POSITIVE_0(0); + private final int value; + + IntegerEnumWith0DoesNotMatchFalseEnums(int value) { + this.value = value; + } + public int value() { + return this.value; + } + } + + public enum LongEnumWith0DoesNotMatchFalseEnums implements LongValueMethod { + POSITIVE_0(0L); + private final long value; + + LongEnumWith0DoesNotMatchFalseEnums(long value) { + this.value = value; + } + public long value() { + return this.value; + } + } + + public enum FloatEnumWith0DoesNotMatchFalseEnums implements FloatValueMethod { + POSITIVE_0(0.0f); + private final float value; + + FloatEnumWith0DoesNotMatchFalseEnums(float value) { + this.value = value; + } + public float value() { + return this.value; + } + } + + public enum DoubleEnumWith0DoesNotMatchFalseEnums implements DoubleValueMethod { + POSITIVE_0(0.0d); + private final double value; + + DoubleEnumWith0DoesNotMatchFalseEnums(double value) { + this.value = value; + } + public double value() { + return this.value; + } + } + + + public sealed interface EnumWith0DoesNotMatchFalse1Boxed permits EnumWith0DoesNotMatchFalse1BoxedNumber { + @Nullable Object getData(); + } + + public record EnumWith0DoesNotMatchFalse1BoxedNumber(Number data) implements EnumWith0DoesNotMatchFalse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class EnumWith0DoesNotMatchFalse1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumWith0DoesNotMatchFalse1 instance = null; + + protected EnumWith0DoesNotMatchFalse1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .enumValues(SetMaker.makeSet( + new BigDecimal("0") + )) + ); + } + + public static EnumWith0DoesNotMatchFalse1 getInstance() { + if (instance == null) { + instance = new EnumWith0DoesNotMatchFalse1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public int validate(IntegerEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg.value(), configuration); + } + + @Override + public long validate(LongEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg.value(), configuration); + } + + @Override + public float validate(FloatEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg.value(), configuration); + } + + @Override + public double validate(DoubleEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumWith0DoesNotMatchFalse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumWith0DoesNotMatchFalse1BoxedNumber(validate(arg, configuration)); + } + @Override + public EnumWith0DoesNotMatchFalse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java new file mode 100644 index 00000000000..cf2de6dab3a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java @@ -0,0 +1,195 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.DoubleEnumValidator; +import unit_test_api.schemas.validation.DoubleValueMethod; +import unit_test_api.schemas.validation.FloatEnumValidator; +import unit_test_api.schemas.validation.FloatValueMethod; +import unit_test_api.schemas.validation.IntegerEnumValidator; +import unit_test_api.schemas.validation.IntegerValueMethod; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.LongEnumValidator; +import unit_test_api.schemas.validation.LongValueMethod; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumWith1DoesNotMatchTrue { + // nest classes so all schemas and input/output classes can be public + + public enum IntegerEnumWith1DoesNotMatchTrueEnums implements IntegerValueMethod { + POSITIVE_1(1); + private final int value; + + IntegerEnumWith1DoesNotMatchTrueEnums(int value) { + this.value = value; + } + public int value() { + return this.value; + } + } + + public enum LongEnumWith1DoesNotMatchTrueEnums implements LongValueMethod { + POSITIVE_1(1L); + private final long value; + + LongEnumWith1DoesNotMatchTrueEnums(long value) { + this.value = value; + } + public long value() { + return this.value; + } + } + + public enum FloatEnumWith1DoesNotMatchTrueEnums implements FloatValueMethod { + POSITIVE_1(1.0f); + private final float value; + + FloatEnumWith1DoesNotMatchTrueEnums(float value) { + this.value = value; + } + public float value() { + return this.value; + } + } + + public enum DoubleEnumWith1DoesNotMatchTrueEnums implements DoubleValueMethod { + POSITIVE_1(1.0d); + private final double value; + + DoubleEnumWith1DoesNotMatchTrueEnums(double value) { + this.value = value; + } + public double value() { + return this.value; + } + } + + + public sealed interface EnumWith1DoesNotMatchTrue1Boxed permits EnumWith1DoesNotMatchTrue1BoxedNumber { + @Nullable Object getData(); + } + + public record EnumWith1DoesNotMatchTrue1BoxedNumber(Number data) implements EnumWith1DoesNotMatchTrue1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class EnumWith1DoesNotMatchTrue1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumWith1DoesNotMatchTrue1 instance = null; + + protected EnumWith1DoesNotMatchTrue1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .enumValues(SetMaker.makeSet( + new BigDecimal("1") + )) + ); + } + + public static EnumWith1DoesNotMatchTrue1 getInstance() { + if (instance == null) { + instance = new EnumWith1DoesNotMatchTrue1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public int validate(IntegerEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg.value(), configuration); + } + + @Override + public long validate(LongEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg.value(), configuration); + } + + @Override + public float validate(FloatEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg.value(), configuration); + } + + @Override + public double validate(DoubleEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumWith1DoesNotMatchTrue1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumWith1DoesNotMatchTrue1BoxedNumber(validate(arg, configuration)); + } + @Override + public EnumWith1DoesNotMatchTrue1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java new file mode 100644 index 00000000000..4dba24f82c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java @@ -0,0 +1,120 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumWithEscapedCharacters { + // nest classes so all schemas and input/output classes can be public + + public enum StringEnumWithEscapedCharactersEnums implements StringValueMethod { + FOO_LINE_FEED_LF_BAR("foo\nbar"), + FOO_CARRIAGE_RETURN_CR_BAR("foo\rbar"); + private final String value; + + StringEnumWithEscapedCharactersEnums(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface EnumWithEscapedCharacters1Boxed permits EnumWithEscapedCharacters1BoxedString { + @Nullable Object getData(); + } + + public record EnumWithEscapedCharacters1BoxedString(String data) implements EnumWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class EnumWithEscapedCharacters1 extends JsonSchema implements StringSchemaValidator, StringEnumValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumWithEscapedCharacters1 instance = null; + + protected EnumWithEscapedCharacters1() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .enumValues(SetMaker.makeSet( + "foo\nbar", + "foo\rbar" + )) + ); + } + + public static EnumWithEscapedCharacters1 getInstance() { + if (instance == null) { + instance = new EnumWithEscapedCharacters1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public String validate(StringEnumWithEscapedCharactersEnums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumWithEscapedCharacters1BoxedString(validate(arg, configuration)); + } + @Override + public EnumWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java new file mode 100644 index 00000000000..8a150ba6bd7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java @@ -0,0 +1,119 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.BooleanEnumValidator; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.BooleanValueMethod; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumWithFalseDoesNotMatch0 { + // nest classes so all schemas and input/output classes can be public + + public enum BooleanEnumWithFalseDoesNotMatch0Enums implements BooleanValueMethod { + FALSE(false); + private final boolean value; + + BooleanEnumWithFalseDoesNotMatch0Enums(boolean value) { + this.value = value; + } + public boolean value() { + return this.value; + } + } + + + public sealed interface EnumWithFalseDoesNotMatch01Boxed permits EnumWithFalseDoesNotMatch01BoxedBoolean { + @Nullable Object getData(); + } + + public record EnumWithFalseDoesNotMatch01BoxedBoolean(boolean data) implements EnumWithFalseDoesNotMatch01Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class EnumWithFalseDoesNotMatch01 extends JsonSchema implements BooleanSchemaValidator, BooleanEnumValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumWithFalseDoesNotMatch01 instance = null; + + protected EnumWithFalseDoesNotMatch01() { + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + .enumValues(SetMaker.makeSet( + false + )) + ); + } + + public static EnumWithFalseDoesNotMatch01 getInstance() { + if (instance == null) { + instance = new EnumWithFalseDoesNotMatch01(); + } + return instance; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(BooleanEnumWithFalseDoesNotMatch0Enums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumWithFalseDoesNotMatch01BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumWithFalseDoesNotMatch01BoxedBoolean(validate(arg, configuration)); + } + @Override + public EnumWithFalseDoesNotMatch01Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java new file mode 100644 index 00000000000..4c9dfa693f4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java @@ -0,0 +1,119 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.BooleanEnumValidator; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.BooleanValueMethod; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumWithTrueDoesNotMatch1 { + // nest classes so all schemas and input/output classes can be public + + public enum BooleanEnumWithTrueDoesNotMatch1Enums implements BooleanValueMethod { + TRUE(true); + private final boolean value; + + BooleanEnumWithTrueDoesNotMatch1Enums(boolean value) { + this.value = value; + } + public boolean value() { + return this.value; + } + } + + + public sealed interface EnumWithTrueDoesNotMatch11Boxed permits EnumWithTrueDoesNotMatch11BoxedBoolean { + @Nullable Object getData(); + } + + public record EnumWithTrueDoesNotMatch11BoxedBoolean(boolean data) implements EnumWithTrueDoesNotMatch11Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class EnumWithTrueDoesNotMatch11 extends JsonSchema implements BooleanSchemaValidator, BooleanEnumValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumWithTrueDoesNotMatch11 instance = null; + + protected EnumWithTrueDoesNotMatch11() { + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + .enumValues(SetMaker.makeSet( + true + )) + ); + } + + public static EnumWithTrueDoesNotMatch11 getInstance() { + if (instance == null) { + instance = new EnumWithTrueDoesNotMatch11(); + } + return instance; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(BooleanEnumWithTrueDoesNotMatch1Enums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumWithTrueDoesNotMatch11BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumWithTrueDoesNotMatch11BoxedBoolean(validate(arg, configuration)); + } + @Override + public EnumWithTrueDoesNotMatch11Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java new file mode 100644 index 00000000000..d17cd9617bf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java @@ -0,0 +1,427 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class EnumsInProperties { + // nest classes so all schemas and input/output classes can be public + + public enum StringFooEnums implements StringValueMethod { + FOO("foo"); + private final String value; + + StringFooEnums(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface FooBoxed permits FooBoxedString { + @Nullable Object getData(); + } + + public record FooBoxedString(String data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Foo extends JsonSchema implements StringSchemaValidator, StringEnumValidator { + private static @Nullable Foo instance = null; + + protected Foo() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .enumValues(SetMaker.makeSet( + "foo" + )) + ); + } + + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public String validate(StringFooEnums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FooBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedString(validate(arg, configuration)); + } + @Override + public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + public enum StringBarEnums implements StringValueMethod { + BAR("bar"); + private final String value; + + StringBarEnums(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface BarBoxed permits BarBoxedString { + @Nullable Object getData(); + } + + public record BarBoxedString(String data) implements BarBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Bar extends JsonSchema implements StringSchemaValidator, StringEnumValidator { + private static @Nullable Bar instance = null; + + protected Bar() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .enumValues(SetMaker.makeSet( + "bar" + )) + ); + } + + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public String validate(StringBarEnums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public BarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new BarBoxedString(validate(arg, configuration)); + } + @Override + public BarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class EnumsInPropertiesMap extends FrozenMap<@Nullable Object> { + protected EnumsInPropertiesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar" + ); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static EnumsInPropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return EnumsInProperties1.getInstance().validate(arg, configuration); + } + + public String bar() { + @Nullable Object value = get("bar"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (String) value; + } + + public String foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(StringBarEnums value) { + var instance = getInstance(); + instance.put("bar", value.value()); + return getBuilderAfterBar(instance); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(StringFooEnums value) { + var instance = getInstance(); + instance.put("foo", value.value()); + return getBuilderAfterFoo(instance); + } + } + + public static class EnumsInPropertiesMap0Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar", + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public EnumsInPropertiesMap0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public EnumsInPropertiesMap0Builder getBuilderAfterFoo(Map instance) { + return this; + } + public EnumsInPropertiesMap0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class EnumsInPropertiesMapBuilder implements SetterForBar { + private final Map instance; + public EnumsInPropertiesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public EnumsInPropertiesMap0Builder getBuilderAfterBar(Map instance) { + return new EnumsInPropertiesMap0Builder(instance); + } + } + + + public sealed interface EnumsInProperties1Boxed permits EnumsInProperties1BoxedMap { + @Nullable Object getData(); + } + + public record EnumsInProperties1BoxedMap(EnumsInPropertiesMap data) implements EnumsInProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class EnumsInProperties1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable EnumsInProperties1 instance = null; + + protected EnumsInProperties1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "bar" + )) + ); + } + + public static EnumsInProperties1 getInstance() { + if (instance == null) { + instance = new EnumsInProperties1(); + } + return instance; + } + + public EnumsInPropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new EnumsInPropertiesMap(castProperties); + } + + public EnumsInPropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public EnumsInProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new EnumsInProperties1BoxedMap(validate(arg, configuration)); + } + @Override + public EnumsInProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java new file mode 100644 index 00000000000..213f0407936 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ExclusivemaximumValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ExclusivemaximumValidation1Boxed permits ExclusivemaximumValidation1BoxedVoid, ExclusivemaximumValidation1BoxedBoolean, ExclusivemaximumValidation1BoxedNumber, ExclusivemaximumValidation1BoxedString, ExclusivemaximumValidation1BoxedList, ExclusivemaximumValidation1BoxedMap { + @Nullable Object getData(); + } + + public record ExclusivemaximumValidation1BoxedVoid(Void data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusivemaximumValidation1BoxedBoolean(boolean data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusivemaximumValidation1BoxedNumber(Number data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusivemaximumValidation1BoxedString(String data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusivemaximumValidation1BoxedList(FrozenList<@Nullable Object> data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusivemaximumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ExclusivemaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ExclusivemaximumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ExclusivemaximumValidation1BoxedList>, MapSchemaValidator, ExclusivemaximumValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ExclusivemaximumValidation1 instance = null; + + protected ExclusivemaximumValidation1() { + super(new JsonSchemaInfo() + .exclusiveMaximum(3.0) + ); + } + + public static ExclusivemaximumValidation1 getInstance() { + if (instance == null) { + instance = new ExclusivemaximumValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ExclusivemaximumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedString(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedList(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusivemaximumValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public ExclusivemaximumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java new file mode 100644 index 00000000000..d943127b117 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ExclusiveminimumValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ExclusiveminimumValidation1Boxed permits ExclusiveminimumValidation1BoxedVoid, ExclusiveminimumValidation1BoxedBoolean, ExclusiveminimumValidation1BoxedNumber, ExclusiveminimumValidation1BoxedString, ExclusiveminimumValidation1BoxedList, ExclusiveminimumValidation1BoxedMap { + @Nullable Object getData(); + } + + public record ExclusiveminimumValidation1BoxedVoid(Void data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusiveminimumValidation1BoxedBoolean(boolean data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusiveminimumValidation1BoxedNumber(Number data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusiveminimumValidation1BoxedString(String data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusiveminimumValidation1BoxedList(FrozenList<@Nullable Object> data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ExclusiveminimumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ExclusiveminimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ExclusiveminimumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ExclusiveminimumValidation1BoxedList>, MapSchemaValidator, ExclusiveminimumValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ExclusiveminimumValidation1 instance = null; + + protected ExclusiveminimumValidation1() { + super(new JsonSchemaInfo() + .exclusiveMinimum(1.1) + ); + } + + public static ExclusiveminimumValidation1 getInstance() { + if (instance == null) { + instance = new ExclusiveminimumValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ExclusiveminimumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedString(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedList(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ExclusiveminimumValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public ExclusiveminimumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java new file mode 100644 index 00000000000..8890a29029b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java @@ -0,0 +1,117 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class FloatDivisionInf { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface FloatDivisionInf1Boxed permits FloatDivisionInf1BoxedNumber { + @Nullable Object getData(); + } + + public record FloatDivisionInf1BoxedNumber(Number data) implements FloatDivisionInf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class FloatDivisionInf1 extends JsonSchema implements NumberSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable FloatDivisionInf1 instance = null; + + protected FloatDivisionInf1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + .multipleOf(new BigDecimal("0.123456789")) + ); + } + + public static FloatDivisionInf1 getInstance() { + if (instance == null) { + instance = new FloatDivisionInf1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FloatDivisionInf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatDivisionInf1BoxedNumber(validate(arg, configuration)); + } + @Override + public FloatDivisionInf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java new file mode 100644 index 00000000000..edac4ff8637 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java @@ -0,0 +1,735 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ForbiddenProperty { + // nest classes so all schemas and input/output classes can be public + + + public static class Not extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Not instance = null; + public static Not getInstance() { + if (instance == null) { + instance = new Not(); + } + return instance; + } + } + + + public sealed interface FooBoxed permits FooBoxedVoid, FooBoxedBoolean, FooBoxedNumber, FooBoxedString, FooBoxedList, FooBoxedMap { + @Nullable Object getData(); + } + + public record FooBoxedVoid(Void data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FooBoxedBoolean(boolean data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FooBoxedNumber(Number data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FooBoxedString(String data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FooBoxedList(FrozenList<@Nullable Object> data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FooBoxedMap(FrozenMap<@Nullable Object> data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Foo extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FooBoxedList>, MapSchemaValidator, FooBoxedMap> { + private static @Nullable Foo instance = null; + + protected Foo() { + super(new JsonSchemaInfo() + .not(Not.class) + ); + } + + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FooBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedVoid(validate(arg, configuration)); + } + @Override + public FooBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedBoolean(validate(arg, configuration)); + } + @Override + public FooBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedNumber(validate(arg, configuration)); + } + @Override + public FooBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedString(validate(arg, configuration)); + } + @Override + public FooBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedList(validate(arg, configuration)); + } + @Override + public FooBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedMap(validate(arg, configuration)); + } + @Override + public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ForbiddenPropertyMap extends FrozenMap<@Nullable Object> { + protected ForbiddenPropertyMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static ForbiddenPropertyMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return ForbiddenProperty1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class ForbiddenPropertyMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public ForbiddenPropertyMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public ForbiddenPropertyMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public ForbiddenPropertyMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface ForbiddenProperty1Boxed permits ForbiddenProperty1BoxedVoid, ForbiddenProperty1BoxedBoolean, ForbiddenProperty1BoxedNumber, ForbiddenProperty1BoxedString, ForbiddenProperty1BoxedList, ForbiddenProperty1BoxedMap { + @Nullable Object getData(); + } + + public record ForbiddenProperty1BoxedVoid(Void data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ForbiddenProperty1BoxedBoolean(boolean data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ForbiddenProperty1BoxedNumber(Number data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ForbiddenProperty1BoxedString(String data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ForbiddenProperty1BoxedList(FrozenList<@Nullable Object> data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ForbiddenProperty1BoxedMap(ForbiddenPropertyMap data) implements ForbiddenProperty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ForbiddenProperty1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ForbiddenProperty1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ForbiddenProperty1 instance = null; + + protected ForbiddenProperty1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static ForbiddenProperty1 getInstance() { + if (instance == null) { + instance = new ForbiddenProperty1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ForbiddenPropertyMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new ForbiddenPropertyMap(castProperties); + } + + public ForbiddenPropertyMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ForbiddenProperty1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedVoid(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedNumber(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedString(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedList(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ForbiddenProperty1BoxedMap(validate(arg, configuration)); + } + @Override + public ForbiddenProperty1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java new file mode 100644 index 00000000000..fec49e585f6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class HostnameFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface HostnameFormat1Boxed permits HostnameFormat1BoxedVoid, HostnameFormat1BoxedBoolean, HostnameFormat1BoxedNumber, HostnameFormat1BoxedString, HostnameFormat1BoxedList, HostnameFormat1BoxedMap { + @Nullable Object getData(); + } + + public record HostnameFormat1BoxedVoid(Void data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record HostnameFormat1BoxedBoolean(boolean data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record HostnameFormat1BoxedNumber(Number data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record HostnameFormat1BoxedString(String data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record HostnameFormat1BoxedList(FrozenList<@Nullable Object> data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record HostnameFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements HostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class HostnameFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, HostnameFormat1BoxedList>, MapSchemaValidator, HostnameFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable HostnameFormat1 instance = null; + + protected HostnameFormat1() { + super(new JsonSchemaInfo() + .format("hostname") + ); + } + + public static HostnameFormat1 getInstance() { + if (instance == null) { + instance = new HostnameFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public HostnameFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public HostnameFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public HostnameFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public HostnameFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedString(validate(arg, configuration)); + } + @Override + public HostnameFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedList(validate(arg, configuration)); + } + @Override + public HostnameFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new HostnameFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public HostnameFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java new file mode 100644 index 00000000000..3ffec73ebba --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IdnEmailFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IdnEmailFormat1Boxed permits IdnEmailFormat1BoxedVoid, IdnEmailFormat1BoxedBoolean, IdnEmailFormat1BoxedNumber, IdnEmailFormat1BoxedString, IdnEmailFormat1BoxedList, IdnEmailFormat1BoxedMap { + @Nullable Object getData(); + } + + public record IdnEmailFormat1BoxedVoid(Void data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnEmailFormat1BoxedBoolean(boolean data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnEmailFormat1BoxedNumber(Number data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnEmailFormat1BoxedString(String data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnEmailFormat1BoxedList(FrozenList<@Nullable Object> data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnEmailFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IdnEmailFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IdnEmailFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IdnEmailFormat1BoxedList>, MapSchemaValidator, IdnEmailFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IdnEmailFormat1 instance = null; + + protected IdnEmailFormat1() { + super(new JsonSchemaInfo() + .format("idn-email") + ); + } + + public static IdnEmailFormat1 getInstance() { + if (instance == null) { + instance = new IdnEmailFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IdnEmailFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedString(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedList(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnEmailFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public IdnEmailFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java new file mode 100644 index 00000000000..3262408bf70 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IdnHostnameFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IdnHostnameFormat1Boxed permits IdnHostnameFormat1BoxedVoid, IdnHostnameFormat1BoxedBoolean, IdnHostnameFormat1BoxedNumber, IdnHostnameFormat1BoxedString, IdnHostnameFormat1BoxedList, IdnHostnameFormat1BoxedMap { + @Nullable Object getData(); + } + + public record IdnHostnameFormat1BoxedVoid(Void data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnHostnameFormat1BoxedBoolean(boolean data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnHostnameFormat1BoxedNumber(Number data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnHostnameFormat1BoxedString(String data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnHostnameFormat1BoxedList(FrozenList<@Nullable Object> data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IdnHostnameFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IdnHostnameFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IdnHostnameFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IdnHostnameFormat1BoxedList>, MapSchemaValidator, IdnHostnameFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IdnHostnameFormat1 instance = null; + + protected IdnHostnameFormat1() { + super(new JsonSchemaInfo() + .format("idn-hostname") + ); + } + + public static IdnHostnameFormat1 getInstance() { + if (instance == null) { + instance = new IdnHostnameFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IdnHostnameFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedString(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedList(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IdnHostnameFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public IdnHostnameFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java new file mode 100644 index 00000000000..ee77c3c67cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java @@ -0,0 +1,899 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IfAndElseWithoutThen { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + @Nullable Object getData(); + } + + public record ElseBoxedVoid(Void data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedNumber(Number data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedString(String data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; + + protected Else() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Else getInstance() { + if (instance == null) { + instance = new Else(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); + } + @Override + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); + } + @Override + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); + } + @Override + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); + } + @Override + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); + } + @Override + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); + } + @Override + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .exclusiveMaximum(0) + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfAndElseWithoutThen1Boxed permits IfAndElseWithoutThen1BoxedVoid, IfAndElseWithoutThen1BoxedBoolean, IfAndElseWithoutThen1BoxedNumber, IfAndElseWithoutThen1BoxedString, IfAndElseWithoutThen1BoxedList, IfAndElseWithoutThen1BoxedMap { + @Nullable Object getData(); + } + + public record IfAndElseWithoutThen1BoxedVoid(Void data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndElseWithoutThen1BoxedBoolean(boolean data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndElseWithoutThen1BoxedNumber(Number data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndElseWithoutThen1BoxedString(String data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndElseWithoutThen1BoxedList(FrozenList<@Nullable Object> data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndElseWithoutThen1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAndElseWithoutThen1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IfAndElseWithoutThen1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAndElseWithoutThen1BoxedList>, MapSchemaValidator, IfAndElseWithoutThen1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IfAndElseWithoutThen1 instance = null; + + protected IfAndElseWithoutThen1() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + .elseSchema(Else.class) + ); + } + + public static IfAndElseWithoutThen1 getInstance() { + if (instance == null) { + instance = new IfAndElseWithoutThen1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfAndElseWithoutThen1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedVoid(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedNumber(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedString(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedList(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndElseWithoutThen1BoxedMap(validate(arg, configuration)); + } + @Override + public IfAndElseWithoutThen1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java new file mode 100644 index 00000000000..f56754e41d2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java @@ -0,0 +1,898 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IfAndThenWithoutElse { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .exclusiveMaximum(0) + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { + @Nullable Object getData(); + } + + public record ThenBoxedVoid(Void data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedBoolean(boolean data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedNumber(Number data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedString(String data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { + private static @Nullable Then instance = null; + + protected Then() { + super(new JsonSchemaInfo() + .minimum(-10) + ); + } + + public static Then getInstance() { + if (instance == null) { + instance = new Then(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedVoid(validate(arg, configuration)); + } + @Override + public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedBoolean(validate(arg, configuration)); + } + @Override + public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedNumber(validate(arg, configuration)); + } + @Override + public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedString(validate(arg, configuration)); + } + @Override + public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedList(validate(arg, configuration)); + } + @Override + public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedMap(validate(arg, configuration)); + } + @Override + public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfAndThenWithoutElse1Boxed permits IfAndThenWithoutElse1BoxedVoid, IfAndThenWithoutElse1BoxedBoolean, IfAndThenWithoutElse1BoxedNumber, IfAndThenWithoutElse1BoxedString, IfAndThenWithoutElse1BoxedList, IfAndThenWithoutElse1BoxedMap { + @Nullable Object getData(); + } + + public record IfAndThenWithoutElse1BoxedVoid(Void data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndThenWithoutElse1BoxedBoolean(boolean data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndThenWithoutElse1BoxedNumber(Number data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndThenWithoutElse1BoxedString(String data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndThenWithoutElse1BoxedList(FrozenList<@Nullable Object> data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAndThenWithoutElse1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAndThenWithoutElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IfAndThenWithoutElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAndThenWithoutElse1BoxedList>, MapSchemaValidator, IfAndThenWithoutElse1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IfAndThenWithoutElse1 instance = null; + + protected IfAndThenWithoutElse1() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + .then(Then.class) + ); + } + + public static IfAndThenWithoutElse1 getInstance() { + if (instance == null) { + instance = new IfAndThenWithoutElse1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfAndThenWithoutElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedVoid(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedNumber(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedString(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedList(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAndThenWithoutElse1BoxedMap(validate(arg, configuration)); + } + @Override + public IfAndThenWithoutElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java new file mode 100644 index 00000000000..d3e1225a763 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java @@ -0,0 +1,1210 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence { + // nest classes so all schemas and input/output classes can be public + + public enum StringElseConst implements StringValueMethod { + OTHER("other"); + private final String value; + + StringElseConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + @Nullable Object getData(); + } + + public record ElseBoxedVoid(Void data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedNumber(Number data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedString(String data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; + + protected Else() { + super(new JsonSchemaInfo() + .constValue("other") + ); + } + + public static Else getInstance() { + if (instance == null) { + instance = new Else(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); + } + @Override + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); + } + @Override + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); + } + @Override + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); + } + @Override + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); + } + @Override + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); + } + @Override + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .maxLength(4) + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + public enum StringThenConst implements StringValueMethod { + YES("yes"); + private final String value; + + StringThenConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { + @Nullable Object getData(); + } + + public record ThenBoxedVoid(Void data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedBoolean(boolean data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedNumber(Number data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedString(String data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { + private static @Nullable Then instance = null; + + protected Then() { + super(new JsonSchemaInfo() + .constValue("yes") + ); + } + + public static Then getInstance() { + if (instance == null) { + instance = new Then(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedVoid(validate(arg, configuration)); + } + @Override + public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedBoolean(validate(arg, configuration)); + } + @Override + public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedNumber(validate(arg, configuration)); + } + @Override + public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedString(validate(arg, configuration)); + } + @Override + public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedList(validate(arg, configuration)); + } + @Override + public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedMap(validate(arg, configuration)); + } + @Override + public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed permits IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap { + @Nullable Object getData(); + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid(Void data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean(boolean data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber(Number data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString(String data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList(FrozenList<@Nullable Object> data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList>, MapSchemaValidator, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 instance = null; + + protected IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + .then(Then.class) + .elseSchema(Else.class) + ); + } + + public static IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 getInstance() { + if (instance == null) { + instance = new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap(validate(arg, configuration)); + } + @Override + public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java new file mode 100644 index 00000000000..7076852a42d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java @@ -0,0 +1,626 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IgnoreElseWithoutIf { + // nest classes so all schemas and input/output classes can be public + + public enum StringElseConst implements StringValueMethod { + POSITIVE_0("0"); + private final String value; + + StringElseConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + @Nullable Object getData(); + } + + public record ElseBoxedVoid(Void data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedNumber(Number data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedString(String data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; + + protected Else() { + super(new JsonSchemaInfo() + .constValue("0") + ); + } + + public static Else getInstance() { + if (instance == null) { + instance = new Else(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); + } + @Override + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); + } + @Override + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); + } + @Override + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); + } + @Override + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); + } + @Override + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); + } + @Override + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IgnoreElseWithoutIf1Boxed permits IgnoreElseWithoutIf1BoxedVoid, IgnoreElseWithoutIf1BoxedBoolean, IgnoreElseWithoutIf1BoxedNumber, IgnoreElseWithoutIf1BoxedString, IgnoreElseWithoutIf1BoxedList, IgnoreElseWithoutIf1BoxedMap { + @Nullable Object getData(); + } + + public record IgnoreElseWithoutIf1BoxedVoid(Void data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreElseWithoutIf1BoxedBoolean(boolean data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreElseWithoutIf1BoxedNumber(Number data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreElseWithoutIf1BoxedString(String data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreElseWithoutIf1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreElseWithoutIf1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreElseWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IgnoreElseWithoutIf1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreElseWithoutIf1BoxedList>, MapSchemaValidator, IgnoreElseWithoutIf1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IgnoreElseWithoutIf1 instance = null; + + protected IgnoreElseWithoutIf1() { + super(new JsonSchemaInfo() + .elseSchema(Else.class) + ); + } + + public static IgnoreElseWithoutIf1 getInstance() { + if (instance == null) { + instance = new IgnoreElseWithoutIf1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IgnoreElseWithoutIf1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedVoid(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedNumber(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedString(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedList(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreElseWithoutIf1BoxedMap(validate(arg, configuration)); + } + @Override + public IgnoreElseWithoutIf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java new file mode 100644 index 00000000000..db3fbbda19a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java @@ -0,0 +1,626 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IgnoreIfWithoutThenOrElse { + // nest classes so all schemas and input/output classes can be public + + public enum StringIfConst implements StringValueMethod { + POSITIVE_0("0"); + private final String value; + + StringIfConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .constValue("0") + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IgnoreIfWithoutThenOrElse1Boxed permits IgnoreIfWithoutThenOrElse1BoxedVoid, IgnoreIfWithoutThenOrElse1BoxedBoolean, IgnoreIfWithoutThenOrElse1BoxedNumber, IgnoreIfWithoutThenOrElse1BoxedString, IgnoreIfWithoutThenOrElse1BoxedList, IgnoreIfWithoutThenOrElse1BoxedMap { + @Nullable Object getData(); + } + + public record IgnoreIfWithoutThenOrElse1BoxedVoid(Void data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreIfWithoutThenOrElse1BoxedBoolean(boolean data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreIfWithoutThenOrElse1BoxedNumber(Number data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreIfWithoutThenOrElse1BoxedString(String data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreIfWithoutThenOrElse1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreIfWithoutThenOrElse1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreIfWithoutThenOrElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IgnoreIfWithoutThenOrElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreIfWithoutThenOrElse1BoxedList>, MapSchemaValidator, IgnoreIfWithoutThenOrElse1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IgnoreIfWithoutThenOrElse1 instance = null; + + protected IgnoreIfWithoutThenOrElse1() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + ); + } + + public static IgnoreIfWithoutThenOrElse1 getInstance() { + if (instance == null) { + instance = new IgnoreIfWithoutThenOrElse1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedVoid(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedNumber(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedString(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedList(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreIfWithoutThenOrElse1BoxedMap(validate(arg, configuration)); + } + @Override + public IgnoreIfWithoutThenOrElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java new file mode 100644 index 00000000000..6570627a0d9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java @@ -0,0 +1,626 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IgnoreThenWithoutIf { + // nest classes so all schemas and input/output classes can be public + + public enum StringThenConst implements StringValueMethod { + POSITIVE_0("0"); + private final String value; + + StringThenConst(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { + @Nullable Object getData(); + } + + public record ThenBoxedVoid(Void data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedBoolean(boolean data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedNumber(Number data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedString(String data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { + private static @Nullable Then instance = null; + + protected Then() { + super(new JsonSchemaInfo() + .constValue("0") + ); + } + + public static Then getInstance() { + if (instance == null) { + instance = new Then(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedVoid(validate(arg, configuration)); + } + @Override + public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedBoolean(validate(arg, configuration)); + } + @Override + public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedNumber(validate(arg, configuration)); + } + @Override + public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedString(validate(arg, configuration)); + } + @Override + public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedList(validate(arg, configuration)); + } + @Override + public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedMap(validate(arg, configuration)); + } + @Override + public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IgnoreThenWithoutIf1Boxed permits IgnoreThenWithoutIf1BoxedVoid, IgnoreThenWithoutIf1BoxedBoolean, IgnoreThenWithoutIf1BoxedNumber, IgnoreThenWithoutIf1BoxedString, IgnoreThenWithoutIf1BoxedList, IgnoreThenWithoutIf1BoxedMap { + @Nullable Object getData(); + } + + public record IgnoreThenWithoutIf1BoxedVoid(Void data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreThenWithoutIf1BoxedBoolean(boolean data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreThenWithoutIf1BoxedNumber(Number data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreThenWithoutIf1BoxedString(String data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreThenWithoutIf1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IgnoreThenWithoutIf1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreThenWithoutIf1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IgnoreThenWithoutIf1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreThenWithoutIf1BoxedList>, MapSchemaValidator, IgnoreThenWithoutIf1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IgnoreThenWithoutIf1 instance = null; + + protected IgnoreThenWithoutIf1() { + super(new JsonSchemaInfo() + .then(Then.class) + ); + } + + public static IgnoreThenWithoutIf1 getInstance() { + if (instance == null) { + instance = new IgnoreThenWithoutIf1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IgnoreThenWithoutIf1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedVoid(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedNumber(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedString(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedList(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IgnoreThenWithoutIf1BoxedMap(validate(arg, configuration)); + } + @Override + public IgnoreThenWithoutIf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java new file mode 100644 index 00000000000..2324dcdaa15 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.IntJsonSchema; + +public class IntegerTypeMatchesIntegers extends IntJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class IntegerTypeMatchesIntegers1 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable IntegerTypeMatchesIntegers1 instance = null; + public static IntegerTypeMatchesIntegers1 getInstance() { + if (instance == null) { + instance = new IntegerTypeMatchesIntegers1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java new file mode 100644 index 00000000000..50396e59bbb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Ipv4Format { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Ipv4Format1Boxed permits Ipv4Format1BoxedVoid, Ipv4Format1BoxedBoolean, Ipv4Format1BoxedNumber, Ipv4Format1BoxedString, Ipv4Format1BoxedList, Ipv4Format1BoxedMap { + @Nullable Object getData(); + } + + public record Ipv4Format1BoxedVoid(Void data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv4Format1BoxedBoolean(boolean data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv4Format1BoxedNumber(Number data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv4Format1BoxedString(String data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv4Format1BoxedList(FrozenList<@Nullable Object> data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv4Format1BoxedMap(FrozenMap<@Nullable Object> data) implements Ipv4Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Ipv4Format1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Ipv4Format1BoxedList>, MapSchemaValidator, Ipv4Format1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Ipv4Format1 instance = null; + + protected Ipv4Format1() { + super(new JsonSchemaInfo() + .format("ipv4") + ); + } + + public static Ipv4Format1 getInstance() { + if (instance == null) { + instance = new Ipv4Format1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Ipv4Format1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedVoid(validate(arg, configuration)); + } + @Override + public Ipv4Format1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Ipv4Format1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedNumber(validate(arg, configuration)); + } + @Override + public Ipv4Format1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedString(validate(arg, configuration)); + } + @Override + public Ipv4Format1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedList(validate(arg, configuration)); + } + @Override + public Ipv4Format1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv4Format1BoxedMap(validate(arg, configuration)); + } + @Override + public Ipv4Format1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java new file mode 100644 index 00000000000..567cb7c4fa0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Ipv6Format { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Ipv6Format1Boxed permits Ipv6Format1BoxedVoid, Ipv6Format1BoxedBoolean, Ipv6Format1BoxedNumber, Ipv6Format1BoxedString, Ipv6Format1BoxedList, Ipv6Format1BoxedMap { + @Nullable Object getData(); + } + + public record Ipv6Format1BoxedVoid(Void data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv6Format1BoxedBoolean(boolean data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv6Format1BoxedNumber(Number data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv6Format1BoxedString(String data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv6Format1BoxedList(FrozenList<@Nullable Object> data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Ipv6Format1BoxedMap(FrozenMap<@Nullable Object> data) implements Ipv6Format1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Ipv6Format1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Ipv6Format1BoxedList>, MapSchemaValidator, Ipv6Format1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Ipv6Format1 instance = null; + + protected Ipv6Format1() { + super(new JsonSchemaInfo() + .format("ipv6") + ); + } + + public static Ipv6Format1 getInstance() { + if (instance == null) { + instance = new Ipv6Format1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Ipv6Format1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedVoid(validate(arg, configuration)); + } + @Override + public Ipv6Format1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Ipv6Format1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedNumber(validate(arg, configuration)); + } + @Override + public Ipv6Format1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedString(validate(arg, configuration)); + } + @Override + public Ipv6Format1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedList(validate(arg, configuration)); + } + @Override + public Ipv6Format1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Ipv6Format1BoxedMap(validate(arg, configuration)); + } + @Override + public Ipv6Format1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java new file mode 100644 index 00000000000..229f00434d1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IriFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IriFormat1Boxed permits IriFormat1BoxedVoid, IriFormat1BoxedBoolean, IriFormat1BoxedNumber, IriFormat1BoxedString, IriFormat1BoxedList, IriFormat1BoxedMap { + @Nullable Object getData(); + } + + public record IriFormat1BoxedVoid(Void data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriFormat1BoxedBoolean(boolean data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriFormat1BoxedNumber(Number data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriFormat1BoxedString(String data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriFormat1BoxedList(FrozenList<@Nullable Object> data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IriFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IriFormat1BoxedList>, MapSchemaValidator, IriFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IriFormat1 instance = null; + + protected IriFormat1() { + super(new JsonSchemaInfo() + .format("iri") + ); + } + + public static IriFormat1 getInstance() { + if (instance == null) { + instance = new IriFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IriFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public IriFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IriFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public IriFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedString(validate(arg, configuration)); + } + @Override + public IriFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedList(validate(arg, configuration)); + } + @Override + public IriFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IriFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public IriFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java new file mode 100644 index 00000000000..38f7ecb22d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class IriReferenceFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IriReferenceFormat1Boxed permits IriReferenceFormat1BoxedVoid, IriReferenceFormat1BoxedBoolean, IriReferenceFormat1BoxedNumber, IriReferenceFormat1BoxedString, IriReferenceFormat1BoxedList, IriReferenceFormat1BoxedMap { + @Nullable Object getData(); + } + + public record IriReferenceFormat1BoxedVoid(Void data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriReferenceFormat1BoxedBoolean(boolean data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriReferenceFormat1BoxedNumber(Number data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriReferenceFormat1BoxedString(String data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriReferenceFormat1BoxedList(FrozenList<@Nullable Object> data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IriReferenceFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class IriReferenceFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IriReferenceFormat1BoxedList>, MapSchemaValidator, IriReferenceFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable IriReferenceFormat1 instance = null; + + protected IriReferenceFormat1() { + super(new JsonSchemaInfo() + .format("iri-reference") + ); + } + + public static IriReferenceFormat1 getInstance() { + if (instance == null) { + instance = new IriReferenceFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IriReferenceFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedString(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedList(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IriReferenceFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public IriReferenceFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java new file mode 100644 index 00000000000..8489e737c6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java @@ -0,0 +1,773 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ItemsContains { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { + @Nullable Object getData(); + } + + public record ContainsBoxedVoid(Void data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedNumber(Number data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedString(String data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { + private static @Nullable Contains instance = null; + + protected Contains() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("3")) + ); + } + + public static Contains getInstance() { + if (instance == null) { + instance = new Contains(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedVoid(validate(arg, configuration)); + } + @Override + public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedBoolean(validate(arg, configuration)); + } + @Override + public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedNumber(validate(arg, configuration)); + } + @Override + public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedString(validate(arg, configuration)); + } + @Override + public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedList(validate(arg, configuration)); + } + @Override + public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedMap(validate(arg, configuration)); + } + @Override + public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ItemsBoxed permits ItemsBoxedVoid, ItemsBoxedBoolean, ItemsBoxedNumber, ItemsBoxedString, ItemsBoxedList, ItemsBoxedMap { + @Nullable Object getData(); + } + + public record ItemsBoxedVoid(Void data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedBoolean(boolean data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedNumber(Number data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedString(String data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedList(FrozenList<@Nullable Object> data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedMap(FrozenMap<@Nullable Object> data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Items extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ItemsBoxedList>, MapSchemaValidator, ItemsBoxedMap> { + private static @Nullable Items instance = null; + + protected Items() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedVoid(validate(arg, configuration)); + } + @Override + public ItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedBoolean(validate(arg, configuration)); + } + @Override + public ItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedNumber(validate(arg, configuration)); + } + @Override + public ItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedString(validate(arg, configuration)); + } + @Override + public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedList(validate(arg, configuration)); + } + @Override + public ItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedMap(validate(arg, configuration)); + } + @Override + public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ItemsContainsList extends FrozenList<@Nullable Object> { + protected ItemsContainsList(FrozenList<@Nullable Object> m) { + super(m); + } + public static ItemsContainsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return ItemsContains1.getInstance().validate(arg, configuration); + } + } + + public static class ItemsContainsListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public ItemsContainsListBuilder() { + list = new ArrayList<>(); + } + + public ItemsContainsListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public ItemsContainsListBuilder add(Void item) { + list.add(null); + return this; + } + + public ItemsContainsListBuilder add(boolean item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(String item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(int item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(float item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(long item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(double item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(List item) { + list.add(item); + return this; + } + + public ItemsContainsListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public sealed interface ItemsContains1Boxed permits ItemsContains1BoxedList { + @Nullable Object getData(); + } + + public record ItemsContains1BoxedList(ItemsContainsList data) implements ItemsContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class ItemsContains1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ItemsContains1 instance = null; + + protected ItemsContains1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + .contains(Contains.class) + ); + } + + public static ItemsContains1 getInstance() { + if (instance == null) { + instance = new ItemsContains1(); + } + return instance; + } + + @Override + public ItemsContainsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new ItemsContainsList(newInstanceItems); + } + + public ItemsContainsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsContains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsContains1BoxedList(validate(arg, configuration)); + } + @Override + public ItemsContains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java new file mode 100644 index 00000000000..a1adb609297 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java @@ -0,0 +1,486 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ItemsDoesNotLookInApplicatorsValidCase { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ItemsBoxed permits ItemsBoxedVoid, ItemsBoxedBoolean, ItemsBoxedNumber, ItemsBoxedString, ItemsBoxedList, ItemsBoxedMap { + @Nullable Object getData(); + } + + public record ItemsBoxedVoid(Void data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedBoolean(boolean data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedNumber(Number data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedString(String data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedList(FrozenList<@Nullable Object> data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ItemsBoxedMap(FrozenMap<@Nullable Object> data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Items extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ItemsBoxedList>, MapSchemaValidator, ItemsBoxedMap> { + private static @Nullable Items instance = null; + + protected Items() { + super(new JsonSchemaInfo() + .minimum(5) + ); + } + + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedVoid(validate(arg, configuration)); + } + @Override + public ItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedBoolean(validate(arg, configuration)); + } + @Override + public ItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedNumber(validate(arg, configuration)); + } + @Override + public ItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedString(validate(arg, configuration)); + } + @Override + public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedList(validate(arg, configuration)); + } + @Override + public ItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedMap(validate(arg, configuration)); + } + @Override + public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ItemsDoesNotLookInApplicatorsValidCaseList extends FrozenList<@Nullable Object> { + protected ItemsDoesNotLookInApplicatorsValidCaseList(FrozenList<@Nullable Object> m) { + super(m); + } + public static ItemsDoesNotLookInApplicatorsValidCaseList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return ItemsDoesNotLookInApplicatorsValidCase1.getInstance().validate(arg, configuration); + } + } + + public static class ItemsDoesNotLookInApplicatorsValidCaseListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder() { + list = new ArrayList<>(); + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(Void item) { + list.add(null); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(boolean item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(String item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(int item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(float item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(long item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(double item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(List item) { + list.add(item); + return this; + } + + public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public sealed interface ItemsDoesNotLookInApplicatorsValidCase1Boxed permits ItemsDoesNotLookInApplicatorsValidCase1BoxedList { + @Nullable Object getData(); + } + + public record ItemsDoesNotLookInApplicatorsValidCase1BoxedList(ItemsDoesNotLookInApplicatorsValidCaseList data) implements ItemsDoesNotLookInApplicatorsValidCase1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class ItemsDoesNotLookInApplicatorsValidCase1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ItemsDoesNotLookInApplicatorsValidCase1 instance = null; + + protected ItemsDoesNotLookInApplicatorsValidCase1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + ); + } + + public static ItemsDoesNotLookInApplicatorsValidCase1 getInstance() { + if (instance == null) { + instance = new ItemsDoesNotLookInApplicatorsValidCase1(); + } + return instance; + } + + @Override + public ItemsDoesNotLookInApplicatorsValidCaseList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new ItemsDoesNotLookInApplicatorsValidCaseList(newInstanceItems); + } + + public ItemsDoesNotLookInApplicatorsValidCaseList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsDoesNotLookInApplicatorsValidCase1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsDoesNotLookInApplicatorsValidCase1BoxedList(validate(arg, configuration)); + } + @Override + public ItemsDoesNotLookInApplicatorsValidCase1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java new file mode 100644 index 00000000000..6724839298d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java @@ -0,0 +1,163 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ItemsWithNullInstanceElements { + // nest classes so all schemas and input/output classes can be public + + + public static class Items extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Items instance = null; + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + } + + + public static class ItemsWithNullInstanceElementsList extends FrozenList { + protected ItemsWithNullInstanceElementsList(FrozenList m) { + super(m); + } + public static ItemsWithNullInstanceElementsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return ItemsWithNullInstanceElements1.getInstance().validate(arg, configuration); + } + } + + public static class ItemsWithNullInstanceElementsListBuilder { + // class to build List + private final List list; + + public ItemsWithNullInstanceElementsListBuilder() { + list = new ArrayList<>(); + } + + public ItemsWithNullInstanceElementsListBuilder(List list) { + this.list = list; + } + + public ItemsWithNullInstanceElementsListBuilder add(Void item) { + list.add(null); + return this; + } + + public List build() { + return list; + } + } + + + public sealed interface ItemsWithNullInstanceElements1Boxed permits ItemsWithNullInstanceElements1BoxedList { + @Nullable Object getData(); + } + + public record ItemsWithNullInstanceElements1BoxedList(ItemsWithNullInstanceElementsList data) implements ItemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class ItemsWithNullInstanceElements1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ItemsWithNullInstanceElements1 instance = null; + + protected ItemsWithNullInstanceElements1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + ); + } + + public static ItemsWithNullInstanceElements1 getInstance() { + if (instance == null) { + instance = new ItemsWithNullInstanceElements1(); + } + return instance; + } + + @Override + public ItemsWithNullInstanceElementsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance == null || itemInstance instanceof Void)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((Void) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new ItemsWithNullInstanceElementsList(newInstanceItems); + } + + public ItemsWithNullInstanceElementsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); + } + @Override + public ItemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java new file mode 100644 index 00000000000..fd8e1b14268 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class JsonPointerFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface JsonPointerFormat1Boxed permits JsonPointerFormat1BoxedVoid, JsonPointerFormat1BoxedBoolean, JsonPointerFormat1BoxedNumber, JsonPointerFormat1BoxedString, JsonPointerFormat1BoxedList, JsonPointerFormat1BoxedMap { + @Nullable Object getData(); + } + + public record JsonPointerFormat1BoxedVoid(Void data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record JsonPointerFormat1BoxedBoolean(boolean data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record JsonPointerFormat1BoxedNumber(Number data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record JsonPointerFormat1BoxedString(String data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record JsonPointerFormat1BoxedList(FrozenList<@Nullable Object> data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record JsonPointerFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements JsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class JsonPointerFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, JsonPointerFormat1BoxedList>, MapSchemaValidator, JsonPointerFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable JsonPointerFormat1 instance = null; + + protected JsonPointerFormat1() { + super(new JsonSchemaInfo() + .format("json-pointer") + ); + } + + public static JsonPointerFormat1 getInstance() { + if (instance == null) { + instance = new JsonPointerFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public JsonPointerFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedString(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedList(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new JsonPointerFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public JsonPointerFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java new file mode 100644 index 00000000000..89268d7cde5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaxcontainsWithoutContainsIsIgnored { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaxcontainsWithoutContainsIsIgnored1Boxed permits MaxcontainsWithoutContainsIsIgnored1BoxedVoid, MaxcontainsWithoutContainsIsIgnored1BoxedBoolean, MaxcontainsWithoutContainsIsIgnored1BoxedNumber, MaxcontainsWithoutContainsIsIgnored1BoxedString, MaxcontainsWithoutContainsIsIgnored1BoxedList, MaxcontainsWithoutContainsIsIgnored1BoxedMap { + @Nullable Object getData(); + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedVoid(Void data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedBoolean(boolean data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedNumber(Number data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedString(String data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedList(FrozenList<@Nullable Object> data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxcontainsWithoutContainsIsIgnored1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaxcontainsWithoutContainsIsIgnored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxcontainsWithoutContainsIsIgnored1BoxedList>, MapSchemaValidator, MaxcontainsWithoutContainsIsIgnored1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaxcontainsWithoutContainsIsIgnored1 instance = null; + + protected MaxcontainsWithoutContainsIsIgnored1() { + super(new JsonSchemaInfo() + .maxContains(1) + ); + } + + public static MaxcontainsWithoutContainsIsIgnored1 getInstance() { + if (instance == null) { + instance = new MaxcontainsWithoutContainsIsIgnored1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedString(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedList(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxcontainsWithoutContainsIsIgnored1BoxedMap(validate(arg, configuration)); + } + @Override + public MaxcontainsWithoutContainsIsIgnored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java new file mode 100644 index 00000000000..71d443d4d98 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaximumValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaximumValidation1Boxed permits MaximumValidation1BoxedVoid, MaximumValidation1BoxedBoolean, MaximumValidation1BoxedNumber, MaximumValidation1BoxedString, MaximumValidation1BoxedList, MaximumValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MaximumValidation1BoxedVoid(Void data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidation1BoxedBoolean(boolean data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidation1BoxedNumber(Number data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidation1BoxedString(String data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaximumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaximumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaximumValidation1BoxedList>, MapSchemaValidator, MaximumValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaximumValidation1 instance = null; + + protected MaximumValidation1() { + super(new JsonSchemaInfo() + .maximum(3.0) + ); + } + + public static MaximumValidation1 getInstance() { + if (instance == null) { + instance = new MaximumValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaximumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaximumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaximumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaximumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MaximumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MaximumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MaximumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java new file mode 100644 index 00000000000..d8a7a429e77 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaximumValidationWithUnsignedInteger { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaximumValidationWithUnsignedInteger1Boxed permits MaximumValidationWithUnsignedInteger1BoxedVoid, MaximumValidationWithUnsignedInteger1BoxedBoolean, MaximumValidationWithUnsignedInteger1BoxedNumber, MaximumValidationWithUnsignedInteger1BoxedString, MaximumValidationWithUnsignedInteger1BoxedList, MaximumValidationWithUnsignedInteger1BoxedMap { + @Nullable Object getData(); + } + + public record MaximumValidationWithUnsignedInteger1BoxedVoid(Void data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidationWithUnsignedInteger1BoxedBoolean(boolean data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidationWithUnsignedInteger1BoxedNumber(Number data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidationWithUnsignedInteger1BoxedString(String data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidationWithUnsignedInteger1BoxedList(FrozenList<@Nullable Object> data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaximumValidationWithUnsignedInteger1BoxedMap(FrozenMap<@Nullable Object> data) implements MaximumValidationWithUnsignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaximumValidationWithUnsignedInteger1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaximumValidationWithUnsignedInteger1BoxedList>, MapSchemaValidator, MaximumValidationWithUnsignedInteger1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaximumValidationWithUnsignedInteger1 instance = null; + + protected MaximumValidationWithUnsignedInteger1() { + super(new JsonSchemaInfo() + .maximum(300) + ); + } + + public static MaximumValidationWithUnsignedInteger1 getInstance() { + if (instance == null) { + instance = new MaximumValidationWithUnsignedInteger1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedString(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedList(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaximumValidationWithUnsignedInteger1BoxedMap(validate(arg, configuration)); + } + @Override + public MaximumValidationWithUnsignedInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java new file mode 100644 index 00000000000..aba9b897eca --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaxitemsValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaxitemsValidation1Boxed permits MaxitemsValidation1BoxedVoid, MaxitemsValidation1BoxedBoolean, MaxitemsValidation1BoxedNumber, MaxitemsValidation1BoxedString, MaxitemsValidation1BoxedList, MaxitemsValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MaxitemsValidation1BoxedVoid(Void data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxitemsValidation1BoxedBoolean(boolean data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxitemsValidation1BoxedNumber(Number data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxitemsValidation1BoxedString(String data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaxitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxitemsValidation1BoxedList>, MapSchemaValidator, MaxitemsValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaxitemsValidation1 instance = null; + + protected MaxitemsValidation1() { + super(new JsonSchemaInfo() + .maxItems(2) + ); + } + + public static MaxitemsValidation1 getInstance() { + if (instance == null) { + instance = new MaxitemsValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaxitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxitemsValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MaxitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java new file mode 100644 index 00000000000..9aa07726782 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaxlengthValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaxlengthValidation1Boxed permits MaxlengthValidation1BoxedVoid, MaxlengthValidation1BoxedBoolean, MaxlengthValidation1BoxedNumber, MaxlengthValidation1BoxedString, MaxlengthValidation1BoxedList, MaxlengthValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MaxlengthValidation1BoxedVoid(Void data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxlengthValidation1BoxedBoolean(boolean data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxlengthValidation1BoxedNumber(Number data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxlengthValidation1BoxedString(String data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxlengthValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxlengthValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaxlengthValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxlengthValidation1BoxedList>, MapSchemaValidator, MaxlengthValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaxlengthValidation1 instance = null; + + protected MaxlengthValidation1() { + super(new JsonSchemaInfo() + .maxLength(2) + ); + } + + public static MaxlengthValidation1 getInstance() { + if (instance == null) { + instance = new MaxlengthValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaxlengthValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxlengthValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MaxlengthValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java new file mode 100644 index 00000000000..2e40f4b34fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Maxproperties0MeansTheObjectIsEmpty { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Maxproperties0MeansTheObjectIsEmpty1Boxed permits Maxproperties0MeansTheObjectIsEmpty1BoxedVoid, Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean, Maxproperties0MeansTheObjectIsEmpty1BoxedNumber, Maxproperties0MeansTheObjectIsEmpty1BoxedString, Maxproperties0MeansTheObjectIsEmpty1BoxedList, Maxproperties0MeansTheObjectIsEmpty1BoxedMap { + @Nullable Object getData(); + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedVoid(Void data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean(boolean data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedNumber(Number data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedString(String data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedList(FrozenList<@Nullable Object> data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Maxproperties0MeansTheObjectIsEmpty1BoxedMap(FrozenMap<@Nullable Object> data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Maxproperties0MeansTheObjectIsEmpty1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Maxproperties0MeansTheObjectIsEmpty1BoxedList>, MapSchemaValidator, Maxproperties0MeansTheObjectIsEmpty1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Maxproperties0MeansTheObjectIsEmpty1 instance = null; + + protected Maxproperties0MeansTheObjectIsEmpty1() { + super(new JsonSchemaInfo() + .maxProperties(0) + ); + } + + public static Maxproperties0MeansTheObjectIsEmpty1 getInstance() { + if (instance == null) { + instance = new Maxproperties0MeansTheObjectIsEmpty1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedVoid(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedNumber(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedString(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedList(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Maxproperties0MeansTheObjectIsEmpty1BoxedMap(validate(arg, configuration)); + } + @Override + public Maxproperties0MeansTheObjectIsEmpty1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java new file mode 100644 index 00000000000..0ee851653d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MaxpropertiesValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MaxpropertiesValidation1Boxed permits MaxpropertiesValidation1BoxedVoid, MaxpropertiesValidation1BoxedBoolean, MaxpropertiesValidation1BoxedNumber, MaxpropertiesValidation1BoxedString, MaxpropertiesValidation1BoxedList, MaxpropertiesValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MaxpropertiesValidation1BoxedVoid(Void data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxpropertiesValidation1BoxedBoolean(boolean data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxpropertiesValidation1BoxedNumber(Number data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxpropertiesValidation1BoxedString(String data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxpropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MaxpropertiesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MaxpropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxpropertiesValidation1BoxedList>, MapSchemaValidator, MaxpropertiesValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MaxpropertiesValidation1 instance = null; + + protected MaxpropertiesValidation1() { + super(new JsonSchemaInfo() + .maxProperties(2) + ); + } + + public static MaxpropertiesValidation1 getInstance() { + if (instance == null) { + instance = new MaxpropertiesValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MaxpropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MaxpropertiesValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MaxpropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java new file mode 100644 index 00000000000..eb2964adb45 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MincontainsWithoutContainsIsIgnored { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MincontainsWithoutContainsIsIgnored1Boxed permits MincontainsWithoutContainsIsIgnored1BoxedVoid, MincontainsWithoutContainsIsIgnored1BoxedBoolean, MincontainsWithoutContainsIsIgnored1BoxedNumber, MincontainsWithoutContainsIsIgnored1BoxedString, MincontainsWithoutContainsIsIgnored1BoxedList, MincontainsWithoutContainsIsIgnored1BoxedMap { + @Nullable Object getData(); + } + + public record MincontainsWithoutContainsIsIgnored1BoxedVoid(Void data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MincontainsWithoutContainsIsIgnored1BoxedBoolean(boolean data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MincontainsWithoutContainsIsIgnored1BoxedNumber(Number data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MincontainsWithoutContainsIsIgnored1BoxedString(String data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MincontainsWithoutContainsIsIgnored1BoxedList(FrozenList<@Nullable Object> data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MincontainsWithoutContainsIsIgnored1BoxedMap(FrozenMap<@Nullable Object> data) implements MincontainsWithoutContainsIsIgnored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MincontainsWithoutContainsIsIgnored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MincontainsWithoutContainsIsIgnored1BoxedList>, MapSchemaValidator, MincontainsWithoutContainsIsIgnored1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MincontainsWithoutContainsIsIgnored1 instance = null; + + protected MincontainsWithoutContainsIsIgnored1() { + super(new JsonSchemaInfo() + .minContains(1) + ); + } + + public static MincontainsWithoutContainsIsIgnored1 getInstance() { + if (instance == null) { + instance = new MincontainsWithoutContainsIsIgnored1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedVoid(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedNumber(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedString(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedList(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MincontainsWithoutContainsIsIgnored1BoxedMap(validate(arg, configuration)); + } + @Override + public MincontainsWithoutContainsIsIgnored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java new file mode 100644 index 00000000000..cdfc39f6c4d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MinimumValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MinimumValidation1Boxed permits MinimumValidation1BoxedVoid, MinimumValidation1BoxedBoolean, MinimumValidation1BoxedNumber, MinimumValidation1BoxedString, MinimumValidation1BoxedList, MinimumValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MinimumValidation1BoxedVoid(Void data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidation1BoxedBoolean(boolean data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidation1BoxedNumber(Number data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidation1BoxedString(String data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinimumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MinimumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinimumValidation1BoxedList>, MapSchemaValidator, MinimumValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MinimumValidation1 instance = null; + + protected MinimumValidation1() { + super(new JsonSchemaInfo() + .minimum(1.1) + ); + } + + public static MinimumValidation1 getInstance() { + if (instance == null) { + instance = new MinimumValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MinimumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MinimumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MinimumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MinimumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MinimumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MinimumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MinimumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java new file mode 100644 index 00000000000..100964fdc75 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MinimumValidationWithSignedInteger { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MinimumValidationWithSignedInteger1Boxed permits MinimumValidationWithSignedInteger1BoxedVoid, MinimumValidationWithSignedInteger1BoxedBoolean, MinimumValidationWithSignedInteger1BoxedNumber, MinimumValidationWithSignedInteger1BoxedString, MinimumValidationWithSignedInteger1BoxedList, MinimumValidationWithSignedInteger1BoxedMap { + @Nullable Object getData(); + } + + public record MinimumValidationWithSignedInteger1BoxedVoid(Void data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidationWithSignedInteger1BoxedBoolean(boolean data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidationWithSignedInteger1BoxedNumber(Number data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidationWithSignedInteger1BoxedString(String data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidationWithSignedInteger1BoxedList(FrozenList<@Nullable Object> data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinimumValidationWithSignedInteger1BoxedMap(FrozenMap<@Nullable Object> data) implements MinimumValidationWithSignedInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MinimumValidationWithSignedInteger1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinimumValidationWithSignedInteger1BoxedList>, MapSchemaValidator, MinimumValidationWithSignedInteger1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MinimumValidationWithSignedInteger1 instance = null; + + protected MinimumValidationWithSignedInteger1() { + super(new JsonSchemaInfo() + .minimum(-2) + ); + } + + public static MinimumValidationWithSignedInteger1 getInstance() { + if (instance == null) { + instance = new MinimumValidationWithSignedInteger1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MinimumValidationWithSignedInteger1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedVoid(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedNumber(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedString(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedList(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MinimumValidationWithSignedInteger1BoxedMap(validate(arg, configuration)); + } + @Override + public MinimumValidationWithSignedInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java new file mode 100644 index 00000000000..97143bc5d85 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MinitemsValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MinitemsValidation1Boxed permits MinitemsValidation1BoxedVoid, MinitemsValidation1BoxedBoolean, MinitemsValidation1BoxedNumber, MinitemsValidation1BoxedString, MinitemsValidation1BoxedList, MinitemsValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MinitemsValidation1BoxedVoid(Void data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinitemsValidation1BoxedBoolean(boolean data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinitemsValidation1BoxedNumber(Number data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinitemsValidation1BoxedString(String data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MinitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinitemsValidation1BoxedList>, MapSchemaValidator, MinitemsValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MinitemsValidation1 instance = null; + + protected MinitemsValidation1() { + super(new JsonSchemaInfo() + .minItems(1) + ); + } + + public static MinitemsValidation1 getInstance() { + if (instance == null) { + instance = new MinitemsValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MinitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MinitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MinitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MinitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MinitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MinitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MinitemsValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MinitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java new file mode 100644 index 00000000000..7e0cd022795 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MinlengthValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MinlengthValidation1Boxed permits MinlengthValidation1BoxedVoid, MinlengthValidation1BoxedBoolean, MinlengthValidation1BoxedNumber, MinlengthValidation1BoxedString, MinlengthValidation1BoxedList, MinlengthValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MinlengthValidation1BoxedVoid(Void data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinlengthValidation1BoxedBoolean(boolean data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinlengthValidation1BoxedNumber(Number data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinlengthValidation1BoxedString(String data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinlengthValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinlengthValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinlengthValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MinlengthValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinlengthValidation1BoxedList>, MapSchemaValidator, MinlengthValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MinlengthValidation1 instance = null; + + protected MinlengthValidation1() { + super(new JsonSchemaInfo() + .minLength(2) + ); + } + + public static MinlengthValidation1 getInstance() { + if (instance == null) { + instance = new MinlengthValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MinlengthValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MinlengthValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MinlengthValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MinlengthValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MinlengthValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MinlengthValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MinlengthValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MinlengthValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java new file mode 100644 index 00000000000..8d2d51a2778 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MinpropertiesValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MinpropertiesValidation1Boxed permits MinpropertiesValidation1BoxedVoid, MinpropertiesValidation1BoxedBoolean, MinpropertiesValidation1BoxedNumber, MinpropertiesValidation1BoxedString, MinpropertiesValidation1BoxedList, MinpropertiesValidation1BoxedMap { + @Nullable Object getData(); + } + + public record MinpropertiesValidation1BoxedVoid(Void data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinpropertiesValidation1BoxedBoolean(boolean data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinpropertiesValidation1BoxedNumber(Number data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinpropertiesValidation1BoxedString(String data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinpropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MinpropertiesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinpropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MinpropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinpropertiesValidation1BoxedList>, MapSchemaValidator, MinpropertiesValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MinpropertiesValidation1 instance = null; + + protected MinpropertiesValidation1() { + super(new JsonSchemaInfo() + .minProperties(1) + ); + } + + public static MinpropertiesValidation1 getInstance() { + if (instance == null) { + instance = new MinpropertiesValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MinpropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedString(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedList(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MinpropertiesValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public MinpropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java new file mode 100644 index 00000000000..c2f6258cefc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java @@ -0,0 +1,338 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MultipleDependentsRequired { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MultipleDependentsRequired1Boxed permits MultipleDependentsRequired1BoxedVoid, MultipleDependentsRequired1BoxedBoolean, MultipleDependentsRequired1BoxedNumber, MultipleDependentsRequired1BoxedString, MultipleDependentsRequired1BoxedList, MultipleDependentsRequired1BoxedMap { + @Nullable Object getData(); + } + + public record MultipleDependentsRequired1BoxedVoid(Void data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleDependentsRequired1BoxedBoolean(boolean data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleDependentsRequired1BoxedNumber(Number data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleDependentsRequired1BoxedString(String data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleDependentsRequired1BoxedList(FrozenList<@Nullable Object> data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleDependentsRequired1BoxedMap(FrozenMap<@Nullable Object> data) implements MultipleDependentsRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MultipleDependentsRequired1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MultipleDependentsRequired1BoxedList>, MapSchemaValidator, MultipleDependentsRequired1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MultipleDependentsRequired1 instance = null; + + protected MultipleDependentsRequired1() { + super(new JsonSchemaInfo() + .dependentRequired(MapUtils.makeMap( + new AbstractMap.SimpleEntry<>( + "quux", + SetMaker.makeSet( + "foo", + "bar" + ) + ) + )) + ); + } + + public static MultipleDependentsRequired1 getInstance() { + if (instance == null) { + instance = new MultipleDependentsRequired1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MultipleDependentsRequired1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedVoid(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedNumber(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedString(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedList(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleDependentsRequired1BoxedMap(validate(arg, configuration)); + } + @Override + public MultipleDependentsRequired1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java new file mode 100644 index 00000000000..c0d840ae2cd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java @@ -0,0 +1,629 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MultipleSimultaneousPatternpropertiesAreValidated { + // nest classes so all schemas and input/output classes can be public + + + public static class A extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable A instance = null; + public static A getInstance() { + if (instance == null) { + instance = new A(); + } + return instance; + } + } + + + public sealed interface AaaBoxed permits AaaBoxedVoid, AaaBoxedBoolean, AaaBoxedNumber, AaaBoxedString, AaaBoxedList, AaaBoxedMap { + @Nullable Object getData(); + } + + public record AaaBoxedVoid(Void data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AaaBoxedBoolean(boolean data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AaaBoxedNumber(Number data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AaaBoxedString(String data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AaaBoxedList(FrozenList<@Nullable Object> data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record AaaBoxedMap(FrozenMap<@Nullable Object> data) implements AaaBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Aaa extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AaaBoxedList>, MapSchemaValidator, AaaBoxedMap> { + private static @Nullable Aaa instance = null; + + protected Aaa() { + super(new JsonSchemaInfo() + .maximum(20) + ); + } + + public static Aaa getInstance() { + if (instance == null) { + instance = new Aaa(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public AaaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedVoid(validate(arg, configuration)); + } + @Override + public AaaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedBoolean(validate(arg, configuration)); + } + @Override + public AaaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedNumber(validate(arg, configuration)); + } + @Override + public AaaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedString(validate(arg, configuration)); + } + @Override + public AaaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedList(validate(arg, configuration)); + } + @Override + public AaaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AaaBoxedMap(validate(arg, configuration)); + } + @Override + public AaaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface MultipleSimultaneousPatternpropertiesAreValidated1Boxed permits MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid, MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean, MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber, MultipleSimultaneousPatternpropertiesAreValidated1BoxedString, MultipleSimultaneousPatternpropertiesAreValidated1BoxedList, MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap { + @Nullable Object getData(); + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid(Void data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean(boolean data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber(Number data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedString(String data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedList(FrozenList<@Nullable Object> data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap(FrozenMap<@Nullable Object> data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class MultipleSimultaneousPatternpropertiesAreValidated1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MultipleSimultaneousPatternpropertiesAreValidated1BoxedList>, MapSchemaValidator, MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MultipleSimultaneousPatternpropertiesAreValidated1 instance = null; + + protected MultipleSimultaneousPatternpropertiesAreValidated1() { + super(new JsonSchemaInfo() + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("a*"), A.class), + new AbstractMap.SimpleEntry<>(Pattern.compile("aaa*"), Aaa.class) + )) + ); + } + + public static MultipleSimultaneousPatternpropertiesAreValidated1 getInstance() { + if (instance == null) { + instance = new MultipleSimultaneousPatternpropertiesAreValidated1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedString(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedList(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap(validate(arg, configuration)); + } + @Override + public MultipleSimultaneousPatternpropertiesAreValidated1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java new file mode 100644 index 00000000000..096a8d6daf6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java @@ -0,0 +1,146 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class MultipleTypesCanBeSpecifiedInAnArray { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface MultipleTypesCanBeSpecifiedInAnArray1Boxed permits MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber, MultipleTypesCanBeSpecifiedInAnArray1BoxedString { + @Nullable Object getData(); + } + + public record MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber(Number data) implements MultipleTypesCanBeSpecifiedInAnArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record MultipleTypesCanBeSpecifiedInAnArray1BoxedString(String data) implements MultipleTypesCanBeSpecifiedInAnArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class MultipleTypesCanBeSpecifiedInAnArray1 extends JsonSchema implements NumberSchemaValidator, StringSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable MultipleTypesCanBeSpecifiedInAnArray1 instance = null; + + protected MultipleTypesCanBeSpecifiedInAnArray1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class, + String.class + )) + .format("int") + ); + } + + public static MultipleTypesCanBeSpecifiedInAnArray1 getInstance() { + if (instance == null) { + instance = new MultipleTypesCanBeSpecifiedInAnArray1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber(validate(arg, configuration)); + } + @Override + public MultipleTypesCanBeSpecifiedInAnArray1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new MultipleTypesCanBeSpecifiedInAnArray1BoxedString(validate(arg, configuration)); + } + @Override + public MultipleTypesCanBeSpecifiedInAnArray1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java new file mode 100644 index 00000000000..b267ded06cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -0,0 +1,627 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NestedAllofToCheckValidationSemantics { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Schema01 instance = null; + public static Schema01 getInstance() { + if (instance == null) { + instance = new Schema01(); + } + return instance; + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema01.class + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface NestedAllofToCheckValidationSemantics1Boxed permits NestedAllofToCheckValidationSemantics1BoxedVoid, NestedAllofToCheckValidationSemantics1BoxedBoolean, NestedAllofToCheckValidationSemantics1BoxedNumber, NestedAllofToCheckValidationSemantics1BoxedString, NestedAllofToCheckValidationSemantics1BoxedList, NestedAllofToCheckValidationSemantics1BoxedMap { + @Nullable Object getData(); + } + + public record NestedAllofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAllofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAllofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAllofToCheckValidationSemantics1BoxedString(String data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAllofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAllofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedAllofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NestedAllofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedAllofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedAllofToCheckValidationSemantics1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NestedAllofToCheckValidationSemantics1 instance = null; + + protected NestedAllofToCheckValidationSemantics1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class + )) + ); + } + + public static NestedAllofToCheckValidationSemantics1 getInstance() { + if (instance == null) { + instance = new NestedAllofToCheckValidationSemantics1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAllofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); + } + @Override + public NestedAllofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java new file mode 100644 index 00000000000..bfbb4568044 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -0,0 +1,627 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NestedAnyofToCheckValidationSemantics { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Schema01 instance = null; + public static Schema01 getInstance() { + if (instance == null) { + instance = new Schema01(); + } + return instance; + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .anyOf(List.of( + Schema01.class + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface NestedAnyofToCheckValidationSemantics1Boxed permits NestedAnyofToCheckValidationSemantics1BoxedVoid, NestedAnyofToCheckValidationSemantics1BoxedBoolean, NestedAnyofToCheckValidationSemantics1BoxedNumber, NestedAnyofToCheckValidationSemantics1BoxedString, NestedAnyofToCheckValidationSemantics1BoxedList, NestedAnyofToCheckValidationSemantics1BoxedMap { + @Nullable Object getData(); + } + + public record NestedAnyofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAnyofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAnyofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAnyofToCheckValidationSemantics1BoxedString(String data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAnyofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedAnyofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedAnyofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NestedAnyofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedAnyofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedAnyofToCheckValidationSemantics1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NestedAnyofToCheckValidationSemantics1 instance = null; + + protected NestedAnyofToCheckValidationSemantics1() { + super(new JsonSchemaInfo() + .anyOf(List.of( + Schema0.class + )) + ); + } + + public static NestedAnyofToCheckValidationSemantics1 getInstance() { + if (instance == null) { + instance = new NestedAnyofToCheckValidationSemantics1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedAnyofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); + } + @Override + public NestedAnyofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java new file mode 100644 index 00000000000..b20e8740fbc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java @@ -0,0 +1,544 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NestedItems { + // nest classes so all schemas and input/output classes can be public + + + public static class Items3 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Items3 instance = null; + public static Items3 getInstance() { + if (instance == null) { + instance = new Items3(); + } + return instance; + } + } + + + public static class ItemsList extends FrozenList { + protected ItemsList(FrozenList m) { + super(m); + } + public static ItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return Items2.getInstance().validate(arg, configuration); + } + } + + public static class ItemsListBuilder { + // class to build List + private final List list; + + public ItemsListBuilder() { + list = new ArrayList<>(); + } + + public ItemsListBuilder(List list) { + this.list = list; + } + + public ItemsListBuilder add(int item) { + list.add(item); + return this; + } + + public ItemsListBuilder add(float item) { + list.add(item); + return this; + } + + public ItemsListBuilder add(long item) { + list.add(item); + return this; + } + + public ItemsListBuilder add(double item) { + list.add(item); + return this; + } + + public List build() { + return list; + } + } + + + public sealed interface Items2Boxed permits Items2BoxedList { + @Nullable Object getData(); + } + + public record Items2BoxedList(ItemsList data) implements Items2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Items2 extends JsonSchema implements ListSchemaValidator { + private static @Nullable Items2 instance = null; + + protected Items2() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items3.class) + ); + } + + public static Items2 getInstance() { + if (instance == null) { + instance = new Items2(); + } + return instance; + } + + @Override + public ItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof Number)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((Number) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new ItemsList(newInstanceItems); + } + + public ItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Items2BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Items2BoxedList(validate(arg, configuration)); + } + @Override + public Items2Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ItemsList1 extends FrozenList { + protected ItemsList1(FrozenList m) { + super(m); + } + public static ItemsList1 of(List> arg, SchemaConfiguration configuration) throws ValidationException { + return Items1.getInstance().validate(arg, configuration); + } + } + + public static class ItemsListBuilder1 { + // class to build List> + private final List> list; + + public ItemsListBuilder1() { + list = new ArrayList<>(); + } + + public ItemsListBuilder1(List> list) { + this.list = list; + } + + public ItemsListBuilder1 add(List item) { + list.add(item); + return this; + } + + public List> build() { + return list; + } + } + + + public sealed interface Items1Boxed permits Items1BoxedList { + @Nullable Object getData(); + } + + public record Items1BoxedList(ItemsList1 data) implements Items1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Items1 extends JsonSchema implements ListSchemaValidator { + private static @Nullable Items1 instance = null; + + protected Items1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items2.class) + ); + } + + public static Items1 getInstance() { + if (instance == null) { + instance = new Items1(); + } + return instance; + } + + @Override + public ItemsList1 getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof ItemsList)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((ItemsList) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new ItemsList1(newInstanceItems); + } + + public ItemsList1 validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Items1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Items1BoxedList(validate(arg, configuration)); + } + @Override + public Items1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ItemsList2 extends FrozenList { + protected ItemsList2(FrozenList m) { + super(m); + } + public static ItemsList2 of(List>> arg, SchemaConfiguration configuration) throws ValidationException { + return Items.getInstance().validate(arg, configuration); + } + } + + public static class ItemsListBuilder2 { + // class to build List>> + private final List>> list; + + public ItemsListBuilder2() { + list = new ArrayList<>(); + } + + public ItemsListBuilder2(List>> list) { + this.list = list; + } + + public ItemsListBuilder2 add(List> item) { + list.add(item); + return this; + } + + public List>> build() { + return list; + } + } + + + public sealed interface ItemsBoxed permits ItemsBoxedList { + @Nullable Object getData(); + } + + public record ItemsBoxedList(ItemsList2 data) implements ItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Items extends JsonSchema implements ListSchemaValidator { + private static @Nullable Items instance = null; + + protected Items() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items1.class) + ); + } + + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + + @Override + public ItemsList2 getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof ItemsList1)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((ItemsList1) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new ItemsList2(newInstanceItems); + } + + public ItemsList2 validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ItemsBoxedList(validate(arg, configuration)); + } + @Override + public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class NestedItemsList extends FrozenList { + protected NestedItemsList(FrozenList m) { + super(m); + } + public static NestedItemsList of(List>>> arg, SchemaConfiguration configuration) throws ValidationException { + return NestedItems1.getInstance().validate(arg, configuration); + } + } + + public static class NestedItemsListBuilder { + // class to build List>>> + private final List>>> list; + + public NestedItemsListBuilder() { + list = new ArrayList<>(); + } + + public NestedItemsListBuilder(List>>> list) { + this.list = list; + } + + public NestedItemsListBuilder add(List>> item) { + list.add(item); + return this; + } + + public List>>> build() { + return list; + } + } + + + public sealed interface NestedItems1Boxed permits NestedItems1BoxedList { + @Nullable Object getData(); + } + + public record NestedItems1BoxedList(NestedItemsList data) implements NestedItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class NestedItems1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NestedItems1 instance = null; + + protected NestedItems1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + ); + } + + public static NestedItems1 getInstance() { + if (instance == null) { + instance = new NestedItems1(); + } + return instance; + } + + @Override + public NestedItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof ItemsList2)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((ItemsList2) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new NestedItemsList(newInstanceItems); + } + + public NestedItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NestedItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedItems1BoxedList(validate(arg, configuration)); + } + @Override + public NestedItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java new file mode 100644 index 00000000000..0b8592e429b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java @@ -0,0 +1,627 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NestedOneofToCheckValidationSemantics { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Schema01 instance = null; + public static Schema01 getInstance() { + if (instance == null) { + instance = new Schema01(); + } + return instance; + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .oneOf(List.of( + Schema01.class + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface NestedOneofToCheckValidationSemantics1Boxed permits NestedOneofToCheckValidationSemantics1BoxedVoid, NestedOneofToCheckValidationSemantics1BoxedBoolean, NestedOneofToCheckValidationSemantics1BoxedNumber, NestedOneofToCheckValidationSemantics1BoxedString, NestedOneofToCheckValidationSemantics1BoxedList, NestedOneofToCheckValidationSemantics1BoxedMap { + @Nullable Object getData(); + } + + public record NestedOneofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedOneofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedOneofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedOneofToCheckValidationSemantics1BoxedString(String data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedOneofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NestedOneofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedOneofToCheckValidationSemantics1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NestedOneofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedOneofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedOneofToCheckValidationSemantics1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NestedOneofToCheckValidationSemantics1 instance = null; + + protected NestedOneofToCheckValidationSemantics1() { + super(new JsonSchemaInfo() + .oneOf(List.of( + Schema0.class + )) + ); + } + + public static NestedOneofToCheckValidationSemantics1 getInstance() { + if (instance == null) { + instance = new NestedOneofToCheckValidationSemantics1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NestedOneofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); + } + @Override + public NestedOneofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java new file mode 100644 index 00000000000..dea18e11fa4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java @@ -0,0 +1,180 @@ +package unit_test_api.components.schemas; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NotAnyTypeJsonSchema; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NonAsciiPatternWithAdditionalproperties { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { + // NotAnyTypeSchema + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class CircumflexAccentLatinSmallLetterAWithAcute extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable CircumflexAccentLatinSmallLetterAWithAcute instance = null; + public static CircumflexAccentLatinSmallLetterAWithAcute getInstance() { + if (instance == null) { + instance = new CircumflexAccentLatinSmallLetterAWithAcute(); + } + return instance; + } + } + + + public static class NonAsciiPatternWithAdditionalpropertiesMap extends FrozenMap<@Nullable Object> { + protected NonAsciiPatternWithAdditionalpropertiesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of(); + // map with no key value pairs + public static NonAsciiPatternWithAdditionalpropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return NonAsciiPatternWithAdditionalproperties1.getInstance().validate(arg, configuration); + } + } + + public static class NonAsciiPatternWithAdditionalpropertiesMapBuilder implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of(); + public Set getKnownKeys() { + return knownKeys; + } + public NonAsciiPatternWithAdditionalpropertiesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + } + + + public sealed interface NonAsciiPatternWithAdditionalproperties1Boxed permits NonAsciiPatternWithAdditionalproperties1BoxedMap { + @Nullable Object getData(); + } + + public record NonAsciiPatternWithAdditionalproperties1BoxedMap(NonAsciiPatternWithAdditionalpropertiesMap data) implements NonAsciiPatternWithAdditionalproperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NonAsciiPatternWithAdditionalproperties1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NonAsciiPatternWithAdditionalproperties1 instance = null; + + protected NonAsciiPatternWithAdditionalproperties1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .additionalProperties(AdditionalProperties.class) + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("^á"), CircumflexAccentLatinSmallLetterAWithAcute.class) + )) + ); + } + + public static NonAsciiPatternWithAdditionalproperties1 getInstance() { + if (instance == null) { + instance = new NonAsciiPatternWithAdditionalproperties1(); + } + return instance; + } + + public NonAsciiPatternWithAdditionalpropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new NonAsciiPatternWithAdditionalpropertiesMap(castProperties); + } + + public NonAsciiPatternWithAdditionalpropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NonAsciiPatternWithAdditionalproperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NonAsciiPatternWithAdditionalproperties1BoxedMap(validate(arg, configuration)); + } + @Override + public NonAsciiPatternWithAdditionalproperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java new file mode 100644 index 00000000000..d90a59d4740 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java @@ -0,0 +1,2041 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NonInterferenceAcrossCombinedSchemas { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .exclusiveMaximum(0) + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { + @Nullable Object getData(); + } + + public record ThenBoxedVoid(Void data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedBoolean(boolean data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedNumber(Number data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedString(String data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { + private static @Nullable Then instance = null; + + protected Then() { + super(new JsonSchemaInfo() + .minimum(-10) + ); + } + + public static Then getInstance() { + if (instance == null) { + instance = new Then(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedVoid(validate(arg, configuration)); + } + @Override + public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedBoolean(validate(arg, configuration)); + } + @Override + public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedNumber(validate(arg, configuration)); + } + @Override + public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedString(validate(arg, configuration)); + } + @Override + public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedList(validate(arg, configuration)); + } + @Override + public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedMap(validate(arg, configuration)); + } + @Override + public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .then(Then.class) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + @Nullable Object getData(); + } + + public record ElseBoxedVoid(Void data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedNumber(Number data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedString(String data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; + + protected Else() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Else getInstance() { + if (instance == null) { + instance = new Else(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); + } + @Override + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); + } + @Override + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); + } + @Override + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); + } + @Override + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); + } + @Override + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); + } + @Override + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema2Boxed permits Schema2BoxedVoid, Schema2BoxedBoolean, Schema2BoxedNumber, Schema2BoxedString, Schema2BoxedList, Schema2BoxedMap { + @Nullable Object getData(); + } + + public record Schema2BoxedVoid(Void data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema2BoxedBoolean(boolean data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema2BoxedNumber(Number data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema2BoxedString(String data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema2BoxedList(FrozenList<@Nullable Object> data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema2BoxedMap(FrozenMap<@Nullable Object> data) implements Schema2Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema2 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema2BoxedList>, MapSchemaValidator, Schema2BoxedMap> { + private static @Nullable Schema2 instance = null; + + protected Schema2() { + super(new JsonSchemaInfo() + .elseSchema(Else.class) + ); + } + + public static Schema2 getInstance() { + if (instance == null) { + instance = new Schema2(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema2BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema2BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema2BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema2BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedString(validate(arg, configuration)); + } + @Override + public Schema2BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedList(validate(arg, configuration)); + } + @Override + public Schema2BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema2BoxedMap(validate(arg, configuration)); + } + @Override + public Schema2Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface NonInterferenceAcrossCombinedSchemas1Boxed permits NonInterferenceAcrossCombinedSchemas1BoxedVoid, NonInterferenceAcrossCombinedSchemas1BoxedBoolean, NonInterferenceAcrossCombinedSchemas1BoxedNumber, NonInterferenceAcrossCombinedSchemas1BoxedString, NonInterferenceAcrossCombinedSchemas1BoxedList, NonInterferenceAcrossCombinedSchemas1BoxedMap { + @Nullable Object getData(); + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedVoid(Void data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedBoolean(boolean data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedNumber(Number data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedString(String data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedList(FrozenList<@Nullable Object> data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NonInterferenceAcrossCombinedSchemas1BoxedMap(FrozenMap<@Nullable Object> data) implements NonInterferenceAcrossCombinedSchemas1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NonInterferenceAcrossCombinedSchemas1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NonInterferenceAcrossCombinedSchemas1BoxedList>, MapSchemaValidator, NonInterferenceAcrossCombinedSchemas1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NonInterferenceAcrossCombinedSchemas1 instance = null; + + protected NonInterferenceAcrossCombinedSchemas1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class, + Schema2.class + )) + ); + } + + public static NonInterferenceAcrossCombinedSchemas1 getInstance() { + if (instance == null) { + instance = new NonInterferenceAcrossCombinedSchemas1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedVoid(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedNumber(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedString(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedList(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NonInterferenceAcrossCombinedSchemas1BoxedMap(validate(arg, configuration)); + } + @Override + public NonInterferenceAcrossCombinedSchemas1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java new file mode 100644 index 00000000000..dafd2ee2142 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java @@ -0,0 +1,338 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Not { + // nest classes so all schemas and input/output classes can be public + + + public static class Not2 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Not2 instance = null; + public static Not2 getInstance() { + if (instance == null) { + instance = new Not2(); + } + return instance; + } + } + + + public sealed interface Not1Boxed permits Not1BoxedVoid, Not1BoxedBoolean, Not1BoxedNumber, Not1BoxedString, Not1BoxedList, Not1BoxedMap { + @Nullable Object getData(); + } + + public record Not1BoxedVoid(Void data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Not1BoxedBoolean(boolean data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Not1BoxedNumber(Number data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Not1BoxedString(String data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Not1BoxedList(FrozenList<@Nullable Object> data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Not1BoxedMap(FrozenMap<@Nullable Object> data) implements Not1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Not1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Not1BoxedList>, MapSchemaValidator, Not1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Not1 instance = null; + + protected Not1() { + super(new JsonSchemaInfo() + .not(Not2.class) + ); + } + + public static Not1 getInstance() { + if (instance == null) { + instance = new Not1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Not1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedVoid(validate(arg, configuration)); + } + @Override + public Not1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Not1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedNumber(validate(arg, configuration)); + } + @Override + public Not1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedString(validate(arg, configuration)); + } + @Override + public Not1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedList(validate(arg, configuration)); + } + @Override + public Not1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Not1BoxedMap(validate(arg, configuration)); + } + @Override + public Not1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java new file mode 100644 index 00000000000..66f737f2546 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java @@ -0,0 +1,497 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NotMoreComplexSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class NotMap extends FrozenMap<@Nullable Object> { + protected NotMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static NotMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Not.getInstance().validate(arg, configuration); + } + + public String foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class NotMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public NotMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public NotMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public NotMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface NotBoxed permits NotBoxedMap { + @Nullable Object getData(); + } + + public record NotBoxedMap(NotMap data) implements NotBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Not extends JsonSchema implements MapSchemaValidator { + private static @Nullable Not instance = null; + + protected Not() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static Not getInstance() { + if (instance == null) { + instance = new Not(); + } + return instance; + } + + public NotMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new NotMap(castProperties); + } + + public NotMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NotBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NotBoxedMap(validate(arg, configuration)); + } + @Override + public NotBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + + public sealed interface NotMoreComplexSchema1Boxed permits NotMoreComplexSchema1BoxedVoid, NotMoreComplexSchema1BoxedBoolean, NotMoreComplexSchema1BoxedNumber, NotMoreComplexSchema1BoxedString, NotMoreComplexSchema1BoxedList, NotMoreComplexSchema1BoxedMap { + @Nullable Object getData(); + } + + public record NotMoreComplexSchema1BoxedVoid(Void data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMoreComplexSchema1BoxedBoolean(boolean data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMoreComplexSchema1BoxedNumber(Number data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMoreComplexSchema1BoxedString(String data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMoreComplexSchema1BoxedList(FrozenList<@Nullable Object> data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMoreComplexSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements NotMoreComplexSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NotMoreComplexSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotMoreComplexSchema1BoxedList>, MapSchemaValidator, NotMoreComplexSchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NotMoreComplexSchema1 instance = null; + + protected NotMoreComplexSchema1() { + super(new JsonSchemaInfo() + .not(Not.class) + ); + } + + public static NotMoreComplexSchema1 getInstance() { + if (instance == null) { + instance = new NotMoreComplexSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NotMoreComplexSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedString(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedList(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMoreComplexSchema1BoxedMap(validate(arg, configuration)); + } + @Override + public NotMoreComplexSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java new file mode 100644 index 00000000000..7210bf455e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java @@ -0,0 +1,448 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NotMultipleTypes { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface NotBoxed permits NotBoxedNumber, NotBoxedBoolean { + @Nullable Object getData(); + } + + public record NotBoxedNumber(Number data) implements NotBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotBoxedBoolean(boolean data) implements NotBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Not extends JsonSchema implements NumberSchemaValidator, BooleanSchemaValidator { + private static @Nullable Not instance = null; + + protected Not() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class, + Boolean.class + )) + .format("int") + ); + } + + public static Not getInstance() { + if (instance == null) { + instance = new Not(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NotBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NotBoxedNumber(validate(arg, configuration)); + } + @Override + public NotBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NotBoxedBoolean(validate(arg, configuration)); + } + @Override + public NotBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface NotMultipleTypes1Boxed permits NotMultipleTypes1BoxedVoid, NotMultipleTypes1BoxedBoolean, NotMultipleTypes1BoxedNumber, NotMultipleTypes1BoxedString, NotMultipleTypes1BoxedList, NotMultipleTypes1BoxedMap { + @Nullable Object getData(); + } + + public record NotMultipleTypes1BoxedVoid(Void data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMultipleTypes1BoxedBoolean(boolean data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMultipleTypes1BoxedNumber(Number data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMultipleTypes1BoxedString(String data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMultipleTypes1BoxedList(FrozenList<@Nullable Object> data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record NotMultipleTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements NotMultipleTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class NotMultipleTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotMultipleTypes1BoxedList>, MapSchemaValidator, NotMultipleTypes1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NotMultipleTypes1 instance = null; + + protected NotMultipleTypes1() { + super(new JsonSchemaInfo() + .not(Not.class) + ); + } + + public static NotMultipleTypes1 getInstance() { + if (instance == null) { + instance = new NotMultipleTypes1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NotMultipleTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedVoid(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedBoolean(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedNumber(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedString(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedList(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NotMultipleTypes1BoxedMap(validate(arg, configuration)); + } + @Override + public NotMultipleTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java new file mode 100644 index 00000000000..a6a140e57c3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java @@ -0,0 +1,118 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringEnumValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.StringValueMethod; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class NulCharactersInStrings { + // nest classes so all schemas and input/output classes can be public + + public enum StringNulCharactersInStringsEnums implements StringValueMethod { + HELLO_NULL_THERE("hello\0there"); + private final String value; + + StringNulCharactersInStringsEnums(String value) { + this.value = value; + } + public String value() { + return this.value; + } + } + + + public sealed interface NulCharactersInStrings1Boxed permits NulCharactersInStrings1BoxedString { + @Nullable Object getData(); + } + + public record NulCharactersInStrings1BoxedString(String data) implements NulCharactersInStrings1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class NulCharactersInStrings1 extends JsonSchema implements StringSchemaValidator, StringEnumValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable NulCharactersInStrings1 instance = null; + + protected NulCharactersInStrings1() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .enumValues(SetMaker.makeSet( + "hello\0there" + )) + ); + } + + public static NulCharactersInStrings1 getInstance() { + if (instance == null) { + instance = new NulCharactersInStrings1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public String validate(StringNulCharactersInStringsEnums arg,SchemaConfiguration configuration) throws ValidationException { + return validate(arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public NulCharactersInStrings1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NulCharactersInStrings1BoxedString(validate(arg, configuration)); + } + @Override + public NulCharactersInStrings1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java new file mode 100644 index 00000000000..8bbbe1c483b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.NullJsonSchema; + +public class NullTypeMatchesOnlyTheNullObject extends NullJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class NullTypeMatchesOnlyTheNullObject1 extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable NullTypeMatchesOnlyTheNullObject1 instance = null; + public static NullTypeMatchesOnlyTheNullObject1 getInstance() { + if (instance == null) { + instance = new NullTypeMatchesOnlyTheNullObject1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java new file mode 100644 index 00000000000..86af9ace4a4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.NumberJsonSchema; + +public class NumberTypeMatchesNumbers extends NumberJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class NumberTypeMatchesNumbers1 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable NumberTypeMatchesNumbers1 instance = null; + public static NumberTypeMatchesNumbers1 getInstance() { + if (instance == null) { + instance = new NumberTypeMatchesNumbers1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java new file mode 100644 index 00000000000..e6ce77a33d8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java @@ -0,0 +1,466 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ObjectPropertiesValidation { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Bar extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class ObjectPropertiesValidationMap extends FrozenMap<@Nullable Object> { + protected ObjectPropertiesValidationMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo", + "bar" + ); + public static ObjectPropertiesValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return ObjectPropertiesValidation1.getInstance().validate(arg, configuration); + } + + public Number foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (Number) value; + } + + public String bar() throws UnsetPropertyException { + String key = "bar"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class ObjectPropertiesValidationMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public ObjectPropertiesValidationMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public ObjectPropertiesValidationMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public ObjectPropertiesValidationMapBuilder getBuilderAfterBar(Map instance) { + return this; + } + public ObjectPropertiesValidationMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface ObjectPropertiesValidation1Boxed permits ObjectPropertiesValidation1BoxedVoid, ObjectPropertiesValidation1BoxedBoolean, ObjectPropertiesValidation1BoxedNumber, ObjectPropertiesValidation1BoxedString, ObjectPropertiesValidation1BoxedList, ObjectPropertiesValidation1BoxedMap { + @Nullable Object getData(); + } + + public record ObjectPropertiesValidation1BoxedVoid(Void data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ObjectPropertiesValidation1BoxedBoolean(boolean data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ObjectPropertiesValidation1BoxedNumber(Number data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ObjectPropertiesValidation1BoxedString(String data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ObjectPropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ObjectPropertiesValidation1BoxedMap(ObjectPropertiesValidationMap data) implements ObjectPropertiesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ObjectPropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ObjectPropertiesValidation1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ObjectPropertiesValidation1 instance = null; + + protected ObjectPropertiesValidation1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + ); + } + + public static ObjectPropertiesValidation1 getInstance() { + if (instance == null) { + instance = new ObjectPropertiesValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ObjectPropertiesValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new ObjectPropertiesValidationMap(castProperties); + } + + public ObjectPropertiesValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ObjectPropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedString(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedList(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectPropertiesValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public ObjectPropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java new file mode 100644 index 00000000000..a373c375bdd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java @@ -0,0 +1,20 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.MapJsonSchema; +import unit_test_api.schemas.validation.FrozenMap; + +public class ObjectTypeMatchesObjects extends MapJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class ObjectTypeMatchesObjects1 extends MapJsonSchema.MapJsonSchema1 { + private static @Nullable ObjectTypeMatchesObjects1 instance = null; + public static ObjectTypeMatchesObjects1 getInstance() { + if (instance == null) { + instance = new ObjectTypeMatchesObjects1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java new file mode 100644 index 00000000000..45dcfee8933 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java @@ -0,0 +1,626 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class Oneof { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .minimum(2) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Oneof1Boxed permits Oneof1BoxedVoid, Oneof1BoxedBoolean, Oneof1BoxedNumber, Oneof1BoxedString, Oneof1BoxedList, Oneof1BoxedMap { + @Nullable Object getData(); + } + + public record Oneof1BoxedVoid(Void data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Oneof1BoxedBoolean(boolean data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Oneof1BoxedNumber(Number data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Oneof1BoxedString(String data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Oneof1BoxedList(FrozenList<@Nullable Object> data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Oneof1BoxedMap(FrozenMap<@Nullable Object> data) implements Oneof1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Oneof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Oneof1BoxedList>, MapSchemaValidator, Oneof1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable Oneof1 instance = null; + + protected Oneof1() { + super(new JsonSchemaInfo() + .oneOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static Oneof1 getInstance() { + if (instance == null) { + instance = new Oneof1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Oneof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedVoid(validate(arg, configuration)); + } + @Override + public Oneof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Oneof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedNumber(validate(arg, configuration)); + } + @Override + public Oneof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedString(validate(arg, configuration)); + } + @Override + public Oneof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedList(validate(arg, configuration)); + } + @Override + public Oneof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Oneof1BoxedMap(validate(arg, configuration)); + } + @Override + public Oneof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java new file mode 100644 index 00000000000..e4e77c6e410 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java @@ -0,0 +1,1098 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class OneofComplexTypes { + // nest classes so all schemas and input/output classes can be public + + + public static class Bar extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar" + ); + public static final Set optionalKeys = Set.of(); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public Number bar() { + @Nullable Object value = get("bar"); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema0MapBuilder implements SetterForBar { + private final Map instance; + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema0Map0Builder getBuilderAfterBar(Map instance) { + return new Schema0Map0Builder(instance); + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "bar" + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Schema1Map extends FrozenMap<@Nullable Object> { + protected Schema1Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema1.getInstance().validate(arg, configuration); + } + + public String foo() { + @Nullable Object value = get("foo"); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema1Map0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema1MapBuilder implements SetterForFoo { + private final Map instance; + public Schema1MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema1Map0Builder getBuilderAfterFoo(Map instance) { + return new Schema1Map0Builder(instance); + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .required(Set.of( + "foo" + )) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema1Map(castProperties); + } + + public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface OneofComplexTypes1Boxed permits OneofComplexTypes1BoxedVoid, OneofComplexTypes1BoxedBoolean, OneofComplexTypes1BoxedNumber, OneofComplexTypes1BoxedString, OneofComplexTypes1BoxedList, OneofComplexTypes1BoxedMap { + @Nullable Object getData(); + } + + public record OneofComplexTypes1BoxedVoid(Void data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofComplexTypes1BoxedBoolean(boolean data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofComplexTypes1BoxedNumber(Number data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofComplexTypes1BoxedString(String data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofComplexTypes1BoxedList(FrozenList<@Nullable Object> data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofComplexTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofComplexTypes1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class OneofComplexTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, OneofComplexTypes1BoxedList>, MapSchemaValidator, OneofComplexTypes1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable OneofComplexTypes1 instance = null; + + protected OneofComplexTypes1() { + super(new JsonSchemaInfo() + .oneOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static OneofComplexTypes1 getInstance() { + if (instance == null) { + instance = new OneofComplexTypes1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public OneofComplexTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedVoid(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedBoolean(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedNumber(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedString(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedList(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofComplexTypes1BoxedMap(validate(arg, configuration)); + } + @Override + public OneofComplexTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java new file mode 100644 index 00000000000..1ee2a187b15 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java @@ -0,0 +1,669 @@ +package unit_test_api.components.schemas; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class OneofWithBaseSchema { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .minLength(2) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .maxLength(4) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface OneofWithBaseSchema1Boxed permits OneofWithBaseSchema1BoxedString { + @Nullable Object getData(); + } + + public record OneofWithBaseSchema1BoxedString(String data) implements OneofWithBaseSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class OneofWithBaseSchema1 extends JsonSchema implements StringSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable OneofWithBaseSchema1 instance = null; + + protected OneofWithBaseSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .oneOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static OneofWithBaseSchema1 getInstance() { + if (instance == null) { + instance = new OneofWithBaseSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public OneofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithBaseSchema1BoxedString(validate(arg, configuration)); + } + @Override + public OneofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java new file mode 100644 index 00000000000..f353c280af7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java @@ -0,0 +1,352 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class OneofWithEmptySchema { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface OneofWithEmptySchema1Boxed permits OneofWithEmptySchema1BoxedVoid, OneofWithEmptySchema1BoxedBoolean, OneofWithEmptySchema1BoxedNumber, OneofWithEmptySchema1BoxedString, OneofWithEmptySchema1BoxedList, OneofWithEmptySchema1BoxedMap { + @Nullable Object getData(); + } + + public record OneofWithEmptySchema1BoxedVoid(Void data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofWithEmptySchema1BoxedBoolean(boolean data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofWithEmptySchema1BoxedNumber(Number data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofWithEmptySchema1BoxedString(String data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofWithEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record OneofWithEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofWithEmptySchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class OneofWithEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, OneofWithEmptySchema1BoxedList>, MapSchemaValidator, OneofWithEmptySchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable OneofWithEmptySchema1 instance = null; + + protected OneofWithEmptySchema1() { + super(new JsonSchemaInfo() + .oneOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static OneofWithEmptySchema1 getInstance() { + if (instance == null) { + instance = new OneofWithEmptySchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public OneofWithEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedString(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedList(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithEmptySchema1BoxedMap(validate(arg, configuration)); + } + @Override + public OneofWithEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java new file mode 100644 index 00000000000..59590380e1f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java @@ -0,0 +1,1143 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class OneofWithRequired { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema0Map extends FrozenMap<@Nullable Object> { + protected Schema0Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "bar", + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema0.getInstance().validate(arg, configuration); + } + + public @Nullable Object bar() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object foo() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(Void value) { + var instance = getInstance(); + instance.put("bar", null); + return getBuilderAfterBar(instance); + } + + default T bar(boolean value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(List value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(Map value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class Schema0Map00Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "bar", + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema0Map00Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map00Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema0Map01Builder implements SetterForFoo { + private final Map instance; + public Schema0Map01Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map00Builder getBuilderAfterFoo(Map instance) { + return new Schema0Map00Builder(instance); + } + } + + public static class Schema0Map10Builder implements SetterForBar { + private final Map instance; + public Schema0Map10Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public Schema0Map00Builder getBuilderAfterBar(Map instance) { + return new Schema0Map00Builder(instance); + } + } + + public static class Schema0MapBuilder implements SetterForBar, SetterForFoo { + private final Map instance; + public Schema0MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema0Map01Builder getBuilderAfterBar(Map instance) { + return new Schema0Map01Builder(instance); + } + public Schema0Map10Builder getBuilderAfterFoo(Map instance) { + return new Schema0Map10Builder(instance); + } + } + + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .required(Set.of( + "bar", + "foo" + )) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema0Map(castProperties); + } + + public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Schema1Map extends FrozenMap<@Nullable Object> { + protected Schema1Map(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "baz", + "foo" + ); + public static final Set optionalKeys = Set.of(); + public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return Schema1.getInstance().validate(arg, configuration); + } + + public @Nullable Object baz() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object foo() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForBaz { + Map getInstance(); + T getBuilderAfterBaz(Map instance); + + default T baz(Void value) { + var instance = getInstance(); + instance.put("baz", null); + return getBuilderAfterBaz(instance); + } + + default T baz(boolean value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(String value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(int value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(float value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(long value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(double value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(List value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + + default T baz(Map value) { + var instance = getInstance(); + instance.put("baz", value); + return getBuilderAfterBaz(instance); + } + } + + public interface SetterForFoo1 { + Map getInstance(); + T getBuilderAfterFoo1(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo1(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo1(instance); + } + } + + public static class Schema1Map00Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "baz", + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public Schema1Map00Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map00Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class Schema1Map01Builder implements SetterForFoo1 { + private final Map instance; + public Schema1Map01Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map00Builder getBuilderAfterFoo1(Map instance) { + return new Schema1Map00Builder(instance); + } + } + + public static class Schema1Map10Builder implements SetterForBaz { + private final Map instance; + public Schema1Map10Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public Schema1Map00Builder getBuilderAfterBaz(Map instance) { + return new Schema1Map00Builder(instance); + } + } + + public static class Schema1MapBuilder implements SetterForBaz, SetterForFoo1 { + private final Map instance; + public Schema1MapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public Schema1Map01Builder getBuilderAfterBaz(Map instance) { + return new Schema1Map01Builder(instance); + } + public Schema1Map10Builder getBuilderAfterFoo1(Map instance) { + return new Schema1Map10Builder(instance); + } + } + + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .required(Set.of( + "baz", + "foo" + )) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new Schema1Map(castProperties); + } + + public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface OneofWithRequired1Boxed permits OneofWithRequired1BoxedMap { + @Nullable Object getData(); + } + + public record OneofWithRequired1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofWithRequired1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class OneofWithRequired1 extends JsonSchema implements MapSchemaValidator, OneofWithRequired1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable OneofWithRequired1 instance = null; + + protected OneofWithRequired1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .oneOf(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static OneofWithRequired1 getInstance() { + if (instance == null) { + instance = new OneofWithRequired1(); + } + return instance; + } + + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public OneofWithRequired1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new OneofWithRequired1BoxedMap(validate(arg, configuration)); + } + @Override + public OneofWithRequired1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java new file mode 100644 index 00000000000..88ee8711a13 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java @@ -0,0 +1,330 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PatternIsNotAnchored { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface PatternIsNotAnchored1Boxed permits PatternIsNotAnchored1BoxedVoid, PatternIsNotAnchored1BoxedBoolean, PatternIsNotAnchored1BoxedNumber, PatternIsNotAnchored1BoxedString, PatternIsNotAnchored1BoxedList, PatternIsNotAnchored1BoxedMap { + @Nullable Object getData(); + } + + public record PatternIsNotAnchored1BoxedVoid(Void data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternIsNotAnchored1BoxedBoolean(boolean data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternIsNotAnchored1BoxedNumber(Number data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternIsNotAnchored1BoxedString(String data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternIsNotAnchored1BoxedList(FrozenList<@Nullable Object> data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternIsNotAnchored1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternIsNotAnchored1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PatternIsNotAnchored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternIsNotAnchored1BoxedList>, MapSchemaValidator, PatternIsNotAnchored1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PatternIsNotAnchored1 instance = null; + + protected PatternIsNotAnchored1() { + super(new JsonSchemaInfo() + .pattern(Pattern.compile( + "a+" + )) + ); + } + + public static PatternIsNotAnchored1 getInstance() { + if (instance == null) { + instance = new PatternIsNotAnchored1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PatternIsNotAnchored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedVoid(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedNumber(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedString(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedList(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternIsNotAnchored1BoxedMap(validate(arg, configuration)); + } + @Override + public PatternIsNotAnchored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java new file mode 100644 index 00000000000..3c7f6d5a51c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java @@ -0,0 +1,330 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PatternValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface PatternValidation1Boxed permits PatternValidation1BoxedVoid, PatternValidation1BoxedBoolean, PatternValidation1BoxedNumber, PatternValidation1BoxedString, PatternValidation1BoxedList, PatternValidation1BoxedMap { + @Nullable Object getData(); + } + + public record PatternValidation1BoxedVoid(Void data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternValidation1BoxedBoolean(boolean data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternValidation1BoxedNumber(Number data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternValidation1BoxedString(String data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternValidation1BoxedList(FrozenList<@Nullable Object> data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PatternValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternValidation1BoxedList>, MapSchemaValidator, PatternValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PatternValidation1 instance = null; + + protected PatternValidation1() { + super(new JsonSchemaInfo() + .pattern(Pattern.compile( + "^a*$" + )) + ); + } + + public static PatternValidation1 getInstance() { + if (instance == null) { + instance = new PatternValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PatternValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public PatternValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PatternValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public PatternValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedString(validate(arg, configuration)); + } + @Override + public PatternValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedList(validate(arg, configuration)); + } + @Override + public PatternValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public PatternValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java new file mode 100644 index 00000000000..3560cab005d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java @@ -0,0 +1,343 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PatternpropertiesValidatesPropertiesMatchingARegex { + // nest classes so all schemas and input/output classes can be public + + + public static class Fo extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Fo instance = null; + public static Fo getInstance() { + if (instance == null) { + instance = new Fo(); + } + return instance; + } + } + + + public sealed interface PatternpropertiesValidatesPropertiesMatchingARegex1Boxed permits PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap { + @Nullable Object getData(); + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid(Void data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean(boolean data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber(Number data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString(String data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList(FrozenList<@Nullable Object> data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PatternpropertiesValidatesPropertiesMatchingARegex1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList>, MapSchemaValidator, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PatternpropertiesValidatesPropertiesMatchingARegex1 instance = null; + + protected PatternpropertiesValidatesPropertiesMatchingARegex1() { + super(new JsonSchemaInfo() + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("f.*o"), Fo.class) + )) + ); + } + + public static PatternpropertiesValidatesPropertiesMatchingARegex1 getInstance() { + if (instance == null) { + instance = new PatternpropertiesValidatesPropertiesMatchingARegex1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap(validate(arg, configuration)); + } + @Override + public PatternpropertiesValidatesPropertiesMatchingARegex1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java new file mode 100644 index 00000000000..52427b682f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java @@ -0,0 +1,343 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PatternpropertiesWithNullValuedInstanceProperties { + // nest classes so all schemas and input/output classes can be public + + + public static class Bar extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public sealed interface PatternpropertiesWithNullValuedInstanceProperties1Boxed permits PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid, PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean, PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber, PatternpropertiesWithNullValuedInstanceProperties1BoxedString, PatternpropertiesWithNullValuedInstanceProperties1BoxedList, PatternpropertiesWithNullValuedInstanceProperties1BoxedMap { + @Nullable Object getData(); + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PatternpropertiesWithNullValuedInstanceProperties1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PatternpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternpropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator, PatternpropertiesWithNullValuedInstanceProperties1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PatternpropertiesWithNullValuedInstanceProperties1 instance = null; + + protected PatternpropertiesWithNullValuedInstanceProperties1() { + super(new JsonSchemaInfo() + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("^.*bar$"), Bar.class) + )) + ); + } + + public static PatternpropertiesWithNullValuedInstanceProperties1 getInstance() { + if (instance == null) { + instance = new PatternpropertiesWithNullValuedInstanceProperties1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PatternpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); + } + @Override + public PatternpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java new file mode 100644 index 00000000000..3e1c9aef782 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java @@ -0,0 +1,198 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PrefixitemsValidationAdjustsTheStartingIndexForItems { + // nest classes so all schemas and input/output classes can be public + + + public static class Items extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable Items instance = null; + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + } + + + public static class PrefixitemsValidationAdjustsTheStartingIndexForItemsList extends FrozenList { + protected PrefixitemsValidationAdjustsTheStartingIndexForItemsList(FrozenList m) { + super(m); + } + public static PrefixitemsValidationAdjustsTheStartingIndexForItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance().validate(arg, configuration); + } + } + + public static class PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder { + // class to build List + private final List list; + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder() { + list = new ArrayList<>(); + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder(List list) { + this.list = list; + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(int item) { + list.add(item); + return this; + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(float item) { + list.add(item); + return this; + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(long item) { + list.add(item); + return this; + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(double item) { + list.add(item); + return this; + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(String item) { + list.add(item); + return this; + } + + public List build() { + return list; + } + } + + + public static class Schema0 extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed permits PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList { + @Nullable Object getData(); + } + + public record PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList(PrefixitemsValidationAdjustsTheStartingIndexForItemsList data) implements PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class PrefixitemsValidationAdjustsTheStartingIndexForItems1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PrefixitemsValidationAdjustsTheStartingIndexForItems1 instance = null; + + protected PrefixitemsValidationAdjustsTheStartingIndexForItems1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + .prefixItems(List.of( + Schema0.class + )) + ); + } + + public static PrefixitemsValidationAdjustsTheStartingIndexForItems1 getInstance() { + if (instance == null) { + instance = new PrefixitemsValidationAdjustsTheStartingIndexForItems1(); + } + return instance; + } + + @Override + public PrefixitemsValidationAdjustsTheStartingIndexForItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof Object)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((Object) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new PrefixitemsValidationAdjustsTheStartingIndexForItemsList(newInstanceItems); + } + + public PrefixitemsValidationAdjustsTheStartingIndexForItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList(validate(arg, configuration)); + } + @Override + public PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java new file mode 100644 index 00000000000..226d6575318 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java @@ -0,0 +1,413 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PrefixitemsWithNullInstanceElements { + // nest classes so all schemas and input/output classes can be public + + + public static class PrefixitemsWithNullInstanceElementsList extends FrozenList<@Nullable Object> { + protected PrefixitemsWithNullInstanceElementsList(FrozenList<@Nullable Object> m) { + super(m); + } + public static PrefixitemsWithNullInstanceElementsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return PrefixitemsWithNullInstanceElements1.getInstance().validate(arg, configuration); + } + } + + public static class PrefixitemsWithNullInstanceElementsListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public PrefixitemsWithNullInstanceElementsListBuilder() { + list = new ArrayList<>(); + } + + public PrefixitemsWithNullInstanceElementsListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(Void item) { + list.add(null); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(boolean item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(String item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(int item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(float item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(long item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(double item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(List item) { + list.add(item); + return this; + } + + public PrefixitemsWithNullInstanceElementsListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public static class Schema0 extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public sealed interface PrefixitemsWithNullInstanceElements1Boxed permits PrefixitemsWithNullInstanceElements1BoxedVoid, PrefixitemsWithNullInstanceElements1BoxedBoolean, PrefixitemsWithNullInstanceElements1BoxedNumber, PrefixitemsWithNullInstanceElements1BoxedString, PrefixitemsWithNullInstanceElements1BoxedList, PrefixitemsWithNullInstanceElements1BoxedMap { + @Nullable Object getData(); + } + + public record PrefixitemsWithNullInstanceElements1BoxedVoid(Void data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PrefixitemsWithNullInstanceElements1BoxedBoolean(boolean data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PrefixitemsWithNullInstanceElements1BoxedNumber(Number data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PrefixitemsWithNullInstanceElements1BoxedString(String data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PrefixitemsWithNullInstanceElements1BoxedList(PrefixitemsWithNullInstanceElementsList data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PrefixitemsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements PrefixitemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PrefixitemsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, PrefixitemsWithNullInstanceElements1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PrefixitemsWithNullInstanceElements1 instance = null; + + protected PrefixitemsWithNullInstanceElements1() { + super(new JsonSchemaInfo() + .prefixItems(List.of( + Schema0.class + )) + ); + } + + public static PrefixitemsWithNullInstanceElements1 getInstance() { + if (instance == null) { + instance = new PrefixitemsWithNullInstanceElements1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public PrefixitemsWithNullInstanceElementsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new PrefixitemsWithNullInstanceElementsList(newInstanceItems); + } + + public PrefixitemsWithNullInstanceElementsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedString(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PrefixitemsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); + } + @Override + public PrefixitemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java new file mode 100644 index 00000000000..5691d24dabf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java @@ -0,0 +1,673 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.ListJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertiesPatternpropertiesAdditionalpropertiesInteraction { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends IntJsonSchema.IntJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public sealed interface FoBoxed permits FoBoxedVoid, FoBoxedBoolean, FoBoxedNumber, FoBoxedString, FoBoxedList, FoBoxedMap { + @Nullable Object getData(); + } + + public record FoBoxedVoid(Void data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoBoxedBoolean(boolean data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoBoxedNumber(Number data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoBoxedString(String data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoBoxedList(FrozenList<@Nullable Object> data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record FoBoxedMap(FrozenMap<@Nullable Object> data) implements FoBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Fo extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FoBoxedList>, MapSchemaValidator, FoBoxedMap> { + private static @Nullable Fo instance = null; + + protected Fo() { + super(new JsonSchemaInfo() + .minItems(2) + ); + } + + public static Fo getInstance() { + if (instance == null) { + instance = new Fo(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FoBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedVoid(validate(arg, configuration)); + } + @Override + public FoBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedBoolean(validate(arg, configuration)); + } + @Override + public FoBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedNumber(validate(arg, configuration)); + } + @Override + public FoBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedString(validate(arg, configuration)); + } + @Override + public FoBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedList(validate(arg, configuration)); + } + @Override + public FoBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FoBoxedMap(validate(arg, configuration)); + } + @Override + public FoBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface FooBoxed permits FooBoxedList { + @Nullable Object getData(); + } + + public record FooBoxedList(FrozenList<@Nullable Object> data) implements FooBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class Foo extends JsonSchema implements ListSchemaValidator, FooBoxedList> { + private static @Nullable Foo instance = null; + + protected Foo() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .maxItems(3) + ); + } + + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public FooBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FooBoxedList(validate(arg, configuration)); + } + @Override + public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Bar extends ListJsonSchema.ListJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMap extends FrozenMap { + protected PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(FrozenMap m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo", + "bar" + ); + public static PropertiesPatternpropertiesAdditionalpropertiesInteractionMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance().validate(arg, configuration); + } + + public FrozenList foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + Object value = get(key); + if (!(value instanceof FrozenList)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (FrozenList) value; + } + + public FrozenList bar() throws UnsetPropertyException { + String key = "bar"; + throwIfKeyNotPresent(key); + Object value = get(key); + if (!(value instanceof FrozenList)) { + throw new RuntimeException("Invalid value stored for bar"); + } + return (FrozenList) value; + } + + public Number getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + var value = getOrThrow(name); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for " + name); + } + return (Number) value; + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(List<@Nullable Object> value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(List<@Nullable Object> value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder implements GenericBuilder>, SetterForFoo, SetterForBar, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterBar(Map instance) { + return this; + } + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed permits PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap { + @Nullable Object getData(); + } + + public record PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap(PropertiesPatternpropertiesAdditionalpropertiesInteractionMap data) implements PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertiesPatternpropertiesAdditionalpropertiesInteraction1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertiesPatternpropertiesAdditionalpropertiesInteraction1 instance = null; + + protected PropertiesPatternpropertiesAdditionalpropertiesInteraction1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + .additionalProperties(AdditionalProperties.class) + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("f.o"), Fo.class) + )) + ); + } + + public static PropertiesPatternpropertiesAdditionalpropertiesInteraction1 getInstance() { + if (instance == null) { + instance = new PropertiesPatternpropertiesAdditionalpropertiesInteraction1(); + } + return instance; + } + + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + if (!(propertyInstance instanceof Object)) { + throw new RuntimeException("Invalid instantiated value"); + } + properties.put(propertyName, (Object) propertyInstance); + } + FrozenMap castProperties = new FrozenMap<>(properties); + return new PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(castProperties); + } + + public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java new file mode 100644 index 00000000000..5832d590dc9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -0,0 +1,913 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertiesWhoseNamesAreJavascriptObjectPropertyNames { + // nest classes so all schemas and input/output classes can be public + + + public static class Proto extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Proto instance = null; + public static Proto getInstance() { + if (instance == null) { + instance = new Proto(); + } + return instance; + } + } + + + public static class Length extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Length instance = null; + public static Length getInstance() { + if (instance == null) { + instance = new Length(); + } + return instance; + } + } + + + public static class ToStringMap extends FrozenMap<@Nullable Object> { + protected ToStringMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "length" + ); + public static ToStringMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return ToString.getInstance().validate(arg, configuration); + } + + public String length() throws UnsetPropertyException { + String key = "length"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for length"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForLength { + Map getInstance(); + T getBuilderAfterLength(Map instance); + + default T length(String value) { + var instance = getInstance(); + instance.put("length", value); + return getBuilderAfterLength(instance); + } + } + + public static class ToStringMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForLength { + private final Map instance; + private static final Set knownKeys = Set.of( + "length" + ); + public Set getKnownKeys() { + return knownKeys; + } + public ToStringMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public ToStringMapBuilder getBuilderAfterLength(Map instance) { + return this; + } + public ToStringMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface ToStringBoxed permits ToStringBoxedVoid, ToStringBoxedBoolean, ToStringBoxedNumber, ToStringBoxedString, ToStringBoxedList, ToStringBoxedMap { + @Nullable Object getData(); + } + + public record ToStringBoxedVoid(Void data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ToStringBoxedBoolean(boolean data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ToStringBoxedNumber(Number data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ToStringBoxedString(String data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ToStringBoxedList(FrozenList<@Nullable Object> data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ToStringBoxedMap(ToStringMap data) implements ToStringBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ToString extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringBoxedList>, MapSchemaValidator { + private static @Nullable ToString instance = null; + + protected ToString() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("length", Length.class) + )) + ); + } + + public static ToString getInstance() { + if (instance == null) { + instance = new ToString(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ToStringMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new ToStringMap(castProperties); + } + + public ToStringMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ToStringBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedVoid(validate(arg, configuration)); + } + @Override + public ToStringBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedBoolean(validate(arg, configuration)); + } + @Override + public ToStringBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedNumber(validate(arg, configuration)); + } + @Override + public ToStringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedString(validate(arg, configuration)); + } + @Override + public ToStringBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedList(validate(arg, configuration)); + } + @Override + public ToStringBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringBoxedMap(validate(arg, configuration)); + } + @Override + public ToStringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class Constructor extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Constructor instance = null; + public static Constructor getInstance() { + if (instance == null) { + instance = new Constructor(); + } + return instance; + } + } + + + public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap extends FrozenMap<@Nullable Object> { + protected PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "__proto__", + "toString", + "constructor" + ); + public static PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance().validate(arg, configuration); + } + + public @Nullable Object toString() throws UnsetPropertyException { + String key = "toString"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Object)) { + throw new RuntimeException("Invalid value stored for toString"); + } + return (@Nullable Object) value; + } + + public Number constructor() throws UnsetPropertyException { + String key = "constructor"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof Number)) { + throw new RuntimeException("Invalid value stored for constructor"); + } + return (Number) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForProto { + Map getInstance(); + T getBuilderAfterProto(Map instance); + + default T lowLineProto(int value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(float value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(long value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(double value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + } + + public interface SetterForToString { + Map getInstance(); + T getBuilderAfterToString(Map instance); + + default T toString(Void value) { + var instance = getInstance(); + instance.put("toString", null); + return getBuilderAfterToString(instance); + } + + default T toString(boolean value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(String value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(int value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(float value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(long value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(double value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(List value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(Map value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + } + + public interface SetterForConstructor { + Map getInstance(); + T getBuilderAfterConstructor(Map instance); + + default T constructor(int value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(float value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(long value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(double value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + } + + public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToString, SetterForConstructor { + private final Map instance; + private static final Set knownKeys = Set.of( + "__proto__", + "toString", + "constructor" + ); + public Set getKnownKeys() { + return knownKeys; + } + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterProto(Map instance) { + return this; + } + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToString(Map instance) { + return this; + } + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterConstructor(Map instance) { + return this; + } + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed permits PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap { + @Nullable Object getData(); + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(Void data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(boolean data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(Number data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(String data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 instance = null; + + protected PropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("__proto__", Proto.class), + new PropertyEntry("toString", ToString.class), + new PropertyEntry("constructor", Constructor.class) + )) + ); + } + + public static PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 getInstance() { + if (instance == null) { + instance = new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(castProperties); + } + + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java new file mode 100644 index 00000000000..9771b401609 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java @@ -0,0 +1,647 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertiesWithEscapedCharacters { + // nest classes so all schemas and input/output classes can be public + + + public static class Foonbar extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Foonbar instance = null; + public static Foonbar getInstance() { + if (instance == null) { + instance = new Foonbar(); + } + return instance; + } + } + + + public static class Foobar extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Foobar instance = null; + public static Foobar getInstance() { + if (instance == null) { + instance = new Foobar(); + } + return instance; + } + } + + + public static class Foobar1 extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Foobar1 instance = null; + public static Foobar1 getInstance() { + if (instance == null) { + instance = new Foobar1(); + } + return instance; + } + } + + + public static class Foorbar extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Foorbar instance = null; + public static Foorbar getInstance() { + if (instance == null) { + instance = new Foorbar(); + } + return instance; + } + } + + + public static class Footbar extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Footbar instance = null; + public static Footbar getInstance() { + if (instance == null) { + instance = new Footbar(); + } + return instance; + } + } + + + public static class Foofbar extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Foofbar instance = null; + public static Foofbar getInstance() { + if (instance == null) { + instance = new Foofbar(); + } + return instance; + } + } + + + public static class PropertiesWithEscapedCharactersMap extends FrozenMap<@Nullable Object> { + protected PropertiesWithEscapedCharactersMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ); + public static PropertiesWithEscapedCharactersMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return PropertiesWithEscapedCharacters1.getInstance().validate(arg, configuration); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoonbar { + Map getInstance(); + T getBuilderAfterFoonbar(Map instance); + + default T fooReverseSolidusNbar(int value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(float value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(long value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(double value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + } + + public interface SetterForFoobar { + Map getInstance(); + T getBuilderAfterFoobar(Map instance); + + default T fooReverseSolidusQuotationMarkBar(int value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(float value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(long value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(double value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + } + + public interface SetterForFoobar1 { + Map getInstance(); + T getBuilderAfterFoobar1(Map instance); + + default T fooReverseSolidusReverseSolidusBar(int value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(float value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(long value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(double value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + } + + public interface SetterForFoorbar { + Map getInstance(); + T getBuilderAfterFoorbar(Map instance); + + default T fooReverseSolidusRbar(int value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(float value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(long value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(double value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + } + + public interface SetterForFootbar { + Map getInstance(); + T getBuilderAfterFootbar(Map instance); + + default T fooReverseSolidusTbar(int value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(float value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(long value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(double value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + } + + public interface SetterForFoofbar { + Map getInstance(); + T getBuilderAfterFoofbar(Map instance); + + default T fooReverseSolidusFbar(int value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(float value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(long value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(double value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + } + + public static class PropertiesWithEscapedCharactersMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoonbar, SetterForFoobar, SetterForFoobar1, SetterForFoorbar, SetterForFootbar, SetterForFoofbar { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public PropertiesWithEscapedCharactersMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoonbar(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoobar(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoobar1(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoorbar(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFootbar(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoofbar(Map instance) { + return this; + } + public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface PropertiesWithEscapedCharacters1Boxed permits PropertiesWithEscapedCharacters1BoxedVoid, PropertiesWithEscapedCharacters1BoxedBoolean, PropertiesWithEscapedCharacters1BoxedNumber, PropertiesWithEscapedCharacters1BoxedString, PropertiesWithEscapedCharacters1BoxedList, PropertiesWithEscapedCharacters1BoxedMap { + @Nullable Object getData(); + } + + public record PropertiesWithEscapedCharacters1BoxedVoid(Void data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithEscapedCharacters1BoxedBoolean(boolean data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithEscapedCharacters1BoxedNumber(Number data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithEscapedCharacters1BoxedString(String data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithEscapedCharacters1BoxedMap(PropertiesWithEscapedCharactersMap data) implements PropertiesWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertiesWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWithEscapedCharacters1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertiesWithEscapedCharacters1 instance = null; + + protected PropertiesWithEscapedCharacters1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo\nbar", Foonbar.class), + new PropertyEntry("foo\"bar", Foobar.class), + new PropertyEntry("foo\\bar", Foobar1.class), + new PropertyEntry("foo\rbar", Foorbar.class), + new PropertyEntry("foo\tbar", Footbar.class), + new PropertyEntry("foo\fbar", Foofbar.class) + )) + ); + } + + public static PropertiesWithEscapedCharacters1 getInstance() { + if (instance == null) { + instance = new PropertiesWithEscapedCharacters1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public PropertiesWithEscapedCharactersMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new PropertiesWithEscapedCharactersMap(castProperties); + } + + public PropertiesWithEscapedCharactersMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertiesWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedString(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedList(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithEscapedCharacters1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertiesWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java new file mode 100644 index 00000000000..c0ae22f7fe3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java @@ -0,0 +1,409 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertiesWithNullValuedInstanceProperties { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class PropertiesWithNullValuedInstancePropertiesMap extends FrozenMap<@Nullable Object> { + protected PropertiesWithNullValuedInstancePropertiesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static PropertiesWithNullValuedInstancePropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return PropertiesWithNullValuedInstanceProperties1.getInstance().validate(arg, configuration); + } + + public Void foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value == null || value instanceof Void)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (Void) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + } + + public static class PropertiesWithNullValuedInstancePropertiesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public PropertiesWithNullValuedInstancePropertiesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public PropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public PropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface PropertiesWithNullValuedInstanceProperties1Boxed permits PropertiesWithNullValuedInstanceProperties1BoxedVoid, PropertiesWithNullValuedInstanceProperties1BoxedBoolean, PropertiesWithNullValuedInstanceProperties1BoxedNumber, PropertiesWithNullValuedInstanceProperties1BoxedString, PropertiesWithNullValuedInstanceProperties1BoxedList, PropertiesWithNullValuedInstanceProperties1BoxedMap { + @Nullable Object getData(); + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertiesWithNullValuedInstanceProperties1BoxedMap(PropertiesWithNullValuedInstancePropertiesMap data) implements PropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertiesWithNullValuedInstanceProperties1 instance = null; + + protected PropertiesWithNullValuedInstanceProperties1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static PropertiesWithNullValuedInstanceProperties1 getInstance() { + if (instance == null) { + instance = new PropertiesWithNullValuedInstanceProperties1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public PropertiesWithNullValuedInstancePropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new PropertiesWithNullValuedInstancePropertiesMap(castProperties); + } + + public PropertiesWithNullValuedInstancePropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java new file mode 100644 index 00000000000..d69c3729b82 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java @@ -0,0 +1,399 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertyNamedRefThatIsNotAReference { + // nest classes so all schemas and input/output classes can be public + + + public static class Ref extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Ref instance = null; + public static Ref getInstance() { + if (instance == null) { + instance = new Ref(); + } + return instance; + } + } + + + public static class PropertyNamedRefThatIsNotAReferenceMap extends FrozenMap<@Nullable Object> { + protected PropertyNamedRefThatIsNotAReferenceMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "$ref" + ); + public static PropertyNamedRefThatIsNotAReferenceMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return PropertyNamedRefThatIsNotAReference1.getInstance().validate(arg, configuration); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForRef { + Map getInstance(); + T getBuilderAfterRef(Map instance); + + default T dollarSignRef(String value) { + var instance = getInstance(); + instance.put("$ref", value); + return getBuilderAfterRef(instance); + } + } + + public static class PropertyNamedRefThatIsNotAReferenceMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForRef { + private final Map instance; + private static final Set knownKeys = Set.of( + "$ref" + ); + public Set getKnownKeys() { + return knownKeys; + } + public PropertyNamedRefThatIsNotAReferenceMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public PropertyNamedRefThatIsNotAReferenceMapBuilder getBuilderAfterRef(Map instance) { + return this; + } + public PropertyNamedRefThatIsNotAReferenceMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface PropertyNamedRefThatIsNotAReference1Boxed permits PropertyNamedRefThatIsNotAReference1BoxedVoid, PropertyNamedRefThatIsNotAReference1BoxedBoolean, PropertyNamedRefThatIsNotAReference1BoxedNumber, PropertyNamedRefThatIsNotAReference1BoxedString, PropertyNamedRefThatIsNotAReference1BoxedList, PropertyNamedRefThatIsNotAReference1BoxedMap { + @Nullable Object getData(); + } + + public record PropertyNamedRefThatIsNotAReference1BoxedVoid(Void data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertyNamedRefThatIsNotAReference1BoxedBoolean(boolean data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertyNamedRefThatIsNotAReference1BoxedNumber(Number data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertyNamedRefThatIsNotAReference1BoxedString(String data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertyNamedRefThatIsNotAReference1BoxedList(FrozenList<@Nullable Object> data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertyNamedRefThatIsNotAReference1BoxedMap(PropertyNamedRefThatIsNotAReferenceMap data) implements PropertyNamedRefThatIsNotAReference1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertyNamedRefThatIsNotAReference1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertyNamedRefThatIsNotAReference1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertyNamedRefThatIsNotAReference1 instance = null; + + protected PropertyNamedRefThatIsNotAReference1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("$ref", Ref.class) + )) + ); + } + + public static PropertyNamedRefThatIsNotAReference1 getInstance() { + if (instance == null) { + instance = new PropertyNamedRefThatIsNotAReference1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public PropertyNamedRefThatIsNotAReferenceMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new PropertyNamedRefThatIsNotAReferenceMap(castProperties); + } + + public PropertyNamedRefThatIsNotAReferenceMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedVoid(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedNumber(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedString(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedList(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamedRefThatIsNotAReference1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertyNamedRefThatIsNotAReference1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java new file mode 100644 index 00000000000..2fcdc6796d5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java @@ -0,0 +1,397 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class PropertynamesValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface PropertyNamesBoxed permits PropertyNamesBoxedString { + @Nullable Object getData(); + } + + public record PropertyNamesBoxedString(String data) implements PropertyNamesBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class PropertyNames extends JsonSchema implements StringSchemaValidator { + private static @Nullable PropertyNames instance = null; + + protected PropertyNames() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .maxLength(3) + ); + } + + public static PropertyNames getInstance() { + if (instance == null) { + instance = new PropertyNames(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertyNamesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamesBoxedString(validate(arg, configuration)); + } + @Override + public PropertyNamesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface PropertynamesValidation1Boxed permits PropertynamesValidation1BoxedVoid, PropertynamesValidation1BoxedBoolean, PropertynamesValidation1BoxedNumber, PropertynamesValidation1BoxedString, PropertynamesValidation1BoxedList, PropertynamesValidation1BoxedMap { + @Nullable Object getData(); + } + + public record PropertynamesValidation1BoxedVoid(Void data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertynamesValidation1BoxedBoolean(boolean data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertynamesValidation1BoxedNumber(Number data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertynamesValidation1BoxedString(String data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertynamesValidation1BoxedList(FrozenList<@Nullable Object> data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record PropertynamesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements PropertynamesValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class PropertynamesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertynamesValidation1BoxedList>, MapSchemaValidator, PropertynamesValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable PropertynamesValidation1 instance = null; + + protected PropertynamesValidation1() { + super(new JsonSchemaInfo() + .propertyNames(PropertyNames.class) + ); + } + + public static PropertynamesValidation1 getInstance() { + if (instance == null) { + instance = new PropertynamesValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertynamesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedString(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedList(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertynamesValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public PropertynamesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java new file mode 100644 index 00000000000..88dfd64137e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RegexFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface RegexFormat1Boxed permits RegexFormat1BoxedVoid, RegexFormat1BoxedBoolean, RegexFormat1BoxedNumber, RegexFormat1BoxedString, RegexFormat1BoxedList, RegexFormat1BoxedMap { + @Nullable Object getData(); + } + + public record RegexFormat1BoxedVoid(Void data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexFormat1BoxedBoolean(boolean data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexFormat1BoxedNumber(Number data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexFormat1BoxedString(String data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexFormat1BoxedList(FrozenList<@Nullable Object> data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements RegexFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RegexFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RegexFormat1BoxedList>, MapSchemaValidator, RegexFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RegexFormat1 instance = null; + + protected RegexFormat1() { + super(new JsonSchemaInfo() + .format("regex") + ); + } + + public static RegexFormat1 getInstance() { + if (instance == null) { + instance = new RegexFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RegexFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public RegexFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RegexFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public RegexFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedString(validate(arg, configuration)); + } + @Override + public RegexFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedList(validate(arg, configuration)); + } + @Override + public RegexFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public RegexFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java new file mode 100644 index 00000000000..8ce598a8add --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java @@ -0,0 +1,356 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive { + // nest classes so all schemas and input/output classes can be public + + + public static class Schema092 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Schema092 instance = null; + public static Schema092 getInstance() { + if (instance == null) { + instance = new Schema092(); + } + return instance; + } + } + + + public static class X extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable X instance = null; + public static X getInstance() { + if (instance == null) { + instance = new X(); + } + return instance; + } + } + + + public sealed interface RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed permits RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap { + @Nullable Object getData(); + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid(Void data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean(boolean data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber(Number data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString(String data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList(FrozenList<@Nullable Object> data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap(FrozenMap<@Nullable Object> data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList>, MapSchemaValidator, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 instance = null; + + protected RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1() { + super(new JsonSchemaInfo() + .patternProperties(Map.ofEntries( + new AbstractMap.SimpleEntry<>(Pattern.compile("[0-9]{2,}"), Schema092.class), + new AbstractMap.SimpleEntry<>(Pattern.compile("X_"), X.class) + )) + ); + } + + public static RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 getInstance() { + if (instance == null) { + instance = new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap(validate(arg, configuration)); + } + @Override + public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java new file mode 100644 index 00000000000..140279d4425 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RelativeJsonPointerFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface RelativeJsonPointerFormat1Boxed permits RelativeJsonPointerFormat1BoxedVoid, RelativeJsonPointerFormat1BoxedBoolean, RelativeJsonPointerFormat1BoxedNumber, RelativeJsonPointerFormat1BoxedString, RelativeJsonPointerFormat1BoxedList, RelativeJsonPointerFormat1BoxedMap { + @Nullable Object getData(); + } + + public record RelativeJsonPointerFormat1BoxedVoid(Void data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RelativeJsonPointerFormat1BoxedBoolean(boolean data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RelativeJsonPointerFormat1BoxedNumber(Number data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RelativeJsonPointerFormat1BoxedString(String data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RelativeJsonPointerFormat1BoxedList(FrozenList<@Nullable Object> data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RelativeJsonPointerFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements RelativeJsonPointerFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RelativeJsonPointerFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RelativeJsonPointerFormat1BoxedList>, MapSchemaValidator, RelativeJsonPointerFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RelativeJsonPointerFormat1 instance = null; + + protected RelativeJsonPointerFormat1() { + super(new JsonSchemaInfo() + .format("relative-json-pointer") + ); + } + + public static RelativeJsonPointerFormat1 getInstance() { + if (instance == null) { + instance = new RelativeJsonPointerFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RelativeJsonPointerFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedString(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedList(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RelativeJsonPointerFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public RelativeJsonPointerFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java new file mode 100644 index 00000000000..95d070c3c66 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java @@ -0,0 +1,451 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RequiredDefaultValidation { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class RequiredDefaultValidationMap extends FrozenMap<@Nullable Object> { + protected RequiredDefaultValidationMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static RequiredDefaultValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return RequiredDefaultValidation1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class RequiredDefaultValidationMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public RequiredDefaultValidationMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public RequiredDefaultValidationMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public RequiredDefaultValidationMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface RequiredDefaultValidation1Boxed permits RequiredDefaultValidation1BoxedVoid, RequiredDefaultValidation1BoxedBoolean, RequiredDefaultValidation1BoxedNumber, RequiredDefaultValidation1BoxedString, RequiredDefaultValidation1BoxedList, RequiredDefaultValidation1BoxedMap { + @Nullable Object getData(); + } + + public record RequiredDefaultValidation1BoxedVoid(Void data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredDefaultValidation1BoxedBoolean(boolean data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredDefaultValidation1BoxedNumber(Number data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredDefaultValidation1BoxedString(String data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredDefaultValidation1BoxedList(FrozenList<@Nullable Object> data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredDefaultValidation1BoxedMap(RequiredDefaultValidationMap data) implements RequiredDefaultValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RequiredDefaultValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredDefaultValidation1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RequiredDefaultValidation1 instance = null; + + protected RequiredDefaultValidation1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static RequiredDefaultValidation1 getInstance() { + if (instance == null) { + instance = new RequiredDefaultValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public RequiredDefaultValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new RequiredDefaultValidationMap(castProperties); + } + + public RequiredDefaultValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RequiredDefaultValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedString(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedList(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredDefaultValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public RequiredDefaultValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java new file mode 100644 index 00000000000..a9981a8aa75 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -0,0 +1,677 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames { + // nest classes so all schemas and input/output classes can be public + + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap extends FrozenMap<@Nullable Object> { + protected RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "__proto__", + "constructor", + "toString" + ); + public static final Set optionalKeys = Set.of(); + public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance().validate(arg, configuration); + } + + public @Nullable Object constructor() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object toString() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForProto { + Map getInstance(); + T getBuilderAfterProto(Map instance); + + default T lowLineProto(Void value) { + var instance = getInstance(); + instance.put("__proto__", null); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(boolean value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(String value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(int value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(float value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(long value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(double value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(List value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + + default T lowLineProto(Map value) { + var instance = getInstance(); + instance.put("__proto__", value); + return getBuilderAfterProto(instance); + } + } + + public interface SetterForConstructor { + Map getInstance(); + T getBuilderAfterConstructor(Map instance); + + default T constructor(Void value) { + var instance = getInstance(); + instance.put("constructor", null); + return getBuilderAfterConstructor(instance); + } + + default T constructor(boolean value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(String value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(int value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(float value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(long value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(double value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(List value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + + default T constructor(Map value) { + var instance = getInstance(); + instance.put("constructor", value); + return getBuilderAfterConstructor(instance); + } + } + + public interface SetterForToString { + Map getInstance(); + T getBuilderAfterToString(Map instance); + + default T toString(Void value) { + var instance = getInstance(); + instance.put("toString", null); + return getBuilderAfterToString(instance); + } + + default T toString(boolean value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(String value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(int value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(float value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(long value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(double value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(List value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + + default T toString(Map value) { + var instance = getInstance(); + instance.put("toString", value); + return getBuilderAfterToString(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "__proto__", + "constructor", + "toString" + ); + public Set getKnownKeys() { + return knownKeys; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToString { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToString(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder implements SetterForConstructor { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterConstructor(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToString { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterConstructor(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToString(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder implements SetterForProto { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterProto(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToString { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterProto(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToString(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder implements SetterForProto, SetterForConstructor { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterProto(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterConstructor(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); + } + } + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToString { + private final Map instance; + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder getBuilderAfterProto(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(instance); + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder getBuilderAfterConstructor(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(instance); + } + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToString(Map instance) { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(instance); + } + } + + + public sealed interface RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed permits RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap { + @Nullable Object getData(); + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(Void data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(boolean data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(Number data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(String data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(FrozenList<@Nullable Object> data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 instance = null; + + protected RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { + super(new JsonSchemaInfo() + .required(Set.of( + "__proto__", + "constructor", + "toString" + )) + ); + } + + public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 getInstance() { + if (instance == null) { + instance = new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(castProperties); + } + + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(validate(arg, configuration)); + } + @Override + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java new file mode 100644 index 00000000000..1236ca103ae --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java @@ -0,0 +1,549 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RequiredValidation { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Bar instance = null; + public static Bar getInstance() { + if (instance == null) { + instance = new Bar(); + } + return instance; + } + } + + + public static class RequiredValidationMap extends FrozenMap<@Nullable Object> { + protected RequiredValidationMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo" + ); + public static final Set optionalKeys = Set.of( + "bar" + ); + public static RequiredValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return RequiredValidation1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() { + try { + return getOrThrow("version"); + } catch (UnsetPropertyException e) { + throw new RuntimeException(e); + } + } + + public @Nullable Object bar() throws UnsetPropertyException { + return getOrThrow("bar"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForBar { + Map getInstance(); + T getBuilderAfterBar(Map instance); + + default T bar(Void value) { + var instance = getInstance(); + instance.put("bar", null); + return getBuilderAfterBar(instance); + } + + default T bar(boolean value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(String value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(int value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(float value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(long value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(double value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(List value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + + default T bar(Map value) { + var instance = getInstance(); + instance.put("bar", value); + return getBuilderAfterBar(instance); + } + } + + public static class RequiredValidationMap0Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForBar { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo", + "bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public RequiredValidationMap0Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public RequiredValidationMap0Builder getBuilderAfterBar(Map instance) { + return this; + } + public RequiredValidationMap0Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class RequiredValidationMapBuilder implements SetterForFoo { + private final Map instance; + public RequiredValidationMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public RequiredValidationMap0Builder getBuilderAfterFoo(Map instance) { + return new RequiredValidationMap0Builder(instance); + } + } + + + public sealed interface RequiredValidation1Boxed permits RequiredValidation1BoxedVoid, RequiredValidation1BoxedBoolean, RequiredValidation1BoxedNumber, RequiredValidation1BoxedString, RequiredValidation1BoxedList, RequiredValidation1BoxedMap { + @Nullable Object getData(); + } + + public record RequiredValidation1BoxedVoid(Void data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredValidation1BoxedBoolean(boolean data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredValidation1BoxedNumber(Number data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredValidation1BoxedString(String data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredValidation1BoxedList(FrozenList<@Nullable Object> data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredValidation1BoxedMap(RequiredValidationMap data) implements RequiredValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RequiredValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredValidation1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RequiredValidation1 instance = null; + + protected RequiredValidation1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class), + new PropertyEntry("bar", Bar.class) + )) + .required(Set.of( + "foo" + )) + ); + } + + public static RequiredValidation1 getInstance() { + if (instance == null) { + instance = new RequiredValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public RequiredValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new RequiredValidationMap(castProperties); + } + + public RequiredValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RequiredValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public RequiredValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RequiredValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public RequiredValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedString(validate(arg, configuration)); + } + @Override + public RequiredValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedList(validate(arg, configuration)); + } + @Override + public RequiredValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public RequiredValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java new file mode 100644 index 00000000000..974ae28ac27 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java @@ -0,0 +1,451 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RequiredWithEmptyArray { + // nest classes so all schemas and input/output classes can be public + + + public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class RequiredWithEmptyArrayMap extends FrozenMap<@Nullable Object> { + protected RequiredWithEmptyArrayMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static RequiredWithEmptyArrayMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return RequiredWithEmptyArray1.getInstance().validate(arg, configuration); + } + + public @Nullable Object foo() throws UnsetPropertyException { + return getOrThrow("foo"); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(Void value) { + var instance = getInstance(); + instance.put("foo", null); + return getBuilderAfterFoo(instance); + } + + default T foo(boolean value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(int value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(float value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(long value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(double value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(List value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + + default T foo(Map value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public static class RequiredWithEmptyArrayMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public RequiredWithEmptyArrayMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEmptyArrayMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public RequiredWithEmptyArrayMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public sealed interface RequiredWithEmptyArray1Boxed permits RequiredWithEmptyArray1BoxedVoid, RequiredWithEmptyArray1BoxedBoolean, RequiredWithEmptyArray1BoxedNumber, RequiredWithEmptyArray1BoxedString, RequiredWithEmptyArray1BoxedList, RequiredWithEmptyArray1BoxedMap { + @Nullable Object getData(); + } + + public record RequiredWithEmptyArray1BoxedVoid(Void data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEmptyArray1BoxedBoolean(boolean data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEmptyArray1BoxedNumber(Number data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEmptyArray1BoxedString(String data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEmptyArray1BoxedList(FrozenList<@Nullable Object> data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEmptyArray1BoxedMap(RequiredWithEmptyArrayMap data) implements RequiredWithEmptyArray1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RequiredWithEmptyArray1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredWithEmptyArray1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RequiredWithEmptyArray1 instance = null; + + protected RequiredWithEmptyArray1() { + super(new JsonSchemaInfo() + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + ); + } + + public static RequiredWithEmptyArray1 getInstance() { + if (instance == null) { + instance = new RequiredWithEmptyArray1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public RequiredWithEmptyArrayMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new RequiredWithEmptyArrayMap(castProperties); + } + + public RequiredWithEmptyArrayMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RequiredWithEmptyArray1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedVoid(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedNumber(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedString(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedList(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEmptyArray1BoxedMap(validate(arg, configuration)); + } + @Override + public RequiredWithEmptyArray1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java new file mode 100644 index 00000000000..8919e0bbb8d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java @@ -0,0 +1,1947 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class RequiredWithEscapedCharacters { + // nest classes so all schemas and input/output classes can be public + + + public static class RequiredWithEscapedCharactersMap extends FrozenMap<@Nullable Object> { + protected RequiredWithEscapedCharactersMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of( + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar" + ); + public static final Set optionalKeys = Set.of(); + public static RequiredWithEscapedCharactersMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return RequiredWithEscapedCharacters1.getInstance().validate(arg, configuration); + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + throwIfKeyNotPresent(name); + return get(name); + } + } + + public interface SetterForFootbar { + Map getInstance(); + T getBuilderAfterFootbar(Map instance); + + default T fooReverseSolidusTbar(Void value) { + var instance = getInstance(); + instance.put("foo\tbar", null); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(boolean value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(String value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(int value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(float value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(long value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(double value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(List value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + + default T fooReverseSolidusTbar(Map value) { + var instance = getInstance(); + instance.put("foo\tbar", value); + return getBuilderAfterFootbar(instance); + } + } + + public interface SetterForFoonbar { + Map getInstance(); + T getBuilderAfterFoonbar(Map instance); + + default T fooReverseSolidusNbar(Void value) { + var instance = getInstance(); + instance.put("foo\nbar", null); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(boolean value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(String value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(int value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(float value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(long value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(double value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(List value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + + default T fooReverseSolidusNbar(Map value) { + var instance = getInstance(); + instance.put("foo\nbar", value); + return getBuilderAfterFoonbar(instance); + } + } + + public interface SetterForFoofbar { + Map getInstance(); + T getBuilderAfterFoofbar(Map instance); + + default T fooReverseSolidusFbar(Void value) { + var instance = getInstance(); + instance.put("foo\fbar", null); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(boolean value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(String value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(int value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(float value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(long value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(double value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(List value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + + default T fooReverseSolidusFbar(Map value) { + var instance = getInstance(); + instance.put("foo\fbar", value); + return getBuilderAfterFoofbar(instance); + } + } + + public interface SetterForFoorbar { + Map getInstance(); + T getBuilderAfterFoorbar(Map instance); + + default T fooReverseSolidusRbar(Void value) { + var instance = getInstance(); + instance.put("foo\rbar", null); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(boolean value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(String value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(int value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(float value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(long value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(double value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(List value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + + default T fooReverseSolidusRbar(Map value) { + var instance = getInstance(); + instance.put("foo\rbar", value); + return getBuilderAfterFoorbar(instance); + } + } + + public interface SetterForFoobar { + Map getInstance(); + T getBuilderAfterFoobar(Map instance); + + default T fooReverseSolidusQuotationMarkBar(Void value) { + var instance = getInstance(); + instance.put("foo\"bar", null); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(boolean value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(String value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(int value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(float value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(long value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(double value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(List value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + + default T fooReverseSolidusQuotationMarkBar(Map value) { + var instance = getInstance(); + instance.put("foo\"bar", value); + return getBuilderAfterFoobar(instance); + } + } + + public interface SetterForFoobar1 { + Map getInstance(); + T getBuilderAfterFoobar1(Map instance); + + default T fooReverseSolidusReverseSolidusBar(Void value) { + var instance = getInstance(); + instance.put("foo\\bar", null); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(boolean value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(String value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(int value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(float value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(long value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(double value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(List value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + + default T fooReverseSolidusReverseSolidusBar(Map value) { + var instance = getInstance(); + instance.put("foo\\bar", value); + return getBuilderAfterFoobar1(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000000Builder extends UnsetAddPropsSetter implements GenericBuilder> { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar" + ); + public Set getKnownKeys() { + return knownKeys; + } + public RequiredWithEscapedCharactersMap000000Builder(Map instance) { + this.instance = instance; + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + public static class RequiredWithEscapedCharactersMap000001Builder implements SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap000001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000010Builder implements SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap000010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000011Builder implements SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap000011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap000001Builder(instance); + } + public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap000010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000100Builder implements SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap000100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000101Builder implements SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap000101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap000001Builder(instance); + } + public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap000100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000110Builder implements SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap000110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap000010Builder(instance); + } + public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap000100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap000111Builder implements SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap000111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap000011Builder(instance); + } + public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap000101Builder(instance); + } + public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap000110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001000Builder implements SetterForFoofbar { + private final Map instance; + public RequiredWithEscapedCharactersMap001000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001001Builder implements SetterForFoofbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap001001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000001Builder(instance); + } + public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap001000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001010Builder implements SetterForFoofbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap001010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000010Builder(instance); + } + public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap001000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001011Builder implements SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap001011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000011Builder(instance); + } + public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap001001Builder(instance); + } + public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap001010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001100Builder implements SetterForFoofbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap001100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000100Builder(instance); + } + public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap001000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001101Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap001101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000101Builder(instance); + } + public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap001001Builder(instance); + } + public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap001100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001110Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap001110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000110Builder(instance); + } + public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap001010Builder(instance); + } + public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap001100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap001111Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap001111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap000111Builder(instance); + } + public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap001011Builder(instance); + } + public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap001101Builder(instance); + } + public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap001110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010000Builder implements SetterForFoonbar { + private final Map instance; + public RequiredWithEscapedCharactersMap010000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010001Builder implements SetterForFoonbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap010001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000001Builder(instance); + } + public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap010000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010010Builder implements SetterForFoonbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap010010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000010Builder(instance); + } + public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap010000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010011Builder implements SetterForFoonbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap010011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000011Builder(instance); + } + public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap010001Builder(instance); + } + public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap010010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010100Builder implements SetterForFoonbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap010100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000100Builder(instance); + } + public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap010000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010101Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap010101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000101Builder(instance); + } + public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap010001Builder(instance); + } + public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap010100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010110Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap010110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000110Builder(instance); + } + public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap010010Builder(instance); + } + public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap010100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap010111Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap010111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap000111Builder(instance); + } + public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap010011Builder(instance); + } + public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap010101Builder(instance); + } + public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap010110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011000Builder implements SetterForFoonbar, SetterForFoofbar { + private final Map instance; + public RequiredWithEscapedCharactersMap011000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001000Builder(instance); + } + public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011001Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap011001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001001Builder(instance); + } + public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010001Builder(instance); + } + public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap011000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011010Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap011010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001010Builder(instance); + } + public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010010Builder(instance); + } + public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap011000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011011Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap011011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001011Builder(instance); + } + public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010011Builder(instance); + } + public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap011001Builder(instance); + } + public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap011010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011100Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap011100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001100Builder(instance); + } + public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010100Builder(instance); + } + public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap011000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011101Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap011101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001101Builder(instance); + } + public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010101Builder(instance); + } + public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap011001Builder(instance); + } + public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap011100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011110Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap011110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001110Builder(instance); + } + public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010110Builder(instance); + } + public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap011010Builder(instance); + } + public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap011100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap011111Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap011111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001111Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap001111Builder(instance); + } + public RequiredWithEscapedCharactersMap010111Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap010111Builder(instance); + } + public RequiredWithEscapedCharactersMap011011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap011011Builder(instance); + } + public RequiredWithEscapedCharactersMap011101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap011101Builder(instance); + } + public RequiredWithEscapedCharactersMap011110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap011110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100000Builder implements SetterForFootbar { + private final Map instance; + public RequiredWithEscapedCharactersMap100000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100001Builder implements SetterForFootbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap100001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000001Builder(instance); + } + public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap100000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100010Builder implements SetterForFootbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap100010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000010Builder(instance); + } + public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap100000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100011Builder implements SetterForFootbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap100011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000011Builder(instance); + } + public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap100001Builder(instance); + } + public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap100010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100100Builder implements SetterForFootbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap100100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000100Builder(instance); + } + public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap100000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100101Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap100101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000101Builder(instance); + } + public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap100001Builder(instance); + } + public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap100100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100110Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap100110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000110Builder(instance); + } + public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap100010Builder(instance); + } + public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap100100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap100111Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap100111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap000111Builder(instance); + } + public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap100011Builder(instance); + } + public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap100101Builder(instance); + } + public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap100110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101000Builder implements SetterForFootbar, SetterForFoofbar { + private final Map instance; + public RequiredWithEscapedCharactersMap101000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001000Builder(instance); + } + public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101001Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap101001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001001Builder(instance); + } + public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100001Builder(instance); + } + public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap101000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101010Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap101010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001010Builder(instance); + } + public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100010Builder(instance); + } + public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap101000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101011Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap101011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001011Builder(instance); + } + public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100011Builder(instance); + } + public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap101001Builder(instance); + } + public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap101010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101100Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap101100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001100Builder(instance); + } + public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100100Builder(instance); + } + public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap101000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101101Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap101101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001101Builder(instance); + } + public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100101Builder(instance); + } + public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap101001Builder(instance); + } + public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap101100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101110Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap101110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001110Builder(instance); + } + public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100110Builder(instance); + } + public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap101010Builder(instance); + } + public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap101100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap101111Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap101111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap001111Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap001111Builder(instance); + } + public RequiredWithEscapedCharactersMap100111Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap100111Builder(instance); + } + public RequiredWithEscapedCharactersMap101011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap101011Builder(instance); + } + public RequiredWithEscapedCharactersMap101101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap101101Builder(instance); + } + public RequiredWithEscapedCharactersMap101110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap101110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110000Builder implements SetterForFootbar, SetterForFoonbar { + private final Map instance; + public RequiredWithEscapedCharactersMap110000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010000Builder(instance); + } + public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110001Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap110001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010001Builder(instance); + } + public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100001Builder(instance); + } + public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap110000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110010Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap110010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010010Builder(instance); + } + public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100010Builder(instance); + } + public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap110000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110011Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap110011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010011Builder(instance); + } + public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100011Builder(instance); + } + public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap110001Builder(instance); + } + public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap110010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110100Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap110100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010100Builder(instance); + } + public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100100Builder(instance); + } + public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap110000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110101Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap110101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010101Builder(instance); + } + public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100101Builder(instance); + } + public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap110001Builder(instance); + } + public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap110100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110110Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap110110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010110Builder(instance); + } + public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100110Builder(instance); + } + public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap110010Builder(instance); + } + public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap110100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap110111Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap110111Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap010111Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap010111Builder(instance); + } + public RequiredWithEscapedCharactersMap100111Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap100111Builder(instance); + } + public RequiredWithEscapedCharactersMap110011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap110011Builder(instance); + } + public RequiredWithEscapedCharactersMap110101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap110101Builder(instance); + } + public RequiredWithEscapedCharactersMap110110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap110110Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111000Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar { + private final Map instance; + public RequiredWithEscapedCharactersMap111000Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011000Builder(instance); + } + public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101000Builder(instance); + } + public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111001Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap111001Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011001Builder(instance); + } + public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101001Builder(instance); + } + public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110001Builder(instance); + } + public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap111000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111010Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap111010Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011010Builder(instance); + } + public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101010Builder(instance); + } + public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110010Builder(instance); + } + public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap111000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111011Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap111011Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011011Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011011Builder(instance); + } + public RequiredWithEscapedCharactersMap101011Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101011Builder(instance); + } + public RequiredWithEscapedCharactersMap110011Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110011Builder(instance); + } + public RequiredWithEscapedCharactersMap111001Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap111001Builder(instance); + } + public RequiredWithEscapedCharactersMap111010Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap111010Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111100Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar { + private final Map instance; + public RequiredWithEscapedCharactersMap111100Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011100Builder(instance); + } + public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101100Builder(instance); + } + public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110100Builder(instance); + } + public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap111000Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111101Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMap111101Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011101Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011101Builder(instance); + } + public RequiredWithEscapedCharactersMap101101Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101101Builder(instance); + } + public RequiredWithEscapedCharactersMap110101Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110101Builder(instance); + } + public RequiredWithEscapedCharactersMap111001Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap111001Builder(instance); + } + public RequiredWithEscapedCharactersMap111100Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap111100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMap111110Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { + private final Map instance; + public RequiredWithEscapedCharactersMap111110Builder(Map instance) { + this.instance = instance; + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011110Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011110Builder(instance); + } + public RequiredWithEscapedCharactersMap101110Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101110Builder(instance); + } + public RequiredWithEscapedCharactersMap110110Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110110Builder(instance); + } + public RequiredWithEscapedCharactersMap111010Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap111010Builder(instance); + } + public RequiredWithEscapedCharactersMap111100Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap111100Builder(instance); + } + } + + public static class RequiredWithEscapedCharactersMapBuilder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { + private final Map instance; + public RequiredWithEscapedCharactersMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map getInstance() { + return instance; + } + public RequiredWithEscapedCharactersMap011111Builder getBuilderAfterFootbar(Map instance) { + return new RequiredWithEscapedCharactersMap011111Builder(instance); + } + public RequiredWithEscapedCharactersMap101111Builder getBuilderAfterFoonbar(Map instance) { + return new RequiredWithEscapedCharactersMap101111Builder(instance); + } + public RequiredWithEscapedCharactersMap110111Builder getBuilderAfterFoofbar(Map instance) { + return new RequiredWithEscapedCharactersMap110111Builder(instance); + } + public RequiredWithEscapedCharactersMap111011Builder getBuilderAfterFoorbar(Map instance) { + return new RequiredWithEscapedCharactersMap111011Builder(instance); + } + public RequiredWithEscapedCharactersMap111101Builder getBuilderAfterFoobar(Map instance) { + return new RequiredWithEscapedCharactersMap111101Builder(instance); + } + public RequiredWithEscapedCharactersMap111110Builder getBuilderAfterFoobar1(Map instance) { + return new RequiredWithEscapedCharactersMap111110Builder(instance); + } + } + + + public sealed interface RequiredWithEscapedCharacters1Boxed permits RequiredWithEscapedCharacters1BoxedVoid, RequiredWithEscapedCharacters1BoxedBoolean, RequiredWithEscapedCharacters1BoxedNumber, RequiredWithEscapedCharacters1BoxedString, RequiredWithEscapedCharacters1BoxedList, RequiredWithEscapedCharacters1BoxedMap { + @Nullable Object getData(); + } + + public record RequiredWithEscapedCharacters1BoxedVoid(Void data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEscapedCharacters1BoxedBoolean(boolean data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEscapedCharacters1BoxedNumber(Number data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEscapedCharacters1BoxedString(String data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record RequiredWithEscapedCharacters1BoxedMap(RequiredWithEscapedCharactersMap data) implements RequiredWithEscapedCharacters1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class RequiredWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredWithEscapedCharacters1BoxedList>, MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable RequiredWithEscapedCharacters1 instance = null; + + protected RequiredWithEscapedCharacters1() { + super(new JsonSchemaInfo() + .required(Set.of( + "foo\tbar", + "foo\nbar", + "foo\fbar", + "foo\rbar", + "foo\"bar", + "foo\\bar" + )) + ); + } + + public static RequiredWithEscapedCharacters1 getInstance() { + if (instance == null) { + instance = new RequiredWithEscapedCharacters1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public RequiredWithEscapedCharactersMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new RequiredWithEscapedCharactersMap(castProperties); + } + + public RequiredWithEscapedCharactersMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public RequiredWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedString(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedList(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new RequiredWithEscapedCharacters1BoxedMap(validate(arg, configuration)); + } + @Override + public RequiredWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java new file mode 100644 index 00000000000..31725d8732b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java @@ -0,0 +1,205 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.validation.DoubleEnumValidator; +import unit_test_api.schemas.validation.DoubleValueMethod; +import unit_test_api.schemas.validation.FloatEnumValidator; +import unit_test_api.schemas.validation.FloatValueMethod; +import unit_test_api.schemas.validation.IntegerEnumValidator; +import unit_test_api.schemas.validation.IntegerValueMethod; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.LongEnumValidator; +import unit_test_api.schemas.validation.LongValueMethod; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class SimpleEnumValidation { + // nest classes so all schemas and input/output classes can be public + + public enum IntegerSimpleEnumValidationEnums implements IntegerValueMethod { + POSITIVE_1(1), + POSITIVE_2(2), + POSITIVE_3(3); + private final int value; + + IntegerSimpleEnumValidationEnums(int value) { + this.value = value; + } + public int value() { + return this.value; + } + } + + public enum LongSimpleEnumValidationEnums implements LongValueMethod { + POSITIVE_1(1L), + POSITIVE_2(2L), + POSITIVE_3(3L); + private final long value; + + LongSimpleEnumValidationEnums(long value) { + this.value = value; + } + public long value() { + return this.value; + } + } + + public enum FloatSimpleEnumValidationEnums implements FloatValueMethod { + POSITIVE_1(1.0f), + POSITIVE_2(2.0f), + POSITIVE_3(3.0f); + private final float value; + + FloatSimpleEnumValidationEnums(float value) { + this.value = value; + } + public float value() { + return this.value; + } + } + + public enum DoubleSimpleEnumValidationEnums implements DoubleValueMethod { + POSITIVE_1(1.0d), + POSITIVE_2(2.0d), + POSITIVE_3(3.0d); + private final double value; + + DoubleSimpleEnumValidationEnums(double value) { + this.value = value; + } + public double value() { + return this.value; + } + } + + + public sealed interface SimpleEnumValidation1Boxed permits SimpleEnumValidation1BoxedNumber { + @Nullable Object getData(); + } + + public record SimpleEnumValidation1BoxedNumber(Number data) implements SimpleEnumValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class SimpleEnumValidation1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable SimpleEnumValidation1 instance = null; + + protected SimpleEnumValidation1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .enumValues(SetMaker.makeSet( + new BigDecimal("1"), + new BigDecimal("2"), + new BigDecimal("3") + )) + ); + } + + public static SimpleEnumValidation1 getInstance() { + if (instance == null) { + instance = new SimpleEnumValidation1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public int validate(IntegerSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg.value(), configuration); + } + + @Override + public long validate(LongSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg.value(), configuration); + } + + @Override + public float validate(FloatSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg.value(), configuration); + } + + @Override + public double validate(DoubleSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg.value(), configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public SimpleEnumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new SimpleEnumValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public SimpleEnumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java new file mode 100644 index 00000000000..26181164b35 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java @@ -0,0 +1,337 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.AbstractMap; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.SetMaker; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class SingleDependency { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface SingleDependency1Boxed permits SingleDependency1BoxedVoid, SingleDependency1BoxedBoolean, SingleDependency1BoxedNumber, SingleDependency1BoxedString, SingleDependency1BoxedList, SingleDependency1BoxedMap { + @Nullable Object getData(); + } + + public record SingleDependency1BoxedVoid(Void data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record SingleDependency1BoxedBoolean(boolean data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record SingleDependency1BoxedNumber(Number data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record SingleDependency1BoxedString(String data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record SingleDependency1BoxedList(FrozenList<@Nullable Object> data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record SingleDependency1BoxedMap(FrozenMap<@Nullable Object> data) implements SingleDependency1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class SingleDependency1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, SingleDependency1BoxedList>, MapSchemaValidator, SingleDependency1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable SingleDependency1 instance = null; + + protected SingleDependency1() { + super(new JsonSchemaInfo() + .dependentRequired(MapUtils.makeMap( + new AbstractMap.SimpleEntry<>( + "bar", + SetMaker.makeSet( + "foo" + ) + ) + )) + ); + } + + public static SingleDependency1 getInstance() { + if (instance == null) { + instance = new SingleDependency1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public SingleDependency1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedVoid(validate(arg, configuration)); + } + @Override + public SingleDependency1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedBoolean(validate(arg, configuration)); + } + @Override + public SingleDependency1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedNumber(validate(arg, configuration)); + } + @Override + public SingleDependency1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedString(validate(arg, configuration)); + } + @Override + public SingleDependency1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedList(validate(arg, configuration)); + } + @Override + public SingleDependency1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new SingleDependency1BoxedMap(validate(arg, configuration)); + } + @Override + public SingleDependency1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java new file mode 100644 index 00000000000..810c4089611 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java @@ -0,0 +1,117 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class SmallMultipleOfLargeInteger { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface SmallMultipleOfLargeInteger1Boxed permits SmallMultipleOfLargeInteger1BoxedNumber { + @Nullable Object getData(); + } + + public record SmallMultipleOfLargeInteger1BoxedNumber(Number data) implements SmallMultipleOfLargeInteger1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class SmallMultipleOfLargeInteger1 extends JsonSchema implements NumberSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable SmallMultipleOfLargeInteger1 instance = null; + + protected SmallMultipleOfLargeInteger1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + .multipleOf(new BigDecimal("1.0E-8")) + ); + } + + public static SmallMultipleOfLargeInteger1 getInstance() { + if (instance == null) { + instance = new SmallMultipleOfLargeInteger1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public SmallMultipleOfLargeInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new SmallMultipleOfLargeInteger1BoxedNumber(validate(arg, configuration)); + } + @Override + public SmallMultipleOfLargeInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java new file mode 100644 index 00000000000..e25bdecaab2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.StringJsonSchema; + +public class StringTypeMatchesStrings extends StringJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class StringTypeMatchesStrings1 extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable StringTypeMatchesStrings1 instance = null; + public static StringTypeMatchesStrings1 getInstance() { + if (instance == null) { + instance = new StringTypeMatchesStrings1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java new file mode 100644 index 00000000000..e59f47dc46d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class TimeFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface TimeFormat1Boxed permits TimeFormat1BoxedVoid, TimeFormat1BoxedBoolean, TimeFormat1BoxedNumber, TimeFormat1BoxedString, TimeFormat1BoxedList, TimeFormat1BoxedMap { + @Nullable Object getData(); + } + + public record TimeFormat1BoxedVoid(Void data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TimeFormat1BoxedBoolean(boolean data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TimeFormat1BoxedNumber(Number data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TimeFormat1BoxedString(String data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TimeFormat1BoxedList(FrozenList<@Nullable Object> data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TimeFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements TimeFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class TimeFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, TimeFormat1BoxedList>, MapSchemaValidator, TimeFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable TimeFormat1 instance = null; + + protected TimeFormat1() { + super(new JsonSchemaInfo() + .format("time") + ); + } + + public static TimeFormat1 getInstance() { + if (instance == null) { + instance = new TimeFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public TimeFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public TimeFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public TimeFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public TimeFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedString(validate(arg, configuration)); + } + @Override + public TimeFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedList(validate(arg, configuration)); + } + @Override + public TimeFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new TimeFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public TimeFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java new file mode 100644 index 00000000000..7f4c5b4e216 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java @@ -0,0 +1,205 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class TypeArrayObjectOrNull { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface TypeArrayObjectOrNull1Boxed permits TypeArrayObjectOrNull1BoxedList, TypeArrayObjectOrNull1BoxedMap, TypeArrayObjectOrNull1BoxedVoid { + @Nullable Object getData(); + } + + public record TypeArrayObjectOrNull1BoxedList(FrozenList<@Nullable Object> data) implements TypeArrayObjectOrNull1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TypeArrayObjectOrNull1BoxedMap(FrozenMap<@Nullable Object> data) implements TypeArrayObjectOrNull1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record TypeArrayObjectOrNull1BoxedVoid(Void data) implements TypeArrayObjectOrNull1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class TypeArrayObjectOrNull1 extends JsonSchema implements ListSchemaValidator, TypeArrayObjectOrNull1BoxedList>, MapSchemaValidator, TypeArrayObjectOrNull1BoxedMap>, NullSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable TypeArrayObjectOrNull1 instance = null; + + protected TypeArrayObjectOrNull1() { + super(new JsonSchemaInfo() + .type(Set.of( + List.class, + Map.class, + Void.class + )) + ); + } + + public static TypeArrayObjectOrNull1 getInstance() { + if (instance == null) { + instance = new TypeArrayObjectOrNull1(); + } + return instance; + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } else if (arg == null) { + return validate((Void) null, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } else if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public TypeArrayObjectOrNull1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new TypeArrayObjectOrNull1BoxedList(validate(arg, configuration)); + } + @Override + public TypeArrayObjectOrNull1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new TypeArrayObjectOrNull1BoxedMap(validate(arg, configuration)); + } + @Override + public TypeArrayObjectOrNull1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new TypeArrayObjectOrNull1BoxedVoid(validate(arg, configuration)); + } + @Override + public TypeArrayObjectOrNull1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } else if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java new file mode 100644 index 00000000000..db9c883dd63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java @@ -0,0 +1,174 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class TypeArrayOrObject { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface TypeArrayOrObject1Boxed permits TypeArrayOrObject1BoxedList, TypeArrayOrObject1BoxedMap { + @Nullable Object getData(); + } + + public record TypeArrayOrObject1BoxedList(FrozenList<@Nullable Object> data) implements TypeArrayOrObject1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record TypeArrayOrObject1BoxedMap(FrozenMap<@Nullable Object> data) implements TypeArrayOrObject1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class TypeArrayOrObject1 extends JsonSchema implements ListSchemaValidator, TypeArrayOrObject1BoxedList>, MapSchemaValidator, TypeArrayOrObject1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable TypeArrayOrObject1 instance = null; + + protected TypeArrayOrObject1() { + super(new JsonSchemaInfo() + .type(Set.of( + List.class, + Map.class + )) + ); + } + + public static TypeArrayOrObject1 getInstance() { + if (instance == null) { + instance = new TypeArrayOrObject1(); + } + return instance; + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public TypeArrayOrObject1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new TypeArrayOrObject1BoxedList(validate(arg, configuration)); + } + @Override + public TypeArrayOrObject1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new TypeArrayOrObject1BoxedMap(validate(arg, configuration)); + } + @Override + public TypeArrayOrObject1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java new file mode 100644 index 00000000000..a31652a3248 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java @@ -0,0 +1,19 @@ +package unit_test_api.components.schemas; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.StringJsonSchema; + +public class TypeAsArrayWithOneItem extends StringJsonSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class TypeAsArrayWithOneItem1 extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable TypeAsArrayWithOneItem1 instance = null; + public static TypeAsArrayWithOneItem1 getInstance() { + if (instance == null) { + instance = new TypeAsArrayWithOneItem1(); + } + return instance; + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java new file mode 100644 index 00000000000..9e7d69a673e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java @@ -0,0 +1,339 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluateditemsAsSchema { + // nest classes so all schemas and input/output classes can be public + + + public static class UnevaluatedItems extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable UnevaluatedItems instance = null; + public static UnevaluatedItems getInstance() { + if (instance == null) { + instance = new UnevaluatedItems(); + } + return instance; + } + } + + + public sealed interface UnevaluateditemsAsSchema1Boxed permits UnevaluateditemsAsSchema1BoxedVoid, UnevaluateditemsAsSchema1BoxedBoolean, UnevaluateditemsAsSchema1BoxedNumber, UnevaluateditemsAsSchema1BoxedString, UnevaluateditemsAsSchema1BoxedList, UnevaluateditemsAsSchema1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluateditemsAsSchema1BoxedVoid(Void data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsAsSchema1BoxedBoolean(boolean data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsAsSchema1BoxedNumber(Number data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsAsSchema1BoxedString(String data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsAsSchema1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsAsSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsAsSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluateditemsAsSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsAsSchema1BoxedList>, MapSchemaValidator, UnevaluateditemsAsSchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluateditemsAsSchema1 instance = null; + + protected UnevaluateditemsAsSchema1() { + super(new JsonSchemaInfo() + .unevaluatedItems(UnevaluatedItems.class) + ); + } + + public static UnevaluateditemsAsSchema1 getInstance() { + if (instance == null) { + instance = new UnevaluateditemsAsSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluateditemsAsSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedString(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsAsSchema1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluateditemsAsSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java new file mode 100644 index 00000000000..b0a5afb1466 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java @@ -0,0 +1,1757 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluateditemsDependsOnMultipleNestedContains { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { + @Nullable Object getData(); + } + + public record ContainsBoxedVoid(Void data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedNumber(Number data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedString(String data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { + private static @Nullable Contains instance = null; + + protected Contains() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Contains getInstance() { + if (instance == null) { + instance = new Contains(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedVoid(validate(arg, configuration)); + } + @Override + public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedBoolean(validate(arg, configuration)); + } + @Override + public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedNumber(validate(arg, configuration)); + } + @Override + public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedString(validate(arg, configuration)); + } + @Override + public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedList(validate(arg, configuration)); + } + @Override + public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ContainsBoxedMap(validate(arg, configuration)); + } + @Override + public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { + @Nullable Object getData(); + } + + public record Schema0BoxedVoid(Void data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedNumber(Number data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedString(String data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { + private static @Nullable Schema0 instance = null; + + protected Schema0() { + super(new JsonSchemaInfo() + .contains(Contains.class) + ); + } + + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedString(validate(arg, configuration)); + } + @Override + public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedList(validate(arg, configuration)); + } + @Override + public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema0BoxedMap(validate(arg, configuration)); + } + @Override + public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Contains1Boxed permits Contains1BoxedVoid, Contains1BoxedBoolean, Contains1BoxedNumber, Contains1BoxedString, Contains1BoxedList, Contains1BoxedMap { + @Nullable Object getData(); + } + + public record Contains1BoxedVoid(Void data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Contains1BoxedBoolean(boolean data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Contains1BoxedNumber(Number data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Contains1BoxedString(String data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Contains1BoxedList(FrozenList<@Nullable Object> data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Contains1BoxedMap(FrozenMap<@Nullable Object> data) implements Contains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Contains1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Contains1BoxedList>, MapSchemaValidator, Contains1BoxedMap> { + private static @Nullable Contains1 instance = null; + + protected Contains1() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("3")) + ); + } + + public static Contains1 getInstance() { + if (instance == null) { + instance = new Contains1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Contains1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedVoid(validate(arg, configuration)); + } + @Override + public Contains1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Contains1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedNumber(validate(arg, configuration)); + } + @Override + public Contains1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedString(validate(arg, configuration)); + } + @Override + public Contains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedList(validate(arg, configuration)); + } + @Override + public Contains1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Contains1BoxedMap(validate(arg, configuration)); + } + @Override + public Contains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { + @Nullable Object getData(); + } + + public record Schema1BoxedVoid(Void data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedNumber(Number data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedString(String data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { + private static @Nullable Schema1 instance = null; + + protected Schema1() { + super(new JsonSchemaInfo() + .contains(Contains1.class) + ); + } + + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedVoid(validate(arg, configuration)); + } + @Override + public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedBoolean(validate(arg, configuration)); + } + @Override + public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedNumber(validate(arg, configuration)); + } + @Override + public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedString(validate(arg, configuration)); + } + @Override + public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedList(validate(arg, configuration)); + } + @Override + public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new Schema1BoxedMap(validate(arg, configuration)); + } + @Override + public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface UnevaluatedItemsBoxed permits UnevaluatedItemsBoxedVoid, UnevaluatedItemsBoxedBoolean, UnevaluatedItemsBoxedNumber, UnevaluatedItemsBoxedString, UnevaluatedItemsBoxedList, UnevaluatedItemsBoxedMap { + @Nullable Object getData(); + } + + public record UnevaluatedItemsBoxedVoid(Void data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedItemsBoxedBoolean(boolean data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedItemsBoxedNumber(Number data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedItemsBoxedString(String data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedItemsBoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedItemsBoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedItemsBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluatedItems extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedItemsBoxedList>, MapSchemaValidator, UnevaluatedItemsBoxedMap> { + private static @Nullable UnevaluatedItems instance = null; + + protected UnevaluatedItems() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("5")) + ); + } + + public static UnevaluatedItems getInstance() { + if (instance == null) { + instance = new UnevaluatedItems(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedString(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedList(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedItemsBoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluatedItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface UnevaluateditemsDependsOnMultipleNestedContains1Boxed permits UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid, UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean, UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber, UnevaluateditemsDependsOnMultipleNestedContains1BoxedString, UnevaluateditemsDependsOnMultipleNestedContains1BoxedList, UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid(Void data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean(boolean data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber(Number data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedString(String data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluateditemsDependsOnMultipleNestedContains1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsDependsOnMultipleNestedContains1BoxedList>, MapSchemaValidator, UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluateditemsDependsOnMultipleNestedContains1 instance = null; + + protected UnevaluateditemsDependsOnMultipleNestedContains1() { + super(new JsonSchemaInfo() + .allOf(List.of( + Schema0.class, + Schema1.class + )) + .unevaluatedItems(UnevaluatedItems.class) + ); + } + + public static UnevaluateditemsDependsOnMultipleNestedContains1 getInstance() { + if (instance == null) { + instance = new UnevaluateditemsDependsOnMultipleNestedContains1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedString(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluateditemsDependsOnMultipleNestedContains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java new file mode 100644 index 00000000000..a6374082f2e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java @@ -0,0 +1,191 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluateditemsWithItems { + // nest classes so all schemas and input/output classes can be public + + + public static class Items extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable Items instance = null; + public static Items getInstance() { + if (instance == null) { + instance = new Items(); + } + return instance; + } + } + + + public static class UnevaluateditemsWithItemsList extends FrozenList { + protected UnevaluateditemsWithItemsList(FrozenList m) { + super(m); + } + public static UnevaluateditemsWithItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return UnevaluateditemsWithItems1.getInstance().validate(arg, configuration); + } + } + + public static class UnevaluateditemsWithItemsListBuilder { + // class to build List + private final List list; + + public UnevaluateditemsWithItemsListBuilder() { + list = new ArrayList<>(); + } + + public UnevaluateditemsWithItemsListBuilder(List list) { + this.list = list; + } + + public UnevaluateditemsWithItemsListBuilder add(int item) { + list.add(item); + return this; + } + + public UnevaluateditemsWithItemsListBuilder add(float item) { + list.add(item); + return this; + } + + public UnevaluateditemsWithItemsListBuilder add(long item) { + list.add(item); + return this; + } + + public UnevaluateditemsWithItemsListBuilder add(double item) { + list.add(item); + return this; + } + + public List build() { + return list; + } + } + + + public static class UnevaluatedItems extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable UnevaluatedItems instance = null; + public static UnevaluatedItems getInstance() { + if (instance == null) { + instance = new UnevaluatedItems(); + } + return instance; + } + } + + + public sealed interface UnevaluateditemsWithItems1Boxed permits UnevaluateditemsWithItems1BoxedList { + @Nullable Object getData(); + } + + public record UnevaluateditemsWithItems1BoxedList(UnevaluateditemsWithItemsList data) implements UnevaluateditemsWithItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class UnevaluateditemsWithItems1 extends JsonSchema implements ListSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluateditemsWithItems1 instance = null; + + protected UnevaluateditemsWithItems1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(Items.class) + .unevaluatedItems(UnevaluatedItems.class) + ); + } + + public static UnevaluateditemsWithItems1 getInstance() { + if (instance == null) { + instance = new UnevaluateditemsWithItems1(); + } + return instance; + } + + @Override + public UnevaluateditemsWithItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(itemInstance instanceof Number)) { + throw new RuntimeException("Invalid instantiated value"); + } + items.add((Number) itemInstance); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new UnevaluateditemsWithItemsList(newInstanceItems); + } + + public UnevaluateditemsWithItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluateditemsWithItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithItems1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java new file mode 100644 index 00000000000..9b329ed860e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java @@ -0,0 +1,339 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluateditemsWithNullInstanceElements { + // nest classes so all schemas and input/output classes can be public + + + public static class UnevaluatedItems extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable UnevaluatedItems instance = null; + public static UnevaluatedItems getInstance() { + if (instance == null) { + instance = new UnevaluatedItems(); + } + return instance; + } + } + + + public sealed interface UnevaluateditemsWithNullInstanceElements1Boxed permits UnevaluateditemsWithNullInstanceElements1BoxedVoid, UnevaluateditemsWithNullInstanceElements1BoxedBoolean, UnevaluateditemsWithNullInstanceElements1BoxedNumber, UnevaluateditemsWithNullInstanceElements1BoxedString, UnevaluateditemsWithNullInstanceElements1BoxedList, UnevaluateditemsWithNullInstanceElements1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedVoid(Void data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedBoolean(boolean data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedNumber(Number data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedString(String data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluateditemsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsWithNullInstanceElements1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluateditemsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsWithNullInstanceElements1BoxedList>, MapSchemaValidator, UnevaluateditemsWithNullInstanceElements1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluateditemsWithNullInstanceElements1 instance = null; + + protected UnevaluateditemsWithNullInstanceElements1() { + super(new JsonSchemaInfo() + .unevaluatedItems(UnevaluatedItems.class) + ); + } + + public static UnevaluateditemsWithNullInstanceElements1 getInstance() { + if (instance == null) { + instance = new UnevaluateditemsWithNullInstanceElements1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedString(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluateditemsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluateditemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java new file mode 100644 index 00000000000..1b8dce520b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java @@ -0,0 +1,410 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluatedpropertiesNotAffectedByPropertynames { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface PropertyNamesBoxed permits PropertyNamesBoxedString { + @Nullable Object getData(); + } + + public record PropertyNamesBoxedString(String data) implements PropertyNamesBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class PropertyNames extends JsonSchema implements StringSchemaValidator { + private static @Nullable PropertyNames instance = null; + + protected PropertyNames() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .maxLength(1) + ); + } + + public static PropertyNames getInstance() { + if (instance == null) { + instance = new PropertyNames(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public PropertyNamesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new PropertyNamesBoxedString(validate(arg, configuration)); + } + @Override + public PropertyNamesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class UnevaluatedProperties extends NumberJsonSchema.NumberJsonSchema1 { + private static @Nullable UnevaluatedProperties instance = null; + public static UnevaluatedProperties getInstance() { + if (instance == null) { + instance = new UnevaluatedProperties(); + } + return instance; + } + } + + + public sealed interface UnevaluatedpropertiesNotAffectedByPropertynames1Boxed permits UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid(Void data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean(boolean data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber(Number data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString(String data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluatedpropertiesNotAffectedByPropertynames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList>, MapSchemaValidator, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluatedpropertiesNotAffectedByPropertynames1 instance = null; + + protected UnevaluatedpropertiesNotAffectedByPropertynames1() { + super(new JsonSchemaInfo() + .propertyNames(PropertyNames.class) + .unevaluatedProperties(UnevaluatedProperties.class) + ); + } + + public static UnevaluatedpropertiesNotAffectedByPropertynames1 getInstance() { + if (instance == null) { + instance = new UnevaluatedpropertiesNotAffectedByPropertynames1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesNotAffectedByPropertynames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java new file mode 100644 index 00000000000..e7fde5b6ee3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java @@ -0,0 +1,195 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluatedpropertiesSchema { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UnevaluatedPropertiesBoxed permits UnevaluatedPropertiesBoxedString { + @Nullable Object getData(); + } + + public record UnevaluatedPropertiesBoxedString(String data) implements UnevaluatedPropertiesBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + + public static class UnevaluatedProperties extends JsonSchema implements StringSchemaValidator { + private static @Nullable UnevaluatedProperties instance = null; + + protected UnevaluatedProperties() { + super(new JsonSchemaInfo() + .type(Set.of( + String.class + )) + .minLength(3) + ); + } + + public static UnevaluatedProperties getInstance() { + if (instance == null) { + instance = new UnevaluatedProperties(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedPropertiesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedPropertiesBoxedString(validate(arg, configuration)); + } + @Override + public UnevaluatedPropertiesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface UnevaluatedpropertiesSchema1Boxed permits UnevaluatedpropertiesSchema1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluatedpropertiesSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluatedpropertiesSchema1 extends JsonSchema implements MapSchemaValidator, UnevaluatedpropertiesSchema1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluatedpropertiesSchema1 instance = null; + + protected UnevaluatedpropertiesSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .unevaluatedProperties(UnevaluatedProperties.class) + ); + } + + public static UnevaluatedpropertiesSchema1 getInstance() { + if (instance == null) { + instance = new UnevaluatedpropertiesSchema1(); + } + return instance; + } + + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedpropertiesSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesSchema1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java new file mode 100644 index 00000000000..4f8d1071048 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java @@ -0,0 +1,301 @@ +package unit_test_api.components.schemas; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.GenericBuilder; +import unit_test_api.schemas.NotAnyTypeJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.MapUtils; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluatedpropertiesWithAdjacentAdditionalproperties { + // nest classes so all schemas and input/output classes can be public + + + public static class AdditionalProperties extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { + private static @Nullable AdditionalProperties instance = null; + public static AdditionalProperties getInstance() { + if (instance == null) { + instance = new AdditionalProperties(); + } + return instance; + } + } + + + public static class Foo extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable Foo instance = null; + public static Foo getInstance() { + if (instance == null) { + instance = new Foo(); + } + return instance; + } + } + + + public static class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap extends FrozenMap<@Nullable Object> { + protected UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap(FrozenMap<@Nullable Object> m) { + super(m); + } + public static final Set requiredKeys = Set.of(); + public static final Set optionalKeys = Set.of( + "foo" + ); + public static UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance().validate(arg, configuration); + } + + public String foo() throws UnsetPropertyException { + String key = "foo"; + throwIfKeyNotPresent(key); + @Nullable Object value = get(key); + if (!(value instanceof String)) { + throw new RuntimeException("Invalid value stored for foo"); + } + return (String) value; + } + + public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { + throwIfKeyKnown(name, requiredKeys, optionalKeys); + return getOrThrow(name); + } + } + + public interface SetterForFoo { + Map getInstance(); + T getBuilderAfterFoo(Map instance); + + default T foo(String value) { + var instance = getInstance(); + instance.put("foo", value); + return getBuilderAfterFoo(instance); + } + } + + public interface SetterForAdditionalProperties { + Set getKnownKeys(); + Map getInstance(); + T getBuilderAfterAdditionalProperty(Map instance); + + default T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, null); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, String value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, List value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + default T additionalProperty(String key, Map value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + } + + public static class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder implements GenericBuilder>, SetterForFoo, SetterForAdditionalProperties { + private final Map instance; + private static final Set knownKeys = Set.of( + "foo" + ); + public Set getKnownKeys() { + return knownKeys; + } + public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder() { + this.instance = new LinkedHashMap<>(); + } + public Map build() { + return instance; + } + public Map getInstance() { + return instance; + } + public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder getBuilderAfterFoo(Map instance) { + return this; + } + public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { + return this; + } + } + + + public static class UnevaluatedProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { + // NotAnyTypeSchema + private static @Nullable UnevaluatedProperties instance = null; + public static UnevaluatedProperties getInstance() { + if (instance == null) { + instance = new UnevaluatedProperties(); + } + return instance; + } + } + + + public sealed interface UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed permits UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap(UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap data) implements UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluatedpropertiesWithAdjacentAdditionalproperties1 extends JsonSchema implements MapSchemaValidator { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluatedpropertiesWithAdjacentAdditionalproperties1 instance = null; + + protected UnevaluatedpropertiesWithAdjacentAdditionalproperties1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("foo", Foo.class) + )) + .additionalProperties(AdditionalProperties.class) + .unevaluatedProperties(UnevaluatedProperties.class) + ); + } + + public static UnevaluatedpropertiesWithAdjacentAdditionalproperties1 getInstance() { + if (instance == null) { + instance = new UnevaluatedpropertiesWithAdjacentAdditionalproperties1(); + } + return instance; + } + + public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return new UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap(castProperties); + } + + public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java new file mode 100644 index 00000000000..26b8be4996e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java @@ -0,0 +1,339 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UnevaluatedpropertiesWithNullValuedInstanceProperties { + // nest classes so all schemas and input/output classes can be public + + + public static class UnevaluatedProperties extends NullJsonSchema.NullJsonSchema1 { + private static @Nullable UnevaluatedProperties instance = null; + public static UnevaluatedProperties getInstance() { + if (instance == null) { + instance = new UnevaluatedProperties(); + } + return instance; + } + } + + + public sealed interface UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed permits UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap { + @Nullable Object getData(); + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UnevaluatedpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UnevaluatedpropertiesWithNullValuedInstanceProperties1 instance = null; + + protected UnevaluatedpropertiesWithNullValuedInstanceProperties1() { + super(new JsonSchemaInfo() + .unevaluatedProperties(UnevaluatedProperties.class) + ); + } + + public static UnevaluatedpropertiesWithNullValuedInstanceProperties1 getInstance() { + if (instance == null) { + instance = new UnevaluatedpropertiesWithNullValuedInstanceProperties1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); + } + @Override + public UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java new file mode 100644 index 00000000000..88beb9ad710 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UniqueitemsFalseValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UniqueitemsFalseValidation1Boxed permits UniqueitemsFalseValidation1BoxedVoid, UniqueitemsFalseValidation1BoxedBoolean, UniqueitemsFalseValidation1BoxedNumber, UniqueitemsFalseValidation1BoxedString, UniqueitemsFalseValidation1BoxedList, UniqueitemsFalseValidation1BoxedMap { + @Nullable Object getData(); + } + + public record UniqueitemsFalseValidation1BoxedVoid(Void data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseValidation1BoxedBoolean(boolean data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseValidation1BoxedNumber(Number data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseValidation1BoxedString(String data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseValidation1BoxedList(FrozenList<@Nullable Object> data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsFalseValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UniqueitemsFalseValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UniqueitemsFalseValidation1BoxedList>, MapSchemaValidator, UniqueitemsFalseValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UniqueitemsFalseValidation1 instance = null; + + protected UniqueitemsFalseValidation1() { + super(new JsonSchemaInfo() + .uniqueItems(false) + ); + } + + public static UniqueitemsFalseValidation1 getInstance() { + if (instance == null) { + instance = new UniqueitemsFalseValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UniqueitemsFalseValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedString(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedList(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java new file mode 100644 index 00000000000..4a3a66bc9ef --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java @@ -0,0 +1,426 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UniqueitemsFalseWithAnArrayOfItems { + // nest classes so all schemas and input/output classes can be public + + + public static class UniqueitemsFalseWithAnArrayOfItemsList extends FrozenList<@Nullable Object> { + protected UniqueitemsFalseWithAnArrayOfItemsList(FrozenList<@Nullable Object> m) { + super(m); + } + public static UniqueitemsFalseWithAnArrayOfItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return UniqueitemsFalseWithAnArrayOfItems1.getInstance().validate(arg, configuration); + } + } + + public static class UniqueitemsFalseWithAnArrayOfItemsListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder() { + list = new ArrayList<>(); + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(Void item) { + list.add(null); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(boolean item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(String item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(int item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(float item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(long item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(double item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(List item) { + list.add(item); + return this; + } + + public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public static class Schema0 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface UniqueitemsFalseWithAnArrayOfItems1Boxed permits UniqueitemsFalseWithAnArrayOfItems1BoxedVoid, UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean, UniqueitemsFalseWithAnArrayOfItems1BoxedNumber, UniqueitemsFalseWithAnArrayOfItems1BoxedString, UniqueitemsFalseWithAnArrayOfItems1BoxedList, UniqueitemsFalseWithAnArrayOfItems1BoxedMap { + @Nullable Object getData(); + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedVoid(Void data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean(boolean data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedNumber(Number data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedString(String data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedList(UniqueitemsFalseWithAnArrayOfItemsList data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsFalseWithAnArrayOfItems1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UniqueitemsFalseWithAnArrayOfItems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, UniqueitemsFalseWithAnArrayOfItems1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UniqueitemsFalseWithAnArrayOfItems1 instance = null; + + protected UniqueitemsFalseWithAnArrayOfItems1() { + super(new JsonSchemaInfo() + .uniqueItems(false) + .prefixItems(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static UniqueitemsFalseWithAnArrayOfItems1 getInstance() { + if (instance == null) { + instance = new UniqueitemsFalseWithAnArrayOfItems1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public UniqueitemsFalseWithAnArrayOfItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new UniqueitemsFalseWithAnArrayOfItemsList(newInstanceItems); + } + + public UniqueitemsFalseWithAnArrayOfItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedVoid(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedNumber(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedString(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedList(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsFalseWithAnArrayOfItems1BoxedMap(validate(arg, configuration)); + } + @Override + public UniqueitemsFalseWithAnArrayOfItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java new file mode 100644 index 00000000000..e18321bcb1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UniqueitemsValidation { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UniqueitemsValidation1Boxed permits UniqueitemsValidation1BoxedVoid, UniqueitemsValidation1BoxedBoolean, UniqueitemsValidation1BoxedNumber, UniqueitemsValidation1BoxedString, UniqueitemsValidation1BoxedList, UniqueitemsValidation1BoxedMap { + @Nullable Object getData(); + } + + public record UniqueitemsValidation1BoxedVoid(Void data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsValidation1BoxedBoolean(boolean data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsValidation1BoxedNumber(Number data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsValidation1BoxedString(String data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsValidation1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UniqueitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UniqueitemsValidation1BoxedList>, MapSchemaValidator, UniqueitemsValidation1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UniqueitemsValidation1 instance = null; + + protected UniqueitemsValidation1() { + super(new JsonSchemaInfo() + .uniqueItems(true) + ); + } + + public static UniqueitemsValidation1 getInstance() { + if (instance == null) { + instance = new UniqueitemsValidation1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UniqueitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedVoid(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedNumber(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedString(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedList(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsValidation1BoxedMap(validate(arg, configuration)); + } + @Override + public UniqueitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java new file mode 100644 index 00000000000..5059d69dafa --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java @@ -0,0 +1,426 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.BooleanJsonSchema; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UniqueitemsWithAnArrayOfItems { + // nest classes so all schemas and input/output classes can be public + + + public static class UniqueitemsWithAnArrayOfItemsList extends FrozenList<@Nullable Object> { + protected UniqueitemsWithAnArrayOfItemsList(FrozenList<@Nullable Object> m) { + super(m); + } + public static UniqueitemsWithAnArrayOfItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return UniqueitemsWithAnArrayOfItems1.getInstance().validate(arg, configuration); + } + } + + public static class UniqueitemsWithAnArrayOfItemsListBuilder { + // class to build List<@Nullable Object> + private final List<@Nullable Object> list; + + public UniqueitemsWithAnArrayOfItemsListBuilder() { + list = new ArrayList<>(); + } + + public UniqueitemsWithAnArrayOfItemsListBuilder(List<@Nullable Object> list) { + this.list = list; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(Void item) { + list.add(null); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(boolean item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(String item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(int item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(float item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(long item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(double item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(List item) { + list.add(item); + return this; + } + + public UniqueitemsWithAnArrayOfItemsListBuilder add(Map item) { + list.add(item); + return this; + } + + public List<@Nullable Object> build() { + return list; + } + } + + + public static class Schema0 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Schema0 instance = null; + public static Schema0 getInstance() { + if (instance == null) { + instance = new Schema0(); + } + return instance; + } + } + + + public static class Schema1 extends BooleanJsonSchema.BooleanJsonSchema1 { + private static @Nullable Schema1 instance = null; + public static Schema1 getInstance() { + if (instance == null) { + instance = new Schema1(); + } + return instance; + } + } + + + public sealed interface UniqueitemsWithAnArrayOfItems1Boxed permits UniqueitemsWithAnArrayOfItems1BoxedVoid, UniqueitemsWithAnArrayOfItems1BoxedBoolean, UniqueitemsWithAnArrayOfItems1BoxedNumber, UniqueitemsWithAnArrayOfItems1BoxedString, UniqueitemsWithAnArrayOfItems1BoxedList, UniqueitemsWithAnArrayOfItems1BoxedMap { + @Nullable Object getData(); + } + + public record UniqueitemsWithAnArrayOfItems1BoxedVoid(Void data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsWithAnArrayOfItems1BoxedBoolean(boolean data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsWithAnArrayOfItems1BoxedNumber(Number data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsWithAnArrayOfItems1BoxedString(String data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsWithAnArrayOfItems1BoxedList(UniqueitemsWithAnArrayOfItemsList data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UniqueitemsWithAnArrayOfItems1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsWithAnArrayOfItems1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UniqueitemsWithAnArrayOfItems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, UniqueitemsWithAnArrayOfItems1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UniqueitemsWithAnArrayOfItems1 instance = null; + + protected UniqueitemsWithAnArrayOfItems1() { + super(new JsonSchemaInfo() + .uniqueItems(true) + .prefixItems(List.of( + Schema0.class, + Schema1.class + )) + ); + } + + public static UniqueitemsWithAnArrayOfItems1 getInstance() { + if (instance == null) { + instance = new UniqueitemsWithAnArrayOfItems1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public UniqueitemsWithAnArrayOfItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return new UniqueitemsWithAnArrayOfItemsList(newInstanceItems); + } + + public UniqueitemsWithAnArrayOfItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedVoid(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedNumber(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedString(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedList(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UniqueitemsWithAnArrayOfItems1BoxedMap(validate(arg, configuration)); + } + @Override + public UniqueitemsWithAnArrayOfItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java new file mode 100644 index 00000000000..6d9c4c1b8d7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UriFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UriFormat1Boxed permits UriFormat1BoxedVoid, UriFormat1BoxedBoolean, UriFormat1BoxedNumber, UriFormat1BoxedString, UriFormat1BoxedList, UriFormat1BoxedMap { + @Nullable Object getData(); + } + + public record UriFormat1BoxedVoid(Void data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriFormat1BoxedBoolean(boolean data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriFormat1BoxedNumber(Number data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriFormat1BoxedString(String data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UriFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriFormat1BoxedList>, MapSchemaValidator, UriFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UriFormat1 instance = null; + + protected UriFormat1() { + super(new JsonSchemaInfo() + .format("uri") + ); + } + + public static UriFormat1 getInstance() { + if (instance == null) { + instance = new UriFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UriFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public UriFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UriFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public UriFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedString(validate(arg, configuration)); + } + @Override + public UriFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedList(validate(arg, configuration)); + } + @Override + public UriFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UriFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public UriFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java new file mode 100644 index 00000000000..25bea0f0e3e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UriReferenceFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UriReferenceFormat1Boxed permits UriReferenceFormat1BoxedVoid, UriReferenceFormat1BoxedBoolean, UriReferenceFormat1BoxedNumber, UriReferenceFormat1BoxedString, UriReferenceFormat1BoxedList, UriReferenceFormat1BoxedMap { + @Nullable Object getData(); + } + + public record UriReferenceFormat1BoxedVoid(Void data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriReferenceFormat1BoxedBoolean(boolean data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriReferenceFormat1BoxedNumber(Number data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriReferenceFormat1BoxedString(String data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriReferenceFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriReferenceFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriReferenceFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UriReferenceFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriReferenceFormat1BoxedList>, MapSchemaValidator, UriReferenceFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UriReferenceFormat1 instance = null; + + protected UriReferenceFormat1() { + super(new JsonSchemaInfo() + .format("uri-reference") + ); + } + + public static UriReferenceFormat1 getInstance() { + if (instance == null) { + instance = new UriReferenceFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UriReferenceFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedString(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedList(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UriReferenceFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public UriReferenceFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java new file mode 100644 index 00000000000..e451da35ec4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UriTemplateFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UriTemplateFormat1Boxed permits UriTemplateFormat1BoxedVoid, UriTemplateFormat1BoxedBoolean, UriTemplateFormat1BoxedNumber, UriTemplateFormat1BoxedString, UriTemplateFormat1BoxedList, UriTemplateFormat1BoxedMap { + @Nullable Object getData(); + } + + public record UriTemplateFormat1BoxedVoid(Void data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriTemplateFormat1BoxedBoolean(boolean data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriTemplateFormat1BoxedNumber(Number data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriTemplateFormat1BoxedString(String data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriTemplateFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UriTemplateFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriTemplateFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UriTemplateFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriTemplateFormat1BoxedList>, MapSchemaValidator, UriTemplateFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UriTemplateFormat1 instance = null; + + protected UriTemplateFormat1() { + super(new JsonSchemaInfo() + .format("uri-template") + ); + } + + public static UriTemplateFormat1 getInstance() { + if (instance == null) { + instance = new UriTemplateFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UriTemplateFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedString(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedList(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UriTemplateFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public UriTemplateFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java new file mode 100644 index 00000000000..5dd40f9caea --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java @@ -0,0 +1,327 @@ +package unit_test_api.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class UuidFormat { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface UuidFormat1Boxed permits UuidFormat1BoxedVoid, UuidFormat1BoxedBoolean, UuidFormat1BoxedNumber, UuidFormat1BoxedString, UuidFormat1BoxedList, UuidFormat1BoxedMap { + @Nullable Object getData(); + } + + public record UuidFormat1BoxedVoid(Void data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UuidFormat1BoxedBoolean(boolean data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UuidFormat1BoxedNumber(Number data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UuidFormat1BoxedString(String data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UuidFormat1BoxedList(FrozenList<@Nullable Object> data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record UuidFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UuidFormat1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class UuidFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidFormat1BoxedList>, MapSchemaValidator, UuidFormat1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable UuidFormat1 instance = null; + + protected UuidFormat1() { + super(new JsonSchemaInfo() + .format("uuid") + ); + } + + public static UuidFormat1 getInstance() { + if (instance == null) { + instance = new UuidFormat1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public UuidFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedVoid(validate(arg, configuration)); + } + @Override + public UuidFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedBoolean(validate(arg, configuration)); + } + @Override + public UuidFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedNumber(validate(arg, configuration)); + } + @Override + public UuidFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedString(validate(arg, configuration)); + } + @Override + public UuidFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedList(validate(arg, configuration)); + } + @Override + public UuidFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidFormat1BoxedMap(validate(arg, configuration)); + } + @Override + public UuidFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java new file mode 100644 index 00000000000..f2de1d9e1e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java @@ -0,0 +1,1185 @@ +package unit_test_api.components.schemas; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.UnsetAddPropsSetter; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +public class ValidateAgainstCorrectBranchThenVsElse { + // nest classes so all schemas and input/output classes can be public + + + public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + @Nullable Object getData(); + } + + public record ElseBoxedVoid(Void data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedNumber(Number data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedString(String data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { + private static @Nullable Else instance = null; + + protected Else() { + super(new JsonSchemaInfo() + .multipleOf(new BigDecimal("2")) + ); + } + + public static Else getInstance() { + if (instance == null) { + instance = new Else(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedVoid(validate(arg, configuration)); + } + @Override + public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedBoolean(validate(arg, configuration)); + } + @Override + public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedNumber(validate(arg, configuration)); + } + @Override + public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedString(validate(arg, configuration)); + } + @Override + public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedList(validate(arg, configuration)); + } + @Override + public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseBoxedMap(validate(arg, configuration)); + } + @Override + public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + @Nullable Object getData(); + } + + public record IfBoxedVoid(Void data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedBoolean(boolean data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedNumber(Number data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedString(String data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { + private static @Nullable If instance = null; + + protected If() { + super(new JsonSchemaInfo() + .exclusiveMaximum(0) + ); + } + + public static If getInstance() { + if (instance == null) { + instance = new If(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedVoid(validate(arg, configuration)); + } + @Override + public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedBoolean(validate(arg, configuration)); + } + @Override + public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedNumber(validate(arg, configuration)); + } + @Override + public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedString(validate(arg, configuration)); + } + @Override + public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedList(validate(arg, configuration)); + } + @Override + public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfBoxedMap(validate(arg, configuration)); + } + @Override + public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { + @Nullable Object getData(); + } + + public record ThenBoxedVoid(Void data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedBoolean(boolean data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedNumber(Number data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedString(String data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { + private static @Nullable Then instance = null; + + protected Then() { + super(new JsonSchemaInfo() + .minimum(-10) + ); + } + + public static Then getInstance() { + if (instance == null) { + instance = new Then(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedVoid(validate(arg, configuration)); + } + @Override + public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedBoolean(validate(arg, configuration)); + } + @Override + public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedNumber(validate(arg, configuration)); + } + @Override + public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedString(validate(arg, configuration)); + } + @Override + public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedList(validate(arg, configuration)); + } + @Override + public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ThenBoxedMap(validate(arg, configuration)); + } + @Override + public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ValidateAgainstCorrectBranchThenVsElse1Boxed permits ValidateAgainstCorrectBranchThenVsElse1BoxedVoid, ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean, ValidateAgainstCorrectBranchThenVsElse1BoxedNumber, ValidateAgainstCorrectBranchThenVsElse1BoxedString, ValidateAgainstCorrectBranchThenVsElse1BoxedList, ValidateAgainstCorrectBranchThenVsElse1BoxedMap { + @Nullable Object getData(); + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedVoid(Void data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean(boolean data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedNumber(Number data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedString(String data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedList(FrozenList<@Nullable Object> data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public record ValidateAgainstCorrectBranchThenVsElse1BoxedMap(FrozenMap<@Nullable Object> data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + + public static class ValidateAgainstCorrectBranchThenVsElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ValidateAgainstCorrectBranchThenVsElse1BoxedList>, MapSchemaValidator, ValidateAgainstCorrectBranchThenVsElse1BoxedMap> { + /* + NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + */ + private static @Nullable ValidateAgainstCorrectBranchThenVsElse1 instance = null; + + protected ValidateAgainstCorrectBranchThenVsElse1() { + super(new JsonSchemaInfo() + .ifSchema(If.class) + .then(Then.class) + .elseSchema(Else.class) + ); + } + + public static ValidateAgainstCorrectBranchThenVsElse1 getInstance() { + if (instance == null) { + instance = new ValidateAgainstCorrectBranchThenVsElse1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + getPathToSchemas(this, castArg, validationMetadata, pathSet); + return castArg; + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(itemInstance); + i += 1; + } + FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); + return newInstanceItems; + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, propertyInstance); + } + FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); + return castProperties; + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedVoid(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedNumber(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedString(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedList(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ValidateAgainstCorrectBranchThenVsElse1BoxedMap(validate(arg, configuration)); + } + @Override + public ValidateAgainstCorrectBranchThenVsElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java new file mode 100644 index 00000000000..e91ad8d0377 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java @@ -0,0 +1,101 @@ +package unit_test_api.configurations; + +import unit_test_api.servers.Server; +import unit_test_api.RootServerInfo; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.HashMap; + +public class ApiConfiguration { + private final ServerInfo serverInfo; + private final ServerIndexInfo serverIndexInfo; + private final @Nullable Duration timeout; + private final Map> defaultHeaders; + + public ApiConfiguration() { + serverInfo = new ServerInfoBuilder().build(); + serverIndexInfo = new ServerIndexInfoBuilder().build(); + timeout = null; + defaultHeaders = new HashMap<>(); + } + + public ApiConfiguration(ServerInfo serverInfo, ServerIndexInfo serverIndexInfo, Duration timeout, Map> defaultHeaders) { + this.serverInfo = serverInfo; + this.serverIndexInfo = serverIndexInfo; + this.timeout = timeout; + this.defaultHeaders = defaultHeaders; + } + + public static class ServerInfo { + final RootServerInfo.RootServerInfo1 rootServerInfo; + + ServerInfo( + RootServerInfo. @Nullable RootServerInfo1 rootServerInfo + ) { + this.rootServerInfo = Objects.requireNonNullElse(rootServerInfo, new RootServerInfo.RootServerInfoBuilder().build()); + } + } + + public static class ServerInfoBuilder { + private RootServerInfo. @Nullable RootServerInfo1 rootServerInfo; + public ServerInfoBuilder() {} + + public ServerInfoBuilder rootServerInfo(RootServerInfo.RootServerInfo1 rootServerInfo) { + this.rootServerInfo = rootServerInfo; + return this; + } + + public ServerInfo build() { + return new ServerInfo( + rootServerInfo + ); + } + } + + public static class ServerIndexInfo { + final RootServerInfo.ServerIndex rootServerInfoServerIndex; + + ServerIndexInfo( + RootServerInfo. @Nullable ServerIndex rootServerInfoServerIndex + ) { + this.rootServerInfoServerIndex = Objects.requireNonNullElse(rootServerInfoServerIndex, RootServerInfo.ServerIndex.SERVER_0); + } + } + + public static class ServerIndexInfoBuilder { + private RootServerInfo. @Nullable ServerIndex rootServerInfoServerIndex; + public ServerIndexInfoBuilder() {} + + public ServerIndexInfoBuilder rootServerInfoServerIndex(RootServerInfo.ServerIndex serverIndex) { + this.rootServerInfoServerIndex = serverIndex; + return this; + } + + public ServerIndexInfo build() { + return new ServerIndexInfo( + rootServerInfoServerIndex + ); + } + } + + public Server getServer(RootServerInfo. @Nullable ServerIndex serverIndex) { + var serverProvider = serverInfo.rootServerInfo; + if (serverIndex == null) { + RootServerInfo.ServerIndex configServerIndex = serverIndexInfo.rootServerInfoServerIndex; + return serverProvider.getServer(configServerIndex); + } + return serverProvider.getServer(serverIndex); + } + + public Map> getDefaultHeaders() { + return defaultHeaders; + } + + public @Nullable Duration getTimeout() { + return timeout; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java new file mode 100644 index 00000000000..a338f376306 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java @@ -0,0 +1,334 @@ +package unit_test_api.configurations; + +import java.util.LinkedHashSet; + +public record JsonSchemaKeywordFlags( + boolean additionalProperties, + boolean allOf, + boolean anyOf, + boolean const_, + boolean contains, + boolean dependentRequired, + boolean dependentSchemas, + boolean discriminator, + boolean else_, + boolean enum_, + boolean exclusiveMaximum, + boolean exclusiveMinimum, + boolean format, + boolean if_, + boolean maximum, + boolean minimum, + boolean items, + boolean maxContains, + boolean maxItems, + boolean maxLength, + boolean maxProperties, + boolean minContains, + boolean minItems, + boolean minLength, + boolean minProperties, + boolean multipleOf, + boolean not, + boolean oneOf, + boolean pattern, + boolean patternProperties, + boolean prefixItems, + boolean properties, + boolean propertyNames, + boolean required, + boolean then, + boolean type, + boolean uniqueItems, + boolean unevaluatedItems, + boolean unevaluatedProperties + ) { + + public LinkedHashSet getKeywords() { + LinkedHashSet enabledKeywords = new LinkedHashSet<>(); + if (additionalProperties) { enabledKeywords.add("additionalProperties"); } + if (allOf) { enabledKeywords.add("allOf"); } + if (anyOf) { enabledKeywords.add("anyOf"); } + if (const_) { enabledKeywords.add("const"); } + if (contains) { enabledKeywords.add("contains"); } + if (dependentRequired) { enabledKeywords.add("dependentRequired"); } + if (dependentSchemas) { enabledKeywords.add("dependentSchemas"); } + if (discriminator) { enabledKeywords.add("discriminator"); } + if (else_) { enabledKeywords.add("else_"); } + if (enum_) { enabledKeywords.add("enum_"); } + if (exclusiveMaximum) { enabledKeywords.add("exclusiveMaximum"); } + if (exclusiveMinimum) { enabledKeywords.add("exclusiveMinimum"); } + if (format) { enabledKeywords.add("format"); } + if (if_) { enabledKeywords.add("if_"); } + if (maximum) { enabledKeywords.add("maximum"); } + if (minimum) { enabledKeywords.add("minimum"); } + if (items) { enabledKeywords.add("items"); } + if (maxContains) { enabledKeywords.add("maxContains"); } + if (maxItems) { enabledKeywords.add("maxItems"); } + if (maxLength) { enabledKeywords.add("maxLength"); } + if (maxProperties) { enabledKeywords.add("maxProperties"); } + if (minContains) { enabledKeywords.add("minContains"); } + if (minItems) { enabledKeywords.add("minItems"); } + if (minLength) { enabledKeywords.add("minLength"); } + if (minProperties) { enabledKeywords.add("minProperties"); } + if (multipleOf) { enabledKeywords.add("multipleOf"); } + if (not) { enabledKeywords.add("not"); } + if (oneOf) { enabledKeywords.add("oneOf"); } + if (pattern) { enabledKeywords.add("pattern"); } + if (patternProperties) { enabledKeywords.add("patternProperties"); } + if (prefixItems) { enabledKeywords.add("prefixItems"); } + if (properties) { enabledKeywords.add("properties"); } + if (propertyNames) { enabledKeywords.add("propertyNames"); } + if (required) { enabledKeywords.add("required"); } + if (then) { enabledKeywords.add("then"); } + if (type) { enabledKeywords.add("type"); } + if (uniqueItems) { enabledKeywords.add("uniqueItems"); } + if (unevaluatedItems) { enabledKeywords.add("unevaluatedItems"); } + if (unevaluatedProperties) { enabledKeywords.add("unevaluatedProperties"); } + return enabledKeywords; + } + + public static class Builder { + private boolean additionalProperties; + private boolean allOf; + private boolean anyOf; + private boolean const_; + private boolean contains; + private boolean dependentRequired; + private boolean dependentSchemas; + private boolean discriminator; + private boolean else_; + private boolean enum_; + private boolean exclusiveMaximum; + private boolean exclusiveMinimum; + private boolean format; + private boolean if_; + private boolean maximum; + private boolean minimum; + private boolean items; + private boolean maxContains; + private boolean maxItems; + private boolean maxLength; + private boolean maxProperties; + private boolean minContains; + private boolean minItems; + private boolean minLength; + private boolean minProperties; + private boolean multipleOf; + private boolean not; + private boolean oneOf; + private boolean pattern; + private boolean patternProperties; + private boolean prefixItems; + private boolean properties; + private boolean propertyNames; + private boolean required; + private boolean then; + private boolean type; + private boolean uniqueItems; + private boolean unevaluatedItems; + private boolean unevaluatedProperties; + + public Builder() {} + + public Builder additionalProperties() { + additionalProperties = true; + return this; + } + public Builder allOf() { + allOf = true; + return this; + } + public Builder anyOf() { + anyOf = true; + return this; + } + public Builder const_() { + const_ = true; + return this; + } + public Builder contains() { + contains = true; + return this; + } + public Builder dependentRequired() { + dependentRequired = true; + return this; + } + public Builder dependentSchemas() { + dependentSchemas = true; + return this; + } + public Builder discriminator() { + discriminator = true; + return this; + } + public Builder else_() { + else_ = true; + return this; + } + public Builder enum_() { + enum_ = true; + return this; + } + public Builder exclusiveMaximum() { + exclusiveMaximum = true; + return this; + } + public Builder exclusiveMinimum() { + exclusiveMinimum = true; + return this; + } + public Builder format() { + format = true; + return this; + } + public Builder if_() { + if_ = true; + return this; + } + public Builder maximum() { + maximum = true; + return this; + } + public Builder minimum() { + minimum = true; + return this; + } + public Builder items() { + items = true; + return this; + } + public Builder maxContains() { + maxContains = true; + return this; + } + public Builder maxItems() { + maxItems = true; + return this; + } + public Builder maxLength() { + maxLength = true; + return this; + } + public Builder maxProperties() { + maxProperties = true; + return this; + } + public Builder minContains() { + minContains = true; + return this; + } + public Builder minItems() { + minItems = true; + return this; + } + public Builder minLength() { + minLength = true; + return this; + } + public Builder minProperties() { + minProperties = true; + return this; + } + public Builder multipleOf() { + multipleOf = true; + return this; + } + public Builder not() { + not = true; + return this; + } + public Builder oneOf() { + oneOf = true; + return this; + } + public Builder pattern() { + pattern = true; + return this; + } + public Builder patternProperties() { + patternProperties = true; + return this; + } + public Builder prefixItems() { + prefixItems = true; + return this; + } + public Builder properties() { + properties = true; + return this; + } + public Builder propertyNames() { + propertyNames = true; + return this; + } + public Builder required() { + required = true; + return this; + } + public Builder then() { + then = true; + return this; + } + public Builder type() { + type = true; + return this; + } + public Builder uniqueItems() { + uniqueItems = true; + return this; + } + public Builder unevaluatedItems() { + unevaluatedItems = true; + return this; + } + public Builder unevaluatedProperties() { + unevaluatedProperties = true; + return this; + } + public JsonSchemaKeywordFlags build() { + return new JsonSchemaKeywordFlags( + additionalProperties, + allOf, + anyOf, + const_, + contains, + dependentRequired, + dependentSchemas, + discriminator, + else_, + enum_, + exclusiveMaximum, + exclusiveMinimum, + format, + if_, + maximum, + minimum, + items, + maxContains, + maxItems, + maxLength, + maxProperties, + minContains, + minItems, + minLength, + minProperties, + multipleOf, + not, + oneOf, + pattern, + patternProperties, + prefixItems, + properties, + propertyNames, + required, + then, + type, + uniqueItems, + unevaluatedItems, + unevaluatedProperties + ); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java new file mode 100644 index 00000000000..b186a2289d4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java @@ -0,0 +1,4 @@ +package unit_test_api.configurations; + +public record SchemaConfiguration(JsonSchemaKeywordFlags disabledKeywordFlags) { +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java new file mode 100644 index 00000000000..af4a7a37f81 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java @@ -0,0 +1,18 @@ +package unit_test_api.contenttype; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.ToNumberPolicy; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class ContentTypeDeserializer { + private static final Gson gson = new GsonBuilder() + .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .create(); + + @SuppressWarnings("nullness") + public static @Nullable Object fromJson(String json) { + return gson.fromJson(json, Object.class); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java new file mode 100644 index 00000000000..067d288a444 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java @@ -0,0 +1,18 @@ +package unit_test_api.contenttype; + +import java.util.regex.Pattern; + +public class ContentTypeDetector { + private static final Pattern jsonContentTypePattern = Pattern.compile( + "application/[^+]*[+]?(json);?.*" + ); + private static final String textPlainContentType = "text/plain"; + + public static boolean contentTypeIsJson(String contentType) { + return jsonContentTypePattern.matcher(contentType).find(); + } + + public static boolean contentTypeIsTextPlain(String contentType) { + return textPlainContentType.equals(contentType); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java new file mode 100644 index 00000000000..392ec7a002a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java @@ -0,0 +1,18 @@ +package unit_test_api.contenttype; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.ToNumberPolicy; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class ContentTypeSerializer { + private static final Gson gson = new GsonBuilder() + .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .create(); + + @SuppressWarnings("nullness") + public static String toJson(@Nullable Object body) { + return gson.toJson(body); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java new file mode 100644 index 00000000000..b69f40b7302 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java @@ -0,0 +1,13 @@ +package unit_test_api.exceptions; + +import java.net.http.HttpResponse; + +@SuppressWarnings("serial") +public class ApiException extends BaseException { + public HttpResponse response; + + public ApiException(String s, HttpResponse response) { + super(s); + this.response = response; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java new file mode 100644 index 00000000000..32916ec96ad --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java @@ -0,0 +1,8 @@ +package unit_test_api.exceptions; + +@SuppressWarnings("serial") +public class BaseException extends Exception { + public BaseException(String s) { + super(s); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java new file mode 100644 index 00000000000..3fd3a00e464 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java @@ -0,0 +1,8 @@ +package unit_test_api.exceptions; + +@SuppressWarnings("serial") +public class InvalidAdditionalPropertyException extends BaseException { + public InvalidAdditionalPropertyException(String s) { + super(s); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java new file mode 100644 index 00000000000..cf6ee8ac6c4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java @@ -0,0 +1,8 @@ +package unit_test_api.exceptions; + +@SuppressWarnings("serial") +public class NotImplementedException extends BaseException { + public NotImplementedException(String s) { + super(s); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java new file mode 100644 index 00000000000..f49e05b4742 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java @@ -0,0 +1,8 @@ +package unit_test_api.exceptions; + +@SuppressWarnings("serial") +public class UnsetPropertyException extends BaseException { + public UnsetPropertyException(String s) { + super(s); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java new file mode 100644 index 00000000000..3aa0e5699b6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java @@ -0,0 +1,8 @@ +package unit_test_api.exceptions; + +@SuppressWarnings("serial") +public class ValidationException extends BaseException { + public ValidationException(String s) { + super(s); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java new file mode 100644 index 00000000000..c722738d2b9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java @@ -0,0 +1,59 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.contenttype.ContentTypeDetector; +import unit_test_api.contenttype.ContentTypeSerializer; +import unit_test_api.contenttype.ContentTypeDeserializer; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.mediatype.MediaType; +import unit_test_api.parameter.ParameterStyle; + +import java.net.http.HttpHeaders; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; +import java.util.function.BiPredicate; + +public class ContentHeader extends HeaderBase implements Header { + public final AbstractMap.SimpleEntry> content; + + public ContentHeader(boolean required, @Nullable Boolean allowReserved, @Nullable Boolean explode, AbstractMap.SimpleEntry> content) { + super(required, ParameterStyle.SIMPLE, explode, allowReserved); + this.content = content; + } + + private static HttpHeaders toHeaders(String name, String value) { + Map> map = Map.of(name, List.of(value)); + BiPredicate headerFilter = (key, val) -> true; + return HttpHeaders.of(map, headerFilter); + } + + @Override + public HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { + var castInData = validate ? content.getValue().schema().validate(inData, configuration) : inData ; + String contentType = content.getKey(); + if (ContentTypeDetector.contentTypeIsJson(contentType)) { + var value = ContentTypeSerializer.toJson(castInData); + return toHeaders(name, value); + } else { + throw new NotImplementedException("Serialization of "+contentType+" has not yet been implemented"); + } + } + + @Override + public @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { + String inDataJoined = String.join(",", inData); // unsure if this is needed + @Nullable Object deserializedJson = ContentTypeDeserializer.fromJson(inDataJoined); + if (validate) { + String contentType = content.getKey(); + if (ContentTypeDetector.contentTypeIsJson(contentType)) { + return content.getValue().schema().validate(deserializedJson, configuration); + } else { + throw new NotImplementedException("Header deserialization of "+contentType+" has not yet been implemented"); + } + } + return deserializedJson; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java new file mode 100644 index 00000000000..6018aef54d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java @@ -0,0 +1,14 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; + +import java.net.http.HttpHeaders; +import java.util.List; + +public interface Header { + HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException; + @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java new file mode 100644 index 00000000000..44ef98c032d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java @@ -0,0 +1,18 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.parameter.ParameterStyle; + +public class HeaderBase { + public final boolean required; + public final @Nullable ParameterStyle style; + public final @Nullable Boolean explode; + public final @Nullable Boolean allowReserved; + + public HeaderBase(boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved) { + this.required = required; + this.style = style; + this.explode = explode; + this.allowReserved = allowReserved; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java new file mode 100644 index 00000000000..22fb55e038d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java @@ -0,0 +1,27 @@ +package unit_test_api.header; + +import java.util.Set; + +public class PrefixSeparatorIterator { + // A class to store prefixes and separators for rfc6570 expansions + public final String prefix; + public final String separator; + private boolean first; + public final String itemSeparator; + private static final Set reusedSeparators = Set.of(".", "|", "%20"); + + public PrefixSeparatorIterator(String prefix, String separator) { + this.prefix = prefix; + this.separator = separator; + itemSeparator = reusedSeparators.contains(separator) ? separator : ","; + first = true; + } + + public String next() { + if (first) { + first = false; + return prefix; + } + return separator; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java new file mode 100644 index 00000000000..a2cd5006219 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java @@ -0,0 +1,193 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +public class Rfc6570Serializer { + private static final String ENCODING = "UTF-8"; + private static final Set namedParameterSeparators = Set.of("&", ";"); + + private static String percentEncode(String s) throws NotImplementedException { + if (s == null) { + return ""; + } + try { + return URLEncoder.encode(s, ENCODING) + // OAuth encodes some characters differently: + .replace("+", "%20").replace("*", "%2A") + .replace("%7E", "~"); + // This could be done faster with more hand-crafted code. + } catch (UnsupportedEncodingException wow) { + throw new NotImplementedException(wow.getMessage()); + } + } + + private static @Nullable String rfc6570ItemValue(@Nullable Object item, boolean percentEncode) throws NotImplementedException { + /* + Get representation if str/float/int/None/items in list/ values in dict + None is returned if an item is undefined, use cases are value= + - None + - [] + - {} + - [None, None None] + - {'a': None, 'b': None} + */ + if (item instanceof String stringItem) { + if (percentEncode) { + return percentEncode(stringItem); + } + return stringItem; + } else if (item instanceof Number numberItem) { + return numberItem.toString(); + } else if (item == null) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return null; + } else if (item instanceof List && ((List) item).isEmpty()) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return null; + } else if (item instanceof Map && ((Map) item).isEmpty()) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return null; + } + throw new NotImplementedException("Unable to generate a rfc6570 item representation of "+item); + } + + private static String rfc6570StrNumberExpansion( + @Nullable Object inData, + boolean percentEncode, + PrefixSeparatorIterator prefixSeparatorIterator, + String varNamePiece, + boolean namedParameterExpansion + ) throws NotImplementedException { + var itemValue = rfc6570ItemValue(inData, percentEncode); + if (itemValue == null || (itemValue.isEmpty() && prefixSeparatorIterator.separator.equals(";"))) { + return prefixSeparatorIterator.next() + varNamePiece; + } + var valuePairEquals = namedParameterExpansion ? "=" : ""; + return prefixSeparatorIterator.next() + varNamePiece + valuePairEquals + itemValue; + } + + private static String rfc6570ListExpansion( + List inData, + boolean explode, + boolean percentEncode, + PrefixSeparatorIterator prefixSeparatorIterator, + String varNamePiece, + boolean namedParameterExpansion + ) throws NotImplementedException { + List itemValues = new ArrayList<>(); + for (Object v: inData) { + @Nullable String value = rfc6570ItemValue(v, percentEncode); + if (value == null) { + continue; + } + itemValues.add(value); + } + if (itemValues.isEmpty()) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return ""; + } + var valuePairEquals = namedParameterExpansion ? "=" : ""; + if (!explode) { + return ( + prefixSeparatorIterator.next() + + varNamePiece + + valuePairEquals + + String.join(prefixSeparatorIterator.itemSeparator, itemValues) + ); + } + // exploded + return prefixSeparatorIterator.next() + itemValues.stream().map(v -> varNamePiece + valuePairEquals + v).collect(Collectors.joining(prefixSeparatorIterator.next())); + } + + private static String rfc6570MapExpansion( + Map inData, + boolean explode, + boolean percentEncode, + PrefixSeparatorIterator prefixSeparatorIterator, + String varNamePiece, + boolean namedParameterExpansion + ) throws NotImplementedException { + Map inDataMap = new LinkedHashMap<>(); + for (Map.Entry entry: inData.entrySet()) { + @Nullable String value = rfc6570ItemValue(entry.getValue(), percentEncode); + if (value == null) { + continue; + } + @Nullable Object key = entry.getKey(); + if (!(key instanceof String strKey)) { + continue; + } + inDataMap.put(strKey, value); + } + if (inDataMap.isEmpty()) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return ""; + } + var valuePairEquals = namedParameterExpansion ? "=" : ""; + if (!explode) { + return prefixSeparatorIterator.next() + + varNamePiece + + valuePairEquals + + inDataMap.entrySet().stream().map(e -> e.getKey()+prefixSeparatorIterator.itemSeparator+e.getValue()).collect(Collectors.joining(prefixSeparatorIterator.itemSeparator)); + } + // exploded + return prefixSeparatorIterator.next() + inDataMap.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(prefixSeparatorIterator.next())); + } + + protected static String rfc6570Expansion( + String variableName, + @Nullable Object inData, + boolean explode, + boolean percentEncode, + PrefixSeparatorIterator prefixSeparatorIterator + ) throws NotImplementedException { + /* + Separator is for separate variables like dict with explode true, + not for array item separation + */ + var namedParameterExpansion = namedParameterSeparators.contains(prefixSeparatorIterator.separator); + var varNamePiece = namedParameterExpansion ? variableName : ""; + if (inData instanceof Number || inData instanceof String) { + return rfc6570StrNumberExpansion( + inData, + percentEncode, + prefixSeparatorIterator, + varNamePiece, + namedParameterExpansion + ); + } else if (inData == null) { + // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 + return ""; + } else if (inData instanceof List listData) { + return rfc6570ListExpansion( + listData, + explode, + percentEncode, + prefixSeparatorIterator, + varNamePiece, + namedParameterExpansion + ); + } else if (inData instanceof Map mapData) { + return rfc6570MapExpansion( + mapData, + explode, + percentEncode, + prefixSeparatorIterator, + varNamePiece, + namedParameterExpansion + ); + } + // bool, bytes, etc + throw new NotImplementedException("Unable to generate a rfc6570 representation of "+inData); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java new file mode 100644 index 00000000000..06c3ef68ea0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java @@ -0,0 +1,97 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.contenttype.ContentTypeDeserializer; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.parameter.ParameterStyle; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaFactory; +import unit_test_api.schemas.validation.UnsetAnyTypeJsonSchema; + +import java.net.http.HttpHeaders; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.BiPredicate; + +public class SchemaHeader extends HeaderBase implements Header { + public final JsonSchema schema; + + public SchemaHeader(boolean required, @Nullable Boolean allowReserved, @Nullable Boolean explode, JsonSchema schema) { + super(required, ParameterStyle.SIMPLE, explode, allowReserved); + this.schema = schema; + } + + private static HttpHeaders toHeaders(String name, String value) { + Map> map = Map.of(name, List.of(value)); + BiPredicate headerFilter = (key, val) -> true; + return HttpHeaders.of(map, headerFilter); + } + + @Override + public HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { + var castInData = validate ? schema.validate(inData, configuration) : inData; + boolean usedExplode = explode != null && explode; + var value = StyleSerializer.serializeSimple(castInData, name, usedExplode, false); + return toHeaders(name, value); + } + + private static final Set> VOID_TYPES = Set.of(Void.class); + private static final Set> BOOLEAN_TYPES = Set.of(Boolean.class); + private static final Set> NUMERIC_TYPES = Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + ); + private static final Set> STRING_TYPES = Set.of(String.class); + private static final Set> LIST_TYPES = Set.of(List.class); + private static final Set> MAP_TYPES = Set.of(Map.class); + + private List<@Nullable Object> getList(JsonSchema schema, List inData) throws NotImplementedException { + Class> itemsSchemaCls = schema.items == null ? UnsetAnyTypeJsonSchema.UnsetAnyTypeJsonSchema1.class : schema.items; + JsonSchema itemSchema = JsonSchemaFactory.getInstance(itemsSchemaCls); + List<@Nullable Object> castList = new ArrayList<>(); + for (String inDataItem: inData) { + @Nullable Object castInDataItem = getCastInData(itemSchema, List.of(inDataItem)); + castList.add(castInDataItem); + } + return castList; + } + + private @Nullable Object getCastInData(JsonSchema schema, List inData) throws NotImplementedException { + if (schema.type == null) { + if (inData.size() == 1) { + return inData.get(0); + } + return getList(schema, inData); + } else if (schema.type.size() == 1) { + if (schema.type.equals(BOOLEAN_TYPES)) { + throw new NotImplementedException("Boolean serialization is not defined in Rfc6570, there is no agreed upon way to sent a boolean, send a string enum instead"); + } else if (schema.type.equals(VOID_TYPES) && inData.size() == 1 && inData.get(0).isEmpty()) { + return null; + } else if (schema.type.equals(STRING_TYPES) && inData.size() == 1) { + return inData.get(0); + } else if (schema.type.equals(LIST_TYPES)) { + return getList(schema, inData); + } else if (schema.type.equals(MAP_TYPES)) { + throw new NotImplementedException("Header map deserialization has not yet been implemented"); + } + } else if (schema.type.size() == 4 && schema.type.equals(NUMERIC_TYPES) && inData.size() == 1) { + return ContentTypeDeserializer.fromJson(inData.get(0)); + } + throw new NotImplementedException("Header deserialization for schemas with multiple types has not yet been implemented"); + } + + @Override + public @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { + @Nullable Object castInData = getCastInData(schema, inData); + if (validate) { + return schema.validate(castInData, configuration); + } + return castInData; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java new file mode 100644 index 00000000000..7315f184adb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java @@ -0,0 +1,99 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +public class StyleSerializer extends Rfc6570Serializer { + public static String serializeSimple( + @Nullable Object inData, + String name, + boolean explode, + boolean percentEncode + ) throws NotImplementedException { + var prefixSeparatorIterator = new PrefixSeparatorIterator("", ","); + return rfc6570Expansion( + name, + inData, + explode, + percentEncode, + prefixSeparatorIterator + ); + } + + public static String serializeForm( + @Nullable Object inData, + String name, + boolean explode, + boolean percentEncode + ) throws NotImplementedException { + // todo check that the prefix and suffix matches this one + PrefixSeparatorIterator iterator = new PrefixSeparatorIterator("", "&"); + return rfc6570Expansion( + name, + inData, + explode, + percentEncode, + iterator + ); + } + + public static String serializeMatrix( + @Nullable Object inData, + String name, + boolean explode + ) throws NotImplementedException { + PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator(";", ";"); + return rfc6570Expansion( + name, + inData, + explode, + true, + usedIterator + ); + } + + public static String serializeLabel( + @Nullable Object inData, + String name, + boolean explode + ) throws NotImplementedException { + PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator(".", "."); + return rfc6570Expansion( + name, + inData, + explode, + true, + usedIterator + ); + } + + public static String serializeSpaceDelimited( + @Nullable Object inData, + String name, + boolean explode + ) throws NotImplementedException { + PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator("", "%20"); + return rfc6570Expansion( + name, + inData, + explode, + true, + usedIterator + ); + } + + public static String serializePipeDelimited( + @Nullable Object inData, + String name, + boolean explode + ) throws NotImplementedException { + PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator("", "|"); + return rfc6570Expansion( + name, + inData, + explode, + true, + usedIterator + ); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java new file mode 100644 index 00000000000..1612c9e715b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java @@ -0,0 +1,30 @@ +package unit_test_api.mediatype; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.parameter.ParameterStyle; +import unit_test_api.header.Header; + +import java.util.Map; + +public class Encoding { + public final String contentType; + public final @Nullable Map headers; + public final @Nullable ParameterStyle style; + public final boolean explode; + public final boolean allowReserved; + + public Encoding(String contentType) { + this.contentType = contentType; + headers = null; + style = null; + explode = false; + allowReserved = false; + } + public Encoding(String contentType, @Nullable Map headers) { + this.contentType = contentType; + this.headers = headers; + style = null; + explode = false; + allowReserved = false; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java new file mode 100644 index 00000000000..67308d3f739 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java @@ -0,0 +1,16 @@ +package unit_test_api.mediatype; + +import unit_test_api.schemas.validation.JsonSchema; + +public interface MediaType, U> { + /* + * Used to store request and response body schema information + * encoding: + * A map between a property name and its encoding information. + * The key, being the property name, MUST exist in the schema as a property. + * The encoding object SHALL only apply to requestBody objects when the media type is + * multipart or application/x-www-form-urlencoded. + */ + T schema(); + U encoding(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java new file mode 100644 index 00000000000..047107169cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java @@ -0,0 +1,30 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.contenttype.ContentTypeDetector; +import unit_test_api.contenttype.ContentTypeSerializer; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.mediatype.MediaType; + +import java.util.Map; +import java.util.AbstractMap; + +public class ContentParameter extends ParameterBase implements Parameter { + public final AbstractMap.SimpleEntry> content; + + public ContentParameter(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved, AbstractMap.SimpleEntry> content) { + super(name, inType, required, style, explode, allowReserved); + this.content = content; + } + + @Override + public AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException { + String contentType = content.getKey(); + if (ContentTypeDetector.contentTypeIsJson(contentType)) { + var value = ContentTypeSerializer.toJson(inData); + return new AbstractMap.SimpleEntry<>(name, value); + } else { + throw new NotImplementedException("Serialization of "+contentType+" has not yet been implemented"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java new file mode 100644 index 00000000000..5a3b6d7ea1f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java @@ -0,0 +1,36 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.AbstractMap; +import java.util.Map; +import java.util.TreeMap; + +public abstract class CookieSerializer { + private final Map parameters; + + protected CookieSerializer(Map parameters) { + this.parameters = parameters; + } + + public String serialize(Map inData) throws NotImplementedException { + String result = ""; + Map sortedData = new TreeMap<>(inData); + for (Map.Entry entry: sortedData.entrySet()) { + String mapKey = entry.getKey(); + @Nullable Parameter parameter = parameters.get(mapKey); + if (parameter == null) { + throw new RuntimeException("Invalid state, a parameter must exist for every key"); + } + @Nullable Object value = entry.getValue(); + AbstractMap.SimpleEntry serialized = parameter.serialize(value); + if (result.isEmpty()) { + result = serialized.getValue(); + } else { + result = result + "; " + serialized.getValue(); + } + } + return result; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java new file mode 100644 index 00000000000..d0175b8dad4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java @@ -0,0 +1,32 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.AbstractMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.List; + +public abstract class HeadersSerializer { + private final Map parameters; + + protected HeadersSerializer(Map parameters) { + this.parameters = parameters; + } + + public Map> serialize(Map inData) throws NotImplementedException { + Map> results = new LinkedHashMap<>(); + for (Map.Entry entry: inData.entrySet()) { + String mapKey = entry.getKey(); + @Nullable Parameter parameter = parameters.get(mapKey); + if (parameter == null) { + throw new RuntimeException("Invalid state, a parameter must exist for every key"); + } + @Nullable Object value = entry.getValue(); + AbstractMap.SimpleEntry serialized = parameter.serialize(value); + results.put(serialized.getKey(), List.of(serialized.getValue())); + } + return results; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java new file mode 100644 index 00000000000..da877e30054 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java @@ -0,0 +1,10 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.AbstractMap; + +public interface Parameter { + AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java new file mode 100644 index 00000000000..226ac1b5929 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java @@ -0,0 +1,15 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.header.HeaderBase; + +public class ParameterBase extends HeaderBase { + public final String name; + public final ParameterInType inType; + + public ParameterBase(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved) { + super(required, style, explode, allowReserved); + this.name = name; + this.inType = inType; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java new file mode 100644 index 00000000000..916d44f09db --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java @@ -0,0 +1,8 @@ +package unit_test_api.parameter; + +public enum ParameterInType { + QUERY, + HEADER, + PATH, + COOKIE +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java new file mode 100644 index 00000000000..a3ec83969c6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java @@ -0,0 +1,11 @@ +package unit_test_api.parameter; + +public enum ParameterStyle { + MATRIX, + LABEL, + FORM, + SIMPLE, + SPACE_DELIMITED, + PIPE_DELIMITED, + DEEP_OBJECT +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java new file mode 100644 index 00000000000..b5da5d744f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java @@ -0,0 +1,30 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.AbstractMap; +import java.util.Map; + +public abstract class PathSerializer { + private final Map parameters; + + protected PathSerializer(Map parameters) { + this.parameters = parameters; + } + + public String serialize(Map inData, String pathWithPlaceholders) throws NotImplementedException { + String result = pathWithPlaceholders; + for (Map.Entry entry: inData.entrySet()) { + String mapKey = entry.getKey(); + @Nullable Parameter parameter = parameters.get(mapKey); + if (parameter == null) { + throw new RuntimeException("Invalid state, a parameter must exist for every key"); + } + @Nullable Object value = entry.getValue(); + AbstractMap.SimpleEntry serialized = parameter.serialize(value); + result = result.replace("{" + mapKey + "}", serialized.getValue()); + } + return result; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java new file mode 100644 index 00000000000..73fca259acf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java @@ -0,0 +1,48 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; + +public abstract class QuerySerializer { + private final Map parameters; + + protected QuerySerializer(Map parameters) { + this.parameters = parameters; + } + + public Map getQueryMap(Map inData) throws NotImplementedException { + Map results = new HashMap<>(); + for (Map.Entry entry: inData.entrySet()) { + String mapKey = entry.getKey(); + @Nullable Parameter parameter = parameters.get(mapKey); + if (parameter == null) { + throw new RuntimeException("Invalid state, a parameter must exist for every key"); + } + @Nullable Object value = entry.getValue(); + AbstractMap.SimpleEntry serialized = parameter.serialize(value); + results.put(serialized.getKey(), serialized.getValue()); + } + return new TreeMap<>(results); + } + + public String serialize(Map queryMap) { + if (queryMap.isEmpty()) { + return ""; + } + String result = "?"; + for (String serializedValue: queryMap.values()) { + if (result.length() == 1) { + result = result + serializedValue; + } else { + result = result + "&" + serializedValue; + } + } + // TODO what if the style is not FORM? + return result; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java new file mode 100644 index 00000000000..489c9e1c82f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java @@ -0,0 +1,60 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.header.StyleSerializer; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.validation.JsonSchema; + +import java.util.AbstractMap; + +public class SchemaParameter extends ParameterBase implements Parameter { + public final JsonSchema schema; + + public SchemaParameter(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved, JsonSchema schema) { + super(name, inType, required, style, explode, allowReserved); + this.schema = schema; + } + + private ParameterStyle getStyle() { + if (style != null) { + return style; + } + if (inType == ParameterInType.QUERY || inType == ParameterInType.COOKIE) { + return ParameterStyle.FORM; + } + // ParameterInType.HEADER || ParameterInType.PATH + return ParameterStyle.SIMPLE; + } + + @Override + public AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException { + ParameterStyle usedStyle = getStyle(); + boolean percentEncode = inType == ParameterInType.QUERY || inType == ParameterInType.PATH; + String value; + boolean usedExplode = explode == null ? usedStyle == ParameterStyle.FORM : explode; + if (usedStyle == ParameterStyle.SIMPLE) { + // header OR path + value = StyleSerializer.serializeSimple(inData, name, usedExplode, percentEncode); + } else if (usedStyle == ParameterStyle.FORM) { + // query OR cookie + value = StyleSerializer.serializeForm(inData, name, usedExplode, percentEncode); + } else if (usedStyle == ParameterStyle.LABEL) { + // path + value = StyleSerializer.serializeLabel(inData, name, usedExplode); + } else if (usedStyle == ParameterStyle.MATRIX) { + // path + value = StyleSerializer.serializeMatrix(inData, name, usedExplode); + } else if (usedStyle == ParameterStyle.SPACE_DELIMITED) { + // query + value = StyleSerializer.serializeSpaceDelimited(inData, name, usedExplode); + } else if (usedStyle == ParameterStyle.PIPE_DELIMITED) { + // query + value = StyleSerializer.serializePipeDelimited(inData, name, usedExplode); + } else { + // usedStyle == ParameterStyle.DEEP_OBJECT + // query + throw new NotImplementedException("Style deep object serialization has not yet been implemented."); + } + return new AbstractMap.SimpleEntry<>(name, value); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java new file mode 100644 index 00000000000..99f6e511afd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java @@ -0,0 +1,6 @@ +package unit_test_api.requestbody; + +public interface GenericRequestBody { + String contentType(); + SealedSchemaOutputClass body(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java new file mode 100644 index 00000000000..f08b0398b40 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java @@ -0,0 +1,47 @@ +package unit_test_api.requestbody; + +import java.net.http.HttpRequest; +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.contenttype.ContentTypeDetector; +import unit_test_api.contenttype.ContentTypeSerializer; +import unit_test_api.exceptions.NotImplementedException; + +import java.util.Map; + +public abstract class RequestBodySerializer { + /* + * Describes a single request body + * content: contentType to MediaType schema info + */ + public final Map content; + public final boolean required; + + public RequestBodySerializer(Map content, boolean required) { + this.content = content; + this.required = required; + } + + private SerializedRequestBody serializeJson(String contentType, @Nullable Object body) { + String jsonText = ContentTypeSerializer.toJson(body); + return new SerializedRequestBody(contentType, HttpRequest.BodyPublishers.ofString(jsonText)); + } + + private SerializedRequestBody serializeTextPlain(String contentType, @Nullable Object body) { + if (body instanceof String stringBody) { + return new SerializedRequestBody(contentType, HttpRequest.BodyPublishers.ofString(stringBody)); + } + throw new RuntimeException("Invalid non-string data type of "+JsonSchema.getClass(body)+" for text/plain body serialization"); + } + + protected SerializedRequestBody serialize(String contentType, @Nullable Object body) throws NotImplementedException { + if (ContentTypeDetector.contentTypeIsJson(contentType)) { + return serializeJson(contentType, body); + } else if (ContentTypeDetector.contentTypeIsTextPlain(contentType)) { + return serializeTextPlain(contentType, body); + } + throw new NotImplementedException("Serialization has not yet been implemented for contentType="+contentType+". If you need it please file a PR"); + } + + public abstract SerializedRequestBody serialize(T requestBody) throws NotImplementedException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java new file mode 100644 index 00000000000..7267f386fcb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java @@ -0,0 +1,13 @@ +package unit_test_api.requestbody; + +import java.net.http.HttpRequest; + +public class SerializedRequestBody { + public final String contentType; + public final HttpRequest.BodyPublisher bodyPublisher; + + protected SerializedRequestBody(String contentType, HttpRequest.BodyPublisher bodyPublisher) { + this.contentType = contentType; + this.bodyPublisher = bodyPublisher; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java new file mode 100644 index 00000000000..17c3f558a7f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java @@ -0,0 +1,9 @@ +package unit_test_api.response; + +import java.net.http.HttpResponse; + +public interface ApiResponse { + HttpResponse response(); + SealedBodyOutputClass body(); + HeaderOutputClass headers(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java new file mode 100644 index 00000000000..6c97ee424a9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java @@ -0,0 +1,6 @@ +package unit_test_api.response; + +import java.net.http.HttpResponse; + +public record DeserializedHttpResponse(SealedBodyOutputClass body, HeaderOutputClass headers) { +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java new file mode 100644 index 00000000000..5845a5bb484 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java @@ -0,0 +1,37 @@ +package unit_test_api.response; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.header.Header; +import unit_test_api.schemas.validation.MapSchemaValidator; + +import java.net.http.HttpHeaders; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public abstract class HeadersDeserializer { + private final Map headers; + final private MapSchemaValidator headersSchema; + public HeadersDeserializer(Map headers, MapSchemaValidator headersSchema) { + this.headers = headers; + this.headersSchema = headersSchema; + } + + public OutType deserialize(HttpHeaders responseHeaders, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { + Map headersToValidate = new HashMap<>(); + for (Map.Entry> entry: responseHeaders.map().entrySet()) { + String headerName = entry.getKey(); + Header headerDeserializer = headers.get(headerName); + if (headerDeserializer == null) { + // todo put this data in headersToValidate, if only one item in list load it in, otherwise join them with commas + continue; + } + @Nullable Object headerValue = headerDeserializer.deserialize(entry.getValue(), false, configuration); + headersToValidate.put(headerName, headerValue); + } + return headersSchema.validate(headersToValidate, configuration); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java new file mode 100644 index 00000000000..18dd7237d63 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java @@ -0,0 +1,74 @@ +package unit_test_api.response; + +import java.net.http.HttpHeaders; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.Map; +import java.util.Optional; + +import org.checkerframework.checker.nullness.qual.Nullable; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.contenttype.ContentTypeDetector; +import unit_test_api.contenttype.ContentTypeDeserializer; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.exceptions.ApiException; +import unit_test_api.header.Header; + +public abstract class ResponseDeserializer { + public final Map content; + public final @Nullable Map headers; + + public ResponseDeserializer(Map content) { + this.content = content; + this.headers = null; + } + + protected abstract SealedBodyClass getBody(String contentType, SealedMediaTypeClass mediaType, byte[] body, SchemaConfiguration configuration) throws ValidationException, NotImplementedException; + protected abstract HeaderClass getHeaders(HttpHeaders headers, SchemaConfiguration configuration) throws ValidationException, NotImplementedException; + + protected @Nullable Object deserializeJson(byte[] body) { + String bodyStr = new String(body, StandardCharsets.UTF_8); + return ContentTypeDeserializer.fromJson(bodyStr); + } + + protected String deserializeTextPlain(byte[] body) { + return new String(body, StandardCharsets.UTF_8); + } + + protected T deserializeBody(String contentType, byte[] body, JsonSchema schema, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { + if (ContentTypeDetector.contentTypeIsJson(contentType)) { + @Nullable Object bodyData = deserializeJson(body); + return schema.validateAndBox(bodyData, configuration); + } else if (ContentTypeDetector.contentTypeIsTextPlain(contentType)) { + String bodyData = deserializeTextPlain(body); + return schema.validateAndBox(bodyData, configuration); + } + throw new NotImplementedException("Deserialization for contentType="+contentType+" has not yet been implemented."); + } + + public DeserializedHttpResponse deserialize(HttpResponse response, SchemaConfiguration configuration) throws ValidationException, NotImplementedException, ApiException { + Optional contentTypeInfo = response.headers().firstValue("Content-Type"); + if (contentTypeInfo.isEmpty()) { + throw new ApiException( + "Invalid response returned, Content-Type header is missing and it must be included", + response + ); + } + String contentType = contentTypeInfo.get(); + @Nullable SealedMediaTypeClass mediaType = content.get(contentType); + if (mediaType == null) { + throw new ApiException( + "Invalid contentType returned. contentType="+contentType+" was returned "+ + "when only "+content.keySet()+" are defined for statusCode="+response.statusCode(), + response + ); + } + byte[] bodyBytes = response.body(); + SealedBodyClass body = getBody(contentType, mediaType, bodyBytes, configuration); + HeaderClass headers = getHeaders(response.headers(), configuration); + return new DeserializedHttpResponse<>(body, headers); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java new file mode 100644 index 00000000000..8005bac63f1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java @@ -0,0 +1,11 @@ +package unit_test_api.response; + +import unit_test_api.configurations.SchemaConfiguration; +import java.net.http.HttpResponse; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.exceptions.ApiException; + +public interface ResponsesDeserializer { + SealedResponseClass deserialize(HttpResponse response, SchemaConfiguration configuration) throws ValidationException, NotImplementedException, ApiException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java new file mode 100644 index 00000000000..f38b0005fd1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java @@ -0,0 +1,67 @@ +package unit_test_api.restclient; + +import org.checkerframework.checker.nullness.qual.Nullable; +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.List; +import java.util.Map; + +public class RestClient { + public static HttpRequest getRequest( + String serviceUrl, + String method, + HttpRequest.BodyPublisher bodyPublisher, + Map> headers, + @Nullable Duration timeout + ) { + HttpRequest.Builder request = HttpRequest.newBuilder(URI.create(serviceUrl)); + switch (method) { + case "get": + request.GET(); + break; + case "put": + request.method("PUT", bodyPublisher); + break; + case "patch": + request.method("PATCH", bodyPublisher); + break; + case "post": + request.method("POST", bodyPublisher); + break; + case "delete": + request.DELETE(); + break; + case "trace": + request.method("TRACE", bodyPublisher); + break; + case "options": + request.method("OPTIONS", bodyPublisher); + break; + case "head": + request.method("HEAD", bodyPublisher); + break; + case "connect": + request.method("CONNECT", bodyPublisher); + break; + default: + throw new RuntimeException("Invalid http method"); + } + for (Map.Entry> entry: headers.entrySet()) { + String headerName = entry.getKey(); + String headerValue = String.join(", ", entry.getValue()); + request.header(headerName, headerValue); + } + if (timeout != null) { + request.timeout(timeout); + } + return request.build(); + } + + public static HttpResponse getResponse(HttpRequest request, HttpClient client) throws IOException, InterruptedException { + return client.send(request, HttpResponse.BodyHandlers.ofByteArray()); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java new file mode 100644 index 00000000000..ad972545ccb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java @@ -0,0 +1,315 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.HashSet; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +public class AnyTypeJsonSchema { + public sealed interface AnyTypeJsonSchema1Boxed permits AnyTypeJsonSchema1BoxedVoid, AnyTypeJsonSchema1BoxedBoolean, AnyTypeJsonSchema1BoxedNumber, AnyTypeJsonSchema1BoxedString, AnyTypeJsonSchema1BoxedList, AnyTypeJsonSchema1BoxedMap { + @Nullable Object getData(); + } + public record AnyTypeJsonSchema1BoxedVoid(Void data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record AnyTypeJsonSchema1BoxedBoolean(boolean data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record AnyTypeJsonSchema1BoxedNumber(Number data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record AnyTypeJsonSchema1BoxedString(String data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record AnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record AnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class AnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyTypeJsonSchema1BoxedList>, MapSchemaValidator, AnyTypeJsonSchema1BoxedMap> { + private static @Nullable AnyTypeJsonSchema1 instance = null; + + protected AnyTypeJsonSchema1() { + super(new JsonSchemaInfo()); + } + + public static AnyTypeJsonSchema1 getInstance() { + if (instance == null) { + instance = new AnyTypeJsonSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(castItem); + i += 1; + } + return new FrozenList<>(items); + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public AnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedList(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new AnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); + } + + @Override + public AnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java new file mode 100644 index 00000000000..ecd9018eddd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java @@ -0,0 +1,88 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class BooleanJsonSchema { + public sealed interface BooleanJsonSchema1Boxed permits BooleanJsonSchema1BoxedBoolean { + @Nullable Object getData(); + } + public record BooleanJsonSchema1BoxedBoolean(boolean data) implements BooleanJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public static class BooleanJsonSchema1 extends JsonSchema implements BooleanSchemaValidator { + private static @Nullable BooleanJsonSchema1 instance = null; + + protected BooleanJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Boolean.class)) + ); + } + + public static BooleanJsonSchema1 getInstance() { + if (instance == null) { + instance = new BooleanJsonSchema1(); + } + return instance; + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public BooleanJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new BooleanJsonSchema1BoxedBoolean(validate(arg, configuration)); + } + + @Override + public BooleanJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java new file mode 100644 index 00000000000..4397b18149d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java @@ -0,0 +1,94 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.LocalDate; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class DateJsonSchema { + public sealed interface DateJsonSchema1Boxed permits DateJsonSchema1BoxedString { + @Nullable Object getData(); + } + public record DateJsonSchema1BoxedString(String data) implements DateJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class DateJsonSchema1 extends JsonSchema implements StringSchemaValidator { + private static @Nullable DateJsonSchema1 instance = null; + + protected DateJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date") + ); + } + + public static DateJsonSchema1 getInstance() { + if (instance == null) { + instance = new DateJsonSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof LocalDate) { + return validate((LocalDate) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public DateJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DateJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public DateJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java new file mode 100644 index 00000000000..c05063ca8b5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java @@ -0,0 +1,94 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.ZonedDateTime; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class DateTimeJsonSchema { + public sealed interface DateTimeJsonSchema1Boxed permits DateTimeJsonSchema1BoxedString { + @Nullable Object getData(); + } + public record DateTimeJsonSchema1BoxedString(String data) implements DateTimeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class DateTimeJsonSchema1 extends JsonSchema implements StringSchemaValidator { + private static @Nullable DateTimeJsonSchema1 instance = null; + + protected DateTimeJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("date-time") + ); + } + + public static DateTimeJsonSchema1 getInstance() { + if (instance == null) { + instance = new DateTimeJsonSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof ZonedDateTime) { + return validate((ZonedDateTime) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public DateTimeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DateTimeJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public DateTimeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java new file mode 100644 index 00000000000..47ac9fe2f91 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java @@ -0,0 +1,87 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class DecimalJsonSchema { + public sealed interface DecimalJsonSchema1Boxed permits DecimalJsonSchema1BoxedString { + @Nullable Object getData(); + } + public record DecimalJsonSchema1BoxedString(String data) implements DecimalJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class DecimalJsonSchema1 extends JsonSchema implements StringSchemaValidator { + private static @Nullable DecimalJsonSchema1 instance = null; + + protected DecimalJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("number") + ); + } + + public static DecimalJsonSchema1 getInstance() { + if (instance == null) { + instance = new DecimalJsonSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public DecimalJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DecimalJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public DecimalJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java new file mode 100644 index 00000000000..e522e04b3d2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java @@ -0,0 +1,91 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class DoubleJsonSchema { + public sealed interface DoubleJsonSchema1Boxed permits DoubleJsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record DoubleJsonSchema1BoxedNumber(Number data) implements DoubleJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class DoubleJsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable DoubleJsonSchema1 instance = null; + + protected DoubleJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Double.class)) + .format("double") + ); + } + + public static DoubleJsonSchema1 getInstance() { + if (instance == null) { + instance = new DoubleJsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public DoubleJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public DoubleJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java new file mode 100644 index 00000000000..60136d1b935 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java @@ -0,0 +1,91 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class FloatJsonSchema { + public sealed interface FloatJsonSchema1Boxed permits FloatJsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record FloatJsonSchema1BoxedNumber(Number data) implements FloatJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class FloatJsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable FloatJsonSchema1 instance = null; + + protected FloatJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Float.class)) + .format("float") + ); + } + + public static FloatJsonSchema1 getInstance() { + if (instance == null) { + instance = new FloatJsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public FloatJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public FloatJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java new file mode 100644 index 00000000000..2d5d00ea4ff --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java @@ -0,0 +1,9 @@ +package unit_test_api.schemas; + +/** + * Builders must implement this class + * @param the type that the builder returns + */ +public interface GenericBuilder { + T build(); +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java new file mode 100644 index 00000000000..f6f626576e4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java @@ -0,0 +1,98 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class Int32JsonSchema { + public sealed interface Int32JsonSchema1Boxed permits Int32JsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record Int32JsonSchema1BoxedNumber(Number data) implements Int32JsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class Int32JsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Int32JsonSchema1 instance = null; + + protected Int32JsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Float.class + )) + .format("int32") + ); + } + + public static Int32JsonSchema1 getInstance() { + if (instance == null) { + instance = new Int32JsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public Int32JsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Int32JsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public Int32JsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java new file mode 100644 index 00000000000..8b60634feb7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java @@ -0,0 +1,108 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class Int64JsonSchema { + public sealed interface Int64JsonSchema1Boxed permits Int64JsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record Int64JsonSchema1BoxedNumber(Number data) implements Int64JsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class Int64JsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable Int64JsonSchema1 instance = null; + + protected Int64JsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int64") + ); + } + + public static Int64JsonSchema1 getInstance() { + if (instance == null) { + instance = new Int64JsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public Int64JsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new Int64JsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public Int64JsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java new file mode 100644 index 00000000000..a6bb8e6d459 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java @@ -0,0 +1,108 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class IntJsonSchema { + public sealed interface IntJsonSchema1Boxed permits IntJsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record IntJsonSchema1BoxedNumber(Number data) implements IntJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class IntJsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable IntJsonSchema1 instance = null; + + protected IntJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + .format("int") + ); + } + + public static IntJsonSchema1 getInstance() { + if (instance == null) { + instance = new IntJsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public IntJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IntJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public IntJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java new file mode 100644 index 00000000000..a007ccf312b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java @@ -0,0 +1,108 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class ListJsonSchema { + public sealed interface ListJsonSchema1Boxed permits ListJsonSchema1BoxedList { + @Nullable Object getData(); + } + public record ListJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements ListJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class ListJsonSchema1 extends JsonSchema implements ListSchemaValidator, ListJsonSchema1BoxedList> { + private static @Nullable ListJsonSchema1 instance = null; + + protected ListJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + ); + } + + public static ListJsonSchema1 getInstance() { + if (instance == null) { + instance = new ListJsonSchema1(); + } + return instance; + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(castItem); + i += 1; + } + return new FrozenList<>(items); + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public ListJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ListJsonSchema1BoxedList(validate(arg, configuration)); + } + + @Override + public ListJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java new file mode 100644 index 00000000000..4e612fbdc1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java @@ -0,0 +1,112 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +public class MapJsonSchema { + public sealed interface MapJsonSchema1Boxed permits MapJsonSchema1BoxedMap { + @Nullable Object getData(); + } + public record MapJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements MapJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class MapJsonSchema1 extends JsonSchema implements MapSchemaValidator, MapJsonSchema1BoxedMap> { + private static @Nullable MapJsonSchema1 instance = null; + + protected MapJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + ); + } + + public static MapJsonSchema1 getInstance() { + if (instance == null) { + instance = new MapJsonSchema1(); + } + return instance; + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof FrozenMap) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public MapJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MapJsonSchema1BoxedMap(validate(arg, configuration)); + } + + @Override + public MapJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java new file mode 100644 index 00000000000..8f63d19647c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java @@ -0,0 +1,317 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.BooleanSchemaValidator; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.HashSet; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +public class NotAnyTypeJsonSchema { + public sealed interface NotAnyTypeJsonSchema1Boxed permits NotAnyTypeJsonSchema1BoxedVoid, NotAnyTypeJsonSchema1BoxedBoolean, NotAnyTypeJsonSchema1BoxedNumber, NotAnyTypeJsonSchema1BoxedString, NotAnyTypeJsonSchema1BoxedList, NotAnyTypeJsonSchema1BoxedMap { + @Nullable Object getData(); + } + public record NotAnyTypeJsonSchema1BoxedVoid(Void data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record NotAnyTypeJsonSchema1BoxedBoolean(boolean data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record NotAnyTypeJsonSchema1BoxedNumber(Number data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record NotAnyTypeJsonSchema1BoxedString(String data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record NotAnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record NotAnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements NotAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class NotAnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotAnyTypeJsonSchema1BoxedList>, MapSchemaValidator, NotAnyTypeJsonSchema1BoxedMap> { + private static @Nullable NotAnyTypeJsonSchema1 instance = null; + + protected NotAnyTypeJsonSchema1() { + super(new JsonSchemaInfo() + .not(AnyTypeJsonSchema.AnyTypeJsonSchema1.class) + ); + } + + public static NotAnyTypeJsonSchema1 getInstance() { + if (instance == null) { + instance = new NotAnyTypeJsonSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(castItem); + i += 1; + } + return new FrozenList<>(items); + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public NotAnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedList(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NotAnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); + } + + @Override + public NotAnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java new file mode 100644 index 00000000000..77356148067 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java @@ -0,0 +1,87 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NullSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class NullJsonSchema { + public sealed interface NullJsonSchema1Boxed permits NullJsonSchema1BoxedVoid { + @Nullable Object getData(); + } + public record NullJsonSchema1BoxedVoid(Void data) implements NullJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class NullJsonSchema1 extends JsonSchema implements NullSchemaValidator { + private static @Nullable NullJsonSchema1 instance = null; + + protected NullJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(Void.class)) + ); + } + + public static NullJsonSchema1 getInstance() { + if (instance == null) { + instance = new NullJsonSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public NullJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NullJsonSchema1BoxedVoid(validate(arg, configuration)); + } + + @Override + public NullJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java new file mode 100644 index 00000000000..986b0728bd1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java @@ -0,0 +1,107 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.NumberSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class NumberJsonSchema { + public sealed interface NumberJsonSchema1Boxed permits NumberJsonSchema1BoxedNumber { + @Nullable Object getData(); + } + public record NumberJsonSchema1BoxedNumber(Number data) implements NumberJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class NumberJsonSchema1 extends JsonSchema implements NumberSchemaValidator { + private static @Nullable NumberJsonSchema1 instance = null; + + protected NumberJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of( + Integer.class, + Long.class, + Float.class, + Double.class + )) + ); + } + + public static NumberJsonSchema1 getInstance() { + if (instance == null) { + instance = new NumberJsonSchema1(); + } + return instance; + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number) { + return validate((Number) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public NumberJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public NumberJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java new file mode 100644 index 00000000000..7e23452373e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java @@ -0,0 +1,20 @@ +package unit_test_api.schemas; + +import java.util.HashSet; +import java.util.Set; + +/** + * A builder for maps that allows in null values + * Schema tests + doc code samples need it + */ +public class SetMaker { + @SafeVarargs + @SuppressWarnings("varargs") + public static Set makeSet(E... items) { + Set set = new HashSet<>(); + for (E item : items) { + set.add(item); + } + return set; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java new file mode 100644 index 00000000000..3ef3f124d79 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java @@ -0,0 +1,106 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +public class StringJsonSchema { + public sealed interface StringJsonSchema1Boxed permits StringJsonSchema1BoxedString { + @Nullable Object getData(); + } + public record StringJsonSchema1BoxedString(String data) implements StringJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public static class StringJsonSchema1 extends JsonSchema implements StringSchemaValidator { + private static @Nullable StringJsonSchema1 instance = null; + + protected StringJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); + } + + public static StringJsonSchema1 getInstance() { + if (instance == null) { + instance = new StringJsonSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof UUID) { + return validate((UUID) arg, configuration); + } else if (arg instanceof LocalDate) { + return validate((LocalDate) arg, configuration); + } else if (arg instanceof ZonedDateTime) { + return validate((ZonedDateTime) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public StringJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new StringJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public StringJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java new file mode 100644 index 00000000000..8fa96b07e3e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java @@ -0,0 +1,77 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; +import unit_test_api.schemas.validation.MapUtils; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +public abstract class UnsetAddPropsSetter { + public abstract Map getInstance(); + public abstract Set getKnownKeys(); + public abstract T getBuilderAfterAdditionalProperty(Map instance); + public T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, String value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, List value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } + + public T additionalProperty(String key, Map value) throws InvalidAdditionalPropertyException { + MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); + var instance = getInstance(); + instance.put(key, value); + return getBuilderAfterAdditionalProperty(instance); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java new file mode 100644 index 00000000000..13449990291 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java @@ -0,0 +1,94 @@ +package unit_test_api.schemas; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.StringSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +public class UuidJsonSchema { + public sealed interface UuidJsonSchema1Boxed permits UuidJsonSchema1BoxedString { + @Nullable Object getData(); + } + public record UuidJsonSchema1BoxedString(String data) implements UuidJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + + public static class UuidJsonSchema1 extends JsonSchema implements StringSchemaValidator { + private static @Nullable UuidJsonSchema1 instance = null; + + protected UuidJsonSchema1() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + .format("uuid") + ); + } + + public static UuidJsonSchema1 getInstance() { + if (instance == null) { + instance = new UuidJsonSchema1(); + } + return instance; + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof UUID) { + return validate((UUID) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public UuidJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public UuidJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java new file mode 100644 index 00000000000..f3501b009fa --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java @@ -0,0 +1,58 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class AdditionalPropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + var additionalProperties = data.schema().additionalProperties; + if (additionalProperties == null) { + return null; + } + Set presentAdditionalProperties = new LinkedHashSet<>(); + for (Object key: mapArg.keySet()) { + if (key instanceof String) { + presentAdditionalProperties.add((String) key); + } + } + var properties = data.schema().properties; + if (properties != null) { + presentAdditionalProperties.removeAll(properties.keySet()); + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + for(String addPropName: presentAdditionalProperties) { + @Nullable Object propValue = mapArg.get(addPropName); + List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + propPathToItem.add(addPropName); + if (data.patternPropertiesPathToSchemas() != null && data.patternPropertiesPathToSchemas().containsKey(propPathToItem)) { + continue; + } + ValidationMetadata propValidationMetadata = new ValidationMetadata( + propPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + JsonSchema addPropsSchema = JsonSchemaFactory.getInstance(additionalProperties); + if (propValidationMetadata.validationRanEarlier(addPropsSchema)) { + // todo add_deeper_validated_schemas + continue; + } + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(addPropsSchema, propValue, propValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java new file mode 100644 index 00000000000..a4d89238336 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java @@ -0,0 +1,23 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +public class AllOfValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var allOf = data.schema().allOf; + if (allOf == null) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + for(Class> allOfClass: allOf) { + JsonSchema allOfSchema = JsonSchemaFactory.getInstance(allOfClass); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(allOfSchema, data.arg(), data.validationMetadata()); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java new file mode 100644 index 00000000000..db8468d0285 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class AnyOfValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var anyOf = data.schema().anyOf; + if (anyOf == null) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + List>> validatedAnyOfClasses = new ArrayList<>(); + for(Class> anyOfClass: anyOf) { + if (anyOfClass == data.schema().getClass()) { + /* + optimistically assume that schema will pass validation + do not invoke _validate on it because that is recursive + */ + validatedAnyOfClasses.add(anyOfClass); + continue; + } + try { + JsonSchema anyOfSchema = JsonSchemaFactory.getInstance(anyOfClass); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(anyOfSchema, data.arg(), data.validationMetadata()); + validatedAnyOfClasses.add(anyOfClass); + pathToSchemas.update(otherPathToSchemas); + } catch (ValidationException e) { + // silence exceptions because the code needs to accumulate anyof_classes + } + } + if (validatedAnyOfClasses.isEmpty()) { + throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". None "+ + "of the anyOf schemas matched the input data." + ); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java new file mode 100644 index 00000000000..53861826344 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java @@ -0,0 +1,21 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; + +import java.math.BigDecimal; + +public abstract class BigDecimalValidator { + protected BigDecimal getBigDecimal(Number arg) throws ValidationException { + if (arg instanceof Integer) { + return new BigDecimal((Integer) arg); + } else if (arg instanceof Long) { + return new BigDecimal((Long) arg); + } else if (arg instanceof Float) { + return new BigDecimal(Float.toString((Float) arg)); + } else if (arg instanceof Double) { + return new BigDecimal(Double.toString((Double) arg)); + } else { + throw new ValidationException("Invalid type input for arg"); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java new file mode 100644 index 00000000000..a501b4c449a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface BooleanEnumValidator { + boolean validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java new file mode 100644 index 00000000000..0f72d39fd22 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java @@ -0,0 +1,9 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface BooleanSchemaValidator { + boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException; + T validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java new file mode 100644 index 00000000000..7114b5ac414 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface BooleanValueMethod { + boolean value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java new file mode 100644 index 00000000000..278146bf082 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java @@ -0,0 +1,33 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.math.BigDecimal; +import java.util.Objects; + +public class ConstValidator extends BigDecimalValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + if (!data.schema().constValueSet) { + return null; + } + var constValue = data.schema().constValue; + if (data.arg() instanceof Number numberArg) { + BigDecimal castArg = getBigDecimal(numberArg); + if (Objects.equals(castArg, constValue)) { + return null; + } + if (constValue instanceof BigDecimal && ((BigDecimal) constValue).compareTo(castArg) == 0) { + return null; + } + } else { + if (Objects.equals(data.arg(), constValue)) { + return null; + } + } + throw new ValidationException("Invalid value "+data.arg()+" was not equal to const "+constValue); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java new file mode 100644 index 00000000000..7e1998b6cbc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java @@ -0,0 +1,30 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; + +public class ContainsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + if (!(data.arg() instanceof List)) { + return null; + } + var containsPathToSchemas = data.containsPathToSchemas(); + if (containsPathToSchemas == null || containsPathToSchemas.isEmpty()) { + throw new ValidationException( + "Validation failed for contains keyword in class="+data.schema().getClass() + + " at pathToItem="+data.validationMetadata().pathToItem()+". No " + + "items validated to the contains schema." + ); + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + for (PathToSchemasMap otherPathToSchema: containsPathToSchemas) { + pathToSchemas.update(otherPathToSchema); + } + return pathToSchemas; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java new file mode 100644 index 00000000000..b07e77d9c0d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java @@ -0,0 +1,16 @@ +package unit_test_api.schemas.validation; + +import java.time.ZonedDateTime; +import java.time.LocalDate; + +public final class CustomIsoparser { + + public ZonedDateTime parseIsodatetime(String dateTime) { + return ZonedDateTime.parse(dateTime); + } + + public LocalDate parseIsodate(String date) { + return LocalDate.parse(date); + } + +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java new file mode 100644 index 00000000000..4bca04ede2b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java @@ -0,0 +1,7 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; + +public interface DefaultValueMethod { + T defaultValue() throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java new file mode 100644 index 00000000000..9f5445a7477 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java @@ -0,0 +1,42 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class DependentRequiredValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + var dependentRequired = data.schema().dependentRequired; + if (dependentRequired == null) { + return null; + } + for (Map.Entry> entry: dependentRequired.entrySet()) { + if (!mapArg.containsKey(entry.getKey())) { + continue; + } + Set missingKeys = new HashSet<>(entry.getValue()); + for (Object objKey: mapArg.keySet()) { + if (objKey instanceof String key) { + missingKeys.remove(key); + } + } + if (missingKeys.isEmpty()) { + continue; + } + throw new ValidationException( + "Validation failed for dependentRequired because these_keys="+missingKeys+" are "+ + "missing at pathToItem="+data.validationMetadata().pathToItem()+" in class "+data.schema().getClass() + ); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java new file mode 100644 index 00000000000..c9ec014a3fa --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java @@ -0,0 +1,41 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + +public class DependentSchemasValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + var dependentSchemas = data.schema().dependentSchemas; + if (dependentSchemas == null) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + Set presentProperties = new LinkedHashSet<>(); + for (Object key: mapArg.keySet()) { + if (key instanceof String) { + presentProperties.add((String) key); + } + } + for(Map.Entry>> entry: dependentSchemas.entrySet()) { + String propName = entry.getKey(); + if (!presentProperties.contains(propName)) { + continue; + } + Class> dependentSchemaClass = entry.getValue(); + JsonSchema dependentSchema = JsonSchemaFactory.getInstance(dependentSchemaClass); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(dependentSchema, mapArg, data.validationMetadata()); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java new file mode 100644 index 00000000000..24c76250695 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface DoubleEnumValidator { + double validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java new file mode 100644 index 00000000000..46ecd29c8e5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface DoubleValueMethod { + double value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java new file mode 100644 index 00000000000..1495aa01148 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java @@ -0,0 +1,31 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +public class ElseValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var elseSchema = data.schema().elseSchema; + if (elseSchema == null) { + return null; + } + var ifPathToSchemas = data.ifPathToSchemas(); + if (ifPathToSchemas == null) { + // if unset + return null; + } + if (!ifPathToSchemas.isEmpty()) { + // if validation is true + return null; + } + JsonSchema elseSchemaInstance = JsonSchemaFactory.getInstance(elseSchema); + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + var elsePathToSchemas = JsonSchema.validate(elseSchemaInstance, data.arg(), data.validationMetadata()); + // todo capture validation error and describe it as an else error? + pathToSchemas.update(elsePathToSchemas); + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java new file mode 100644 index 00000000000..ee217ce84e4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java @@ -0,0 +1,43 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.math.BigDecimal; +import java.util.Set; + +public class EnumValidator extends BigDecimalValidator implements KeywordValidator { + @SuppressWarnings("nullness") + private static boolean enumContainsArg(Set<@Nullable Object> enumValues, @Nullable Object arg){ + return enumValues.contains(arg); + } + + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var enumValues = data.schema().enumValues; + if (enumValues == null) { + return null; + } + if (enumValues.isEmpty()) { + throw new ValidationException("No value can match enum because enum is empty"); + } + if (data.arg() instanceof Number numberArg) { + BigDecimal castArg = getBigDecimal(numberArg); + if (enumContainsArg(enumValues, castArg)) { + return null; + } + for (Object enumValue: enumValues) { + if (enumValue instanceof BigDecimal && ((BigDecimal) enumValue).compareTo(castArg) == 0) { + return null; + } + } + } else { + if (enumContainsArg(enumValues, data.arg())) { + return null; + } + } + throw new ValidationException("Invalid value "+data.arg()+" was not one of the allowed enum "+enumValues); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java new file mode 100644 index 00000000000..b2d9e6dd199 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class ExclusiveMaximumValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var exclusiveMaximum = data.schema().exclusiveMaximum; + if (exclusiveMaximum == null) { + return null; + } + if (!(data.arg() instanceof Number)) { + return null; + } + String msg = "Value " + data.arg() + " is invalid because it is >= the exclusiveMaximum of " + exclusiveMaximum; + if (data.arg() instanceof Integer intArg) { + if (intArg.compareTo(exclusiveMaximum.intValue()) > -1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Long longArg) { + if (longArg.compareTo(exclusiveMaximum.longValue()) > -1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Float floatArg) { + if (floatArg.compareTo(exclusiveMaximum.floatValue()) > -1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Double doubleArg) { + if (doubleArg.compareTo(exclusiveMaximum.doubleValue()) > -1) { + throw new ValidationException(msg); + } + return null; + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java new file mode 100644 index 00000000000..ab748083287 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class ExclusiveMinimumValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var exclusiveMinimum = data.schema().exclusiveMinimum; + if (exclusiveMinimum == null) { + return null; + } + if (!(data.arg() instanceof Number)) { + return null; + } + String msg = "Value " + data.arg() + " is invalid because it is <= the exclusiveMinimum of " + exclusiveMinimum; + if (data.arg() instanceof Integer intArg) { + if (intArg.compareTo(exclusiveMinimum.intValue()) < 1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Long longArg) { + if (longArg.compareTo(exclusiveMinimum.longValue()) < 1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Float floatArg) { + if (floatArg.compareTo(exclusiveMinimum.floatValue()) < 1) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Double doubleArg) { + if (doubleArg.compareTo(exclusiveMinimum.doubleValue()) < 1) { + throw new ValidationException(msg); + } + return null; + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java new file mode 100644 index 00000000000..884cf28bdf6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface FloatEnumValidator { + float validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java new file mode 100644 index 00000000000..708174f43d6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface FloatValueMethod { + float value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java new file mode 100644 index 00000000000..39cb93c71b6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java @@ -0,0 +1,158 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.format.DateTimeParseException; +import java.util.UUID; + +public class FormatValidator implements KeywordValidator { + private final static BigInteger int32InclusiveMinimum = BigInteger.valueOf(-2147483648L); + private final static BigInteger int32InclusiveMaximum = BigInteger.valueOf(2147483647L); + private final static BigInteger int64InclusiveMinimum = BigInteger.valueOf(-9223372036854775808L); + private final static BigInteger int64InclusiveMaximum = BigInteger.valueOf(9223372036854775807L); + private final static BigDecimal floatInclusiveMinimum = BigDecimal.valueOf(-3.4028234663852886e+38); + private final static BigDecimal floatInclusiveMaximum = BigDecimal.valueOf(3.4028234663852886e+38); + private final static BigDecimal doubleInclusiveMinimum = BigDecimal.valueOf(-1.7976931348623157E+308d); + private final static BigDecimal doubleInclusiveMaximum = BigDecimal.valueOf(1.7976931348623157E+308d); + + private static void validateNumericFormat(Number arg, ValidationMetadata validationMetadata, String format) throws ValidationException { + if (format.startsWith("int")) { + // there is a json schema test where 1.0 validates as an integer + BigInteger intArg; + if (arg instanceof Float || arg instanceof Double) { + double doubleArg; + if (arg instanceof Float) { + doubleArg = arg.doubleValue(); + } else { + doubleArg = (Double) arg; + } + if (Math.floor(doubleArg) != doubleArg) { + throw new ValidationException( + "Invalid non-integer value " + arg + " for format " + format + " at " + validationMetadata.pathToItem() + ); + } + if (arg instanceof Float) { + Integer smallInt = Math.round((Float) arg); + intArg = BigInteger.valueOf(smallInt.longValue()); + } else { + intArg = BigInteger.valueOf(Math.round((Double) arg)); + } + } else if (arg instanceof Integer) { + intArg = BigInteger.valueOf(arg.longValue()); + } else if (arg instanceof Long) { + intArg = BigInteger.valueOf((Long) arg); + } else { + intArg = (BigInteger) arg; + } + if (format.equals("int32")) { + if (intArg.compareTo(int32InclusiveMinimum) < 0 || intArg.compareTo(int32InclusiveMaximum) > 0) { + throw new ValidationException( + "Invalid value " + arg + " for format int32 at " + validationMetadata.pathToItem() + ); + } + } else if (format.equals("int64")) { + if (intArg.compareTo(int64InclusiveMinimum) < 0 || intArg.compareTo(int64InclusiveMaximum) > 0) { + throw new ValidationException( + "Invalid value " + arg + " for format int64 at " + validationMetadata.pathToItem() + ); + } + } + } else if (format.equals("float") || format.equals("double")) { + BigDecimal decimalArg; + if (arg instanceof Float) { + decimalArg = BigDecimal.valueOf(arg.doubleValue()); + } else if (arg instanceof Double) { + decimalArg = BigDecimal.valueOf((Double) arg); + } else { + decimalArg = (BigDecimal) arg; + } + if (format.equals("float")) { + if (decimalArg.compareTo(floatInclusiveMinimum) < 0 || decimalArg.compareTo(floatInclusiveMaximum) > 0 ){ + throw new ValidationException( + "Invalid value "+arg+" for format float at "+validationMetadata.pathToItem() + ); + } + } else { + if (decimalArg.compareTo(doubleInclusiveMinimum) < 0 || decimalArg.compareTo(doubleInclusiveMaximum) > 0 ){ + throw new ValidationException( + "Invalid value "+arg+" for format double at "+validationMetadata.pathToItem() + ); + } + } + } + } + + private static void validateStringFormat(String arg, ValidationMetadata validationMetadata, String format) throws ValidationException { + switch (format) { + case "uuid" -> { + try { + UUID.fromString(arg); + } catch (IllegalArgumentException e) { + throw new ValidationException( + "Value cannot be converted to a UUID. Invalid value " + + arg + " for format uuid at " + validationMetadata.pathToItem() + ); + } + } + case "number" -> { + try { + new BigDecimal(arg); + } catch (NumberFormatException e) { + throw new ValidationException( + "Value cannot be converted to a decimal. Invalid value " + + arg + " for format number at " + validationMetadata.pathToItem() + ); + } + } + case "date" -> { + try { + new CustomIsoparser().parseIsodate(arg); + } catch (DateTimeParseException e) { + throw new ValidationException( + "Value does not conform to the required ISO-8601 date format. " + + "Invalid value " + arg + " for format date at " + validationMetadata.pathToItem() + ); + } + } + case "date-time" -> { + try { + new CustomIsoparser().parseIsodatetime(arg); + } catch (DateTimeParseException e) { + throw new ValidationException( + "Value does not conform to the required ISO-8601 datetime format. " + + "Invalid value " + arg + " for format datetime at " + validationMetadata.pathToItem() + ); + } + } + } + } + + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var format = data.schema().format; + if (format == null) { + return null; + } + if (data.arg() instanceof Number numberArg) { + validateNumericFormat( + numberArg, + data.validationMetadata(), + format + ); + return null; + } else if (data.arg() instanceof String stringArg) { + validateStringFormat( + stringArg, + data.validationMetadata(), + format + ); + return null; + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java new file mode 100644 index 00000000000..422604d619c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java @@ -0,0 +1,30 @@ +package unit_test_api.schemas.validation; + +import java.util.AbstractList; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class FrozenList extends AbstractList { + /* + A frozen List + Once schema validation has been run, indexed access returns values of the correct type + If values were mutable, the types in those methods would not agree with returned values + */ + private final List list; + public FrozenList(Collection m) { + super(); + list = new ArrayList<>(m); + } + + @Override + public E get(int index) { + return list.get(index); + } + + @Override + public int size() { + return list.size(); + } +} + diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java new file mode 100644 index 00000000000..9f8ccc04cba --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java @@ -0,0 +1,54 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.KeyFor; +import unit_test_api.exceptions.UnsetPropertyException; +import unit_test_api.exceptions.InvalidAdditionalPropertyException; + +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +public class FrozenMap extends AbstractMap { + /* + A frozen Map + Once schema validation has been run, written accessor methods return values of the correct type + If values were mutable, the types in those methods would not agree with returned values + */ + private final Map map; + public FrozenMap(Map m) { + + super(); + map = new HashMap<>(m); + } + + protected V getOrThrow(String key) throws UnsetPropertyException { + if (containsKey(key)) { + return get(key); + } + throw new UnsetPropertyException(key+" is unset"); + } + + protected void throwIfKeyNotPresent(String key) throws UnsetPropertyException { + if (!containsKey(key)) { + throw new UnsetPropertyException(key+" is unset"); + } + } + + protected void throwIfKeyKnown(String key, Set requiredKeys, Set optionalKeys) throws InvalidAdditionalPropertyException { + Set knownKeys = new HashSet<>(); + knownKeys.addAll(requiredKeys); + knownKeys.addAll(optionalKeys); + MapUtils.throwIfKeyKnown(key, knownKeys, false); + } + + @Override + public Set> entrySet() { + return map.entrySet().stream() + .map(x -> new AbstractMap.SimpleEntry<>(x.getKey(), x.getValue())) + .collect(Collectors.toSet()); + } +} + diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java new file mode 100644 index 00000000000..7ee93a255ee --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java @@ -0,0 +1,28 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class IfValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var ifSchema = data.schema().ifSchema; + if (ifSchema == null) { + return null; + } + if (data.ifPathToSchemas() == null) { + throw new ValidationException("Invalid type for ifPathToSchemas"); + } + /* + if is false use case + ifPathToSchemas == {} + no need to add any data to pathToSchemas + + if true, then true -> true for whole schema + so validate_then will add ifPathToSchemas data to pathToSchemas + */ + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java new file mode 100644 index 00000000000..7fcd2e9f7d6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface IntegerEnumValidator { + int validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java new file mode 100644 index 00000000000..361a9f71e04 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface IntegerValueMethod { + int value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java new file mode 100644 index 00000000000..7e640617921 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.List; + +public class ItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var items = data.schema().items; + if (items == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (listArg.isEmpty()) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + int minIndex = data.schema().prefixItems != null ? data.schema().prefixItems.size() : 0; + JsonSchema itemsSchema = JsonSchemaFactory.getInstance(items); + for(int i = minIndex; i < listArg.size(); i++) { + List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + itemPathToItem.add(i); + ValidationMetadata itemValidationMetadata = new ValidationMetadata( + itemPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + if (itemValidationMetadata.validationRanEarlier(itemsSchema)) { + // todo add_deeper_validated_schemas + continue; + } + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(itemsSchema, listArg.get(i), itemValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java new file mode 100644 index 00000000000..70859e0e61c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java @@ -0,0 +1,499 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.regex.Pattern; + +public abstract class JsonSchema { + public final @Nullable Set> type; + public final @Nullable String format; + public final @Nullable Class> items; + public final @Nullable Map>> properties; + public final @Nullable Set required; + public final @Nullable Number exclusiveMaximum; + public final @Nullable Number exclusiveMinimum; + public final @Nullable Integer maxItems; + public final @Nullable Integer minItems; + public final @Nullable Integer maxLength; + public final @Nullable Integer minLength; + public final @Nullable Integer maxProperties; + public final @Nullable Integer minProperties; + public final @Nullable Number maximum; + public final @Nullable Number minimum; + public final @Nullable BigDecimal multipleOf; + public final @Nullable Class> additionalProperties; + public final @Nullable List>> allOf; + public final @Nullable List>> anyOf; + public final @Nullable List>> oneOf; + public final @Nullable Class> not; + public final @Nullable Boolean uniqueItems; + public final @Nullable Set<@Nullable Object> enumValues; + public final @Nullable Pattern pattern; + public final @Nullable Object defaultValue; + public final boolean defaultValueSet; + public final @Nullable Object constValue; + public final boolean constValueSet; + public final @Nullable Class> contains; + public final @Nullable Integer maxContains; + public final @Nullable Integer minContains; + public final @Nullable Class> propertyNames; + public final @Nullable Map> dependentRequired; + public final @Nullable Map>> dependentSchemas; + public final @Nullable Map>> patternProperties; + public final @Nullable List>> prefixItems; + public final @Nullable Class> ifSchema; + public final @Nullable Class> then; + public final @Nullable Class> elseSchema; + public final @Nullable Class> unevaluatedItems; + public final @Nullable Class> unevaluatedProperties; + private final LinkedHashMap keywordToValidator; + + protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { + LinkedHashMap keywordToValidator = new LinkedHashMap<>(); + this.type = jsonSchemaInfo.type; + if (this.type != null) { + keywordToValidator.put("type", new TypeValidator()); + } + this.format = jsonSchemaInfo.format; + if (this.format != null) { + keywordToValidator.put("format", new FormatValidator()); + } + this.items = jsonSchemaInfo.items; + if (this.items != null) { + keywordToValidator.put("items", new ItemsValidator()); + } + this.properties = jsonSchemaInfo.properties; + if (this.properties != null) { + keywordToValidator.put("properties", new PropertiesValidator()); + } + this.required = jsonSchemaInfo.required; + if (this.required != null) { + keywordToValidator.put("required", new RequiredValidator()); + } + this.exclusiveMaximum = jsonSchemaInfo.exclusiveMaximum; + if (this.exclusiveMaximum != null) { + keywordToValidator.put("exclusiveMaximum", new ExclusiveMaximumValidator()); + } + this.exclusiveMinimum = jsonSchemaInfo.exclusiveMinimum; + if (this.exclusiveMinimum != null) { + keywordToValidator.put("exclusiveMinimum", new ExclusiveMinimumValidator()); + } + this.maxItems = jsonSchemaInfo.maxItems; + if (this.maxItems != null) { + keywordToValidator.put("maxItems", new MaxItemsValidator()); + } + this.minItems = jsonSchemaInfo.minItems; + if (this.minItems != null) { + keywordToValidator.put("minItems", new MinItemsValidator()); + } + this.maxLength = jsonSchemaInfo.maxLength; + if (this.maxLength != null) { + keywordToValidator.put("maxLength", new MaxLengthValidator()); + } + this.minLength = jsonSchemaInfo.minLength; + if (this.minLength != null) { + keywordToValidator.put("minLength", new MinLengthValidator()); + } + this.maxProperties = jsonSchemaInfo.maxProperties; + if (this.maxProperties != null) { + keywordToValidator.put("maxProperties", new MaxPropertiesValidator()); + } + this.minProperties = jsonSchemaInfo.minProperties; + if (this.minProperties != null) { + keywordToValidator.put("minProperties", new MinPropertiesValidator()); + } + this.maximum = jsonSchemaInfo.maximum; + if (this.maximum != null) { + keywordToValidator.put("maximum", new MaximumValidator()); + } + this.minimum = jsonSchemaInfo.minimum; + if (this.minimum != null) { + keywordToValidator.put("minimum", new MinimumValidator()); + } + this.multipleOf = jsonSchemaInfo.multipleOf; + if (this.multipleOf != null) { + keywordToValidator.put("multipleOf", new MultipleOfValidator()); + } + this.additionalProperties = jsonSchemaInfo.additionalProperties; + if (this.additionalProperties != null) { + keywordToValidator.put("additionalProperties", new AdditionalPropertiesValidator()); + } + this.allOf = jsonSchemaInfo.allOf; + if (this.allOf != null) { + keywordToValidator.put("allOf", new AllOfValidator()); + } + this.anyOf = jsonSchemaInfo.anyOf; + if (this.anyOf != null) { + keywordToValidator.put("anyOf", new AnyOfValidator()); + } + this.oneOf = jsonSchemaInfo.oneOf; + if (this.oneOf != null) { + keywordToValidator.put("oneOf", new OneOfValidator()); + } + this.not = jsonSchemaInfo.not; + if (this.not != null) { + keywordToValidator.put("not", new NotValidator()); + } + this.uniqueItems = jsonSchemaInfo.uniqueItems; + if (this.uniqueItems != null) { + keywordToValidator.put("uniqueItems", new UniqueItemsValidator()); + } + this.enumValues = jsonSchemaInfo.enumValues; + if (this.enumValues != null) { + keywordToValidator.put("enum", new EnumValidator()); + } + this.pattern = jsonSchemaInfo.pattern; + if (this.pattern != null) { + keywordToValidator.put("pattern", new PatternValidator()); + } + this.defaultValue = jsonSchemaInfo.defaultValue; + this.defaultValueSet = jsonSchemaInfo.defaultValueSet; + this.constValue = jsonSchemaInfo.constValue; + this.constValueSet = jsonSchemaInfo.constValueSet; + if (this.constValueSet) { + keywordToValidator.put("const", new ConstValidator()); + } + this.contains = jsonSchemaInfo.contains; + if (this.contains != null) { + keywordToValidator.put("contains", new ContainsValidator()); + } + this.maxContains = jsonSchemaInfo.maxContains; + if (this.maxContains != null) { + keywordToValidator.put("maxContains", new MaxContainsValidator()); + } + this.minContains = jsonSchemaInfo.minContains; + if (this.minContains != null) { + keywordToValidator.put("minContains", new MinContainsValidator()); + } + this.propertyNames = jsonSchemaInfo.propertyNames; + if (this.propertyNames != null) { + keywordToValidator.put("propertyNames", new PropertyNamesValidator()); + } + this.dependentRequired = jsonSchemaInfo.dependentRequired; + if (this.dependentRequired != null) { + keywordToValidator.put("dependentRequired", new DependentRequiredValidator()); + } + this.dependentSchemas = jsonSchemaInfo.dependentSchemas; + if (this.dependentSchemas != null) { + keywordToValidator.put("dependentSchemas", new DependentSchemasValidator()); + } + this.patternProperties = jsonSchemaInfo.patternProperties; + if (this.patternProperties != null) { + keywordToValidator.put("patternProperties", new PatternPropertiesValidator()); + } + this.prefixItems = jsonSchemaInfo.prefixItems; + if (this.prefixItems != null) { + keywordToValidator.put("prefixItems", new PrefixItemsValidator()); + } + this.ifSchema = jsonSchemaInfo.ifSchema; + if (this.ifSchema != null) { + keywordToValidator.put("if", new IfValidator()); + } + this.then = jsonSchemaInfo.then; + if (this.then != null) { + keywordToValidator.put("then", new ThenValidator()); + } + this.elseSchema = jsonSchemaInfo.elseSchema; + if (this.elseSchema != null) { + keywordToValidator.put("else", new ElseValidator()); + } + this.unevaluatedItems = jsonSchemaInfo.unevaluatedItems; + if (this.unevaluatedItems != null) { + keywordToValidator.put("unevaluatedItems", new UnevaluatedItemsValidator()); + } + this.unevaluatedProperties = jsonSchemaInfo.unevaluatedProperties; + if (this.unevaluatedProperties != null) { + keywordToValidator.put("unevaluatedProperties", new UnevaluatedPropertiesValidator()); + } + this.keywordToValidator = keywordToValidator; + } + + public abstract @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas); + public abstract @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException; + public abstract T validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException; + + private List getContainsPathToSchemas( + @Nullable Object arg, + ValidationMetadata validationMetadata + ) { + if (!(arg instanceof List listArg) || contains == null) { + return new ArrayList<>(); + } + JsonSchema containsSchema = JsonSchemaFactory.getInstance(contains); + @Nullable List containsPathToSchemas = new ArrayList<>(); + for(int i = 0; i < listArg.size(); i++) { + PathToSchemasMap thesePathToSchemas = new PathToSchemasMap(); + List itemPathToItem = new ArrayList<>(validationMetadata.pathToItem()); + itemPathToItem.add(i); + ValidationMetadata itemValidationMetadata = new ValidationMetadata( + itemPathToItem, + validationMetadata.configuration(), + validationMetadata.validatedPathToSchemas(), + validationMetadata.seenClasses() + ); + if (itemValidationMetadata.validationRanEarlier(containsSchema)) { + // todo add_deeper_validated_schemas + containsPathToSchemas.add(thesePathToSchemas); + continue; + } + + try { + PathToSchemasMap otherPathToSchemas = JsonSchema.validate( + containsSchema, listArg.get(i), itemValidationMetadata); + containsPathToSchemas.add(otherPathToSchemas); + } catch (ValidationException ignored) {} + } + return containsPathToSchemas; + } + + private PathToSchemasMap getPatternPropertiesPathToSchemas( + @Nullable Object arg, + ValidationMetadata validationMetadata + ) throws ValidationException { + if (!(arg instanceof Map mapArg) || patternProperties == null) { + return new PathToSchemasMap(); + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + for (Map.Entry entry: mapArg.entrySet()) { + Object entryKey = entry.getKey(); + if (!(entryKey instanceof String key)) { + throw new ValidationException("Invalid non-string type for map key"); + } + List propPathToItem = new ArrayList<>(validationMetadata.pathToItem()); + propPathToItem.add(key); + ValidationMetadata propValidationMetadata = new ValidationMetadata( + propPathToItem, + validationMetadata.configuration(), + validationMetadata.validatedPathToSchemas(), + validationMetadata.seenClasses() + ); + for (Map.Entry>> patternPropEntry: patternProperties.entrySet()) { + if (!patternPropEntry.getKey().matcher(key).find()) { + continue; + } + + Class> patternPropClass = patternPropEntry.getValue(); + JsonSchema patternPropSchema = JsonSchemaFactory.getInstance(patternPropClass); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(patternPropSchema, entry.getValue(), propValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + } + return pathToSchemas; + } + + private PathToSchemasMap getIfPathToSchemas( + @Nullable Object arg, + ValidationMetadata validationMetadata + ) { + if (ifSchema == null) { + return new PathToSchemasMap(); + } + JsonSchema ifSchemaInstance = JsonSchemaFactory.getInstance(ifSchema); + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + try { + var otherPathToSchemas = JsonSchema.validate(ifSchemaInstance, arg, validationMetadata); + pathToSchemas.update(otherPathToSchemas); + } catch (ValidationException ignored) {} + return pathToSchemas; + } + + public static PathToSchemasMap validate( + JsonSchema jsonSchema, + @Nullable Object arg, + ValidationMetadata validationMetadata + ) throws ValidationException { + LinkedHashSet disabledKeywords = validationMetadata.configuration().disabledKeywordFlags().getKeywords(); + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + LinkedHashMap thisKeywordToValidator = jsonSchema.keywordToValidator; + @Nullable List containsPathToSchemas = null; + if (thisKeywordToValidator.containsKey("contains")) { + containsPathToSchemas = jsonSchema.getContainsPathToSchemas(arg, validationMetadata); + } + @Nullable PathToSchemasMap patternPropertiesPathToSchemas = null; + if (thisKeywordToValidator.containsKey("patternProperties")) { + patternPropertiesPathToSchemas = jsonSchema.getPatternPropertiesPathToSchemas(arg, validationMetadata); + } + @Nullable PathToSchemasMap ifPathToSchemas = null; + if (thisKeywordToValidator.containsKey("if")) { + ifPathToSchemas = jsonSchema.getIfPathToSchemas(arg, validationMetadata); + } + @Nullable PathToSchemasMap knownPathToSchemas = null; + for (Map.Entry entry: thisKeywordToValidator.entrySet()) { + String jsonKeyword = entry.getKey(); + if (disabledKeywords.contains(jsonKeyword)) { + boolean typeIntegerUseCase = jsonKeyword.equals("format") && "int".equals(jsonSchema.format); + if (!typeIntegerUseCase) { + continue; + } + } + if ("unevaluatedItems".equals(jsonKeyword) || "unevaluatedProperties".equals(jsonKeyword)) { + knownPathToSchemas = pathToSchemas; + } + KeywordValidator validator = entry.getValue(); + ValidationData data = new ValidationData( + jsonSchema, + arg, + validationMetadata, + containsPathToSchemas, + patternPropertiesPathToSchemas, + ifPathToSchemas, + knownPathToSchemas + ); + @Nullable PathToSchemasMap otherPathToSchemas = validator.validate(data); + if (otherPathToSchemas == null) { + continue; + } + pathToSchemas.update(otherPathToSchemas); + } + List pathToItem = validationMetadata.pathToItem(); + if (!pathToSchemas.containsKey(pathToItem)) { + pathToSchemas.put(validationMetadata.pathToItem(), new LinkedHashMap<>()); + } + @Nullable LinkedHashMap, Void> schemas = pathToSchemas.get(pathToItem); + if (schemas != null) { + schemas.put(jsonSchema, null); + } + return pathToSchemas; + } + + protected String castToAllowedTypes(String arg, List pathToItem, Set> pathSet) { + pathSet.add(pathToItem); + return arg; + } + + protected Boolean castToAllowedTypes(Boolean arg, List pathToItem, Set> pathSet) { + pathSet.add(pathToItem); + return arg; + } + + protected Number castToAllowedTypes(Number arg, List pathToItem, Set> pathSet) { + pathSet.add(pathToItem); + return arg; + } + + protected Void castToAllowedTypes(Void arg, List pathToItem, Set> pathSet) { + pathSet.add(pathToItem); + return arg; + } + + protected List castToAllowedTypes(List arg, List pathToItem, Set> pathSet) throws ValidationException { + pathSet.add(pathToItem); + List<@Nullable Object> argFixed = new ArrayList<>(); + int i =0; + for (Object item: arg) { + List newPathToItem = new ArrayList<>(pathToItem); + newPathToItem.add(i); + Object fixedVal = castToAllowedObjectTypes(item, newPathToItem, pathSet); + argFixed.add(fixedVal); + i += 1; + } + return argFixed; + } + + protected Map castToAllowedTypes(Map arg, List pathToItem, Set> pathSet) throws ValidationException { + pathSet.add(pathToItem); + LinkedHashMap argFixed = new LinkedHashMap<>(); + for (Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String key)) { + throw new ValidationException("Invalid non-string key value"); + } + Object val = entry.getValue(); + List newPathToItem = new ArrayList<>(pathToItem); + newPathToItem.add(key); + Object fixedVal = castToAllowedObjectTypes(val, newPathToItem, pathSet); + argFixed.put(key, fixedVal); + } + return argFixed; + } + + private @Nullable Object castToAllowedObjectTypes(@Nullable Object arg, List pathToItem, Set> pathSet) throws ValidationException { + if (arg == null) { + return castToAllowedTypes((Void) null, pathToItem, pathSet); + } else if (arg instanceof String) { + return castToAllowedTypes((String) arg, pathToItem, pathSet); + } else if (arg instanceof Map) { + pathSet.add(pathToItem); + return castToAllowedTypes((Map) arg, pathToItem, pathSet); + } else if (arg instanceof Boolean) { + return castToAllowedTypes((Boolean) arg, pathToItem, pathSet); + } else if (arg instanceof Integer) { + return castToAllowedTypes((Number) arg, pathToItem, pathSet); + } else if (arg instanceof Long) { + return castToAllowedTypes((Number) arg, pathToItem, pathSet); + } else if (arg instanceof Float) { + return castToAllowedTypes((Number) arg, pathToItem, pathSet); + } else if (arg instanceof Double) { + return castToAllowedTypes((Number) arg, pathToItem, pathSet); + } else if (arg instanceof List) { + return castToAllowedTypes((List) arg, pathToItem, pathSet); + } else if (arg instanceof ZonedDateTime) { + return castToAllowedTypes(arg.toString(), pathToItem, pathSet); + } else if (arg instanceof LocalDate) { + return castToAllowedTypes(arg.toString(), pathToItem, pathSet); + } else if (arg instanceof UUID) { + return castToAllowedTypes(arg.toString(), pathToItem, pathSet); + } else { + Class argClass = arg.getClass(); + throw new ValidationException("Invalid type passed in for input="+arg+" type="+argClass); + } + } + + public Void getNewInstance(Void arg, List pathToItem, PathToSchemasMap pathToSchemas) { + return arg; + } + + public boolean getNewInstance(boolean arg, List pathToItem, PathToSchemasMap pathToSchemas) { + return arg; + } + + public Number getNewInstance(Number arg, List pathToItem, PathToSchemasMap pathToSchemas) { + return arg; + } + + public String getNewInstance(String arg, List pathToItem, PathToSchemasMap pathToSchemas) { + return arg; + } + + protected static PathToSchemasMap getPathToSchemas(JsonSchema jsonSchema, @Nullable Object arg, ValidationMetadata validationMetadata, Set> pathSet) throws ValidationException { + PathToSchemasMap pathToSchemasMap = new PathToSchemasMap(); + // todo add check of validationMetadata.validationRanEarlier(this) + PathToSchemasMap otherPathToSchemas = validate(jsonSchema, arg, validationMetadata); + pathToSchemasMap.update(otherPathToSchemas); + for (var schemas: pathToSchemasMap.values()) { + JsonSchema firstSchema = schemas.entrySet().iterator().next().getKey(); + schemas.clear(); + schemas.put(firstSchema, null); + } + pathSet.removeAll(pathToSchemasMap.keySet()); + if (!pathSet.isEmpty()) { + LinkedHashMap, Void> unsetAnyTypeSchema = new LinkedHashMap<>(); + unsetAnyTypeSchema.put(UnsetAnyTypeJsonSchema.UnsetAnyTypeJsonSchema1.getInstance(), null); + for (List pathToItem: pathSet) { + pathToSchemasMap.put(pathToItem, unsetAnyTypeSchema); + } + } + return pathToSchemasMap; + } + + public static String getClass(@Nullable Object arg) { + if (arg == null) { + return Void.class.getSimpleName(); + } else { + return arg.getClass().getSimpleName(); + } + } + // todo add bytes and FileIO +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java new file mode 100644 index 00000000000..8fff8029165 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java @@ -0,0 +1,32 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + + +public class JsonSchemaFactory { + static Map>, JsonSchema> classToInstance = new HashMap<>(); + + public static > V getInstance(Class schemaCls) { + @Nullable JsonSchema cacheInst = classToInstance.get(schemaCls); + if (cacheInst != null) { + assert schemaCls.isInstance(cacheInst); + return schemaCls.cast(cacheInst); + } + try { + Method method = schemaCls.getMethod("getInstance"); + @SuppressWarnings("nullness") @NonNull Object obj = method.invoke(null); + assert schemaCls.isInstance(obj); + V inst = schemaCls.cast(obj); + classToInstance.put(schemaCls, inst); + return inst; + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java new file mode 100644 index 00000000000..87143cbbc00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java @@ -0,0 +1,210 @@ +package unit_test_api.schemas.validation; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +public class JsonSchemaInfo { + public @Nullable Set> type = null; + public JsonSchemaInfo type(Set> type) { + this.type = type; + return this; + } + public @Nullable String format = null; + public JsonSchemaInfo format(String format) { + this.format = format; + return this; + } + public @Nullable Class> items = null; + public JsonSchemaInfo items(Class> items) { + this.items = items; + return this; + } + public @Nullable Map>> properties = null; + public JsonSchemaInfo properties(Map>> properties) { + this.properties = properties; + return this; + } + public @Nullable Set required = null; + public JsonSchemaInfo required(Set required) { + this.required = required; + return this; + } + public @Nullable Number exclusiveMaximum = null; + public JsonSchemaInfo exclusiveMaximum(Number exclusiveMaximum) { + this.exclusiveMaximum = exclusiveMaximum; + return this; + } + public @Nullable Number exclusiveMinimum = null; + public JsonSchemaInfo exclusiveMinimum(Number exclusiveMinimum) { + this.exclusiveMinimum = exclusiveMinimum; + return this; + } + public @Nullable Integer maxItems = null; + public JsonSchemaInfo maxItems(Integer maxItems) { + this.maxItems = maxItems; + return this; + } + public @Nullable Integer minItems = null; + public JsonSchemaInfo minItems(Integer minItems) { + this.minItems = minItems; + return this; + } + public @Nullable Integer maxLength = null; + public JsonSchemaInfo maxLength(Integer maxLength) { + this.maxLength = maxLength; + return this; + } + public @Nullable Integer minLength = null; + public JsonSchemaInfo minLength(Integer minLength) { + this.minLength = minLength; + return this; + } + public @Nullable Integer maxProperties = null; + public JsonSchemaInfo maxProperties(Integer maxProperties) { + this.maxProperties = maxProperties; + return this; + } + public @Nullable Integer minProperties = null; + public JsonSchemaInfo minProperties(Integer minProperties) { + this.minProperties = minProperties; + return this; + } + public @Nullable Number maximum = null; + public JsonSchemaInfo maximum(Number maximum) { + this.maximum = maximum; + return this; + } + public @Nullable Number minimum = null; + public JsonSchemaInfo minimum(Number minimum) { + this.minimum = minimum; + return this; + } + public @Nullable BigDecimal multipleOf = null; + public JsonSchemaInfo multipleOf(BigDecimal multipleOf) { + this.multipleOf = multipleOf; + return this; + } + public @Nullable Class> additionalProperties; + public JsonSchemaInfo additionalProperties(Class> additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + public @Nullable List>> allOf = null; + public JsonSchemaInfo allOf(List>> allOf) { + this.allOf = allOf; + return this; + } + public @Nullable List>> anyOf = null; + public JsonSchemaInfo anyOf(List>> anyOf) { + this.anyOf = anyOf; + return this; + } + public @Nullable List>> oneOf = null; + public JsonSchemaInfo oneOf(List>> oneOf) { + this.oneOf = oneOf; + return this; + } + public @Nullable Class> not = null; + public JsonSchemaInfo not(Class> not) { + this.not = not; + return this; + } + public @Nullable Boolean uniqueItems = null; + public JsonSchemaInfo uniqueItems(Boolean uniqueItems) { + this.uniqueItems = uniqueItems; + return this; + } + public @Nullable Set<@Nullable Object> enumValues = null; + public JsonSchemaInfo enumValues(Set<@Nullable Object> enumValues) { + this.enumValues = enumValues; + return this; + } + public @Nullable Pattern pattern = null; + public JsonSchemaInfo pattern(Pattern pattern) { + this.pattern = pattern; + return this; + } + public @Nullable Object defaultValue = null; + public boolean defaultValueSet = false; + public JsonSchemaInfo defaultValue(@Nullable Object defaultValue) { + this.defaultValue = defaultValue; + this.defaultValueSet = true; + return this; + } + public @Nullable Object constValue = null; + public boolean constValueSet = false; + public JsonSchemaInfo constValue(@Nullable Object constValue) { + this.constValue = constValue; + this.constValueSet = true; + return this; + } + public @Nullable Class> contains = null; + public JsonSchemaInfo contains(Class> contains) { + this.contains = contains; + return this; + } + public @Nullable Integer maxContains = null; + public JsonSchemaInfo maxContains(Integer maxContains) { + this.maxContains = maxContains; + return this; + } + public @Nullable Integer minContains = null; + public JsonSchemaInfo minContains(Integer minContains) { + this.minContains = minContains; + return this; + } + public @Nullable Class> propertyNames = null; + public JsonSchemaInfo propertyNames(Class> propertyNames) { + this.propertyNames = propertyNames; + return this; + } + public @Nullable Map> dependentRequired = null; + public JsonSchemaInfo dependentRequired(Map> dependentRequired) { + this.dependentRequired = dependentRequired; + return this; + } + public @Nullable Map>> dependentSchemas = null; + public JsonSchemaInfo dependentSchemas(Map>> dependentSchemas) { + this.dependentSchemas = dependentSchemas; + return this; + } + public @Nullable Map>> patternProperties = null; + public JsonSchemaInfo patternProperties(Map>> patternProperties) { + this.patternProperties = patternProperties; + return this; + } + public @Nullable List>> prefixItems = null; + public JsonSchemaInfo prefixItems(List>> prefixItems) { + this.prefixItems = prefixItems; + return this; + } + public @Nullable Class> ifSchema = null; + public JsonSchemaInfo ifSchema(Class> ifSchema) { + this.ifSchema = ifSchema; + return this; + } + public @Nullable Class> then = null; + public JsonSchemaInfo then(Class> then) { + this.then = then; + return this; + } + public @Nullable Class> elseSchema = null; + public JsonSchemaInfo elseSchema(Class> elseSchema) { + this.elseSchema = elseSchema; + return this; + } + public @Nullable Class> unevaluatedItems = null; + public JsonSchemaInfo unevaluatedItems(Class> unevaluatedItems) { + this.unevaluatedItems = unevaluatedItems; + return this; + } + public @Nullable Class> unevaluatedProperties = null; + public JsonSchemaInfo unevaluatedProperties(Class> unevaluatedProperties) { + this.unevaluatedProperties = unevaluatedProperties; + return this; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java new file mode 100644 index 00000000000..5a9ad21c98c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java @@ -0,0 +1,10 @@ +package unit_test_api.schemas.validation; + +import java.util.AbstractMap; + +@SuppressWarnings("serial") +public class KeywordEntry extends AbstractMap.SimpleEntry { + public KeywordEntry(String key, KeywordValidator value) { + super(key, value); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java new file mode 100644 index 00000000000..10056432754 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java @@ -0,0 +1,11 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +@FunctionalInterface +public interface KeywordValidator { + @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java new file mode 100644 index 00000000000..716c29b0c53 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java @@ -0,0 +1,16 @@ +package unit_test_api.schemas.validation; + +import java.text.BreakIterator; + +public abstract class LengthValidator { + protected int getLength(String text) { + int graphemeCount = 0; + BreakIterator graphemeCounter = BreakIterator + .getCharacterInstance(); + graphemeCounter.setText(text); + while (graphemeCounter.next() != BreakIterator.DONE) { + graphemeCount++; + } + return graphemeCount; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java new file mode 100644 index 00000000000..5733d62f367 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java @@ -0,0 +1,12 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; + +public interface ListSchemaValidator { + OutType getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) throws ValidationException; + OutType validate(List arg, SchemaConfiguration configuration) throws ValidationException; + BoxedType validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java new file mode 100644 index 00000000000..8386d7c53e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface LongEnumValidator { + long validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java new file mode 100644 index 00000000000..4477e841978 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface LongValueMethod { + long value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java new file mode 100644 index 00000000000..d3e45307491 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java @@ -0,0 +1,13 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; +import java.util.Map; + +public interface MapSchemaValidator { + OutType getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) throws ValidationException; + OutType validate(Map arg, SchemaConfiguration configuration) throws ValidationException; + BoxedType validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java new file mode 100644 index 00000000000..3cf4093048c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java @@ -0,0 +1,37 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.InvalidAdditionalPropertyException; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +public class MapUtils { + /** + * A builder for maps that allows in null values + * Schema tests + doc code samples need it + * @param entries items to add + * @return the output map + * @param key type + * @param value type + */ + @SafeVarargs + @SuppressWarnings("varargs") + public static Map makeMap(Map.Entry... entries) { + Map map = new HashMap<>(); + for (Map.Entry entry : entries) { + map.put(entry.getKey(), entry.getValue()); + } + return map; + } + + public static void throwIfKeyKnown(String key, Set knownKeys, boolean setting) throws InvalidAdditionalPropertyException { + if (knownKeys.contains(key)) { + String verb = "getting"; + if (setting) { + verb = "setting"; + } + throw new InvalidAdditionalPropertyException ("The known key " + key + " may not be passed in when "+verb+" an additional property"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java new file mode 100644 index 00000000000..e70e60fc2cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java @@ -0,0 +1,32 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; + +public class MaxContainsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var maxContains = data.schema().maxContains; + if (maxContains == null) { + return null; + } + if (!(data.arg() instanceof List)) { + return null; + } + var containsPathToSchemas = data.containsPathToSchemas(); + if (containsPathToSchemas == null) { + return null; + } + if (containsPathToSchemas.size() > maxContains) { + throw new ValidationException( + "Validation failed for maxContains keyword in class="+data.schema().getClass()+ + " at pathToItem="+data.validationMetadata().pathToItem()+". Too many items validated to the contains schema." + ); + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java new file mode 100644 index 00000000000..30177372927 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java @@ -0,0 +1,25 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.List; + +public class MaxItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var maxItems = data.schema().maxItems; + if (maxItems == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (listArg.size() > maxItems) { + throw new ValidationException("Value " + listArg + " is invalid because has > the maxItems of " + maxItems); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java new file mode 100644 index 00000000000..a7c2342bb95 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java @@ -0,0 +1,24 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class MaxLengthValidator extends LengthValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var maxLength = data.schema().maxLength; + if (maxLength == null) { + return null; + } + if (!(data.arg() instanceof String stringArg)) { + return null; + } + int length = getLength(stringArg); + if (length > maxLength) { + throw new ValidationException("Value " + stringArg + " is invalid because has > the maxLength of " + maxLength); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java new file mode 100644 index 00000000000..8a8437dc1ae --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java @@ -0,0 +1,25 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Map; + +public class MaxPropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var maxProperties = data.schema().maxProperties; + if (maxProperties == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + if (mapArg.size() > maxProperties) { + throw new ValidationException("Value " + mapArg + " is invalid because has > the maxProperties of " + maxProperties); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java new file mode 100644 index 00000000000..3a3e6edc57b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class MaximumValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var maximum = data.schema().maximum; + if (maximum == null) { + return null; + } + if (!(data.arg() instanceof Number)) { + return null; + } + String msg = "Value " + data.arg() + " is invalid because it is > the maximum of " + maximum; + if (data.arg() instanceof Integer intArg) { + if (intArg.compareTo(maximum.intValue()) > 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Long longArg) { + if (longArg.compareTo(maximum.longValue()) > 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Float floatArg) { + if (floatArg.compareTo(maximum.floatValue()) > 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Double doubleArg) { + if (doubleArg.compareTo(maximum.doubleValue()) > 0) { + throw new ValidationException(msg); + } + return null; + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java new file mode 100644 index 00000000000..71b42fcf9f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java @@ -0,0 +1,31 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; + +public class MinContainsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var minContains = data.schema().minContains; + if (minContains == null) { + return null; + } + if (!(data.arg() instanceof List)) { + return null; + } + if (data.containsPathToSchemas() == null) { + return null; + } + if (data.containsPathToSchemas().size() < minContains) { + throw new ValidationException( + "Validation failed for minContains keyword in class="+data.schema().getClass()+ + " at pathToItem="+data.validationMetadata().pathToItem()+". Too few items validated to the contains schema." + ); + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java new file mode 100644 index 00000000000..14356ed593e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java @@ -0,0 +1,25 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.List; + +public class MinItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var minItems = data.schema().minItems; + if (minItems == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (listArg.size() < minItems) { + throw new ValidationException("Value " + listArg + " is invalid because has < the minItems of " + minItems); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java new file mode 100644 index 00000000000..acdf1d7bdb5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java @@ -0,0 +1,24 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class MinLengthValidator extends LengthValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var minLength = data.schema().minLength; + if (minLength == null) { + return null; + } + if (!(data.arg() instanceof String stringArg)) { + return null; + } + int length = getLength(stringArg); + if (length < minLength) { + throw new ValidationException("Value " + stringArg + " is invalid because has < the minLength of " + minLength); + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java new file mode 100644 index 00000000000..91654ce944a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java @@ -0,0 +1,25 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Map; + +public class MinPropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var minProperties = data.schema().minProperties; + if (minProperties == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + if (mapArg.size() < minProperties) { + throw new ValidationException("Value " + mapArg + " is invalid because has < the minProperties of " + minProperties); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java new file mode 100644 index 00000000000..6ad8648d81b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class MinimumValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var minimum = data.schema().minimum; + if (minimum == null) { + return null; + } + if (!(data.arg() instanceof Number)) { + return null; + } + String msg = "Value " + data.arg() + " is invalid because it is < the minimum of " + minimum; + if (data.arg() instanceof Integer intArg) { + if (intArg.compareTo(minimum.intValue()) < 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Long longArg) { + if (longArg.compareTo(minimum.longValue()) < 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Float floatArg) { + if (floatArg.compareTo(minimum.floatValue()) < 0) { + throw new ValidationException(msg); + } + return null; + } + if (data.arg() instanceof Double doubleArg) { + if (doubleArg.compareTo(minimum.doubleValue()) < 0) { + throw new ValidationException(msg); + } + return null; + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java new file mode 100644 index 00000000000..ed774f1b16a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java @@ -0,0 +1,27 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.math.BigDecimal; + +public class MultipleOfValidator extends BigDecimalValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var multipleOf = data.schema().multipleOf; + if (multipleOf == null) { + return null; + } + if (!(data.arg() instanceof Number numberArg)) { + return null; + } + BigDecimal castArg = getBigDecimal(numberArg); + String msg = "Value " + numberArg + " is invalid because it is not a multiple of " + multipleOf; + if (castArg.remainder(multipleOf).compareTo(BigDecimal.ZERO) != 0) { + throw new ValidationException(msg); + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java new file mode 100644 index 00000000000..d017751266a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java @@ -0,0 +1,30 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class NotValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var not = data.schema().not; + if (not == null) { + return null; + } + PathToSchemasMap pathToSchemas; + try { + JsonSchema notSchema = JsonSchemaFactory.getInstance(not); + pathToSchemas = JsonSchema.validate(notSchema, data.arg(), data.validationMetadata()); + } catch (ValidationException e) { + return null; + } + if (!pathToSchemas.isEmpty()) { + throw new ValidationException( + "Invalid value "+data.arg()+" was passed in to "+data.schema().getClass()+". "+ + "Value is invalid because it is disallowed by not "+not + ); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java new file mode 100644 index 00000000000..df199382e1a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface NullEnumValidator { + Void validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java new file mode 100644 index 00000000000..95f71f458a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java @@ -0,0 +1,9 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface NullSchemaValidator { + Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException; + T validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java new file mode 100644 index 00000000000..c119daf92e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface NullValueMethod { + Void value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java new file mode 100644 index 00000000000..ed0ce467283 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java @@ -0,0 +1,9 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface NumberSchemaValidator { + Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException; + T validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java new file mode 100644 index 00000000000..b628cd87811 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java @@ -0,0 +1,50 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class OneOfValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var oneOf = data.schema().oneOf; + if (oneOf == null) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + List>> validatedOneOfClasses = new ArrayList<>(); + for(Class> oneOfClass: oneOf) { + if (oneOfClass == data.schema().getClass()) { + /* + optimistically assume that schema will pass validation + do not invoke validate on it because that is recursive + */ + validatedOneOfClasses.add(oneOfClass); + continue; + } + try { + JsonSchema oneOfSchema = JsonSchemaFactory.getInstance(oneOfClass); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(oneOfSchema, data.arg(), data.validationMetadata()); + validatedOneOfClasses.add(oneOfClass); + pathToSchemas.update(otherPathToSchemas); + } catch (ValidationException e) { + // silence exceptions because the code needs to accumulate validatedOneOfClasses + } + } + if (validatedOneOfClasses.isEmpty()) { + throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". None "+ + "of the oneOf schemas matched the input data." + ); + } + if (validatedOneOfClasses.size() > 1) { + throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". Multiple "+ + "oneOf schemas validated the data, but a max of one is allowed." + ); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java new file mode 100644 index 00000000000..d0a3180f033 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java @@ -0,0 +1,21 @@ +package unit_test_api.schemas.validation; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@SuppressWarnings("serial") +public class PathToSchemasMap extends LinkedHashMap, LinkedHashMap, Void>> { + + public void update(PathToSchemasMap other) { + for (Map.Entry, LinkedHashMap, Void>> entry: other.entrySet()) { + List pathToItem = entry.getKey(); + LinkedHashMap, Void> otherSchemas = entry.getValue(); + if (containsKey(pathToItem)) { + get(pathToItem).putAll(otherSchemas); + } else { + put(pathToItem, otherSchemas); + } + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java new file mode 100644 index 00000000000..bcb642e8b14 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java @@ -0,0 +1,21 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Map; + +public class PatternPropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) { + var patternProperties = data.schema().patternProperties; + if (patternProperties == null) { + return null; + } + if (!(data.arg() instanceof Map)) { + return null; + } + return data.patternPropertiesPathToSchemas(); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java new file mode 100644 index 00000000000..465685066f0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java @@ -0,0 +1,23 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +public class PatternValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var pattern = data.schema().pattern; + if (pattern == null) { + return null; + } + if (!(data.arg() instanceof String stringArg)) { + return null; + } + if (!pattern.matcher(stringArg).find()) { + throw new ValidationException("Invalid value "+stringArg+" did not find a match for pattern "+pattern); + } + return null; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java new file mode 100644 index 00000000000..6e51519d7e2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java @@ -0,0 +1,41 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.List; + +public class PrefixItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var prefixItems = data.schema().prefixItems; + if (prefixItems == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (listArg.isEmpty()) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + int maxIndex = Math.min(listArg.size(), prefixItems.size()); + for (int i=0; i < maxIndex; i++) { + List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + itemPathToItem.add(i); + ValidationMetadata itemValidationMetadata = new ValidationMetadata( + itemPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + JsonSchema itemsSchema = JsonSchemaFactory.getInstance(prefixItems.get(i)); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(itemsSchema, listArg.get(i), itemValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java new file mode 100644 index 00000000000..168afa9e9c7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java @@ -0,0 +1,56 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class PropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var properties = data.schema().properties; + if (properties == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + Set presentProperties = new LinkedHashSet<>(); + for (Object key: mapArg.keySet()) { + if (key instanceof String) { + presentProperties.add((String) key); + } + } + for(Map.Entry>> entry: properties.entrySet()) { + String propName = entry.getKey(); + if (!presentProperties.contains(propName)) { + continue; + } + @Nullable Object propValue = mapArg.get(propName); + List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + propPathToItem.add(propName); + ValidationMetadata propValidationMetadata = new ValidationMetadata( + propPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + Class> propClass = entry.getValue(); + JsonSchema propSchema = JsonSchemaFactory.getInstance(propClass); + if (propValidationMetadata.validationRanEarlier(propSchema)) { + // todo add_deeper_validated_schemas + continue; + } + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(propSchema, propValue, propValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java new file mode 100644 index 00000000000..8c5d9e85cbe --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java @@ -0,0 +1,10 @@ +package unit_test_api.schemas.validation; + +import java.util.AbstractMap; + +@SuppressWarnings("serial") +public class PropertyEntry extends AbstractMap.SimpleEntry>> { + public PropertyEntry(String key, Class> value) { + super(key, value); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java new file mode 100644 index 00000000000..bcb5b8c81e6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java @@ -0,0 +1,38 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class PropertyNamesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var propertyNames = data.schema().propertyNames; + if (propertyNames == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + JsonSchema propertyNamesSchema = JsonSchemaFactory.getInstance(propertyNames); + for (Object objKey: mapArg.keySet()) { + if (objKey instanceof String key) { + List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + propPathToItem.add(key); + ValidationMetadata keyValidationMetadata = new ValidationMetadata( + propPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + JsonSchema.validate(propertyNamesSchema, key, keyValidationMetadata); + } + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java new file mode 100644 index 00000000000..726df124d16 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java @@ -0,0 +1,41 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class RequiredValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var required = data.schema().required; + if (required == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + Set missingRequiredProperties = new HashSet<>(required); + for (Object key: mapArg.keySet()) { + if (key instanceof String) { + missingRequiredProperties.remove(key); + } + } + if (!missingRequiredProperties.isEmpty()) { + List missingReqProps = missingRequiredProperties.stream().sorted().toList(); + String pluralChar = ""; + if (missingRequiredProperties.size() > 1) { + pluralChar = "s"; + } + throw new ValidationException( + data.schema().getClass()+" is missing "+missingRequiredProperties.size()+" required argument"+pluralChar+": "+missingReqProps + ); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java new file mode 100644 index 00000000000..bacab7b872f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java @@ -0,0 +1,8 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface StringEnumValidator { + String validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java new file mode 100644 index 00000000000..1498b04e4e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java @@ -0,0 +1,9 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +public interface StringSchemaValidator { + String validate(String arg, SchemaConfiguration configuration) throws ValidationException; + T validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException; +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java new file mode 100644 index 00000000000..c22c975f078 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java @@ -0,0 +1,5 @@ +package unit_test_api.schemas.validation; + +public interface StringValueMethod { + String value(); +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java new file mode 100644 index 00000000000..b59611a6bdd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java @@ -0,0 +1,32 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +public class ThenValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var then = data.schema().then; + if (then == null) { + return null; + } + var ifPathToSchemas = data.ifPathToSchemas(); + if (ifPathToSchemas == null) { + // if unset + return null; + } + if (ifPathToSchemas.isEmpty()) { + // if validation is false + return null; + } + JsonSchema thenSchema = JsonSchemaFactory.getInstance(then); + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + var thenPathToSchemas = JsonSchema.validate(thenSchema, data.arg(), data.validationMetadata()); + // todo capture validation error and describe it as an then error? + pathToSchemas.update(ifPathToSchemas); + pathToSchemas.update(thenPathToSchemas); + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java new file mode 100644 index 00000000000..b4c6c2686a1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java @@ -0,0 +1,34 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.List; +import java.util.Map; + +public class TypeValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var type = data.schema().type; + if (type == null) { + return null; + } + Class argClass; + var arg = data.arg(); + if (arg == null) { + argClass = Void.class; + } else if (arg instanceof List) { + argClass = List.class; + } else if (arg instanceof Map) { + argClass = Map.class; + } else { + argClass = arg.getClass(); + } + if (!type.contains(argClass)) { + throw new ValidationException("invalid type"); + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java new file mode 100644 index 00000000000..d285388519c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java @@ -0,0 +1,52 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.List; + +public class UnevaluatedItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var unevaluatedItems = data.schema().unevaluatedItems; + if (unevaluatedItems == null) { + return null; + } + var knownPathToSchemas = data.knownPathToSchemas(); + if (knownPathToSchemas == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (listArg.isEmpty()) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + int minIndex = data.schema().prefixItems != null ? data.schema().prefixItems.size() : 0; + JsonSchema unevaluatedItemsSchema = JsonSchemaFactory.getInstance(unevaluatedItems); + for(int i = minIndex; i < listArg.size(); i++) { + List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + itemPathToItem.add(i); + if (knownPathToSchemas.containsKey(itemPathToItem)) { + continue; + } + ValidationMetadata itemValidationMetadata = new ValidationMetadata( + itemPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + if (itemValidationMetadata.validationRanEarlier(unevaluatedItemsSchema)) { + // todo add_deeper_validated_schemas + continue; + } + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(unevaluatedItemsSchema, listArg.get(i), itemValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java new file mode 100644 index 00000000000..3d5bcae9569 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java @@ -0,0 +1,49 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnevaluatedPropertiesValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var unevaluatedProperties = data.schema().unevaluatedProperties; + if (unevaluatedProperties == null) { + return null; + } + var knownPathToSchemas = data.knownPathToSchemas(); + if (knownPathToSchemas == null) { + return null; + } + if (!(data.arg() instanceof Map mapArg)) { + return null; + } + PathToSchemasMap pathToSchemas = new PathToSchemasMap(); + JsonSchema unevaluatedPropertiesSchema = JsonSchemaFactory.getInstance(unevaluatedProperties); + for(Map.Entry entry: mapArg.entrySet()) { + if (!(entry.getKey() instanceof String propName)) { + throw new ValidationException("Map keys must be strings"); + } + List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); + propPathToItem.add(propName); + if (knownPathToSchemas.containsKey(propPathToItem)) { + continue; + } + @Nullable Object propValue = mapArg.get(propName); + ValidationMetadata propValidationMetadata = new ValidationMetadata( + propPathToItem, + data.validationMetadata().configuration(), + data.validationMetadata().validatedPathToSchemas(), + data.validationMetadata().seenClasses() + ); + PathToSchemasMap otherPathToSchemas = JsonSchema.validate(unevaluatedPropertiesSchema, propValue, propValidationMetadata); + pathToSchemas.update(otherPathToSchemas); + } + return pathToSchemas; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java new file mode 100644 index 00000000000..4a3564200ca --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java @@ -0,0 +1,35 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.exceptions.ValidationException; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class UniqueItemsValidator implements KeywordValidator { + @Override + public @Nullable PathToSchemasMap validate( + ValidationData data + ) throws ValidationException { + var uniqueItems = data.schema().uniqueItems; + if (uniqueItems == null) { + return null; + } + if (!(data.arg() instanceof List listArg)) { + return null; + } + if (!uniqueItems) { + return null; + } + Set<@Nullable Object> seenItems = new HashSet<>(); + for (@Nullable Object item: listArg) { + int startingSeenItemsSize = seenItems.size(); + seenItems.add(item); + if (seenItems.size() == startingSeenItemsSize) { + throw new ValidationException("Invalid list value, list contains duplicate items when uniqueItems is true"); + } + } + return null; + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java new file mode 100644 index 00000000000..33208f7d7c5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java @@ -0,0 +1,302 @@ +package unit_test_api.schemas.validation; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.HashSet; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +public class UnsetAnyTypeJsonSchema { + public sealed interface UnsetAnyTypeJsonSchema1Boxed permits UnsetAnyTypeJsonSchema1BoxedVoid, UnsetAnyTypeJsonSchema1BoxedBoolean, UnsetAnyTypeJsonSchema1BoxedNumber, UnsetAnyTypeJsonSchema1BoxedString, UnsetAnyTypeJsonSchema1BoxedList, UnsetAnyTypeJsonSchema1BoxedMap { + @Nullable Object getData(); + } + public record UnsetAnyTypeJsonSchema1BoxedVoid(Void data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record UnsetAnyTypeJsonSchema1BoxedBoolean(boolean data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record UnsetAnyTypeJsonSchema1BoxedNumber(Number data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record UnsetAnyTypeJsonSchema1BoxedString(String data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record UnsetAnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public record UnsetAnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnsetAnyTypeJsonSchema1Boxed { + @Override + public @Nullable Object getData() { + return data; + } + } + public static class UnsetAnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnsetAnyTypeJsonSchema1BoxedList>, MapSchemaValidator, UnsetAnyTypeJsonSchema1BoxedMap> { + private static @Nullable UnsetAnyTypeJsonSchema1 instance = null; + + protected UnsetAnyTypeJsonSchema1() { + super(new JsonSchemaInfo()); + } + + public static UnsetAnyTypeJsonSchema1 getInstance() { + if (instance == null) { + instance = new UnsetAnyTypeJsonSchema1(); + } + return instance; + } + + @Override + public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { + return (int) validate((Number) arg, configuration); + } + + public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { + return (long) validate((Number) arg, configuration); + } + + public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { + return (float) validate((Number) arg, configuration); + } + + public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { + return (double) validate((Number) arg, configuration); + } + + @Override + public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + String castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { + return validate(arg.toString(), configuration); + } + + @Override + public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List<@Nullable Object> items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + items.add(castItem); + i += 1; + } + return new FrozenList<>(items); + } + + public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0]"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg == null) { + return getNewInstance((Void) null, pathToItem, pathToSchemas); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return getNewInstance(boolArg, pathToItem, pathToSchemas); + } else if (arg instanceof Number) { + return getNewInstance((Number) arg, pathToItem, pathToSchemas); + } else if (arg instanceof String) { + return getNewInstance((String) arg, pathToItem, pathToSchemas); + } else if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } else if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + return validate((Void) null, configuration); + } else if (arg instanceof Boolean) { + boolean boolArg = (Boolean) arg; + return validate(boolArg, configuration); + } else if (arg instanceof Number) { + return validate((Number) arg, configuration); + } else if (arg instanceof String) { + return validate((String) arg, configuration); + } else if (arg instanceof List) { + return validate((List) arg, configuration); + } else if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedString(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedList(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UnsetAnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); + } + + @Override + public UnsetAnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg == null) { + Void castArg = (Void) arg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof Boolean booleanArg) { + boolean castArg = booleanArg; + return validateAndBox(castArg, configuration); + } else if (arg instanceof String castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Number castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof List castArg) { + return validateAndBox(castArg, configuration); + } else if (arg instanceof Map castArg) { + return validateAndBox(castArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java new file mode 100644 index 00000000000..9efd4f0373c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java @@ -0,0 +1,23 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.List; + +public record ValidationData( + JsonSchema schema, + @Nullable Object arg, + ValidationMetadata validationMetadata, + @Nullable List containsPathToSchemas, + @Nullable PathToSchemasMap patternPropertiesPathToSchemas, + @Nullable PathToSchemasMap ifPathToSchemas, + @Nullable PathToSchemasMap knownPathToSchemas +) { + public ValidationData( + JsonSchema schema, + @Nullable Object arg, + ValidationMetadata validationMetadata + ) { + this(schema, arg, validationMetadata, null, null, null, null); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java new file mode 100644 index 00000000000..98d270ed4bc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java @@ -0,0 +1,26 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import unit_test_api.configurations.SchemaConfiguration; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public record ValidationMetadata( + List pathToItem, + SchemaConfiguration configuration, + PathToSchemasMap validatedPathToSchemas, + Set> seenClasses +) { + + public boolean validationRanEarlier(JsonSchema schema) { + @Nullable Map, Void> validatedSchemas = validatedPathToSchemas.get(pathToItem); + if (validatedSchemas != null && validatedSchemas.containsKey(schema)) { + return true; + } + if (seenClasses.contains(schema)) { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java new file mode 100644 index 00000000000..063ed64de80 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java @@ -0,0 +1,9 @@ +package unit_test_api.servers; + +import unit_test_api.servers.ServerWithoutVariables; + +public class RootServer0 extends ServerWithoutVariables { + public RootServer0() { + super("https://someserver.com/v1"); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java new file mode 100644 index 00000000000..a3bd3e92c99 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java @@ -0,0 +1,6 @@ +package unit_test_api.servers; + +public interface Server { + String url(); +} + diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java new file mode 100644 index 00000000000..3e42c153a6d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java @@ -0,0 +1,6 @@ +package unit_test_api.servers; + +public interface ServerProvider { + Server getServer(T serverIndex); +} + diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java new file mode 100644 index 00000000000..c6c1ad29e1d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java @@ -0,0 +1,21 @@ +package unit_test_api.servers; + +import java.util.Map; + +public abstract class ServerWithVariables> implements Server { + public final String url; + public final T variables; + + protected ServerWithVariables(String url, T variables) { + this.variables = variables; + for (Map.Entry entry: variables.entrySet()) { + url = url.replace("{" + entry.getKey() + "}", entry.getValue()); + } + this.url = url; + } + + public String url(){ + return url; + } +} + diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java new file mode 100644 index 00000000000..431f2c70e9f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java @@ -0,0 +1,14 @@ +package unit_test_api.servers; + +public abstract class ServerWithoutVariables implements Server { + public final String url; + + protected ServerWithoutVariables(String url) { + this.url = url; + } + + public String url(){ + return url; + } +} + diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java new file mode 100644 index 00000000000..284488267bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java @@ -0,0 +1,115 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ASchemaGivenForPrefixitemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testCorrectTypesPasses() throws ValidationException { + // correct types + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + schema.validate( + new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() + .add(1) + + .add("foo") + + .build(), + configuration + ); + } + + @Test + public void testArrayWithAdditionalItemsPasses() throws ValidationException { + // array with additional items + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + schema.validate( + new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() + .add(1) + + .add("foo") + + .add(true) + + .build(), + configuration + ); + } + + @Test + public void testJavascriptPseudoArrayIsValidPasses() throws ValidationException { + // JavaScript pseudo-array is valid + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "0", + "invalid" + ), + new AbstractMap.SimpleEntry( + "1", + "valid" + ), + new AbstractMap.SimpleEntry( + "length", + 2 + ) + ), + configuration + ); + } + + @Test + public void testEmptyArrayPasses() throws ValidationException { + // empty array + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + schema.validate( + new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() + .build(), + configuration + ); + } + + @Test + public void testWrongTypesFails() { + // wrong types + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + try { + schema.validate( + Arrays.asList( + "foo", + 1 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIncompleteArrayOfItemsPasses() throws ValidationException { + // incomplete array of items + final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); + schema.validate( + new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() + .add(1) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java new file mode 100644 index 00000000000..6750fb0ea73 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java @@ -0,0 +1,35 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalItemsAreAllowedByDefaultTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOnlyTheFirstItemIsValidatedPasses() throws ValidationException { + // only the first item is validated + final var schema = AdditionalItemsAreAllowedByDefault.AdditionalItemsAreAllowedByDefault1.getInstance(); + schema.validate( + new AdditionalItemsAreAllowedByDefault.AdditionalItemsAreAllowedByDefaultListBuilder() + .add(1) + + .add("foo") + + .add(false) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java new file mode 100644 index 00000000000..1ca80dd4a8b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java @@ -0,0 +1,41 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalpropertiesAreAllowedByDefaultTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAdditionalPropertiesAreAllowedPasses() throws ValidationException { + // additional properties are allowed + final var schema = AdditionalpropertiesAreAllowedByDefault.AdditionalpropertiesAreAllowedByDefault1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "quux", + true + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java new file mode 100644 index 00000000000..b3f8c364660 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalpropertiesCanExistByItselfTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnAdditionalValidPropertyIsValidPasses() throws ValidationException { + // an additional valid property is valid + final var schema = AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + true + ) + ), + configuration + ); + } + + @Test + public void testAnAdditionalInvalidPropertyIsInvalidFails() { + // an additional invalid property is invalid + final var schema = AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java new file mode 100644 index 00000000000..3f265078383 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java @@ -0,0 +1,42 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalpropertiesDoesNotLookInApplicatorsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPropertiesDefinedInAllofAreNotExaminedFails() { + // properties defined in allOf are not examined + final var schema = AdditionalpropertiesDoesNotLookInApplicators.AdditionalpropertiesDoesNotLookInApplicators1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + true + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java new file mode 100644 index 00000000000..20c6b20f13a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java @@ -0,0 +1,33 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalpropertiesWithNullValuedInstancePropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullValuesPasses() throws ValidationException { + // allows null values + final var schema = AdditionalpropertiesWithNullValuedInstanceProperties.AdditionalpropertiesWithNullValuedInstanceProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + null + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java new file mode 100644 index 00000000000..faa04d2d50e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java @@ -0,0 +1,84 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AdditionalpropertiesWithSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNoAdditionalPropertiesIsValidPasses() throws ValidationException { + // no additional properties is valid + final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testAnAdditionalValidPropertyIsValidPasses() throws ValidationException { + // an additional valid property is valid + final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "quux", + true + ) + ), + configuration + ); + } + + @Test + public void testAnAdditionalInvalidPropertyIsInvalidFails() { + // an additional invalid property is invalid + final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "quux", + 12 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java new file mode 100644 index 00000000000..37a7b07fdcf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java @@ -0,0 +1,133 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofCombinedWithAnyofOneofTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllofFalseAnyofFalseOneofTrueFails() { + // allOf: false, anyOf: false, oneOf: true + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 5, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofFalseAnyofTrueOneofFalseFails() { + // allOf: false, anyOf: true, oneOf: false + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofFalseAnyofTrueOneofTrueFails() { + // allOf: false, anyOf: true, oneOf: true + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 15, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofTrueAnyofFalseOneofFalseFails() { + // allOf: true, anyOf: false, oneOf: false + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 2, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofTrueAnyofTrueOneofTruePasses() throws ValidationException { + // allOf: true, anyOf: true, oneOf: true + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + schema.validate( + 30, + configuration + ); + } + + @Test + public void testAllofFalseAnyofFalseOneofFalseFails() { + // allOf: false, anyOf: false, oneOf: false + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofTrueAnyofFalseOneofTrueFails() { + // allOf: true, anyOf: false, oneOf: true + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 10, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofTrueAnyofTrueOneofFalseFails() { + // allOf: true, anyOf: true, oneOf: false + final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); + try { + schema.validate( + 6, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java new file mode 100644 index 00000000000..2efe38bccbb --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofSimpleTypesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMismatchOneFails() { + // mismatch one + final var schema = AllofSimpleTypes.AllofSimpleTypes1.getInstance(); + try { + schema.validate( + 35, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidPasses() throws ValidationException { + // valid + final var schema = AllofSimpleTypes.AllofSimpleTypes1.getInstance(); + schema.validate( + 25, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java new file mode 100644 index 00000000000..1c2adfcf3d3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java @@ -0,0 +1,101 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMismatchSecondFails() { + // mismatch second + final var schema = Allof.Allof1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testWrongTypeFails() { + // wrong type + final var schema = Allof.Allof1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ), + new AbstractMap.SimpleEntry( + "bar", + "quux" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMismatchFirstFails() { + // mismatch first + final var schema = Allof.Allof1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllofPasses() throws ValidationException { + // allOf + final var schema = Allof.Allof1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java new file mode 100644 index 00000000000..73a7742da36 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java @@ -0,0 +1,133 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofWithBaseSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMismatchBaseSchemaFails() { + // mismatch base schema + final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ), + new AbstractMap.SimpleEntry( + "baz", + null + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMismatchFirstAllofFails() { + // mismatch first allOf + final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "baz", + null + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidPasses() throws ValidationException { + // valid + final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "baz", + null + ) + ), + configuration + ); + } + + @Test + public void testMismatchBothFails() { + // mismatch both + final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMismatchSecondAllofFails() { + // mismatch second allOf + final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java new file mode 100644 index 00000000000..877f130f10c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java @@ -0,0 +1,28 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofWithOneEmptySchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnyDataIsValidPasses() throws ValidationException { + // any data is valid + final var schema = AllofWithOneEmptySchema.AllofWithOneEmptySchema1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java new file mode 100644 index 00000000000..73b94d2e4c2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofWithTheFirstEmptySchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testStringIsInvalidFails() { + // string is invalid + final var schema = AllofWithTheFirstEmptySchema.AllofWithTheFirstEmptySchema1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNumberIsValidPasses() throws ValidationException { + // number is valid + final var schema = AllofWithTheFirstEmptySchema.AllofWithTheFirstEmptySchema1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java new file mode 100644 index 00000000000..d033bafa948 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofWithTheLastEmptySchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testStringIsInvalidFails() { + // string is invalid + final var schema = AllofWithTheLastEmptySchema.AllofWithTheLastEmptySchema1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNumberIsValidPasses() throws ValidationException { + // number is valid + final var schema = AllofWithTheLastEmptySchema.AllofWithTheLastEmptySchema1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java new file mode 100644 index 00000000000..985a293c0de --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java @@ -0,0 +1,28 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AllofWithTwoEmptySchemasTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnyDataIsValidPasses() throws ValidationException { + // any data is valid + final var schema = AllofWithTwoEmptySchemas.AllofWithTwoEmptySchemas1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java new file mode 100644 index 00000000000..dfb86cfd747 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java @@ -0,0 +1,91 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AnyofComplexTypesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testSecondAnyofValidComplexPasses() throws ValidationException { + // second anyOf valid (complex) + final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ) + ), + configuration + ); + } + + @Test + public void testBothAnyofValidComplexPasses() throws ValidationException { + // both anyOf valid (complex) + final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testFirstAnyofValidComplexPasses() throws ValidationException { + // first anyOf valid (complex) + final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testNeitherAnyofValidComplexFails() { + // neither anyOf valid (complex) + final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 2 + ), + new AbstractMap.SimpleEntry( + "bar", + "quux" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java new file mode 100644 index 00000000000..297306c4fee --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java @@ -0,0 +1,63 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AnyofTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBothAnyofValidPasses() throws ValidationException { + // both anyOf valid + final var schema = Anyof.Anyof1.getInstance(); + schema.validate( + 3, + configuration + ); + } + + @Test + public void testNeitherAnyofValidFails() { + // neither anyOf valid + final var schema = Anyof.Anyof1.getInstance(); + try { + schema.validate( + 1.5d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFirstAnyofValidPasses() throws ValidationException { + // first anyOf valid + final var schema = Anyof.Anyof1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testSecondAnyofValidPasses() throws ValidationException { + // second anyOf valid + final var schema = Anyof.Anyof1.getInstance(); + schema.validate( + 2.5d, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java new file mode 100644 index 00000000000..3b59f10f89a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AnyofWithBaseSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMismatchBaseSchemaFails() { + // mismatch base schema + final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testOneAnyofValidPasses() throws ValidationException { + // one anyOf valid + final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } + + @Test + public void testBothAnyofInvalidFails() { + // both anyOf invalid + final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java new file mode 100644 index 00000000000..8f3047bded0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java @@ -0,0 +1,38 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class AnyofWithOneEmptySchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNumberIsValidPasses() throws ValidationException { + // number is valid + final var schema = AnyofWithOneEmptySchema.AnyofWithOneEmptySchema1.getInstance(); + schema.validate( + 123, + configuration + ); + } + + @Test + public void testStringIsValidPasses() throws ValidationException { + // string is valid + final var schema = AnyofWithOneEmptySchema.AnyofWithOneEmptySchema1.getInstance(); + schema.validate( + "foo", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java new file mode 100644 index 00000000000..daffbe914bd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java @@ -0,0 +1,120 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ArrayTypeMatchesArraysTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testABooleanIsNotAnArrayFails() { + // a boolean is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatIsNotAnArrayFails() { + // a float is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnArrayIsAnArrayPasses() throws ValidationException { + // an array is an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testNullIsNotAnArrayFails() { + // null is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsNotAnArrayFails() { + // a string is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsNotAnArrayFails() { + // an integer is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnObjectIsNotAnArrayFails() { + // an object is not an array + final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java new file mode 100644 index 00000000000..3df1dedc7a2 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java @@ -0,0 +1,160 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class BooleanTypeMatchesBooleansTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAFloatIsNotABooleanFails() { + // a float is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsNotABooleanFails() { + // a string is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFalseIsABooleanPasses() throws ValidationException { + // false is a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + schema.validate( + false, + configuration + ); + } + + @Test + public void testTrueIsABooleanPasses() throws ValidationException { + // true is a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + schema.validate( + true, + configuration + ); + } + + @Test + public void testAnObjectIsNotABooleanFails() { + // an object is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnArrayIsNotABooleanFails() { + // an array is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsNotABooleanFails() { + // null is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsNotABooleanFails() { + // an integer is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testZeroIsNotABooleanFails() { + // zero is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + 0, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnEmptyStringIsNotABooleanFails() { + // an empty string is not a boolean + final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); + try { + schema.validate( + "", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java new file mode 100644 index 00000000000..7d8e5c050c1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ByIntTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testIntByIntFailFails() { + // int by int fail + final var schema = ByInt.ByInt1.getInstance(); + try { + schema.validate( + 7, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIntByIntPasses() throws ValidationException { + // int by int + final var schema = ByInt.ByInt1.getInstance(); + schema.validate( + 10, + configuration + ); + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = ByInt.ByInt1.getInstance(); + schema.validate( + "foo", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java new file mode 100644 index 00000000000..57acee70500 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ByNumberTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void test35IsNotMultipleOf15Fails() { + // 35 is not multiple of 1.5 + final var schema = ByNumber.ByNumber1.getInstance(); + try { + schema.validate( + 35, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void test45IsMultipleOf15Passes() throws ValidationException { + // 4.5 is multiple of 1.5 + final var schema = ByNumber.ByNumber1.getInstance(); + schema.validate( + 4.5d, + configuration + ); + } + + @Test + public void testZeroIsMultipleOfAnythingPasses() throws ValidationException { + // zero is multiple of anything + final var schema = ByNumber.ByNumber1.getInstance(); + schema.validate( + 0, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java new file mode 100644 index 00000000000..36b5c58ddf9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class BySmallNumberTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void test000751IsNotMultipleOf00001Fails() { + // 0.00751 is not multiple of 0.0001 + final var schema = BySmallNumber.BySmallNumber1.getInstance(); + try { + schema.validate( + 0.00751d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void test00075IsMultipleOf00001Passes() throws ValidationException { + // 0.0075 is multiple of 0.0001 + final var schema = BySmallNumber.BySmallNumber1.getInstance(); + schema.validate( + 0.0075d, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java new file mode 100644 index 00000000000..70ef56e92e9 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ConstNulCharactersInStringsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMatchStringWithNulPasses() throws ValidationException { + // match string with nul + final var schema = ConstNulCharactersInStrings.ConstNulCharactersInStrings1.getInstance(); + schema.validate( + "hello\0there", + configuration + ); + } + + @Test + public void testDoNotMatchStringLackingNulFails() { + // do not match string lacking nul + final var schema = ConstNulCharactersInStrings.ConstNulCharactersInStrings1.getInstance(); + try { + schema.validate( + "hellothere", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java new file mode 100644 index 00000000000..acc3e61153d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java @@ -0,0 +1,107 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ContainsKeywordValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testArrayWithTwoItemsMatchingSchema56IsValidPasses() throws ValidationException { + // array with two items matching schema (5, 6) is valid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + schema.validate( + Arrays.asList( + 3, + 4, + 5, + 6 + ), + configuration + ); + } + + @Test + public void testNotArrayIsValidPasses() throws ValidationException { + // not array is valid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testArrayWithItemMatchingSchema5IsValidPasses() throws ValidationException { + // array with item matching schema (5) is valid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + schema.validate( + Arrays.asList( + 3, + 4, + 5 + ), + configuration + ); + } + + @Test + public void testArrayWithItemMatchingSchema6IsValidPasses() throws ValidationException { + // array with item matching schema (6) is valid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + schema.validate( + Arrays.asList( + 3, + 4, + 6 + ), + configuration + ); + } + + @Test + public void testArrayWithoutItemsMatchingSchemaIsInvalidFails() { + // array without items matching schema is invalid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + 2, + 3, + 4 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testEmptyArrayIsInvalidFails() { + // empty array is invalid + final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java new file mode 100644 index 00000000000..faaa8d9007e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java @@ -0,0 +1,30 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ContainsWithNullInstanceElementsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullItemsPasses() throws ValidationException { + // allows null items + final var schema = ContainsWithNullInstanceElements.ContainsWithNullInstanceElements1.getInstance(); + schema.validate( + Arrays.asList( + (Void) null + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java new file mode 100644 index 00000000000..4739c6aa31e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DateFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidDateStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid date string is only an annotation by default + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + "06/19/1963", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = DateFormat.DateFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java new file mode 100644 index 00000000000..0840d217dfe --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DateTimeFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testInvalidDateTimeStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid date-time string is only an annotation by default + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + "1990-02-31T15:59:60.123-08:00", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java new file mode 100644 index 00000000000..fa02edb7b36 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java @@ -0,0 +1,114 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DependentSchemasDependenciesWithEscapedCharactersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testQuotedQuoteInvalidUnderDependentSchemaFails() { + // quoted quote invalid under dependent schema + final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo'bar", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testQuotedTabInvalidUnderDependentSchemaFails() { + // quoted tab invalid under dependent schema + final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\tbar", + 1 + ), + new AbstractMap.SimpleEntry( + "a", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testQuotedTabPasses() throws ValidationException { + // quoted tab + final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\tbar", + 1 + ), + new AbstractMap.SimpleEntry( + "a", + 2 + ), + new AbstractMap.SimpleEntry( + "b", + 3 + ), + new AbstractMap.SimpleEntry( + "c", + 4 + ) + ), + configuration + ); + } + + @Test + public void testQuotedQuoteFails() { + // quoted quote + final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo'bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\"bar", + 1 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java new file mode 100644 index 00000000000..bdf3892da3f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java @@ -0,0 +1,92 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DependentSchemasDependentSubschemaIncompatibleWithRootTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMatchesRootFails() { + // matches root + final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMatchesDependencyPasses() throws ValidationException { + // matches dependency + final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 1 + ) + ), + configuration + ); + } + + @Test + public void testNoDependencyPasses() throws ValidationException { + // no dependency + final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + 1 + ) + ), + configuration + ); + } + + @Test + public void testMatchesBothFails() { + // matches both + final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java new file mode 100644 index 00000000000..45f4324fc8c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java @@ -0,0 +1,156 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DependentSchemasSingleDependencyTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testWrongTypeFails() { + // wrong type + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidPasses() throws ValidationException { + // valid + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testNoDependencyPasses() throws ValidationException { + // no dependency + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ) + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + schema.validate( + Arrays.asList( + "bar" + ), + configuration + ); + } + + @Test + public void testWrongTypeBothFails() { + // wrong type both + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "quux" + ), + new AbstractMap.SimpleEntry( + "bar", + "quux" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } + + @Test + public void testWrongTypeOtherFails() { + // wrong type other + final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 2 + ), + new AbstractMap.SimpleEntry( + "bar", + "quux" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java new file mode 100644 index 00000000000..cc8121dcb2d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class DurationFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidDurationStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid duration string is only an annotation by default + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + "PT1D", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = DurationFormat.DurationFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java new file mode 100644 index 00000000000..f3c32e469cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EmailFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidEmailStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid email string is only an annotation by default + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + "2962", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = EmailFormat.EmailFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java new file mode 100644 index 00000000000..c45e66c5684 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java @@ -0,0 +1,54 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EmptyDependentsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testEmptyObjectPasses() throws ValidationException { + // empty object + final var schema = EmptyDependents.EmptyDependents1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testNonObjectIsValidPasses() throws ValidationException { + // non-object is valid + final var schema = EmptyDependents.EmptyDependents1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testObjectWithOnePropertyPasses() throws ValidationException { + // object with one property + final var schema = EmptyDependents.EmptyDependents1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java new file mode 100644 index 00000000000..f9a055bd3e0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumWith0DoesNotMatchFalseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testFloatZeroIsValidPasses() throws ValidationException { + // float zero is valid + final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); + schema.validate( + 0.0d, + configuration + ); + } + + @Test + public void testFalseIsInvalidFails() { + // false is invalid + final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); + try { + schema.validate( + false, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIntegerZeroIsValidPasses() throws ValidationException { + // integer zero is valid + final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); + schema.validate( + 0, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java new file mode 100644 index 00000000000..15f9e439f00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumWith1DoesNotMatchTrueTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testTrueIsInvalidFails() { + // true is invalid + final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFloatOneIsValidPasses() throws ValidationException { + // float one is valid + final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); + schema.validate( + 1.0d, + configuration + ); + } + + @Test + public void testIntegerOneIsValidPasses() throws ValidationException { + // integer one is valid + final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java new file mode 100644 index 00000000000..09ae09b1dcd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumWithEscapedCharactersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnotherStringIsInvalidFails() { + // another string is invalid + final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); + try { + schema.validate( + "abc", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMember2IsValidPasses() throws ValidationException { + // member 2 is valid + final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); + schema.validate( + "foo\rbar", + configuration + ); + } + + @Test + public void testMember1IsValidPasses() throws ValidationException { + // member 1 is valid + final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); + schema.validate( + "foo\nbar", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java new file mode 100644 index 00000000000..b68e97a99f5 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumWithFalseDoesNotMatch0Test { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testFloatZeroIsInvalidFails() { + // float zero is invalid + final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); + try { + schema.validate( + 0.0d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFalseIsValidPasses() throws ValidationException { + // false is valid + final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); + schema.validate( + false, + configuration + ); + } + + @Test + public void testIntegerZeroIsInvalidFails() { + // integer zero is invalid + final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); + try { + schema.validate( + 0, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java new file mode 100644 index 00000000000..18f7cacd701 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumWithTrueDoesNotMatch1Test { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testFloatOneIsInvalidFails() { + // float one is invalid + final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); + try { + schema.validate( + 1.0d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIntegerOneIsInvalidFails() { + // integer one is invalid + final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testTrueIsValidPasses() throws ValidationException { + // true is valid + final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); + schema.validate( + true, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java new file mode 100644 index 00000000000..9d0940a0f9b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java @@ -0,0 +1,136 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class EnumsInPropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testWrongBarValueFails() { + // wrong bar value + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ), + new AbstractMap.SimpleEntry( + "bar", + "bart" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testWrongFooValueFails() { + // wrong foo value + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foot" + ), + new AbstractMap.SimpleEntry( + "bar", + "bar" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMissingAllPropertiesIsInvalidFails() { + // missing all properties is invalid + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testBothPropertiesAreValidPasses() throws ValidationException { + // both properties are valid + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ), + new AbstractMap.SimpleEntry( + "bar", + "bar" + ) + ), + configuration + ); + } + + @Test + public void testMissingOptionalPropertyIsValidPasses() throws ValidationException { + // missing optional property is valid + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + "bar" + ) + ), + configuration + ); + } + + @Test + public void testMissingRequiredPropertyIsInvalidFails() { + // missing required property is invalid + final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java new file mode 100644 index 00000000000..2a88965561f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java @@ -0,0 +1,68 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ExclusivemaximumValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBelowTheExclusivemaximumIsValidPasses() throws ValidationException { + // below the exclusiveMaximum is valid + final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); + schema.validate( + 2.2d, + configuration + ); + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); + schema.validate( + "x", + configuration + ); + } + + @Test + public void testAboveTheExclusivemaximumIsInvalidFails() { + // above the exclusiveMaximum is invalid + final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); + try { + schema.validate( + 3.5d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testBoundaryPointIsInvalidFails() { + // boundary point is invalid + final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); + try { + schema.validate( + 3.0d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java new file mode 100644 index 00000000000..f593db14032 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java @@ -0,0 +1,68 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ExclusiveminimumValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBelowTheExclusiveminimumIsInvalidFails() { + // below the exclusiveMinimum is invalid + final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); + try { + schema.validate( + 0.6d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAboveTheExclusiveminimumIsValidPasses() throws ValidationException { + // above the exclusiveMinimum is valid + final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); + schema.validate( + 1.2d, + configuration + ); + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); + schema.validate( + "x", + configuration + ); + } + + @Test + public void testBoundaryPointIsInvalidFails() { + // boundary point is invalid + final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java new file mode 100644 index 00000000000..314edb3f19e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java @@ -0,0 +1,33 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class FloatDivisionInfTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAlwaysInvalidButNaiveImplementationsMayRaiseAnOverflowErrorFails() { + // always invalid, but naive implementations may raise an overflow error + final var schema = FloatDivisionInf.FloatDivisionInf1.getInstance(); + try { + schema.validate( + 1.0E308d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java new file mode 100644 index 00000000000..7b8d4f21cb0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java @@ -0,0 +1,61 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ForbiddenPropertyTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPropertyPresentFails() { + // property present + final var schema = ForbiddenProperty.ForbiddenProperty1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testPropertyAbsentPasses() throws ValidationException { + // property absent + final var schema = ForbiddenProperty.ForbiddenProperty1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 1 + ), + new AbstractMap.SimpleEntry( + "baz", + 2 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java new file mode 100644 index 00000000000..bd857a59cfe --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class HostnameFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidHostnameStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid hostname string is only an annotation by default + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + "-a-host-name-that-starts-with--", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = HostnameFormat.HostnameFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java new file mode 100644 index 00000000000..7c63e49f704 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IdnEmailFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidIdnEmailStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid idn-email string is only an annotation by default + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + "2962", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java new file mode 100644 index 00000000000..246539a667a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IdnHostnameFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidIdnHostnameStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid idn-hostname string is only an annotation by default + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + "〮실례.테스트", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java new file mode 100644 index 00000000000..463ce7d7d7a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IfAndElseWithoutThenTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidWhenIfTestPassesPasses() throws ValidationException { + // valid when if test passes + final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); + schema.validate( + -1, + configuration + ); + } + + @Test + public void testValidThroughElsePasses() throws ValidationException { + // valid through else + final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); + schema.validate( + 4, + configuration + ); + } + + @Test + public void testInvalidThroughElseFails() { + // invalid through else + final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java new file mode 100644 index 00000000000..3865e1b9066 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IfAndThenWithoutElseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidThroughThenPasses() throws ValidationException { + // valid through then + final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); + schema.validate( + -1, + configuration + ); + } + + @Test + public void testInvalidThroughThenFails() { + // invalid through then + final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); + try { + schema.validate( + -100, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidWhenIfTestFailsPasses() throws ValidationException { + // valid when if test fails + final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); + schema.validate( + 3, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java new file mode 100644 index 00000000000..0c833303d13 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java @@ -0,0 +1,68 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testInvalidRedirectsToElseAndFailsFails() { + // invalid redirects to else and fails + final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); + try { + schema.validate( + "invalid", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testYesRedirectsToThenAndPassesPasses() throws ValidationException { + // yes redirects to then and passes + final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); + schema.validate( + "yes", + configuration + ); + } + + @Test + public void testOtherRedirectsToElseAndPassesPasses() throws ValidationException { + // other redirects to else and passes + final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); + schema.validate( + "other", + configuration + ); + } + + @Test + public void testNoRedirectsToThenAndFailsFails() { + // no redirects to then and fails + final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); + try { + schema.validate( + "no", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java new file mode 100644 index 00000000000..2e82402dc50 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java @@ -0,0 +1,38 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IgnoreElseWithoutIfTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidWhenInvalidAgainstLoneElsePasses() throws ValidationException { + // valid when invalid against lone else + final var schema = IgnoreElseWithoutIf.IgnoreElseWithoutIf1.getInstance(); + schema.validate( + "hello", + configuration + ); + } + + @Test + public void testValidWhenValidAgainstLoneElsePasses() throws ValidationException { + // valid when valid against lone else + final var schema = IgnoreElseWithoutIf.IgnoreElseWithoutIf1.getInstance(); + schema.validate( + 0, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java new file mode 100644 index 00000000000..2625cec629c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java @@ -0,0 +1,38 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IgnoreIfWithoutThenOrElseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidWhenInvalidAgainstLoneIfPasses() throws ValidationException { + // valid when invalid against lone if + final var schema = IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1.getInstance(); + schema.validate( + "hello", + configuration + ); + } + + @Test + public void testValidWhenValidAgainstLoneIfPasses() throws ValidationException { + // valid when valid against lone if + final var schema = IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1.getInstance(); + schema.validate( + 0, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java new file mode 100644 index 00000000000..4303dcbe30d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java @@ -0,0 +1,38 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IgnoreThenWithoutIfTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidWhenValidAgainstLoneThenPasses() throws ValidationException { + // valid when valid against lone then + final var schema = IgnoreThenWithoutIf.IgnoreThenWithoutIf1.getInstance(); + schema.validate( + 0, + configuration + ); + } + + @Test + public void testValidWhenInvalidAgainstLoneThenPasses() throws ValidationException { + // valid when invalid against lone then + final var schema = IgnoreThenWithoutIf.IgnoreThenWithoutIf1.getInstance(); + schema.validate( + "hello", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java new file mode 100644 index 00000000000..06c0aad43ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java @@ -0,0 +1,145 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IntegerTypeMatchesIntegersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnObjectIsNotAnIntegerFails() { + // an object is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnArrayIsNotAnIntegerFails() { + // an array is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsNotAnIntegerFails() { + // null is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatWithZeroFractionalPartIsAnIntegerPasses() throws ValidationException { + // a float with zero fractional part is an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + schema.validate( + 1.0d, + configuration + ); + } + + @Test + public void testABooleanIsNotAnIntegerFails() { + // a boolean is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsStillNotAnIntegerEvenIfItLooksLikeOneFails() { + // a string is still not an integer, even if it looks like one + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + "1", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsNotAnIntegerFails() { + // a string is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsAnIntegerPasses() throws ValidationException { + // an integer is an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testAFloatIsNotAnIntegerFails() { + // a float is not an integer + final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java new file mode 100644 index 00000000000..cd26ed36e5a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class Ipv4FormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidIpv4StringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid ipv4 string is only an annotation by default + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + "127.0.0.0.1", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = Ipv4Format.Ipv4Format1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java new file mode 100644 index 00000000000..3d7d73ca943 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class Ipv6FormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidIpv6StringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid ipv6 string is only an annotation by default + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + "12345::", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = Ipv6Format.Ipv6Format1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java new file mode 100644 index 00000000000..115a5e1186e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IriFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidIriStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid iri string is only an annotation by default + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = IriFormat.IriFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java new file mode 100644 index 00000000000..fa4317cf6fc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class IriReferenceFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidIriReferenceStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid iri-reference string is only an annotation by default + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + "\\\\WINDOWS\\filëßåré", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java new file mode 100644 index 00000000000..cbe64da59bc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java @@ -0,0 +1,89 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ItemsContainsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMatchesItemsDoesNotMatchContainsFails() { + // matches items, does not match contains + final var schema = ItemsContains.ItemsContains1.getInstance(); + try { + schema.validate( + Arrays.asList( + 2, + 4, + 8 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMatchesNeitherItemsNorContainsFails() { + // matches neither items nor contains + final var schema = ItemsContains.ItemsContains1.getInstance(); + try { + schema.validate( + Arrays.asList( + 1, + 5 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testDoesNotMatchItemsMatchesContainsFails() { + // does not match items, matches contains + final var schema = ItemsContains.ItemsContains1.getInstance(); + try { + schema.validate( + Arrays.asList( + 3, + 6, + 9 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMatchesBothItemsAndContainsPasses() throws ValidationException { + // matches both items and contains + final var schema = ItemsContains.ItemsContains1.getInstance(); + schema.validate( + new ItemsContains.ItemsContainsListBuilder() + .add(6) + + .add(12) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java new file mode 100644 index 00000000000..9ea14c90696 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java @@ -0,0 +1,51 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ItemsDoesNotLookInApplicatorsValidCaseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPrefixitemsInAllofDoesNotConstrainItemsValidCasePasses() throws ValidationException { + // prefixItems in allOf does not constrain items, valid case + final var schema = ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCase1.getInstance(); + schema.validate( + new ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCaseListBuilder() + .add(5) + + .add(5) + + .build(), + configuration + ); + } + + @Test + public void testPrefixitemsInAllofDoesNotConstrainItemsInvalidCaseFails() { + // prefixItems in allOf does not constrain items, invalid case + final var schema = ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCase1.getInstance(); + try { + schema.validate( + Arrays.asList( + 3, + 5 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java new file mode 100644 index 00000000000..c1bb5e83996 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java @@ -0,0 +1,31 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ItemsWithNullInstanceElementsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullElementsPasses() throws ValidationException { + // allows null elements + final var schema = ItemsWithNullInstanceElements.ItemsWithNullInstanceElements1.getInstance(); + schema.validate( + new ItemsWithNullInstanceElements.ItemsWithNullInstanceElementsListBuilder() + .add((Void) null) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java new file mode 100644 index 00000000000..8229841c57f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class JsonPointerFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testInvalidJsonPointerStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid json-pointer string is only an annotation by default + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + "/foo/bar~", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java new file mode 100644 index 00000000000..179ec3f4445 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaxcontainsWithoutContainsIsIgnoredTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testTwoItemsStillValidAgainstLoneMaxcontainsPasses() throws ValidationException { + // two items still valid against lone maxContains + final var schema = MaxcontainsWithoutContainsIsIgnored.MaxcontainsWithoutContainsIsIgnored1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2 + ), + configuration + ); + } + + @Test + public void testOneItemValidAgainstLoneMaxcontainsPasses() throws ValidationException { + // one item valid against lone maxContains + final var schema = MaxcontainsWithoutContainsIsIgnored.MaxcontainsWithoutContainsIsIgnored1.getInstance(); + schema.validate( + Arrays.asList( + 1 + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java new file mode 100644 index 00000000000..136888772af --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java @@ -0,0 +1,63 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaximumValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAboveTheMaximumIsInvalidFails() { + // above the maximum is invalid + final var schema = MaximumValidation.MaximumValidation1.getInstance(); + try { + schema.validate( + 3.5d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testBoundaryPointIsValidPasses() throws ValidationException { + // boundary point is valid + final var schema = MaximumValidation.MaximumValidation1.getInstance(); + schema.validate( + 3.0d, + configuration + ); + } + + @Test + public void testBelowTheMaximumIsValidPasses() throws ValidationException { + // below the maximum is valid + final var schema = MaximumValidation.MaximumValidation1.getInstance(); + schema.validate( + 2.6d, + configuration + ); + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = MaximumValidation.MaximumValidation1.getInstance(); + schema.validate( + "x", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java new file mode 100644 index 00000000000..a0422226455 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java @@ -0,0 +1,63 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaximumValidationWithUnsignedIntegerTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAboveTheMaximumIsInvalidFails() { + // above the maximum is invalid + final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); + try { + schema.validate( + 300.5d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testBelowTheMaximumIsInvalidPasses() throws ValidationException { + // below the maximum is invalid + final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); + schema.validate( + 299.97d, + configuration + ); + } + + @Test + public void testBoundaryPointIntegerIsValidPasses() throws ValidationException { + // boundary point integer is valid + final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); + schema.validate( + 300, + configuration + ); + } + + @Test + public void testBoundaryPointFloatIsValidPasses() throws ValidationException { + // boundary point float is valid + final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); + schema.validate( + 300.0d, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java new file mode 100644 index 00000000000..79a6696a813 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java @@ -0,0 +1,72 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaxitemsValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testShorterIsValidPasses() throws ValidationException { + // shorter is valid + final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1 + ), + configuration + ); + } + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2 + ), + configuration + ); + } + + @Test + public void testTooLongIsInvalidFails() { + // too long is invalid + final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + 1, + 2, + 3 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresNonArraysPasses() throws ValidationException { + // ignores non-arrays + final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java new file mode 100644 index 00000000000..ea48261ed95 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java @@ -0,0 +1,73 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaxlengthValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testShorterIsValidPasses() throws ValidationException { + // shorter is valid + final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); + schema.validate( + "f", + configuration + ); + } + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); + schema.validate( + "fo", + configuration + ); + } + + @Test + public void testTooLongIsInvalidFails() { + // too long is invalid + final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresNonStringsPasses() throws ValidationException { + // ignores non-strings + final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); + schema.validate( + 100, + configuration + ); + } + + @Test + public void testTwoSupplementaryUnicodeCodePointsIsLongEnoughPasses() throws ValidationException { + // two supplementary Unicode code points is long enough + final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); + schema.validate( + "💩💩", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java new file mode 100644 index 00000000000..5952d96354c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java @@ -0,0 +1,49 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class Maxproperties0MeansTheObjectIsEmptyTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOnePropertyIsInvalidFails() { + // one property is invalid + final var schema = Maxproperties0MeansTheObjectIsEmpty.Maxproperties0MeansTheObjectIsEmpty1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNoPropertiesIsValidPasses() throws ValidationException { + // no properties is valid + final var schema = Maxproperties0MeansTheObjectIsEmpty.Maxproperties0MeansTheObjectIsEmpty1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java new file mode 100644 index 00000000000..38a3c96ac35 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java @@ -0,0 +1,114 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MaxpropertiesValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testShorterIsValidPasses() throws ValidationException { + // shorter is valid + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testTooLongIsInvalidFails() { + // too long is invalid + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "baz", + 3 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2, + 3 + ), + configuration + ); + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java new file mode 100644 index 00000000000..c63e02df3c8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java @@ -0,0 +1,41 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MincontainsWithoutContainsIsIgnoredTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOneItemValidAgainstLoneMincontainsPasses() throws ValidationException { + // one item valid against lone minContains + final var schema = MincontainsWithoutContainsIsIgnored.MincontainsWithoutContainsIsIgnored1.getInstance(); + schema.validate( + Arrays.asList( + 1 + ), + configuration + ); + } + + @Test + public void testZeroItemsStillValidAgainstLoneMincontainsPasses() throws ValidationException { + // zero items still valid against lone minContains + final var schema = MincontainsWithoutContainsIsIgnored.MincontainsWithoutContainsIsIgnored1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java new file mode 100644 index 00000000000..24749bd1749 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java @@ -0,0 +1,63 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MinimumValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBoundaryPointIsValidPasses() throws ValidationException { + // boundary point is valid + final var schema = MinimumValidation.MinimumValidation1.getInstance(); + schema.validate( + 1.1d, + configuration + ); + } + + @Test + public void testBelowTheMinimumIsInvalidFails() { + // below the minimum is invalid + final var schema = MinimumValidation.MinimumValidation1.getInstance(); + try { + schema.validate( + 0.6d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = MinimumValidation.MinimumValidation1.getInstance(); + schema.validate( + "x", + configuration + ); + } + + @Test + public void testAboveTheMinimumIsValidPasses() throws ValidationException { + // above the minimum is valid + final var schema = MinimumValidation.MinimumValidation1.getInstance(); + schema.validate( + 2.6d, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java new file mode 100644 index 00000000000..c12065a89a3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java @@ -0,0 +1,98 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MinimumValidationWithSignedIntegerTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBoundaryPointWithFloatIsValidPasses() throws ValidationException { + // boundary point with float is valid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + schema.validate( + -2.0d, + configuration + ); + } + + @Test + public void testBoundaryPointIsValidPasses() throws ValidationException { + // boundary point is valid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + schema.validate( + -2, + configuration + ); + } + + @Test + public void testIntBelowTheMinimumIsInvalidFails() { + // int below the minimum is invalid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + try { + schema.validate( + -3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testPositiveAboveTheMinimumIsValidPasses() throws ValidationException { + // positive above the minimum is valid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + schema.validate( + 0, + configuration + ); + } + + @Test + public void testNegativeAboveTheMinimumIsValidPasses() throws ValidationException { + // negative above the minimum is valid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + schema.validate( + -1, + configuration + ); + } + + @Test + public void testIgnoresNonNumbersPasses() throws ValidationException { + // ignores non-numbers + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + schema.validate( + "x", + configuration + ); + } + + @Test + public void testFloatBelowTheMinimumIsInvalidFails() { + // float below the minimum is invalid + final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); + try { + schema.validate( + -2.0001d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java new file mode 100644 index 00000000000..feeffb264fe --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java @@ -0,0 +1,69 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MinitemsValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1 + ), + configuration + ); + } + + @Test + public void testIgnoresNonArraysPasses() throws ValidationException { + // ignores non-arrays + final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); + schema.validate( + "", + configuration + ); + } + + @Test + public void testLongerIsValidPasses() throws ValidationException { + // longer is valid + final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2 + ), + configuration + ); + } + + @Test + public void testTooShortIsInvalidFails() { + // too short is invalid + final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java new file mode 100644 index 00000000000..48d34362c9f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java @@ -0,0 +1,78 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MinlengthValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); + schema.validate( + "fo", + configuration + ); + } + + @Test + public void testLongerIsValidPasses() throws ValidationException { + // longer is valid + final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); + schema.validate( + "foo", + configuration + ); + } + + @Test + public void testIgnoresNonStringsPasses() throws ValidationException { + // ignores non-strings + final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testTooShortIsInvalidFails() { + // too short is invalid + final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); + try { + schema.validate( + "f", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testOneSupplementaryUnicodeCodePointIsNotLongEnoughFails() { + // one supplementary Unicode code point is not long enough + final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); + try { + schema.validate( + "💩", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java new file mode 100644 index 00000000000..8a96571263c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java @@ -0,0 +1,99 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MinpropertiesValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testExactLengthIsValidPasses() throws ValidationException { + // exact length is valid + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testLongerIsValidPasses() throws ValidationException { + // longer is valid + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testTooShortIsInvalidFails() { + // too short is invalid + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); + schema.validate( + "", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java new file mode 100644 index 00000000000..9fdaaf6373c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java @@ -0,0 +1,139 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MultipleDependentsRequiredTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNondependantsPasses() throws ValidationException { + // nondependants + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testMissingOtherDependencyFails() { + // missing other dependency + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 1 + ), + new AbstractMap.SimpleEntry( + "quux", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testWithDependenciesPasses() throws ValidationException { + // with dependencies + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "quux", + 3 + ) + ), + configuration + ); + } + + @Test + public void testMissingBothDependenciesFails() { + // missing both dependencies + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "quux", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMissingDependencyFails() { + // missing dependency + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "quux", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNeitherPasses() throws ValidationException { + // neither + final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java new file mode 100644 index 00000000000..359ad467a22 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java @@ -0,0 +1,131 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MultipleSimultaneousPatternpropertiesAreValidatedTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testASimultaneousMatchIsValidPasses() throws ValidationException { + // a simultaneous match is valid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "aaaa", + 18 + ) + ), + configuration + ); + } + + @Test + public void testASingleValidMatchIsValidPasses() throws ValidationException { + // a single valid match is valid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 21 + ) + ), + configuration + ); + } + + @Test + public void testAnInvalidDueToTheOtherIsInvalidFails() { + // an invalid due to the other is invalid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "aaaa", + 31 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMultipleMatchesIsValidPasses() throws ValidationException { + // multiple matches is valid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 21 + ), + new AbstractMap.SimpleEntry( + "aaaa", + 18 + ) + ), + configuration + ); + } + + @Test + public void testAnInvalidDueToOneIsInvalidFails() { + // an invalid due to one is invalid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + "bar" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnInvalidDueToBothIsInvalidFails() { + // an invalid due to both is invalid + final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "aaa", + "foo" + ), + new AbstractMap.SimpleEntry( + "aaaa", + 31 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java new file mode 100644 index 00000000000..fed9d95f30d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java @@ -0,0 +1,115 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class MultipleTypesCanBeSpecifiedInAnArrayTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNullIsInvalidFails() { + // null is invalid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsValidPasses() throws ValidationException { + // an integer is valid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testAnArrayIsInvalidFails() { + // an array is invalid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testABooleanIsInvalidFails() { + // a boolean is invalid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatIsInvalidFails() { + // a float is invalid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsValidPasses() throws ValidationException { + // a string is valid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + schema.validate( + "foo", + configuration + ); + } + + @Test + public void testAnObjectIsInvalidFails() { + // an object is invalid + final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java new file mode 100644 index 00000000000..87eb5700a2e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NestedAllofToCheckValidationSemanticsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNullIsValidPasses() throws ValidationException { + // null is valid + final var schema = NestedAllofToCheckValidationSemantics.NestedAllofToCheckValidationSemantics1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAnythingNonNullIsInvalidFails() { + // anything non-null is invalid + final var schema = NestedAllofToCheckValidationSemantics.NestedAllofToCheckValidationSemantics1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java new file mode 100644 index 00000000000..4c3c388465f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NestedAnyofToCheckValidationSemanticsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNullIsValidPasses() throws ValidationException { + // null is valid + final var schema = NestedAnyofToCheckValidationSemantics.NestedAnyofToCheckValidationSemantics1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAnythingNonNullIsInvalidFails() { + // anything non-null is invalid + final var schema = NestedAnyofToCheckValidationSemantics.NestedAnyofToCheckValidationSemantics1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java new file mode 100644 index 00000000000..a9fff49775c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java @@ -0,0 +1,143 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NestedItemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNestedArrayWithInvalidTypeFails() { + // nested array with invalid type + final var schema = NestedItems.NestedItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + Arrays.asList( + Arrays.asList( + Arrays.asList( + "1" + ) + ), + Arrays.asList( + Arrays.asList( + 2 + ), + Arrays.asList( + 3 + ) + ) + ), + Arrays.asList( + Arrays.asList( + Arrays.asList( + 4 + ), + Arrays.asList( + 5 + ), + Arrays.asList( + 6 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNotDeepEnoughFails() { + // not deep enough + final var schema = NestedItems.NestedItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + Arrays.asList( + Arrays.asList( + 1 + ), + Arrays.asList( + 2 + ), + Arrays.asList( + 3 + ) + ), + Arrays.asList( + Arrays.asList( + 4 + ), + Arrays.asList( + 5 + ), + Arrays.asList( + 6 + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidNestedArrayPasses() throws ValidationException { + // valid nested array + final var schema = NestedItems.NestedItems1.getInstance(); + schema.validate( + new NestedItems.NestedItemsListBuilder() + .add( + Arrays.asList( + Arrays.asList( + Arrays.asList( + 1 + ) + ), + Arrays.asList( + Arrays.asList( + 2 + ), + Arrays.asList( + 3 + ) + ) + ) + ) + .add( + Arrays.asList( + Arrays.asList( + Arrays.asList( + 4 + ), + Arrays.asList( + 5 + ), + Arrays.asList( + 6 + ) + ) + ) + ) + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java new file mode 100644 index 00000000000..47b72ed27d0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NestedOneofToCheckValidationSemanticsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNullIsValidPasses() throws ValidationException { + // null is valid + final var schema = NestedOneofToCheckValidationSemantics.NestedOneofToCheckValidationSemantics1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAnythingNonNullIsInvalidFails() { + // anything non-null is invalid + final var schema = NestedOneofToCheckValidationSemantics.NestedOneofToCheckValidationSemantics1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java new file mode 100644 index 00000000000..47ed2c7f9dc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NonAsciiPatternWithAdditionalpropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNotMatchingThePatternIsInvalidFails() { + // not matching the pattern is invalid + final var schema = NonAsciiPatternWithAdditionalproperties.NonAsciiPatternWithAdditionalproperties1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "élmény", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMatchingThePatternIsValidPasses() throws ValidationException { + // matching the pattern is valid + final var schema = NonAsciiPatternWithAdditionalproperties.NonAsciiPatternWithAdditionalproperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "ármányos", + 2 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java new file mode 100644 index 00000000000..840b6fee169 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java @@ -0,0 +1,38 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NonInterferenceAcrossCombinedSchemasTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidButWouldHaveBeenInvalidThroughElsePasses() throws ValidationException { + // valid, but would have been invalid through else + final var schema = NonInterferenceAcrossCombinedSchemas.NonInterferenceAcrossCombinedSchemas1.getInstance(); + schema.validate( + 3, + configuration + ); + } + + @Test + public void testValidButWouldHaveBeenInvalidThroughThenPasses() throws ValidationException { + // valid, but would have been invalid through then + final var schema = NonInterferenceAcrossCombinedSchemas.NonInterferenceAcrossCombinedSchemas1.getInstance(); + schema.validate( + -100, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java new file mode 100644 index 00000000000..20148bd0088 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java @@ -0,0 +1,63 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NotMoreComplexSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOtherMatchPasses() throws ValidationException { + // other match + final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testMismatchFails() { + // mismatch + final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMatchPasses() throws ValidationException { + // match + final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java new file mode 100644 index 00000000000..e04bd6c9128 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NotMultipleTypesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOtherMismatchFails() { + // other mismatch + final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidPasses() throws ValidationException { + // valid + final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); + schema.validate( + "foo", + configuration + ); + } + + @Test + public void testMismatchFails() { + // mismatch + final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java new file mode 100644 index 00000000000..9df4b9be0c1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NotTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testDisallowedFails() { + // disallowed + final var schema = Not.Not1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllowedPasses() throws ValidationException { + // allowed + final var schema = Not.Not1.getInstance(); + schema.validate( + "foo", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java new file mode 100644 index 00000000000..ee525a77792 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NulCharactersInStringsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMatchStringWithNulPasses() throws ValidationException { + // match string with nul + final var schema = NulCharactersInStrings.NulCharactersInStrings1.getInstance(); + schema.validate( + "hello\0there", + configuration + ); + } + + @Test + public void testDoNotMatchStringLackingNulFails() { + // do not match string lacking nul + final var schema = NulCharactersInStrings.NulCharactersInStrings1.getInstance(); + try { + schema.validate( + "hellothere", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java new file mode 100644 index 00000000000..529a7073b08 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java @@ -0,0 +1,165 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NullTypeMatchesOnlyTheNullObjectTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testZeroIsNotNullFails() { + // zero is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + 0, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnArrayIsNotNullFails() { + // an array is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnObjectIsNotNullFails() { + // an object is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testTrueIsNotNullFails() { + // true is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFalseIsNotNullFails() { + // false is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + false, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsNullPasses() throws ValidationException { + // null is null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAStringIsNotNullFails() { + // a string is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsNotNullFails() { + // an integer is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnEmptyStringIsNotNullFails() { + // an empty string is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + "", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatIsNotNullFails() { + // a float is not null + final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java new file mode 100644 index 00000000000..6af4cdfde77 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java @@ -0,0 +1,140 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class NumberTypeMatchesNumbersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAFloatIsANumberPasses() throws ValidationException { + // a float is a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + schema.validate( + 1.1d, + configuration + ); + } + + @Test + public void testAnIntegerIsANumberPasses() throws ValidationException { + // an integer is a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + schema.validate( + 1, + configuration + ); + } + + @Test + public void testAStringIsStillNotANumberEvenIfItLooksLikeOneFails() { + // a string is still not a number, even if it looks like one + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + "1", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testABooleanIsNotANumberFails() { + // a boolean is not a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatWithZeroFractionalPartIsANumberAndAnIntegerPasses() throws ValidationException { + // a float with zero fractional part is a number (and an integer) + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + schema.validate( + 1.0d, + configuration + ); + } + + @Test + public void testNullIsNotANumberFails() { + // null is not a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsNotANumberFails() { + // a string is not a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnArrayIsNotANumberFails() { + // an array is not a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnObjectIsNotANumberFails() { + // an object is not a number + final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java new file mode 100644 index 00000000000..68ad1cb30cf --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java @@ -0,0 +1,125 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ObjectPropertiesValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBothPropertiesPresentAndValidIsValidPasses() throws ValidationException { + // both properties present and valid is valid + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + "baz" + ) + ), + configuration + ); + } + + @Test + public void testDoesnTInvalidateOtherPropertiesPasses() throws ValidationException { + // doesn't invalidate other properties + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "quux", + Arrays.asList( + ) + ) + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testBothPropertiesInvalidIsInvalidFails() { + // both properties invalid is invalid + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + Arrays.asList( + ) + ), + new AbstractMap.SimpleEntry( + "bar", + MapUtils.makeMap( + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testOnePropertyInvalidIsInvalidFails() { + // one property invalid is invalid + final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + MapUtils.makeMap( + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java new file mode 100644 index 00000000000..9763f862418 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java @@ -0,0 +1,120 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ObjectTypeMatchesObjectsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnObjectIsAnObjectPasses() throws ValidationException { + // an object is an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAnArrayIsNotAnObjectFails() { + // an array is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnIntegerIsNotAnObjectFails() { + // an integer is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testABooleanIsNotAnObjectFails() { + // a boolean is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsNotAnObjectFails() { + // a string is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFloatIsNotAnObjectFails() { + // a float is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsNotAnObjectFails() { + // null is not an object + final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java new file mode 100644 index 00000000000..08a55997a69 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java @@ -0,0 +1,96 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class OneofComplexTypesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testSecondOneofValidComplexPasses() throws ValidationException { + // second oneOf valid (complex) + final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ) + ), + configuration + ); + } + + @Test + public void testBothOneofValidComplexFails() { + // both oneOf valid (complex) + final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFirstOneofValidComplexPasses() throws ValidationException { + // first oneOf valid (complex) + final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testNeitherOneofValidComplexFails() { + // neither oneOf valid (complex) + final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 2 + ), + new AbstractMap.SimpleEntry( + "bar", + "quux" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java new file mode 100644 index 00000000000..db9d16178db --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java @@ -0,0 +1,68 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class OneofTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testBothOneofValidFails() { + // both oneOf valid + final var schema = Oneof.Oneof1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNeitherOneofValidFails() { + // neither oneOf valid + final var schema = Oneof.Oneof1.getInstance(); + try { + schema.validate( + 1.5d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testSecondOneofValidPasses() throws ValidationException { + // second oneOf valid + final var schema = Oneof.Oneof1.getInstance(); + schema.validate( + 2.5d, + configuration + ); + } + + @Test + public void testFirstOneofValidPasses() throws ValidationException { + // first oneOf valid + final var schema = Oneof.Oneof1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java new file mode 100644 index 00000000000..427d9b358ae --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class OneofWithBaseSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMismatchBaseSchemaFails() { + // mismatch base schema + final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testOneOneofValidPasses() throws ValidationException { + // one oneOf valid + final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } + + @Test + public void testBothOneofValidFails() { + // both oneOf valid + final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java new file mode 100644 index 00000000000..1e59b6ff18c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class OneofWithEmptySchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testOneValidValidPasses() throws ValidationException { + // one valid - valid + final var schema = OneofWithEmptySchema.OneofWithEmptySchema1.getInstance(); + schema.validate( + "foo", + configuration + ); + } + + @Test + public void testBothValidInvalidFails() { + // both valid - invalid + final var schema = OneofWithEmptySchema.OneofWithEmptySchema1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java new file mode 100644 index 00000000000..16d3bb3d839 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java @@ -0,0 +1,104 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class OneofWithRequiredTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testFirstValidValidPasses() throws ValidationException { + // first valid - valid + final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testBothValidInvalidFails() { + // both valid - invalid + final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ), + new AbstractMap.SimpleEntry( + "baz", + 3 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testSecondValidValidPasses() throws ValidationException { + // second valid - valid + final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "baz", + 3 + ) + ), + configuration + ); + } + + @Test + public void testBothInvalidInvalidFails() { + // both invalid - invalid + final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java new file mode 100644 index 00000000000..00717755f61 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java @@ -0,0 +1,28 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PatternIsNotAnchoredTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMatchesASubstringPasses() throws ValidationException { + // matches a substring + final var schema = PatternIsNotAnchored.PatternIsNotAnchored1.getInstance(); + schema.validate( + "xxaayy", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java new file mode 100644 index 00000000000..b609897996f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java @@ -0,0 +1,105 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PatternValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testIgnoresBooleansPasses() throws ValidationException { + // ignores booleans + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + true, + configuration + ); + } + + @Test + public void testIgnoresFloatsPasses() throws ValidationException { + // ignores floats + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + 1.0d, + configuration + ); + } + + @Test + public void testANonMatchingPatternIsInvalidFails() { + // a non-matching pattern is invalid + final var schema = PatternValidation.PatternValidation1.getInstance(); + try { + schema.validate( + "abc", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresIntegersPasses() throws ValidationException { + // ignores integers + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + 123, + configuration + ); + } + + @Test + public void testAMatchingPatternIsValidPasses() throws ValidationException { + // a matching pattern is valid + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + "aaa", + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testIgnoresObjectsPasses() throws ValidationException { + // ignores objects + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testIgnoresNullPasses() throws ValidationException { + // ignores null + final var schema = PatternValidation.PatternValidation1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java new file mode 100644 index 00000000000..12eef3ae2ee --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java @@ -0,0 +1,132 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PatternpropertiesValidatesPropertiesMatchingARegexTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testMultipleInvalidMatchesIsInvalidFails() { + // multiple invalid matches is invalid + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ), + new AbstractMap.SimpleEntry( + "foooooo", + "baz" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testASingleValidMatchIsValidPasses() throws ValidationException { + // a single valid match is valid + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testASingleInvalidMatchIsInvalidFails() { + // a single invalid match is invalid + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ), + new AbstractMap.SimpleEntry( + "fooooo", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testMultipleValidMatchesIsValidPasses() throws ValidationException { + // multiple valid matches is valid + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "foooooo", + 2 + ) + ), + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + schema.validate( + Arrays.asList( + "foo" + ), + configuration + ); + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); + schema.validate( + "foo", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java new file mode 100644 index 00000000000..15e068fdd20 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java @@ -0,0 +1,33 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PatternpropertiesWithNullValuedInstancePropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullValuesPasses() throws ValidationException { + // allows null values + final var schema = PatternpropertiesWithNullValuedInstanceProperties.PatternpropertiesWithNullValuedInstanceProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foobar", + null + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java new file mode 100644 index 00000000000..0fb6804f928 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PrefixitemsValidationAdjustsTheStartingIndexForItemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidItemsPasses() throws ValidationException { + // valid items + final var schema = PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance(); + schema.validate( + new PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder() + .add("x") + + .add(2) + + .add(3) + + .build(), + configuration + ); + } + + @Test + public void testWrongTypeOfSecondItemFails() { + // wrong type of second item + final var schema = PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + "x", + "y" + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java new file mode 100644 index 00000000000..91fb02e0c7b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java @@ -0,0 +1,31 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PrefixitemsWithNullInstanceElementsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullElementsPasses() throws ValidationException { + // allows null elements + final var schema = PrefixitemsWithNullInstanceElements.PrefixitemsWithNullInstanceElements1.getInstance(); + schema.validate( + new PrefixitemsWithNullInstanceElements.PrefixitemsWithNullInstanceElementsListBuilder() + .add((Void) null) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java new file mode 100644 index 00000000000..4225f19de58 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java @@ -0,0 +1,172 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertiesPatternpropertiesAdditionalpropertiesInteractionTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPropertyValidatesPropertyPasses() throws ValidationException { + // property validates property + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + Arrays.asList( + 1, + 2 + ) + ) + ), + configuration + ); + } + + @Test + public void testAdditionalpropertyIgnoresPropertyPasses() throws ValidationException { + // additionalProperty ignores property + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + Arrays.asList( + ) + ) + ), + configuration + ); + } + + @Test + public void testPatternpropertyInvalidatesPropertyFails() { + // patternProperty invalidates property + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + Arrays.asList( + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testPatternpropertyValidatesNonpropertyPasses() throws ValidationException { + // patternProperty validates nonproperty + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "fxo", + Arrays.asList( + 1, + 2 + ) + ) + ), + configuration + ); + } + + @Test + public void testPatternpropertyInvalidatesNonpropertyFails() { + // patternProperty invalidates nonproperty + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "fxo", + Arrays.asList( + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testPropertyInvalidatesPropertyFails() { + // property invalidates property + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + Arrays.asList( + 1, + 2, + 3, + 4 + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAdditionalpropertyInvalidatesOthersFails() { + // additionalProperty invalidates others + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "quux", + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAdditionalpropertyValidatesOthersPasses() throws ValidationException { + // additionalProperty validates others + final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "quux", + 3 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java new file mode 100644 index 00000000000..4dd062ed195 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java @@ -0,0 +1,148 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testProtoNotValidFails() { + // __proto__ not valid + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "__proto__", + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNoneOfThePropertiesMentionedPasses() throws ValidationException { + // none of the properties mentioned + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllPresentAndValidPasses() throws ValidationException { + // all present and valid + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "__proto__", + 12 + ), + new AbstractMap.SimpleEntry( + "toString", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + "foo" + ) + ) + ), + new AbstractMap.SimpleEntry( + "constructor", + 37 + ) + ), + configuration + ); + } + + @Test + public void testConstructorNotValidFails() { + // constructor not valid + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "constructor", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + 37 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testTostringNotValidFails() { + // toString not valid + final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "toString", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + 37 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java new file mode 100644 index 00000000000..c0279809721 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java @@ -0,0 +1,93 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertiesWithEscapedCharactersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testObjectWithAllNumbersIsValidPasses() throws ValidationException { + // object with all numbers is valid + final var schema = PropertiesWithEscapedCharacters.PropertiesWithEscapedCharacters1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\nbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\"bar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\\bar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\rbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\tbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\fbar", + 1 + ) + ), + configuration + ); + } + + @Test + public void testObjectWithStringsIsInvalidFails() { + // object with strings is invalid + final var schema = PropertiesWithEscapedCharacters.PropertiesWithEscapedCharacters1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\nbar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\"bar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\\bar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\rbar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\tbar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\fbar", + "1" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java new file mode 100644 index 00000000000..8104644c9e4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java @@ -0,0 +1,33 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertiesWithNullValuedInstancePropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullValuesPasses() throws ValidationException { + // allows null values + final var schema = PropertiesWithNullValuedInstanceProperties.PropertiesWithNullValuedInstanceProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + null + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java new file mode 100644 index 00000000000..d86c328b696 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertyNamedRefThatIsNotAReferenceTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPropertyNamedRefValidPasses() throws ValidationException { + // property named $ref valid + final var schema = PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "$ref", + "a" + ) + ), + configuration + ); + } + + @Test + public void testPropertyNamedRefInvalidFails() { + // property named $ref invalid + final var schema = PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "$ref", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java new file mode 100644 index 00000000000..c2eaabe2bd3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java @@ -0,0 +1,111 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class PropertynamesValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testSomePropertyNamesInvalidFails() { + // some property names invalid + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + ) + ), + new AbstractMap.SimpleEntry>( + "foobar", + MapUtils.makeMap( + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllPropertyNamesValidPasses() throws ValidationException { + // all property names valid + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "f", + MapUtils.makeMap( + ) + ), + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + ) + ) + ), + configuration + ); + } + + @Test + public void testObjectWithoutPropertiesIsValidPasses() throws ValidationException { + // object without properties is valid + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2, + 3, + 4 + ), + configuration + ); + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java new file mode 100644 index 00000000000..6b9b07ae5b8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RegexFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testInvalidRegexStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid regex string is only an annotation by default + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + "^(abc]", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = RegexFormat.RegexFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java new file mode 100644 index 00000000000..30e27a3e43f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java @@ -0,0 +1,88 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testRegexesAreCaseSensitivePasses() throws ValidationException { + // regexes are case sensitive + final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a_x_3", + 3 + ) + ), + configuration + ); + } + + @Test + public void testNonRecognizedMembersAreIgnoredPasses() throws ValidationException { + // non recognized members are ignored + final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "answer 1", + "42" + ) + ), + configuration + ); + } + + @Test + public void testRecognizedMembersAreAccountedForFails() { + // recognized members are accounted for + final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a31b", + null + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testRegexesAreCaseSensitive2Fails() { + // regexes are case sensitive, 2 + final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a_X_3", + 3 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java new file mode 100644 index 00000000000..19489f3f87f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RelativeJsonPointerFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testInvalidRelativeJsonPointerStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid relative-json-pointer string is only an annotation by default + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + "/foo/bar", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java new file mode 100644 index 00000000000..2de57ddce3b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java @@ -0,0 +1,29 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RequiredDefaultValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNotRequiredByDefaultPasses() throws ValidationException { + // not required by default + final var schema = RequiredDefaultValidation.RequiredDefaultValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java new file mode 100644 index 00000000000..cb6d55bbc67 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java @@ -0,0 +1,153 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testTostringPresentFails() { + // toString present + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "toString", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + 37 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNoneOfThePropertiesMentionedFails() { + // none of the properties mentioned + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testConstructorPresentFails() { + // constructor present + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "constructor", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + 37 + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAllPresentPasses() throws ValidationException { + // all present + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "__proto__", + 12 + ), + new AbstractMap.SimpleEntry( + "toString", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "length", + "foo" + ) + ) + ), + new AbstractMap.SimpleEntry( + "constructor", + 37 + ) + ), + configuration + ); + } + + @Test + public void testProtoPresentFails() { + // __proto__ present + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "__proto__", + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java new file mode 100644 index 00000000000..57b9a69a1be --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java @@ -0,0 +1,84 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RequiredValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPresentRequiredPropertyIsValidPasses() throws ValidationException { + // present required property is valid + final var schema = RequiredValidation.RequiredValidation1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = RequiredValidation.RequiredValidation1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = RequiredValidation.RequiredValidation1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = RequiredValidation.RequiredValidation1.getInstance(); + schema.validate( + "", + configuration + ); + } + + @Test + public void testNonPresentRequiredPropertyIsInvalidFails() { + // non-present required property is invalid + final var schema = RequiredValidation.RequiredValidation1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 1 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java new file mode 100644 index 00000000000..2aacbb45c61 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java @@ -0,0 +1,29 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RequiredWithEmptyArrayTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testPropertyNotRequiredPasses() throws ValidationException { + // property not required + final var schema = RequiredWithEmptyArray.RequiredWithEmptyArray1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java new file mode 100644 index 00000000000..c9cab6a99a1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java @@ -0,0 +1,77 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class RequiredWithEscapedCharactersTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testObjectWithSomePropertiesMissingIsInvalidFails() { + // object with some properties missing is invalid + final var schema = RequiredWithEscapedCharacters.RequiredWithEscapedCharacters1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\nbar", + "1" + ), + new AbstractMap.SimpleEntry( + "foo\"bar", + "1" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testObjectWithAllPropertiesPresentIsValidPasses() throws ValidationException { + // object with all properties present is valid + final var schema = RequiredWithEscapedCharacters.RequiredWithEscapedCharacters1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo\nbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\"bar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\\bar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\rbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\tbar", + 1 + ), + new AbstractMap.SimpleEntry( + "foo\fbar", + 1 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java new file mode 100644 index 00000000000..899c2eff0ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class SimpleEnumValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testSomethingElseIsInvalidFails() { + // something else is invalid + final var schema = SimpleEnumValidation.SimpleEnumValidation1.getInstance(); + try { + schema.validate( + 4, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testOneOfTheEnumIsValidPasses() throws ValidationException { + // one of the enum is valid + final var schema = SimpleEnumValidation.SimpleEnumValidation1.getInstance(); + schema.validate( + 1, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java new file mode 100644 index 00000000000..25c6bb05a1e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java @@ -0,0 +1,115 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class SingleDependencyTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNondependantPasses() throws ValidationException { + // nondependant + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ) + ), + configuration + ); + } + + @Test + public void testWithDependencyPasses() throws ValidationException { + // with dependency + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 1 + ), + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + } + + @Test + public void testMissingDependencyFails() { + // missing dependency + final var schema = SingleDependency.SingleDependency1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + 2 + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testIgnoresOtherNonObjectsPasses() throws ValidationException { + // ignores other non-objects + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testIgnoresArraysPasses() throws ValidationException { + // ignores arrays + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + Arrays.asList( + "bar" + ), + configuration + ); + } + + @Test + public void testNeitherPasses() throws ValidationException { + // neither + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testIgnoresStringsPasses() throws ValidationException { + // ignores strings + final var schema = SingleDependency.SingleDependency1.getInstance(); + schema.validate( + "foobar", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java new file mode 100644 index 00000000000..c3fca3c15be --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java @@ -0,0 +1,28 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class SmallMultipleOfLargeIntegerTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAnyIntegerIsAMultipleOf1E8Passes() throws ValidationException { + // any integer is a multiple of 1e-8 + final var schema = SmallMultipleOfLargeInteger.SmallMultipleOfLargeInteger1.getInstance(); + schema.validate( + 12391239123L, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java new file mode 100644 index 00000000000..c20ee9688ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java @@ -0,0 +1,140 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class StringTypeMatchesStringsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAStringIsStillAStringEvenIfItLooksLikeANumberPasses() throws ValidationException { + // a string is still a string, even if it looks like a number + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + schema.validate( + "1", + configuration + ); + } + + @Test + public void test1IsNotAStringFails() { + // 1 is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + 1, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testABooleanIsNotAStringFails() { + // a boolean is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + true, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnEmptyStringIsStillAStringPasses() throws ValidationException { + // an empty string is still a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + schema.validate( + "", + configuration + ); + } + + @Test + public void testAnArrayIsNotAStringFails() { + // an array is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + Arrays.asList( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAnObjectIsNotAStringFails() { + // an object is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsNotAStringFails() { + // null is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAStringIsAStringPasses() throws ValidationException { + // a string is a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + schema.validate( + "foo", + configuration + ); + } + + @Test + public void testAFloatIsNotAStringFails() { + // a float is not a string + final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); + try { + schema.validate( + 1.1d, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java new file mode 100644 index 00000000000..4cfeea8b005 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class TimeFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidTimeStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid time string is only an annotation by default + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + "08:30:06 PST", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = TimeFormat.TimeFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java new file mode 100644 index 00000000000..5385d23f3f3 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java @@ -0,0 +1,87 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class TypeArrayObjectOrNullTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNumberIsInvalidFails() { + // number is invalid + final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsValidPasses() throws ValidationException { + // null is valid + final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testStringIsInvalidFails() { + // string is invalid + final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testArrayIsValidPasses() throws ValidationException { + // array is valid + final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2, + 3 + ), + configuration + ); + } + + @Test + public void testObjectIsValidPasses() throws ValidationException { + // object is valid + final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 123 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java new file mode 100644 index 00000000000..0b996a08c00 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java @@ -0,0 +1,92 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class TypeArrayOrObjectTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNumberIsInvalidFails() { + // number is invalid + final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testStringIsInvalidFails() { + // string is invalid + final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); + try { + schema.validate( + "foo", + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNullIsInvalidFails() { + // null is invalid + final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); + try { + schema.validate( + (Void) null, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testArrayIsValidPasses() throws ValidationException { + // array is valid + final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2, + 3 + ), + configuration + ); + } + + @Test + public void testObjectIsValidPasses() throws ValidationException { + // object is valid + final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + 123 + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java new file mode 100644 index 00000000000..10be79baf15 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java @@ -0,0 +1,43 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class TypeAsArrayWithOneItemTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNumberIsInvalidFails() { + // number is invalid + final var schema = TypeAsArrayWithOneItem.TypeAsArrayWithOneItem1.getInstance(); + try { + schema.validate( + 123, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testStringIsValidPasses() throws ValidationException { + // string is valid + final var schema = TypeAsArrayWithOneItem.TypeAsArrayWithOneItem1.getInstance(); + schema.validate( + "foo", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java new file mode 100644 index 00000000000..aa980b3cf2a --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java @@ -0,0 +1,58 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluateditemsAsSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testWithValidUnevaluatedItemsPasses() throws ValidationException { + // with valid unevaluated items + final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); + schema.validate( + Arrays.asList( + "foo" + ), + configuration + ); + } + + @Test + public void testWithInvalidUnevaluatedItemsFails() { + // with invalid unevaluated items + final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); + try { + schema.validate( + Arrays.asList( + 42 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testWithNoUnevaluatedItemsPasses() throws ValidationException { + // with no unevaluated items + final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java new file mode 100644 index 00000000000..75725f1095c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java @@ -0,0 +1,55 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluateditemsDependsOnMultipleNestedContainsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void test7NotEvaluatedFailsUnevaluateditemsFails() { + // 7 not evaluated, fails unevaluatedItems + final var schema = UnevaluateditemsDependsOnMultipleNestedContains.UnevaluateditemsDependsOnMultipleNestedContains1.getInstance(); + try { + schema.validate( + Arrays.asList( + 2, + 3, + 4, + 7, + 8 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void test5NotEvaluatedPassesUnevaluateditemsPasses() throws ValidationException { + // 5 not evaluated, passes unevaluatedItems + final var schema = UnevaluateditemsDependsOnMultipleNestedContains.UnevaluateditemsDependsOnMultipleNestedContains1.getInstance(); + schema.validate( + Arrays.asList( + 2, + 3, + 4, + 5, + 6 + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java new file mode 100644 index 00000000000..db3378ff893 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java @@ -0,0 +1,56 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluateditemsWithItemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testInvalidUnderItemsFails() { + // invalid under items + final var schema = UnevaluateditemsWithItems.UnevaluateditemsWithItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + "foo", + "bar", + "baz" + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidUnderItemsPasses() throws ValidationException { + // valid under items + final var schema = UnevaluateditemsWithItems.UnevaluateditemsWithItems1.getInstance(); + schema.validate( + new UnevaluateditemsWithItems.UnevaluateditemsWithItemsListBuilder() + .add(5) + + .add(6) + + .add(7) + + .add(8) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java new file mode 100644 index 00000000000..1a08c3235f7 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java @@ -0,0 +1,30 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluateditemsWithNullInstanceElementsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullElementsPasses() throws ValidationException { + // allows null elements + final var schema = UnevaluateditemsWithNullInstanceElements.UnevaluateditemsWithNullInstanceElements1.getInstance(); + schema.validate( + Arrays.asList( + (Void) null + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java new file mode 100644 index 00000000000..225ed16c176 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java @@ -0,0 +1,53 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluatedpropertiesNotAffectedByPropertynamesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsOnlyNumberPropertiesPasses() throws ValidationException { + // allows only number properties + final var schema = UnevaluatedpropertiesNotAffectedByPropertynames.UnevaluatedpropertiesNotAffectedByPropertynames1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 1 + ) + ), + configuration + ); + } + + @Test + public void testStringPropertyIsInvalidFails() { + // string property is invalid + final var schema = UnevaluatedpropertiesNotAffectedByPropertynames.UnevaluatedpropertiesNotAffectedByPropertynames1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + "b" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java new file mode 100644 index 00000000000..efe97f20b0c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java @@ -0,0 +1,64 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluatedpropertiesSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testWithInvalidUnevaluatedPropertiesFails() { + // with invalid unevaluated properties + final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); + try { + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "fo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testWithNoUnevaluatedPropertiesPasses() throws ValidationException { + // with no unevaluated properties + final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testWithValidUnevaluatedPropertiesPasses() throws ValidationException { + // with valid unevaluated properties + final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java new file mode 100644 index 00000000000..037e2aef978 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java @@ -0,0 +1,52 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testWithAdditionalPropertiesPasses() throws ValidationException { + // with additional properties + final var schema = UnevaluatedpropertiesWithAdjacentAdditionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ), + new AbstractMap.SimpleEntry( + "bar", + "bar" + ) + ), + configuration + ); + } + + @Test + public void testWithNoAdditionalPropertiesPasses() throws ValidationException { + // with no additional properties + final var schema = UnevaluatedpropertiesWithAdjacentAdditionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "foo" + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java new file mode 100644 index 00000000000..67a9630eda1 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java @@ -0,0 +1,33 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UnevaluatedpropertiesWithNullValuedInstancePropertiesTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllowsNullValuedPropertiesPasses() throws ValidationException { + // allows null valued properties + final var schema = UnevaluatedpropertiesWithNullValuedInstanceProperties.UnevaluatedpropertiesWithNullValuedInstanceProperties1.getInstance(); + schema.validate( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + null + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java new file mode 100644 index 00000000000..75d8d3f310f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java @@ -0,0 +1,316 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UniqueitemsFalseValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNumbersAreUniqueIfMathematicallyUnequalPasses() throws ValidationException { + // numbers are unique if mathematically unequal + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1.0d, + 1.0d, + 1 + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfIntegersIsValidPasses() throws ValidationException { + // non-unique array of integers is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 1 + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfObjectsIsValidPasses() throws ValidationException { + // non-unique array of objects is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfArraysIsValidPasses() throws ValidationException { + // non-unique array of arrays is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + "foo" + ), + Arrays.asList( + "foo" + ) + ), + configuration + ); + } + + @Test + public void test1AndTrueAreUniquePasses() throws ValidationException { + // 1 and true are unique + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + true + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { + // unique array of nested objects is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + false + ) + ) + ) + ) + ) + ) + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfArraysIsValidPasses() throws ValidationException { + // unique array of arrays is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + "foo" + ), + Arrays.asList( + "bar" + ) + ), + configuration + ); + } + + @Test + public void testTrueIsNotEqualToOnePasses() throws ValidationException { + // true is not equal to one + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + true + ), + configuration + ); + } + + @Test + public void testNonUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { + // non-unique heterogeneous types are valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + ), + Arrays.asList( + 1 + ), + true, + null, + MapUtils.makeMap( + ), + 1 + ), + configuration + ); + } + + @Test + public void testFalseIsNotEqualToZeroPasses() throws ValidationException { + // false is not equal to zero + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 0, + false + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfIntegersIsValidPasses() throws ValidationException { + // unique array of integers is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2 + ), + configuration + ); + } + + @Test + public void test0AndFalseAreUniquePasses() throws ValidationException { + // 0 and false are unique + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + 0, + false + ), + configuration + ); + } + + @Test + public void testUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { + // unique heterogeneous types are valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + ), + Arrays.asList( + 1 + ), + true, + null, + 1 + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfObjectsIsValidPasses() throws ValidationException { + // unique array of objects is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ) + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { + // non-unique array of nested objects is valid + final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ) + ), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java new file mode 100644 index 00000000000..a52a980b3b4 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java @@ -0,0 +1,154 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UniqueitemsFalseWithAnArrayOfItemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testFalseFalseFromItemsArrayIsValidPasses() throws ValidationException { + // [false, false] from items array is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(false) + + .add(false) + + .build(), + configuration + ); + } + + @Test + public void testNonUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { + // non-unique array extended from [false, true] is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(false) + + .add(true) + + .add("foo") + + .add("foo") + + .build(), + configuration + ); + } + + @Test + public void testTrueTrueFromItemsArrayIsValidPasses() throws ValidationException { + // [true, true] from items array is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(true) + + .add(true) + + .build(), + configuration + ); + } + + @Test + public void testUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { + // unique array extended from [false, true] is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(false) + + .add(true) + + .add("foo") + + .add("bar") + + .build(), + configuration + ); + } + + @Test + public void testUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { + // unique array extended from [true, false] is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(true) + + .add(false) + + .add("foo") + + .add("bar") + + .build(), + configuration + ); + } + + @Test + public void testFalseTrueFromItemsArrayIsValidPasses() throws ValidationException { + // [false, true] from items array is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(false) + + .add(true) + + .build(), + configuration + ); + } + + @Test + public void testTrueFalseFromItemsArrayIsValidPasses() throws ValidationException { + // [true, false] from items array is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(true) + + .add(false) + + .build(), + configuration + ); + } + + @Test + public void testNonUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { + // non-unique array extended from [true, false] is valid + final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() + .add(true) + + .add(false) + + .add("foo") + + .add("foo") + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java new file mode 100644 index 00000000000..edd2a8c1305 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java @@ -0,0 +1,627 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UniqueitemsValidationTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testNonUniqueArrayOfMoreThanTwoIntegersIsInvalidFails() { + // non-unique array of more than two integers is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + 1, + 2, + 1 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNonUniqueArrayOfObjectsIsInvalidFails() { + // non-unique array of objects is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testPropertyOrderOfArrayOfObjectsIsIgnoredFails() { + // property order of array of objects is ignored + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ), + new AbstractMap.SimpleEntry( + "bar", + "foo" + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "bar", + "foo" + ), + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testATrueAndA1AreUniquePasses() throws ValidationException { + // {\\\"a\\\": true} and {\\\"a\\\": 1} are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + true + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 1 + ) + ) + ), + configuration + ); + } + + @Test + public void test1AndTrueAreUniquePasses() throws ValidationException { + // [1] and [true] are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + 1 + ), + Arrays.asList( + true + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfIntegersIsInvalidFails() { + // non-unique array of integers is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + 1, + 1 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNested0AndFalseAreUniquePasses() throws ValidationException { + // nested [0] and [false] are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + Arrays.asList( + 0 + ), + "foo" + ), + Arrays.asList( + Arrays.asList( + false + ), + "foo" + ) + ), + configuration + ); + } + + @Test + public void testObjectsAreNonUniqueDespiteKeyOrderFails() { + // objects are non-unique despite key order + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 1 + ), + new AbstractMap.SimpleEntry( + "b", + 2 + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "b", + 2 + ), + new AbstractMap.SimpleEntry( + "a", + 1 + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNonUniqueArrayOfArraysIsInvalidFails() { + // non-unique array of arrays is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + Arrays.asList( + "foo" + ), + Arrays.asList( + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testAFalseAndA0AreUniquePasses() throws ValidationException { + // {\\\"a\\\": false} and {\\\"a\\\": 0} are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + false + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 0 + ) + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfMoreThanTwoArraysIsInvalidFails() { + // non-unique array of more than two arrays is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + Arrays.asList( + "foo" + ), + Arrays.asList( + "bar" + ), + Arrays.asList( + "foo" + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void test0AndFalseAreUniquePasses() throws ValidationException { + // [0] and [false] are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + 0 + ), + Arrays.asList( + false + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueArrayOfNestedObjectsIsInvalidFails() { + // non-unique array of nested objects is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ) + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNumbersAreUniqueIfMathematicallyUnequalFails() { + // numbers are unique if mathematically unequal + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + 1.0d, + 1.0d, + 1 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNonUniqueArrayOfStringsIsInvalidFails() { + // non-unique array of strings is invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + "foo", + "bar", + "foo" + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { + // unique array of nested objects is valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + true + ) + ) + ) + ) + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "foo", + MapUtils.makeMap( + new AbstractMap.SimpleEntry>( + "bar", + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "baz", + false + ) + ) + ) + ) + ) + ) + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfArraysIsValidPasses() throws ValidationException { + // unique array of arrays is valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + "foo" + ), + Arrays.asList( + "bar" + ) + ), + configuration + ); + } + + @Test + public void testTrueIsNotEqualToOnePasses() throws ValidationException { + // true is not equal to one + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + true + ), + configuration + ); + } + + @Test + public void testNested1AndTrueAreUniquePasses() throws ValidationException { + // nested [1] and [true] are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + Arrays.asList( + Arrays.asList( + 1 + ), + "foo" + ), + Arrays.asList( + Arrays.asList( + true + ), + "foo" + ) + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfStringsIsValidPasses() throws ValidationException { + // unique array of strings is valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + "foo", + "bar", + "baz" + ), + configuration + ); + } + + @Test + public void testFalseIsNotEqualToZeroPasses() throws ValidationException { + // false is not equal to zero + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 0, + false + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfIntegersIsValidPasses() throws ValidationException { + // unique array of integers is valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + 1, + 2 + ), + configuration + ); + } + + @Test + public void testDifferentObjectsAreUniquePasses() throws ValidationException { + // different objects are unique + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 1 + ), + new AbstractMap.SimpleEntry( + "b", + 2 + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "a", + 2 + ), + new AbstractMap.SimpleEntry( + "b", + 1 + ) + ) + ), + configuration + ); + } + + @Test + public void testUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { + // unique heterogeneous types are valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + ), + Arrays.asList( + 1 + ), + true, + null, + 1, + "{}" + ), + configuration + ); + } + + @Test + public void testUniqueArrayOfObjectsIsValidPasses() throws ValidationException { + // unique array of objects is valid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + schema.validate( + Arrays.asList( + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "bar" + ) + ), + MapUtils.makeMap( + new AbstractMap.SimpleEntry( + "foo", + "baz" + ) + ) + ), + configuration + ); + } + + @Test + public void testNonUniqueHeterogeneousTypesAreInvalidFails() { + // non-unique heterogeneous types are invalid + final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); + try { + schema.validate( + Arrays.asList( + MapUtils.makeMap( + ), + Arrays.asList( + 1 + ), + true, + null, + MapUtils.makeMap( + ), + 1 + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java new file mode 100644 index 00000000000..3921696f587 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java @@ -0,0 +1,162 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UniqueitemsWithAnArrayOfItemsTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testTrueTrueFromItemsArrayIsNotValidFails() { + // [true, true] from items array is not valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + true, + true + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { + // unique array extended from [false, true] is valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() + .add(false) + + .add(true) + + .add("foo") + + .add("bar") + + .build(), + configuration + ); + } + + @Test + public void testFalseFalseFromItemsArrayIsNotValidFails() { + // [false, false] from items array is not valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + false, + false + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { + // unique array extended from [true, false] is valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() + .add(true) + + .add(false) + + .add("foo") + + .add("bar") + + .build(), + configuration + ); + } + + @Test + public void testNonUniqueArrayExtendedFromFalseTrueIsNotValidFails() { + // non-unique array extended from [false, true] is not valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + false, + true, + "foo", + "foo" + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testNonUniqueArrayExtendedFromTrueFalseIsNotValidFails() { + // non-unique array extended from [true, false] is not valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + try { + schema.validate( + Arrays.asList( + true, + false, + "foo", + "foo" + ), + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testFalseTrueFromItemsArrayIsValidPasses() throws ValidationException { + // [false, true] from items array is valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() + .add(false) + + .add(true) + + .build(), + configuration + ); + } + + @Test + public void testTrueFalseFromItemsArrayIsValidPasses() throws ValidationException { + // [true, false] from items array is valid + final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); + schema.validate( + new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() + .add(true) + + .add(false) + + .build(), + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java new file mode 100644 index 00000000000..c7e3f7164b6 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UriFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidUriStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid uri string is only an annotation by default + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + "//foo.bar/?baz=qux#quux", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = UriFormat.UriFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java new file mode 100644 index 00000000000..3df9522ec6e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UriReferenceFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testInvalidUriReferenceStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid uri-reference string is only an annotation by default + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + "\\\\WINDOWS\\fileshare", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java new file mode 100644 index 00000000000..636360b6c6d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UriTemplateFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } + + @Test + public void testInvalidUriTemplateStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid uri-template string is only an annotation by default + final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); + schema.validate( + "http://example.com/dictionary/{term:1}/{term", + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java new file mode 100644 index 00000000000..ab9e49d053d --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java @@ -0,0 +1,90 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class UuidFormatTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { + // all string formats ignore integers + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + 12, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { + // all string formats ignore nulls + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + (Void) null, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { + // all string formats ignore objects + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + MapUtils.makeMap( + ), + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { + // all string formats ignore floats + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + 13.7d, + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { + // all string formats ignore arrays + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + Arrays.asList( + ), + configuration + ); + } + + @Test + public void testInvalidUuidStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { + // invalid uuid string is only an annotation by default + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + "2eb8aa08-aa98-11ea-b4aa-73b441d1638", + configuration + ); + } + + @Test + public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { + // all string formats ignore booleans + final var schema = UuidFormat.UuidFormat1.getInstance(); + schema.validate( + false, + configuration + ); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java new file mode 100644 index 00000000000..e1e1ff747cc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java @@ -0,0 +1,68 @@ +package unit_test_api.components.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.MapUtils; +import org.checkerframework.checker.nullness.qual.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; + +public class ValidateAgainstCorrectBranchThenVsElseTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); + + @Test + public void testValidThroughThenPasses() throws ValidationException { + // valid through then + final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); + schema.validate( + -1, + configuration + ); + } + + @Test + public void testInvalidThroughThenFails() { + // invalid through then + final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); + try { + schema.validate( + -100, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } + + @Test + public void testValidThroughElsePasses() throws ValidationException { + // valid through else + final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); + schema.validate( + 4, + configuration + ); + } + + @Test + public void testInvalidThroughElseFails() { + // invalid through else + final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); + try { + schema.validate( + 3, + configuration + ); + throw new RuntimeException("A different exception must be thrown"); + } catch (ValidationException ignored) { + ; + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java new file mode 100644 index 00000000000..9aff3ad5ddc --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java @@ -0,0 +1,143 @@ +package unit_test_api.configurations; + +import org.junit.Assert; +import org.junit.Test; +import java.util.LinkedHashSet; + +public final class JsonSchemaKeywordFlagsTest { + + @Test + public void testGetEnabledKeywords() { + final JsonSchemaKeywordFlags jsonSchemaKeywordFlags = new JsonSchemaKeywordFlags( + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ); + LinkedHashSet enabledKeywords = jsonSchemaKeywordFlags.getKeywords(); + LinkedHashSet expectedEnabledKeywords = new LinkedHashSet<>(); + expectedEnabledKeywords.add("additionalProperties"); + expectedEnabledKeywords.add("allOf"); + expectedEnabledKeywords.add("anyOf"); + expectedEnabledKeywords.add("const"); + expectedEnabledKeywords.add("contains"); + expectedEnabledKeywords.add("dependentRequired"); + expectedEnabledKeywords.add("dependentSchemas"); + expectedEnabledKeywords.add("discriminator"); + expectedEnabledKeywords.add("else_"); + expectedEnabledKeywords.add("enum_"); + expectedEnabledKeywords.add("exclusiveMaximum"); + expectedEnabledKeywords.add("exclusiveMinimum"); + expectedEnabledKeywords.add("format"); + expectedEnabledKeywords.add("if_"); + expectedEnabledKeywords.add("maximum"); + expectedEnabledKeywords.add("minimum"); + expectedEnabledKeywords.add("items"); + expectedEnabledKeywords.add("maxContains"); + expectedEnabledKeywords.add("maxItems"); + expectedEnabledKeywords.add("maxLength"); + expectedEnabledKeywords.add("maxProperties"); + expectedEnabledKeywords.add("minContains"); + expectedEnabledKeywords.add("minItems"); + expectedEnabledKeywords.add("minLength"); + expectedEnabledKeywords.add("minProperties"); + expectedEnabledKeywords.add("multipleOf"); + expectedEnabledKeywords.add("not"); + expectedEnabledKeywords.add("oneOf"); + expectedEnabledKeywords.add("pattern"); + expectedEnabledKeywords.add("patternProperties"); + expectedEnabledKeywords.add("prefixItems"); + expectedEnabledKeywords.add("properties"); + expectedEnabledKeywords.add("propertyNames"); + expectedEnabledKeywords.add("required"); + expectedEnabledKeywords.add("then"); + expectedEnabledKeywords.add("type"); + expectedEnabledKeywords.add("uniqueItems"); + expectedEnabledKeywords.add("unevaluatedItems"); + expectedEnabledKeywords.add("unevaluatedProperties"); + Assert.assertEquals(enabledKeywords, expectedEnabledKeywords); + } + + @Test + public void testGetNoEnabledKeywords() { + final JsonSchemaKeywordFlags jsonSchemaKeywordFlags = new JsonSchemaKeywordFlags( + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ); + LinkedHashSet enabledKeywords = jsonSchemaKeywordFlags.getKeywords(); + LinkedHashSet expectedEnabledKeywords = new LinkedHashSet<>(); + Assert.assertEquals(enabledKeywords, expectedEnabledKeywords); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java new file mode 100644 index 00000000000..b26f95ffd02 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java @@ -0,0 +1,120 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.mediatype.MediaType; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.net.http.HttpHeaders; +import java.util.AbstractMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiPredicate; + +public class ContentHeaderTest { + public record ParamTestCase(@Nullable Object payload, Map> expectedSerialization, @Nullable Boolean explode) { + public ParamTestCase(@Nullable Object payload, Map> expectedSerialization) { + this(payload, expectedSerialization, null); + } + } + + @Test + public void testSerialization() throws ValidationException, NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + Map.of("color", List.of("null")) + ), + new ParamTestCase( + true, + Map.of("color", List.of("true")) + ), + new ParamTestCase( + false, + Map.of("color", List.of("false")) + ), + new ParamTestCase( + 1, + Map.of("color", List.of("1")) + ), + new ParamTestCase( + 3.14, + Map.of("color",List.of("3.14")) + ), + new ParamTestCase( + "blue", + Map.of("color", List.of("\"blue\"")) + ), + new ParamTestCase( + "hello world", + Map.of("color", List.of("\"hello world\"")) + ), + new ParamTestCase( + "", + Map.of("color", List.of("\"\"")) + ), + new ParamTestCase( + List.of(), + Map.of("color", List.of("[]")) + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + Map.of("color", List.of("[\"blue\",\"black\",\"brown\"]")) + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + Map.of("color", List.of("[\"blue\",\"black\",\"brown\"]")), + true + ), + new ParamTestCase( + Map.of(), + Map.of("color", List.of("{}")) + ), + new ParamTestCase( + mapPayload, + Map.of("color", List.of("{\"R\":100,\"G\":200,\"B\":150}")) + ), + new ParamTestCase( + mapPayload, + Map.of("color", List.of("{\"R\":100,\"G\":200,\"B\":150}")), + true + ) + ); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + BiPredicate headerFilter = (key, val) -> true; + class ApplicationJsonMediaType implements MediaType { + @Override + public AnyTypeJsonSchema.AnyTypeJsonSchema1 schema() { + return AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance(); + } + + @Override + public Void encoding() { + return null; + } + } + AbstractMap.SimpleEntry> content = new AbstractMap.SimpleEntry<>( + "application/json", new ApplicationJsonMediaType() + ); + for (ParamTestCase testCase: testCases) { + var header = new ContentHeader( + true, + false, + testCase.explode, + content + ); + var serialization = header.serialize(testCase.payload, "color", false, configuration); + Assert.assertEquals(HttpHeaders.of(testCase.expectedSerialization, headerFilter), serialization); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java new file mode 100644 index 00000000000..acc5ef4dcfd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java @@ -0,0 +1,162 @@ +package unit_test_api.header; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.ListJsonSchema; +import unit_test_api.schemas.NullJsonSchema; +import unit_test_api.schemas.NumberJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.schemas.validation.JsonSchema; + +import java.net.http.HttpHeaders; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.BiPredicate; + +public class SchemaHeaderTest { + public record ParamTestCase(@Nullable Object payload, Map> expectedSerialization, @Nullable Boolean explode) { + public ParamTestCase(@Nullable Object payload, Map> expectedSerialization) { + this(payload, expectedSerialization, null); + } + } + + @Test + public void testSerialization() throws ValidationException, NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + var testCases = List.of( + new ParamTestCase( + null, + Map.of("color", List.of("")) + ), + new ParamTestCase( + 1, + Map.of("color", List.of("1")) + ), + new ParamTestCase( + 3.14, + Map.of("color",List.of("3.14")) + ), + new ParamTestCase( + "blue", + Map.of("color", List.of("blue")) + ), + new ParamTestCase( + "hello world", + Map.of("color", List.of("hello world")) + ), + new ParamTestCase( + "", + Map.of("color", List.of("")) + ), + new ParamTestCase( + List.of(), + Map.of("color", List.of("")) + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + Map.of("color", List.of("blue,black,brown")) + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + Map.of("color", List.of("blue,black,brown")), + true + ), + new ParamTestCase( + Map.of(), + Map.of("color", List.of("")) + ), + new ParamTestCase( + mapPayload, + Map.of("color", List.of("R,100,G,200,B,150")) + ), + new ParamTestCase( + mapPayload, + Map.of("color", List.of("R=100,G=200,B=150")), + true + ) + ); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + BiPredicate headerFilter = (key, val) -> true; + for (ParamTestCase testCase: testCases) { + var header = new SchemaHeader( + true, + false, + testCase.explode, + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance() + ); + var serialization = header.serialize(testCase.payload, "color", false, configuration); + Assert.assertEquals(HttpHeaders.of(testCase.expectedSerialization, headerFilter), serialization); + } + SchemaHeader boolHeader = new SchemaHeader( + true, + false, + false, + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance() + ); + for (boolean value: Set.of(true, false)) { + Assert.assertThrows( + NotImplementedException.class, + () -> boolHeader.serialize(value, "color", false, configuration) + ); + } + } + + private static SchemaHeader getHeader(JsonSchema schema) { + return new SchemaHeader( + true, + false, + false, + schema + ); + } + + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testDeserialization() throws ValidationException, NotImplementedException { + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + + SchemaHeader header = getHeader(NullJsonSchema.NullJsonSchema1.getInstance()); + @Nullable Object deserialized = header.deserialize(List.of(""), false, configuration); + assertNull(deserialized); + + header = getHeader(NumberJsonSchema.NumberJsonSchema1.getInstance()); + deserialized = header.deserialize(List.of("1"), false, configuration); + @Nullable Object expected = 1L; + Assert.assertEquals(expected, deserialized); + + header = getHeader(NumberJsonSchema.NumberJsonSchema1.getInstance()); + deserialized = header.deserialize(List.of("3.14"), false, configuration); + expected = 3.14d; + Assert.assertEquals(expected, deserialized); + + header = getHeader(StringJsonSchema.StringJsonSchema1.getInstance()); + deserialized = header.deserialize(List.of("blue"), false, configuration); + expected = "blue"; + Assert.assertEquals(expected, deserialized); + + header = getHeader(StringJsonSchema.StringJsonSchema1.getInstance()); + deserialized = header.deserialize(List.of("hello world"), false, configuration); + expected = "hello world"; + Assert.assertEquals(expected, deserialized); + + header = getHeader(ListJsonSchema.ListJsonSchema1.getInstance()); + deserialized = header.deserialize(List.of("blue", "black", "brown"), false, configuration); + expected = List.of("blue", "black", "brown"); + Assert.assertEquals(expected, deserialized); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java new file mode 100644 index 00000000000..04d75d06d42 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java @@ -0,0 +1,45 @@ +package unit_test_api.parameter; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.AbstractMap; +import java.util.Map; + +public class CookieSerializerTest { + public static class Parameter1 extends SchemaParameter { + public Parameter1() { + super("param1", ParameterInType.COOKIE, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class Parameter2 extends SchemaParameter { + public Parameter2() { + super("param2", ParameterInType.COOKIE, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class CookieParametersSerializer extends CookieSerializer { + protected CookieParametersSerializer() { + super( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", new Parameter1()), + new AbstractMap.SimpleEntry<>("param2", new Parameter2()) + ) + ); + } + } + + @Test + public void testSerialization() throws NotImplementedException { + Map inData = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", "a"), + new AbstractMap.SimpleEntry<>("param2", 3.14d) + ); + String cookie = new CookieParametersSerializer().serialize(inData); + String expectedCookie = "param1=a; param2=3.14"; + Assert.assertEquals(expectedCookie, cookie); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java new file mode 100644 index 00000000000..a6a0498bc90 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java @@ -0,0 +1,49 @@ +package unit_test_api.parameter; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.AbstractMap; +import java.util.Map; +import java.util.List; + +public class HeadersSerializerTest { + public static class Param1HeaderParameter extends SchemaParameter { + public Param1HeaderParameter() { + super("param1", ParameterInType.HEADER, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class Param2HeaderParameter extends SchemaParameter { + public Param2HeaderParameter() { + super("param2", ParameterInType.HEADER, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class HeaderParametersSerializer extends HeadersSerializer { + protected HeaderParametersSerializer() { + super( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", new Param1HeaderParameter()), + new AbstractMap.SimpleEntry<>("param2", new Param2HeaderParameter()) + ) + ); + } + } + + @Test + public void testSerialization() throws NotImplementedException { + Map inData = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", "a"), + new AbstractMap.SimpleEntry<>("param2", 3.14d) + ); + Map> expectedHeaders = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", List.of("a")), + new AbstractMap.SimpleEntry<>("param2", List.of("3.14")) + ); + Map> headers = new HeaderParametersSerializer().serialize(inData); + Assert.assertEquals(expectedHeaders, headers); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java new file mode 100644 index 00000000000..654a52f27ab --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java @@ -0,0 +1,46 @@ +package unit_test_api.parameter; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.AbstractMap; +import java.util.Map; + +public class PathSerializerTest { + public static class Parameter1 extends SchemaParameter { + public Parameter1() { + super("param1", ParameterInType.PATH, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class Parameter2 extends SchemaParameter { + public Parameter2() { + super("param2", ParameterInType.PATH, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class PathParametersSerializer extends PathSerializer { + protected PathParametersSerializer() { + super( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", new Parameter1()), + new AbstractMap.SimpleEntry<>("param2", new Parameter2()) + ) + ); + } + } + + @Test + public void testSerialization() throws NotImplementedException { + Map inData = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", "a"), + new AbstractMap.SimpleEntry<>("param2", 3.14d) + ); + String pathWithPlaceholders = "/{param1}/{param2}"; + String path = new PathParametersSerializer().serialize(inData, pathWithPlaceholders); + String expectedPath = "/a/3.14"; + Assert.assertEquals(expectedPath, path); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java new file mode 100644 index 00000000000..65909820d34 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java @@ -0,0 +1,52 @@ +package unit_test_api.parameter; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.AbstractMap; +import java.util.Map; + +public class QuerySerializerTest { + public static class Param1QueryParameter extends SchemaParameter { + public Param1QueryParameter() { + super("param1", ParameterInType.QUERY, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class Param2QueryParameter extends SchemaParameter { + public Param2QueryParameter() { + super("param2", ParameterInType.QUERY, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + public static class QueryParametersSerializer extends QuerySerializer { + protected QueryParametersSerializer() { + super( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", new Param1QueryParameter()), + new AbstractMap.SimpleEntry<>("param2", new Param2QueryParameter()) + ) + ); + } + } + + @Test + public void testSerialization() throws NotImplementedException { + Map inData = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", "a"), + new AbstractMap.SimpleEntry<>("param2", 3.14d) + ); + var serializer = new QueryParametersSerializer(); + var queryMap = serializer.getQueryMap(inData); + Map expectedQueryMap = Map.ofEntries( + new AbstractMap.SimpleEntry<>("param1", "param1=a"), + new AbstractMap.SimpleEntry<>("param2", "param2=3.14") + ); + Assert.assertEquals(expectedQueryMap, queryMap); + String query = serializer.serialize(queryMap); + String expectedQuery = "?param1=a¶m2=3.14"; + Assert.assertEquals(expectedQuery, query); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java new file mode 100644 index 00000000000..2103f6b1d76 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java @@ -0,0 +1,397 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.AbstractMap; +import java.util.Set; + +public class SchemaNonQueryParameterTest { + public record ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization, @Nullable Boolean explode) { + public ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization) { + this(payload, expectedSerialization, null); + } + } + + public static class HeaderParameter extends SchemaParameter { + public HeaderParameter(@Nullable Boolean explode) { + super("color", ParameterInType.HEADER, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testHeaderSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", "1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color","3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", "blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", "hello world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue,black,brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue,black,brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R,100,G,200,B,150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100,G=200,B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var header = new HeaderParameter(testCase.explode); + var serialization = header.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + var boolHeader = new HeaderParameter(false); + for (boolean value: Set.of(true, false)) { + Assert.assertThrows( + NotImplementedException.class, + () -> boolHeader.serialize(value) + ); + } + } + + public static class PathParameter extends SchemaParameter { + public PathParameter(@Nullable Boolean explode) { + super("color", ParameterInType.PATH, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testPathSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", "1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color","3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", "blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", "hello%20world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue,black,brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue,black,brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R,100,G,200,B,150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100,G=200,B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var pathParameter = new PathParameter(testCase.explode); + var serialization = pathParameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + var pathParameter = new PathParameter(false); + for (boolean value: Set.of(true, false)) { + Assert.assertThrows( + NotImplementedException.class, + () -> pathParameter.serialize(value) + ); + } + } + + public static class CookieParameter extends SchemaParameter { + public CookieParameter(@Nullable Boolean explode) { + super("color", ParameterInType.COOKIE, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testCookieSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", "color=1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color","color=3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", "color=blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", "color=hello world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", "color=") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var cookieParameter = new CookieParameter(testCase.explode); + var serialization = cookieParameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + var cookieParameter = new CookieParameter(false); + for (boolean value: Set.of(true, false)) { + Assert.assertThrows( + NotImplementedException.class, + () -> cookieParameter.serialize(value) + ); + } + } + + public static class PathMatrixParameter extends SchemaParameter { + public PathMatrixParameter(@Nullable Boolean explode) { + super("color", ParameterInType.PATH, true, ParameterStyle.MATRIX, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testPathMatrixSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", ";color=1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color",";color=3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", ";color=blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", ";color=hello%20world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", ";color") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", ";color=blue,black,brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", ";color=blue;color=black;color=brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", ";color=R,100,G,200,B,150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", ";R=100;G=200;B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var pathParameter = new PathMatrixParameter(testCase.explode); + var serialization = pathParameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + } + + public static class PathLabelParameter extends SchemaParameter { + public PathLabelParameter(@Nullable Boolean explode) { + super("color", ParameterInType.PATH, true, ParameterStyle.LABEL, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testPathLabelSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", ".1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color",".3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", ".blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", ".hello%20world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", ".") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", ".blue.black.brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", ".blue.black.brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", ".R.100.G.200.B.150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", ".R=100.G=200.B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var pathParameter = new PathLabelParameter(testCase.explode); + var serialization = pathParameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java new file mode 100644 index 00000000000..a191dc0148e --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java @@ -0,0 +1,193 @@ +package unit_test_api.parameter; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.schemas.AnyTypeJsonSchema; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.AbstractMap; +import java.util.Map; +import java.util.Set; + +public class SchemaQueryParameterTest { + public record ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization, @Nullable Boolean explode) { + public ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization) { + this(payload, expectedSerialization, null); + } + } + + public static class QueryParameterNoStyle extends SchemaParameter { + public QueryParameterNoStyle(@Nullable Boolean explode) { + super("color", ParameterInType.QUERY, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testQueryParameterNoStyleSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + null, + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + 1, + new AbstractMap.SimpleEntry<>("color", "color=1") + ), + new ParamTestCase( + 3.14, + new AbstractMap.SimpleEntry<>("color","color=3.14") + ), + new ParamTestCase( + "blue", + new AbstractMap.SimpleEntry<>("color", "color=blue") + ), + new ParamTestCase( + "hello world", + new AbstractMap.SimpleEntry<>("color", "color=hello%20world") + ), + new ParamTestCase( + "", + new AbstractMap.SimpleEntry<>("color", "color=") + ), + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var parameter = new QueryParameterNoStyle(testCase.explode); + var serialization = parameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + var parameter = new QueryParameterNoStyle(false); + for (boolean value: Set.of(true, false)) { + Assert.assertThrows( + NotImplementedException.class, + () -> parameter.serialize(value) + ); + } + } + + public static class QueryParameterSpaceDelimited extends SchemaParameter { + public QueryParameterSpaceDelimited(@Nullable Boolean explode) { + super("color", ParameterInType.QUERY, true, ParameterStyle.SPACE_DELIMITED, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testQueryParameterSpaceDelimitedSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue%20black%20brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue%20black%20brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R%20100%20G%20200%20B%20150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100%20G=200%20B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var parameter = new QueryParameterSpaceDelimited(testCase.explode); + var serialization = parameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + } + + public static class QueryParameterPipeDelimited extends SchemaParameter { + public QueryParameterPipeDelimited(@Nullable Boolean explode) { + super("color", ParameterInType.QUERY, true, ParameterStyle.PIPE_DELIMITED, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + } + + @Test + public void testQueryParameterPipeDelimitedSerialization() throws NotImplementedException { + var mapPayload = new LinkedHashMap(); + mapPayload.put("R", 100); + mapPayload.put("G", 200); + mapPayload.put("B", 150); + List testCases = List.of( + new ParamTestCase( + List.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue|black|brown") + ), + new ParamTestCase( + List.of("blue", "black", "brown"), + new AbstractMap.SimpleEntry<>("color", "blue|black|brown"), + true + ), + new ParamTestCase( + Map.of(), + new AbstractMap.SimpleEntry<>("color", "") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R|100|G|200|B|150") + ), + new ParamTestCase( + mapPayload, + new AbstractMap.SimpleEntry<>("color", "R=100|G=200|B=150"), + true + ) + ); + for (ParamTestCase testCase: testCases) { + var parameter = new QueryParameterPipeDelimited(testCase.explode); + var serialization = parameter.serialize(testCase.payload); + Assert.assertEquals(testCase.expectedSerialization, serialization); + } + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java new file mode 100644 index 00000000000..dcb2605b844 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java @@ -0,0 +1,181 @@ +package unit_test_api.requestbody; + +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.contenttype.ContentTypeDetector; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.StringJsonSchema; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; + +import java.net.http.HttpResponse; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.AbstractMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Flow; + +public final class RequestBodySerializerTest { + public sealed interface SealedMediaType permits ApplicationjsonMediaType, TextplainMediaType {} + public record ApplicationjsonMediaType(AnyTypeJsonSchema.AnyTypeJsonSchema1 schema) implements SealedMediaType {} + public record TextplainMediaType(StringJsonSchema.StringJsonSchema1 schema) implements SealedMediaType {} + + public sealed interface SealedRequestBody permits ApplicationjsonRequestBody, TextplainRequestBody {} + public record ApplicationjsonRequestBody(AnyTypeJsonSchema.AnyTypeJsonSchema1Boxed body) implements SealedRequestBody, GenericRequestBody<@Nullable Object> { + @Override + public String contentType() { + return "application/json"; + } + } + public record TextplainRequestBody(StringJsonSchema.StringJsonSchema1Boxed body) implements SealedRequestBody, GenericRequestBody<@Nullable Object> { + @Override + public String contentType() { + return "text/plain"; + } + } + + public static class MyRequestBodySerializer extends RequestBodySerializer { + public MyRequestBodySerializer() { + super( + Map.ofEntries( + new AbstractMap.SimpleEntry<>("application/json", new ApplicationjsonMediaType(AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance())), + new AbstractMap.SimpleEntry<>("text/plain", new TextplainMediaType(StringJsonSchema.StringJsonSchema1.getInstance())) + ), + true); + } + + public SerializedRequestBody serialize(SealedRequestBody requestBody) throws NotImplementedException { + if (requestBody instanceof ApplicationjsonRequestBody requestBody0) { + return serialize(requestBody0.contentType(), requestBody0.body().getData()); + } else { + TextplainRequestBody requestBody1 = (TextplainRequestBody) requestBody; + return serialize(requestBody1.contentType(), requestBody1.body().getData()); + } + } + } + + @Test + public void testContentTypeIsJson() { + Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json")); + Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json; charset=UTF-8")); + Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json-patch+json")); + Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/geo+json")); + + Assert.assertFalse(ContentTypeDetector.contentTypeIsJson("application/octet-stream")); + Assert.assertFalse(ContentTypeDetector.contentTypeIsJson("text/plain")); + } + + static final class StringSubscriber implements Flow.Subscriber { + final HttpResponse.BodySubscriber wrapped; + StringSubscriber(HttpResponse.BodySubscriber wrapped) { + this.wrapped = wrapped; + } + @Override + public void onSubscribe(Flow.Subscription subscription) { + wrapped.onSubscribe(subscription); + } + @Override + public void onNext(ByteBuffer item) { wrapped.onNext(List.of(item)); } + @Override + public void onError(Throwable throwable) { wrapped.onError(throwable); } + @Override + public void onComplete() { wrapped.onComplete(); } + } + + private String getJsonBody(SerializedRequestBody requestBody) { + var bodySubscriber = HttpResponse.BodySubscribers.ofString(StandardCharsets.UTF_8); + var flowSubscriber = new StringSubscriber(bodySubscriber); + requestBody.bodyPublisher.subscribe(flowSubscriber); + return bodySubscriber.getBody().toCompletableFuture().join(); + } + + @Test + public void testSerializeApplicationJson() throws ValidationException, NotImplementedException { + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + var serializer = new MyRequestBodySerializer(); + String jsonBody; + SerializedRequestBody requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(1, configuration) + ) + ); + Assert.assertEquals("application/json", requestBody.contentType); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "1"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(3.14, configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "3.14"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox((Void) null, configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "null"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(true, configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "true"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(false, configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "false"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(List.of(), configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "[]"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(Map.of(), configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "{}"); + + requestBody = serializer.serialize( + new ApplicationjsonRequestBody( + AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(Map.of("k1", "v1", "k2", "v2"), configuration) + ) + ); + jsonBody = getJsonBody(requestBody); + Assert.assertEquals(jsonBody, "{\"k2\":\"v2\",\"k1\":\"v1\"}"); + } + + @Test + public void testSerializeTextPlain() throws ValidationException, NotImplementedException { + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + var serializer = new MyRequestBodySerializer(); + SerializedRequestBody requestBody = serializer.serialize( + new TextplainRequestBody( + StringJsonSchema.StringJsonSchema1.getInstance().validateAndBox("a", configuration) + ) + ); + Assert.assertEquals("text/plain", requestBody.contentType); + String textBody = getJsonBody(requestBody); + Assert.assertEquals(textBody, "a"); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java new file mode 100644 index 00000000000..42ae6ad9e6f --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java @@ -0,0 +1,248 @@ +package unit_test_api.response; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.ToNumberPolicy; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.NotImplementedException; +import unit_test_api.exceptions.ApiException; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.mediatype.MediaType; +import unit_test_api.schemas.AnyTypeJsonSchema; +import unit_test_api.schemas.StringJsonSchema; + +import javax.net.ssl.SSLSession; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpHeaders; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.BiPredicate; + +public class ResponseDeserializerTest { + private static final Gson gson = new GsonBuilder() + .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) + .create(); + public sealed interface SealedResponseBody permits ApplicationjsonBody, TextplainBody { } + + public record ApplicationjsonBody(AnyTypeJsonSchema.AnyTypeJsonSchema1Boxed body) implements SealedResponseBody { } + + public record TextplainBody(StringJsonSchema.StringJsonSchema1Boxed body) implements SealedResponseBody {} + + public sealed interface SealedMediaType permits ApplicationjsonMediatype, TextplainMediatype { } + + public record ApplicationjsonMediatype(AnyTypeJsonSchema.AnyTypeJsonSchema1 schema) implements SealedMediaType, MediaType { + public ApplicationjsonMediatype() { + this(AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); + } + @Override + public Void encoding() { + return null; + } + } + + public record TextplainMediatype(StringJsonSchema.StringJsonSchema1 schema) implements SealedMediaType, MediaType { + public TextplainMediatype() { + this(StringJsonSchema.StringJsonSchema1.getInstance()); + } + @Override + public Void encoding() { + return null; + } + } + + public static class MyResponseDeserializer extends ResponseDeserializer { + + public MyResponseDeserializer() { + super(Map.of("application/json", new ApplicationjsonMediatype(), "text/plain", new TextplainMediatype())); + } + + @Override + protected SealedResponseBody getBody(String contentType, SealedMediaType mediaType, byte[] body, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { + if (mediaType instanceof ApplicationjsonMediatype thisMediaType) { + var deserializedBody = deserializeBody(contentType, body, thisMediaType.schema(), configuration); + return new ApplicationjsonBody(deserializedBody); + } else { + TextplainMediatype thisMediaType = (TextplainMediatype) mediaType; + var deserializedBody = deserializeBody(contentType, body, thisMediaType.schema(), configuration); + return new TextplainBody(deserializedBody); + } + } + + @Override + protected Void getHeaders(HttpHeaders headers, SchemaConfiguration configuration) { + return null; + } + } + + public static class BytesHttpResponse implements HttpResponse { + private final byte[] body; + private final HttpHeaders headers; + private final HttpRequest request; + private final URI uri; + private final HttpClient.Version version; + public BytesHttpResponse(byte[] body, String contentType) { + this.body = body; + BiPredicate headerFilter = (key, val) -> true; + headers = HttpHeaders.of(Map.of("Content-Type", List.of(contentType)), headerFilter); + uri = URI.create("https://abc.com/"); + request = HttpRequest.newBuilder().uri(uri).build(); + version = HttpClient.Version.HTTP_2; + } + + @Override + public int statusCode() { + return 202; + } + + @Override + public HttpRequest request() { + return request; + } + + @Override + public Optional> previousResponse() { + return Optional.empty(); + } + + @Override + public HttpHeaders headers() { + return headers; + } + + @Override + public byte[] body() { + return body; + } + + @Override + public Optional sslSession() { + return Optional.empty(); + } + + @Override + public URI uri() { + return uri; + } + + @Override + public HttpClient.Version version() { + return version; + } + } + + @SuppressWarnings("nullness") + private String toJson(@Nullable Object body) { + return gson.toJson(body); + } + + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testDeserializeApplicationJsonNull() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson(null).getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedVoid boxedVoid)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedVoid"); + } + assertNull(boxedVoid.data()); + } + + @Test + public void testDeserializeApplicationJsonTrue() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson(true).getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedBoolean boxedBoolean)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedBoolean"); + } + Assert.assertTrue(boxedBoolean.data()); + } + + @Test + public void testDeserializeApplicationJsonFalse() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson(false).getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedBoolean boxedBoolean)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedBoolean"); + } + Assert.assertFalse(boxedBoolean.data()); + } + + @Test + public void testDeserializeApplicationJsonInt() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson(1).getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedNumber boxedNumber)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedNumber"); + } + Assert.assertEquals(boxedNumber.data(), 1L); + } + + @Test + public void testDeserializeApplicationJsonFloat() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson(3.14).getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedNumber boxedNumber)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedNumber"); + } + Assert.assertEquals(boxedNumber.data(), 3.14); + } + + @Test + public void testDeserializeApplicationJsonString() throws ValidationException, ApiException, NotImplementedException { + var deserializer = new MyResponseDeserializer(); + byte[] bodyBytes = toJson("a").getBytes(StandardCharsets.UTF_8); + BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); + SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); + if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { + throw new RuntimeException("body must be type ApplicationjsonBody"); + } + if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedString boxedString)) { + throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedString"); + } + Assert.assertEquals(boxedString.data(), "a"); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java new file mode 100644 index 00000000000..8e46bf4334c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java @@ -0,0 +1,106 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.FrozenMap; + +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.LinkedHashMap; + + +public class AnyTypeSchemaTest { + static final AnyTypeJsonSchema.AnyTypeJsonSchema1 schema = AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance(); + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + + @SuppressWarnings("nullness") + private Void assertNull(@Nullable Object object) { + Assert.assertNull(object); + return null; + } + + @Test + public void testValidateNull() throws ValidationException { + Void validatedValue = schema.validate((Void) null, configuration); + assertNull(validatedValue); + } + + @Test + public void testValidateBoolean() throws ValidationException { + boolean trueValue = schema.validate(true, configuration); + Assert.assertTrue(trueValue); + + boolean falseValue = schema.validate(false, configuration); + Assert.assertFalse(falseValue); + } + + @Test + public void testValidateInteger() throws ValidationException { + int validatedValue = schema.validate(1, configuration); + Assert.assertEquals(validatedValue, 1); + } + + @Test + public void testValidateLong() throws ValidationException { + long validatedValue = schema.validate(1L, configuration); + Assert.assertEquals(validatedValue, 1L); + } + + @Test + public void testValidateFloat() throws ValidationException { + float validatedValue = schema.validate(3.14f, configuration); + Assert.assertEquals(Float.compare(validatedValue, 3.14f), 0); + } + + @Test + public void testValidateDouble() throws ValidationException { + double validatedValue = schema.validate(70.6458763d, configuration); + Assert.assertEquals(Double.compare(validatedValue, 70.6458763d), 0); + } + + @Test + public void testValidateString() throws ValidationException { + String validatedValue = schema.validate("a", configuration); + Assert.assertEquals(validatedValue, "a"); + } + + @Test + public void testValidateZonedDateTime() throws ValidationException { + String validatedValue = schema.validate(ZonedDateTime.of(2017, 7, 21, 17, 32, 28, 0, ZoneId.of("Z")), configuration); + Assert.assertEquals(validatedValue, "2017-07-21T17:32:28Z"); + } + + @Test + public void testValidateLocalDate() throws ValidationException { + String validatedValue = schema.validate(LocalDate.of(2017, 7, 21), configuration); + Assert.assertEquals(validatedValue, "2017-07-21"); + } + + @Test + public void testValidateMap() throws ValidationException { + LinkedHashMap inMap = new LinkedHashMap<>(); + inMap.put("today", LocalDate.of(2017, 7, 21)); + FrozenMap validatedValue = schema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("today", "2017-07-21"); + Assert.assertEquals(validatedValue, outMap); + } + + @Test + public void testValidateList() throws ValidationException { + ArrayList inList = new ArrayList<>(); + inList.add(LocalDate.of(2017, 7, 21)); + FrozenList validatedValue = schema.validate(inList, configuration); + ArrayList outList = new ArrayList<>(); + outList.add( "2017-07-21"); + Assert.assertEquals(validatedValue, outList); + } +} + diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java new file mode 100644 index 00000000000..983bc20e9d8 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java @@ -0,0 +1,252 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ListSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +public class ArrayTypeSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + public sealed interface ArrayWithItemsSchemaBoxed permits ArrayWithItemsSchemaBoxedList { + } + public record ArrayWithItemsSchemaBoxedList(FrozenList data) implements ArrayWithItemsSchemaBoxed { + } + + public static class ArrayWithItemsSchema extends JsonSchema implements ListSchemaValidator, ArrayWithItemsSchemaBoxedList> { + public ArrayWithItemsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(StringJsonSchema.StringJsonSchema1.class) + ); + } + + @Override + public FrozenList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(castItem instanceof String)) { + throw new RuntimeException("Instantiated type of item is invalid"); + } + items.add((String) castItem); + i += 1; + } + return new FrozenList<>(items); + } + + public FrozenList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ArrayWithItemsSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ArrayWithItemsSchemaBoxedList(validate(arg, configuration)); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ArrayWithItemsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List listArg) { + return new ArrayWithItemsSchemaBoxedList(validate(listArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public static class ArrayWithOutputClsSchemaList extends FrozenList { + protected ArrayWithOutputClsSchemaList(FrozenList m) { + super(m); + } + + public static ArrayWithOutputClsSchemaList of(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ArrayWithOutputClsSchema().validate(arg, configuration); + } + } + + public sealed interface ArrayWithOutputClsSchemaBoxed permits ArrayWithOutputClsSchemaBoxedList { + } + public record ArrayWithOutputClsSchemaBoxedList(ArrayWithOutputClsSchemaList data) implements ArrayWithOutputClsSchemaBoxed { + } + public static class ArrayWithOutputClsSchema extends JsonSchema implements ListSchemaValidator { + public ArrayWithOutputClsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(StringJsonSchema.StringJsonSchema1.class) + ); + + } + + @Override + public ArrayWithOutputClsSchemaList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { + List items = new ArrayList<>(); + int i = 0; + for (Object item: arg) { + List itemPathToItem = new ArrayList<>(pathToItem); + itemPathToItem.add(i); + LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); + if (!(castItem instanceof String)) { + throw new RuntimeException("Instantiated type of item is invalid"); + } + items.add((String) castItem); + i += 1; + } + FrozenList newInstanceItems = new FrozenList<>(items); + return new ArrayWithOutputClsSchemaList(newInstanceItems); + } + + public ArrayWithOutputClsSchemaList validate(List arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + List castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ArrayWithOutputClsSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ArrayWithOutputClsSchemaBoxedList(validate(arg, configuration)); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List) { + return getNewInstance((List) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List) { + return validate((List) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ArrayWithOutputClsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List listArg) { + return new ArrayWithOutputClsSchemaBoxedList(validate(listArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + new ArrayWithItemsSchema(), + null, + validationMetadata + )); + } + + @Test + public void testValidateArrayWithItemsSchema() throws ValidationException { + // list with only item works + List inList = new ArrayList<>(); + inList.add("abc"); + FrozenList validatedValue = new ArrayWithItemsSchema().validate(inList, configuration); + List outList = new ArrayList<>(); + outList.add("abc"); + Assert.assertEquals(validatedValue, outList); + + // list with no items works + inList = new ArrayList<>(); + validatedValue = new ArrayWithItemsSchema().validate(inList, configuration); + outList = new ArrayList<>(); + Assert.assertEquals(validatedValue, outList); + + // invalid item type fails + List intList = List.of(1); + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + new ArrayWithItemsSchema(), + intList, + validationMetadata + )); + } + + @Test + public void testValidateArrayWithOutputClsSchema() throws ValidationException { + // list with only item works + List inList = new ArrayList<>(); + inList.add("abc"); + ArrayWithOutputClsSchemaList validatedValue = new ArrayWithOutputClsSchema().validate(inList, configuration); + List outList = new ArrayList<>(); + outList.add("abc"); + Assert.assertEquals(validatedValue, outList); + + // list with no items works + inList = new ArrayList<>(); + validatedValue = new ArrayWithOutputClsSchema().validate(inList, configuration); + outList = new ArrayList<>(); + Assert.assertEquals(validatedValue, outList); + + // invalid item type fails + List intList = List.of(1); + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + new ArrayWithOutputClsSchema(), + intList, + validationMetadata + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java new file mode 100644 index 00000000000..e458f6ada89 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java @@ -0,0 +1,45 @@ +package unit_test_api.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.LinkedHashSet; +import java.util.List; + +public class BooleanSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final BooleanJsonSchema.BooleanJsonSchema1 booleanJsonSchema = BooleanJsonSchema.BooleanJsonSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @Test + public void testValidateTrue() throws ValidationException { + boolean validatedValue = booleanJsonSchema.validate(true, configuration); + Assert.assertTrue(validatedValue); + } + + @Test + public void testValidateFalse() throws ValidationException { + boolean validatedValue = booleanJsonSchema.validate(false, configuration); + Assert.assertFalse(validatedValue); + } + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + booleanJsonSchema, + null, + validationMetadata + )); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java new file mode 100644 index 00000000000..72de9e0f760 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java @@ -0,0 +1,61 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +public class ListBuilderTest { + public static class NullableListWithNullableItemsListBuilder { + // class to build List<@Nullable List> + private final List<@Nullable List> list; + + public NullableListWithNullableItemsListBuilder() { + list = new ArrayList<>(); + } + + public NullableListWithNullableItemsListBuilder(List<@Nullable List> list) { + this.list = list; + } + + public NullableListWithNullableItemsListBuilder add(Void item) { + list.add(null); + return this; + } + + public NullableListWithNullableItemsListBuilder add(List item) { + list.add(item); + return this; + } + + public List<@Nullable List> build() { + return list; + } + } + + @Test + public void testSucceedsWithNullInput() { + List<@Nullable List> inList = new ArrayList<>(); + inList.add(null); + var builder = new NullableListWithNullableItemsListBuilder(inList); + Assert.assertEquals(inList, builder.build()); + + builder = new NullableListWithNullableItemsListBuilder(); + builder.add((Void) null); + Assert.assertEquals(inList, builder.build()); + } + + @Test + public void testSucceedsWithNonNullInput() { + List<@Nullable List> inList = new ArrayList<>(); + inList.add(List.of(1)); + var builder = new NullableListWithNullableItemsListBuilder(inList); + Assert.assertEquals(inList, builder.build()); + + builder = new NullableListWithNullableItemsListBuilder(); + builder.add(List.of(1)); + Assert.assertEquals(inList, builder.build()); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java new file mode 100644 index 00000000000..a03c4d948dd --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java @@ -0,0 +1,46 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.FrozenList; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; + +public class ListSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final ListJsonSchema.ListJsonSchema1 listJsonSchema = ListJsonSchema.ListJsonSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + listJsonSchema, + null, + validationMetadata + )); + } + + @Test + public void testValidateList() throws ValidationException { + List inList = new ArrayList<>(); + inList.add("today"); + FrozenList<@Nullable Object> validatedValue = listJsonSchema.validate(inList, configuration); + ArrayList outList = new ArrayList<>(); + outList.add("today"); + Assert.assertEquals(validatedValue, outList); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java new file mode 100644 index 00000000000..7e9594bdef0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java @@ -0,0 +1,48 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.time.LocalDate; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; + +public class MapSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final MapJsonSchema.MapJsonSchema1 mapJsonSchema = MapJsonSchema.MapJsonSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + mapJsonSchema, + null, + validationMetadata + )); + } + + @Test + public void testValidateMap() throws ValidationException { + Map inMap = new LinkedHashMap<>(); + inMap.put("today", LocalDate.of(2017, 7, 21)); + FrozenMap<@Nullable Object> validatedValue = mapJsonSchema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("today", "2017-07-21"); + Assert.assertEquals(validatedValue, outMap); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java new file mode 100644 index 00000000000..1fc6ff86ce0 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java @@ -0,0 +1,41 @@ +package unit_test_api.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.LinkedHashSet; +import java.util.List; + +public class NullSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final NullJsonSchema.NullJsonSchema1 nullJsonSchema = NullJsonSchema.NullJsonSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + + @Test + @SuppressWarnings("nullness") + public void testValidateNull() throws ValidationException { + Void validatedValue = nullJsonSchema.validate(null, configuration); + Assert.assertNull(validatedValue); + } + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + nullJsonSchema, + Boolean.TRUE, + validationMetadata + )); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java new file mode 100644 index 00000000000..d3b94350533 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java @@ -0,0 +1,57 @@ +package unit_test_api.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.LinkedHashSet; +import java.util.List; + +public class NumberSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final NumberJsonSchema.NumberJsonSchema1 numberJsonSchema = NumberJsonSchema.NumberJsonSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @Test + public void testValidateInteger() throws ValidationException { + int validatedValue = numberJsonSchema.validate(1, configuration); + Assert.assertEquals(validatedValue, 1); + } + + @Test + public void testValidateLong() throws ValidationException { + long validatedValue = numberJsonSchema.validate(1L, configuration); + Assert.assertEquals(validatedValue, 1L); + } + + @Test + public void testValidateFloat() throws ValidationException { + float validatedValue = numberJsonSchema.validate(3.14f, configuration); + Assert.assertEquals(Float.compare(validatedValue, 3.14f), 0); + } + + @Test + public void testValidateDouble() throws ValidationException { + double validatedValue = numberJsonSchema.validate(3.14d, configuration); + Assert.assertEquals(Double.compare(validatedValue, 3.14d), 0); + } + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + numberJsonSchema, + null, + validationMetadata + )); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java new file mode 100644 index 00000000000..3a1309f26ba --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java @@ -0,0 +1,538 @@ +package unit_test_api.schemas; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.JsonSchemaInfo; +import unit_test_api.schemas.validation.FrozenMap; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.PropertyEntry; +import unit_test_api.schemas.validation.MapSchemaValidator; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +public class ObjectTypeSchemaTest { + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap { + } + public record ObjectWithPropsSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ObjectWithPropsSchemaBoxed { + } + public static class ObjectWithPropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithPropsSchemaBoxedMap> { + private static @Nullable ObjectWithPropsSchema instance = null; + private ObjectWithPropsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) + )) + ); + + } + + public static ObjectWithPropsSchema getInstance() { + if (instance == null) { + instance = new ObjectWithPropsSchema(); + } + return instance; + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ObjectWithPropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithPropsSchemaBoxedMap(validate(arg, configuration)); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return new ObjectWithPropsSchemaBoxedMap(validate(mapArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + } + + public sealed interface ObjectWithAddpropsSchemaBoxed permits ObjectWithAddpropsSchemaBoxedMap { + } + public record ObjectWithAddpropsSchemaBoxedMap(FrozenMap data) implements ObjectWithAddpropsSchemaBoxed { + } + + public static class ObjectWithAddpropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithAddpropsSchemaBoxedMap> { + private static @Nullable ObjectWithAddpropsSchema instance = null; + private ObjectWithAddpropsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .additionalProperties(StringJsonSchema.StringJsonSchema1.class) + ); + } + + public static ObjectWithAddpropsSchema getInstance() { + if (instance == null) { + instance = new ObjectWithAddpropsSchema(); + } + return instance; + } + + @Override + public FrozenMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + if (!(castValue instanceof String)) { + throw new RuntimeException("Invalid type for property value"); + } + properties.put(propertyName, (String) castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ObjectWithAddpropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithAddpropsSchemaBoxedMap(validate(arg, configuration)); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithAddpropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return new ObjectWithAddpropsSchemaBoxedMap(validate(mapArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + } + + public sealed interface ObjectWithPropsAndAddpropsSchemaBoxed permits ObjectWithPropsAndAddpropsSchemaBoxedMap { + } + public record ObjectWithPropsAndAddpropsSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ObjectWithPropsAndAddpropsSchemaBoxed { + } + public static class ObjectWithPropsAndAddpropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithPropsAndAddpropsSchemaBoxedMap> { + private static @Nullable ObjectWithPropsAndAddpropsSchema instance = null; + private ObjectWithPropsAndAddpropsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) + )) + .additionalProperties(BooleanJsonSchema.BooleanJsonSchema1.class) + ); + } + + public static ObjectWithPropsAndAddpropsSchema getInstance() { + if (instance == null) { + instance = new ObjectWithPropsAndAddpropsSchema(); + } + return instance; + } + + @Override + public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new FrozenMap<>(properties); + } + + public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ObjectWithPropsAndAddpropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithPropsAndAddpropsSchemaBoxedMap(validate(arg, configuration)); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithPropsAndAddpropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return new ObjectWithPropsAndAddpropsSchemaBoxedMap(validate(mapArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + } + + public static class ObjectWithOutputTypeSchemaMap extends FrozenMap<@Nullable Object> { + protected ObjectWithOutputTypeSchemaMap(FrozenMap<@Nullable Object> m) { + super(m); + } + + public static ObjectWithOutputTypeSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { + return ObjectWithOutputTypeSchema.getInstance().validate(arg, configuration); + } + } + + public sealed interface ObjectWithOutputTypeSchemaBoxed permits ObjectWithOutputTypeSchemaBoxedMap { + } + public record ObjectWithOutputTypeSchemaBoxedMap(ObjectWithOutputTypeSchemaMap data) implements ObjectWithOutputTypeSchemaBoxed { + } + public static class ObjectWithOutputTypeSchema extends JsonSchema implements MapSchemaValidator { + private static @Nullable ObjectWithOutputTypeSchema instance = null; + public ObjectWithOutputTypeSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) + )) + ); + } + + public static ObjectWithOutputTypeSchema getInstance() { + if (instance == null) { + instance = new ObjectWithOutputTypeSchema(); + } + return instance; + } + + @Override + public ObjectWithOutputTypeSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { + LinkedHashMap properties = new LinkedHashMap<>(); + for(Map.Entry entry: arg.entrySet()) { + @Nullable Object entryKey = entry.getKey(); + if (!(entryKey instanceof String)) { + throw new RuntimeException("Invalid non-string key value"); + } + String propertyName = (String) entryKey; + List propertyPathToItem = new ArrayList<>(pathToItem); + propertyPathToItem.add(propertyName); + Object value = entry.getValue(); + LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); + if (schemas == null) { + throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); + } + JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); + @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); + properties.put(propertyName, castValue); + } + return new ObjectWithOutputTypeSchemaMap(new FrozenMap<>(properties)); + } + + public ObjectWithOutputTypeSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { + Set> pathSet = new HashSet<>(); + List pathToItem = List.of("args[0"); + Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); + SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); + ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); + PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); + return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); + } + + @Override + public ObjectWithOutputTypeSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithOutputTypeSchemaBoxedMap(validate(arg, configuration)); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return validate((Map) arg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithOutputTypeSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return new ObjectWithOutputTypeSchemaBoxedMap(validate(mapArg, configuration)); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof FrozenMap) { + return getNewInstance((Map) arg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + } + + @Test + public void testExceptionThrownForInvalidType() { + ObjectWithPropsSchema schema = ObjectWithPropsSchema.getInstance(); + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + schema, + null, + validationMetadata + )); + } + + @Test + public void testValidateObjectWithPropsSchema() throws ValidationException { + ObjectWithPropsSchema schema = ObjectWithPropsSchema.getInstance(); + + // map with only property works + Map inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + FrozenMap<@Nullable Object> validatedValue = schema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + Assert.assertEquals(validatedValue, outMap); + + // map with additional unvalidated property works + inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + inMap.put("someOtherString", "def"); + validatedValue = schema.validate(inMap, configuration); + outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + outMap.put("someOtherString", "def"); + Assert.assertEquals(validatedValue, outMap); + + // invalid prop type fails + inMap = new LinkedHashMap<>(); + inMap.put("someString", 1); + Map finalInMap = inMap; + Assert.assertThrows(ValidationException.class, () -> schema.validate( + finalInMap, configuration + )); + } + + @Test + public void testValidateObjectWithAddpropsSchema() throws ValidationException { + ObjectWithAddpropsSchema schema = ObjectWithAddpropsSchema.getInstance(); + + // map with only property works + Map inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + FrozenMap validatedValue = schema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + Assert.assertEquals(validatedValue, outMap); + + // map with additional properties works + inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + inMap.put("someOtherString", "def"); + validatedValue = schema.validate(inMap, configuration); + outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + outMap.put("someOtherString", "def"); + Assert.assertEquals(validatedValue, outMap); + + // invalid addProp type fails + Map invalidInput = Map.of("someString", 1); + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + schema, + invalidInput, + validationMetadata + )); + } + + @Test + public void testValidateObjectWithPropsAndAddpropsSchema() throws ValidationException { + ObjectWithPropsAndAddpropsSchema schema = ObjectWithPropsAndAddpropsSchema.getInstance(); + + // map with only property works + Map inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + FrozenMap<@Nullable Object> validatedValue = schema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + Assert.assertEquals(validatedValue, outMap); + + // map with additional properties works + inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + inMap.put("someAddProp", true); + validatedValue = schema.validate(inMap, configuration); + outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + outMap.put("someAddProp", true); + Assert.assertEquals(validatedValue, outMap); + + // invalid prop type fails + inMap = new LinkedHashMap<>(); + inMap.put("someString", 1); + Map invalidPropMap = inMap; + Assert.assertThrows(ValidationException.class, () -> schema.validate( + invalidPropMap, configuration + )); + + // invalid addProp type fails + inMap = new LinkedHashMap<>(); + inMap.put("someAddProp", 1); + Map invalidAddpropMap = inMap; + Assert.assertThrows(ValidationException.class, () -> schema.validate( + invalidAddpropMap, configuration + )); + } + + @Test + public void testValidateObjectWithOutputTypeSchema() throws ValidationException { + ObjectWithOutputTypeSchema schema = ObjectWithOutputTypeSchema.getInstance(); + + // map with only property works + Map inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + ObjectWithOutputTypeSchemaMap validatedValue = schema.validate(inMap, configuration); + LinkedHashMap outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + Assert.assertEquals(validatedValue, outMap); + + // map with additional unvalidated property works + inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + inMap.put("someOtherString", "def"); + validatedValue = schema.validate(inMap, configuration); + outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + outMap.put("someOtherString", "def"); + Assert.assertEquals(validatedValue, outMap); + + // invalid prop type fails + inMap = new LinkedHashMap<>(); + inMap.put("someString", 1); + Map finalInMap = inMap; + Assert.assertThrows(ValidationException.class, () -> schema.validate( + finalInMap, configuration + )); + + // using output class directly works + inMap = new LinkedHashMap<>(); + inMap.put("someString", "abc"); + validatedValue = ObjectWithOutputTypeSchemaMap.of(inMap, configuration); + outMap = new LinkedHashMap<>(); + outMap.put("someString", "abc"); + Assert.assertEquals(validatedValue, outMap); + } +} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java new file mode 100644 index 00000000000..a22d9a04d8b --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java @@ -0,0 +1,49 @@ +package unit_test_api.schemas; + +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.validation.JsonSchema; +import unit_test_api.schemas.validation.PathToSchemasMap; +import unit_test_api.schemas.validation.ValidationMetadata; + +import java.util.LinkedHashSet; +import java.util.List; + +public class RefBooleanSchemaTest { + public static class RefBooleanSchema { + public static class RefBooleanSchema1 extends BooleanJsonSchema.BooleanJsonSchema1 {} + } + + static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); + static final BooleanJsonSchema.BooleanJsonSchema1 refBooleanJsonSchema = RefBooleanSchema.RefBooleanSchema1.getInstance(); + static final ValidationMetadata validationMetadata = new ValidationMetadata( + List.of("args[0"), + configuration, + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @Test + public void testValidateTrue() throws ValidationException { + Boolean validatedValue = refBooleanJsonSchema.validate(true, configuration); + Assert.assertEquals(validatedValue, Boolean.TRUE); + } + + @Test + public void testValidateFalse() throws ValidationException { + Boolean validatedValue = refBooleanJsonSchema.validate(false, configuration); + Assert.assertEquals(validatedValue, Boolean.FALSE); + } + + @Test + public void testExceptionThrownForInvalidType() { + Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( + refBooleanJsonSchema, + null, + validationMetadata + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java new file mode 100644 index 00000000000..c1f3537f565 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java @@ -0,0 +1,149 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.MapJsonSchema; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class AdditionalPropertiesValidatorTest { + public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap {} + public record ObjectWithPropsSchemaBoxedMap() implements ObjectWithPropsSchemaBoxed {} + + public static class ObjectWithPropsSchema extends JsonSchema { + private static @Nullable ObjectWithPropsSchema instance = null; + private ObjectWithPropsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(FrozenMap.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) + )) + .additionalProperties(StringJsonSchema.StringJsonSchema1.class) + ); + + } + + public static ObjectWithPropsSchema getInstance() { + if (instance == null) { + instance = new ObjectWithPropsSchema(); + } + return instance; + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map) { + return arg; + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map) { + return arg; + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithPropsSchemaBoxedMap(); + } + } + + @SuppressWarnings("nullness") + private Void assertNull(@Nullable Object object) { + Assert.assertNull(object); + return null; + } + + @Test + public void testCorrectPropertySucceeds() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("someString", "abc"); + mutableMap.put("someAddProp", "def"); + FrozenMap arg = new FrozenMap<>(mutableMap); + final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + ObjectWithPropsSchema.getInstance(), + arg, + validationMetadata + ) + ); + if (pathToSchemas == null) { + throw new RuntimeException("Invalid null value for pathToSchemas for this test case"); + } + List expectedPathToItem = new ArrayList<>(); + expectedPathToItem.add("args[0]"); + expectedPathToItem.add("someAddProp"); + LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); + StringJsonSchema.StringJsonSchema1 schema = JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class); + expectedClasses.put(schema, null); + PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); + expectedPathToSchemas.put(expectedPathToItem, expectedClasses); + Assert.assertEquals(pathToSchemas, expectedPathToSchemas); + } + + @Test + public void testNotApplicableTypeReturnsNull() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + MapJsonSchema.MapJsonSchema1.getInstance(), + 1, + validationMetadata + ) + ); + assertNull(pathToSchemas); + } + + @Test + public void testIncorrectPropertyValueFails() { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("someString", "abc"); + mutableMap.put("someAddProp", 1); + FrozenMap arg = new FrozenMap<>(mutableMap); + final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + ObjectWithPropsSchema.getInstance(), + arg, + validationMetadata + ) + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java new file mode 100644 index 00000000000..2e0409c107c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java @@ -0,0 +1,28 @@ +package unit_test_api.schemas.validation; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.time.ZoneId; +import org.junit.Assert; +import org.junit.Test; + +public final class CustomIsoparserTest { + + @Test + public void testParseIsodatetime() { + final CustomIsoparser parser = new CustomIsoparser(); + ZonedDateTime dateTime = parser.parseIsodatetime("2017-07-21T17:32:28Z"); + ZoneId zone = ZoneId.of("Z"); + ZonedDateTime expectedDateTime = ZonedDateTime.of(2017, 7, 21, 17, 32, 28, 0, zone); + Assert.assertEquals(dateTime, expectedDateTime); + } + + @Test + public void testParseIsodate() { + final CustomIsoparser parser = new CustomIsoparser(); + LocalDate date = parser.parseIsodate("2017-07-21"); + LocalDate expectedDate = LocalDate.of(2017, 7, 21); + Assert.assertEquals(date, expectedDate); + } + +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java new file mode 100644 index 00000000000..6561b154170 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java @@ -0,0 +1,363 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.IntJsonSchema; +import unit_test_api.schemas.Int32JsonSchema; +import unit_test_api.schemas.Int64JsonSchema; +import unit_test_api.schemas.FloatJsonSchema; +import unit_test_api.schemas.DoubleJsonSchema; +import unit_test_api.schemas.DecimalJsonSchema; +import unit_test_api.schemas.DateJsonSchema; +import unit_test_api.schemas.DateTimeJsonSchema; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.LinkedHashSet; + +public class FormatValidatorTest { + static final ValidationMetadata validationMetadata = new ValidationMetadata( + new ArrayList<>(), + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testIntFormatSucceedsWithFloat() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + IntJsonSchema.IntJsonSchema1.getInstance(), + 1.0f, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testIntFormatFailsWithFloat() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + IntJsonSchema.IntJsonSchema1.getInstance(), + 3.14f, + validationMetadata + ) + )); + } + + @Test + public void testIntFormatSucceedsWithInt() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + IntJsonSchema.IntJsonSchema1.getInstance(), + 1, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInt32UnderMinFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + Int32JsonSchema.Int32JsonSchema1.getInstance(), + -2147483649L, + validationMetadata + ) + )); + } + + @Test + public void testInt32InclusiveMinSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + Int32JsonSchema.Int32JsonSchema1.getInstance(), + -2147483648, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInt32InclusiveMaxSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + Int32JsonSchema.Int32JsonSchema1.getInstance(), + 2147483647, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInt32OverMaxFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + Int32JsonSchema.Int32JsonSchema1.getInstance(), + 2147483648L, + validationMetadata + ) + )); + } + + @Test + public void testInt64UnderMinFails() { + final FormatValidator validator = new FormatValidator(); + + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + Int64JsonSchema.Int64JsonSchema1.getInstance(), + new BigInteger("-9223372036854775809"), + validationMetadata + ) + )); + } + + @Test + public void testInt64InclusiveMinSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + Int64JsonSchema.Int64JsonSchema1.getInstance(), + -9223372036854775808L, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInt64InclusiveMaxSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + Int64JsonSchema.Int64JsonSchema1.getInstance(), + 9223372036854775807L, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInt64OverMaxFails() { + final FormatValidator validator = new FormatValidator(); + + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + Int64JsonSchema.Int64JsonSchema1.getInstance(), + new BigInteger("9223372036854775808"), + validationMetadata + ) + )); + } + + @Test + public void testFloatUnderMinFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + FloatJsonSchema.FloatJsonSchema1.getInstance(), + -3.402823466385289e+38d, + validationMetadata + ) + )); + } + + @Test + public void testFloatInclusiveMinSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + FloatJsonSchema.FloatJsonSchema1.getInstance(), + -3.4028234663852886e+38f, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testFloatInclusiveMaxSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + FloatJsonSchema.FloatJsonSchema1.getInstance(), + 3.4028234663852886e+38f, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testFloatOverMaxFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + FloatJsonSchema.FloatJsonSchema1.getInstance(), + 3.402823466385289e+38d, + validationMetadata + ) + )); + } + + @Test + public void testDoubleUnderMinFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + DoubleJsonSchema.DoubleJsonSchema1.getInstance(), + new BigDecimal("-1.7976931348623157082e+308"), + validationMetadata + ) + )); + } + + @Test + public void testDoubleInclusiveMinSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DoubleJsonSchema.DoubleJsonSchema1.getInstance(), + -1.7976931348623157E+308d, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testDoubleInclusiveMaxSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DoubleJsonSchema.DoubleJsonSchema1.getInstance(), + 1.7976931348623157E+308d, + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testDoubleOverMaxFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + DoubleJsonSchema.DoubleJsonSchema1.getInstance(), + new BigDecimal("1.7976931348623157082e+308"), + validationMetadata + ) + )); + } + + @Test + public void testInvalidNumberStringFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + DecimalJsonSchema.DecimalJsonSchema1.getInstance(), + "abc", + validationMetadata + ) + )); + } + + @Test + public void testValidFloatNumberStringSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DecimalJsonSchema.DecimalJsonSchema1.getInstance(), + "3.14", + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testValidIntNumberStringSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DecimalJsonSchema.DecimalJsonSchema1.getInstance(), + "1", + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInvalidDateStringFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + DateJsonSchema.DateJsonSchema1.getInstance(), + "abc", + validationMetadata + ) + )); + } + + @Test + public void testValidDateStringSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DateJsonSchema.DateJsonSchema1.getInstance(), + "2017-01-20", + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testInvalidDateTimeStringFails() { + final FormatValidator validator = new FormatValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + DateTimeJsonSchema.DateTimeJsonSchema1.getInstance(), + "abc", + validationMetadata + ) + )); + } + + @Test + public void testValidDateTimeStringSucceeds() throws ValidationException { + final FormatValidator validator = new FormatValidator(); + PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + DateTimeJsonSchema.DateTimeJsonSchema1.getInstance(), + "2017-07-21T17:32:28Z", + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java new file mode 100644 index 00000000000..0452126f357 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java @@ -0,0 +1,131 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.schemas.StringJsonSchema; +import unit_test_api.exceptions.ValidationException; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +public class ItemsValidatorTest { + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + public sealed interface ArrayWithItemsSchemaBoxed permits ArrayWithItemsSchemaBoxedList {} + public record ArrayWithItemsSchemaBoxedList() implements ArrayWithItemsSchemaBoxed {} + + public static class ArrayWithItemsSchema extends JsonSchema { + public ArrayWithItemsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(List.class)) + .items(StringJsonSchema.StringJsonSchema1.class) + ); + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof List listArg) { + return getNewInstance(listArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof List listArg) { + return validate(listArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ArrayWithItemsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + return new ArrayWithItemsSchemaBoxedList(); + } + } + + @Test + public void testCorrectItemsSucceeds() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + List mutableList = new ArrayList<>(); + mutableList.add("a"); + FrozenList arg = new FrozenList<>(mutableList); + final ItemsValidator validator = new ItemsValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ArrayWithItemsSchema(), + arg, + validationMetadata + ) + ); + if (pathToSchemas == null) { + throw new RuntimeException("Invalid null value in pathToSchemas for this test case"); + } + List expectedPathToItem = new ArrayList<>(); + expectedPathToItem.add("args[0]"); + expectedPathToItem.add(0); + LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); + StringJsonSchema.StringJsonSchema1 schema = JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class); + expectedClasses.put(schema, null); + PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); + expectedPathToSchemas.put(expectedPathToItem, expectedClasses); + Assert.assertEquals(pathToSchemas, expectedPathToSchemas); + } + + @Test + public void testNotApplicableTypeReturnsNull() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + final ItemsValidator validator = new ItemsValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ArrayWithItemsSchema(), + 1, + validationMetadata + ) + ); + assertNull(pathToSchemas); + } + + @Test + public void testIncorrectItemFails() { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + List mutableList = new ArrayList<>(); + mutableList.add(1); + FrozenList arg = new FrozenList<>(mutableList); + final ItemsValidator validator = new ItemsValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + new ArrayWithItemsSchema(), + arg, + validationMetadata + ) + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java new file mode 100644 index 00000000000..75ec0f18b1c --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java @@ -0,0 +1,80 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +sealed interface SomeSchemaBoxed permits SomeSchemaBoxedString {} +record SomeSchemaBoxedString() implements SomeSchemaBoxed {} + +public class JsonSchemaTest { + sealed interface SomeSchemaBoxed permits SomeSchemaBoxedString {} + record SomeSchemaBoxedString() implements SomeSchemaBoxed {} + + static class SomeSchema extends JsonSchema { + private static @Nullable SomeSchema instance = null; + protected SomeSchema() { + super(new JsonSchemaInfo() + .type(Set.of(String.class)) + ); + } + + public static SomeSchema getInstance() { + if (instance == null) { + instance = new SomeSchema(); + } + return instance; + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof String) { + return arg; + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof String) { + return arg; + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public SomeSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + return new SomeSchemaBoxedString(); + } + } + + @Test + public void testValidateSucceeds() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + SomeSchema schema = JsonSchemaFactory.getInstance(SomeSchema.class); + PathToSchemasMap pathToSchemas = JsonSchema.validate( + schema, + "hi", + validationMetadata + ); + PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); + LinkedHashMap, Void> validatedClasses = new LinkedHashMap<>(); + validatedClasses.put(schema, null); + expectedPathToSchemas.put(pathToItem, validatedClasses); + Assert.assertEquals(pathToSchemas, expectedPathToSchemas); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java new file mode 100644 index 00000000000..5d5e1e869ed --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java @@ -0,0 +1,134 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.StringJsonSchema; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class PropertiesValidatorTest { + public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap {} + public record ObjectWithPropsSchemaBoxedMap() implements ObjectWithPropsSchemaBoxed {} + + public static class ObjectWithPropsSchema extends JsonSchema { + private ObjectWithPropsSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .properties(Map.ofEntries( + new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) + )) + ); + + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map mapArg) { + return getNewInstance(mapArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return validate(mapArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithPropsSchemaBoxedMap(); + } + } + + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testCorrectPropertySucceeds() throws ValidationException { + final PropertiesValidator validator = new PropertiesValidator(); + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("someString", "abc"); + FrozenMap arg = new FrozenMap<>(mutableMap); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ObjectWithPropsSchema(), + arg, + validationMetadata + ) + ); + if (pathToSchemas == null) { + throw new RuntimeException("Invalid null value for pathToSchemas for this test case"); + } + List expectedPathToItem = new ArrayList<>(); + expectedPathToItem.add("args[0]"); + expectedPathToItem.add("someString"); + LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); + expectedClasses.put(JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class), null); + PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); + expectedPathToSchemas.put(expectedPathToItem, expectedClasses); + Assert.assertEquals(pathToSchemas, expectedPathToSchemas); + } + + @Test + public void testNotApplicableTypeReturnsNull() throws ValidationException { + final PropertiesValidator validator = new PropertiesValidator(); + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ObjectWithPropsSchema(), + 1, + validationMetadata + ) + ); + assertNull(pathToSchemas); + } + + @Test + public void testIncorrectPropertyValueFails() { + final PropertiesValidator validator = new PropertiesValidator(); + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("someString", 1); + FrozenMap arg = new FrozenMap<>(mutableMap); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + new ObjectWithPropsSchema(), + arg, + validationMetadata + ) + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java new file mode 100644 index 00000000000..d05368c05de --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java @@ -0,0 +1,120 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +public class RequiredValidatorTest { + public sealed interface ObjectWithRequiredSchemaBoxed permits ObjectWithRequiredSchemaBoxedMap {} + public record ObjectWithRequiredSchemaBoxedMap() implements ObjectWithRequiredSchemaBoxed {} + + public static class ObjectWithRequiredSchema extends JsonSchema { + private ObjectWithRequiredSchema() { + super(new JsonSchemaInfo() + .type(Set.of(Map.class)) + .required(Set.of("someString")) + ); + + } + + @Override + public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { + if (arg instanceof Map mapArg) { + return getNewInstance(mapArg, pathToItem, pathToSchemas); + } + throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); + } + + @Override + public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + if (arg instanceof Map mapArg) { + return validate(mapArg, configuration); + } + throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); + } + + @Override + public ObjectWithRequiredSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + return new ObjectWithRequiredSchemaBoxedMap(); + } + } + + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testCorrectPropertySucceeds() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("someString", "abc"); + FrozenMap arg = new FrozenMap<>(mutableMap); + final RequiredValidator validator = new RequiredValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ObjectWithRequiredSchema(), + arg, + validationMetadata + ) + ); + assertNull(pathToSchemas); + } + + @Test + public void testNotApplicableTypeReturnsNull() throws ValidationException { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + final RequiredValidator validator = new RequiredValidator(); + PathToSchemasMap pathToSchemas = validator.validate( + new ValidationData( + new ObjectWithRequiredSchema(), + 1, + validationMetadata + ) + ); + assertNull(pathToSchemas); + } + + @Test + public void testIncorrectPropertyFails() { + List pathToItem = List.of("args[0]"); + ValidationMetadata validationMetadata = new ValidationMetadata( + pathToItem, + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + LinkedHashMap mutableMap = new LinkedHashMap<>(); + mutableMap.put("aDifferentProp", 1); + FrozenMap arg = new FrozenMap<>(mutableMap); + final RequiredValidator validator = new RequiredValidator(); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + new ObjectWithRequiredSchema(), + arg, + validationMetadata + ) + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java new file mode 100644 index 00000000000..1938cf3d030 --- /dev/null +++ b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java @@ -0,0 +1,56 @@ +package unit_test_api.schemas.validation; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.junit.Assert; +import org.junit.Test; +import unit_test_api.configurations.JsonSchemaKeywordFlags; +import unit_test_api.configurations.SchemaConfiguration; +import unit_test_api.exceptions.ValidationException; +import unit_test_api.schemas.StringJsonSchema; + +import java.util.ArrayList; +import java.util.LinkedHashSet; + +public class TypeValidatorTest { + @SuppressWarnings("nullness") + private void assertNull(@Nullable Object object) { + Assert.assertNull(object); + } + + @Test + public void testValidateSucceeds() throws ValidationException { + final TypeValidator validator = new TypeValidator(); + ValidationMetadata validationMetadata = new ValidationMetadata( + new ArrayList<>(), + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + @Nullable PathToSchemasMap pathToSchemasMap = validator.validate( + new ValidationData( + StringJsonSchema.StringJsonSchema1.getInstance(), + "hi", + validationMetadata + ) + ); + assertNull(pathToSchemasMap); + } + + @Test + public void testValidateFailsIntIsNotString() { + final TypeValidator validator = new TypeValidator(); + ValidationMetadata validationMetadata = new ValidationMetadata( + new ArrayList<>(), + new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), + new PathToSchemasMap(), + new LinkedHashSet<>() + ); + Assert.assertThrows(ValidationException.class, () -> validator.validate( + new ValidationData( + StringJsonSchema.StringJsonSchema1.getInstance(), + 1, + validationMetadata + ) + )); + } +} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/python/.openapi-generator/FILES b/samples/client/3_1_0_unit_test/python/.openapi-generator/FILES index c824e4b9cc0..320885cd8f1 100644 --- a/samples/client/3_1_0_unit_test/python/.openapi-generator/FILES +++ b/samples/client/3_1_0_unit_test/python/.openapi-generator/FILES @@ -764,2942 +764,2942 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/openapi_client/__init__.py -src/openapi_client/api_client.py -src/openapi_client/api_response.py -src/openapi_client/apis/__init__.py -src/openapi_client/apis/path_to_api.py -src/openapi_client/apis/paths/__init__.py -src/openapi_client/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py -src/openapi_client/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_simple_types_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_complex_types_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_array_type_matches_arrays_request_body.py -src/openapi_client/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py -src/openapi_client/apis/paths/request_body_post_by_int_request_body.py -src/openapi_client/apis/paths/request_body_post_by_number_request_body.py -src/openapi_client/apis/paths/request_body_post_by_small_number_request_body.py -src/openapi_client/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py -src/openapi_client/apis/paths/request_body_post_contains_keyword_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py -src/openapi_client/apis/paths/request_body_post_date_format_request_body.py -src/openapi_client/apis/paths/request_body_post_date_time_format_request_body.py -src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py -src/openapi_client/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py -src/openapi_client/apis/paths/request_body_post_duration_format_request_body.py -src/openapi_client/apis/paths/request_body_post_email_format_request_body.py -src/openapi_client/apis/paths/request_body_post_empty_dependents_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py -src/openapi_client/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py -src/openapi_client/apis/paths/request_body_post_enums_in_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_float_division_inf_request_body.py -src/openapi_client/apis/paths/request_body_post_forbidden_property_request_body.py -src/openapi_client/apis/paths/request_body_post_hostname_format_request_body.py -src/openapi_client/apis/paths/request_body_post_idn_email_format_request_body.py -src/openapi_client/apis/paths/request_body_post_idn_hostname_format_request_body.py -src/openapi_client/apis/paths/request_body_post_if_and_else_without_then_request_body.py -src/openapi_client/apis/paths/request_body_post_if_and_then_without_else_request_body.py -src/openapi_client/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py -src/openapi_client/apis/paths/request_body_post_ignore_else_without_if_request_body.py -src/openapi_client/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py -src/openapi_client/apis/paths/request_body_post_ignore_then_without_if_request_body.py -src/openapi_client/apis/paths/request_body_post_integer_type_matches_integers_request_body.py -src/openapi_client/apis/paths/request_body_post_ipv4_format_request_body.py -src/openapi_client/apis/paths/request_body_post_ipv6_format_request_body.py -src/openapi_client/apis/paths/request_body_post_iri_format_request_body.py -src/openapi_client/apis/paths/request_body_post_iri_reference_format_request_body.py -src/openapi_client/apis/paths/request_body_post_items_contains_request_body.py -src/openapi_client/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py -src/openapi_client/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py -src/openapi_client/apis/paths/request_body_post_json_pointer_format_request_body.py -src/openapi_client/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py -src/openapi_client/apis/paths/request_body_post_maximum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py -src/openapi_client/apis/paths/request_body_post_maxitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maxlength_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py -src/openapi_client/apis/paths/request_body_post_maxproperties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py -src/openapi_client/apis/paths/request_body_post_minimum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py -src/openapi_client/apis/paths/request_body_post_minitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minlength_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_minproperties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_multiple_dependents_required_request_body.py -src/openapi_client/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py -src/openapi_client/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_items_request_body.py -src/openapi_client/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py -src/openapi_client/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py -src/openapi_client/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py -src/openapi_client/apis/paths/request_body_post_not_more_complex_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_not_multiple_types_request_body.py -src/openapi_client/apis/paths/request_body_post_not_request_body.py -src/openapi_client/apis/paths/request_body_post_nul_characters_in_strings_request_body.py -src/openapi_client/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py -src/openapi_client/apis/paths/request_body_post_number_type_matches_numbers_request_body.py -src/openapi_client/apis/paths/request_body_post_object_properties_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_object_type_matches_objects_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_complex_types_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_base_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_oneof_with_required_request_body.py -src/openapi_client/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py -src/openapi_client/apis/paths/request_body_post_pattern_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py -src/openapi_client/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py -src/openapi_client/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py -src/openapi_client/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py -src/openapi_client/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py -src/openapi_client/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py -src/openapi_client/apis/paths/request_body_post_propertynames_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_regex_format_request_body.py -src/openapi_client/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py -src/openapi_client/apis/paths/request_body_post_relative_json_pointer_format_request_body.py -src/openapi_client/apis/paths/request_body_post_required_default_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py -src/openapi_client/apis/paths/request_body_post_required_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_required_with_empty_array_request_body.py -src/openapi_client/apis/paths/request_body_post_required_with_escaped_characters_request_body.py -src/openapi_client/apis/paths/request_body_post_simple_enum_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_single_dependency_request_body.py -src/openapi_client/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py -src/openapi_client/apis/paths/request_body_post_string_type_matches_strings_request_body.py -src/openapi_client/apis/paths/request_body_post_time_format_request_body.py -src/openapi_client/apis/paths/request_body_post_type_array_object_or_null_request_body.py -src/openapi_client/apis/paths/request_body_post_type_array_or_object_request_body.py -src/openapi_client/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py -src/openapi_client/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_validation_request_body.py -src/openapi_client/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_format_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_reference_format_request_body.py -src/openapi_client/apis/paths/request_body_post_uri_template_format_request_body.py -src/openapi_client/apis/paths/request_body_post_uuid_format_request_body.py -src/openapi_client/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py -src/openapi_client/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_int_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_number_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_date_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_duration_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_email_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_iri_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_items_contains_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_not_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_regex_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_time_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py -src/openapi_client/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py -src/openapi_client/apis/tag_to_api.py -src/openapi_client/apis/tags/__init__.py -src/openapi_client/apis/tags/additional_properties_api.py -src/openapi_client/apis/tags/all_of_api.py -src/openapi_client/apis/tags/any_of_api.py -src/openapi_client/apis/tags/const_api.py -src/openapi_client/apis/tags/contains_api.py -src/openapi_client/apis/tags/content_type_json_api.py -src/openapi_client/apis/tags/dependent_required_api.py -src/openapi_client/apis/tags/dependent_schemas_api.py -src/openapi_client/apis/tags/enum_api.py -src/openapi_client/apis/tags/exclusive_maximum_api.py -src/openapi_client/apis/tags/exclusive_minimum_api.py -src/openapi_client/apis/tags/format_api.py -src/openapi_client/apis/tags/if_then_else_api.py -src/openapi_client/apis/tags/items_api.py -src/openapi_client/apis/tags/max_contains_api.py -src/openapi_client/apis/tags/max_items_api.py -src/openapi_client/apis/tags/max_length_api.py -src/openapi_client/apis/tags/max_properties_api.py -src/openapi_client/apis/tags/maximum_api.py -src/openapi_client/apis/tags/min_contains_api.py -src/openapi_client/apis/tags/min_items_api.py -src/openapi_client/apis/tags/min_length_api.py -src/openapi_client/apis/tags/min_properties_api.py -src/openapi_client/apis/tags/minimum_api.py -src/openapi_client/apis/tags/multiple_of_api.py -src/openapi_client/apis/tags/not_api.py -src/openapi_client/apis/tags/one_of_api.py -src/openapi_client/apis/tags/operation_request_body_api.py -src/openapi_client/apis/tags/path_post_api.py -src/openapi_client/apis/tags/pattern_api.py -src/openapi_client/apis/tags/pattern_properties_api.py -src/openapi_client/apis/tags/prefix_items_api.py -src/openapi_client/apis/tags/properties_api.py -src/openapi_client/apis/tags/property_names_api.py -src/openapi_client/apis/tags/ref_api.py -src/openapi_client/apis/tags/required_api.py -src/openapi_client/apis/tags/response_content_content_type_schema_api.py -src/openapi_client/apis/tags/type_api.py -src/openapi_client/apis/tags/unevaluated_items_api.py -src/openapi_client/apis/tags/unevaluated_properties_api.py -src/openapi_client/apis/tags/unique_items_api.py -src/openapi_client/components/__init__.py -src/openapi_client/components/schema/__init__.py -src/openapi_client/components/schema/a_schema_given_for_prefixitems.py -src/openapi_client/components/schema/additional_items_are_allowed_by_default.py -src/openapi_client/components/schema/additionalproperties_are_allowed_by_default.py -src/openapi_client/components/schema/additionalproperties_can_exist_by_itself.py -src/openapi_client/components/schema/additionalproperties_does_not_look_in_applicators.py -src/openapi_client/components/schema/additionalproperties_with_null_valued_instance_properties.py -src/openapi_client/components/schema/additionalproperties_with_schema.py -src/openapi_client/components/schema/allof.py -src/openapi_client/components/schema/allof_combined_with_anyof_oneof.py -src/openapi_client/components/schema/allof_simple_types.py -src/openapi_client/components/schema/allof_with_base_schema.py -src/openapi_client/components/schema/allof_with_one_empty_schema.py -src/openapi_client/components/schema/allof_with_the_first_empty_schema.py -src/openapi_client/components/schema/allof_with_the_last_empty_schema.py -src/openapi_client/components/schema/allof_with_two_empty_schemas.py -src/openapi_client/components/schema/anyof.py -src/openapi_client/components/schema/anyof_complex_types.py -src/openapi_client/components/schema/anyof_with_base_schema.py -src/openapi_client/components/schema/anyof_with_one_empty_schema.py -src/openapi_client/components/schema/array_type_matches_arrays.py -src/openapi_client/components/schema/boolean_type_matches_booleans.py -src/openapi_client/components/schema/by_int.py -src/openapi_client/components/schema/by_number.py -src/openapi_client/components/schema/by_small_number.py -src/openapi_client/components/schema/const_nul_characters_in_strings.py -src/openapi_client/components/schema/contains_keyword_validation.py -src/openapi_client/components/schema/contains_with_null_instance_elements.py -src/openapi_client/components/schema/date_format.py -src/openapi_client/components/schema/date_time_format.py -src/openapi_client/components/schema/dependent_schemas_dependencies_with_escaped_characters.py -src/openapi_client/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py -src/openapi_client/components/schema/dependent_schemas_single_dependency.py -src/openapi_client/components/schema/duration_format.py -src/openapi_client/components/schema/email_format.py -src/openapi_client/components/schema/empty_dependents.py -src/openapi_client/components/schema/enum_with0_does_not_match_false.py -src/openapi_client/components/schema/enum_with1_does_not_match_true.py -src/openapi_client/components/schema/enum_with_escaped_characters.py -src/openapi_client/components/schema/enum_with_false_does_not_match0.py -src/openapi_client/components/schema/enum_with_true_does_not_match1.py -src/openapi_client/components/schema/enums_in_properties.py -src/openapi_client/components/schema/exclusivemaximum_validation.py -src/openapi_client/components/schema/exclusiveminimum_validation.py -src/openapi_client/components/schema/float_division_inf.py -src/openapi_client/components/schema/forbidden_property.py -src/openapi_client/components/schema/hostname_format.py -src/openapi_client/components/schema/idn_email_format.py -src/openapi_client/components/schema/idn_hostname_format.py -src/openapi_client/components/schema/if_and_else_without_then.py -src/openapi_client/components/schema/if_and_then_without_else.py -src/openapi_client/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py -src/openapi_client/components/schema/ignore_else_without_if.py -src/openapi_client/components/schema/ignore_if_without_then_or_else.py -src/openapi_client/components/schema/ignore_then_without_if.py -src/openapi_client/components/schema/integer_type_matches_integers.py -src/openapi_client/components/schema/ipv4_format.py -src/openapi_client/components/schema/ipv6_format.py -src/openapi_client/components/schema/iri_format.py -src/openapi_client/components/schema/iri_reference_format.py -src/openapi_client/components/schema/items_contains.py -src/openapi_client/components/schema/items_does_not_look_in_applicators_valid_case.py -src/openapi_client/components/schema/items_with_null_instance_elements.py -src/openapi_client/components/schema/json_pointer_format.py -src/openapi_client/components/schema/maxcontains_without_contains_is_ignored.py -src/openapi_client/components/schema/maximum_validation.py -src/openapi_client/components/schema/maximum_validation_with_unsigned_integer.py -src/openapi_client/components/schema/maxitems_validation.py -src/openapi_client/components/schema/maxlength_validation.py -src/openapi_client/components/schema/maxproperties0_means_the_object_is_empty.py -src/openapi_client/components/schema/maxproperties_validation.py -src/openapi_client/components/schema/mincontains_without_contains_is_ignored.py -src/openapi_client/components/schema/minimum_validation.py -src/openapi_client/components/schema/minimum_validation_with_signed_integer.py -src/openapi_client/components/schema/minitems_validation.py -src/openapi_client/components/schema/minlength_validation.py -src/openapi_client/components/schema/minproperties_validation.py -src/openapi_client/components/schema/multiple_dependents_required.py -src/openapi_client/components/schema/multiple_simultaneous_patternproperties_are_validated.py -src/openapi_client/components/schema/multiple_types_can_be_specified_in_an_array.py -src/openapi_client/components/schema/nested_allof_to_check_validation_semantics.py -src/openapi_client/components/schema/nested_anyof_to_check_validation_semantics.py -src/openapi_client/components/schema/nested_items.py -src/openapi_client/components/schema/nested_oneof_to_check_validation_semantics.py -src/openapi_client/components/schema/non_ascii_pattern_with_additionalproperties.py -src/openapi_client/components/schema/non_interference_across_combined_schemas.py -src/openapi_client/components/schema/not.py -src/openapi_client/components/schema/not_more_complex_schema.py -src/openapi_client/components/schema/not_multiple_types.py -src/openapi_client/components/schema/nul_characters_in_strings.py -src/openapi_client/components/schema/null_type_matches_only_the_null_object.py -src/openapi_client/components/schema/number_type_matches_numbers.py -src/openapi_client/components/schema/object_properties_validation.py -src/openapi_client/components/schema/object_type_matches_objects.py -src/openapi_client/components/schema/oneof.py -src/openapi_client/components/schema/oneof_complex_types.py -src/openapi_client/components/schema/oneof_with_base_schema.py -src/openapi_client/components/schema/oneof_with_empty_schema.py -src/openapi_client/components/schema/oneof_with_required.py -src/openapi_client/components/schema/pattern_is_not_anchored.py -src/openapi_client/components/schema/pattern_validation.py -src/openapi_client/components/schema/patternproperties_validates_properties_matching_a_regex.py -src/openapi_client/components/schema/patternproperties_with_null_valued_instance_properties.py -src/openapi_client/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py -src/openapi_client/components/schema/prefixitems_with_null_instance_elements.py -src/openapi_client/components/schema/properties_patternproperties_additionalproperties_interaction.py -src/openapi_client/components/schema/properties_whose_names_are_javascript_object_property_names.py -src/openapi_client/components/schema/properties_with_escaped_characters.py -src/openapi_client/components/schema/properties_with_null_valued_instance_properties.py -src/openapi_client/components/schema/property_named_ref_that_is_not_a_reference.py -src/openapi_client/components/schema/propertynames_validation.py -src/openapi_client/components/schema/regex_format.py -src/openapi_client/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py -src/openapi_client/components/schema/relative_json_pointer_format.py -src/openapi_client/components/schema/required_default_validation.py -src/openapi_client/components/schema/required_properties_whose_names_are_javascript_object_property_names.py -src/openapi_client/components/schema/required_validation.py -src/openapi_client/components/schema/required_with_empty_array.py -src/openapi_client/components/schema/required_with_escaped_characters.py -src/openapi_client/components/schema/simple_enum_validation.py -src/openapi_client/components/schema/single_dependency.py -src/openapi_client/components/schema/small_multiple_of_large_integer.py -src/openapi_client/components/schema/string_type_matches_strings.py -src/openapi_client/components/schema/time_format.py -src/openapi_client/components/schema/type_array_object_or_null.py -src/openapi_client/components/schema/type_array_or_object.py -src/openapi_client/components/schema/type_as_array_with_one_item.py -src/openapi_client/components/schema/unevaluateditems_as_schema.py -src/openapi_client/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py -src/openapi_client/components/schema/unevaluateditems_with_items.py -src/openapi_client/components/schema/unevaluateditems_with_null_instance_elements.py -src/openapi_client/components/schema/unevaluatedproperties_not_affected_by_propertynames.py -src/openapi_client/components/schema/unevaluatedproperties_schema.py -src/openapi_client/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py -src/openapi_client/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py -src/openapi_client/components/schema/uniqueitems_false_validation.py -src/openapi_client/components/schema/uniqueitems_false_with_an_array_of_items.py -src/openapi_client/components/schema/uniqueitems_validation.py -src/openapi_client/components/schema/uniqueitems_with_an_array_of_items.py -src/openapi_client/components/schema/uri_format.py -src/openapi_client/components/schema/uri_reference_format.py -src/openapi_client/components/schema/uri_template_format.py -src/openapi_client/components/schema/uuid_format.py -src/openapi_client/components/schema/validate_against_correct_branch_then_vs_else.py -src/openapi_client/components/schemas/__init__.py -src/openapi_client/configurations/__init__.py -src/openapi_client/configurations/api_configuration.py -src/openapi_client/configurations/schema_configuration.py -src/openapi_client/exceptions.py -src/openapi_client/paths/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/operation.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/operation.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/operation.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/operation.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/operation.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/operation.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_not_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/operation.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/operation.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/operation.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/operation.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py -src/openapi_client/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/py.typed -src/openapi_client/rest.py -src/openapi_client/schemas/__init__.py -src/openapi_client/schemas/format.py -src/openapi_client/schemas/original_immutabledict.py -src/openapi_client/schemas/schema.py -src/openapi_client/schemas/schemas.py -src/openapi_client/schemas/validation.py -src/openapi_client/security_schemes.py -src/openapi_client/server.py -src/openapi_client/servers/__init__.py -src/openapi_client/servers/server_0.py -src/openapi_client/shared_imports/__init__.py -src/openapi_client/shared_imports/header_imports.py -src/openapi_client/shared_imports/operation_imports.py -src/openapi_client/shared_imports/response_imports.py -src/openapi_client/shared_imports/schema_imports.py -src/openapi_client/shared_imports/security_scheme_imports.py -src/openapi_client/shared_imports/server_imports.py +src/unit_test_api/__init__.py +src/unit_test_api/api_client.py +src/unit_test_api/api_response.py +src/unit_test_api/apis/__init__.py +src/unit_test_api/apis/path_to_api.py +src/unit_test_api/apis/paths/__init__.py +src/unit_test_api/apis/paths/request_body_post_a_schema_given_for_prefixitems_request_body.py +src/unit_test_api/apis/paths/request_body_post_additional_items_are_allowed_by_default_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_additionalproperties_with_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +src/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_int_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_number_request_body.py +src/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py +src/unit_test_api/apis/paths/request_body_post_const_nul_characters_in_strings_request_body.py +src/unit_test_api/apis/paths/request_body_post_contains_keyword_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_contains_with_null_instance_elements_request_body.py +src/unit_test_api/apis/paths/request_body_post_date_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.py +src/unit_test_api/apis/paths/request_body_post_dependent_schemas_single_dependency_request_body.py +src/unit_test_api/apis/paths/request_body_post_duration_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_email_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_empty_dependents_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +src/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +src/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_exclusivemaximum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_exclusiveminimum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_float_division_inf_request_body.py +src/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py +src/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_idn_email_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_idn_hostname_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_if_and_else_without_then_request_body.py +src/unit_test_api/apis/paths/request_body_post_if_and_then_without_else_request_body.py +src/unit_test_api/apis/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.py +src/unit_test_api/apis/paths/request_body_post_ignore_else_without_if_request_body.py +src/unit_test_api/apis/paths/request_body_post_ignore_if_without_then_or_else_request_body.py +src/unit_test_api/apis/paths/request_body_post_ignore_then_without_if_request_body.py +src/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +src/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_iri_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_iri_reference_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_items_contains_request_body.py +src/unit_test_api/apis/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body.py +src/unit_test_api/apis/paths/request_body_post_items_with_null_instance_elements_request_body.py +src/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body.py +src/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +src/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_mincontains_without_contains_is_ignored_request_body.py +src/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +src/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_multiple_dependents_required_request_body.py +src/unit_test_api/apis/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.py +src/unit_test_api/apis/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +src/unit_test_api/apis/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body.py +src/unit_test_api/apis/paths/request_body_post_non_interference_across_combined_schemas_request_body.py +src/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_not_multiple_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_not_request_body.py +src/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +src/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +src/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +src/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py +src/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +src/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.py +src/unit_test_api/apis/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_prefixitems_with_null_instance_elements_request_body.py +src/unit_test_api/apis/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.py +src/unit_test_api/apis/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.py +src/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_properties_with_null_valued_instance_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +src/unit_test_api/apis/paths/request_body_post_propertynames_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_regex_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.py +src/unit_test_api/apis/paths/request_body_post_relative_json_pointer_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py +src/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +src/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_single_dependency_request_body.py +src/unit_test_api/apis/paths/request_body_post_small_multiple_of_large_integer_request_body.py +src/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py +src/unit_test_api/apis/paths/request_body_post_time_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_type_array_object_or_null_request_body.py +src/unit_test_api/apis/paths/request_body_post_type_array_or_object_request_body.py +src/unit_test_api/apis/paths/request_body_post_type_as_array_with_one_item_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluateditems_as_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluateditems_with_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluatedproperties_schema_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.py +src/unit_test_api/apis/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py +src/unit_test_api/apis/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_uuid_format_request_body.py +src/unit_test_api/apis/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body.py +src/unit_test_api/apis/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_contains_keyword_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_date_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_duration_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_empty_dependents_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_float_division_inf_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_idn_email_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_idn_hostname_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_if_and_else_without_then_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_if_and_then_without_else_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ignore_else_without_if_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ignore_then_without_if_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_iri_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_iri_reference_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_items_contains_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_multiple_dependents_required_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_not_multiple_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_propertynames_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_regex_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_single_dependency_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_time_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_type_array_object_or_null_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_type_array_or_object_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_uuid_format_response_body_for_content_types.py +src/unit_test_api/apis/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.py +src/unit_test_api/apis/tag_to_api.py +src/unit_test_api/apis/tags/__init__.py +src/unit_test_api/apis/tags/additional_properties_api.py +src/unit_test_api/apis/tags/all_of_api.py +src/unit_test_api/apis/tags/any_of_api.py +src/unit_test_api/apis/tags/const_api.py +src/unit_test_api/apis/tags/contains_api.py +src/unit_test_api/apis/tags/content_type_json_api.py +src/unit_test_api/apis/tags/dependent_required_api.py +src/unit_test_api/apis/tags/dependent_schemas_api.py +src/unit_test_api/apis/tags/enum_api.py +src/unit_test_api/apis/tags/exclusive_maximum_api.py +src/unit_test_api/apis/tags/exclusive_minimum_api.py +src/unit_test_api/apis/tags/format_api.py +src/unit_test_api/apis/tags/if_then_else_api.py +src/unit_test_api/apis/tags/items_api.py +src/unit_test_api/apis/tags/max_contains_api.py +src/unit_test_api/apis/tags/max_items_api.py +src/unit_test_api/apis/tags/max_length_api.py +src/unit_test_api/apis/tags/max_properties_api.py +src/unit_test_api/apis/tags/maximum_api.py +src/unit_test_api/apis/tags/min_contains_api.py +src/unit_test_api/apis/tags/min_items_api.py +src/unit_test_api/apis/tags/min_length_api.py +src/unit_test_api/apis/tags/min_properties_api.py +src/unit_test_api/apis/tags/minimum_api.py +src/unit_test_api/apis/tags/multiple_of_api.py +src/unit_test_api/apis/tags/not_api.py +src/unit_test_api/apis/tags/one_of_api.py +src/unit_test_api/apis/tags/operation_request_body_api.py +src/unit_test_api/apis/tags/path_post_api.py +src/unit_test_api/apis/tags/pattern_api.py +src/unit_test_api/apis/tags/pattern_properties_api.py +src/unit_test_api/apis/tags/prefix_items_api.py +src/unit_test_api/apis/tags/properties_api.py +src/unit_test_api/apis/tags/property_names_api.py +src/unit_test_api/apis/tags/ref_api.py +src/unit_test_api/apis/tags/required_api.py +src/unit_test_api/apis/tags/response_content_content_type_schema_api.py +src/unit_test_api/apis/tags/type_api.py +src/unit_test_api/apis/tags/unevaluated_items_api.py +src/unit_test_api/apis/tags/unevaluated_properties_api.py +src/unit_test_api/apis/tags/unique_items_api.py +src/unit_test_api/components/__init__.py +src/unit_test_api/components/schema/__init__.py +src/unit_test_api/components/schema/a_schema_given_for_prefixitems.py +src/unit_test_api/components/schema/additional_items_are_allowed_by_default.py +src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py +src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py +src/unit_test_api/components/schema/additionalproperties_does_not_look_in_applicators.py +src/unit_test_api/components/schema/additionalproperties_with_null_valued_instance_properties.py +src/unit_test_api/components/schema/additionalproperties_with_schema.py +src/unit_test_api/components/schema/allof.py +src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py +src/unit_test_api/components/schema/allof_simple_types.py +src/unit_test_api/components/schema/allof_with_base_schema.py +src/unit_test_api/components/schema/allof_with_one_empty_schema.py +src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py +src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py +src/unit_test_api/components/schema/allof_with_two_empty_schemas.py +src/unit_test_api/components/schema/anyof.py +src/unit_test_api/components/schema/anyof_complex_types.py +src/unit_test_api/components/schema/anyof_with_base_schema.py +src/unit_test_api/components/schema/anyof_with_one_empty_schema.py +src/unit_test_api/components/schema/array_type_matches_arrays.py +src/unit_test_api/components/schema/boolean_type_matches_booleans.py +src/unit_test_api/components/schema/by_int.py +src/unit_test_api/components/schema/by_number.py +src/unit_test_api/components/schema/by_small_number.py +src/unit_test_api/components/schema/const_nul_characters_in_strings.py +src/unit_test_api/components/schema/contains_keyword_validation.py +src/unit_test_api/components/schema/contains_with_null_instance_elements.py +src/unit_test_api/components/schema/date_format.py +src/unit_test_api/components/schema/date_time_format.py +src/unit_test_api/components/schema/dependent_schemas_dependencies_with_escaped_characters.py +src/unit_test_api/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.py +src/unit_test_api/components/schema/dependent_schemas_single_dependency.py +src/unit_test_api/components/schema/duration_format.py +src/unit_test_api/components/schema/email_format.py +src/unit_test_api/components/schema/empty_dependents.py +src/unit_test_api/components/schema/enum_with0_does_not_match_false.py +src/unit_test_api/components/schema/enum_with1_does_not_match_true.py +src/unit_test_api/components/schema/enum_with_escaped_characters.py +src/unit_test_api/components/schema/enum_with_false_does_not_match0.py +src/unit_test_api/components/schema/enum_with_true_does_not_match1.py +src/unit_test_api/components/schema/enums_in_properties.py +src/unit_test_api/components/schema/exclusivemaximum_validation.py +src/unit_test_api/components/schema/exclusiveminimum_validation.py +src/unit_test_api/components/schema/float_division_inf.py +src/unit_test_api/components/schema/forbidden_property.py +src/unit_test_api/components/schema/hostname_format.py +src/unit_test_api/components/schema/idn_email_format.py +src/unit_test_api/components/schema/idn_hostname_format.py +src/unit_test_api/components/schema/if_and_else_without_then.py +src/unit_test_api/components/schema/if_and_then_without_else.py +src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py +src/unit_test_api/components/schema/ignore_else_without_if.py +src/unit_test_api/components/schema/ignore_if_without_then_or_else.py +src/unit_test_api/components/schema/ignore_then_without_if.py +src/unit_test_api/components/schema/integer_type_matches_integers.py +src/unit_test_api/components/schema/ipv4_format.py +src/unit_test_api/components/schema/ipv6_format.py +src/unit_test_api/components/schema/iri_format.py +src/unit_test_api/components/schema/iri_reference_format.py +src/unit_test_api/components/schema/items_contains.py +src/unit_test_api/components/schema/items_does_not_look_in_applicators_valid_case.py +src/unit_test_api/components/schema/items_with_null_instance_elements.py +src/unit_test_api/components/schema/json_pointer_format.py +src/unit_test_api/components/schema/maxcontains_without_contains_is_ignored.py +src/unit_test_api/components/schema/maximum_validation.py +src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py +src/unit_test_api/components/schema/maxitems_validation.py +src/unit_test_api/components/schema/maxlength_validation.py +src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py +src/unit_test_api/components/schema/maxproperties_validation.py +src/unit_test_api/components/schema/mincontains_without_contains_is_ignored.py +src/unit_test_api/components/schema/minimum_validation.py +src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py +src/unit_test_api/components/schema/minitems_validation.py +src/unit_test_api/components/schema/minlength_validation.py +src/unit_test_api/components/schema/minproperties_validation.py +src/unit_test_api/components/schema/multiple_dependents_required.py +src/unit_test_api/components/schema/multiple_simultaneous_patternproperties_are_validated.py +src/unit_test_api/components/schema/multiple_types_can_be_specified_in_an_array.py +src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py +src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py +src/unit_test_api/components/schema/nested_items.py +src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py +src/unit_test_api/components/schema/non_ascii_pattern_with_additionalproperties.py +src/unit_test_api/components/schema/non_interference_across_combined_schemas.py +src/unit_test_api/components/schema/not.py +src/unit_test_api/components/schema/not_more_complex_schema.py +src/unit_test_api/components/schema/not_multiple_types.py +src/unit_test_api/components/schema/nul_characters_in_strings.py +src/unit_test_api/components/schema/null_type_matches_only_the_null_object.py +src/unit_test_api/components/schema/number_type_matches_numbers.py +src/unit_test_api/components/schema/object_properties_validation.py +src/unit_test_api/components/schema/object_type_matches_objects.py +src/unit_test_api/components/schema/oneof.py +src/unit_test_api/components/schema/oneof_complex_types.py +src/unit_test_api/components/schema/oneof_with_base_schema.py +src/unit_test_api/components/schema/oneof_with_empty_schema.py +src/unit_test_api/components/schema/oneof_with_required.py +src/unit_test_api/components/schema/pattern_is_not_anchored.py +src/unit_test_api/components/schema/pattern_validation.py +src/unit_test_api/components/schema/patternproperties_validates_properties_matching_a_regex.py +src/unit_test_api/components/schema/patternproperties_with_null_valued_instance_properties.py +src/unit_test_api/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.py +src/unit_test_api/components/schema/prefixitems_with_null_instance_elements.py +src/unit_test_api/components/schema/properties_patternproperties_additionalproperties_interaction.py +src/unit_test_api/components/schema/properties_whose_names_are_javascript_object_property_names.py +src/unit_test_api/components/schema/properties_with_escaped_characters.py +src/unit_test_api/components/schema/properties_with_null_valued_instance_properties.py +src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py +src/unit_test_api/components/schema/propertynames_validation.py +src/unit_test_api/components/schema/regex_format.py +src/unit_test_api/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.py +src/unit_test_api/components/schema/relative_json_pointer_format.py +src/unit_test_api/components/schema/required_default_validation.py +src/unit_test_api/components/schema/required_properties_whose_names_are_javascript_object_property_names.py +src/unit_test_api/components/schema/required_validation.py +src/unit_test_api/components/schema/required_with_empty_array.py +src/unit_test_api/components/schema/required_with_escaped_characters.py +src/unit_test_api/components/schema/simple_enum_validation.py +src/unit_test_api/components/schema/single_dependency.py +src/unit_test_api/components/schema/small_multiple_of_large_integer.py +src/unit_test_api/components/schema/string_type_matches_strings.py +src/unit_test_api/components/schema/time_format.py +src/unit_test_api/components/schema/type_array_object_or_null.py +src/unit_test_api/components/schema/type_array_or_object.py +src/unit_test_api/components/schema/type_as_array_with_one_item.py +src/unit_test_api/components/schema/unevaluateditems_as_schema.py +src/unit_test_api/components/schema/unevaluateditems_depends_on_multiple_nested_contains.py +src/unit_test_api/components/schema/unevaluateditems_with_items.py +src/unit_test_api/components/schema/unevaluateditems_with_null_instance_elements.py +src/unit_test_api/components/schema/unevaluatedproperties_not_affected_by_propertynames.py +src/unit_test_api/components/schema/unevaluatedproperties_schema.py +src/unit_test_api/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.py +src/unit_test_api/components/schema/unevaluatedproperties_with_null_valued_instance_properties.py +src/unit_test_api/components/schema/uniqueitems_false_validation.py +src/unit_test_api/components/schema/uniqueitems_false_with_an_array_of_items.py +src/unit_test_api/components/schema/uniqueitems_validation.py +src/unit_test_api/components/schema/uniqueitems_with_an_array_of_items.py +src/unit_test_api/components/schema/uri_format.py +src/unit_test_api/components/schema/uri_reference_format.py +src/unit_test_api/components/schema/uri_template_format.py +src/unit_test_api/components/schema/uuid_format.py +src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py +src/unit_test_api/components/schemas/__init__.py +src/unit_test_api/configurations/__init__.py +src/unit_test_api/configurations/api_configuration.py +src/unit_test_api/configurations/schema_configuration.py +src/unit_test_api/exceptions.py +src/unit_test_api/paths/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_additionalproperties_with_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_int_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_number_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_const_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_contains_keyword_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_contains_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_date_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_dependent_schemas_single_dependency_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_duration_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_email_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_empty_dependents_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_exclusivemaximum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_exclusiveminimum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_float_division_inf_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_idn_email_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_idn_hostname_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_if_and_else_without_then_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_if_and_then_without_else_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ignore_else_without_if_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ignore_if_without_then_or_else_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ignore_then_without_if_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_iri_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_iri_reference_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_items_contains_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_items_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_multiple_dependents_required_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_non_interference_across_combined_schemas_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_not_multiple_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_not_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_not_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_propertynames_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_regex_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_relative_json_pointer_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_single_dependency_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_small_multiple_of_large_integer_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_time_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_type_array_object_or_null_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_type_array_or_object_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_type_as_array_with_one_item_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_as_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_schema_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_uuid_format_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/operation.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/request_body/content/application_json/schema.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/__init__.py +src/unit_test_api/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_date_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_duration_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_empty_dependents_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_float_division_inf_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_idn_email_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_iri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_iri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_items_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_not_multiple_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_propertynames_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_regex_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_single_dependency_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_time_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_type_array_or_object_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_uuid_format_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/operation.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/__init__.py +src/unit_test_api/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +src/unit_test_api/py.typed +src/unit_test_api/rest.py +src/unit_test_api/schemas/__init__.py +src/unit_test_api/schemas/format.py +src/unit_test_api/schemas/original_immutabledict.py +src/unit_test_api/schemas/schema.py +src/unit_test_api/schemas/schemas.py +src/unit_test_api/schemas/validation.py +src/unit_test_api/security_schemes.py +src/unit_test_api/server.py +src/unit_test_api/servers/__init__.py +src/unit_test_api/servers/server_0.py +src/unit_test_api/shared_imports/__init__.py +src/unit_test_api/shared_imports/header_imports.py +src/unit_test_api/shared_imports/operation_imports.py +src/unit_test_api/shared_imports/response_imports.py +src/unit_test_api/shared_imports/schema_imports.py +src/unit_test_api/shared_imports/security_scheme_imports.py +src/unit_test_api/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/3_1_0_unit_test/python/README.md b/samples/client/3_1_0_unit_test/python/README.md index 7af2e9e8d57..b0610841c43 100644 --- a/samples/client/3_1_0_unit_test/python/README.md +++ b/samples/client/3_1_0_unit_test/python/README.md @@ -1,4 +1,4 @@ -# openapi-client +# unit-test-api sample spec for testing openapi functionality, built from json schema tests for draft2020-12 This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/additional_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/additional_properties_api.md index d5c9dafe871..eb2aae44ff9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/additional_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/additional_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.additional_properties_api +unit_test_api.apis.tags.additional_properties_api # AdditionalPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md index 417b34edee4..a8fc70cc41f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/all_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.all_of_api +unit_test_api.apis.tags.all_of_api # AllOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md index 47da9b1b87e..db24138c8f9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/any_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.any_of_api +unit_test_api.apis.tags.any_of_api # AnyOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md index 70836b10bc2..d8d502a150e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/const_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.const_api +unit_test_api.apis.tags.const_api # ConstApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md index 2b6a6bfb42b..7bbc1479da7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/contains_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.contains_api +unit_test_api.apis.tags.contains_api # ContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md index 99960614703..0f5e3582655 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/content_type_json_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.content_type_json_api +unit_test_api.apis.tags.content_type_json_api # ContentTypeJsonApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md index 7b053703dbc..4eedf6dda5d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_required_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.dependent_required_api +unit_test_api.apis.tags.dependent_required_api # DependentRequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md index 15b50a839c1..55bb8085e68 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/dependent_schemas_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.dependent_schemas_api +unit_test_api.apis.tags.dependent_schemas_api # DependentSchemasApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md index 9ed8b5a134b..529224b8e7b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/enum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.enum_api +unit_test_api.apis.tags.enum_api # EnumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md index 509aa30fb84..709a1555810 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_maximum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.exclusive_maximum_api +unit_test_api.apis.tags.exclusive_maximum_api # ExclusiveMaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md index a7dfc115b36..2172830756c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/exclusive_minimum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.exclusive_minimum_api +unit_test_api.apis.tags.exclusive_minimum_api # ExclusiveMinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md index d81fbbda89c..ef542859709 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/format_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.format_api +unit_test_api.apis.tags.format_api # FormatApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md index c82e2f4e325..4d337911a9f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/if_then_else_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.if_then_else_api +unit_test_api.apis.tags.if_then_else_api # IfThenElseApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md index f4c3068b899..46ed698566d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.items_api +unit_test_api.apis.tags.items_api # ItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md index 590ce29e231..b34c8a41d8a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_contains_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_contains_api +unit_test_api.apis.tags.max_contains_api # MaxContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md index fa7a6b881ab..3c2f39b81d9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_items_api +unit_test_api.apis.tags.max_items_api # MaxItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md index e50f6427b47..581d53251b9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_length_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_length_api +unit_test_api.apis.tags.max_length_api # MaxLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md index 7c7f221dc03..6274432bfaf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/max_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.max_properties_api +unit_test_api.apis.tags.max_properties_api # MaxPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md index f93c66a5928..431e5c64ad4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/maximum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.maximum_api +unit_test_api.apis.tags.maximum_api # MaximumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md index 7d920de789d..c95fdd9fb95 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_contains_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_contains_api +unit_test_api.apis.tags.min_contains_api # MinContainsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md index 189af58359c..eac5307be28 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_items_api +unit_test_api.apis.tags.min_items_api # MinItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md index bf1b6a0c13c..76d6f3acdbe 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_length_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_length_api +unit_test_api.apis.tags.min_length_api # MinLengthApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md index 861a30f1b6d..fc7595be9e2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/min_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.min_properties_api +unit_test_api.apis.tags.min_properties_api # MinPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md index 671bbf4f58d..62d9b842e22 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/minimum_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.minimum_api +unit_test_api.apis.tags.minimum_api # MinimumApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md index f5cc8bf8f58..30e9df4678a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/multiple_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.multiple_of_api +unit_test_api.apis.tags.multiple_of_api # MultipleOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md index 5fb0d554c2d..44eb9af9be5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.not_api +unit_test_api.apis.tags.not_api # NotApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md index 58d2f471203..42058af96dd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/one_of_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.one_of_api +unit_test_api.apis.tags.one_of_api # OneOfApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md index 79fb29ff85e..b35465bed3e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/operation_request_body_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.operation_request_body_api +unit_test_api.apis.tags.operation_request_body_api # OperationRequestBodyApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md index 36a48d24570..9a244cbd21c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/path_post_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.path_post_api +unit_test_api.apis.tags.path_post_api # PathPostApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md index 12cd14bde98..e36a5db710f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.pattern_api +unit_test_api.apis.tags.pattern_api # PatternApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md index a54ab2ae660..31a41a06c16 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/pattern_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.pattern_properties_api +unit_test_api.apis.tags.pattern_properties_api # PatternPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md index c242a9853d9..f630d8bd73c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/prefix_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.prefix_items_api +unit_test_api.apis.tags.prefix_items_api # PrefixItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md index 0996cc914a7..121308a9060 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.properties_api +unit_test_api.apis.tags.properties_api # PropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md index 42996ed659f..eac6996a414 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/property_names_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.property_names_api +unit_test_api.apis.tags.property_names_api # PropertyNamesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md index 8fb305b5258..17c53242bc0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/ref_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.ref_api +unit_test_api.apis.tags.ref_api # RefApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md index 42663e9672c..1dabd60a970 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/required_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.required_api +unit_test_api.apis.tags.required_api # RequiredApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md index 311d144e694..8c88b7ee305 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/response_content_content_type_schema_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.response_content_content_type_schema_api +unit_test_api.apis.tags.response_content_content_type_schema_api # ResponseContentContentTypeSchemaApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md index e27e4447bf2..f616926f4a5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/type_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.type_api +unit_test_api.apis.tags.type_api # TypeApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md index bee132b3551..7442b21b474 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.unevaluated_items_api +unit_test_api.apis.tags.unevaluated_items_api # UnevaluatedItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md index 37dfe294e65..8c9b70ce875 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unevaluated_properties_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.unevaluated_properties_api +unit_test_api.apis.tags.unevaluated_properties_api # UnevaluatedPropertiesApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md index 964c46751b3..92f9cb2529c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md +++ b/samples/client/3_1_0_unit_test/python/docs/apis/tags/unique_items_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.unique_items_api +unit_test_api.apis.tags.unique_items_api # UniqueItemsApi All URIs are relative to the selected server diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md index 9587a19673d..b9fa7ced2cb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/a_schema_given_for_prefixitems.md @@ -1,5 +1,5 @@ # ASchemaGivenForPrefixitems -openapi_client.components.schema.a_schema_given_for_prefixitems +unit_test_api.components.schema.a_schema_given_for_prefixitems ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md index 13128baed7a..4506f70cedb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additional_items_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalItemsAreAllowedByDefault -openapi_client.components.schema.additional_items_are_allowed_by_default +unit_test_api.components.schema.additional_items_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md index c26435c74a3..8dd38499643 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_are_allowed_by_default.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -openapi_client.components.schema.additionalproperties_are_allowed_by_default +unit_test_api.components.schema.additionalproperties_are_allowed_by_default ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md index fbb9f34b100..91734799218 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -openapi_client.components.schema.additionalproperties_can_exist_by_itself +unit_test_api.components.schema.additionalproperties_can_exist_by_itself ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md index de4fb640776..683059023c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_does_not_look_in_applicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesDoesNotLookInApplicators -openapi_client.components.schema.additionalproperties_does_not_look_in_applicators +unit_test_api.components.schema.additionalproperties_does_not_look_in_applicators ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md index cadf11fe8da..7b25a19e73b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithNullValuedInstanceProperties -openapi_client.components.schema.additionalproperties_with_null_valued_instance_properties +unit_test_api.components.schema.additionalproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md index 5fa5ef248e2..714cd074cdc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/additionalproperties_with_schema.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithSchema -openapi_client.components.schema.additionalproperties_with_schema +unit_test_api.components.schema.additionalproperties_with_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md index 17aff8377b3..dba78598a7f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof.md @@ -1,5 +1,5 @@ # Allof -openapi_client.components.schema.allof +unit_test_api.components.schema.allof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md index ba71a7fa107..5c3d9d5885c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_combined_with_anyof_oneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -openapi_client.components.schema.allof_combined_with_anyof_oneof +unit_test_api.components.schema.allof_combined_with_anyof_oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md index 63e6fc23071..9253a5b8437 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_simple_types.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -openapi_client.components.schema.allof_simple_types +unit_test_api.components.schema.allof_simple_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md index e4d86154e75..cc5d8d960b8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_base_schema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -openapi_client.components.schema.allof_with_base_schema +unit_test_api.components.schema.allof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md index 79097635223..5cf9db40ba4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -openapi_client.components.schema.allof_with_one_empty_schema +unit_test_api.components.schema.allof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md index 5c2b8248e88..356803ec24c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_first_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -openapi_client.components.schema.allof_with_the_first_empty_schema +unit_test_api.components.schema.allof_with_the_first_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md index 40a9ccfae05..1b2e4fb7e53 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_the_last_empty_schema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -openapi_client.components.schema.allof_with_the_last_empty_schema +unit_test_api.components.schema.allof_with_the_last_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md index 699a57ce756..aa9c99a101f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/allof_with_two_empty_schemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -openapi_client.components.schema.allof_with_two_empty_schemas +unit_test_api.components.schema.allof_with_two_empty_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md index ef4898eb423..042780da106 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof.md @@ -1,5 +1,5 @@ # Anyof -openapi_client.components.schema.anyof +unit_test_api.components.schema.anyof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md index 763d73b2aab..2c3cdca3cfd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_complex_types.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -openapi_client.components.schema.anyof_complex_types +unit_test_api.components.schema.anyof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md index ea33c52d4a2..5c150ef6fa1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_base_schema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -openapi_client.components.schema.anyof_with_base_schema +unit_test_api.components.schema.anyof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md index c634c1d761c..d4243c366e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/anyof_with_one_empty_schema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -openapi_client.components.schema.anyof_with_one_empty_schema +unit_test_api.components.schema.anyof_with_one_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md index 7efbfb9da9f..f4d1f115977 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/array_type_matches_arrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -openapi_client.components.schema.array_type_matches_arrays +unit_test_api.components.schema.array_type_matches_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md index ccf66cfebdb..40353276217 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/boolean_type_matches_booleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -openapi_client.components.schema.boolean_type_matches_booleans +unit_test_api.components.schema.boolean_type_matches_booleans ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md index ba7c4b17f7f..1945ad2240f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_int.md @@ -1,5 +1,5 @@ # ByInt -openapi_client.components.schema.by_int +unit_test_api.components.schema.by_int ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md index 0851beb6291..46ce873dcf1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_number.md @@ -1,5 +1,5 @@ # ByNumber -openapi_client.components.schema.by_number +unit_test_api.components.schema.by_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md index 2621ab7ee8f..e69123a95f8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/by_small_number.md @@ -1,5 +1,5 @@ # BySmallNumber -openapi_client.components.schema.by_small_number +unit_test_api.components.schema.by_small_number ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md index c64502d133b..e8001cd0268 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/const_nul_characters_in_strings.md @@ -1,5 +1,5 @@ # ConstNulCharactersInStrings -openapi_client.components.schema.const_nul_characters_in_strings +unit_test_api.components.schema.const_nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md index 836711cd472..3f38ed66a5a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_keyword_validation.md @@ -1,5 +1,5 @@ # ContainsKeywordValidation -openapi_client.components.schema.contains_keyword_validation +unit_test_api.components.schema.contains_keyword_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md index c11cfa2c05f..e9f248a1291 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/contains_with_null_instance_elements.md @@ -1,5 +1,5 @@ # ContainsWithNullInstanceElements -openapi_client.components.schema.contains_with_null_instance_elements +unit_test_api.components.schema.contains_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md index 6b31bb526f0..b8cac14f730 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_format.md @@ -1,5 +1,5 @@ # DateFormat -openapi_client.components.schema.date_format +unit_test_api.components.schema.date_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md index 4280a29b11e..672d9536be7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/date_time_format.md @@ -1,5 +1,5 @@ # DateTimeFormat -openapi_client.components.schema.date_time_format +unit_test_api.components.schema.date_time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md index 04b3a50fa51..31836342fba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependencies_with_escaped_characters.md @@ -1,5 +1,5 @@ # DependentSchemasDependenciesWithEscapedCharacters -openapi_client.components.schema.dependent_schemas_dependencies_with_escaped_characters +unit_test_api.components.schema.dependent_schemas_dependencies_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md index be5cedd2c62..3fb18b118c4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_dependent_subschema_incompatible_with_root.md @@ -1,5 +1,5 @@ # DependentSchemasDependentSubschemaIncompatibleWithRoot -openapi_client.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root +unit_test_api.components.schema.dependent_schemas_dependent_subschema_incompatible_with_root ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md index 64d1a285734..b39875c1ce0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/dependent_schemas_single_dependency.md @@ -1,5 +1,5 @@ # DependentSchemasSingleDependency -openapi_client.components.schema.dependent_schemas_single_dependency +unit_test_api.components.schema.dependent_schemas_single_dependency ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md index d755ae7034e..e0b483a4460 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/duration_format.md @@ -1,5 +1,5 @@ # DurationFormat -openapi_client.components.schema.duration_format +unit_test_api.components.schema.duration_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md index 0ffd547dadd..19c83e8d25b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/email_format.md @@ -1,5 +1,5 @@ # EmailFormat -openapi_client.components.schema.email_format +unit_test_api.components.schema.email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md index 01e2cbb83dd..c1e8220de4b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/empty_dependents.md @@ -1,5 +1,5 @@ # EmptyDependents -openapi_client.components.schema.empty_dependents +unit_test_api.components.schema.empty_dependents ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md index ed83e936da4..15b5dc53b6e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with0_does_not_match_false.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -openapi_client.components.schema.enum_with0_does_not_match_false +unit_test_api.components.schema.enum_with0_does_not_match_false ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md index 2025ed9ff16..6615b73908f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with1_does_not_match_true.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -openapi_client.components.schema.enum_with1_does_not_match_true +unit_test_api.components.schema.enum_with1_does_not_match_true ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md index c0a9f43b53d..3c0ea810a81 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_escaped_characters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -openapi_client.components.schema.enum_with_escaped_characters +unit_test_api.components.schema.enum_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md index 212e10809ad..fdc3978854d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_false_does_not_match0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -openapi_client.components.schema.enum_with_false_does_not_match0 +unit_test_api.components.schema.enum_with_false_does_not_match0 ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md index 8710e6dfd45..b77e0d0ce8c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enum_with_true_does_not_match1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -openapi_client.components.schema.enum_with_true_does_not_match1 +unit_test_api.components.schema.enum_with_true_does_not_match1 ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md index cd9a1e817aa..70957943d7e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/enums_in_properties.md @@ -1,5 +1,5 @@ # EnumsInProperties -openapi_client.components.schema.enums_in_properties +unit_test_api.components.schema.enums_in_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md index f008495c4b4..09f075daee1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusivemaximum_validation.md @@ -1,5 +1,5 @@ # ExclusivemaximumValidation -openapi_client.components.schema.exclusivemaximum_validation +unit_test_api.components.schema.exclusivemaximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md index bc9b678e2b2..c5109fc199d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/exclusiveminimum_validation.md @@ -1,5 +1,5 @@ # ExclusiveminimumValidation -openapi_client.components.schema.exclusiveminimum_validation +unit_test_api.components.schema.exclusiveminimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md index 5e84e1aa02f..710791b201d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/float_division_inf.md @@ -1,5 +1,5 @@ # FloatDivisionInf -openapi_client.components.schema.float_division_inf +unit_test_api.components.schema.float_division_inf ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md index 578716cefa4..f1d695dc38b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/forbidden_property.md @@ -1,5 +1,5 @@ # ForbiddenProperty -openapi_client.components.schema.forbidden_property +unit_test_api.components.schema.forbidden_property ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md index 7e9e71ee21d..df9411b9603 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/hostname_format.md @@ -1,5 +1,5 @@ # HostnameFormat -openapi_client.components.schema.hostname_format +unit_test_api.components.schema.hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md index 8fb0d84a0dc..162a2bb916b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_email_format.md @@ -1,5 +1,5 @@ # IdnEmailFormat -openapi_client.components.schema.idn_email_format +unit_test_api.components.schema.idn_email_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md index dafa3f74f24..aabda8772c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/idn_hostname_format.md @@ -1,5 +1,5 @@ # IdnHostnameFormat -openapi_client.components.schema.idn_hostname_format +unit_test_api.components.schema.idn_hostname_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md index 4cc7de16f1e..8e60df47f91 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_else_without_then.md @@ -1,5 +1,5 @@ # IfAndElseWithoutThen -openapi_client.components.schema.if_and_else_without_then +unit_test_api.components.schema.if_and_else_without_then ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md index 8805187fdc4..b793ed2938b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_and_then_without_else.md @@ -1,5 +1,5 @@ # IfAndThenWithoutElse -openapi_client.components.schema.if_and_then_without_else +unit_test_api.components.schema.if_and_then_without_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md index 1ec3423219d..df389c370b0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.md @@ -1,5 +1,5 @@ # IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence -openapi_client.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence +unit_test_api.components.schema.if_appears_at_the_end_when_serialized_keyword_processing_sequence ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md index b50938cc9fa..ea607ce3d29 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_else_without_if.md @@ -1,5 +1,5 @@ # IgnoreElseWithoutIf -openapi_client.components.schema.ignore_else_without_if +unit_test_api.components.schema.ignore_else_without_if ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md index 12af7f09089..3839a641431 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_if_without_then_or_else.md @@ -1,5 +1,5 @@ # IgnoreIfWithoutThenOrElse -openapi_client.components.schema.ignore_if_without_then_or_else +unit_test_api.components.schema.ignore_if_without_then_or_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md index cbe8d29f8ef..44657030040 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ignore_then_without_if.md @@ -1,5 +1,5 @@ # IgnoreThenWithoutIf -openapi_client.components.schema.ignore_then_without_if +unit_test_api.components.schema.ignore_then_without_if ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md index 011382ff502..6630731f225 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/integer_type_matches_integers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -openapi_client.components.schema.integer_type_matches_integers +unit_test_api.components.schema.integer_type_matches_integers ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md index 4d85e2dfc50..78d8cc1092c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv4_format.md @@ -1,5 +1,5 @@ # Ipv4Format -openapi_client.components.schema.ipv4_format +unit_test_api.components.schema.ipv4_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md index ddfd419ea10..a72f9736166 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/ipv6_format.md @@ -1,5 +1,5 @@ # Ipv6Format -openapi_client.components.schema.ipv6_format +unit_test_api.components.schema.ipv6_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md index 34427b55b3e..d2c2ac19dbc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_format.md @@ -1,5 +1,5 @@ # IriFormat -openapi_client.components.schema.iri_format +unit_test_api.components.schema.iri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md index d2382f13ddb..edac7f8814a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/iri_reference_format.md @@ -1,5 +1,5 @@ # IriReferenceFormat -openapi_client.components.schema.iri_reference_format +unit_test_api.components.schema.iri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md index c2b2e0b6ecf..ca8b1a4ab42 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_contains.md @@ -1,5 +1,5 @@ # ItemsContains -openapi_client.components.schema.items_contains +unit_test_api.components.schema.items_contains ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md index 356c0b7d441..4927b50ce1a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_does_not_look_in_applicators_valid_case.md @@ -1,5 +1,5 @@ # ItemsDoesNotLookInApplicatorsValidCase -openapi_client.components.schema.items_does_not_look_in_applicators_valid_case +unit_test_api.components.schema.items_does_not_look_in_applicators_valid_case ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md index 6dd5a05bd82..3922bc7e409 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/items_with_null_instance_elements.md @@ -1,5 +1,5 @@ # ItemsWithNullInstanceElements -openapi_client.components.schema.items_with_null_instance_elements +unit_test_api.components.schema.items_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md index 14b8237cdc1..98e8b61825c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/json_pointer_format.md @@ -1,5 +1,5 @@ # JsonPointerFormat -openapi_client.components.schema.json_pointer_format +unit_test_api.components.schema.json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md index a58c9c99271..47b8eb381f5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxcontains_without_contains_is_ignored.md @@ -1,5 +1,5 @@ # MaxcontainsWithoutContainsIsIgnored -openapi_client.components.schema.maxcontains_without_contains_is_ignored +unit_test_api.components.schema.maxcontains_without_contains_is_ignored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md index e2d0d04a242..378b58f8023 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation.md @@ -1,5 +1,5 @@ # MaximumValidation -openapi_client.components.schema.maximum_validation +unit_test_api.components.schema.maximum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md index 99f6aba50fb..d67df0a95ec 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maximum_validation_with_unsigned_integer.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -openapi_client.components.schema.maximum_validation_with_unsigned_integer +unit_test_api.components.schema.maximum_validation_with_unsigned_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md index cad99d77c77..e7b2d56546b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxitems_validation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -openapi_client.components.schema.maxitems_validation +unit_test_api.components.schema.maxitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md index 681922c6d72..5f3a102065f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxlength_validation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -openapi_client.components.schema.maxlength_validation +unit_test_api.components.schema.maxlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md index 15bb489c9b0..5477108f943 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties0_means_the_object_is_empty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -openapi_client.components.schema.maxproperties0_means_the_object_is_empty +unit_test_api.components.schema.maxproperties0_means_the_object_is_empty ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md index a949f7516bf..cd9d2b02984 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/maxproperties_validation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -openapi_client.components.schema.maxproperties_validation +unit_test_api.components.schema.maxproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md index b8989294172..2ee43a35728 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/mincontains_without_contains_is_ignored.md @@ -1,5 +1,5 @@ # MincontainsWithoutContainsIsIgnored -openapi_client.components.schema.mincontains_without_contains_is_ignored +unit_test_api.components.schema.mincontains_without_contains_is_ignored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md index 50e38f4b416..d90d5b573de 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation.md @@ -1,5 +1,5 @@ # MinimumValidation -openapi_client.components.schema.minimum_validation +unit_test_api.components.schema.minimum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md index 75dba36ce70..b3c9f3dba7f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minimum_validation_with_signed_integer.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -openapi_client.components.schema.minimum_validation_with_signed_integer +unit_test_api.components.schema.minimum_validation_with_signed_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md index 9e2902ac5dc..76b3b846a9f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minitems_validation.md @@ -1,5 +1,5 @@ # MinitemsValidation -openapi_client.components.schema.minitems_validation +unit_test_api.components.schema.minitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md index f4eec7c22e6..149cd02b965 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minlength_validation.md @@ -1,5 +1,5 @@ # MinlengthValidation -openapi_client.components.schema.minlength_validation +unit_test_api.components.schema.minlength_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md index 9bfa96bb61b..87f643e4e40 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/minproperties_validation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -openapi_client.components.schema.minproperties_validation +unit_test_api.components.schema.minproperties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md index 69343ea00d4..f2d3a0b03f9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_dependents_required.md @@ -1,5 +1,5 @@ # MultipleDependentsRequired -openapi_client.components.schema.multiple_dependents_required +unit_test_api.components.schema.multiple_dependents_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md index b8375ae2dda..b42dd4f0758 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_simultaneous_patternproperties_are_validated.md @@ -1,5 +1,5 @@ # MultipleSimultaneousPatternpropertiesAreValidated -openapi_client.components.schema.multiple_simultaneous_patternproperties_are_validated +unit_test_api.components.schema.multiple_simultaneous_patternproperties_are_validated ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md index a6e3e451d2d..62e07008e94 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/multiple_types_can_be_specified_in_an_array.md @@ -1,5 +1,5 @@ # MultipleTypesCanBeSpecifiedInAnArray -openapi_client.components.schema.multiple_types_can_be_specified_in_an_array +unit_test_api.components.schema.multiple_types_can_be_specified_in_an_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md index 27517ae43a8..216fa2e6bbc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_allof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -openapi_client.components.schema.nested_allof_to_check_validation_semantics +unit_test_api.components.schema.nested_allof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md index 00cfa1e5d02..69dbb3c5ed1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_anyof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -openapi_client.components.schema.nested_anyof_to_check_validation_semantics +unit_test_api.components.schema.nested_anyof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md index dd71cf121cc..12858c9191b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_items.md @@ -1,5 +1,5 @@ # NestedItems -openapi_client.components.schema.nested_items +unit_test_api.components.schema.nested_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md index 7c0a3a84ce7..95a56bdfb5a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nested_oneof_to_check_validation_semantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -openapi_client.components.schema.nested_oneof_to_check_validation_semantics +unit_test_api.components.schema.nested_oneof_to_check_validation_semantics ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md index 426c99effb2..f0f000fa7b2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_ascii_pattern_with_additionalproperties.md @@ -1,5 +1,5 @@ # NonAsciiPatternWithAdditionalproperties -openapi_client.components.schema.non_ascii_pattern_with_additionalproperties +unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md index 7a399c44325..ddf72dee086 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/non_interference_across_combined_schemas.md @@ -1,5 +1,5 @@ # NonInterferenceAcrossCombinedSchemas -openapi_client.components.schema.non_interference_across_combined_schemas +unit_test_api.components.schema.non_interference_across_combined_schemas ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md index c5d503ba001..e10c6adbdbe 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md @@ -1,5 +1,5 @@ # Not -openapi_client.components.schema.not +unit_test_api.components.schema.not ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md index c042b4880c3..b0ca5d6504f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_more_complex_schema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -openapi_client.components.schema.not_more_complex_schema +unit_test_api.components.schema.not_more_complex_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md index be0d1407542..ffabd085e0a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/not_multiple_types.md @@ -1,5 +1,5 @@ # NotMultipleTypes -openapi_client.components.schema.not_multiple_types +unit_test_api.components.schema.not_multiple_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md index 87432dbc863..6b2ae0f5596 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/nul_characters_in_strings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -openapi_client.components.schema.nul_characters_in_strings +unit_test_api.components.schema.nul_characters_in_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md index 6c8fa175936..d61c3f1ddd1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/null_type_matches_only_the_null_object.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -openapi_client.components.schema.null_type_matches_only_the_null_object +unit_test_api.components.schema.null_type_matches_only_the_null_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md index 9de89f93f7b..cac70e72fdc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/number_type_matches_numbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -openapi_client.components.schema.number_type_matches_numbers +unit_test_api.components.schema.number_type_matches_numbers ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md index cdcc6d319d4..119d76f77a0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_properties_validation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -openapi_client.components.schema.object_properties_validation +unit_test_api.components.schema.object_properties_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md index 28386703ab2..71b0fb1fa2c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/object_type_matches_objects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -openapi_client.components.schema.object_type_matches_objects +unit_test_api.components.schema.object_type_matches_objects ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md index 78e3bdfe366..1d897561347 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof.md @@ -1,5 +1,5 @@ # Oneof -openapi_client.components.schema.oneof +unit_test_api.components.schema.oneof ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md index cd63a9482c7..a7f15deadb7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_complex_types.md @@ -1,5 +1,5 @@ # OneofComplexTypes -openapi_client.components.schema.oneof_complex_types +unit_test_api.components.schema.oneof_complex_types ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md index 7ff0bf6191c..4230ca82320 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_base_schema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -openapi_client.components.schema.oneof_with_base_schema +unit_test_api.components.schema.oneof_with_base_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md index 55ed638a799..9a5e93ffe25 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_empty_schema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -openapi_client.components.schema.oneof_with_empty_schema +unit_test_api.components.schema.oneof_with_empty_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md index 5e71f9061e7..bde6e8f36ee 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/oneof_with_required.md @@ -1,5 +1,5 @@ # OneofWithRequired -openapi_client.components.schema.oneof_with_required +unit_test_api.components.schema.oneof_with_required ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md index 448f029fad1..172c789e202 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_is_not_anchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -openapi_client.components.schema.pattern_is_not_anchored +unit_test_api.components.schema.pattern_is_not_anchored ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md index 54835339351..97fc2c367fd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/pattern_validation.md @@ -1,5 +1,5 @@ # PatternValidation -openapi_client.components.schema.pattern_validation +unit_test_api.components.schema.pattern_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md index a750b1cb32c..5ab5975f0cf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_validates_properties_matching_a_regex.md @@ -1,5 +1,5 @@ # PatternpropertiesValidatesPropertiesMatchingARegex -openapi_client.components.schema.patternproperties_validates_properties_matching_a_regex +unit_test_api.components.schema.patternproperties_validates_properties_matching_a_regex ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md index 54c8b58ecd0..58e994f1d56 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/patternproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # PatternpropertiesWithNullValuedInstanceProperties -openapi_client.components.schema.patternproperties_with_null_valued_instance_properties +unit_test_api.components.schema.patternproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md index 885f1932e56..5dd889aa9e4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_validation_adjusts_the_starting_index_for_items.md @@ -1,5 +1,5 @@ # PrefixitemsValidationAdjustsTheStartingIndexForItems -openapi_client.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items +unit_test_api.components.schema.prefixitems_validation_adjusts_the_starting_index_for_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md index e309c83f83d..e1c66535f91 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/prefixitems_with_null_instance_elements.md @@ -1,5 +1,5 @@ # PrefixitemsWithNullInstanceElements -openapi_client.components.schema.prefixitems_with_null_instance_elements +unit_test_api.components.schema.prefixitems_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md index c7b26d8bd10..3b9c58ea6cb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_patternproperties_additionalproperties_interaction.md @@ -1,5 +1,5 @@ # PropertiesPatternpropertiesAdditionalpropertiesInteraction -openapi_client.components.schema.properties_patternproperties_additionalproperties_interaction +unit_test_api.components.schema.properties_patternproperties_additionalproperties_interaction ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md index dbe2902d46f..f0f6c0df9a1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_whose_names_are_javascript_object_property_names.md @@ -1,5 +1,5 @@ # PropertiesWhoseNamesAreJavascriptObjectPropertyNames -openapi_client.components.schema.properties_whose_names_are_javascript_object_property_names +unit_test_api.components.schema.properties_whose_names_are_javascript_object_property_names ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md index 1e62c04f7c6..830a047b516 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_escaped_characters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -openapi_client.components.schema.properties_with_escaped_characters +unit_test_api.components.schema.properties_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md index f615427aeeb..164d19697b6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/properties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # PropertiesWithNullValuedInstanceProperties -openapi_client.components.schema.properties_with_null_valued_instance_properties +unit_test_api.components.schema.properties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md index 1133a853c9b..d70dd946f15 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/property_named_ref_that_is_not_a_reference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -openapi_client.components.schema.property_named_ref_that_is_not_a_reference +unit_test_api.components.schema.property_named_ref_that_is_not_a_reference ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md index 028208da49c..cdbd52bb0b3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/propertynames_validation.md @@ -1,5 +1,5 @@ # PropertynamesValidation -openapi_client.components.schema.propertynames_validation +unit_test_api.components.schema.propertynames_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md index 35419fdb03b..ed6d8333292 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/regex_format.md @@ -1,5 +1,5 @@ # RegexFormat -openapi_client.components.schema.regex_format +unit_test_api.components.schema.regex_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md index d3548f68366..a151897b321 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/regexes_are_not_anchored_by_default_and_are_case_sensitive.md @@ -1,5 +1,5 @@ # RegexesAreNotAnchoredByDefaultAndAreCaseSensitive -openapi_client.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive +unit_test_api.components.schema.regexes_are_not_anchored_by_default_and_are_case_sensitive ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md index 719515d18d8..e5ed11821b5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/relative_json_pointer_format.md @@ -1,5 +1,5 @@ # RelativeJsonPointerFormat -openapi_client.components.schema.relative_json_pointer_format +unit_test_api.components.schema.relative_json_pointer_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md index 013b2b6c3e9..a1923bc3370 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_default_validation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -openapi_client.components.schema.required_default_validation +unit_test_api.components.schema.required_default_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md index f25ec01881f..2a782b24abf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_properties_whose_names_are_javascript_object_property_names.md @@ -1,5 +1,5 @@ # RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames -openapi_client.components.schema.required_properties_whose_names_are_javascript_object_property_names +unit_test_api.components.schema.required_properties_whose_names_are_javascript_object_property_names ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md index ca5e4fb2b5c..3dc9958f88b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_validation.md @@ -1,5 +1,5 @@ # RequiredValidation -openapi_client.components.schema.required_validation +unit_test_api.components.schema.required_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md index 31f72b12cda..06ca142ed71 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_empty_array.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -openapi_client.components.schema.required_with_empty_array +unit_test_api.components.schema.required_with_empty_array ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md index ef7a12c740d..b59d46f5094 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/required_with_escaped_characters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -openapi_client.components.schema.required_with_escaped_characters +unit_test_api.components.schema.required_with_escaped_characters ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md index 8913312182e..76d4e96d6cb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/simple_enum_validation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -openapi_client.components.schema.simple_enum_validation +unit_test_api.components.schema.simple_enum_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md index 3599a3f77ec..a77bfbe2103 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/single_dependency.md @@ -1,5 +1,5 @@ # SingleDependency -openapi_client.components.schema.single_dependency +unit_test_api.components.schema.single_dependency ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md index a1cbd121ef3..aa100295572 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/small_multiple_of_large_integer.md @@ -1,5 +1,5 @@ # SmallMultipleOfLargeInteger -openapi_client.components.schema.small_multiple_of_large_integer +unit_test_api.components.schema.small_multiple_of_large_integer ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md index c8cba112eb4..5ad002dcdb6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/string_type_matches_strings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -openapi_client.components.schema.string_type_matches_strings +unit_test_api.components.schema.string_type_matches_strings ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md index 719fd460775..ea891f00175 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/time_format.md @@ -1,5 +1,5 @@ # TimeFormat -openapi_client.components.schema.time_format +unit_test_api.components.schema.time_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md index de2bf9d42af..c1c5ce74844 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_object_or_null.md @@ -1,5 +1,5 @@ # TypeArrayObjectOrNull -openapi_client.components.schema.type_array_object_or_null +unit_test_api.components.schema.type_array_object_or_null ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md index 249511729f1..8fdb24655dc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_array_or_object.md @@ -1,5 +1,5 @@ # TypeArrayOrObject -openapi_client.components.schema.type_array_or_object +unit_test_api.components.schema.type_array_or_object ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md index 8478a95bd61..a7d127faa8e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/type_as_array_with_one_item.md @@ -1,5 +1,5 @@ # TypeAsArrayWithOneItem -openapi_client.components.schema.type_as_array_with_one_item +unit_test_api.components.schema.type_as_array_with_one_item ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md index d73cf627dd4..e3f730178b7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_as_schema.md @@ -1,5 +1,5 @@ # UnevaluateditemsAsSchema -openapi_client.components.schema.unevaluateditems_as_schema +unit_test_api.components.schema.unevaluateditems_as_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md index 19e98af95e8..fe0b729e67b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_depends_on_multiple_nested_contains.md @@ -1,5 +1,5 @@ # UnevaluateditemsDependsOnMultipleNestedContains -openapi_client.components.schema.unevaluateditems_depends_on_multiple_nested_contains +unit_test_api.components.schema.unevaluateditems_depends_on_multiple_nested_contains ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md index c4f4e453b39..f6f9281bc8d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_items.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithItems -openapi_client.components.schema.unevaluateditems_with_items +unit_test_api.components.schema.unevaluateditems_with_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md index 3448b1f1e2b..3e905088328 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluateditems_with_null_instance_elements.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithNullInstanceElements -openapi_client.components.schema.unevaluateditems_with_null_instance_elements +unit_test_api.components.schema.unevaluateditems_with_null_instance_elements ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md index 62e2420aa1d..af2f9cb1723 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_not_affected_by_propertynames.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesNotAffectedByPropertynames -openapi_client.components.schema.unevaluatedproperties_not_affected_by_propertynames +unit_test_api.components.schema.unevaluatedproperties_not_affected_by_propertynames ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md index 5e36cef11aa..93e9eb7c1d4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_schema.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesSchema -openapi_client.components.schema.unevaluatedproperties_schema +unit_test_api.components.schema.unevaluatedproperties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md index ff83452a21b..5e65917d346 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_adjacent_additionalproperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithAdjacentAdditionalproperties -openapi_client.components.schema.unevaluatedproperties_with_adjacent_additionalproperties +unit_test_api.components.schema.unevaluatedproperties_with_adjacent_additionalproperties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md index b0a481a7c00..255a7e30e97 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/unevaluatedproperties_with_null_valued_instance_properties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithNullValuedInstanceProperties -openapi_client.components.schema.unevaluatedproperties_with_null_valued_instance_properties +unit_test_api.components.schema.unevaluatedproperties_with_null_valued_instance_properties ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md index 34fa0acc529..a6d90d841c2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_validation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -openapi_client.components.schema.uniqueitems_false_validation +unit_test_api.components.schema.uniqueitems_false_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md index f60ba68bd8c..f8e419b5c71 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_false_with_an_array_of_items.md @@ -1,5 +1,5 @@ # UniqueitemsFalseWithAnArrayOfItems -openapi_client.components.schema.uniqueitems_false_with_an_array_of_items +unit_test_api.components.schema.uniqueitems_false_with_an_array_of_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md index 6d824238bf2..21ecd3794ff 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_validation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -openapi_client.components.schema.uniqueitems_validation +unit_test_api.components.schema.uniqueitems_validation ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md index e7f63ce15d2..29abd65a114 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uniqueitems_with_an_array_of_items.md @@ -1,5 +1,5 @@ # UniqueitemsWithAnArrayOfItems -openapi_client.components.schema.uniqueitems_with_an_array_of_items +unit_test_api.components.schema.uniqueitems_with_an_array_of_items ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md index a903ae2744a..8d178c0bec8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_format.md @@ -1,5 +1,5 @@ # UriFormat -openapi_client.components.schema.uri_format +unit_test_api.components.schema.uri_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md index a656995619f..1cb2c8ad458 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_reference_format.md @@ -1,5 +1,5 @@ # UriReferenceFormat -openapi_client.components.schema.uri_reference_format +unit_test_api.components.schema.uri_reference_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md index 4f1b8fc8806..45598bd12a6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uri_template_format.md @@ -1,5 +1,5 @@ # UriTemplateFormat -openapi_client.components.schema.uri_template_format +unit_test_api.components.schema.uri_template_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md index 9063178f55a..1a20a142a5a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/uuid_format.md @@ -1,5 +1,5 @@ # UuidFormat -openapi_client.components.schema.uuid_format +unit_test_api.components.schema.uuid_format ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md index b00ddee5c99..51ef995df7d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md +++ b/samples/client/3_1_0_unit_test/python/docs/components/schema/validate_against_correct_branch_then_vs_else.md @@ -1,5 +1,5 @@ # ValidateAgainstCorrectBranchThenVsElse -openapi_client.components.schema.validate_against_correct_branch_then_vs_else +unit_test_api.components.schema.validate_against_correct_branch_then_vs_else ``` type: schemas.Schema ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md index cd4c6132465..e45318ad04d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_a_schema_given_for_prefixitems_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_a_schema_given_for_prefixitems_request_body.operation +unit_test_api.paths.request_body_post_a_schema_given_for_prefixitems_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_a_schema_given_for_prefixitems_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md index c48904353e1..0fad63d5795 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additional_items_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additional_items_are_allowed_by_default_request_body.operation +unit_test_api.paths.request_body_post_additional_items_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additional_items_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md index 35cca7ee9d1..110b85cbbe2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md index ca9ebe6c797..68be6adfef7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md index 7324ace29e5..4e3acb6853b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_does_not_look_in_applicators_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_does_not_look_in_applicators_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_does_not_look_in_applicators_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md index 71195b0ee15..25f66785846 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md index a7cf8558a4c..ca04d5c1e1e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_additionalproperties_with_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_additionalproperties_with_schema_request_body.operation +unit_test_api.paths.request_body_post_additionalproperties_with_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_additionalproperties_with_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md index 18fc8daecf6..b8452c3b430 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation +unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md index 398d17ab0da..4510ddebabf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_request_body.operation +unit_test_api.paths.request_body_post_allof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md index 93610737559..63ca858d926 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_simple_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_simple_types_request_body.operation +unit_test_api.paths.request_body_post_allof_simple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md index e13b8fdf38a..f474402a883 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md index e0727aa3980..4be8897cd29 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_one_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md index 8421d85c4ff..4742c933e73 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md index a863e5a7296..8eb619a5430 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md index 9f2ac2ffbfa..e72d229de81 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation +unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md index 1d940e1fe8f..44932e771bf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_complex_types_request_body.operation +unit_test_api.paths.request_body_post_anyof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md index a29c9b8917f..0ab897a1cfe 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_request_body.operation +unit_test_api.paths.request_body_post_anyof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md index 95535a41c53..9fe2943ea99 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md index 0e93c88cc44..92ec911c863 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md index 6e0ce6b5e1b..e60a37b5893 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_array_type_matches_arrays_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_array_type_matches_arrays_request_body.operation +unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md index 4602f4859f7..ca1bd14e43a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_boolean_type_matches_booleans_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_boolean_type_matches_booleans_request_body.operation +unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md index 02be71b59f9..3b8eaac0855 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_int_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_int_request_body.operation +unit_test_api.paths.request_body_post_by_int_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md index 10badf24418..c219dd32371 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_number_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_number_request_body.operation +unit_test_api.paths.request_body_post_by_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md index 17a56e579e9..b1dd4f60736 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_by_small_number_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_by_small_number_request_body.operation +unit_test_api.paths.request_body_post_by_small_number_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md index a39b351ecce..33d7883d833 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_const_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_const_nul_characters_in_strings_request_body.operation +unit_test_api.paths.request_body_post_const_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_const_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md index 9ce6deb277b..9f4854cebb2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_keyword_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_contains_keyword_validation_request_body.operation +unit_test_api.paths.request_body_post_contains_keyword_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_contains_keyword_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md index 33eda569535..d2bf595681b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_contains_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_contains_with_null_instance_elements_request_body.operation +unit_test_api.paths.request_body_post_contains_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_contains_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md index 27953843f16..83306cec6ad 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_date_format_request_body.operation +unit_test_api.paths.request_body_post_date_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md index 19161ccb7b8..22f51d88ec0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_date_time_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_date_time_format_request_body.operation +unit_test_api.paths.request_body_post_date_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md index c319b8e1464..92eedc60443 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_dependent_schemas_dependencies_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_dependencies_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md index 2b576862e7c..27de5f64da3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.operation +unit_test_api.paths.request_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_dependent_subschema_incompatible_with_root_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md index e0566c93a25..7d032cfb404 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_dependent_schemas_single_dependency_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_dependent_schemas_single_dependency_request_body.operation +unit_test_api.paths.request_body_post_dependent_schemas_single_dependency_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_dependent_schemas_single_dependency_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md index b75d5a6893e..1dc639a47ec 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_duration_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_duration_format_request_body.operation +unit_test_api.paths.request_body_post_duration_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_duration_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md index cd422fa78e8..3a9f9de78cf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_email_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_email_format_request_body.operation +unit_test_api.paths.request_body_post_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md index 7cbf0e7df30..24fe4781df7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_empty_dependents_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_empty_dependents_request_body.operation +unit_test_api.paths.request_body_post_empty_dependents_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_empty_dependents_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md index 06187d8c063..3e49495c679 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation +unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md index 328df6e7204..868990642c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation +unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md index cf0a6047e1d..a22db8a20af 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md index b58151f23fa..9267427c716 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation +unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md index 4844ce9e63d..640f172d633 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation +unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md index f9eb8455206..85217ed11a6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_enums_in_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_enums_in_properties_request_body.operation +unit_test_api.paths.request_body_post_enums_in_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md index f1ce7b1f2d2..ec5cc929756 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusivemaximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_exclusivemaximum_validation_request_body.operation +unit_test_api.paths.request_body_post_exclusivemaximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import exclusive_maximum_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import exclusive_maximum_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = exclusive_maximum_api.ExclusiveMaximumApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling ExclusiveMaximumApi->post_exclusivemaximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md index e9457bd9914..892dc05a12f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_exclusiveminimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_exclusiveminimum_validation_request_body.operation +unit_test_api.paths.request_body_post_exclusiveminimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_exclusiveminimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md index 405518de613..d83fa579abb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_float_division_inf_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_float_division_inf_request_body.operation +unit_test_api.paths.request_body_post_float_division_inf_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_float_division_inf_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md index a14661d42f8..072590bb6f7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_forbidden_property_request_body.operation +unit_test_api.paths.request_body_post_forbidden_property_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md index 2e7c04f5037..294cea79577 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_hostname_format_request_body.operation +unit_test_api.paths.request_body_post_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md index de3b84f7cac..22e48f71922 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_email_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_idn_email_format_request_body.operation +unit_test_api.paths.request_body_post_idn_email_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_idn_email_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md index 93702f1525b..08048612101 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_idn_hostname_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_idn_hostname_format_request_body.operation +unit_test_api.paths.request_body_post_idn_hostname_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_idn_hostname_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md index a0c3df1c60e..f3e6dd28e3a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_else_without_then_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_if_and_else_without_then_request_body.operation +unit_test_api.paths.request_body_post_if_and_else_without_then_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_and_else_without_then_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md index 195b9cdb989..7da0bc3cacf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_and_then_without_else_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_if_and_then_without_else_request_body.operation +unit_test_api.paths.request_body_post_if_and_then_without_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_and_then_without_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md index 8d6255ec33d..47b59050cd5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.operation +unit_test_api.paths.request_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md index 8525cbe52a6..37eedca16cd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_else_without_if_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ignore_else_without_if_request_body.operation +unit_test_api.paths.request_body_post_ignore_else_without_if_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_else_without_if_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md index ce79dbd2c33..de22045504f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_if_without_then_or_else_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ignore_if_without_then_or_else_request_body.operation +unit_test_api.paths.request_body_post_ignore_if_without_then_or_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_if_without_then_or_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md index b9f5ee8287a..939377de9c9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ignore_then_without_if_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ignore_then_without_if_request_body.operation +unit_test_api.paths.request_body_post_ignore_then_without_if_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ignore_then_without_if_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md index e21fa537a06..b9d3e3d4720 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_integer_type_matches_integers_request_body.operation +unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md index 2b3a5f61bd6..9aeb9426f96 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv4_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ipv4_format_request_body.operation +unit_test_api.paths.request_body_post_ipv4_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md index 1677e7d2525..8050d4e38b8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_ipv6_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_ipv6_format_request_body.operation +unit_test_api.paths.request_body_post_ipv6_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md index 9d974bb9497..e019fe92308 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_iri_format_request_body.operation +unit_test_api.paths.request_body_post_iri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_iri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md index 4f2ca75e6c6..7c948cd87c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_iri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_iri_reference_format_request_body.operation +unit_test_api.paths.request_body_post_iri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_iri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md index 8a03c28c06b..9b234eb7665 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_contains_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_items_contains_request_body.operation +unit_test_api.paths.request_body_post_items_contains_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_contains_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md index 84415f11d68..db0f9e5a8c6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_does_not_look_in_applicators_valid_case_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.operation +unit_test_api.paths.request_body_post_items_does_not_look_in_applicators_valid_case_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_does_not_look_in_applicators_valid_case_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md index d1e66d3585a..0911a9da045 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_items_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_items_with_null_instance_elements_request_body.operation +unit_test_api.paths.request_body_post_items_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_items_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md index e16dcb5aacf..79e97542369 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_json_pointer_format_request_body.operation +unit_test_api.paths.request_body_post_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md index 748a9fdc812..b93aaeeb942 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxcontains_without_contains_is_ignored_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.operation +unit_test_api.paths.request_body_post_maxcontains_without_contains_is_ignored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxcontains_without_contains_is_ignored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md index 0544cc6468b..a4cf41c5a21 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maximum_validation_request_body.operation +unit_test_api.paths.request_body_post_maximum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md index 41f2a7d9d4d..b9192384acf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation +unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md index f8e81e98154..76b56511900 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxitems_validation_request_body.operation +unit_test_api.paths.request_body_post_maxitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md index 93d80f3c925..865aa26009e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxlength_validation_request_body.operation +unit_test_api.paths.request_body_post_maxlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md index 6ebd397ea55..1d91fa18a50 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation +unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md index f67b22c22dd..054e62200de 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_maxproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_maxproperties_validation_request_body.operation +unit_test_api.paths.request_body_post_maxproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md index 9680a3faf61..03abb572522 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_mincontains_without_contains_is_ignored_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.operation +unit_test_api.paths.request_body_post_mincontains_without_contains_is_ignored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_mincontains_without_contains_is_ignored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md index 4dbe7049700..cc80b57b977 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minimum_validation_request_body.operation +unit_test_api.paths.request_body_post_minimum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md index fc53fc2843c..a9c04d11a5a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation +unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md index 36b33fcf39f..9c38740da8a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minitems_validation_request_body.operation +unit_test_api.paths.request_body_post_minitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import min_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md index e37ff4f0004..4c53aa747e5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minlength_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minlength_validation_request_body.operation +unit_test_api.paths.request_body_post_minlength_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md index 8a742a7239f..21ec6fe1840 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_minproperties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_minproperties_validation_request_body.operation +unit_test_api.paths.request_body_post_minproperties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md index 0d8ee2e9d77..12e1d5f3406 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_dependents_required_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_multiple_dependents_required_request_body.operation +unit_test_api.paths.request_body_post_multiple_dependents_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_multiple_dependents_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md index 87635cf1ca8..3d7749cb427 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.operation +unit_test_api.paths.request_body_post_multiple_simultaneous_patternproperties_are_validated_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_multiple_simultaneous_patternproperties_are_validated_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md index 1b52b1896d2..c84c845d394 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_multiple_types_can_be_specified_in_an_array_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.operation +unit_test_api.paths.request_body_post_multiple_types_can_be_specified_in_an_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_multiple_types_can_be_specified_in_an_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md index 0de64f2df39..5438484d94d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md index f51f046051a..a421805e866 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md index b3dc3589182..82909325d37 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_items_request_body.operation +unit_test_api.paths.request_body_post_nested_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -111,7 +111,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md index 899f5cd7cb5..7ecd99cc6bc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation +unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md index 006832d2ae9..96d147c6431 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_ascii_pattern_with_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.operation +unit_test_api.paths.request_body_post_non_ascii_pattern_with_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_non_ascii_pattern_with_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md index 9ece6387c53..86d482027ea 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_non_interference_across_combined_schemas_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_non_interference_across_combined_schemas_request_body.operation +unit_test_api.paths.request_body_post_non_interference_across_combined_schemas_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_non_interference_across_combined_schemas_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md index 996d1d5d1c1..d63251784ab 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_not_more_complex_schema_request_body.operation +unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md index 4598c41c47f..5c43f3cb0ee 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_multiple_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_not_multiple_types_request_body.operation +unit_test_api.paths.request_body_post_not_multiple_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_multiple_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md index 1c1abcc14a9..ed91f910514 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_not_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_not_request_body.operation +unit_test_api.paths.request_body_post_not_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md index 7d326dc9dbe..9c736950dd7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_nul_characters_in_strings_request_body.operation +unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md index 1bb37c3d32e..ef4fe60ec73 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation +unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md index 1452797a9fd..798cad055b4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_number_type_matches_numbers_request_body.operation +unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md index 197d333c25d..517f2d9f6c4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_properties_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_object_properties_validation_request_body.operation +unit_test_api.paths.request_body_post_object_properties_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md index a15853f9b0c..592b36537d9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_object_type_matches_objects_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_object_type_matches_objects_request_body.operation +unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md index 2532f9c9ef4..907311b6469 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_complex_types_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_complex_types_request_body.operation +unit_test_api.paths.request_body_post_oneof_complex_types_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md index 84e15bbb499..22f845e0e62 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_request_body.operation +unit_test_api.paths.request_body_post_oneof_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md index a0681e0f6f1..d3bc5e23ef2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_base_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_base_schema_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md index cc73acd26fb..2cf25497138 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_empty_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_empty_schema_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md index 8449e1a0716..3b3dac03539 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_oneof_with_required_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_oneof_with_required_request_body.operation +unit_test_api.paths.request_body_post_oneof_with_required_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md index a0d2712e120..74eff8b32a7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_is_not_anchored_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_pattern_is_not_anchored_request_body.operation +unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md index 79cc75e82fd..703f9588b6e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_pattern_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_pattern_validation_request_body.operation +unit_test_api.paths.request_body_post_pattern_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md index f2a9a895b6e..a3cac306b51 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_validates_properties_matching_a_regex_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.operation +unit_test_api.paths.request_body_post_patternproperties_validates_properties_matching_a_regex_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_validates_properties_matching_a_regex_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md index c1cb6e2eda9..0f895767a86 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_patternproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.operation +unit_test_api.paths.request_body_post_patternproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md index 619782460dc..b58ccc2cddd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.operation +unit_test_api.paths.request_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_prefixitems_validation_adjusts_the_starting_index_for_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md index 2e315a08705..9ec78f25a24 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_prefixitems_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.operation +unit_test_api.paths.request_body_post_prefixitems_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_prefixitems_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md index bb359e6dd29..fe2c13ee801 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_patternproperties_additionalproperties_interaction_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.operation +unit_test_api.paths.request_body_post_properties_patternproperties_additionalproperties_interaction_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -106,7 +106,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_patternproperties_additionalproperties_interaction_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md index 1a7af86448a..31c48bd2837 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_whose_names_are_javascript_object_property_names_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.operation +unit_test_api.paths.request_body_post_properties_whose_names_are_javascript_object_property_names_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_whose_names_are_javascript_object_property_names_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md index c33401af01e..6388a754811 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_properties_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md index 784f554a9c1..ba4fc208e72 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_properties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.operation +unit_test_api.paths.request_body_post_properties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_properties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md index 19ff8c4b1c3..9f7590ae649 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation +unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md index 038ef9ba1df..2defea3187e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_propertynames_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_propertynames_validation_request_body.operation +unit_test_api.paths.request_body_post_propertynames_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_propertynames_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md index 27a96d856c2..767647fe464 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regex_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_regex_format_request_body.operation +unit_test_api.paths.request_body_post_regex_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_regex_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md index f609721dcbf..e4723c8a17a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.operation +unit_test_api.paths.request_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_regexes_are_not_anchored_by_default_and_are_case_sensitive_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md index 28fce1aa2da..deebacfd8eb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_relative_json_pointer_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_relative_json_pointer_format_request_body.operation +unit_test_api.paths.request_body_post_relative_json_pointer_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_relative_json_pointer_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md index 581451091ca..4f6d15db526 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_default_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_default_validation_request_body.operation +unit_test_api.paths.request_body_post_required_default_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md index 475ea9e4970..c336468ee30 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.operation +unit_test_api.paths.request_body_post_required_properties_whose_names_are_javascript_object_property_names_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_properties_whose_names_are_javascript_object_property_names_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md index fd4f0dc9d94..f3a3d153004 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_validation_request_body.operation +unit_test_api.paths.request_body_post_required_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md index f95b015d763..c4781bc3162 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_empty_array_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_with_empty_array_request_body.operation +unit_test_api.paths.request_body_post_required_with_empty_array_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md index 0b376de420b..7e1362ed638 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_required_with_escaped_characters_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_required_with_escaped_characters_request_body.operation +unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md index adf3fb89928..60a4896e371 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_simple_enum_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_simple_enum_validation_request_body.operation +unit_test_api.paths.request_body_post_simple_enum_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md index c880766a093..78dc9f9822e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_single_dependency_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_single_dependency_request_body.operation +unit_test_api.paths.request_body_post_single_dependency_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_single_dependency_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md index a27b9a4faee..4ea1d0c6461 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_small_multiple_of_large_integer_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_small_multiple_of_large_integer_request_body.operation +unit_test_api.paths.request_body_post_small_multiple_of_large_integer_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_small_multiple_of_large_integer_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md index 5ce3d79a847..492b543d00b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_string_type_matches_strings_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_string_type_matches_strings_request_body.operation +unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md index 93991afc04a..125127ecc4f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_time_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_time_format_request_body.operation +unit_test_api.paths.request_body_post_time_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_time_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md index 13972430501..31943f6d395 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_object_or_null_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_type_array_object_or_null_request_body.operation +unit_test_api.paths.request_body_post_type_array_object_or_null_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_array_object_or_null_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md index 75770bfb373..0ea46f10b35 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_array_or_object_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_type_array_or_object_request_body.operation +unit_test_api.paths.request_body_post_type_array_or_object_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_array_or_object_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md index 3b7922755a0..7cf7dfe2350 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_type_as_array_with_one_item_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_type_as_array_with_one_item_request_body.operation +unit_test_api.paths.request_body_post_type_as_array_with_one_item_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_type_as_array_with_one_item_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md index 8e777e67aff..ee571e20b9d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_as_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluateditems_as_schema_request_body.operation +unit_test_api.paths.request_body_post_unevaluateditems_as_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_as_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md index a90de5fe557..10c00a9d913 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.operation +unit_test_api.paths.request_body_post_unevaluateditems_depends_on_multiple_nested_contains_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_depends_on_multiple_nested_contains_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md index ca4a390939d..c998bc10a34 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluateditems_with_items_request_body.operation +unit_test_api.paths.request_body_post_unevaluateditems_with_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md index 529d389157c..426bef1eb4c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluateditems_with_null_instance_elements_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.operation +unit_test_api.paths.request_body_post_unevaluateditems_with_null_instance_elements_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_null_instance_elements_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md index 9b1d613496d..c5083d740c2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.operation +unit_test_api.paths.request_body_post_unevaluatedproperties_not_affected_by_propertynames_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_not_affected_by_propertynames_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md index 68c8f9c920f..15431df8806 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_schema_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluatedproperties_schema_request_body.operation +unit_test_api.paths.request_body_post_unevaluatedproperties_schema_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_schema_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md index f078f657eb8..fcb33047594 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.operation +unit_test_api.paths.request_body_post_unevaluatedproperties_with_adjacent_additionalproperties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -105,7 +105,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_with_adjacent_additionalproperties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md index 7204d561b4f..b0a938b5e3b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.operation +unit_test_api.paths.request_body_post_unevaluatedproperties_with_null_valued_instance_properties_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_unevaluatedproperties_with_null_valued_instance_properties_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md index d1ee6b007ee..73669fb75ba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_false_validation_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md index ec2c41b6a69..081a042616b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_false_with_an_array_of_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_false_with_an_array_of_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_with_an_array_of_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md index b5f3e671167..925f59d5229 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_validation_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_validation_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md index 4e4a4a7ef1e..8502e128274 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uniqueitems_with_an_array_of_items_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.operation +unit_test_api.paths.request_body_post_uniqueitems_with_an_array_of_items_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uniqueitems_with_an_array_of_items_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md index 7942e7fdce2..2687068ba7e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_format_request_body.operation +unit_test_api.paths.request_body_post_uri_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md index 7d973b75c5d..223b2dcbd3c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_reference_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_reference_format_request_body.operation +unit_test_api.paths.request_body_post_uri_reference_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md index 01bc53ac0a7..f5978d8234b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uri_template_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uri_template_format_request_body.operation +unit_test_api.paths.request_body_post_uri_template_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md index 4ab09dd8fc3..16ab62b4cbf 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_uuid_format_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_uuid_format_request_body.operation +unit_test_api.paths.request_body_post_uuid_format_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_uuid_format_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md index 9fb91cee32d..5c35d811877 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/request_body_post_validate_against_correct_branch_then_vs_else_request_body/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.operation +unit_test_api.paths.request_body_post_validate_against_correct_branch_then_vs_else_request_body.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -85,14 +85,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import operation_request_body_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import operation_request_body_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) @@ -103,7 +103,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OperationRequestBodyApi->post_validate_against_correct_branch_then_vs_else_request_body: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md index fb65b661a6f..a3ae9793aa3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_a_schema_given_for_prefixitems_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_a_schema_given_for_prefixitems_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_a_schema_given_for_prefixitems_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md index 6fdda5c26ab..8eb7d332353 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additional_items_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additional_items_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additional_items_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md index e289466a8e5..c6aaa6d278d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md index 430be40fd21..9e163998999 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md index 78bad17c742..483f8195ef3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_does_not_look_in_applicators_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index ac89ed232ba..68c41553910 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md index e127a421e65..98294abccc4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_additionalproperties_with_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_additionalproperties_with_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_additionalproperties_with_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_additionalproperties_with_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md index ebf5cf32da9..6c7a89b34d6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md index 990466bd57c..f584dc53c73 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md index d96ea1ddd7d..a1b9080192d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_simple_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md index 7ba2612b338..d7e7d3a4a8e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md index a39b1cab145..3597c3367fa 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md index c4135f29add..b9b156178b0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md index 6bbad61793e..73c28674a62 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md index 18224e932bf..d6649f6df12 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md index 4d25565193d..5754f3486bb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md index a220c16188a..0479bfcbd11 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md index b1b38c81904..1e04eb186ba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md index ef6707997a1..d2a63827d64 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md index 03c26caf9c9..922b0f63795 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md index 7fd2b4cd0d8..7d646f2c845 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md index 8d59ac8e7a5..317976adab6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_int_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_int_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_int_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_int_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md index 44c4051ce48..073c6dc750b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_number_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_number_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md index 67ff781896f..a009d75a070 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_by_small_number_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_by_small_number_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_by_small_number_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_by_small_number_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md index 706dbea0751..d3dffbff2f7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_const_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_const_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_const_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_const_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md index 6d3a0f55f05..ae0a8c23a92 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_keyword_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_contains_keyword_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import contains_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_contains_keyword_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling ContainsApi->post_contains_keyword_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md index 7fe603ea026..255b55758e3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_contains_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_contains_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import contains_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_contains_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling ContainsApi->post_contains_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md index e898ec07355..7f1f68b9241 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_date_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_date_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_date_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md index 653fb4b7827..49058625cfd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_date_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_date_time_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_date_time_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md index 4becf85f5ea..7ada09edab5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_dependencies_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md index 4b3f12016a9..485f338e302 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_dependent_subschema_incompatible_with_root_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md index f712feb1025..134eee0b6b6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_dependent_schemas_single_dependency_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_dependent_schemas_single_dependency_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_dependent_schemas_single_dependency_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_dependent_schemas_single_dependency_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md index e7a8ed494fc..439c7809a25 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_duration_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_duration_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_duration_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_duration_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_duration_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md index 0f426708a7b..d7d2883ec30 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_email_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_email_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md index 8ab287fbecd..b6665ec9e09 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_empty_dependents_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_empty_dependents_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_empty_dependents_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_empty_dependents_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_empty_dependents_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md index a08ae332c0c..c1a7d25f65c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md index 26b0462d835..00e6c65ec28 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md index fcfd31865d2..d898842c20c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md index 3d63bb240dc..40e4d10b7c4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md index 41ed5134ab8..267af222348 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md index d0eb2167a3e..1f2bfbd863c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_enums_in_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md index 96a020d528f..8eb83207ef4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusivemaximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_exclusivemaximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import exclusive_maximum_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import exclusive_maximum_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = exclusive_maximum_api.ExclusiveMaximumApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_exclusivemaximum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling ExclusiveMaximumApi->post_exclusivemaximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md index 1f10f3ad9cb..9fa696f3344 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_exclusiveminimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_exclusiveminimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_exclusiveminimum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_exclusiveminimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md index a6dc2163105..b74c8351b31 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_float_division_inf_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_float_division_inf_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_float_division_inf_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_float_division_inf_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_float_division_inf_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md index 1e79811f4fb..24ab43d2b02 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_forbidden_property_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_forbidden_property_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md index bdfdc7f0b80..2b2088e4c8e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_hostname_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_hostname_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md index 077927776f1..018e4393714 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_email_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_idn_email_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_idn_email_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_idn_email_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_idn_email_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md index 63d8ce4536b..f4ebb466c62 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_idn_hostname_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_idn_hostname_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_idn_hostname_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_idn_hostname_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_idn_hostname_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md index 2ec0bde671b..f2b43df3795 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_else_without_then_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_if_and_else_without_then_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_and_else_without_then_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_if_and_else_without_then_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md index 4ef62d42e35..cfe801e35c9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_and_then_without_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_if_and_then_without_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_and_then_without_else_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_if_and_then_without_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md index 28c285afdea..c8cc852f1a8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_if_appears_at_the_end_when_serialized_keyword_processing_sequence_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md index d11625ab1f9..2c01a423f65 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_else_without_if_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ignore_else_without_if_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_else_without_if_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ignore_else_without_if_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md index a6cc97547e8..89c0c522356 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_if_without_then_or_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ignore_if_without_then_or_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_if_without_then_or_else_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ignore_if_without_then_or_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md index 1a958fa90e0..a9143162e98 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ignore_then_without_if_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ignore_then_without_if_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ignore_then_without_if_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ignore_then_without_if_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md index d05e57a2dad..459ba2f745c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md index 2f728286e8f..7fc6454f55f 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv4_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ipv4_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv4_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md index ab48c1d93e0..3dd2b61eb94 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_ipv6_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_ipv6_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_ipv6_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md index 31c47923848..5980d0bbeba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_iri_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_iri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_iri_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_iri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md index 7bf9ffbee86..535cc587e90 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_iri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_iri_reference_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_iri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_iri_reference_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_iri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md index 19c34290dfd..819109227b4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_contains_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_items_contains_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_items_contains_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import contains_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import contains_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = contains_api.ContainsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_contains_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling ContainsApi->post_items_contains_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md index ecef2d81c25..1e3f52bceba 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_items_does_not_look_in_applicators_valid_case_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md index f95202f013f..60e7bbf2fa3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_items_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_items_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_items_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_items_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md index 8e0cffb98ce..a542232206d 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_json_pointer_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md index df525c9545e..6a592f78f1c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxcontains_without_contains_is_ignored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxcontains_without_contains_is_ignored_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxcontains_without_contains_is_ignored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md index a6243a3d557..948197766e9 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maximum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md index b08a9e8debd..336adcf37e4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md index 0b62fedf52b..dad52273a43 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import max_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import max_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = max_items_api.MaxItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MaxItemsApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md index 5e68f5121dc..495413c64b5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxlength_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md index 84ddef7cd2b..9a8f6c2e437 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md index f672bdded5b..2e6666ae343 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md index 1090fb9aa3a..d64cb5e9ff7 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_mincontains_without_contains_is_ignored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_mincontains_without_contains_is_ignored_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_mincontains_without_contains_is_ignored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md index 0603e799ee9..745fe18490e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minimum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md index 7017a4ccb8d..20d37276e13 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md index d81f7dbf7c3..6a5458d8a38 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import min_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import min_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = min_items_api.MinItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MinItemsApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md index 1f601c3c18b..fe0cb3892e3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minlength_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minlength_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minlength_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md index e67d9198bc6..612471e8abb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_minproperties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md index 6edcdbb4a0f..cb17fdadff8 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_dependents_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_multiple_dependents_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_dependents_required_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_multiple_dependents_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md index 63dc5499b5d..f9ab10b4ef6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_multiple_simultaneous_patternproperties_are_validated_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md index 682ec799b08..661f305de26 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_multiple_types_can_be_specified_in_an_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md index 8d3fb7c6817..5985e6c67bc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import all_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import all_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = all_of_api.AllOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md index e72315d6313..7f54ccbdc2a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md index 09737733c1b..90c7777923e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md index f1f23fc909d..7202c7402a5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md index be55a7fbdce..40416b76e75 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_non_ascii_pattern_with_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md index 7c513045e91..561d39905b1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_non_interference_across_combined_schemas_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_non_interference_across_combined_schemas_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_non_interference_across_combined_schemas_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_non_interference_across_combined_schemas_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index ca6b9048897..cf1a565aacb 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md index c09045889f4..87d672b3b40 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_not_multiple_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_not_multiple_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_not_multiple_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_not_multiple_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index 196053c31d2..03ca994fe97 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_not_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_not_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import not_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = not_api.NotApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md index bdca38022d7..da408d48628 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md index 0213a95753e..514eb011d87 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md index 8f9e9d2d022..e8a62a6907a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md index 4da104ffce1..dc96db4b68a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_properties_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md index 237d8b8c6d1..7fb8227199e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md index 13489926ec6..54f06b3c861 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md index 1aad7256e20..a2c09ed9b23 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md index 6e3e8fea039..98711704aae 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md index 1b901d28a88..30949ce3603 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md index de480445596..970824d1bac 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import one_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import one_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = one_of_api.OneOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_oneof_with_required_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md index dbb461e55c6..99d71b0c156 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md index 9cae904155a..c5eee572391 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_pattern_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_pattern_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_pattern_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md index 480623f98dc..6ac02ace7c5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_validates_properties_matching_a_regex_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 832be86bde3..91458defe8a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_patternproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md index 3a2eff80112..a92fc23efef 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_prefixitems_validation_adjusts_the_starting_index_for_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md index 4c55bf4b0c3..856d9af61af 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_prefixitems_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_prefixitems_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_prefixitems_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md index ab7784bd6f0..45ecc6e1a24 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_properties_patternproperties_additionalproperties_interaction_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md index 04c3f97bace..a8bb989b3ea 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md index 203ba4f0fcb..710926fc921 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 15add33cb30..efaf213d821 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_properties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_properties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_properties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md index 4fd53eb670a..060ebe57b3b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md index 0f44580ed27..2d32bfa90b4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_propertynames_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_propertynames_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_propertynames_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_propertynames_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_propertynames_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md index 176a720cbf8..a9b8453459e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regex_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_regex_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_regex_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_regex_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_regex_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md index fcc2c16119f..4b3dcfa6e86 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pattern_properties_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import pattern_properties_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pattern_properties_api.PatternPropertiesApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PatternPropertiesApi->post_regexes_are_not_anchored_by_default_and_are_case_sensitive_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md index 4e40f3eb54c..87a68251d32 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_relative_json_pointer_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_relative_json_pointer_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_relative_json_pointer_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_relative_json_pointer_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md index bc6b9cfa57a..1a6a0d020ff 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_default_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_default_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_default_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md index f301c3282a5..7312c752185 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_properties_whose_names_are_javascript_object_property_names_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md index b4c75ed19e9..7020c09630e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md index 4bfa6fd5dd5..6f7a17013d1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md index 3c2ad9e894c..bf3a00d159b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md index 5d4e8aee549..678e01025d4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md index 8c2aa9b9d7c..6d6a211c4ef 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_single_dependency_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_single_dependency_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_single_dependency_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import dependent_required_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import dependent_required_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = dependent_required_api.DependentRequiredApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_single_dependency_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling DependentRequiredApi->post_single_dependency_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md index f9e61a6873f..56f4dc635bc 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_small_multiple_of_large_integer_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_small_multiple_of_large_integer_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import multiple_of_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import multiple_of_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = multiple_of_api.MultipleOfApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_small_multiple_of_large_integer_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling MultipleOfApi->post_small_multiple_of_large_integer_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md index 9ad2f91cd0b..32f68007c75 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md index 8f79372a726..d6c35534716 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_time_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_time_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_time_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_time_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_time_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md index e3b7b2d253d..3b5d7b525cd 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_object_or_null_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_type_array_object_or_null_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_array_object_or_null_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_type_array_object_or_null_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md index b12f9ba9ec9..022ab6d91e2 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_array_or_object_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_type_array_or_object_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_type_array_or_object_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_array_or_object_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_type_array_or_object_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md index 95ea7fb491a..dadedcc48b0 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_type_as_array_with_one_item_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_type_as_array_with_one_item_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_type_as_array_with_one_item_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_type_as_array_with_one_item_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md index 245f7eacb3c..23d85aba249 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_as_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluateditems_as_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_as_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_as_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md index da4ceb7d7b4..d510a55f0c3 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_depends_on_multiple_nested_contains_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md index 2586dabe5f2..1e428f2eb0e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluateditems_with_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_with_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md index 07aa21828e9..2667afffe8b 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluateditems_with_null_instance_elements_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import unevaluated_items_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import unevaluated_items_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = unevaluated_items_api.UnevaluatedItemsApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluateditems_with_null_instance_elements_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling UnevaluatedItemsApi->post_unevaluateditems_with_null_instance_elements_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md index c6d93c75716..e3edd145129 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_not_affected_by_propertynames_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md index 45e026e54f2..4046920e2e4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_schema_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluatedproperties_schema_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_schema_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_schema_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md index 1881c6ccccf..a1c2e19810c 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_with_adjacent_additionalproperties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md index 9032e6c9550..8a6c678b953 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_unevaluatedproperties_with_null_valued_instance_properties_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md index efe4eea9c81..cc4471e9a4e 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md index 89847f2cd3f..ba4a54c34c4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_false_with_an_array_of_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md index e2e2c842646..6ae609762a4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md index ba9bd856b36..492e171bcd6 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uniqueitems_with_an_array_of_items_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uniqueitems_with_an_array_of_items_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uniqueitems_with_an_array_of_items_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md index 72feb4c48a7..3f4342d4f04 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md index 35e998167c1..551d3b9d88a 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_reference_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md index e51c8aedfa4..7e704ec48a4 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uri_template_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uri_template_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uri_template_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md index 437025cadb5..ba068a34552 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_uuid_format_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_uuid_format_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_uuid_format_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_uuid_format_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_uuid_format_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md index 1db57364203..0b2cefec130 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.operation +unit_test_api.paths.response_body_post_validate_against_correct_branch_then_vs_else_response_body_for_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import path_post_api +import unit_test_api +from unit_test_api.configurations import api_configuration +from unit_test_api.apis.tags import path_post_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = path_post_api.PathPostApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.post_validate_against_correct_branch_then_vs_else_response_body_for_content_types() pprint(api_response) - except openapi_client.ApiException as e: + except unit_test_api.ApiException as e: print("Exception when calling PathPostApi->post_validate_against_correct_branch_then_vs_else_response_body_for_content_types: %s\n" % e) ``` diff --git a/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md b/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md index 7055662bd76..b37c67353d5 100644 --- a/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md +++ b/samples/client/3_1_0_unit_test/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_0 +unit_test_api.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/3_1_0_unit_test/python/pyproject.toml b/samples/client/3_1_0_unit_test/python/pyproject.toml index 62fd25e9f49..a09122de22d 100644 --- a/samples/client/3_1_0_unit_test/python/pyproject.toml +++ b/samples/client/3_1_0_unit_test/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "unit_test_api" = ["py.typed"] [project] -name = "openapi-client" +name = "unit-test-api" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py index 34a66428b01..2d893695d85 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py @@ -18,7 +18,7 @@ from unit_test_api.apis.tags.enum_api import EnumApi from unit_test_api.apis.tags.exclusive_maximum_api import ExclusiveMaximumApi from unit_test_api.apis.tags.exclusive_minimum_api import ExclusiveMinimumApi -from unit_test_api.apis.tags._not_api import _NotApi +from unit_test_api.apis.tags.not_api import NotApi from unit_test_api.apis.tags.if_then_else_api import IfThenElseApi from unit_test_api.apis.tags.items_api import ItemsApi from unit_test_api.apis.tags.max_contains_api import MaxContainsApi @@ -63,7 +63,7 @@ "enum": typing.Type[EnumApi], "exclusiveMaximum": typing.Type[ExclusiveMaximumApi], "exclusiveMinimum": typing.Type[ExclusiveMinimumApi], - "not": typing.Type[_NotApi], + "not": typing.Type[NotApi], "if-then-else": typing.Type[IfThenElseApi], "items": typing.Type[ItemsApi], "maxContains": typing.Type[MaxContainsApi], @@ -109,7 +109,7 @@ "enum": EnumApi, "exclusiveMaximum": ExclusiveMaximumApi, "exclusiveMinimum": ExclusiveMinimumApi, - "not": _NotApi, + "not": NotApi, "if-then-else": IfThenElseApi, "items": ItemsApi, "maxContains": MaxContainsApi, diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py new file mode 100644 index 00000000000..7699bbbee87 --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from unit_test_api.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody +from unit_test_api.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody +from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes +from unit_test_api.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes +from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody +from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes +from unit_test_api.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody +from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes + + +class NotApi( + PostNotMultipleTypesRequestBody, + PostNotRequestBody, + PostNotResponseBodyForContentTypes, + PostNotMultipleTypesResponseBodyForContentTypes, + PostNotMoreComplexSchemaRequestBody, + PostForbiddenPropertyResponseBodyForContentTypes, + PostForbiddenPropertyRequestBody, + PostNotMoreComplexSchemaResponseBodyForContentTypes, +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + pass diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py index 5eea502f2ea..9d32e259436 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py @@ -10,7 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -_Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema +Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema @dataclasses.dataclass(frozen=True) @@ -18,7 +18,7 @@ class Foo( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore Properties = typing.TypedDict( 'Properties', diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py index 63f498c4997..ad83473927b 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class _Else( +class Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -22,7 +22,7 @@ class _Else( @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -40,6 +40,6 @@ class IfAndElseWithoutThen( Do not edit the class manually. """ # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore - else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py index e331a745941..93612911c8a 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -40,6 +40,6 @@ class IfAndThenWithoutElse( Do not edit the class manually. """ # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py index fd810e09525..ce0429724d9 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py @@ -16,11 +16,11 @@ class ElseConst: @schemas.classproperty def OTHER(cls) -> typing.Literal["other"]: - return _Else.validate("other") + return Else.validate("other") @dataclasses.dataclass(frozen=True) -class _Else( +class Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -34,7 +34,7 @@ class _Else( @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -73,7 +73,7 @@ class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence( Do not edit the class manually. """ # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py index 014a693f23f..0a4c2afb734 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py @@ -16,11 +16,11 @@ class ElseConst: @schemas.classproperty def POSITIVE_0(cls) -> typing.Literal["0"]: - return _Else.validate("0") + return Else.validate("0") @dataclasses.dataclass(frozen=True) -class _Else( +class Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -43,5 +43,5 @@ class IgnoreElseWithoutIf( Do not edit the class manually. """ # any type - else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py index e126e6d805c..4b018c342a0 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py @@ -16,11 +16,11 @@ class IfConst: @schemas.classproperty def POSITIVE_0(cls) -> typing.Literal["0"]: - return _If.validate("0") + return If.validate("0") @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -43,5 +43,5 @@ class IgnoreIfWithoutThenOrElse( Do not edit the class manually. """ # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py index 57ec2513f21..713a75aaa34 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -26,7 +26,7 @@ class _0( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore @@ -49,7 +49,7 @@ class _1( @dataclasses.dataclass(frozen=True) -class _Else( +class Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -62,7 +62,7 @@ class _2( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore AllOf = typing.Tuple[ typing.Type[_0], diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py new file mode 100644 index 00000000000..6e9df279c3e --- /dev/null +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py @@ -0,0 +1,27 @@ +# coding: utf-8 + +""" + openapi 3.1.0 sample spec + sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 + The version of the OpenAPI document: 0.0.1 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Not2: typing_extensions.TypeAlias = schemas.IntSchema + + +@dataclasses.dataclass(frozen=True) +class Not( + schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + """ + # any type + not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore + diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index 2697580593b..9e8196377bd 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -46,7 +46,7 @@ def __new__( arg_[key_] = val arg_.update(kwargs) used_arg_ = typing.cast(NotDictInput, arg_) - return _Not.validate(used_arg_, configuration=configuration_) + return Not.validate(used_arg_, configuration=configuration_) @staticmethod def from_dict_( @@ -56,7 +56,7 @@ def from_dict_( ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> NotDict: - return _Not.validate(arg, configuration=configuration) + return Not.validate(arg, configuration=configuration) @property def foo(self) -> typing.Union[str, schemas.Unset]: @@ -75,7 +75,7 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS @dataclasses.dataclass(frozen=True) -class _Not( +class Not( schemas.Schema[NotDict, tuple] ): types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) @@ -115,5 +115,5 @@ class NotMoreComplexSchema( Do not edit the class manually. """ # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py index 380e4ad932f..4e39a12d5d7 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class _Not( +class Not( schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -59,5 +59,5 @@ class NotMultipleTypes( Do not edit the class manually. """ # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py index 560234699ee..405db7947f8 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class _Else( +class Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -22,7 +22,7 @@ class _Else( @dataclasses.dataclass(frozen=True) -class _If( +class If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -49,7 +49,7 @@ class ValidateAgainstCorrectBranchThenVsElse( Do not edit the class manually. """ # any type - if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore + else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py index 152a30935a4..77bdbe22aa6 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py @@ -96,7 +96,7 @@ from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics from unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties import NonAsciiPatternWithAdditionalproperties from unit_test_api.components.schema.non_interference_across_combined_schemas import NonInterferenceAcrossCombinedSchemas -from unit_test_api.components.schema._not import _Not +from unit_test_api.components.schema.not import Not from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema from unit_test_api.components.schema.not_multiple_types import NotMultipleTypes from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py index 931ebbe2b70..63b78e740e1 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py @@ -9,7 +9,7 @@ from unit_test_api import api_client from unit_test_api.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not +from unit_test_api.components.schema import not from .. import path from .responses import response_200 diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py index d300522c724..64c9b542b1e 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not -Schema2: typing_extensions.TypeAlias = _not._Not +from unit_test_api.components.schema import not +Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py index d300522c724..64c9b542b1e 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import _not -Schema2: typing_extensions.TypeAlias = _not._Not +from unit_test_api.components.schema import not +Schema2: typing_extensions.TypeAlias = not.Not diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES index 9a2ace04f5d..4fbf59f04af 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/.openapi-generator/FILES @@ -14,55 +14,55 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/openapi_client/__init__.py -src/openapi_client/api_client.py -src/openapi_client/api_response.py -src/openapi_client/apis/__init__.py -src/openapi_client/apis/path_to_api.py -src/openapi_client/apis/paths/__init__.py -src/openapi_client/apis/paths/operators.py -src/openapi_client/apis/tag_to_api.py -src/openapi_client/apis/tags/__init__.py -src/openapi_client/apis/tags/default_api.py -src/openapi_client/components/__init__.py -src/openapi_client/components/schema/__init__.py -src/openapi_client/components/schema/addition_operator.py -src/openapi_client/components/schema/operator.py -src/openapi_client/components/schema/subtraction_operator.py -src/openapi_client/components/schemas/__init__.py -src/openapi_client/configurations/__init__.py -src/openapi_client/configurations/api_configuration.py -src/openapi_client/configurations/schema_configuration.py -src/openapi_client/exceptions.py -src/openapi_client/paths/__init__.py -src/openapi_client/paths/operators/__init__.py -src/openapi_client/paths/operators/post/__init__.py -src/openapi_client/paths/operators/post/operation.py -src/openapi_client/paths/operators/post/request_body/__init__.py -src/openapi_client/paths/operators/post/request_body/content/__init__.py -src/openapi_client/paths/operators/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/operators/post/request_body/content/application_json/schema.py -src/openapi_client/paths/operators/post/responses/__init__.py -src/openapi_client/paths/operators/post/responses/response_200/__init__.py -src/openapi_client/py.typed -src/openapi_client/rest.py -src/openapi_client/schemas/__init__.py -src/openapi_client/schemas/format.py -src/openapi_client/schemas/original_immutabledict.py -src/openapi_client/schemas/schema.py -src/openapi_client/schemas/schemas.py -src/openapi_client/schemas/validation.py -src/openapi_client/security_schemes.py -src/openapi_client/server.py -src/openapi_client/servers/__init__.py -src/openapi_client/servers/server_0.py -src/openapi_client/shared_imports/__init__.py -src/openapi_client/shared_imports/header_imports.py -src/openapi_client/shared_imports/operation_imports.py -src/openapi_client/shared_imports/response_imports.py -src/openapi_client/shared_imports/schema_imports.py -src/openapi_client/shared_imports/security_scheme_imports.py -src/openapi_client/shared_imports/server_imports.py +src/this_package/__init__.py +src/this_package/api_client.py +src/this_package/api_response.py +src/this_package/apis/__init__.py +src/this_package/apis/path_to_api.py +src/this_package/apis/paths/__init__.py +src/this_package/apis/paths/operators.py +src/this_package/apis/tag_to_api.py +src/this_package/apis/tags/__init__.py +src/this_package/apis/tags/default_api.py +src/this_package/components/__init__.py +src/this_package/components/schema/__init__.py +src/this_package/components/schema/addition_operator.py +src/this_package/components/schema/operator.py +src/this_package/components/schema/subtraction_operator.py +src/this_package/components/schemas/__init__.py +src/this_package/configurations/__init__.py +src/this_package/configurations/api_configuration.py +src/this_package/configurations/schema_configuration.py +src/this_package/exceptions.py +src/this_package/paths/__init__.py +src/this_package/paths/operators/__init__.py +src/this_package/paths/operators/post/__init__.py +src/this_package/paths/operators/post/operation.py +src/this_package/paths/operators/post/request_body/__init__.py +src/this_package/paths/operators/post/request_body/content/__init__.py +src/this_package/paths/operators/post/request_body/content/application_json/__init__.py +src/this_package/paths/operators/post/request_body/content/application_json/schema.py +src/this_package/paths/operators/post/responses/__init__.py +src/this_package/paths/operators/post/responses/response_200/__init__.py +src/this_package/py.typed +src/this_package/rest.py +src/this_package/schemas/__init__.py +src/this_package/schemas/format.py +src/this_package/schemas/original_immutabledict.py +src/this_package/schemas/schema.py +src/this_package/schemas/schemas.py +src/this_package/schemas/validation.py +src/this_package/security_schemes.py +src/this_package/server.py +src/this_package/servers/__init__.py +src/this_package/servers/server_0.py +src/this_package/shared_imports/__init__.py +src/this_package/shared_imports/header_imports.py +src/this_package/shared_imports/operation_imports.py +src/this_package/shared_imports/response_imports.py +src/this_package/shared_imports/schema_imports.py +src/this_package/shared_imports/security_scheme_imports.py +src/this_package/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md index c0e502bd11b..1a571429a50 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/README.md @@ -1,4 +1,4 @@ -# openapi-client +# this-package No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md index 73b52e88e65..a904558e9db 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.default_api +this_package.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md index 481c814664b..e482eac5635 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/addition_operator.md @@ -1,5 +1,5 @@ # AdditionOperator -openapi_client.components.schema.addition_operator +this_package.components.schema.addition_operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md index 994925dcd3b..0d42674bd37 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/operator.md @@ -1,5 +1,5 @@ # Operator -openapi_client.components.schema.operator +this_package.components.schema.operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md index a5d8f290213..32505391662 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/components/schema/subtraction_operator.md @@ -1,5 +1,5 @@ # SubtractionOperator -openapi_client.components.schema.subtraction_operator +this_package.components.schema.subtraction_operator ``` type: schemas.Schema ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md index 12de2175689..ffee73202fe 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/paths/operators/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.operators.operation +this_package.paths.operators.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import this_package +from this_package.configurations import api_configuration +from this_package.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with this_package.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -106,7 +106,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except this_package.ApiException as e: print("Exception when calling DefaultApi->post_operators: %s\n" % e) ``` diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md index 9d20441dd7f..a749b8eb2fd 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_0 +this_package.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml index e14d49e00f0..78f774ae638 100644 --- a/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml +++ b/samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "this_package" = ["py.typed"] [project] -name = "openapi-client" +name = "this-package" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/openapi_features/security/python/.openapi-generator/FILES b/samples/client/openapi_features/security/python/.openapi-generator/FILES index b99a6594298..3e196248266 100644 --- a/samples/client/openapi_features/security/python/.openapi-generator/FILES +++ b/samples/client/openapi_features/security/python/.openapi-generator/FILES @@ -16,78 +16,78 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/openapi_client/__init__.py -src/openapi_client/api_client.py -src/openapi_client/api_response.py -src/openapi_client/apis/__init__.py -src/openapi_client/apis/path_to_api.py -src/openapi_client/apis/paths/__init__.py -src/openapi_client/apis/paths/path_with_no_explicit_security.py -src/openapi_client/apis/paths/path_with_one_explicit_security.py -src/openapi_client/apis/paths/path_with_security_from_root.py -src/openapi_client/apis/paths/path_with_two_explicit_security.py -src/openapi_client/apis/tag_to_api.py -src/openapi_client/apis/tags/__init__.py -src/openapi_client/apis/tags/default_api.py -src/openapi_client/components/schemas/__init__.py -src/openapi_client/components/security_schemes/__init__.py -src/openapi_client/components/security_schemes/security_scheme_api_key.py -src/openapi_client/components/security_schemes/security_scheme_bearer_test.py -src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py -src/openapi_client/configurations/__init__.py -src/openapi_client/configurations/api_configuration.py -src/openapi_client/configurations/schema_configuration.py -src/openapi_client/exceptions.py -src/openapi_client/paths/__init__.py -src/openapi_client/paths/path_with_no_explicit_security/__init__.py -src/openapi_client/paths/path_with_no_explicit_security/get/__init__.py -src/openapi_client/paths/path_with_no_explicit_security/get/operation.py -src/openapi_client/paths/path_with_no_explicit_security/get/responses/__init__.py -src/openapi_client/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/get/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/get/operation.py -src/openapi_client/paths/path_with_one_explicit_security/get/responses/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/get/security/__init__.py -src/openapi_client/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py -src/openapi_client/paths/path_with_security_from_root/__init__.py -src/openapi_client/paths/path_with_security_from_root/get/__init__.py -src/openapi_client/paths/path_with_security_from_root/get/operation.py -src/openapi_client/paths/path_with_security_from_root/get/responses/__init__.py -src/openapi_client/paths/path_with_security_from_root/get/responses/response_200/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/get/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/get/operation.py -src/openapi_client/paths/path_with_two_explicit_security/get/responses/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/get/security/__init__.py -src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py -src/openapi_client/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py -src/openapi_client/py.typed -src/openapi_client/rest.py -src/openapi_client/schemas/__init__.py -src/openapi_client/schemas/format.py -src/openapi_client/schemas/original_immutabledict.py -src/openapi_client/schemas/schema.py -src/openapi_client/schemas/schemas.py -src/openapi_client/schemas/validation.py -src/openapi_client/security/__init__.py -src/openapi_client/security/security_requirement_object_0.py -src/openapi_client/security/security_requirement_object_1.py -src/openapi_client/security/security_requirement_object_2.py -src/openapi_client/security/security_requirement_object_3.py -src/openapi_client/security_schemes.py -src/openapi_client/server.py -src/openapi_client/servers/__init__.py -src/openapi_client/servers/server_0.py -src/openapi_client/shared_imports/__init__.py -src/openapi_client/shared_imports/header_imports.py -src/openapi_client/shared_imports/operation_imports.py -src/openapi_client/shared_imports/response_imports.py -src/openapi_client/shared_imports/schema_imports.py -src/openapi_client/shared_imports/security_scheme_imports.py -src/openapi_client/shared_imports/server_imports.py +src/this_package/__init__.py +src/this_package/api_client.py +src/this_package/api_response.py +src/this_package/apis/__init__.py +src/this_package/apis/path_to_api.py +src/this_package/apis/paths/__init__.py +src/this_package/apis/paths/path_with_no_explicit_security.py +src/this_package/apis/paths/path_with_one_explicit_security.py +src/this_package/apis/paths/path_with_security_from_root.py +src/this_package/apis/paths/path_with_two_explicit_security.py +src/this_package/apis/tag_to_api.py +src/this_package/apis/tags/__init__.py +src/this_package/apis/tags/default_api.py +src/this_package/components/schemas/__init__.py +src/this_package/components/security_schemes/__init__.py +src/this_package/components/security_schemes/security_scheme_api_key.py +src/this_package/components/security_schemes/security_scheme_bearer_test.py +src/this_package/components/security_schemes/security_scheme_http_basic_test.py +src/this_package/configurations/__init__.py +src/this_package/configurations/api_configuration.py +src/this_package/configurations/schema_configuration.py +src/this_package/exceptions.py +src/this_package/paths/__init__.py +src/this_package/paths/path_with_no_explicit_security/__init__.py +src/this_package/paths/path_with_no_explicit_security/get/__init__.py +src/this_package/paths/path_with_no_explicit_security/get/operation.py +src/this_package/paths/path_with_no_explicit_security/get/responses/__init__.py +src/this_package/paths/path_with_no_explicit_security/get/responses/response_200/__init__.py +src/this_package/paths/path_with_one_explicit_security/__init__.py +src/this_package/paths/path_with_one_explicit_security/get/__init__.py +src/this_package/paths/path_with_one_explicit_security/get/operation.py +src/this_package/paths/path_with_one_explicit_security/get/responses/__init__.py +src/this_package/paths/path_with_one_explicit_security/get/responses/response_200/__init__.py +src/this_package/paths/path_with_one_explicit_security/get/security/__init__.py +src/this_package/paths/path_with_one_explicit_security/get/security/security_requirement_object_0.py +src/this_package/paths/path_with_security_from_root/__init__.py +src/this_package/paths/path_with_security_from_root/get/__init__.py +src/this_package/paths/path_with_security_from_root/get/operation.py +src/this_package/paths/path_with_security_from_root/get/responses/__init__.py +src/this_package/paths/path_with_security_from_root/get/responses/response_200/__init__.py +src/this_package/paths/path_with_two_explicit_security/__init__.py +src/this_package/paths/path_with_two_explicit_security/get/__init__.py +src/this_package/paths/path_with_two_explicit_security/get/operation.py +src/this_package/paths/path_with_two_explicit_security/get/responses/__init__.py +src/this_package/paths/path_with_two_explicit_security/get/responses/response_200/__init__.py +src/this_package/paths/path_with_two_explicit_security/get/security/__init__.py +src/this_package/paths/path_with_two_explicit_security/get/security/security_requirement_object_0.py +src/this_package/paths/path_with_two_explicit_security/get/security/security_requirement_object_1.py +src/this_package/py.typed +src/this_package/rest.py +src/this_package/schemas/__init__.py +src/this_package/schemas/format.py +src/this_package/schemas/original_immutabledict.py +src/this_package/schemas/schema.py +src/this_package/schemas/schemas.py +src/this_package/schemas/validation.py +src/this_package/security/__init__.py +src/this_package/security/security_requirement_object_0.py +src/this_package/security/security_requirement_object_1.py +src/this_package/security/security_requirement_object_2.py +src/this_package/security/security_requirement_object_3.py +src/this_package/security_schemes.py +src/this_package/server.py +src/this_package/servers/__init__.py +src/this_package/servers/server_0.py +src/this_package/shared_imports/__init__.py +src/this_package/shared_imports/header_imports.py +src/this_package/shared_imports/operation_imports.py +src/this_package/shared_imports/response_imports.py +src/this_package/shared_imports/schema_imports.py +src/this_package/shared_imports/security_scheme_imports.py +src/this_package/shared_imports/server_imports.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/openapi_features/security/python/README.md b/samples/client/openapi_features/security/python/README.md index fc7d98cfb00..78c0f8f6ce1 100644 --- a/samples/client/openapi_features/security/python/README.md +++ b/samples/client/openapi_features/security/python/README.md @@ -1,4 +1,4 @@ -# openapi-client +# this-package No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md b/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md index 2b2dc9a3732..69b36c71e96 100644 --- a/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md +++ b/samples/client/openapi_features/security/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.default_api +this_package.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md index e5feae7c833..b8f6bac1672 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_api_key.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_api_key +this_package.components.security_schemes.security_scheme_api_key # SecurityScheme ApiKey ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md index c21e0b7558e..2897c986598 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_bearer_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_bearer_test +this_package.components.security_schemes.security_scheme_bearer_test # SecurityScheme BearerTest ## Description diff --git a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md index 13f7e6f62ff..ceb34bb0f00 100644 --- a/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md +++ b/samples/client/openapi_features/security/python/docs/components/security_schemes/security_scheme_http_basic_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_http_basic_test +this_package.components.security_schemes.security_scheme_http_basic_test # SecurityScheme HttpBasicTest ## Description diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md index d33ff294441..63d1b549db8 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_no_explicit_security/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.path_with_no_explicit_security.operation +this_package.paths.path_with_no_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -64,14 +64,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import this_package +from this_package.configurations import api_configuration +from this_package.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with this_package.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -80,7 +80,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # path with no explicit security api_response = api_instance.path_with_no_explicit_security() pprint(api_response) - except openapi_client.ApiException as e: + except this_package.ApiException as e: print("Exception when calling DefaultApi->path_with_no_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md index 04ca7ddb3f5..c52ddcbb129 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_one_explicit_security/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.path_with_one_explicit_security.operation +this_package.paths.path_with_one_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -80,12 +80,12 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import this_package +from this_package.configurations import api_configuration +from this_package.apis.tags import default_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from this_package.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -98,7 +98,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with this_package.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -107,7 +107,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # path with one explicit security api_response = api_instance.path_with_one_explicit_security() pprint(api_response) - except openapi_client.ApiException as e: + except this_package.ApiException as e: print("Exception when calling DefaultApi->path_with_one_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md index 05cf1048b2c..ef70a11f053 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_security_from_root/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.path_with_security_from_root.operation +this_package.paths.path_with_security_from_root.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,17 +83,17 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import this_package +from this_package.configurations import api_configuration +from this_package.apis.tags import default_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from this_package.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_http_basic_test +from this_package.components.security_schemes import security_scheme_http_basic_test # security_index 3 -from openapi_client.components.security_schemes import security_scheme_http_basic_test -from openapi_client.components.security_schemes import security_scheme_api_key +from this_package.components.security_schemes import security_scheme_http_basic_test +from this_package.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -140,7 +140,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with this_package.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -149,7 +149,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # path with security from root api_response = api_instance.path_with_security_from_root() pprint(api_response) - except openapi_client.ApiException as e: + except this_package.ApiException as e: print("Exception when calling DefaultApi->path_with_security_from_root: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md b/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md index 0d24f53f10b..4690217ed7d 100644 --- a/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md +++ b/samples/client/openapi_features/security/python/docs/paths/path_with_two_explicit_security/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.path_with_two_explicit_security.operation +this_package.paths.path_with_two_explicit_security.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -81,14 +81,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import this_package +from this_package.configurations import api_configuration +from this_package.apis.tags import default_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from this_package.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_bearer_test +from this_package.components.security_schemes import security_scheme_bearer_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -115,7 +115,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with this_package.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -124,7 +124,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # path with two explicit security api_response = api_instance.path_with_two_explicit_security() pprint(api_response) - except openapi_client.ApiException as e: + except this_package.ApiException as e: print("Exception when calling DefaultApi->path_with_two_explicit_security: %s\n" % e) ``` diff --git a/samples/client/openapi_features/security/python/docs/servers/server_0.md b/samples/client/openapi_features/security/python/docs/servers/server_0.md index 9d20441dd7f..a749b8eb2fd 100644 --- a/samples/client/openapi_features/security/python/docs/servers/server_0.md +++ b/samples/client/openapi_features/security/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_0 +this_package.servers.server_0 # Server Server0 ## Url diff --git a/samples/client/openapi_features/security/python/pyproject.toml b/samples/client/openapi_features/security/python/pyproject.toml index d9af369938c..f506911beb6 100644 --- a/samples/client/openapi_features/security/python/pyproject.toml +++ b/samples/client/openapi_features/security/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "this_package" = ["py.typed"] [project] -name = "openapi-client" +name = "this-package" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index f3ecf886ee8..11caf1eade2 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -1825,9 +1825,6 @@ src/main/java/org/openapijsonschematools/client/servers/ServerWithVariables.java src/main/java/org/openapijsonschematools/client/servers/ServerWithoutVariables.java src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java -src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java -src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java src/test/java/org/openapijsonschematools/client/header/ContentHeaderTest.java src/test/java/org/openapijsonschematools/client/header/SchemaHeaderTest.java diff --git a/samples/client/petstore/python/.openapi-generator/FILES b/samples/client/petstore/python/.openapi-generator/FILES index a493183ff23..3139190a751 100644 --- a/samples/client/petstore/python/.openapi-generator/FILES +++ b/samples/client/petstore/python/.openapi-generator/FILES @@ -423,1201 +423,1201 @@ migration_2_0_0.md migration_3_0_0.md migration_other_python_generators.md pyproject.toml -src/openapi_client/__init__.py -src/openapi_client/api_client.py -src/openapi_client/api_response.py -src/openapi_client/apis/__init__.py -src/openapi_client/apis/path_to_api.py -src/openapi_client/apis/paths/__init__.py -src/openapi_client/apis/paths/another_fake_dummy.py -src/openapi_client/apis/paths/common_param_sub_dir.py -src/openapi_client/apis/paths/fake.py -src/openapi_client/apis/paths/fake_additional_properties_with_array_of_enums.py -src/openapi_client/apis/paths/fake_body_with_file_schema.py -src/openapi_client/apis/paths/fake_body_with_query_params.py -src/openapi_client/apis/paths/fake_case_sensitive_params.py -src/openapi_client/apis/paths/fake_classname_test.py -src/openapi_client/apis/paths/fake_delete_coffee_id.py -src/openapi_client/apis/paths/fake_health.py -src/openapi_client/apis/paths/fake_inline_additional_properties.py -src/openapi_client/apis/paths/fake_inline_composition.py -src/openapi_client/apis/paths/fake_json_form_data.py -src/openapi_client/apis/paths/fake_json_patch.py -src/openapi_client/apis/paths/fake_json_with_charset.py -src/openapi_client/apis/paths/fake_multiple_request_body_content_types.py -src/openapi_client/apis/paths/fake_multiple_response_bodies.py -src/openapi_client/apis/paths/fake_multiple_securities.py -src/openapi_client/apis/paths/fake_obj_in_query.py -src/openapi_client/apis/paths/fake_parameter_collisions1_abab_self_ab.py -src/openapi_client/apis/paths/fake_pem_content_type.py -src/openapi_client/apis/paths/fake_pet_id_upload_image_with_required_file.py -src/openapi_client/apis/paths/fake_query_param_with_json_content_type.py -src/openapi_client/apis/paths/fake_redirection.py -src/openapi_client/apis/paths/fake_ref_obj_in_query.py -src/openapi_client/apis/paths/fake_refs_array_of_enums.py -src/openapi_client/apis/paths/fake_refs_arraymodel.py -src/openapi_client/apis/paths/fake_refs_boolean.py -src/openapi_client/apis/paths/fake_refs_composed_one_of_number_with_validations.py -src/openapi_client/apis/paths/fake_refs_enum.py -src/openapi_client/apis/paths/fake_refs_mammal.py -src/openapi_client/apis/paths/fake_refs_number.py -src/openapi_client/apis/paths/fake_refs_object_model_with_ref_props.py -src/openapi_client/apis/paths/fake_refs_string.py -src/openapi_client/apis/paths/fake_response_without_schema.py -src/openapi_client/apis/paths/fake_test_query_paramters.py -src/openapi_client/apis/paths/fake_upload_download_file.py -src/openapi_client/apis/paths/fake_upload_file.py -src/openapi_client/apis/paths/fake_upload_files.py -src/openapi_client/apis/paths/fake_wild_card_responses.py -src/openapi_client/apis/paths/foo.py -src/openapi_client/apis/paths/pet.py -src/openapi_client/apis/paths/pet_find_by_status.py -src/openapi_client/apis/paths/pet_find_by_tags.py -src/openapi_client/apis/paths/pet_pet_id.py -src/openapi_client/apis/paths/pet_pet_id_upload_image.py -src/openapi_client/apis/paths/solidus.py -src/openapi_client/apis/paths/store_inventory.py -src/openapi_client/apis/paths/store_order.py -src/openapi_client/apis/paths/store_order_order_id.py -src/openapi_client/apis/paths/user.py -src/openapi_client/apis/paths/user_create_with_array.py -src/openapi_client/apis/paths/user_create_with_list.py -src/openapi_client/apis/paths/user_login.py -src/openapi_client/apis/paths/user_logout.py -src/openapi_client/apis/paths/user_username.py -src/openapi_client/apis/tag_to_api.py -src/openapi_client/apis/tags/__init__.py -src/openapi_client/apis/tags/another_fake_api.py -src/openapi_client/apis/tags/default_api.py -src/openapi_client/apis/tags/fake_api.py -src/openapi_client/apis/tags/fake_classname_tags123_api.py -src/openapi_client/apis/tags/pet_api.py -src/openapi_client/apis/tags/store_api.py -src/openapi_client/apis/tags/user_api.py -src/openapi_client/components/__init__.py -src/openapi_client/components/headers/__init__.py -src/openapi_client/components/headers/header_int32_json_content_type_header/__init__.py -src/openapi_client/components/headers/header_int32_json_content_type_header/content/__init__.py -src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py -src/openapi_client/components/headers/header_int32_json_content_type_header/content/application_json/schema.py -src/openapi_client/components/headers/header_number_header/__init__.py -src/openapi_client/components/headers/header_number_header/schema.py -src/openapi_client/components/headers/header_ref_content_schema_header/__init__.py -src/openapi_client/components/headers/header_ref_content_schema_header/content/__init__.py -src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/__init__.py -src/openapi_client/components/headers/header_ref_content_schema_header/content/application_json/schema.py -src/openapi_client/components/headers/header_ref_schema_header/__init__.py -src/openapi_client/components/headers/header_ref_schema_header/schema.py -src/openapi_client/components/headers/header_ref_string_header/__init__.py -src/openapi_client/components/headers/header_string_header/__init__.py -src/openapi_client/components/headers/header_string_header/schema.py -src/openapi_client/components/parameters/__init__.py -src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py -src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py -src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py -src/openapi_client/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py -src/openapi_client/components/parameters/parameter_path_user_name/__init__.py -src/openapi_client/components/parameters/parameter_path_user_name/schema.py -src/openapi_client/components/parameters/parameter_ref_path_user_name/__init__.py -src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/__init__.py -src/openapi_client/components/parameters/parameter_ref_schema_string_with_validation/schema.py -src/openapi_client/components/request_bodies/__init__.py -src/openapi_client/components/request_bodies/request_body_client/__init__.py -src/openapi_client/components/request_bodies/request_body_client/content/__init__.py -src/openapi_client/components/request_bodies/request_body_client/content/application_json/__init__.py -src/openapi_client/components/request_bodies/request_body_client/content/application_json/schema.py -src/openapi_client/components/request_bodies/request_body_pet/__init__.py -src/openapi_client/components/request_bodies/request_body_pet/content/__init__.py -src/openapi_client/components/request_bodies/request_body_pet/content/application_json/__init__.py -src/openapi_client/components/request_bodies/request_body_pet/content/application_json/schema.py -src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/__init__.py -src/openapi_client/components/request_bodies/request_body_pet/content/application_xml/schema.py -src/openapi_client/components/request_bodies/request_body_ref_user_array/__init__.py -src/openapi_client/components/request_bodies/request_body_user_array/__init__.py -src/openapi_client/components/request_bodies/request_body_user_array/content/__init__.py -src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/__init__.py -src/openapi_client/components/request_bodies/request_body_user_array/content/application_json/schema.py -src/openapi_client/components/responses/__init__.py -src/openapi_client/components/responses/response_headers_with_no_body/__init__.py -src/openapi_client/components/responses/response_headers_with_no_body/header_parameters.py -src/openapi_client/components/responses/response_headers_with_no_body/headers/__init__.py -src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/__init__.py -src/openapi_client/components/responses/response_headers_with_no_body/headers/header_location/schema.py -src/openapi_client/components/responses/response_ref_success_description_only/__init__.py -src/openapi_client/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py -src/openapi_client/components/responses/response_success_description_only/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/content/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/content/application_json/schema.py -src/openapi_client/components/responses/response_success_inline_content_and_header/header_parameters.py -src/openapi_client/components/responses/response_success_inline_content_and_header/headers/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py -src/openapi_client/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py -src/openapi_client/components/responses/response_success_with_json_api_response/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/content/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/content/application_json/schema.py -src/openapi_client/components/responses/response_success_with_json_api_response/header_parameters.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py -src/openapi_client/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py -src/openapi_client/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py -src/openapi_client/components/schema/_200_response.py -src/openapi_client/components/schema/__init__.py -src/openapi_client/components/schema/abstract_step_message.py -src/openapi_client/components/schema/additional_properties_class.py -src/openapi_client/components/schema/additional_properties_schema.py -src/openapi_client/components/schema/additional_properties_with_array_of_enums.py -src/openapi_client/components/schema/address.py -src/openapi_client/components/schema/animal.py -src/openapi_client/components/schema/animal_farm.py -src/openapi_client/components/schema/any_type_and_format.py -src/openapi_client/components/schema/any_type_not_string.py -src/openapi_client/components/schema/api_response.py -src/openapi_client/components/schema/apple.py -src/openapi_client/components/schema/apple_req.py -src/openapi_client/components/schema/array_holding_any_type.py -src/openapi_client/components/schema/array_of_array_of_number_only.py -src/openapi_client/components/schema/array_of_enums.py -src/openapi_client/components/schema/array_of_number_only.py -src/openapi_client/components/schema/array_test.py -src/openapi_client/components/schema/array_with_validations_in_items.py -src/openapi_client/components/schema/banana.py -src/openapi_client/components/schema/banana_req.py -src/openapi_client/components/schema/bar.py -src/openapi_client/components/schema/basque_pig.py -src/openapi_client/components/schema/boolean.py -src/openapi_client/components/schema/boolean_enum.py -src/openapi_client/components/schema/capitalization.py -src/openapi_client/components/schema/cat.py -src/openapi_client/components/schema/category.py -src/openapi_client/components/schema/child_cat.py -src/openapi_client/components/schema/class_model.py -src/openapi_client/components/schema/client.py -src/openapi_client/components/schema/complex_quadrilateral.py -src/openapi_client/components/schema/composed_any_of_different_types_no_validations.py -src/openapi_client/components/schema/composed_array.py -src/openapi_client/components/schema/composed_bool.py -src/openapi_client/components/schema/composed_none.py -src/openapi_client/components/schema/composed_number.py -src/openapi_client/components/schema/composed_object.py -src/openapi_client/components/schema/composed_one_of_different_types.py -src/openapi_client/components/schema/composed_string.py -src/openapi_client/components/schema/currency.py -src/openapi_client/components/schema/danish_pig.py -src/openapi_client/components/schema/date_time_test.py -src/openapi_client/components/schema/date_time_with_validations.py -src/openapi_client/components/schema/date_with_validations.py -src/openapi_client/components/schema/decimal_payload.py -src/openapi_client/components/schema/dog.py -src/openapi_client/components/schema/drawing.py -src/openapi_client/components/schema/enum_arrays.py -src/openapi_client/components/schema/enum_class.py -src/openapi_client/components/schema/enum_test.py -src/openapi_client/components/schema/equilateral_triangle.py -src/openapi_client/components/schema/file.py -src/openapi_client/components/schema/file_schema_test_class.py -src/openapi_client/components/schema/foo.py -src/openapi_client/components/schema/format_test.py -src/openapi_client/components/schema/from_schema.py -src/openapi_client/components/schema/fruit.py -src/openapi_client/components/schema/fruit_req.py -src/openapi_client/components/schema/gm_fruit.py -src/openapi_client/components/schema/grandparent_animal.py -src/openapi_client/components/schema/has_only_read_only.py -src/openapi_client/components/schema/health_check_result.py -src/openapi_client/components/schema/integer_enum.py -src/openapi_client/components/schema/integer_enum_big.py -src/openapi_client/components/schema/integer_enum_one_value.py -src/openapi_client/components/schema/integer_enum_with_default_value.py -src/openapi_client/components/schema/integer_max10.py -src/openapi_client/components/schema/integer_min15.py -src/openapi_client/components/schema/isosceles_triangle.py -src/openapi_client/components/schema/items.py -src/openapi_client/components/schema/items_schema.py -src/openapi_client/components/schema/json_patch_request.py -src/openapi_client/components/schema/json_patch_request_add_replace_test.py -src/openapi_client/components/schema/json_patch_request_move_copy.py -src/openapi_client/components/schema/json_patch_request_remove.py -src/openapi_client/components/schema/mammal.py -src/openapi_client/components/schema/map_test.py -src/openapi_client/components/schema/mixed_properties_and_additional_properties_class.py -src/openapi_client/components/schema/money.py -src/openapi_client/components/schema/multi_properties_schema.py -src/openapi_client/components/schema/my_object_dto.py -src/openapi_client/components/schema/name.py -src/openapi_client/components/schema/no_additional_properties.py -src/openapi_client/components/schema/nullable_class.py -src/openapi_client/components/schema/nullable_shape.py -src/openapi_client/components/schema/nullable_string.py -src/openapi_client/components/schema/number.py -src/openapi_client/components/schema/number_only.py -src/openapi_client/components/schema/number_with_exclusive_min_max.py -src/openapi_client/components/schema/number_with_validations.py -src/openapi_client/components/schema/obj_with_required_props.py -src/openapi_client/components/schema/obj_with_required_props_base.py -src/openapi_client/components/schema/object_interface.py -src/openapi_client/components/schema/object_model_with_arg_and_args_properties.py -src/openapi_client/components/schema/object_model_with_ref_props.py -src/openapi_client/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py -src/openapi_client/components/schema/object_with_colliding_properties.py -src/openapi_client/components/schema/object_with_decimal_properties.py -src/openapi_client/components/schema/object_with_difficultly_named_props.py -src/openapi_client/components/schema/object_with_inline_composition_property.py -src/openapi_client/components/schema/object_with_invalid_named_refed_properties.py -src/openapi_client/components/schema/object_with_non_intersecting_values.py -src/openapi_client/components/schema/object_with_only_optional_props.py -src/openapi_client/components/schema/object_with_optional_test_prop.py -src/openapi_client/components/schema/object_with_validations.py -src/openapi_client/components/schema/order.py -src/openapi_client/components/schema/paginated_result_my_object_dto.py -src/openapi_client/components/schema/parent_pet.py -src/openapi_client/components/schema/pet.py -src/openapi_client/components/schema/pig.py -src/openapi_client/components/schema/player.py -src/openapi_client/components/schema/public_key.py -src/openapi_client/components/schema/quadrilateral.py -src/openapi_client/components/schema/quadrilateral_interface.py -src/openapi_client/components/schema/read_only_first.py -src/openapi_client/components/schema/ref_pet.py -src/openapi_client/components/schema/req_props_from_explicit_add_props.py -src/openapi_client/components/schema/req_props_from_true_add_props.py -src/openapi_client/components/schema/req_props_from_unset_add_props.py -src/openapi_client/components/schema/return.py -src/openapi_client/components/schema/scalene_triangle.py -src/openapi_client/components/schema/self_referencing_array_model.py -src/openapi_client/components/schema/self_referencing_object_model.py -src/openapi_client/components/schema/shape.py -src/openapi_client/components/schema/shape_or_null.py -src/openapi_client/components/schema/simple_quadrilateral.py -src/openapi_client/components/schema/some_object.py -src/openapi_client/components/schema/special_model_name.py -src/openapi_client/components/schema/string.py -src/openapi_client/components/schema/string_boolean_map.py -src/openapi_client/components/schema/string_enum.py -src/openapi_client/components/schema/string_enum_with_default_value.py -src/openapi_client/components/schema/string_with_validation.py -src/openapi_client/components/schema/tag.py -src/openapi_client/components/schema/triangle.py -src/openapi_client/components/schema/triangle_interface.py -src/openapi_client/components/schema/user.py -src/openapi_client/components/schema/uuid_string.py -src/openapi_client/components/schema/whale.py -src/openapi_client/components/schema/zebra.py -src/openapi_client/components/schemas/__init__.py -src/openapi_client/components/security_schemes/__init__.py -src/openapi_client/components/security_schemes/security_scheme_api_key.py -src/openapi_client/components/security_schemes/security_scheme_api_key_query.py -src/openapi_client/components/security_schemes/security_scheme_bearer_test.py -src/openapi_client/components/security_schemes/security_scheme_http_basic_test.py -src/openapi_client/components/security_schemes/security_scheme_http_signature_test.py -src/openapi_client/components/security_schemes/security_scheme_open_id_connect_test.py -src/openapi_client/components/security_schemes/security_scheme_petstore_auth.py -src/openapi_client/configurations/__init__.py -src/openapi_client/configurations/api_configuration.py -src/openapi_client/configurations/schema_configuration.py -src/openapi_client/exceptions.py -src/openapi_client/paths/__init__.py -src/openapi_client/paths/another_fake_dummy/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/operation.py -src/openapi_client/paths/another_fake_dummy/patch/request_body/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/responses/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/common_param_sub_dir/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/header_parameters.py -src/openapi_client/paths/common_param_sub_dir/delete/operation.py -src/openapi_client/paths/common_param_sub_dir/delete/parameters/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py -src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py -src/openapi_client/paths/common_param_sub_dir/delete/path_parameters.py -src/openapi_client/paths/common_param_sub_dir/delete/responses/__init__.py -src/openapi_client/paths/common_param_sub_dir/delete/responses/response_200/__init__.py -src/openapi_client/paths/common_param_sub_dir/get/__init__.py -src/openapi_client/paths/common_param_sub_dir/get/operation.py -src/openapi_client/paths/common_param_sub_dir/get/parameters/__init__.py -src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py -src/openapi_client/paths/common_param_sub_dir/get/path_parameters.py -src/openapi_client/paths/common_param_sub_dir/get/query_parameters.py -src/openapi_client/paths/common_param_sub_dir/get/responses/__init__.py -src/openapi_client/paths/common_param_sub_dir/get/responses/response_200/__init__.py -src/openapi_client/paths/common_param_sub_dir/parameters/__init__.py -src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/__init__.py -src/openapi_client/paths/common_param_sub_dir/parameters/parameter_0/schema.py -src/openapi_client/paths/common_param_sub_dir/post/__init__.py -src/openapi_client/paths/common_param_sub_dir/post/header_parameters.py -src/openapi_client/paths/common_param_sub_dir/post/operation.py -src/openapi_client/paths/common_param_sub_dir/post/parameters/__init__.py -src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py -src/openapi_client/paths/common_param_sub_dir/post/path_parameters.py -src/openapi_client/paths/common_param_sub_dir/post/responses/__init__.py -src/openapi_client/paths/common_param_sub_dir/post/responses/response_200/__init__.py -src/openapi_client/paths/fake/__init__.py -src/openapi_client/paths/fake/delete/__init__.py -src/openapi_client/paths/fake/delete/header_parameters.py -src/openapi_client/paths/fake/delete/operation.py -src/openapi_client/paths/fake/delete/parameters/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_0/schema.py -src/openapi_client/paths/fake/delete/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_1/schema.py -src/openapi_client/paths/fake/delete/parameters/parameter_2/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_2/schema.py -src/openapi_client/paths/fake/delete/parameters/parameter_3/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_3/schema.py -src/openapi_client/paths/fake/delete/parameters/parameter_4/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_4/schema.py -src/openapi_client/paths/fake/delete/parameters/parameter_5/__init__.py -src/openapi_client/paths/fake/delete/parameters/parameter_5/schema.py -src/openapi_client/paths/fake/delete/query_parameters.py -src/openapi_client/paths/fake/delete/responses/__init__.py -src/openapi_client/paths/fake/delete/responses/response_200/__init__.py -src/openapi_client/paths/fake/delete/security/__init__.py -src/openapi_client/paths/fake/delete/security/security_requirement_object_0.py -src/openapi_client/paths/fake/get/__init__.py -src/openapi_client/paths/fake/get/header_parameters.py -src/openapi_client/paths/fake/get/operation.py -src/openapi_client/paths/fake/get/parameters/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_0/schema.py -src/openapi_client/paths/fake/get/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_1/schema.py -src/openapi_client/paths/fake/get/parameters/parameter_2/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_2/schema.py -src/openapi_client/paths/fake/get/parameters/parameter_3/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_3/schema.py -src/openapi_client/paths/fake/get/parameters/parameter_4/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_4/schema.py -src/openapi_client/paths/fake/get/parameters/parameter_5/__init__.py -src/openapi_client/paths/fake/get/parameters/parameter_5/schema.py -src/openapi_client/paths/fake/get/query_parameters.py -src/openapi_client/paths/fake/get/request_body/__init__.py -src/openapi_client/paths/fake/get/request_body/content/__init__.py -src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py -src/openapi_client/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py -src/openapi_client/paths/fake/get/responses/__init__.py -src/openapi_client/paths/fake/get/responses/response_200/__init__.py -src/openapi_client/paths/fake/get/responses/response_404/__init__.py -src/openapi_client/paths/fake/get/responses/response_404/content/__init__.py -src/openapi_client/paths/fake/get/responses/response_404/content/application_json/__init__.py -src/openapi_client/paths/fake/get/responses/response_404/content/application_json/schema.py -src/openapi_client/paths/fake/patch/__init__.py -src/openapi_client/paths/fake/patch/operation.py -src/openapi_client/paths/fake/patch/request_body/__init__.py -src/openapi_client/paths/fake/patch/responses/__init__.py -src/openapi_client/paths/fake/patch/responses/response_200/__init__.py -src/openapi_client/paths/fake/patch/responses/response_200/content/__init__.py -src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake/patch/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake/post/__init__.py -src/openapi_client/paths/fake/post/operation.py -src/openapi_client/paths/fake/post/request_body/__init__.py -src/openapi_client/paths/fake/post/request_body/content/__init__.py -src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py -src/openapi_client/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py -src/openapi_client/paths/fake/post/responses/__init__.py -src/openapi_client/paths/fake/post/responses/response_200/__init__.py -src/openapi_client/paths/fake/post/responses/response_404/__init__.py -src/openapi_client/paths/fake/post/security/__init__.py -src/openapi_client/paths/fake/post/security/security_requirement_object_0.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/operation.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_body_with_file_schema/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/operation.py -src/openapi_client/paths/fake_body_with_file_schema/put/request_body/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_body_with_file_schema/put/responses/__init__.py -src/openapi_client/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py -src/openapi_client/paths/fake_body_with_query_params/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/operation.py -src/openapi_client/paths/fake_body_with_query_params/put/parameters/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_body_with_query_params/put/query_parameters.py -src/openapi_client/paths/fake_body_with_query_params/put/request_body/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_body_with_query_params/put/responses/__init__.py -src/openapi_client/paths/fake_body_with_query_params/put/responses/response_200/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/operation.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py -src/openapi_client/paths/fake_case_sensitive_params/put/query_parameters.py -src/openapi_client/paths/fake_case_sensitive_params/put/responses/__init__.py -src/openapi_client/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py -src/openapi_client/paths/fake_classname_test/__init__.py -src/openapi_client/paths/fake_classname_test/patch/__init__.py -src/openapi_client/paths/fake_classname_test/patch/operation.py -src/openapi_client/paths/fake_classname_test/patch/request_body/__init__.py -src/openapi_client/paths/fake_classname_test/patch/responses/__init__.py -src/openapi_client/paths/fake_classname_test/patch/responses/response_200/__init__.py -src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_classname_test/patch/security/__init__.py -src/openapi_client/paths/fake_classname_test/patch/security/security_requirement_object_0.py -src/openapi_client/paths/fake_delete_coffee_id/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/operation.py -src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_delete_coffee_id/delete/path_parameters.py -src/openapi_client/paths/fake_delete_coffee_id/delete/responses/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py -src/openapi_client/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py -src/openapi_client/paths/fake_health/__init__.py -src/openapi_client/paths/fake_health/get/__init__.py -src/openapi_client/paths/fake_health/get/operation.py -src/openapi_client/paths/fake_health/get/responses/__init__.py -src/openapi_client/paths/fake_health/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_health/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_health/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_inline_additional_properties/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/operation.py -src/openapi_client/paths/fake_inline_additional_properties/post/request_body/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_inline_additional_properties/post/responses/__init__.py -src/openapi_client/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_inline_composition/__init__.py -src/openapi_client/paths/fake_inline_composition/post/__init__.py -src/openapi_client/paths/fake_inline_composition/post/operation.py -src/openapi_client/paths/fake_inline_composition/post/parameters/__init__.py -src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake_inline_composition/post/parameters/parameter_1/schema.py -src/openapi_client/paths/fake_inline_composition/post/query_parameters.py -src/openapi_client/paths/fake_inline_composition/post/request_body/__init__.py -src/openapi_client/paths/fake_inline_composition/post/request_body/content/__init__.py -src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_inline_composition/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_inline_composition/post/responses/__init__.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_json_form_data/__init__.py -src/openapi_client/paths/fake_json_form_data/get/__init__.py -src/openapi_client/paths/fake_json_form_data/get/operation.py -src/openapi_client/paths/fake_json_form_data/get/request_body/__init__.py -src/openapi_client/paths/fake_json_form_data/get/request_body/content/__init__.py -src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py -src/openapi_client/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py -src/openapi_client/paths/fake_json_form_data/get/responses/__init__.py -src/openapi_client/paths/fake_json_form_data/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_json_patch/__init__.py -src/openapi_client/paths/fake_json_patch/patch/__init__.py -src/openapi_client/paths/fake_json_patch/patch/operation.py -src/openapi_client/paths/fake_json_patch/patch/request_body/__init__.py -src/openapi_client/paths/fake_json_patch/patch/request_body/content/__init__.py -src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py -src/openapi_client/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py -src/openapi_client/paths/fake_json_patch/patch/responses/__init__.py -src/openapi_client/paths/fake_json_patch/patch/responses/response_200/__init__.py -src/openapi_client/paths/fake_json_with_charset/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/operation.py -src/openapi_client/paths/fake_json_with_charset/post/request_body/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/request_body/content/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py -src/openapi_client/paths/fake_json_with_charset/post/responses/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py -src/openapi_client/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py -src/openapi_client/paths/fake_multiple_request_body_content_types/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/operation.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_multiple_response_bodies/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/operation.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py -src/openapi_client/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py -src/openapi_client/paths/fake_multiple_securities/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/operation.py -src/openapi_client/paths/fake_multiple_securities/get/responses/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_multiple_securities/get/security/__init__.py -src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_0.py -src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_1.py -src/openapi_client/paths/fake_multiple_securities/get/security/security_requirement_object_2.py -src/openapi_client/paths/fake_obj_in_query/__init__.py -src/openapi_client/paths/fake_obj_in_query/get/__init__.py -src/openapi_client/paths/fake_obj_in_query/get/operation.py -src/openapi_client/paths/fake_obj_in_query/get/parameters/__init__.py -src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_obj_in_query/get/query_parameters.py -src/openapi_client/paths/fake_obj_in_query/get/responses/__init__.py -src/openapi_client/paths/fake_obj_in_query/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_pem_content_type/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/operation.py -src/openapi_client/paths/fake_pem_content_type/get/request_body/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/request_body/content/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py -src/openapi_client/paths/fake_pem_content_type/get/responses/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py -src/openapi_client/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/operation.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py -src/openapi_client/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py -src/openapi_client/paths/fake_query_param_with_json_content_type/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/operation.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/query_parameters.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_redirection/__init__.py -src/openapi_client/paths/fake_redirection/get/__init__.py -src/openapi_client/paths/fake_redirection/get/operation.py -src/openapi_client/paths/fake_redirection/get/responses/__init__.py -src/openapi_client/paths/fake_redirection/get/responses/response_303/__init__.py -src/openapi_client/paths/fake_redirection/get/responses/response_3xx/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/get/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/get/operation.py -src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_ref_obj_in_query/get/query_parameters.py -src/openapi_client/paths/fake_ref_obj_in_query/get/responses/__init__.py -src/openapi_client/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/operation.py -src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_array_of_enums/post/responses/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_arraymodel/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/operation.py -src/openapi_client/paths/fake_refs_arraymodel/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_arraymodel/post/responses/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_boolean/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/operation.py -src/openapi_client/paths/fake_refs_boolean/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_boolean/post/responses/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_enum/__init__.py -src/openapi_client/paths/fake_refs_enum/post/__init__.py -src/openapi_client/paths/fake_refs_enum/post/operation.py -src/openapi_client/paths/fake_refs_enum/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_enum/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_enum/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_enum/post/responses/__init__.py -src/openapi_client/paths/fake_refs_enum/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_mammal/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/operation.py -src/openapi_client/paths/fake_refs_mammal/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_mammal/post/responses/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_number/__init__.py -src/openapi_client/paths/fake_refs_number/post/__init__.py -src/openapi_client/paths/fake_refs_number/post/operation.py -src/openapi_client/paths/fake_refs_number/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_number/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_number/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_number/post/responses/__init__.py -src/openapi_client/paths/fake_refs_number/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/operation.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_refs_string/__init__.py -src/openapi_client/paths/fake_refs_string/post/__init__.py -src/openapi_client/paths/fake_refs_string/post/operation.py -src/openapi_client/paths/fake_refs_string/post/request_body/__init__.py -src/openapi_client/paths/fake_refs_string/post/request_body/content/__init__.py -src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_string/post/request_body/content/application_json/schema.py -src/openapi_client/paths/fake_refs_string/post/responses/__init__.py -src/openapi_client/paths/fake_refs_string/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_response_without_schema/__init__.py -src/openapi_client/paths/fake_response_without_schema/get/__init__.py -src/openapi_client/paths/fake_response_without_schema/get/operation.py -src/openapi_client/paths/fake_response_without_schema/get/responses/__init__.py -src/openapi_client/paths/fake_response_without_schema/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_test_query_paramters/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/operation.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py -src/openapi_client/paths/fake_test_query_paramters/put/query_parameters.py -src/openapi_client/paths/fake_test_query_paramters/put/responses/__init__.py -src/openapi_client/paths/fake_test_query_paramters/put/responses/response_200/__init__.py -src/openapi_client/paths/fake_upload_download_file/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/operation.py -src/openapi_client/paths/fake_upload_download_file/post/request_body/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/request_body/content/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py -src/openapi_client/paths/fake_upload_download_file/post/responses/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py -src/openapi_client/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py -src/openapi_client/paths/fake_upload_file/__init__.py -src/openapi_client/paths/fake_upload_file/post/__init__.py -src/openapi_client/paths/fake_upload_file/post/operation.py -src/openapi_client/paths/fake_upload_file/post/request_body/__init__.py -src/openapi_client/paths/fake_upload_file/post/request_body/content/__init__.py -src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_upload_file/post/responses/__init__.py -src/openapi_client/paths/fake_upload_file/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_upload_files/__init__.py -src/openapi_client/paths/fake_upload_files/post/__init__.py -src/openapi_client/paths/fake_upload_files/post/operation.py -src/openapi_client/paths/fake_upload_files/post/request_body/__init__.py -src/openapi_client/paths/fake_upload_files/post/request_body/content/__init__.py -src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/fake_upload_files/post/responses/__init__.py -src/openapi_client/paths/fake_upload_files/post/responses/response_200/__init__.py -src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/operation.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py -src/openapi_client/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py -src/openapi_client/paths/foo/__init__.py -src/openapi_client/paths/foo/get/__init__.py -src/openapi_client/paths/foo/get/operation.py -src/openapi_client/paths/foo/get/responses/__init__.py -src/openapi_client/paths/foo/get/responses/response_default/__init__.py -src/openapi_client/paths/foo/get/responses/response_default/content/__init__.py -src/openapi_client/paths/foo/get/responses/response_default/content/application_json/__init__.py -src/openapi_client/paths/foo/get/responses/response_default/content/application_json/schema.py -src/openapi_client/paths/foo/get/servers/__init__.py -src/openapi_client/paths/foo/get/servers/server_0.py -src/openapi_client/paths/foo/get/servers/server_1.py -src/openapi_client/paths/pet/__init__.py -src/openapi_client/paths/pet/post/__init__.py -src/openapi_client/paths/pet/post/operation.py -src/openapi_client/paths/pet/post/request_body/__init__.py -src/openapi_client/paths/pet/post/responses/__init__.py -src/openapi_client/paths/pet/post/responses/response_200/__init__.py -src/openapi_client/paths/pet/post/responses/response_405/__init__.py -src/openapi_client/paths/pet/post/security/__init__.py -src/openapi_client/paths/pet/post/security/security_requirement_object_0.py -src/openapi_client/paths/pet/post/security/security_requirement_object_1.py -src/openapi_client/paths/pet/post/security/security_requirement_object_2.py -src/openapi_client/paths/pet/put/__init__.py -src/openapi_client/paths/pet/put/operation.py -src/openapi_client/paths/pet/put/request_body/__init__.py -src/openapi_client/paths/pet/put/responses/__init__.py -src/openapi_client/paths/pet/put/responses/response_400/__init__.py -src/openapi_client/paths/pet/put/responses/response_404/__init__.py -src/openapi_client/paths/pet/put/responses/response_405/__init__.py -src/openapi_client/paths/pet/put/security/__init__.py -src/openapi_client/paths/pet/put/security/security_requirement_object_0.py -src/openapi_client/paths/pet/put/security/security_requirement_object_1.py -src/openapi_client/paths/pet_find_by_status/__init__.py -src/openapi_client/paths/pet_find_by_status/get/__init__.py -src/openapi_client/paths/pet_find_by_status/get/operation.py -src/openapi_client/paths/pet_find_by_status/get/parameters/__init__.py -src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_find_by_status/get/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_find_by_status/get/query_parameters.py -src/openapi_client/paths/pet_find_by_status/get/responses/__init__.py -src/openapi_client/paths/pet_find_by_status/get/responses/response_200/__init__.py -src/openapi_client/paths/pet_find_by_status/get/responses/response_400/__init__.py -src/openapi_client/paths/pet_find_by_status/get/security/__init__.py -src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_0.py -src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_1.py -src/openapi_client/paths/pet_find_by_status/get/security/security_requirement_object_2.py -src/openapi_client/paths/pet_find_by_status/servers/__init__.py -src/openapi_client/paths/pet_find_by_status/servers/server_0.py -src/openapi_client/paths/pet_find_by_status/servers/server_1.py -src/openapi_client/paths/pet_find_by_tags/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/operation.py -src/openapi_client/paths/pet_find_by_tags/get/parameters/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_find_by_tags/get/query_parameters.py -src/openapi_client/paths/pet_find_by_tags/get/responses/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/responses/response_200/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/responses/response_400/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/security/__init__.py -src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_0.py -src/openapi_client/paths/pet_find_by_tags/get/security/security_requirement_object_1.py -src/openapi_client/paths/pet_pet_id/__init__.py -src/openapi_client/paths/pet_pet_id/delete/__init__.py -src/openapi_client/paths/pet_pet_id/delete/header_parameters.py -src/openapi_client/paths/pet_pet_id/delete/operation.py -src/openapi_client/paths/pet_pet_id/delete/parameters/__init__.py -src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py -src/openapi_client/paths/pet_pet_id/delete/parameters/parameter_1/schema.py -src/openapi_client/paths/pet_pet_id/delete/path_parameters.py -src/openapi_client/paths/pet_pet_id/delete/responses/__init__.py -src/openapi_client/paths/pet_pet_id/delete/responses/response_400/__init__.py -src/openapi_client/paths/pet_pet_id/delete/security/__init__.py -src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_0.py -src/openapi_client/paths/pet_pet_id/delete/security/security_requirement_object_1.py -src/openapi_client/paths/pet_pet_id/get/__init__.py -src/openapi_client/paths/pet_pet_id/get/operation.py -src/openapi_client/paths/pet_pet_id/get/parameters/__init__.py -src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_pet_id/get/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_pet_id/get/path_parameters.py -src/openapi_client/paths/pet_pet_id/get/responses/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py -src/openapi_client/paths/pet_pet_id/get/responses/response_400/__init__.py -src/openapi_client/paths/pet_pet_id/get/responses/response_404/__init__.py -src/openapi_client/paths/pet_pet_id/get/security/__init__.py -src/openapi_client/paths/pet_pet_id/get/security/security_requirement_object_0.py -src/openapi_client/paths/pet_pet_id/post/__init__.py -src/openapi_client/paths/pet_pet_id/post/operation.py -src/openapi_client/paths/pet_pet_id/post/parameters/__init__.py -src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_pet_id/post/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_pet_id/post/path_parameters.py -src/openapi_client/paths/pet_pet_id/post/request_body/__init__.py -src/openapi_client/paths/pet_pet_id/post/request_body/content/__init__.py -src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py -src/openapi_client/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py -src/openapi_client/paths/pet_pet_id/post/responses/__init__.py -src/openapi_client/paths/pet_pet_id/post/responses/response_405/__init__.py -src/openapi_client/paths/pet_pet_id/post/security/__init__.py -src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_0.py -src/openapi_client/paths/pet_pet_id/post/security/security_requirement_object_1.py -src/openapi_client/paths/pet_pet_id_upload_image/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/operation.py -src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py -src/openapi_client/paths/pet_pet_id_upload_image/post/path_parameters.py -src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py -src/openapi_client/paths/pet_pet_id_upload_image/post/responses/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/security/__init__.py -src/openapi_client/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py -src/openapi_client/paths/solidus/__init__.py -src/openapi_client/paths/solidus/get/__init__.py -src/openapi_client/paths/solidus/get/operation.py -src/openapi_client/paths/solidus/get/responses/__init__.py -src/openapi_client/paths/solidus/get/responses/response_200/__init__.py -src/openapi_client/paths/store_inventory/__init__.py -src/openapi_client/paths/store_inventory/get/__init__.py -src/openapi_client/paths/store_inventory/get/operation.py -src/openapi_client/paths/store_inventory/get/responses/__init__.py -src/openapi_client/paths/store_inventory/get/responses/response_200/__init__.py -src/openapi_client/paths/store_inventory/get/security/__init__.py -src/openapi_client/paths/store_inventory/get/security/security_requirement_object_0.py -src/openapi_client/paths/store_order/__init__.py -src/openapi_client/paths/store_order/post/__init__.py -src/openapi_client/paths/store_order/post/operation.py -src/openapi_client/paths/store_order/post/request_body/__init__.py -src/openapi_client/paths/store_order/post/request_body/content/__init__.py -src/openapi_client/paths/store_order/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/store_order/post/request_body/content/application_json/schema.py -src/openapi_client/paths/store_order/post/responses/__init__.py -src/openapi_client/paths/store_order/post/responses/response_200/__init__.py -src/openapi_client/paths/store_order/post/responses/response_200/content/__init__.py -src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/store_order/post/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/__init__.py -src/openapi_client/paths/store_order/post/responses/response_200/content/application_xml/schema.py -src/openapi_client/paths/store_order/post/responses/response_400/__init__.py -src/openapi_client/paths/store_order_order_id/__init__.py -src/openapi_client/paths/store_order_order_id/delete/__init__.py -src/openapi_client/paths/store_order_order_id/delete/operation.py -src/openapi_client/paths/store_order_order_id/delete/parameters/__init__.py -src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/store_order_order_id/delete/parameters/parameter_0/schema.py -src/openapi_client/paths/store_order_order_id/delete/path_parameters.py -src/openapi_client/paths/store_order_order_id/delete/responses/__init__.py -src/openapi_client/paths/store_order_order_id/delete/responses/response_400/__init__.py -src/openapi_client/paths/store_order_order_id/delete/responses/response_404/__init__.py -src/openapi_client/paths/store_order_order_id/get/__init__.py -src/openapi_client/paths/store_order_order_id/get/operation.py -src/openapi_client/paths/store_order_order_id/get/parameters/__init__.py -src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/store_order_order_id/get/parameters/parameter_0/schema.py -src/openapi_client/paths/store_order_order_id/get/path_parameters.py -src/openapi_client/paths/store_order_order_id/get/responses/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py -src/openapi_client/paths/store_order_order_id/get/responses/response_400/__init__.py -src/openapi_client/paths/store_order_order_id/get/responses/response_404/__init__.py -src/openapi_client/paths/user/__init__.py -src/openapi_client/paths/user/post/__init__.py -src/openapi_client/paths/user/post/operation.py -src/openapi_client/paths/user/post/request_body/__init__.py -src/openapi_client/paths/user/post/request_body/content/__init__.py -src/openapi_client/paths/user/post/request_body/content/application_json/__init__.py -src/openapi_client/paths/user/post/request_body/content/application_json/schema.py -src/openapi_client/paths/user/post/responses/__init__.py -src/openapi_client/paths/user/post/responses/response_default/__init__.py -src/openapi_client/paths/user_create_with_array/__init__.py -src/openapi_client/paths/user_create_with_array/post/__init__.py -src/openapi_client/paths/user_create_with_array/post/operation.py -src/openapi_client/paths/user_create_with_array/post/request_body/__init__.py -src/openapi_client/paths/user_create_with_array/post/responses/__init__.py -src/openapi_client/paths/user_create_with_array/post/responses/response_default/__init__.py -src/openapi_client/paths/user_create_with_list/__init__.py -src/openapi_client/paths/user_create_with_list/post/__init__.py -src/openapi_client/paths/user_create_with_list/post/operation.py -src/openapi_client/paths/user_create_with_list/post/request_body/__init__.py -src/openapi_client/paths/user_create_with_list/post/responses/__init__.py -src/openapi_client/paths/user_create_with_list/post/responses/response_default/__init__.py -src/openapi_client/paths/user_login/__init__.py -src/openapi_client/paths/user_login/get/__init__.py -src/openapi_client/paths/user_login/get/operation.py -src/openapi_client/paths/user_login/get/parameters/__init__.py -src/openapi_client/paths/user_login/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/user_login/get/parameters/parameter_0/schema.py -src/openapi_client/paths/user_login/get/parameters/parameter_1/__init__.py -src/openapi_client/paths/user_login/get/parameters/parameter_1/schema.py -src/openapi_client/paths/user_login/get/query_parameters.py -src/openapi_client/paths/user_login/get/responses/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/content/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/content/application_xml/schema.py -src/openapi_client/paths/user_login/get/responses/response_200/header_parameters.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py -src/openapi_client/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py -src/openapi_client/paths/user_login/get/responses/response_400/__init__.py -src/openapi_client/paths/user_logout/__init__.py -src/openapi_client/paths/user_logout/get/__init__.py -src/openapi_client/paths/user_logout/get/operation.py -src/openapi_client/paths/user_logout/get/responses/__init__.py -src/openapi_client/paths/user_logout/get/responses/response_default/__init__.py -src/openapi_client/paths/user_username/__init__.py -src/openapi_client/paths/user_username/delete/__init__.py -src/openapi_client/paths/user_username/delete/operation.py -src/openapi_client/paths/user_username/delete/parameters/__init__.py -src/openapi_client/paths/user_username/delete/parameters/parameter_0/__init__.py -src/openapi_client/paths/user_username/delete/path_parameters.py -src/openapi_client/paths/user_username/delete/responses/__init__.py -src/openapi_client/paths/user_username/delete/responses/response_200/__init__.py -src/openapi_client/paths/user_username/delete/responses/response_404/__init__.py -src/openapi_client/paths/user_username/get/__init__.py -src/openapi_client/paths/user_username/get/operation.py -src/openapi_client/paths/user_username/get/parameters/__init__.py -src/openapi_client/paths/user_username/get/parameters/parameter_0/__init__.py -src/openapi_client/paths/user_username/get/path_parameters.py -src/openapi_client/paths/user_username/get/responses/__init__.py -src/openapi_client/paths/user_username/get/responses/response_200/__init__.py -src/openapi_client/paths/user_username/get/responses/response_200/content/__init__.py -src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/__init__.py -src/openapi_client/paths/user_username/get/responses/response_200/content/application_json/schema.py -src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/__init__.py -src/openapi_client/paths/user_username/get/responses/response_200/content/application_xml/schema.py -src/openapi_client/paths/user_username/get/responses/response_400/__init__.py -src/openapi_client/paths/user_username/get/responses/response_404/__init__.py -src/openapi_client/paths/user_username/put/__init__.py -src/openapi_client/paths/user_username/put/operation.py -src/openapi_client/paths/user_username/put/parameters/__init__.py -src/openapi_client/paths/user_username/put/parameters/parameter_0/__init__.py -src/openapi_client/paths/user_username/put/path_parameters.py -src/openapi_client/paths/user_username/put/request_body/__init__.py -src/openapi_client/paths/user_username/put/request_body/content/__init__.py -src/openapi_client/paths/user_username/put/request_body/content/application_json/__init__.py -src/openapi_client/paths/user_username/put/request_body/content/application_json/schema.py -src/openapi_client/paths/user_username/put/responses/__init__.py -src/openapi_client/paths/user_username/put/responses/response_400/__init__.py -src/openapi_client/paths/user_username/put/responses/response_404/__init__.py -src/openapi_client/py.typed -src/openapi_client/rest.py -src/openapi_client/schemas/__init__.py -src/openapi_client/schemas/format.py -src/openapi_client/schemas/original_immutabledict.py -src/openapi_client/schemas/schema.py -src/openapi_client/schemas/schemas.py -src/openapi_client/schemas/validation.py -src/openapi_client/security_schemes.py -src/openapi_client/server.py -src/openapi_client/servers/__init__.py -src/openapi_client/servers/server_0.py -src/openapi_client/servers/server_1.py -src/openapi_client/servers/server_2.py -src/openapi_client/shared_imports/__init__.py -src/openapi_client/shared_imports/header_imports.py -src/openapi_client/shared_imports/operation_imports.py -src/openapi_client/shared_imports/response_imports.py -src/openapi_client/shared_imports/schema_imports.py -src/openapi_client/shared_imports/security_scheme_imports.py -src/openapi_client/shared_imports/server_imports.py -src/openapi_client/signing.py +src/petstore_api/__init__.py +src/petstore_api/api_client.py +src/petstore_api/api_response.py +src/petstore_api/apis/__init__.py +src/petstore_api/apis/path_to_api.py +src/petstore_api/apis/paths/__init__.py +src/petstore_api/apis/paths/another_fake_dummy.py +src/petstore_api/apis/paths/common_param_sub_dir.py +src/petstore_api/apis/paths/fake.py +src/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py +src/petstore_api/apis/paths/fake_body_with_file_schema.py +src/petstore_api/apis/paths/fake_body_with_query_params.py +src/petstore_api/apis/paths/fake_case_sensitive_params.py +src/petstore_api/apis/paths/fake_classname_test.py +src/petstore_api/apis/paths/fake_delete_coffee_id.py +src/petstore_api/apis/paths/fake_health.py +src/petstore_api/apis/paths/fake_inline_additional_properties.py +src/petstore_api/apis/paths/fake_inline_composition.py +src/petstore_api/apis/paths/fake_json_form_data.py +src/petstore_api/apis/paths/fake_json_patch.py +src/petstore_api/apis/paths/fake_json_with_charset.py +src/petstore_api/apis/paths/fake_multiple_request_body_content_types.py +src/petstore_api/apis/paths/fake_multiple_response_bodies.py +src/petstore_api/apis/paths/fake_multiple_securities.py +src/petstore_api/apis/paths/fake_obj_in_query.py +src/petstore_api/apis/paths/fake_parameter_collisions1_abab_self_ab.py +src/petstore_api/apis/paths/fake_pem_content_type.py +src/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py +src/petstore_api/apis/paths/fake_query_param_with_json_content_type.py +src/petstore_api/apis/paths/fake_redirection.py +src/petstore_api/apis/paths/fake_ref_obj_in_query.py +src/petstore_api/apis/paths/fake_refs_array_of_enums.py +src/petstore_api/apis/paths/fake_refs_arraymodel.py +src/petstore_api/apis/paths/fake_refs_boolean.py +src/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py +src/petstore_api/apis/paths/fake_refs_enum.py +src/petstore_api/apis/paths/fake_refs_mammal.py +src/petstore_api/apis/paths/fake_refs_number.py +src/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py +src/petstore_api/apis/paths/fake_refs_string.py +src/petstore_api/apis/paths/fake_response_without_schema.py +src/petstore_api/apis/paths/fake_test_query_paramters.py +src/petstore_api/apis/paths/fake_upload_download_file.py +src/petstore_api/apis/paths/fake_upload_file.py +src/petstore_api/apis/paths/fake_upload_files.py +src/petstore_api/apis/paths/fake_wild_card_responses.py +src/petstore_api/apis/paths/foo.py +src/petstore_api/apis/paths/pet.py +src/petstore_api/apis/paths/pet_find_by_status.py +src/petstore_api/apis/paths/pet_find_by_tags.py +src/petstore_api/apis/paths/pet_pet_id.py +src/petstore_api/apis/paths/pet_pet_id_upload_image.py +src/petstore_api/apis/paths/solidus.py +src/petstore_api/apis/paths/store_inventory.py +src/petstore_api/apis/paths/store_order.py +src/petstore_api/apis/paths/store_order_order_id.py +src/petstore_api/apis/paths/user.py +src/petstore_api/apis/paths/user_create_with_array.py +src/petstore_api/apis/paths/user_create_with_list.py +src/petstore_api/apis/paths/user_login.py +src/petstore_api/apis/paths/user_logout.py +src/petstore_api/apis/paths/user_username.py +src/petstore_api/apis/tag_to_api.py +src/petstore_api/apis/tags/__init__.py +src/petstore_api/apis/tags/another_fake_api.py +src/petstore_api/apis/tags/default_api.py +src/petstore_api/apis/tags/fake_api.py +src/petstore_api/apis/tags/fake_classname_tags123_api.py +src/petstore_api/apis/tags/pet_api.py +src/petstore_api/apis/tags/store_api.py +src/petstore_api/apis/tags/user_api.py +src/petstore_api/components/__init__.py +src/petstore_api/components/headers/__init__.py +src/petstore_api/components/headers/header_int32_json_content_type_header/__init__.py +src/petstore_api/components/headers/header_int32_json_content_type_header/content/__init__.py +src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/__init__.py +src/petstore_api/components/headers/header_int32_json_content_type_header/content/application_json/schema.py +src/petstore_api/components/headers/header_number_header/__init__.py +src/petstore_api/components/headers/header_number_header/schema.py +src/petstore_api/components/headers/header_ref_content_schema_header/__init__.py +src/petstore_api/components/headers/header_ref_content_schema_header/content/__init__.py +src/petstore_api/components/headers/header_ref_content_schema_header/content/application_json/__init__.py +src/petstore_api/components/headers/header_ref_content_schema_header/content/application_json/schema.py +src/petstore_api/components/headers/header_ref_schema_header/__init__.py +src/petstore_api/components/headers/header_ref_schema_header/schema.py +src/petstore_api/components/headers/header_ref_string_header/__init__.py +src/petstore_api/components/headers/header_string_header/__init__.py +src/petstore_api/components/headers/header_string_header/schema.py +src/petstore_api/components/parameters/__init__.py +src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/__init__.py +src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/__init__.py +src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/__init__.py +src/petstore_api/components/parameters/parameter_component_ref_schema_string_with_validation/content/application_json/schema.py +src/petstore_api/components/parameters/parameter_path_user_name/__init__.py +src/petstore_api/components/parameters/parameter_path_user_name/schema.py +src/petstore_api/components/parameters/parameter_ref_path_user_name/__init__.py +src/petstore_api/components/parameters/parameter_ref_schema_string_with_validation/__init__.py +src/petstore_api/components/parameters/parameter_ref_schema_string_with_validation/schema.py +src/petstore_api/components/request_bodies/__init__.py +src/petstore_api/components/request_bodies/request_body_client/__init__.py +src/petstore_api/components/request_bodies/request_body_client/content/__init__.py +src/petstore_api/components/request_bodies/request_body_client/content/application_json/__init__.py +src/petstore_api/components/request_bodies/request_body_client/content/application_json/schema.py +src/petstore_api/components/request_bodies/request_body_pet/__init__.py +src/petstore_api/components/request_bodies/request_body_pet/content/__init__.py +src/petstore_api/components/request_bodies/request_body_pet/content/application_json/__init__.py +src/petstore_api/components/request_bodies/request_body_pet/content/application_json/schema.py +src/petstore_api/components/request_bodies/request_body_pet/content/application_xml/__init__.py +src/petstore_api/components/request_bodies/request_body_pet/content/application_xml/schema.py +src/petstore_api/components/request_bodies/request_body_ref_user_array/__init__.py +src/petstore_api/components/request_bodies/request_body_user_array/__init__.py +src/petstore_api/components/request_bodies/request_body_user_array/content/__init__.py +src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/__init__.py +src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +src/petstore_api/components/responses/__init__.py +src/petstore_api/components/responses/response_headers_with_no_body/__init__.py +src/petstore_api/components/responses/response_headers_with_no_body/header_parameters.py +src/petstore_api/components/responses/response_headers_with_no_body/headers/__init__.py +src/petstore_api/components/responses/response_headers_with_no_body/headers/header_location/__init__.py +src/petstore_api/components/responses/response_headers_with_no_body/headers/header_location/schema.py +src/petstore_api/components/responses/response_ref_success_description_only/__init__.py +src/petstore_api/components/responses/response_ref_successful_xml_and_json_array_of_pet/__init__.py +src/petstore_api/components/responses/response_success_description_only/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/content/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +src/petstore_api/components/responses/response_success_inline_content_and_header/header_parameters.py +src/petstore_api/components/responses/response_success_inline_content_and_header/headers/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/__init__.py +src/petstore_api/components/responses/response_success_inline_content_and_header/headers/header_some_header/schema.py +src/petstore_api/components/responses/response_success_with_json_api_response/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/content/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/content/application_json/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/content/application_json/schema.py +src/petstore_api/components/responses/response_success_with_json_api_response/header_parameters.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_int32/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_number_header/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_ref_content_schema_header/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_ref_schema_header/__init__.py +src/petstore_api/components/responses/response_success_with_json_api_response/headers/header_string_header/__init__.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/__init__.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/__init__.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/__init__.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/__init__.py +src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +src/petstore_api/components/schema/_200_response.py +src/petstore_api/components/schema/__init__.py +src/petstore_api/components/schema/abstract_step_message.py +src/petstore_api/components/schema/additional_properties_class.py +src/petstore_api/components/schema/additional_properties_schema.py +src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +src/petstore_api/components/schema/address.py +src/petstore_api/components/schema/animal.py +src/petstore_api/components/schema/animal_farm.py +src/petstore_api/components/schema/any_type_and_format.py +src/petstore_api/components/schema/any_type_not_string.py +src/petstore_api/components/schema/api_response.py +src/petstore_api/components/schema/apple.py +src/petstore_api/components/schema/apple_req.py +src/petstore_api/components/schema/array_holding_any_type.py +src/petstore_api/components/schema/array_of_array_of_number_only.py +src/petstore_api/components/schema/array_of_enums.py +src/petstore_api/components/schema/array_of_number_only.py +src/petstore_api/components/schema/array_test.py +src/petstore_api/components/schema/array_with_validations_in_items.py +src/petstore_api/components/schema/banana.py +src/petstore_api/components/schema/banana_req.py +src/petstore_api/components/schema/bar.py +src/petstore_api/components/schema/basque_pig.py +src/petstore_api/components/schema/boolean.py +src/petstore_api/components/schema/boolean_enum.py +src/petstore_api/components/schema/capitalization.py +src/petstore_api/components/schema/cat.py +src/petstore_api/components/schema/category.py +src/petstore_api/components/schema/child_cat.py +src/petstore_api/components/schema/class_model.py +src/petstore_api/components/schema/client.py +src/petstore_api/components/schema/complex_quadrilateral.py +src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +src/petstore_api/components/schema/composed_array.py +src/petstore_api/components/schema/composed_bool.py +src/petstore_api/components/schema/composed_none.py +src/petstore_api/components/schema/composed_number.py +src/petstore_api/components/schema/composed_object.py +src/petstore_api/components/schema/composed_one_of_different_types.py +src/petstore_api/components/schema/composed_string.py +src/petstore_api/components/schema/currency.py +src/petstore_api/components/schema/danish_pig.py +src/petstore_api/components/schema/date_time_test.py +src/petstore_api/components/schema/date_time_with_validations.py +src/petstore_api/components/schema/date_with_validations.py +src/petstore_api/components/schema/decimal_payload.py +src/petstore_api/components/schema/dog.py +src/petstore_api/components/schema/drawing.py +src/petstore_api/components/schema/enum_arrays.py +src/petstore_api/components/schema/enum_class.py +src/petstore_api/components/schema/enum_test.py +src/petstore_api/components/schema/equilateral_triangle.py +src/petstore_api/components/schema/file.py +src/petstore_api/components/schema/file_schema_test_class.py +src/petstore_api/components/schema/foo.py +src/petstore_api/components/schema/format_test.py +src/petstore_api/components/schema/from_schema.py +src/petstore_api/components/schema/fruit.py +src/petstore_api/components/schema/fruit_req.py +src/petstore_api/components/schema/gm_fruit.py +src/petstore_api/components/schema/grandparent_animal.py +src/petstore_api/components/schema/has_only_read_only.py +src/petstore_api/components/schema/health_check_result.py +src/petstore_api/components/schema/integer_enum.py +src/petstore_api/components/schema/integer_enum_big.py +src/petstore_api/components/schema/integer_enum_one_value.py +src/petstore_api/components/schema/integer_enum_with_default_value.py +src/petstore_api/components/schema/integer_max10.py +src/petstore_api/components/schema/integer_min15.py +src/petstore_api/components/schema/isosceles_triangle.py +src/petstore_api/components/schema/items.py +src/petstore_api/components/schema/items_schema.py +src/petstore_api/components/schema/json_patch_request.py +src/petstore_api/components/schema/json_patch_request_add_replace_test.py +src/petstore_api/components/schema/json_patch_request_move_copy.py +src/petstore_api/components/schema/json_patch_request_remove.py +src/petstore_api/components/schema/mammal.py +src/petstore_api/components/schema/map_test.py +src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +src/petstore_api/components/schema/money.py +src/petstore_api/components/schema/multi_properties_schema.py +src/petstore_api/components/schema/my_object_dto.py +src/petstore_api/components/schema/name.py +src/petstore_api/components/schema/no_additional_properties.py +src/petstore_api/components/schema/nullable_class.py +src/petstore_api/components/schema/nullable_shape.py +src/petstore_api/components/schema/nullable_string.py +src/petstore_api/components/schema/number.py +src/petstore_api/components/schema/number_only.py +src/petstore_api/components/schema/number_with_exclusive_min_max.py +src/petstore_api/components/schema/number_with_validations.py +src/petstore_api/components/schema/obj_with_required_props.py +src/petstore_api/components/schema/obj_with_required_props_base.py +src/petstore_api/components/schema/object_interface.py +src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +src/petstore_api/components/schema/object_model_with_ref_props.py +src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +src/petstore_api/components/schema/object_with_colliding_properties.py +src/petstore_api/components/schema/object_with_decimal_properties.py +src/petstore_api/components/schema/object_with_difficultly_named_props.py +src/petstore_api/components/schema/object_with_inline_composition_property.py +src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +src/petstore_api/components/schema/object_with_non_intersecting_values.py +src/petstore_api/components/schema/object_with_only_optional_props.py +src/petstore_api/components/schema/object_with_optional_test_prop.py +src/petstore_api/components/schema/object_with_validations.py +src/petstore_api/components/schema/order.py +src/petstore_api/components/schema/paginated_result_my_object_dto.py +src/petstore_api/components/schema/parent_pet.py +src/petstore_api/components/schema/pet.py +src/petstore_api/components/schema/pig.py +src/petstore_api/components/schema/player.py +src/petstore_api/components/schema/public_key.py +src/petstore_api/components/schema/quadrilateral.py +src/petstore_api/components/schema/quadrilateral_interface.py +src/petstore_api/components/schema/read_only_first.py +src/petstore_api/components/schema/ref_pet.py +src/petstore_api/components/schema/req_props_from_explicit_add_props.py +src/petstore_api/components/schema/req_props_from_true_add_props.py +src/petstore_api/components/schema/req_props_from_unset_add_props.py +src/petstore_api/components/schema/return.py +src/petstore_api/components/schema/scalene_triangle.py +src/petstore_api/components/schema/self_referencing_array_model.py +src/petstore_api/components/schema/self_referencing_object_model.py +src/petstore_api/components/schema/shape.py +src/petstore_api/components/schema/shape_or_null.py +src/petstore_api/components/schema/simple_quadrilateral.py +src/petstore_api/components/schema/some_object.py +src/petstore_api/components/schema/special_model_name.py +src/petstore_api/components/schema/string.py +src/petstore_api/components/schema/string_boolean_map.py +src/petstore_api/components/schema/string_enum.py +src/petstore_api/components/schema/string_enum_with_default_value.py +src/petstore_api/components/schema/string_with_validation.py +src/petstore_api/components/schema/tag.py +src/petstore_api/components/schema/triangle.py +src/petstore_api/components/schema/triangle_interface.py +src/petstore_api/components/schema/user.py +src/petstore_api/components/schema/uuid_string.py +src/petstore_api/components/schema/whale.py +src/petstore_api/components/schema/zebra.py +src/petstore_api/components/schemas/__init__.py +src/petstore_api/components/security_schemes/__init__.py +src/petstore_api/components/security_schemes/security_scheme_api_key.py +src/petstore_api/components/security_schemes/security_scheme_api_key_query.py +src/petstore_api/components/security_schemes/security_scheme_bearer_test.py +src/petstore_api/components/security_schemes/security_scheme_http_basic_test.py +src/petstore_api/components/security_schemes/security_scheme_http_signature_test.py +src/petstore_api/components/security_schemes/security_scheme_open_id_connect_test.py +src/petstore_api/components/security_schemes/security_scheme_petstore_auth.py +src/petstore_api/configurations/__init__.py +src/petstore_api/configurations/api_configuration.py +src/petstore_api/configurations/schema_configuration.py +src/petstore_api/exceptions.py +src/petstore_api/paths/__init__.py +src/petstore_api/paths/another_fake_dummy/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/operation.py +src/petstore_api/paths/another_fake_dummy/patch/request_body/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/responses/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/another_fake_dummy/patch/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/common_param_sub_dir/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/header_parameters.py +src/petstore_api/paths/common_param_sub_dir/delete/operation.py +src/petstore_api/paths/common_param_sub_dir/delete/parameters/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_0/schema.py +src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_1/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/parameters/parameter_1/schema.py +src/petstore_api/paths/common_param_sub_dir/delete/path_parameters.py +src/petstore_api/paths/common_param_sub_dir/delete/responses/__init__.py +src/petstore_api/paths/common_param_sub_dir/delete/responses/response_200/__init__.py +src/petstore_api/paths/common_param_sub_dir/get/__init__.py +src/petstore_api/paths/common_param_sub_dir/get/operation.py +src/petstore_api/paths/common_param_sub_dir/get/parameters/__init__.py +src/petstore_api/paths/common_param_sub_dir/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/common_param_sub_dir/get/parameters/parameter_0/schema.py +src/petstore_api/paths/common_param_sub_dir/get/path_parameters.py +src/petstore_api/paths/common_param_sub_dir/get/query_parameters.py +src/petstore_api/paths/common_param_sub_dir/get/responses/__init__.py +src/petstore_api/paths/common_param_sub_dir/get/responses/response_200/__init__.py +src/petstore_api/paths/common_param_sub_dir/parameters/__init__.py +src/petstore_api/paths/common_param_sub_dir/parameters/parameter_0/__init__.py +src/petstore_api/paths/common_param_sub_dir/parameters/parameter_0/schema.py +src/petstore_api/paths/common_param_sub_dir/post/__init__.py +src/petstore_api/paths/common_param_sub_dir/post/header_parameters.py +src/petstore_api/paths/common_param_sub_dir/post/operation.py +src/petstore_api/paths/common_param_sub_dir/post/parameters/__init__.py +src/petstore_api/paths/common_param_sub_dir/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/common_param_sub_dir/post/parameters/parameter_0/schema.py +src/petstore_api/paths/common_param_sub_dir/post/path_parameters.py +src/petstore_api/paths/common_param_sub_dir/post/responses/__init__.py +src/petstore_api/paths/common_param_sub_dir/post/responses/response_200/__init__.py +src/petstore_api/paths/fake/__init__.py +src/petstore_api/paths/fake/delete/__init__.py +src/petstore_api/paths/fake/delete/header_parameters.py +src/petstore_api/paths/fake/delete/operation.py +src/petstore_api/paths/fake/delete/parameters/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_0/schema.py +src/petstore_api/paths/fake/delete/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_1/schema.py +src/petstore_api/paths/fake/delete/parameters/parameter_2/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_2/schema.py +src/petstore_api/paths/fake/delete/parameters/parameter_3/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_3/schema.py +src/petstore_api/paths/fake/delete/parameters/parameter_4/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_4/schema.py +src/petstore_api/paths/fake/delete/parameters/parameter_5/__init__.py +src/petstore_api/paths/fake/delete/parameters/parameter_5/schema.py +src/petstore_api/paths/fake/delete/query_parameters.py +src/petstore_api/paths/fake/delete/responses/__init__.py +src/petstore_api/paths/fake/delete/responses/response_200/__init__.py +src/petstore_api/paths/fake/delete/security/__init__.py +src/petstore_api/paths/fake/delete/security/security_requirement_object_0.py +src/petstore_api/paths/fake/get/__init__.py +src/petstore_api/paths/fake/get/header_parameters.py +src/petstore_api/paths/fake/get/operation.py +src/petstore_api/paths/fake/get/parameters/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +src/petstore_api/paths/fake/get/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_1/schema.py +src/petstore_api/paths/fake/get/parameters/parameter_2/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +src/petstore_api/paths/fake/get/parameters/parameter_3/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_3/schema.py +src/petstore_api/paths/fake/get/parameters/parameter_4/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_4/schema.py +src/petstore_api/paths/fake/get/parameters/parameter_5/__init__.py +src/petstore_api/paths/fake/get/parameters/parameter_5/schema.py +src/petstore_api/paths/fake/get/query_parameters.py +src/petstore_api/paths/fake/get/request_body/__init__.py +src/petstore_api/paths/fake/get/request_body/content/__init__.py +src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/__init__.py +src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +src/petstore_api/paths/fake/get/responses/__init__.py +src/petstore_api/paths/fake/get/responses/response_200/__init__.py +src/petstore_api/paths/fake/get/responses/response_404/__init__.py +src/petstore_api/paths/fake/get/responses/response_404/content/__init__.py +src/petstore_api/paths/fake/get/responses/response_404/content/application_json/__init__.py +src/petstore_api/paths/fake/get/responses/response_404/content/application_json/schema.py +src/petstore_api/paths/fake/patch/__init__.py +src/petstore_api/paths/fake/patch/operation.py +src/petstore_api/paths/fake/patch/request_body/__init__.py +src/petstore_api/paths/fake/patch/responses/__init__.py +src/petstore_api/paths/fake/patch/responses/response_200/__init__.py +src/petstore_api/paths/fake/patch/responses/response_200/content/__init__.py +src/petstore_api/paths/fake/patch/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake/patch/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake/post/__init__.py +src/petstore_api/paths/fake/post/operation.py +src/petstore_api/paths/fake/post/request_body/__init__.py +src/petstore_api/paths/fake/post/request_body/content/__init__.py +src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/__init__.py +src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +src/petstore_api/paths/fake/post/responses/__init__.py +src/petstore_api/paths/fake/post/responses/response_200/__init__.py +src/petstore_api/paths/fake/post/responses/response_404/__init__.py +src/petstore_api/paths/fake/post/security/__init__.py +src/petstore_api/paths/fake/post/security/security_requirement_object_0.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_body_with_file_schema/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/operation.py +src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_body_with_file_schema/put/responses/__init__.py +src/petstore_api/paths/fake_body_with_file_schema/put/responses/response_200/__init__.py +src/petstore_api/paths/fake_body_with_query_params/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/operation.py +src/petstore_api/paths/fake_body_with_query_params/put/parameters/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_body_with_query_params/put/query_parameters.py +src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_body_with_query_params/put/responses/__init__.py +src/petstore_api/paths/fake_body_with_query_params/put/responses/response_200/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/operation.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_1/schema.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/parameters/parameter_2/schema.py +src/petstore_api/paths/fake_case_sensitive_params/put/query_parameters.py +src/petstore_api/paths/fake_case_sensitive_params/put/responses/__init__.py +src/petstore_api/paths/fake_case_sensitive_params/put/responses/response_200/__init__.py +src/petstore_api/paths/fake_classname_test/__init__.py +src/petstore_api/paths/fake_classname_test/patch/__init__.py +src/petstore_api/paths/fake_classname_test/patch/operation.py +src/petstore_api/paths/fake_classname_test/patch/request_body/__init__.py +src/petstore_api/paths/fake_classname_test/patch/responses/__init__.py +src/petstore_api/paths/fake_classname_test/patch/responses/response_200/__init__.py +src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_classname_test/patch/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_classname_test/patch/security/__init__.py +src/petstore_api/paths/fake_classname_test/patch/security/security_requirement_object_0.py +src/petstore_api/paths/fake_delete_coffee_id/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py +src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_delete_coffee_id/delete/path_parameters.py +src/petstore_api/paths/fake_delete_coffee_id/delete/responses/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/responses/response_200/__init__.py +src/petstore_api/paths/fake_delete_coffee_id/delete/responses/response_default/__init__.py +src/petstore_api/paths/fake_health/__init__.py +src/petstore_api/paths/fake_health/get/__init__.py +src/petstore_api/paths/fake_health/get/operation.py +src/petstore_api/paths/fake_health/get/responses/__init__.py +src/petstore_api/paths/fake_health/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_health/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_health/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_health/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_inline_additional_properties/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/operation.py +src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_inline_additional_properties/post/responses/__init__.py +src/petstore_api/paths/fake_inline_additional_properties/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_inline_composition/__init__.py +src/petstore_api/paths/fake_inline_composition/post/__init__.py +src/petstore_api/paths/fake_inline_composition/post/operation.py +src/petstore_api/paths/fake_inline_composition/post/parameters/__init__.py +src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +src/petstore_api/paths/fake_inline_composition/post/query_parameters.py +src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py +src/petstore_api/paths/fake_inline_composition/post/request_body/content/__init__.py +src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_inline_composition/post/responses/__init__.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_json_form_data/__init__.py +src/petstore_api/paths/fake_json_form_data/get/__init__.py +src/petstore_api/paths/fake_json_form_data/get/operation.py +src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py +src/petstore_api/paths/fake_json_form_data/get/request_body/content/__init__.py +src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/__init__.py +src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +src/petstore_api/paths/fake_json_form_data/get/responses/__init__.py +src/petstore_api/paths/fake_json_form_data/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_json_patch/__init__.py +src/petstore_api/paths/fake_json_patch/patch/__init__.py +src/petstore_api/paths/fake_json_patch/patch/operation.py +src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py +src/petstore_api/paths/fake_json_patch/patch/request_body/content/__init__.py +src/petstore_api/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/__init__.py +src/petstore_api/paths/fake_json_patch/patch/request_body/content/application_json_patchjson/schema.py +src/petstore_api/paths/fake_json_patch/patch/responses/__init__.py +src/petstore_api/paths/fake_json_patch/patch/responses/response_200/__init__.py +src/petstore_api/paths/fake_json_with_charset/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/operation.py +src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/request_body/content/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/request_body/content/application_json_charsetutf8/schema.py +src/petstore_api/paths/fake_json_with_charset/post/responses/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/__init__.py +src/petstore_api/paths/fake_json_with_charset/post/responses/response_200/content/application_json_charsetutf8/schema.py +src/petstore_api/paths/fake_multiple_request_body_content_types/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/operation.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_multiple_request_body_content_types/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_multiple_response_bodies/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/__init__.py +src/petstore_api/paths/fake_multiple_response_bodies/get/responses/response_202/content/application_json/schema.py +src/petstore_api/paths/fake_multiple_securities/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/operation.py +src/petstore_api/paths/fake_multiple_securities/get/responses/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_multiple_securities/get/security/__init__.py +src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_0.py +src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_1.py +src/petstore_api/paths/fake_multiple_securities/get/security/security_requirement_object_2.py +src/petstore_api/paths/fake_obj_in_query/__init__.py +src/petstore_api/paths/fake_obj_in_query/get/__init__.py +src/petstore_api/paths/fake_obj_in_query/get/operation.py +src/petstore_api/paths/fake_obj_in_query/get/parameters/__init__.py +src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_obj_in_query/get/query_parameters.py +src/petstore_api/paths/fake_obj_in_query/get/responses/__init__.py +src/petstore_api/paths/fake_obj_in_query/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_1/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_10/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_11/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_12/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_13/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_14/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_15/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_16/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_17/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_18/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_2/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_3/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_4/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_5/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_6/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_7/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_8/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/parameters/parameter_9/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_pem_content_type/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/operation.py +src/petstore_api/paths/fake_pem_content_type/get/request_body/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/request_body/content/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/request_body/content/application_x_pem_file/schema.py +src/petstore_api/paths/fake_pem_content_type/get/responses/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/__init__.py +src/petstore_api/paths/fake_pem_content_type/get/responses/response_200/content/application_x_pem_file/schema.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/path_parameters.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/security/__init__.py +src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/security/security_requirement_object_0.py +src/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/parameters/parameter_0/content/application_json/schema.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/query_parameters.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_query_param_with_json_content_type/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_redirection/__init__.py +src/petstore_api/paths/fake_redirection/get/__init__.py +src/petstore_api/paths/fake_redirection/get/operation.py +src/petstore_api/paths/fake_redirection/get/responses/__init__.py +src/petstore_api/paths/fake_redirection/get/responses/response_303/__init__.py +src/petstore_api/paths/fake_redirection/get/responses/response_3xx/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/get/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py +src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/get/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_ref_obj_in_query/get/query_parameters.py +src/petstore_api/paths/fake_ref_obj_in_query/get/responses/__init__.py +src/petstore_api/paths/fake_ref_obj_in_query/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py +src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_array_of_enums/post/responses/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_array_of_enums/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_arraymodel/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/operation.py +src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_arraymodel/post/responses/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_arraymodel/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_boolean/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/operation.py +src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_boolean/post/responses/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_boolean/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_enum/__init__.py +src/petstore_api/paths/fake_refs_enum/post/__init__.py +src/petstore_api/paths/fake_refs_enum/post/operation.py +src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_enum/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_enum/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_enum/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_enum/post/responses/__init__.py +src/petstore_api/paths/fake_refs_enum/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_enum/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_mammal/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/operation.py +src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_mammal/post/responses/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_mammal/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_number/__init__.py +src/petstore_api/paths/fake_refs_number/post/__init__.py +src/petstore_api/paths/fake_refs_number/post/operation.py +src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_number/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_number/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_number/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_number/post/responses/__init__.py +src/petstore_api/paths/fake_refs_number/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_number/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_refs_string/__init__.py +src/petstore_api/paths/fake_refs_string/post/__init__.py +src/petstore_api/paths/fake_refs_string/post/operation.py +src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py +src/petstore_api/paths/fake_refs_string/post/request_body/content/__init__.py +src/petstore_api/paths/fake_refs_string/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_string/post/request_body/content/application_json/schema.py +src/petstore_api/paths/fake_refs_string/post/responses/__init__.py +src/petstore_api/paths/fake_refs_string/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_refs_string/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_response_without_schema/__init__.py +src/petstore_api/paths/fake_response_without_schema/get/__init__.py +src/petstore_api/paths/fake_response_without_schema/get/operation.py +src/petstore_api/paths/fake_response_without_schema/get/responses/__init__.py +src/petstore_api/paths/fake_response_without_schema/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_test_query_paramters/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/operation.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_5/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_5/schema.py +src/petstore_api/paths/fake_test_query_paramters/put/query_parameters.py +src/petstore_api/paths/fake_test_query_paramters/put/responses/__init__.py +src/petstore_api/paths/fake_test_query_paramters/put/responses/response_200/__init__.py +src/petstore_api/paths/fake_upload_download_file/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/operation.py +src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/request_body/content/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/request_body/content/application_octet_stream/schema.py +src/petstore_api/paths/fake_upload_download_file/post/responses/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/__init__.py +src/petstore_api/paths/fake_upload_download_file/post/responses/response_200/content/application_octet_stream/schema.py +src/petstore_api/paths/fake_upload_file/__init__.py +src/petstore_api/paths/fake_upload_file/post/__init__.py +src/petstore_api/paths/fake_upload_file/post/operation.py +src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py +src/petstore_api/paths/fake_upload_file/post/request_body/content/__init__.py +src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_upload_file/post/responses/__init__.py +src/petstore_api/paths/fake_upload_file/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_upload_file/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_upload_files/__init__.py +src/petstore_api/paths/fake_upload_files/post/__init__.py +src/petstore_api/paths/fake_upload_files/post/operation.py +src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py +src/petstore_api/paths/fake_upload_files/post/request_body/content/__init__.py +src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/fake_upload_files/post/responses/__init__.py +src/petstore_api/paths/fake_upload_files/post/responses/response_200/__init__.py +src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_upload_files/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/operation.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_1xx/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_2xx/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_3xx/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_4xx/content/application_json/schema.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/__init__.py +src/petstore_api/paths/fake_wild_card_responses/get/responses/response_5xx/content/application_json/schema.py +src/petstore_api/paths/foo/__init__.py +src/petstore_api/paths/foo/get/__init__.py +src/petstore_api/paths/foo/get/operation.py +src/petstore_api/paths/foo/get/responses/__init__.py +src/petstore_api/paths/foo/get/responses/response_default/__init__.py +src/petstore_api/paths/foo/get/responses/response_default/content/__init__.py +src/petstore_api/paths/foo/get/responses/response_default/content/application_json/__init__.py +src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +src/petstore_api/paths/foo/get/servers/__init__.py +src/petstore_api/paths/foo/get/servers/server_0.py +src/petstore_api/paths/foo/get/servers/server_1.py +src/petstore_api/paths/pet/__init__.py +src/petstore_api/paths/pet/post/__init__.py +src/petstore_api/paths/pet/post/operation.py +src/petstore_api/paths/pet/post/request_body/__init__.py +src/petstore_api/paths/pet/post/responses/__init__.py +src/petstore_api/paths/pet/post/responses/response_200/__init__.py +src/petstore_api/paths/pet/post/responses/response_405/__init__.py +src/petstore_api/paths/pet/post/security/__init__.py +src/petstore_api/paths/pet/post/security/security_requirement_object_0.py +src/petstore_api/paths/pet/post/security/security_requirement_object_1.py +src/petstore_api/paths/pet/post/security/security_requirement_object_2.py +src/petstore_api/paths/pet/put/__init__.py +src/petstore_api/paths/pet/put/operation.py +src/petstore_api/paths/pet/put/request_body/__init__.py +src/petstore_api/paths/pet/put/responses/__init__.py +src/petstore_api/paths/pet/put/responses/response_400/__init__.py +src/petstore_api/paths/pet/put/responses/response_404/__init__.py +src/petstore_api/paths/pet/put/responses/response_405/__init__.py +src/petstore_api/paths/pet/put/security/__init__.py +src/petstore_api/paths/pet/put/security/security_requirement_object_0.py +src/petstore_api/paths/pet/put/security/security_requirement_object_1.py +src/petstore_api/paths/pet_find_by_status/__init__.py +src/petstore_api/paths/pet_find_by_status/get/__init__.py +src/petstore_api/paths/pet_find_by_status/get/operation.py +src/petstore_api/paths/pet_find_by_status/get/parameters/__init__.py +src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_find_by_status/get/query_parameters.py +src/petstore_api/paths/pet_find_by_status/get/responses/__init__.py +src/petstore_api/paths/pet_find_by_status/get/responses/response_200/__init__.py +src/petstore_api/paths/pet_find_by_status/get/responses/response_400/__init__.py +src/petstore_api/paths/pet_find_by_status/get/security/__init__.py +src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_0.py +src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_1.py +src/petstore_api/paths/pet_find_by_status/get/security/security_requirement_object_2.py +src/petstore_api/paths/pet_find_by_status/servers/__init__.py +src/petstore_api/paths/pet_find_by_status/servers/server_0.py +src/petstore_api/paths/pet_find_by_status/servers/server_1.py +src/petstore_api/paths/pet_find_by_tags/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/operation.py +src/petstore_api/paths/pet_find_by_tags/get/parameters/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_find_by_tags/get/query_parameters.py +src/petstore_api/paths/pet_find_by_tags/get/responses/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/responses/response_200/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/responses/response_400/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/security/__init__.py +src/petstore_api/paths/pet_find_by_tags/get/security/security_requirement_object_0.py +src/petstore_api/paths/pet_find_by_tags/get/security/security_requirement_object_1.py +src/petstore_api/paths/pet_pet_id/__init__.py +src/petstore_api/paths/pet_pet_id/delete/__init__.py +src/petstore_api/paths/pet_pet_id/delete/header_parameters.py +src/petstore_api/paths/pet_pet_id/delete/operation.py +src/petstore_api/paths/pet_pet_id/delete/parameters/__init__.py +src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/__init__.py +src/petstore_api/paths/pet_pet_id/delete/parameters/parameter_1/schema.py +src/petstore_api/paths/pet_pet_id/delete/path_parameters.py +src/petstore_api/paths/pet_pet_id/delete/responses/__init__.py +src/petstore_api/paths/pet_pet_id/delete/responses/response_400/__init__.py +src/petstore_api/paths/pet_pet_id/delete/security/__init__.py +src/petstore_api/paths/pet_pet_id/delete/security/security_requirement_object_0.py +src/petstore_api/paths/pet_pet_id/delete/security/security_requirement_object_1.py +src/petstore_api/paths/pet_pet_id/get/__init__.py +src/petstore_api/paths/pet_pet_id/get/operation.py +src/petstore_api/paths/pet_pet_id/get/parameters/__init__.py +src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_pet_id/get/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_pet_id/get/path_parameters.py +src/petstore_api/paths/pet_pet_id/get/responses/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_xml/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_200/content/application_xml/schema.py +src/petstore_api/paths/pet_pet_id/get/responses/response_400/__init__.py +src/petstore_api/paths/pet_pet_id/get/responses/response_404/__init__.py +src/petstore_api/paths/pet_pet_id/get/security/__init__.py +src/petstore_api/paths/pet_pet_id/get/security/security_requirement_object_0.py +src/petstore_api/paths/pet_pet_id/post/__init__.py +src/petstore_api/paths/pet_pet_id/post/operation.py +src/petstore_api/paths/pet_pet_id/post/parameters/__init__.py +src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_pet_id/post/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_pet_id/post/path_parameters.py +src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py +src/petstore_api/paths/pet_pet_id/post/request_body/content/__init__.py +src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/__init__.py +src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +src/petstore_api/paths/pet_pet_id/post/responses/__init__.py +src/petstore_api/paths/pet_pet_id/post/responses/response_405/__init__.py +src/petstore_api/paths/pet_pet_id/post/security/__init__.py +src/petstore_api/paths/pet_pet_id/post/security/security_requirement_object_0.py +src/petstore_api/paths/pet_pet_id/post/security/security_requirement_object_1.py +src/petstore_api/paths/pet_pet_id_upload_image/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py +src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/parameters/parameter_0/schema.py +src/petstore_api/paths/pet_pet_id_upload_image/post/path_parameters.py +src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +src/petstore_api/paths/pet_pet_id_upload_image/post/responses/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/responses/response_200/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/security/__init__.py +src/petstore_api/paths/pet_pet_id_upload_image/post/security/security_requirement_object_0.py +src/petstore_api/paths/solidus/__init__.py +src/petstore_api/paths/solidus/get/__init__.py +src/petstore_api/paths/solidus/get/operation.py +src/petstore_api/paths/solidus/get/responses/__init__.py +src/petstore_api/paths/solidus/get/responses/response_200/__init__.py +src/petstore_api/paths/store_inventory/__init__.py +src/petstore_api/paths/store_inventory/get/__init__.py +src/petstore_api/paths/store_inventory/get/operation.py +src/petstore_api/paths/store_inventory/get/responses/__init__.py +src/petstore_api/paths/store_inventory/get/responses/response_200/__init__.py +src/petstore_api/paths/store_inventory/get/security/__init__.py +src/petstore_api/paths/store_inventory/get/security/security_requirement_object_0.py +src/petstore_api/paths/store_order/__init__.py +src/petstore_api/paths/store_order/post/__init__.py +src/petstore_api/paths/store_order/post/operation.py +src/petstore_api/paths/store_order/post/request_body/__init__.py +src/petstore_api/paths/store_order/post/request_body/content/__init__.py +src/petstore_api/paths/store_order/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/store_order/post/request_body/content/application_json/schema.py +src/petstore_api/paths/store_order/post/responses/__init__.py +src/petstore_api/paths/store_order/post/responses/response_200/__init__.py +src/petstore_api/paths/store_order/post/responses/response_200/content/__init__.py +src/petstore_api/paths/store_order/post/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/store_order/post/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/store_order/post/responses/response_200/content/application_xml/__init__.py +src/petstore_api/paths/store_order/post/responses/response_200/content/application_xml/schema.py +src/petstore_api/paths/store_order/post/responses/response_400/__init__.py +src/petstore_api/paths/store_order_order_id/__init__.py +src/petstore_api/paths/store_order_order_id/delete/__init__.py +src/petstore_api/paths/store_order_order_id/delete/operation.py +src/petstore_api/paths/store_order_order_id/delete/parameters/__init__.py +src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/store_order_order_id/delete/parameters/parameter_0/schema.py +src/petstore_api/paths/store_order_order_id/delete/path_parameters.py +src/petstore_api/paths/store_order_order_id/delete/responses/__init__.py +src/petstore_api/paths/store_order_order_id/delete/responses/response_400/__init__.py +src/petstore_api/paths/store_order_order_id/delete/responses/response_404/__init__.py +src/petstore_api/paths/store_order_order_id/get/__init__.py +src/petstore_api/paths/store_order_order_id/get/operation.py +src/petstore_api/paths/store_order_order_id/get/parameters/__init__.py +src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/store_order_order_id/get/parameters/parameter_0/schema.py +src/petstore_api/paths/store_order_order_id/get/path_parameters.py +src/petstore_api/paths/store_order_order_id/get/responses/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_xml/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_200/content/application_xml/schema.py +src/petstore_api/paths/store_order_order_id/get/responses/response_400/__init__.py +src/petstore_api/paths/store_order_order_id/get/responses/response_404/__init__.py +src/petstore_api/paths/user/__init__.py +src/petstore_api/paths/user/post/__init__.py +src/petstore_api/paths/user/post/operation.py +src/petstore_api/paths/user/post/request_body/__init__.py +src/petstore_api/paths/user/post/request_body/content/__init__.py +src/petstore_api/paths/user/post/request_body/content/application_json/__init__.py +src/petstore_api/paths/user/post/request_body/content/application_json/schema.py +src/petstore_api/paths/user/post/responses/__init__.py +src/petstore_api/paths/user/post/responses/response_default/__init__.py +src/petstore_api/paths/user_create_with_array/__init__.py +src/petstore_api/paths/user_create_with_array/post/__init__.py +src/petstore_api/paths/user_create_with_array/post/operation.py +src/petstore_api/paths/user_create_with_array/post/request_body/__init__.py +src/petstore_api/paths/user_create_with_array/post/responses/__init__.py +src/petstore_api/paths/user_create_with_array/post/responses/response_default/__init__.py +src/petstore_api/paths/user_create_with_list/__init__.py +src/petstore_api/paths/user_create_with_list/post/__init__.py +src/petstore_api/paths/user_create_with_list/post/operation.py +src/petstore_api/paths/user_create_with_list/post/request_body/__init__.py +src/petstore_api/paths/user_create_with_list/post/responses/__init__.py +src/petstore_api/paths/user_create_with_list/post/responses/response_default/__init__.py +src/petstore_api/paths/user_login/__init__.py +src/petstore_api/paths/user_login/get/__init__.py +src/petstore_api/paths/user_login/get/operation.py +src/petstore_api/paths/user_login/get/parameters/__init__.py +src/petstore_api/paths/user_login/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/user_login/get/parameters/parameter_0/schema.py +src/petstore_api/paths/user_login/get/parameters/parameter_1/__init__.py +src/petstore_api/paths/user_login/get/parameters/parameter_1/schema.py +src/petstore_api/paths/user_login/get/query_parameters.py +src/petstore_api/paths/user_login/get/responses/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/content/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/content/application_xml/schema.py +src/petstore_api/paths/user_login/get/responses/response_200/header_parameters.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_int32/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_number_header/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_ref_content_schema_header/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_expires_after/schema.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/__init__.py +src/petstore_api/paths/user_login/get/responses/response_200/headers/header_x_rate_limit/content/application_json/schema.py +src/petstore_api/paths/user_login/get/responses/response_400/__init__.py +src/petstore_api/paths/user_logout/__init__.py +src/petstore_api/paths/user_logout/get/__init__.py +src/petstore_api/paths/user_logout/get/operation.py +src/petstore_api/paths/user_logout/get/responses/__init__.py +src/petstore_api/paths/user_logout/get/responses/response_default/__init__.py +src/petstore_api/paths/user_username/__init__.py +src/petstore_api/paths/user_username/delete/__init__.py +src/petstore_api/paths/user_username/delete/operation.py +src/petstore_api/paths/user_username/delete/parameters/__init__.py +src/petstore_api/paths/user_username/delete/parameters/parameter_0/__init__.py +src/petstore_api/paths/user_username/delete/path_parameters.py +src/petstore_api/paths/user_username/delete/responses/__init__.py +src/petstore_api/paths/user_username/delete/responses/response_200/__init__.py +src/petstore_api/paths/user_username/delete/responses/response_404/__init__.py +src/petstore_api/paths/user_username/get/__init__.py +src/petstore_api/paths/user_username/get/operation.py +src/petstore_api/paths/user_username/get/parameters/__init__.py +src/petstore_api/paths/user_username/get/parameters/parameter_0/__init__.py +src/petstore_api/paths/user_username/get/path_parameters.py +src/petstore_api/paths/user_username/get/responses/__init__.py +src/petstore_api/paths/user_username/get/responses/response_200/__init__.py +src/petstore_api/paths/user_username/get/responses/response_200/content/__init__.py +src/petstore_api/paths/user_username/get/responses/response_200/content/application_json/__init__.py +src/petstore_api/paths/user_username/get/responses/response_200/content/application_json/schema.py +src/petstore_api/paths/user_username/get/responses/response_200/content/application_xml/__init__.py +src/petstore_api/paths/user_username/get/responses/response_200/content/application_xml/schema.py +src/petstore_api/paths/user_username/get/responses/response_400/__init__.py +src/petstore_api/paths/user_username/get/responses/response_404/__init__.py +src/petstore_api/paths/user_username/put/__init__.py +src/petstore_api/paths/user_username/put/operation.py +src/petstore_api/paths/user_username/put/parameters/__init__.py +src/petstore_api/paths/user_username/put/parameters/parameter_0/__init__.py +src/petstore_api/paths/user_username/put/path_parameters.py +src/petstore_api/paths/user_username/put/request_body/__init__.py +src/petstore_api/paths/user_username/put/request_body/content/__init__.py +src/petstore_api/paths/user_username/put/request_body/content/application_json/__init__.py +src/petstore_api/paths/user_username/put/request_body/content/application_json/schema.py +src/petstore_api/paths/user_username/put/responses/__init__.py +src/petstore_api/paths/user_username/put/responses/response_400/__init__.py +src/petstore_api/paths/user_username/put/responses/response_404/__init__.py +src/petstore_api/py.typed +src/petstore_api/rest.py +src/petstore_api/schemas/__init__.py +src/petstore_api/schemas/format.py +src/petstore_api/schemas/original_immutabledict.py +src/petstore_api/schemas/schema.py +src/petstore_api/schemas/schemas.py +src/petstore_api/schemas/validation.py +src/petstore_api/security_schemes.py +src/petstore_api/server.py +src/petstore_api/servers/__init__.py +src/petstore_api/servers/server_0.py +src/petstore_api/servers/server_1.py +src/petstore_api/servers/server_2.py +src/petstore_api/shared_imports/__init__.py +src/petstore_api/shared_imports/header_imports.py +src/petstore_api/shared_imports/operation_imports.py +src/petstore_api/shared_imports/response_imports.py +src/petstore_api/shared_imports/schema_imports.py +src/petstore_api/shared_imports/security_scheme_imports.py +src/petstore_api/shared_imports/server_imports.py +src/petstore_api/signing.py test-requirements.txt test/__init__.py test/components/__init__.py diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index a552cdcf34a..f0ab2d8b3f0 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -1,4 +1,4 @@ -# openapi-client +# petstore-api This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. This Python package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: diff --git a/samples/client/petstore/python/docs/apis/tags/another_fake_api.md b/samples/client/petstore/python/docs/apis/tags/another_fake_api.md index ba82bfe60ba..d08e53b4b38 100644 --- a/samples/client/petstore/python/docs/apis/tags/another_fake_api.md +++ b/samples/client/petstore/python/docs/apis/tags/another_fake_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.another_fake_api +petstore_api.apis.tags.another_fake_api # AnotherFakeApi All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/default_api.md b/samples/client/petstore/python/docs/apis/tags/default_api.md index c1cf374829e..f5cff3da626 100644 --- a/samples/client/petstore/python/docs/apis/tags/default_api.md +++ b/samples/client/petstore/python/docs/apis/tags/default_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.default_api +petstore_api.apis.tags.default_api # DefaultApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/fake_api.md b/samples/client/petstore/python/docs/apis/tags/fake_api.md index 28b58cb8339..b9192a237a8 100644 --- a/samples/client/petstore/python/docs/apis/tags/fake_api.md +++ b/samples/client/petstore/python/docs/apis/tags/fake_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.fake_api +petstore_api.apis.tags.fake_api # FakeApi All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md b/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md index fb9ec1d1e85..03a78ae2221 100644 --- a/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md +++ b/samples/client/petstore/python/docs/apis/tags/fake_classname_tags123_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.fake_classname_tags123_api +petstore_api.apis.tags.fake_classname_tags123_api # FakeClassnameTags123Api All URIs are relative to the selected server diff --git a/samples/client/petstore/python/docs/apis/tags/pet_api.md b/samples/client/petstore/python/docs/apis/tags/pet_api.md index 5c74df89bda..712c3394921 100644 --- a/samples/client/petstore/python/docs/apis/tags/pet_api.md +++ b/samples/client/petstore/python/docs/apis/tags/pet_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.pet_api +petstore_api.apis.tags.pet_api # PetApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/store_api.md b/samples/client/petstore/python/docs/apis/tags/store_api.md index a674b7467fc..2b031a628e1 100644 --- a/samples/client/petstore/python/docs/apis/tags/store_api.md +++ b/samples/client/petstore/python/docs/apis/tags/store_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.store_api +petstore_api.apis.tags.store_api # StoreApi ## Description diff --git a/samples/client/petstore/python/docs/apis/tags/user_api.md b/samples/client/petstore/python/docs/apis/tags/user_api.md index 4a249ab8645..55b7c628c58 100644 --- a/samples/client/petstore/python/docs/apis/tags/user_api.md +++ b/samples/client/petstore/python/docs/apis/tags/user_api.md @@ -1,5 +1,5 @@ -openapi_client.apis.tags.user_api +petstore_api.apis.tags.user_api # UserApi ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md b/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md index cb20a98128b..1b978ad4f3c 100644 --- a/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_int32_json_content_type_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_int32_json_content_type_header +petstore_api.components.headers.header_int32_json_content_type_header # Header Int32JsonContentTypeHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_number_header.md b/samples/client/petstore/python/docs/components/headers/header_number_header.md index 66aecf6fb59..aa02f7f336f 100644 --- a/samples/client/petstore/python/docs/components/headers/header_number_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_number_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_number_header +petstore_api.components.headers.header_number_header # Header NumberHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md index 26b0817a684..bf3d0f37392 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_content_schema_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_ref_content_schema_header +petstore_api.components.headers.header_ref_content_schema_header # Header RefContentSchemaHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md index bcf3281d8d7..6f48d244ecd 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_schema_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_ref_schema_header +petstore_api.components.headers.header_ref_schema_header # Header RefSchemaHeader ## Description diff --git a/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md b/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md index 30857d068a6..3fb984d2c04 100644 --- a/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_ref_string_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_ref_string_header +petstore_api.components.headers.header_ref_string_header # Header RefStringHeader ## Schema Ref Class | Input Type | Accessed Type | Description diff --git a/samples/client/petstore/python/docs/components/headers/header_string_header.md b/samples/client/petstore/python/docs/components/headers/header_string_header.md index b05f54f6197..5f1a49b5f0d 100644 --- a/samples/client/petstore/python/docs/components/headers/header_string_header.md +++ b/samples/client/petstore/python/docs/components/headers/header_string_header.md @@ -1,4 +1,4 @@ -openapi_client.components.headers.header_string_header +petstore_api.components.headers.header_string_header # Header StringHeader ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md b/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md index 93a207567ba..b0bb13f0d3f 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_component_ref_schema_string_with_validation.md @@ -1,4 +1,4 @@ -openapi_client.components.parameters.parameter_component_ref_schema_string_with_validation +petstore_api.components.parameters.parameter_component_ref_schema_string_with_validation # Parameter ComponentRefSchemaStringWithValidation ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md b/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md index 35d2f275b2e..c3360983d53 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_path_user_name.md @@ -1,4 +1,4 @@ -openapi_client.components.parameters.parameter_path_user_name +petstore_api.components.parameters.parameter_path_user_name # Parameter PathUserName ## Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md b/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md index 724fa9ebfc2..a4521372033 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_ref_path_user_name.md @@ -1,4 +1,4 @@ -openapi_client.components.parameters.parameter_ref_path_user_name +petstore_api.components.parameters.parameter_ref_path_user_name # Parameter RefPathUserName ## Schema Ref Class | Input Type | Accessed Type | Description diff --git a/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md b/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md index 911249af97d..aa23b11207b 100644 --- a/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md +++ b/samples/client/petstore/python/docs/components/parameters/parameter_ref_schema_string_with_validation.md @@ -1,4 +1,4 @@ -openapi_client.components.parameters.parameter_ref_schema_string_with_validation +petstore_api.components.parameters.parameter_ref_schema_string_with_validation # Parameter RefSchemaStringWithValidation ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md index 8bcc36ea7ae..8b00d2187d8 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_client.md @@ -1,4 +1,4 @@ -openapi_client.components.request_bodies.request_body_client +petstore_api.components.request_bodies.request_body_client # RequestBody Client ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md index 9f2cb22fa8f..058f8e8d59c 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_pet.md @@ -1,4 +1,4 @@ -openapi_client.components.request_bodies.request_body_pet +petstore_api.components.request_bodies.request_body_pet # RequestBody Pet ## Description diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md index b10ba2fc3e6..5af92bc4e39 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_ref_user_array.md @@ -1,4 +1,4 @@ -openapi_client.components.request_bodies.request_body_ref_user_array +petstore_api.components.request_bodies.request_body_ref_user_array # RequestBody RefUserArray ## Content Type To Schema diff --git a/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md b/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md index 03139078d3a..ba1a3a1564f 100644 --- a/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md +++ b/samples/client/petstore/python/docs/components/request_bodies/request_body_user_array.md @@ -1,4 +1,4 @@ -openapi_client.components.request_bodies.request_body_user_array +petstore_api.components.request_bodies.request_body_user_array # RequestBody UserArray ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md b/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md index 383b3ac8ddd..b76ad6085a5 100644 --- a/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md +++ b/samples/client/petstore/python/docs/components/responses/response_headers_with_no_body.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_headers_with_no_body +petstore_api.components.responses.response_headers_with_no_body # Response HeadersWithNoBody ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md b/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md index 4affabc1fea..4038c216465 100644 --- a/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md +++ b/samples/client/petstore/python/docs/components/responses/response_ref_success_description_only.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_ref_success_description_only +petstore_api.components.responses.response_ref_success_description_only # Response RefSuccessDescriptionOnly ## Ref Response Info diff --git a/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md b/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md index 048be1f0b0f..8ff2326d27c 100644 --- a/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md +++ b/samples/client/petstore/python/docs/components/responses/response_ref_successful_xml_and_json_array_of_pet.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_ref_successful_xml_and_json_array_of_pet +petstore_api.components.responses.response_ref_successful_xml_and_json_array_of_pet # Response RefSuccessfulXmlAndJsonArrayOfPet ## Ref Response Info diff --git a/samples/client/petstore/python/docs/components/responses/response_success_description_only.md b/samples/client/petstore/python/docs/components/responses/response_success_description_only.md index a819f2b1a0f..5e6c16e4426 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_description_only.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_description_only.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_success_description_only +petstore_api.components.responses.response_success_description_only # Response SuccessDescriptionOnly ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md b/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md index 7d299e088af..562bbfec4dd 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_inline_content_and_header.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_success_inline_content_and_header +petstore_api.components.responses.response_success_inline_content_and_header # Response SuccessInlineContentAndHeader ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md b/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md index 065029a37f9..bb4299094c0 100644 --- a/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md +++ b/samples/client/petstore/python/docs/components/responses/response_success_with_json_api_response.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_success_with_json_api_response +petstore_api.components.responses.response_success_with_json_api_response # Response SuccessWithJsonApiResponse ## Description diff --git a/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md b/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md index d86d89279ad..329c510e5aa 100644 --- a/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md +++ b/samples/client/petstore/python/docs/components/responses/response_successful_xml_and_json_array_of_pet.md @@ -1,4 +1,4 @@ -openapi_client.components.responses.response_successful_xml_and_json_array_of_pet +petstore_api.components.responses.response_successful_xml_and_json_array_of_pet # Response SuccessfulXmlAndJsonArrayOfPet ## Description diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_class.md b/samples/client/petstore/python/docs/components/schema/additional_properties_class.md index fdcb59c0583..5b2203429e2 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_class.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_class.md @@ -1,5 +1,5 @@ # AdditionalPropertiesClass -openapi_client.components.schema.additional_properties_class +petstore_api.components.schema.additional_properties_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md b/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md index 4d792070ea4..6f2e5f0e400 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_schema.md @@ -1,5 +1,5 @@ # AdditionalPropertiesSchema -openapi_client.components.schema.additional_properties_schema +petstore_api.components.schema.additional_properties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md b/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md index 2f4f11b2430..68f0717112d 100644 --- a/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md +++ b/samples/client/petstore/python/docs/components/schema/additional_properties_with_array_of_enums.md @@ -1,5 +1,5 @@ # AdditionalPropertiesWithArrayOfEnums -openapi_client.components.schema.additional_properties_with_array_of_enums +petstore_api.components.schema.additional_properties_with_array_of_enums ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/address.md b/samples/client/petstore/python/docs/components/schema/address.md index bbacdc586e9..bb7eac2953b 100644 --- a/samples/client/petstore/python/docs/components/schema/address.md +++ b/samples/client/petstore/python/docs/components/schema/address.md @@ -1,5 +1,5 @@ # Address -openapi_client.components.schema.address +petstore_api.components.schema.address ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/animal.md b/samples/client/petstore/python/docs/components/schema/animal.md index 356727213e4..43532fdd761 100644 --- a/samples/client/petstore/python/docs/components/schema/animal.md +++ b/samples/client/petstore/python/docs/components/schema/animal.md @@ -1,5 +1,5 @@ # Animal -openapi_client.components.schema.animal +petstore_api.components.schema.animal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/animal_farm.md b/samples/client/petstore/python/docs/components/schema/animal_farm.md index 4591149bd68..6adbff13d86 100644 --- a/samples/client/petstore/python/docs/components/schema/animal_farm.md +++ b/samples/client/petstore/python/docs/components/schema/animal_farm.md @@ -1,5 +1,5 @@ # AnimalFarm -openapi_client.components.schema.animal_farm +petstore_api.components.schema.animal_farm ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md index c7d01a55178..63232aafe36 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md @@ -1,5 +1,5 @@ # AnyTypeAndFormat -openapi_client.components.schema.any_type_and_format +petstore_api.components.schema.any_type_and_format ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md index 1c3f0ae3c5d..48b33c08565 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md @@ -1,5 +1,5 @@ # AnyTypeNotString -openapi_client.components.schema.any_type_not_string +petstore_api.components.schema.any_type_not_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/api_response.md b/samples/client/petstore/python/docs/components/schema/api_response.md index 26a7cfde6ab..cb42e6a8666 100644 --- a/samples/client/petstore/python/docs/components/schema/api_response.md +++ b/samples/client/petstore/python/docs/components/schema/api_response.md @@ -1,5 +1,5 @@ # ApiResponse -openapi_client.components.schema.api_response +petstore_api.components.schema.api_response ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/apple.md b/samples/client/petstore/python/docs/components/schema/apple.md index d3b158466b6..a0a7d573d07 100644 --- a/samples/client/petstore/python/docs/components/schema/apple.md +++ b/samples/client/petstore/python/docs/components/schema/apple.md @@ -1,5 +1,5 @@ # Apple -openapi_client.components.schema.apple +petstore_api.components.schema.apple ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/apple_req.md b/samples/client/petstore/python/docs/components/schema/apple_req.md index 83fc059ae5e..74d5cb5210b 100644 --- a/samples/client/petstore/python/docs/components/schema/apple_req.md +++ b/samples/client/petstore/python/docs/components/schema/apple_req.md @@ -1,5 +1,5 @@ # AppleReq -openapi_client.components.schema.apple_req +petstore_api.components.schema.apple_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md b/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md index 45e41624c7a..0fe55e78dc0 100644 --- a/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md +++ b/samples/client/petstore/python/docs/components/schema/array_holding_any_type.md @@ -1,5 +1,5 @@ # ArrayHoldingAnyType -openapi_client.components.schema.array_holding_any_type +petstore_api.components.schema.array_holding_any_type ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md b/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md index 15b666b2d37..8b5762700bf 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_array_of_number_only.md @@ -1,5 +1,5 @@ # ArrayOfArrayOfNumberOnly -openapi_client.components.schema.array_of_array_of_number_only +petstore_api.components.schema.array_of_array_of_number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_enums.md b/samples/client/petstore/python/docs/components/schema/array_of_enums.md index f058f29b304..7835598c777 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_enums.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_enums.md @@ -1,5 +1,5 @@ # ArrayOfEnums -openapi_client.components.schema.array_of_enums +petstore_api.components.schema.array_of_enums ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_of_number_only.md b/samples/client/petstore/python/docs/components/schema/array_of_number_only.md index 00bf02a05c3..a846a691434 100644 --- a/samples/client/petstore/python/docs/components/schema/array_of_number_only.md +++ b/samples/client/petstore/python/docs/components/schema/array_of_number_only.md @@ -1,5 +1,5 @@ # ArrayOfNumberOnly -openapi_client.components.schema.array_of_number_only +petstore_api.components.schema.array_of_number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_test.md b/samples/client/petstore/python/docs/components/schema/array_test.md index 9ce8630795f..a05d2382114 100644 --- a/samples/client/petstore/python/docs/components/schema/array_test.md +++ b/samples/client/petstore/python/docs/components/schema/array_test.md @@ -1,5 +1,5 @@ # ArrayTest -openapi_client.components.schema.array_test +petstore_api.components.schema.array_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md b/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md index 32ad4f6e27e..5bd844991ff 100644 --- a/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md +++ b/samples/client/petstore/python/docs/components/schema/array_with_validations_in_items.md @@ -1,5 +1,5 @@ # ArrayWithValidationsInItems -openapi_client.components.schema.array_with_validations_in_items +petstore_api.components.schema.array_with_validations_in_items ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/banana.md b/samples/client/petstore/python/docs/components/schema/banana.md index 946cf92cd2f..edfe3cf79e3 100644 --- a/samples/client/petstore/python/docs/components/schema/banana.md +++ b/samples/client/petstore/python/docs/components/schema/banana.md @@ -1,5 +1,5 @@ # Banana -openapi_client.components.schema.banana +petstore_api.components.schema.banana ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/banana_req.md b/samples/client/petstore/python/docs/components/schema/banana_req.md index e1238548eec..d49311e1232 100644 --- a/samples/client/petstore/python/docs/components/schema/banana_req.md +++ b/samples/client/petstore/python/docs/components/schema/banana_req.md @@ -1,5 +1,5 @@ # BananaReq -openapi_client.components.schema.banana_req +petstore_api.components.schema.banana_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/bar.md b/samples/client/petstore/python/docs/components/schema/bar.md index 428b0eb7a0a..eec9891b091 100644 --- a/samples/client/petstore/python/docs/components/schema/bar.md +++ b/samples/client/petstore/python/docs/components/schema/bar.md @@ -1,5 +1,5 @@ # Bar -openapi_client.components.schema.bar +petstore_api.components.schema.bar ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/basque_pig.md b/samples/client/petstore/python/docs/components/schema/basque_pig.md index 2d95dca52e6..688d13222c2 100644 --- a/samples/client/petstore/python/docs/components/schema/basque_pig.md +++ b/samples/client/petstore/python/docs/components/schema/basque_pig.md @@ -1,5 +1,5 @@ # BasquePig -openapi_client.components.schema.basque_pig +petstore_api.components.schema.basque_pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/boolean.md b/samples/client/petstore/python/docs/components/schema/boolean.md index c7cee78cf81..32ce64556a5 100644 --- a/samples/client/petstore/python/docs/components/schema/boolean.md +++ b/samples/client/petstore/python/docs/components/schema/boolean.md @@ -1,5 +1,5 @@ # Boolean -openapi_client.components.schema.boolean +petstore_api.components.schema.boolean ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/boolean_enum.md b/samples/client/petstore/python/docs/components/schema/boolean_enum.md index 21092c8996a..9f3c5a6e43c 100644 --- a/samples/client/petstore/python/docs/components/schema/boolean_enum.md +++ b/samples/client/petstore/python/docs/components/schema/boolean_enum.md @@ -1,5 +1,5 @@ # BooleanEnum -openapi_client.components.schema.boolean_enum +petstore_api.components.schema.boolean_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/capitalization.md b/samples/client/petstore/python/docs/components/schema/capitalization.md index f343ca4b4be..e920943cb6b 100644 --- a/samples/client/petstore/python/docs/components/schema/capitalization.md +++ b/samples/client/petstore/python/docs/components/schema/capitalization.md @@ -1,5 +1,5 @@ # Capitalization -openapi_client.components.schema.capitalization +petstore_api.components.schema.capitalization ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/cat.md b/samples/client/petstore/python/docs/components/schema/cat.md index 323467ceaca..fcd521f540a 100644 --- a/samples/client/petstore/python/docs/components/schema/cat.md +++ b/samples/client/petstore/python/docs/components/schema/cat.md @@ -1,5 +1,5 @@ # Cat -openapi_client.components.schema.cat +petstore_api.components.schema.cat ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/category.md b/samples/client/petstore/python/docs/components/schema/category.md index 0c2477e5bbc..187fac89191 100644 --- a/samples/client/petstore/python/docs/components/schema/category.md +++ b/samples/client/petstore/python/docs/components/schema/category.md @@ -1,5 +1,5 @@ # Category -openapi_client.components.schema.category +petstore_api.components.schema.category ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/child_cat.md b/samples/client/petstore/python/docs/components/schema/child_cat.md index 24df917481a..128b20b1073 100644 --- a/samples/client/petstore/python/docs/components/schema/child_cat.md +++ b/samples/client/petstore/python/docs/components/schema/child_cat.md @@ -1,5 +1,5 @@ # ChildCat -openapi_client.components.schema.child_cat +petstore_api.components.schema.child_cat ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/class_model.md b/samples/client/petstore/python/docs/components/schema/class_model.md index 01f24044952..61728d4145c 100644 --- a/samples/client/petstore/python/docs/components/schema/class_model.md +++ b/samples/client/petstore/python/docs/components/schema/class_model.md @@ -1,5 +1,5 @@ # ClassModel -openapi_client.components.schema.class_model +petstore_api.components.schema.class_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/client.md b/samples/client/petstore/python/docs/components/schema/client.md index 3620f092577..449d3ff41df 100644 --- a/samples/client/petstore/python/docs/components/schema/client.md +++ b/samples/client/petstore/python/docs/components/schema/client.md @@ -1,5 +1,5 @@ # Client -openapi_client.components.schema.client +petstore_api.components.schema.client ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md b/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md index 3fbf911f82d..bde4710ec75 100644 --- a/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/complex_quadrilateral.md @@ -1,5 +1,5 @@ # ComplexQuadrilateral -openapi_client.components.schema.complex_quadrilateral +petstore_api.components.schema.complex_quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md b/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md index 21d1aca80af..e60eb71ee82 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md +++ b/samples/client/petstore/python/docs/components/schema/composed_any_of_different_types_no_validations.md @@ -1,5 +1,5 @@ # ComposedAnyOfDifferentTypesNoValidations -openapi_client.components.schema.composed_any_of_different_types_no_validations +petstore_api.components.schema.composed_any_of_different_types_no_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_array.md b/samples/client/petstore/python/docs/components/schema/composed_array.md index 0e5e7290b93..2c872864bbe 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_array.md +++ b/samples/client/petstore/python/docs/components/schema/composed_array.md @@ -1,5 +1,5 @@ # ComposedArray -openapi_client.components.schema.composed_array +petstore_api.components.schema.composed_array ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_bool.md b/samples/client/petstore/python/docs/components/schema/composed_bool.md index 1906b920024..f8d8bd0099e 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_bool.md +++ b/samples/client/petstore/python/docs/components/schema/composed_bool.md @@ -1,5 +1,5 @@ # ComposedBool -openapi_client.components.schema.composed_bool +petstore_api.components.schema.composed_bool ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_none.md b/samples/client/petstore/python/docs/components/schema/composed_none.md index 8a5855db568..55ad6cc9cd0 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_none.md +++ b/samples/client/petstore/python/docs/components/schema/composed_none.md @@ -1,5 +1,5 @@ # ComposedNone -openapi_client.components.schema.composed_none +petstore_api.components.schema.composed_none ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_number.md b/samples/client/petstore/python/docs/components/schema/composed_number.md index 2dd7e08e70f..b93e3bdc15d 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_number.md +++ b/samples/client/petstore/python/docs/components/schema/composed_number.md @@ -1,5 +1,5 @@ # ComposedNumber -openapi_client.components.schema.composed_number +petstore_api.components.schema.composed_number ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_object.md b/samples/client/petstore/python/docs/components/schema/composed_object.md index f0a2c64ba8d..aa5ed2a4c01 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_object.md +++ b/samples/client/petstore/python/docs/components/schema/composed_object.md @@ -1,5 +1,5 @@ # ComposedObject -openapi_client.components.schema.composed_object +petstore_api.components.schema.composed_object ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md b/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md index c0c2cbf30d0..4ac0f5ef2f9 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md +++ b/samples/client/petstore/python/docs/components/schema/composed_one_of_different_types.md @@ -1,5 +1,5 @@ # ComposedOneOfDifferentTypes -openapi_client.components.schema.composed_one_of_different_types +petstore_api.components.schema.composed_one_of_different_types ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/composed_string.md b/samples/client/petstore/python/docs/components/schema/composed_string.md index 0a66012b27f..e7569a46d78 100644 --- a/samples/client/petstore/python/docs/components/schema/composed_string.md +++ b/samples/client/petstore/python/docs/components/schema/composed_string.md @@ -1,5 +1,5 @@ # ComposedString -openapi_client.components.schema.composed_string +petstore_api.components.schema.composed_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/currency.md b/samples/client/petstore/python/docs/components/schema/currency.md index ad232ad4b9f..c4296b73ab3 100644 --- a/samples/client/petstore/python/docs/components/schema/currency.md +++ b/samples/client/petstore/python/docs/components/schema/currency.md @@ -1,5 +1,5 @@ # Currency -openapi_client.components.schema.currency +petstore_api.components.schema.currency ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/danish_pig.md b/samples/client/petstore/python/docs/components/schema/danish_pig.md index 50d091f65fa..b7befa395ad 100644 --- a/samples/client/petstore/python/docs/components/schema/danish_pig.md +++ b/samples/client/petstore/python/docs/components/schema/danish_pig.md @@ -1,5 +1,5 @@ # DanishPig -openapi_client.components.schema.danish_pig +petstore_api.components.schema.danish_pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_time_test.md b/samples/client/petstore/python/docs/components/schema/date_time_test.md index e00a47af72e..5c84dad86d2 100644 --- a/samples/client/petstore/python/docs/components/schema/date_time_test.md +++ b/samples/client/petstore/python/docs/components/schema/date_time_test.md @@ -1,5 +1,5 @@ # DateTimeTest -openapi_client.components.schema.date_time_test +petstore_api.components.schema.date_time_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md b/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md index b73e7d0a382..ba4f801aeb4 100644 --- a/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/date_time_with_validations.md @@ -1,5 +1,5 @@ # DateTimeWithValidations -openapi_client.components.schema.date_time_with_validations +petstore_api.components.schema.date_time_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/date_with_validations.md b/samples/client/petstore/python/docs/components/schema/date_with_validations.md index 74c476926c5..e79df95a8d6 100644 --- a/samples/client/petstore/python/docs/components/schema/date_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/date_with_validations.md @@ -1,5 +1,5 @@ # DateWithValidations -openapi_client.components.schema.date_with_validations +petstore_api.components.schema.date_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/decimal_payload.md b/samples/client/petstore/python/docs/components/schema/decimal_payload.md index c56e3a811cd..76a35c95f6a 100644 --- a/samples/client/petstore/python/docs/components/schema/decimal_payload.md +++ b/samples/client/petstore/python/docs/components/schema/decimal_payload.md @@ -1,5 +1,5 @@ # DecimalPayload -openapi_client.components.schema.decimal_payload +petstore_api.components.schema.decimal_payload ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/dog.md b/samples/client/petstore/python/docs/components/schema/dog.md index 948fca8d88e..c4dc448957b 100644 --- a/samples/client/petstore/python/docs/components/schema/dog.md +++ b/samples/client/petstore/python/docs/components/schema/dog.md @@ -1,5 +1,5 @@ # Dog -openapi_client.components.schema.dog +petstore_api.components.schema.dog ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/drawing.md b/samples/client/petstore/python/docs/components/schema/drawing.md index d9449a53829..0e2003d6f00 100644 --- a/samples/client/petstore/python/docs/components/schema/drawing.md +++ b/samples/client/petstore/python/docs/components/schema/drawing.md @@ -1,5 +1,5 @@ # Drawing -openapi_client.components.schema.drawing +petstore_api.components.schema.drawing ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_arrays.md b/samples/client/petstore/python/docs/components/schema/enum_arrays.md index 4e5cea87096..92856af6d52 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_arrays.md +++ b/samples/client/petstore/python/docs/components/schema/enum_arrays.md @@ -1,5 +1,5 @@ # EnumArrays -openapi_client.components.schema.enum_arrays +petstore_api.components.schema.enum_arrays ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_class.md b/samples/client/petstore/python/docs/components/schema/enum_class.md index 35e89e3ad3b..a50535ce3bd 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_class.md +++ b/samples/client/petstore/python/docs/components/schema/enum_class.md @@ -1,5 +1,5 @@ # EnumClass -openapi_client.components.schema.enum_class +petstore_api.components.schema.enum_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/enum_test.md b/samples/client/petstore/python/docs/components/schema/enum_test.md index 1747501f7fd..ba35a7e172b 100644 --- a/samples/client/petstore/python/docs/components/schema/enum_test.md +++ b/samples/client/petstore/python/docs/components/schema/enum_test.md @@ -1,5 +1,5 @@ # EnumTest -openapi_client.components.schema.enum_test +petstore_api.components.schema.enum_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md b/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md index 3df44f8255c..feb518e21b8 100644 --- a/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/equilateral_triangle.md @@ -1,5 +1,5 @@ # EquilateralTriangle -openapi_client.components.schema.equilateral_triangle +petstore_api.components.schema.equilateral_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/file.md b/samples/client/petstore/python/docs/components/schema/file.md index 8d95649054e..1f61e2e7323 100644 --- a/samples/client/petstore/python/docs/components/schema/file.md +++ b/samples/client/petstore/python/docs/components/schema/file.md @@ -1,5 +1,5 @@ # File -openapi_client.components.schema.file +petstore_api.components.schema.file ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md b/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md index 3d3b6ec5a86..e2e908abc85 100644 --- a/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md +++ b/samples/client/petstore/python/docs/components/schema/file_schema_test_class.md @@ -1,5 +1,5 @@ # FileSchemaTestClass -openapi_client.components.schema.file_schema_test_class +petstore_api.components.schema.file_schema_test_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/foo.md b/samples/client/petstore/python/docs/components/schema/foo.md index 67511c7867c..4a03319cf4a 100644 --- a/samples/client/petstore/python/docs/components/schema/foo.md +++ b/samples/client/petstore/python/docs/components/schema/foo.md @@ -1,5 +1,5 @@ # Foo -openapi_client.components.schema.foo +petstore_api.components.schema.foo ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/format_test.md b/samples/client/petstore/python/docs/components/schema/format_test.md index e6ffca7f85b..37fdc6fddda 100644 --- a/samples/client/petstore/python/docs/components/schema/format_test.md +++ b/samples/client/petstore/python/docs/components/schema/format_test.md @@ -1,5 +1,5 @@ # FormatTest -openapi_client.components.schema.format_test +petstore_api.components.schema.format_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/from_schema.md b/samples/client/petstore/python/docs/components/schema/from_schema.md index bf28c4bc3a8..e7e18e0a4ff 100644 --- a/samples/client/petstore/python/docs/components/schema/from_schema.md +++ b/samples/client/petstore/python/docs/components/schema/from_schema.md @@ -1,5 +1,5 @@ # FromSchema -openapi_client.components.schema.from_schema +petstore_api.components.schema.from_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/fruit.md b/samples/client/petstore/python/docs/components/schema/fruit.md index ba03d92f483..65e0fd938c3 100644 --- a/samples/client/petstore/python/docs/components/schema/fruit.md +++ b/samples/client/petstore/python/docs/components/schema/fruit.md @@ -1,5 +1,5 @@ # Fruit -openapi_client.components.schema.fruit +petstore_api.components.schema.fruit ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/fruit_req.md b/samples/client/petstore/python/docs/components/schema/fruit_req.md index 7773decf7b9..37e4344efe2 100644 --- a/samples/client/petstore/python/docs/components/schema/fruit_req.md +++ b/samples/client/petstore/python/docs/components/schema/fruit_req.md @@ -1,5 +1,5 @@ # FruitReq -openapi_client.components.schema.fruit_req +petstore_api.components.schema.fruit_req ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/gm_fruit.md b/samples/client/petstore/python/docs/components/schema/gm_fruit.md index 41b78ca747e..4747abc5f6c 100644 --- a/samples/client/petstore/python/docs/components/schema/gm_fruit.md +++ b/samples/client/petstore/python/docs/components/schema/gm_fruit.md @@ -1,5 +1,5 @@ # GmFruit -openapi_client.components.schema.gm_fruit +petstore_api.components.schema.gm_fruit ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/grandparent_animal.md b/samples/client/petstore/python/docs/components/schema/grandparent_animal.md index edcf27efd42..c0b831eca21 100644 --- a/samples/client/petstore/python/docs/components/schema/grandparent_animal.md +++ b/samples/client/petstore/python/docs/components/schema/grandparent_animal.md @@ -1,5 +1,5 @@ # GrandparentAnimal -openapi_client.components.schema.grandparent_animal +petstore_api.components.schema.grandparent_animal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/has_only_read_only.md b/samples/client/petstore/python/docs/components/schema/has_only_read_only.md index ac8577b4f1e..f02de6a97cd 100644 --- a/samples/client/petstore/python/docs/components/schema/has_only_read_only.md +++ b/samples/client/petstore/python/docs/components/schema/has_only_read_only.md @@ -1,5 +1,5 @@ # HasOnlyReadOnly -openapi_client.components.schema.has_only_read_only +petstore_api.components.schema.has_only_read_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/health_check_result.md b/samples/client/petstore/python/docs/components/schema/health_check_result.md index b36756231f2..ffa5973315c 100644 --- a/samples/client/petstore/python/docs/components/schema/health_check_result.md +++ b/samples/client/petstore/python/docs/components/schema/health_check_result.md @@ -1,5 +1,5 @@ # HealthCheckResult -openapi_client.components.schema.health_check_result +petstore_api.components.schema.health_check_result ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum.md b/samples/client/petstore/python/docs/components/schema/integer_enum.md index 64769c22370..2709f384821 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum.md @@ -1,5 +1,5 @@ # IntegerEnum -openapi_client.components.schema.integer_enum +petstore_api.components.schema.integer_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_big.md b/samples/client/petstore/python/docs/components/schema/integer_enum_big.md index 281d5a650de..e366417b908 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_big.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_big.md @@ -1,5 +1,5 @@ # IntegerEnumBig -openapi_client.components.schema.integer_enum_big +petstore_api.components.schema.integer_enum_big ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md b/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md index ee8b61a971d..207ae3b942a 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_one_value.md @@ -1,5 +1,5 @@ # IntegerEnumOneValue -openapi_client.components.schema.integer_enum_one_value +petstore_api.components.schema.integer_enum_one_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md b/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md index aee2cf0415e..0426b8ecc40 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md +++ b/samples/client/petstore/python/docs/components/schema/integer_enum_with_default_value.md @@ -1,5 +1,5 @@ # IntegerEnumWithDefaultValue -openapi_client.components.schema.integer_enum_with_default_value +petstore_api.components.schema.integer_enum_with_default_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_max10.md b/samples/client/petstore/python/docs/components/schema/integer_max10.md index 28adc7df2f4..5fe0d0984ed 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_max10.md +++ b/samples/client/petstore/python/docs/components/schema/integer_max10.md @@ -1,5 +1,5 @@ # IntegerMax10 -openapi_client.components.schema.integer_max10 +petstore_api.components.schema.integer_max10 ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/integer_min15.md b/samples/client/petstore/python/docs/components/schema/integer_min15.md index 44857fefa79..cebf163e07c 100644 --- a/samples/client/petstore/python/docs/components/schema/integer_min15.md +++ b/samples/client/petstore/python/docs/components/schema/integer_min15.md @@ -1,5 +1,5 @@ # IntegerMin15 -openapi_client.components.schema.integer_min15 +petstore_api.components.schema.integer_min15 ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md b/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md index 71c8c2469f1..af3293dca87 100644 --- a/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/isosceles_triangle.md @@ -1,5 +1,5 @@ # IsoscelesTriangle -openapi_client.components.schema.isosceles_triangle +petstore_api.components.schema.isosceles_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/items.md b/samples/client/petstore/python/docs/components/schema/items.md index 268c826751d..9527e318e1f 100644 --- a/samples/client/petstore/python/docs/components/schema/items.md +++ b/samples/client/petstore/python/docs/components/schema/items.md @@ -1,5 +1,5 @@ # Items -openapi_client.components.schema.items +petstore_api.components.schema.items ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/items_schema.md b/samples/client/petstore/python/docs/components/schema/items_schema.md index ea676f0e5fa..5bac34fbb5b 100644 --- a/samples/client/petstore/python/docs/components/schema/items_schema.md +++ b/samples/client/petstore/python/docs/components/schema/items_schema.md @@ -1,5 +1,5 @@ # ItemsSchema -openapi_client.components.schema.items_schema +petstore_api.components.schema.items_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request.md b/samples/client/petstore/python/docs/components/schema/json_patch_request.md index 56e197b5aa5..28e37d801d2 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request.md @@ -1,5 +1,5 @@ # JSONPatchRequest -openapi_client.components.schema.json_patch_request +petstore_api.components.schema.json_patch_request ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md index 2c8471cd26a..32b8543f6c4 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_add_replace_test.md @@ -1,5 +1,5 @@ # JSONPatchRequestAddReplaceTest -openapi_client.components.schema.json_patch_request_add_replace_test +petstore_api.components.schema.json_patch_request_add_replace_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md index a3e38f99ef9..beab1f84d4b 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md @@ -1,5 +1,5 @@ # JSONPatchRequestMoveCopy -openapi_client.components.schema.json_patch_request_move_copy +petstore_api.components.schema.json_patch_request_move_copy ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md index e8652c31eff..e0c29c95521 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_remove.md @@ -1,5 +1,5 @@ # JSONPatchRequestRemove -openapi_client.components.schema.json_patch_request_remove +petstore_api.components.schema.json_patch_request_remove ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/mammal.md b/samples/client/petstore/python/docs/components/schema/mammal.md index d4b93334109..978df2c09e7 100644 --- a/samples/client/petstore/python/docs/components/schema/mammal.md +++ b/samples/client/petstore/python/docs/components/schema/mammal.md @@ -1,5 +1,5 @@ # Mammal -openapi_client.components.schema.mammal +petstore_api.components.schema.mammal ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/map_test.md b/samples/client/petstore/python/docs/components/schema/map_test.md index a1848fb22ff..3d8b54924ee 100644 --- a/samples/client/petstore/python/docs/components/schema/map_test.md +++ b/samples/client/petstore/python/docs/components/schema/map_test.md @@ -1,5 +1,5 @@ # MapTest -openapi_client.components.schema.map_test +petstore_api.components.schema.map_test ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md index 64a92e59a3e..eb234501433 100644 --- a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md +++ b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md @@ -1,5 +1,5 @@ # MixedPropertiesAndAdditionalPropertiesClass -openapi_client.components.schema.mixed_properties_and_additional_properties_class +petstore_api.components.schema.mixed_properties_and_additional_properties_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/money.md b/samples/client/petstore/python/docs/components/schema/money.md index a466517456e..ae3c28c835a 100644 --- a/samples/client/petstore/python/docs/components/schema/money.md +++ b/samples/client/petstore/python/docs/components/schema/money.md @@ -1,5 +1,5 @@ # Money -openapi_client.components.schema.money +petstore_api.components.schema.money ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md b/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md index a8c94453689..30e17c80ac0 100644 --- a/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md +++ b/samples/client/petstore/python/docs/components/schema/multi_properties_schema.md @@ -1,5 +1,5 @@ # MultiPropertiesSchema -openapi_client.components.schema.multi_properties_schema +petstore_api.components.schema.multi_properties_schema ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/my_object_dto.md b/samples/client/petstore/python/docs/components/schema/my_object_dto.md index 9a2cf0d7702..334bb9058e5 100644 --- a/samples/client/petstore/python/docs/components/schema/my_object_dto.md +++ b/samples/client/petstore/python/docs/components/schema/my_object_dto.md @@ -1,5 +1,5 @@ # MyObjectDto -openapi_client.components.schema.my_object_dto +petstore_api.components.schema.my_object_dto ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/name.md b/samples/client/petstore/python/docs/components/schema/name.md index 23a7cbdff48..2d09d1038c9 100644 --- a/samples/client/petstore/python/docs/components/schema/name.md +++ b/samples/client/petstore/python/docs/components/schema/name.md @@ -1,5 +1,5 @@ # Name -openapi_client.components.schema.name +petstore_api.components.schema.name ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/no_additional_properties.md b/samples/client/petstore/python/docs/components/schema/no_additional_properties.md index d9c25f18680..b9f222b520e 100644 --- a/samples/client/petstore/python/docs/components/schema/no_additional_properties.md +++ b/samples/client/petstore/python/docs/components/schema/no_additional_properties.md @@ -1,5 +1,5 @@ # NoAdditionalProperties -openapi_client.components.schema.no_additional_properties +petstore_api.components.schema.no_additional_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_class.md b/samples/client/petstore/python/docs/components/schema/nullable_class.md index 927836b840c..f1479964eb4 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_class.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_class.md @@ -1,5 +1,5 @@ # NullableClass -openapi_client.components.schema.nullable_class +petstore_api.components.schema.nullable_class ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_shape.md b/samples/client/petstore/python/docs/components/schema/nullable_shape.md index a3bbaa4c937..d0e4137307a 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_shape.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_shape.md @@ -1,5 +1,5 @@ # NullableShape -openapi_client.components.schema.nullable_shape +petstore_api.components.schema.nullable_shape ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/nullable_string.md b/samples/client/petstore/python/docs/components/schema/nullable_string.md index bf698903d9e..7dbad1ff6f1 100644 --- a/samples/client/petstore/python/docs/components/schema/nullable_string.md +++ b/samples/client/petstore/python/docs/components/schema/nullable_string.md @@ -1,5 +1,5 @@ # NullableString -openapi_client.components.schema.nullable_string +petstore_api.components.schema.nullable_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number.md b/samples/client/petstore/python/docs/components/schema/number.md index 5b566072350..919a8fccd3f 100644 --- a/samples/client/petstore/python/docs/components/schema/number.md +++ b/samples/client/petstore/python/docs/components/schema/number.md @@ -1,5 +1,5 @@ # Number -openapi_client.components.schema.number +petstore_api.components.schema.number ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_only.md b/samples/client/petstore/python/docs/components/schema/number_only.md index 9f07eae5358..6a0d19c8e96 100644 --- a/samples/client/petstore/python/docs/components/schema/number_only.md +++ b/samples/client/petstore/python/docs/components/schema/number_only.md @@ -1,5 +1,5 @@ # NumberOnly -openapi_client.components.schema.number_only +petstore_api.components.schema.number_only ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md b/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md index 89f62c77544..114a1f4d3c9 100644 --- a/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md +++ b/samples/client/petstore/python/docs/components/schema/number_with_exclusive_min_max.md @@ -1,5 +1,5 @@ # NumberWithExclusiveMinMax -openapi_client.components.schema.number_with_exclusive_min_max +petstore_api.components.schema.number_with_exclusive_min_max ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/number_with_validations.md b/samples/client/petstore/python/docs/components/schema/number_with_validations.md index b54759e6821..51080993035 100644 --- a/samples/client/petstore/python/docs/components/schema/number_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/number_with_validations.md @@ -1,5 +1,5 @@ # NumberWithValidations -openapi_client.components.schema.number_with_validations +petstore_api.components.schema.number_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md b/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md index d876ec0085b..960b5e1310b 100644 --- a/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md +++ b/samples/client/petstore/python/docs/components/schema/obj_with_required_props.md @@ -1,5 +1,5 @@ # ObjWithRequiredProps -openapi_client.components.schema.obj_with_required_props +petstore_api.components.schema.obj_with_required_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md b/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md index 3c7164ff3cd..483048d8d46 100644 --- a/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md +++ b/samples/client/petstore/python/docs/components/schema/obj_with_required_props_base.md @@ -1,5 +1,5 @@ # ObjWithRequiredPropsBase -openapi_client.components.schema.obj_with_required_props_base +petstore_api.components.schema.obj_with_required_props_base ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_interface.md b/samples/client/petstore/python/docs/components/schema/object_interface.md index d67fb3bcf7f..3025af14e03 100644 --- a/samples/client/petstore/python/docs/components/schema/object_interface.md +++ b/samples/client/petstore/python/docs/components/schema/object_interface.md @@ -1,5 +1,5 @@ # ObjectInterface -openapi_client.components.schema.object_interface +petstore_api.components.schema.object_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md b/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md index 50c2614ad02..503397d4e3e 100644 --- a/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_model_with_arg_and_args_properties.md @@ -1,5 +1,5 @@ # ObjectModelWithArgAndArgsProperties -openapi_client.components.schema.object_model_with_arg_and_args_properties +petstore_api.components.schema.object_model_with_arg_and_args_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md b/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md index 40ae8c17373..f5464e8dd35 100644 --- a/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_model_with_ref_props.md @@ -1,5 +1,5 @@ # ObjectModelWithRefProps -openapi_client.components.schema.object_model_with_ref_props +petstore_api.components.schema.object_model_with_ref_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md b/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md index 575c3c1a5a8..5f232526416 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.md @@ -1,5 +1,5 @@ # ObjectWithAllOfWithReqTestPropFromUnsetAddProp -openapi_client.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop +petstore_api.components.schema.object_with_all_of_with_req_test_prop_from_unset_add_prop ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md index 6587af7940b..b2558b19f3d 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_colliding_properties.md @@ -1,5 +1,5 @@ # ObjectWithCollidingProperties -openapi_client.components.schema.object_with_colliding_properties +petstore_api.components.schema.object_with_colliding_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md index 67cc4e9cfa5..cef05f650be 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_decimal_properties.md @@ -1,5 +1,5 @@ # ObjectWithDecimalProperties -openapi_client.components.schema.object_with_decimal_properties +petstore_api.components.schema.object_with_decimal_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md b/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md index 7b89922613b..ed758de7ef0 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_difficultly_named_props.md @@ -1,5 +1,5 @@ # ObjectWithDifficultlyNamedProps -openapi_client.components.schema.object_with_difficultly_named_props +petstore_api.components.schema.object_with_difficultly_named_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md b/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md index 81cbeabd687..f899d271ea3 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_inline_composition_property.md @@ -1,5 +1,5 @@ # ObjectWithInlineCompositionProperty -openapi_client.components.schema.object_with_inline_composition_property +petstore_api.components.schema.object_with_inline_composition_property ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md index 161026dd4bf..125f9daa388 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md @@ -1,5 +1,5 @@ # ObjectWithInvalidNamedRefedProperties -openapi_client.components.schema.object_with_invalid_named_refed_properties +petstore_api.components.schema.object_with_invalid_named_refed_properties ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md b/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md index 55e3c84bdba..f8bbb84a318 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_non_intersecting_values.md @@ -1,5 +1,5 @@ # ObjectWithNonIntersectingValues -openapi_client.components.schema.object_with_non_intersecting_values +petstore_api.components.schema.object_with_non_intersecting_values ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md b/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md index 4bfc71b31e8..310bcac93a4 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_only_optional_props.md @@ -1,5 +1,5 @@ # ObjectWithOnlyOptionalProps -openapi_client.components.schema.object_with_only_optional_props +petstore_api.components.schema.object_with_only_optional_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md b/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md index a1c94dce232..fae41d328a5 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_optional_test_prop.md @@ -1,5 +1,5 @@ # ObjectWithOptionalTestProp -openapi_client.components.schema.object_with_optional_test_prop +petstore_api.components.schema.object_with_optional_test_prop ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/object_with_validations.md b/samples/client/petstore/python/docs/components/schema/object_with_validations.md index 5b603818a83..0086f84666a 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_validations.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_validations.md @@ -1,5 +1,5 @@ # ObjectWithValidations -openapi_client.components.schema.object_with_validations +petstore_api.components.schema.object_with_validations ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/order.md b/samples/client/petstore/python/docs/components/schema/order.md index 1eba2eb6b04..dac9d0c33b1 100644 --- a/samples/client/petstore/python/docs/components/schema/order.md +++ b/samples/client/petstore/python/docs/components/schema/order.md @@ -1,5 +1,5 @@ # Order -openapi_client.components.schema.order +petstore_api.components.schema.order ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md b/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md index ed3f10187de..f9ac316bb95 100644 --- a/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md +++ b/samples/client/petstore/python/docs/components/schema/paginated_result_my_object_dto.md @@ -1,5 +1,5 @@ # PaginatedResultMyObjectDto -openapi_client.components.schema.paginated_result_my_object_dto +petstore_api.components.schema.paginated_result_my_object_dto ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/parent_pet.md b/samples/client/petstore/python/docs/components/schema/parent_pet.md index 90ea25f9a22..433e417c783 100644 --- a/samples/client/petstore/python/docs/components/schema/parent_pet.md +++ b/samples/client/petstore/python/docs/components/schema/parent_pet.md @@ -1,5 +1,5 @@ # ParentPet -openapi_client.components.schema.parent_pet +petstore_api.components.schema.parent_pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/pet.md b/samples/client/petstore/python/docs/components/schema/pet.md index 4f884b49d3d..c40ad38467f 100644 --- a/samples/client/petstore/python/docs/components/schema/pet.md +++ b/samples/client/petstore/python/docs/components/schema/pet.md @@ -1,5 +1,5 @@ # Pet -openapi_client.components.schema.pet +petstore_api.components.schema.pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/pig.md b/samples/client/petstore/python/docs/components/schema/pig.md index 7043fc6b3cb..303ddeb6e28 100644 --- a/samples/client/petstore/python/docs/components/schema/pig.md +++ b/samples/client/petstore/python/docs/components/schema/pig.md @@ -1,5 +1,5 @@ # Pig -openapi_client.components.schema.pig +petstore_api.components.schema.pig ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/player.md b/samples/client/petstore/python/docs/components/schema/player.md index 1d8d20b00b4..0f7d3476fa1 100644 --- a/samples/client/petstore/python/docs/components/schema/player.md +++ b/samples/client/petstore/python/docs/components/schema/player.md @@ -1,5 +1,5 @@ # Player -openapi_client.components.schema.player +petstore_api.components.schema.player ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/public_key.md b/samples/client/petstore/python/docs/components/schema/public_key.md index a11c124bf16..da98a048424 100644 --- a/samples/client/petstore/python/docs/components/schema/public_key.md +++ b/samples/client/petstore/python/docs/components/schema/public_key.md @@ -1,5 +1,5 @@ # PublicKey -openapi_client.components.schema.public_key +petstore_api.components.schema.public_key ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/quadrilateral.md b/samples/client/petstore/python/docs/components/schema/quadrilateral.md index 9c14b91a430..1fdc04ea503 100644 --- a/samples/client/petstore/python/docs/components/schema/quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/quadrilateral.md @@ -1,5 +1,5 @@ # Quadrilateral -openapi_client.components.schema.quadrilateral +petstore_api.components.schema.quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md b/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md index 59526c6501c..bb1ce4208b7 100644 --- a/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md +++ b/samples/client/petstore/python/docs/components/schema/quadrilateral_interface.md @@ -1,5 +1,5 @@ # QuadrilateralInterface -openapi_client.components.schema.quadrilateral_interface +petstore_api.components.schema.quadrilateral_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/read_only_first.md b/samples/client/petstore/python/docs/components/schema/read_only_first.md index 9a9d0865ed1..8ad5a1b9bfa 100644 --- a/samples/client/petstore/python/docs/components/schema/read_only_first.md +++ b/samples/client/petstore/python/docs/components/schema/read_only_first.md @@ -1,5 +1,5 @@ # ReadOnlyFirst -openapi_client.components.schema.read_only_first +petstore_api.components.schema.read_only_first ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/ref_pet.md b/samples/client/petstore/python/docs/components/schema/ref_pet.md index f92cca37473..5f1a548c787 100644 --- a/samples/client/petstore/python/docs/components/schema/ref_pet.md +++ b/samples/client/petstore/python/docs/components/schema/ref_pet.md @@ -1,5 +1,5 @@ # RefPet -openapi_client.components.schema.ref_pet +petstore_api.components.schema.ref_pet ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md index 27f7e813df8..d335c5ef030 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_explicit_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromExplicitAddProps -openapi_client.components.schema.req_props_from_explicit_add_props +petstore_api.components.schema.req_props_from_explicit_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md index 035521fb15a..48d1fd4519b 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_true_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromTrueAddProps -openapi_client.components.schema.req_props_from_true_add_props +petstore_api.components.schema.req_props_from_true_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md b/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md index 81490d71e44..7bd7d223201 100644 --- a/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md +++ b/samples/client/petstore/python/docs/components/schema/req_props_from_unset_add_props.md @@ -1,5 +1,5 @@ # ReqPropsFromUnsetAddProps -openapi_client.components.schema.req_props_from_unset_add_props +petstore_api.components.schema.req_props_from_unset_add_props ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/return.md b/samples/client/petstore/python/docs/components/schema/return.md index 319c2789f0f..b860d3e64f3 100644 --- a/samples/client/petstore/python/docs/components/schema/return.md +++ b/samples/client/petstore/python/docs/components/schema/return.md @@ -1,5 +1,5 @@ # Return -openapi_client.components.schema.return +petstore_api.components.schema.return ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/scalene_triangle.md b/samples/client/petstore/python/docs/components/schema/scalene_triangle.md index 3f0aea46a37..27b9558634c 100644 --- a/samples/client/petstore/python/docs/components/schema/scalene_triangle.md +++ b/samples/client/petstore/python/docs/components/schema/scalene_triangle.md @@ -1,5 +1,5 @@ # ScaleneTriangle -openapi_client.components.schema.scalene_triangle +petstore_api.components.schema.scalene_triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md b/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md index d822f40548e..e7a99fc1bbe 100644 --- a/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md +++ b/samples/client/petstore/python/docs/components/schema/self_referencing_array_model.md @@ -1,5 +1,5 @@ # SelfReferencingArrayModel -openapi_client.components.schema.self_referencing_array_model +petstore_api.components.schema.self_referencing_array_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md b/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md index 2a1cc465e63..bdd112449c0 100644 --- a/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md +++ b/samples/client/petstore/python/docs/components/schema/self_referencing_object_model.md @@ -1,5 +1,5 @@ # SelfReferencingObjectModel -openapi_client.components.schema.self_referencing_object_model +petstore_api.components.schema.self_referencing_object_model ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/shape.md b/samples/client/petstore/python/docs/components/schema/shape.md index 41db0b86f7e..9abc71808a0 100644 --- a/samples/client/petstore/python/docs/components/schema/shape.md +++ b/samples/client/petstore/python/docs/components/schema/shape.md @@ -1,5 +1,5 @@ # Shape -openapi_client.components.schema.shape +petstore_api.components.schema.shape ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/shape_or_null.md b/samples/client/petstore/python/docs/components/schema/shape_or_null.md index c9b7fef5a2c..2cffe975a62 100644 --- a/samples/client/petstore/python/docs/components/schema/shape_or_null.md +++ b/samples/client/petstore/python/docs/components/schema/shape_or_null.md @@ -1,5 +1,5 @@ # ShapeOrNull -openapi_client.components.schema.shape_or_null +petstore_api.components.schema.shape_or_null ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md b/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md index 30307faf864..f2428c57321 100644 --- a/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md +++ b/samples/client/petstore/python/docs/components/schema/simple_quadrilateral.md @@ -1,5 +1,5 @@ # SimpleQuadrilateral -openapi_client.components.schema.simple_quadrilateral +petstore_api.components.schema.simple_quadrilateral ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/some_object.md b/samples/client/petstore/python/docs/components/schema/some_object.md index 8aa25d28642..f1af08d0620 100644 --- a/samples/client/petstore/python/docs/components/schema/some_object.md +++ b/samples/client/petstore/python/docs/components/schema/some_object.md @@ -1,5 +1,5 @@ # SomeObject -openapi_client.components.schema.some_object +petstore_api.components.schema.some_object ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/special_model_name.md b/samples/client/petstore/python/docs/components/schema/special_model_name.md index 99c2e08ae1d..63a107d9f1a 100644 --- a/samples/client/petstore/python/docs/components/schema/special_model_name.md +++ b/samples/client/petstore/python/docs/components/schema/special_model_name.md @@ -1,5 +1,5 @@ # SpecialModelName -openapi_client.components.schema.special_model_name +petstore_api.components.schema.special_model_name ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string.md b/samples/client/petstore/python/docs/components/schema/string.md index ce1ecec02ad..83e463b6e03 100644 --- a/samples/client/petstore/python/docs/components/schema/string.md +++ b/samples/client/petstore/python/docs/components/schema/string.md @@ -1,5 +1,5 @@ # String -openapi_client.components.schema.string +petstore_api.components.schema.string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_boolean_map.md b/samples/client/petstore/python/docs/components/schema/string_boolean_map.md index df99dc39a31..babe9df01bb 100644 --- a/samples/client/petstore/python/docs/components/schema/string_boolean_map.md +++ b/samples/client/petstore/python/docs/components/schema/string_boolean_map.md @@ -1,5 +1,5 @@ # StringBooleanMap -openapi_client.components.schema.string_boolean_map +petstore_api.components.schema.string_boolean_map ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_enum.md b/samples/client/petstore/python/docs/components/schema/string_enum.md index fa49482fe60..8fdf85e41ae 100644 --- a/samples/client/petstore/python/docs/components/schema/string_enum.md +++ b/samples/client/petstore/python/docs/components/schema/string_enum.md @@ -1,5 +1,5 @@ # StringEnum -openapi_client.components.schema.string_enum +petstore_api.components.schema.string_enum ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md b/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md index 5721e846c60..3c66d6c3f37 100644 --- a/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md +++ b/samples/client/petstore/python/docs/components/schema/string_enum_with_default_value.md @@ -1,5 +1,5 @@ # StringEnumWithDefaultValue -openapi_client.components.schema.string_enum_with_default_value +petstore_api.components.schema.string_enum_with_default_value ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/string_with_validation.md b/samples/client/petstore/python/docs/components/schema/string_with_validation.md index d124442cc59..3b33aa99049 100644 --- a/samples/client/petstore/python/docs/components/schema/string_with_validation.md +++ b/samples/client/petstore/python/docs/components/schema/string_with_validation.md @@ -1,5 +1,5 @@ # StringWithValidation -openapi_client.components.schema.string_with_validation +petstore_api.components.schema.string_with_validation ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/tag.md b/samples/client/petstore/python/docs/components/schema/tag.md index 5d85acfd38e..159fb6473ee 100644 --- a/samples/client/petstore/python/docs/components/schema/tag.md +++ b/samples/client/petstore/python/docs/components/schema/tag.md @@ -1,5 +1,5 @@ # Tag -openapi_client.components.schema.tag +petstore_api.components.schema.tag ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/triangle.md b/samples/client/petstore/python/docs/components/schema/triangle.md index 441b7f97bd3..066f81543d1 100644 --- a/samples/client/petstore/python/docs/components/schema/triangle.md +++ b/samples/client/petstore/python/docs/components/schema/triangle.md @@ -1,5 +1,5 @@ # Triangle -openapi_client.components.schema.triangle +petstore_api.components.schema.triangle ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/triangle_interface.md b/samples/client/petstore/python/docs/components/schema/triangle_interface.md index abb08cbfee7..c741e44221c 100644 --- a/samples/client/petstore/python/docs/components/schema/triangle_interface.md +++ b/samples/client/petstore/python/docs/components/schema/triangle_interface.md @@ -1,5 +1,5 @@ # TriangleInterface -openapi_client.components.schema.triangle_interface +petstore_api.components.schema.triangle_interface ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/user.md b/samples/client/petstore/python/docs/components/schema/user.md index 117458302a6..b6d86daa6d9 100644 --- a/samples/client/petstore/python/docs/components/schema/user.md +++ b/samples/client/petstore/python/docs/components/schema/user.md @@ -1,5 +1,5 @@ # User -openapi_client.components.schema.user +petstore_api.components.schema.user ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/uuid_string.md b/samples/client/petstore/python/docs/components/schema/uuid_string.md index b2ffdd2427e..1a87bee45be 100644 --- a/samples/client/petstore/python/docs/components/schema/uuid_string.md +++ b/samples/client/petstore/python/docs/components/schema/uuid_string.md @@ -1,5 +1,5 @@ # UUIDString -openapi_client.components.schema.uuid_string +petstore_api.components.schema.uuid_string ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/whale.md b/samples/client/petstore/python/docs/components/schema/whale.md index 97a05e31530..0f026622eca 100644 --- a/samples/client/petstore/python/docs/components/schema/whale.md +++ b/samples/client/petstore/python/docs/components/schema/whale.md @@ -1,5 +1,5 @@ # Whale -openapi_client.components.schema.whale +petstore_api.components.schema.whale ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/zebra.md b/samples/client/petstore/python/docs/components/schema/zebra.md index d8c71308f49..95855c47e94 100644 --- a/samples/client/petstore/python/docs/components/schema/zebra.md +++ b/samples/client/petstore/python/docs/components/schema/zebra.md @@ -1,5 +1,5 @@ # Zebra -openapi_client.components.schema.zebra +petstore_api.components.schema.zebra ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md index e5feae7c833..f11daf9fe69 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_api_key +petstore_api.components.security_schemes.security_scheme_api_key # SecurityScheme ApiKey ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md index 1358e9b4f85..8a6f218c97a 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_api_key_query.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_api_key_query +petstore_api.components.security_schemes.security_scheme_api_key_query # SecurityScheme ApiKeyQuery ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md index c21e0b7558e..335a24ff2ce 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_bearer_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_bearer_test +petstore_api.components.security_schemes.security_scheme_bearer_test # SecurityScheme BearerTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md index 13f7e6f62ff..471590e65aa 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_basic_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_http_basic_test +petstore_api.components.security_schemes.security_scheme_http_basic_test # SecurityScheme HttpBasicTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md index d72d5db1e96..f1eb69567f1 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_http_signature_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_http_signature_test +petstore_api.components.security_schemes.security_scheme_http_signature_test # SecurityScheme HttpSignatureTest ## Description @@ -13,6 +13,6 @@ security_schemes.HTTPSchemeType.SIGNATURE ## signing_info Type | Notes ---- | ------ -openapi_client.signing.HttpSigningConfiguration | Set by the developer +petstore_api.signing.HttpSigningConfiguration | Set by the developer [[Back to top]](#top) [[Back to Component Security Schemes]](../../../README.md#Component-SecuritySchemes) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md index 463526a3a63..dbe8f7d5d6e 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_open_id_connect_test.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_open_id_connect_test +petstore_api.components.security_schemes.security_scheme_open_id_connect_test # SecurityScheme OpenIdConnectTest ## Description diff --git a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md index 8b731ba942e..3f97e58236b 100644 --- a/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md +++ b/samples/client/petstore/python/docs/components/security_schemes/security_scheme_petstore_auth.md @@ -1,4 +1,4 @@ -openapi_client.components.security_schemes.security_scheme_petstore_auth +petstore_api.components.security_schemes.security_scheme_petstore_auth # SecurityScheme PetstoreAuth ## Description diff --git a/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md b/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md index 7a46fd326e8..58a747d1167 100644 --- a/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md +++ b/samples/client/petstore/python/docs/paths/another_fake_dummy/patch.md @@ -1,4 +1,4 @@ -openapi_client.paths.another_fake_dummy.operation +petstore_api.paths.another_fake_dummy.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -86,14 +86,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import another_fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import another_fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = another_fake_api.AnotherFakeApi(api_client) @@ -107,7 +107,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling AnotherFakeApi->call_123_test__special_tags: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md index 7af09ca5a83..a1024c62215 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.common_param_sub_dir.operation +petstore_api.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -132,15 +132,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.common_param_sub_dir.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.common_param_sub_dir.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -156,7 +156,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->delete_common_param: %s\n" % e) # example passing only optional values @@ -172,7 +172,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->delete_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md index fdd1a8dd91e..c7693de1576 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.common_param_sub_dir.operation +petstore_api.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -131,15 +131,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.common_param_sub_dir.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.common_param_sub_dir.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -155,7 +155,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->get_common_param: %s\n" % e) # example passing only optional values @@ -171,7 +171,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->get_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md b/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md index b38f12f2a79..0aca46efb67 100644 --- a/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md +++ b/samples/client/petstore/python/docs/paths/common_param_sub_dir/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.common_param_sub_dir.operation +petstore_api.paths.common_param_sub_dir.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -131,15 +131,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.common_param_sub_dir.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.common_param_sub_dir.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -155,7 +155,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->post_common_param: %s\n" % e) # example passing only optional values @@ -171,7 +171,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->post_common_param: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/delete.md b/samples/client/petstore/python/docs/paths/fake/delete.md index 995fb60cbb1..c0fbc575c0e 100644 --- a/samples/client/petstore/python/docs/paths/fake/delete.md +++ b/samples/client/petstore/python/docs/paths/fake/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake.operation +petstore_api.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -161,13 +161,13 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake.delete import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_bearer_test +from petstore_api.components.security_schemes import security_scheme_bearer_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -180,7 +180,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -199,7 +199,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->group_parameters: %s\n" % e) # example passing only optional values @@ -220,7 +220,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->group_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/get.md b/samples/client/petstore/python/docs/paths/fake/get.md index 38cb891bb41..dd57e17108f 100644 --- a/samples/client/petstore/python/docs/paths/fake/get.md +++ b/samples/client/petstore/python/docs/paths/fake/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake.operation +petstore_api.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -281,15 +281,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -322,7 +322,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->enum_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/patch.md b/samples/client/petstore/python/docs/paths/fake/patch.md index 9f13dbbb3b8..5506e8fa02a 100644 --- a/samples/client/petstore/python/docs/paths/fake/patch.md +++ b/samples/client/petstore/python/docs/paths/fake/patch.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake.operation +petstore_api.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -86,14 +86,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -107,7 +107,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->client_model: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake/post.md b/samples/client/petstore/python/docs/paths/fake/post.md index 4e8a3aacffe..c509d8288a4 100644 --- a/samples/client/petstore/python/docs/paths/fake/post.md +++ b/samples/client/petstore/python/docs/paths/fake/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake.operation +petstore_api.paths.fake.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -173,12 +173,12 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_http_basic_test +from petstore_api.components.security_schemes import security_scheme_http_basic_test # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -192,7 +192,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -219,7 +219,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md b/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md index 4c1f492c0a4..a9173252b9e 100644 --- a/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md +++ b/samples/client/petstore/python/docs/paths/fake_additional_properties_with_array_of_enums/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_additional_properties_with_array_of_enums.operation +petstore_api.paths.fake_additional_properties_with_array_of_enums.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->additional_properties_with_array_of_enums: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md b/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md index b0f75525171..81cbf0dfba7 100644 --- a/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md +++ b/samples/client/petstore/python/docs/paths/fake_body_with_file_schema/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_body_with_file_schema.operation +petstore_api.paths.fake_body_with_file_schema.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -73,14 +73,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -98,7 +98,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->body_with_file_schema: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md b/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md index de9f38e7566..3af6d64856e 100644 --- a/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md +++ b/samples/client/petstore/python/docs/paths/fake_body_with_query_params/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_body_with_query_params.operation +petstore_api.paths.fake_body_with_query_params.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -111,15 +111,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_body_with_query_params.put import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_body_with_query_params.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -148,7 +148,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->body_with_query_params: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md b/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md index 09ad7194542..6a4fa34f5a5 100644 --- a/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md +++ b/samples/client/petstore/python/docs/paths/fake_case_sensitive_params/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_case_sensitive_params.operation +petstore_api.paths.fake_case_sensitive_params.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -99,15 +99,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_case_sensitive_params.put import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_case_sensitive_params.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -122,7 +122,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->case_sensitive_params: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md b/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md index b397fc1cb59..e6099219fd4 100644 --- a/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md +++ b/samples/client/petstore/python/docs/paths/fake_classname_test/patch.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_classname_test.operation +petstore_api.paths.fake_classname_test.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,12 +102,12 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_classname_tags123_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_classname_tags123_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key_query +from petstore_api.components.security_schemes import security_scheme_api_key_query # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -120,7 +120,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_classname_tags123_api.FakeClassnameTags123Api(api_client) @@ -134,7 +134,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeClassnameTags123Api->classname: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md b/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md index 3217eb55cc0..aacac0882ae 100644 --- a/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md +++ b/samples/client/petstore/python/docs/paths/fake_delete_coffee_id/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_delete_coffee_id.operation +petstore_api.paths.fake_delete_coffee_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -107,15 +107,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_delete_coffee_id.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_delete_coffee_id.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -129,7 +129,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->delete_coffee: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_health/get.md b/samples/client/petstore/python/docs/paths/fake_health/get.md index 04da62ebc7c..4213bf03309 100644 --- a/samples/client/petstore/python/docs/paths/fake_health/get.md +++ b/samples/client/petstore/python/docs/paths/fake_health/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_health.operation +petstore_api.paths.fake_health.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -83,14 +83,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -99,7 +99,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # Health check endpoint api_response = api_instance.fake_health_get() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->fake_health_get: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md b/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md index b5e4cffd384..dbc15b5bb98 100644 --- a/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md +++ b/samples/client/petstore/python/docs/paths/fake_inline_additional_properties/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_inline_additional_properties.operation +petstore_api.paths.fake_inline_additional_properties.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -104,14 +104,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -125,7 +125,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->inline_additional_properties: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md b/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md index 5269480a57c..3373d45a7f6 100644 --- a/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md +++ b/samples/client/petstore/python/docs/paths/fake_inline_composition/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_inline_composition.operation +petstore_api.paths.fake_inline_composition.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -314,15 +314,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_inline_composition.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_inline_composition.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -341,7 +341,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->inline_composition: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md b/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md index 357143da885..6b0410e2a85 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md +++ b/samples/client/petstore/python/docs/paths/fake_json_form_data/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_json_form_data.operation +petstore_api.paths.fake_json_form_data.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -108,14 +108,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -130,7 +130,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->json_form_data: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md b/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md index 6c4b4b3e6c7..c1fa8d5b041 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md +++ b/samples/client/petstore/python/docs/paths/fake_json_patch/patch.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_json_patch.operation +petstore_api.paths.fake_json_patch.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -74,14 +74,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -95,7 +95,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->json_patch: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md b/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md index 73dbe2e1771..a6f98a60380 100644 --- a/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md +++ b/samples/client/petstore/python/docs/paths/fake_json_with_charset/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_json_with_charset.operation +petstore_api.paths.fake_json_with_charset.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,14 +102,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -121,7 +121,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->json_with_charset: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md b/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md index ceb77afc7c3..abaabd2b682 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_request_body_content_types/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_multiple_request_body_content_types.operation +petstore_api.paths.fake_multiple_request_body_content_types.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -178,14 +178,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -199,7 +199,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->multiple_request_body_content_types: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md b/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md index 2d7d575777a..a9556cc4a5e 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_response_bodies/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_multiple_response_bodies.operation +petstore_api.paths.fake_multiple_response_bodies.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -112,14 +112,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # multiple responses have response bodies api_response = api_instance.multiple_response_bodies() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->multiple_response_bodies: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md b/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md index d621181d4e7..118e0fa7d39 100644 --- a/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md +++ b/samples/client/petstore/python/docs/paths/fake_multiple_securities/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_multiple_securities.operation +petstore_api.paths.fake_multiple_securities.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -101,15 +101,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint # security_index 1 -from openapi_client.components.security_schemes import security_scheme_http_basic_test -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_http_basic_test +from petstore_api.components.security_schemes import security_scheme_api_key # security_index 2 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 # no auth required for this security_index @@ -145,7 +145,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -154,7 +154,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # multiple security requirements api_response = api_instance.multiple_securities() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->multiple_securities: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md b/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md index 2d0f70d6b0d..68301cf4b67 100644 --- a/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md +++ b/samples/client/petstore/python/docs/paths/fake_obj_in_query/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_obj_in_query.operation +petstore_api.paths.fake_obj_in_query.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -93,15 +93,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_obj_in_query.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_obj_in_query.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -117,7 +117,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->object_in_query: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md index 69eab7e863b..443e7823331 100644 --- a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md +++ b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_parameter_collisions1_abab_self_ab.operation +petstore_api.paths.fake_parameter_collisions1_abab_self_ab.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -291,15 +291,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_parameter_collisions1_abab_self_ab.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_parameter_collisions1_abab_self_ab.post import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -326,7 +326,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: cookie_params=cookie_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) # example passing only optional values @@ -368,7 +368,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md b/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md index 50ad0bd5bc1..0b1746b70e1 100644 --- a/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md +++ b/samples/client/petstore/python/docs/paths/fake_pem_content_type/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_pem_content_type.operation +petstore_api.paths.fake_pem_content_type.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -102,14 +102,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -121,7 +121,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->pem_content_type: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md b/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md index 83b8b44669d..4baff46fd05 100644 --- a/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_pet_id_upload_image_with_required_file/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_pet_id_upload_image_with_required_file.operation +petstore_api.paths.fake_pet_id_upload_image_with_required_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -192,13 +192,13 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.fake_pet_id_upload_image_with_required_file.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.fake_pet_id_upload_image_with_required_file.post import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -210,7 +210,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -224,7 +224,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) # example passing only optional values @@ -242,7 +242,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md b/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md index 3195ce22429..70f104cd9bb 100644 --- a/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md +++ b/samples/client/petstore/python/docs/paths/fake_query_param_with_json_content_type/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_query_param_with_json_content_type.operation +petstore_api.paths.fake_query_param_with_json_content_type.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -122,15 +122,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_query_param_with_json_content_type.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_query_param_with_json_content_type.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -144,7 +144,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->query_param_with_json_content_type: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_redirection/get.md b/samples/client/petstore/python/docs/paths/fake_redirection/get.md index 2d634de303a..418b86edcca 100644 --- a/samples/client/petstore/python/docs/paths/fake_redirection/get.md +++ b/samples/client/petstore/python/docs/paths/fake_redirection/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_redirection.operation +petstore_api.paths.fake_redirection.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -79,14 +79,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -95,7 +95,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # operation with redirection responses api_response = api_instance.redirection() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->redirection: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md b/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md index 16a3968a4f0..8f35466f152 100644 --- a/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md +++ b/samples/client/petstore/python/docs/paths/fake_ref_obj_in_query/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_ref_obj_in_query.operation +petstore_api.paths.fake_ref_obj_in_query.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -93,15 +93,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_ref_obj_in_query.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_ref_obj_in_query.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -117,7 +117,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->ref_object_in_query: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md b/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md index 0231bd37c88..f1d5536aa60 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_array_of_enums/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_array_of_enums.operation +petstore_api.paths.fake_refs_array_of_enums.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -126,7 +126,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->array_of_enums: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md b/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md index f619737f97d..c5e0196a03e 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_arraymodel/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_arraymodel.operation +petstore_api.paths.fake_refs_arraymodel.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -125,7 +125,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->array_model: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md b/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md index efe780ed7d0..033481de2b7 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_boolean/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_boolean.operation +petstore_api.paths.fake_refs_boolean.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->boolean: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md b/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md index 4fa8083d6da..e045047eb47 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_composed_one_of_number_with_validations/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_composed_one_of_number_with_validations.operation +petstore_api.paths.fake_refs_composed_one_of_number_with_validations.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->composed_one_of_different_types: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md b/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md index bbca3049ad5..d50ecd9f64d 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_enum/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_enum.operation +petstore_api.paths.fake_refs_enum.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->string_enum: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md b/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md index f5c80ed9a29..45acd604f69 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_mammal/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_mammal.operation +petstore_api.paths.fake_refs_mammal.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -127,7 +127,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->mammal: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_number/post.md b/samples/client/petstore/python/docs/paths/fake_refs_number/post.md index 554002a0f5b..0862ed4ebc5 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_number/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_number/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_number.operation +petstore_api.paths.fake_refs_number.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->number_with_validations: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md b/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md index 4b134f2ebe4..1b5c443ba6e 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_object_model_with_ref_props/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_object_model_with_ref_props.operation +petstore_api.paths.fake_refs_object_model_with_ref_props.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -127,7 +127,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_refs_string/post.md b/samples/client/petstore/python/docs/paths/fake_refs_string/post.md index 2b124e8d04f..e45328433c3 100644 --- a/samples/client/petstore/python/docs/paths/fake_refs_string/post.md +++ b/samples/client/petstore/python/docs/paths/fake_refs_string/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_refs_string.operation +petstore_api.paths.fake_refs_string.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -105,14 +105,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -123,7 +123,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->string: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md b/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md index e0de46dfecd..6801c62550f 100644 --- a/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md +++ b/samples/client/petstore/python/docs/paths/fake_response_without_schema/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_response_without_schema.operation +petstore_api.paths.fake_response_without_schema.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -73,14 +73,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -89,7 +89,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # receives a response without schema api_response = api_instance.response_without_schema() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->response_without_schema: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md b/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md index b0891526bc4..6b544e4e5e9 100644 --- a/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md +++ b/samples/client/petstore/python/docs/paths/fake_test_query_paramters/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_test_query_paramters.operation +petstore_api.paths.fake_test_query_paramters.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -108,15 +108,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api -from openapi_client.paths.fake_test_query_paramters.put import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api +from petstore_api.paths.fake_test_query_paramters.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -144,7 +144,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->query_parameter_collection_format: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md b/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md index a0934e6d328..81e91e16c35 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_download_file/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_upload_download_file.operation +petstore_api.paths.fake_upload_download_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -109,14 +109,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -128,7 +128,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_download_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_file/post.md b/samples/client/petstore/python/docs/paths/fake_upload_file/post.md index 8a5373f97c2..0642b8d2948 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_file/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_file/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_upload_file.operation +petstore_api.paths.fake_upload_file.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -137,14 +137,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -159,7 +159,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_file: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_upload_files/post.md b/samples/client/petstore/python/docs/paths/fake_upload_files/post.md index 8d76cec80f2..d0cb6963199 100644 --- a/samples/client/petstore/python/docs/paths/fake_upload_files/post.md +++ b/samples/client/petstore/python/docs/paths/fake_upload_files/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_upload_files.operation +petstore_api.paths.fake_upload_files.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -188,14 +188,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -211,7 +211,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->upload_files: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md b/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md index 574f93596de..5bd370c211b 100644 --- a/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md +++ b/samples/client/petstore/python/docs/paths/fake_wild_card_responses/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.fake_wild_card_responses.operation +petstore_api.paths.fake_wild_card_responses.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -228,14 +228,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -244,7 +244,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # operation with wildcard responses api_response = api_instance.wild_card_responses() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->wild_card_responses: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/foo/get.md b/samples/client/petstore/python/docs/paths/foo/get.md index 452fb7b8350..970b8c2d7af 100644 --- a/samples/client/petstore/python/docs/paths/foo/get.md +++ b/samples/client/petstore/python/docs/paths/foo/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.foo.operation +petstore_api.paths.foo.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -127,14 +127,14 @@ Key | Type | Description | Notes ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import default_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import default_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = default_api.DefaultApi(api_client) @@ -142,7 +142,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: try: api_response = api_instance.foo_get() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling DefaultApi->foo_get: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet/post.md b/samples/client/petstore/python/docs/paths/pet/post.md index b0c3209cfdb..d5aa1b2489c 100644 --- a/samples/client/petstore/python/docs/paths/pet/post.md +++ b/samples/client/petstore/python/docs/paths/pet/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet.operation +petstore_api.paths.pet.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -88,16 +88,16 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_http_signature_test +from petstore_api.components.security_schemes import security_scheme_http_signature_test # security_index 2 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -110,18 +110,18 @@ security_scheme_info: api_configuration.SecuritySchemeInfo = { # security_scheme_info for security_index 1 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=openapi_client.signing.HttpSigningConfiguration( + signing_info=petstore_api.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=openapi_client.signing.SCHEME_HS2019, - signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=petstore_api.signing.SCHEME_HS2019, + signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - openapi_client.signing.HEADER_REQUEST_TARGET, - openapi_client.signing.HEADER_CREATED, - openapi_client.signing.HEADER_EXPIRES, - openapi_client.signing.HEADER_HOST, - openapi_client.signing.HEADER_DATE, - openapi_client.signing.HEADER_DIGEST, + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -149,7 +149,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -178,7 +178,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->add_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet/put.md b/samples/client/petstore/python/docs/paths/pet/put.md index cfc7e81031d..05fc84e576b 100644 --- a/samples/client/petstore/python/docs/paths/pet/put.md +++ b/samples/client/petstore/python/docs/paths/pet/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet.operation +petstore_api.paths.pet.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -112,30 +112,30 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_http_signature_test +from petstore_api.components.security_schemes import security_scheme_http_signature_test # security_index 1 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=openapi_client.signing.HttpSigningConfiguration( + signing_info=petstore_api.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=openapi_client.signing.SCHEME_HS2019, - signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=petstore_api.signing.SCHEME_HS2019, + signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - openapi_client.signing.HEADER_REQUEST_TARGET, - openapi_client.signing.HEADER_CREATED, - openapi_client.signing.HEADER_EXPIRES, - openapi_client.signing.HEADER_HOST, - openapi_client.signing.HEADER_DATE, - openapi_client.signing.HEADER_DIGEST, + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -162,7 +162,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -191,7 +191,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->update_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md b/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md index 5b3de522c58..d7dee242c11 100644 --- a/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md +++ b/samples/client/petstore/python/docs/paths/pet_find_by_status/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_find_by_status.operation +petstore_api.paths.pet_find_by_status.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -140,17 +140,17 @@ Key | Type | Description | Notes ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_find_by_status.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_find_by_status.get import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_http_signature_test +from petstore_api.components.security_schemes import security_scheme_http_signature_test # security_index 2 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -163,18 +163,18 @@ security_scheme_info: api_configuration.SecuritySchemeInfo = { # security_scheme_info for security_index 1 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=openapi_client.signing.HttpSigningConfiguration( + signing_info=petstore_api.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=openapi_client.signing.SCHEME_HS2019, - signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=petstore_api.signing.SCHEME_HS2019, + signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - openapi_client.signing.HEADER_REQUEST_TARGET, - openapi_client.signing.HEADER_CREATED, - openapi_client.signing.HEADER_EXPIRES, - openapi_client.signing.HEADER_HOST, - openapi_client.signing.HEADER_DATE, - openapi_client.signing.HEADER_DIGEST, + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -202,7 +202,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -218,7 +218,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md b/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md index 3113ebd8f80..5d8f11595d3 100644 --- a/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md +++ b/samples/client/petstore/python/docs/paths/pet_find_by_tags/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_find_by_tags.operation +petstore_api.paths.pet_find_by_tags.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -124,31 +124,31 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_find_by_tags.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_find_by_tags.get import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_http_signature_test +from petstore_api.components.security_schemes import security_scheme_http_signature_test # security_index 1 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { "http_signature_test": security_scheme_http_signature_test.HttpSignatureTest( - signing_info=openapi_client.signing.HttpSigningConfiguration( + signing_info=petstore_api.signing.HttpSigningConfiguration( key_id='my-key-id', private_key_path='rsa.pem', - signing_scheme=openapi_client.signing.SCHEME_HS2019, - signing_algorithm=openapi_client.signing.ALGORITHM_RSASSA_PSS, + signing_scheme=petstore_api.signing.SCHEME_HS2019, + signing_algorithm=petstore_api.signing.ALGORITHM_RSASSA_PSS, signed_headers=[ - openapi_client.signing.HEADER_REQUEST_TARGET, - openapi_client.signing.HEADER_CREATED, - openapi_client.signing.HEADER_EXPIRES, - openapi_client.signing.HEADER_HOST, - openapi_client.signing.HEADER_DATE, - openapi_client.signing.HEADER_DIGEST, + petstore_api.signing.HEADER_REQUEST_TARGET, + petstore_api.signing.HEADER_CREATED, + petstore_api.signing.HEADER_EXPIRES, + petstore_api.signing.HEADER_HOST, + petstore_api.signing.HEADER_DATE, + petstore_api.signing.HEADER_DIGEST, 'Content-Type', 'User-Agent' ], @@ -175,7 +175,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -191,7 +191,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md b/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md index f1d5828d11a..6f1117bff1f 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_pet_id.operation +petstore_api.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -162,15 +162,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_pet_id.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_pet_id.delete import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -196,7 +196,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -213,7 +213,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->delete_pet: %s\n" % e) # example passing only optional values @@ -230,7 +230,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: header_params=header_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->delete_pet: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/get.md b/samples/client/petstore/python/docs/paths/pet_pet_id/get.md index 09abcb08914..e487d3fcdfc 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/get.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_pet_id.operation +petstore_api.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -175,13 +175,13 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_pet_id.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_pet_id.get import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -194,7 +194,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -208,7 +208,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id/post.md b/samples/client/petstore/python/docs/paths/pet_pet_id/post.md index 960ff18c115..2cab9581000 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id/post.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_pet_id.operation +petstore_api.paths.pet_pet_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -176,15 +176,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_pet_id.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_pet_id.post import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_index 1 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -210,7 +210,7 @@ used_configuration = api_configuration.ApiConfiguration( security_index_info=security_index_info ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -224,7 +224,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) # example passing only optional values @@ -242,7 +242,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md b/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md index 6ffcaaa3517..e45bac9a88d 100644 --- a/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md +++ b/samples/client/petstore/python/docs/paths/pet_pet_id_upload_image/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.pet_pet_id_upload_image.operation +petstore_api.paths.pet_pet_id_upload_image.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -164,13 +164,13 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import pet_api -from openapi_client.paths.pet_pet_id_upload_image.post import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import pet_api +from petstore_api.paths.pet_pet_id_upload_image.post import operation from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_petstore_auth +from petstore_api.components.security_schemes import security_scheme_petstore_auth # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -182,7 +182,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = pet_api.PetApi(api_client) @@ -196,7 +196,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) # example passing only optional values @@ -214,7 +214,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling PetApi->upload_image: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/solidus/get.md b/samples/client/petstore/python/docs/paths/solidus/get.md index 2e6ca104561..320d4b48f26 100644 --- a/samples/client/petstore/python/docs/paths/solidus/get.md +++ b/samples/client/petstore/python/docs/paths/solidus/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.solidus.operation +petstore_api.paths.solidus.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -54,14 +54,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import fake_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import fake_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = fake_api.FakeApi(api_client) @@ -70,7 +70,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # slash route api_response = api_instance.slash_route() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling FakeApi->slash_route: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_inventory/get.md b/samples/client/petstore/python/docs/paths/store_inventory/get.md index 97374bd3e77..131a61faf2f 100644 --- a/samples/client/petstore/python/docs/paths/store_inventory/get.md +++ b/samples/client/petstore/python/docs/paths/store_inventory/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.store_inventory.operation +petstore_api.paths.store_inventory.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -72,12 +72,12 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import store_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import store_api from pprint import pprint # security_index 0 -from openapi_client.components.security_schemes import security_scheme_api_key +from petstore_api.components.security_schemes import security_scheme_api_key # security_scheme_info for security_index 0 security_scheme_info: api_configuration.SecuritySchemeInfo = { @@ -90,7 +90,7 @@ used_configuration = api_configuration.ApiConfiguration( security_scheme_info=security_scheme_info, ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -99,7 +99,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # Returns pet inventories by status api_response = api_instance.get_inventory() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling StoreApi->get_inventory: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order/post.md b/samples/client/petstore/python/docs/paths/store_order/post.md index 10845a1a884..10f72272cbf 100644 --- a/samples/client/petstore/python/docs/paths/store_order/post.md +++ b/samples/client/petstore/python/docs/paths/store_order/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.store_order.operation +petstore_api.paths.store_order.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -129,14 +129,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import store_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import store_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -155,7 +155,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling StoreApi->place_order: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md b/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md index 3789001c19e..b6e7e8d744f 100644 --- a/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md +++ b/samples/client/petstore/python/docs/paths/store_order_order_id/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.store_order_order_id.operation +petstore_api.paths.store_order_order_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -119,15 +119,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import store_api -from openapi_client.paths.store_order_order_id.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import store_api +from petstore_api.paths.store_order_order_id.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -141,7 +141,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling StoreApi->delete_order: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/store_order_order_id/get.md b/samples/client/petstore/python/docs/paths/store_order_order_id/get.md index 969c6600b45..e4340f5e357 100644 --- a/samples/client/petstore/python/docs/paths/store_order_order_id/get.md +++ b/samples/client/petstore/python/docs/paths/store_order_order_id/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.store_order_order_id.operation +petstore_api.paths.store_order_order_id.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -159,15 +159,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import store_api -from openapi_client.paths.store_order_order_id.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import store_api +from petstore_api.paths.store_order_order_id.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = store_api.StoreApi(api_client) @@ -181,7 +181,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user/post.md b/samples/client/petstore/python/docs/paths/user/post.md index 47770a31475..26bafa37cbb 100644 --- a/samples/client/petstore/python/docs/paths/user/post.md +++ b/samples/client/petstore/python/docs/paths/user/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.user.operation +petstore_api.paths.user.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -89,14 +89,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -122,7 +122,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->create_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_create_with_array/post.md b/samples/client/petstore/python/docs/paths/user_create_with_array/post.md index 49513e2873d..df31ceecb84 100644 --- a/samples/client/petstore/python/docs/paths/user_create_with_array/post.md +++ b/samples/client/petstore/python/docs/paths/user_create_with_array/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_create_with_array.operation +petstore_api.paths.user_create_with_array.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -69,14 +69,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -104,7 +104,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_create_with_list/post.md b/samples/client/petstore/python/docs/paths/user_create_with_list/post.md index ec374a60f93..17fa406f72d 100644 --- a/samples/client/petstore/python/docs/paths/user_create_with_list/post.md +++ b/samples/client/petstore/python/docs/paths/user_create_with_list/post.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_create_with_list.operation +petstore_api.paths.user_create_with_list.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -69,14 +69,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -104,7 +104,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_login/get.md b/samples/client/petstore/python/docs/paths/user_login/get.md index 7f818ef2460..e16d0929cd8 100644 --- a/samples/client/petstore/python/docs/paths/user_login/get.md +++ b/samples/client/petstore/python/docs/paths/user_login/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_login.operation +petstore_api.paths.user_login.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -230,15 +230,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api -from openapi_client.paths.user_login.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api +from petstore_api.paths.user_login.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -253,7 +253,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: query_params=query_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->login_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_logout/get.md b/samples/client/petstore/python/docs/paths/user_logout/get.md index cd9d2ab6e1b..01679b46385 100644 --- a/samples/client/petstore/python/docs/paths/user_logout/get.md +++ b/samples/client/petstore/python/docs/paths/user_logout/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_logout.operation +petstore_api.paths.user_logout.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -55,14 +55,14 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -71,7 +71,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: # Logs out current logged in user session api_response = api_instance.logout_user() pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->logout_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/delete.md b/samples/client/petstore/python/docs/paths/user_username/delete.md index 92a2f71938d..a0cb520b2d7 100644 --- a/samples/client/petstore/python/docs/paths/user_username/delete.md +++ b/samples/client/petstore/python/docs/paths/user_username/delete.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_username.operation +petstore_api.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -107,15 +107,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api -from openapi_client.paths.user_username.delete import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api +from petstore_api.paths.user_username.delete import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -129,7 +129,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->delete_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/get.md b/samples/client/petstore/python/docs/paths/user_username/get.md index 87490fc2659..475fdba6faa 100644 --- a/samples/client/petstore/python/docs/paths/user_username/get.md +++ b/samples/client/petstore/python/docs/paths/user_username/get.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_username.operation +petstore_api.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -159,15 +159,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api -from openapi_client.paths.user_username.get import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api +from petstore_api.paths.user_username.get import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -181,7 +181,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: path_params=path_params, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->get_user_by_name: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/paths/user_username/put.md b/samples/client/petstore/python/docs/paths/user_username/put.md index 4ab78840586..dfa103c39bb 100644 --- a/samples/client/petstore/python/docs/paths/user_username/put.md +++ b/samples/client/petstore/python/docs/paths/user_username/put.md @@ -1,4 +1,4 @@ -openapi_client.paths.user_username.operation +petstore_api.paths.user_username.operation # Operation Method Name | Method Name | Api Class | Notes | @@ -141,15 +141,15 @@ server_index | Class | Description ## Code Sample ```python -import openapi_client -from openapi_client.configurations import api_configuration -from openapi_client.apis.tags import user_api -from openapi_client.paths.user_username.put import operation +import petstore_api +from petstore_api.configurations import api_configuration +from petstore_api.apis.tags import user_api +from petstore_api.paths.user_username.put import operation from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client -with openapi_client.ApiClient(used_configuration) as api_client: +with petstore_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class api_instance = user_api.UserApi(api_client) @@ -179,7 +179,7 @@ with openapi_client.ApiClient(used_configuration) as api_client: body=body, ) pprint(api_response) - except openapi_client.ApiException as e: + except petstore_api.ApiException as e: print("Exception when calling UserApi->update_user: %s\n" % e) ``` diff --git a/samples/client/petstore/python/docs/servers/server_0.md b/samples/client/petstore/python/docs/servers/server_0.md index daf6dc3f0bb..bf27bacb919 100644 --- a/samples/client/petstore/python/docs/servers/server_0.md +++ b/samples/client/petstore/python/docs/servers/server_0.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_0 +petstore_api.servers.server_0 # Server Server0 ## Description diff --git a/samples/client/petstore/python/docs/servers/server_1.md b/samples/client/petstore/python/docs/servers/server_1.md index 9f094dec36e..4fe13818cd6 100644 --- a/samples/client/petstore/python/docs/servers/server_1.md +++ b/samples/client/petstore/python/docs/servers/server_1.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_1 +petstore_api.servers.server_1 # Server Server1 ## Description diff --git a/samples/client/petstore/python/docs/servers/server_2.md b/samples/client/petstore/python/docs/servers/server_2.md index 8fd1fbd31dd..25c19fc0f6e 100644 --- a/samples/client/petstore/python/docs/servers/server_2.md +++ b/samples/client/petstore/python/docs/servers/server_2.md @@ -1,4 +1,4 @@ -openapi_client.servers.server_2 +petstore_api.servers.server_2 # Server Server2 ## Description diff --git a/samples/client/petstore/python/pyproject.toml b/samples/client/petstore/python/pyproject.toml index 4142c3541d9..8d08bccb62b 100644 --- a/samples/client/petstore/python/pyproject.toml +++ b/samples/client/petstore/python/pyproject.toml @@ -11,7 +11,7 @@ where = ["src"] "petstore_api" = ["py.typed"] [project] -name = "openapi-client" +name = "petstore-api" version = "1.0.0" authors = [ { name="OpenAPI JSON Schema Generator community" }, diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 1f27d49a6d2..dcf002804d7 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -85,7 +85,7 @@ class Double( @dataclasses.dataclass(frozen=True) -class _Float( +class Float( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -102,7 +102,7 @@ class _Float( "int32": typing.Type[Int32], "int64": typing.Type[Int64], "double": typing.Type[Double], - "float": typing.Type[_Float], + "float": typing.Type[Float], } ) @@ -161,6 +161,11 @@ def __new__( schemas.OUTPUT_BASE_TYPES, schemas.Unset ] = schemas.unset, + float: typing.Union[ + schemas.INPUT_TYPES_ALL, + schemas.OUTPUT_BASE_TYPES, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): @@ -173,6 +178,7 @@ def __new__( ("int32", int32), ("int64", int64), ("double", double), + ("float", float), ): if isinstance(val, schemas.Unset): continue @@ -240,6 +246,13 @@ def double(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: return val return val + @property + def float(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return val + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index cfdad38a366..bddd0dec2c0 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -10,7 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -_Not: typing_extensions.TypeAlias = schemas.StrSchema +Not: typing_extensions.TypeAlias = schemas.StrSchema @dataclasses.dataclass(frozen=True) @@ -23,5 +23,5 @@ class AnyTypeNotString( Do not edit the class manually. """ # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/client/petstore/python/src/petstore_api/components/schema/cat.py index 58e2dd0325c..19d2e4c76e5 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -103,8 +103,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import animal AllOf = typing.Tuple[ typing.Type[animal.Animal], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 86f10f194d6..2282ada70b0 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -103,8 +103,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import parent_pet AllOf = typing.Tuple[ typing.Type[parent_pet.ParentPet], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py index 6227adce43b..477e26912c6 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -10,11 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -_Class: typing_extensions.TypeAlias = schemas.StrSchema +Class: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { - "_class": typing.Type[_Class], + "_class": typing.Type[Class], } ) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index ab0aaab9312..1adce2057b2 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -158,8 +158,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import quadrilateral_interface AllOf = typing.Tuple[ typing.Type[quadrilateral_interface.QuadrilateralInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 04a2d0d4f4f..8b54ef95053 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -105,9 +105,6 @@ class _6( pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^2020.*' # noqa: E501 ) - -from petstore_api.components.schema import animal -from petstore_api.components.schema import number_with_validations OneOf = typing.Tuple[ typing.Type[number_with_validations.NumberWithValidations], typing.Type[animal.Animal], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/client/petstore/python/src/petstore_api/components/schema/dog.py index 5b082a354d2..796b03a5296 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -103,8 +103,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import animal AllOf = typing.Tuple[ typing.Type[animal.Animal], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 24d9116ab24..1028fbe1f55 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -158,8 +158,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py index 700d407ecec..440c0fec2a5 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -53,7 +53,7 @@ class Number( @dataclasses.dataclass(frozen=True) -class _Float( +class Float( schemas.Float32Schema ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -201,7 +201,7 @@ class PatternWithDigitsAndDelimiter( "int32withValidations": typing.Type[Int32withValidations], "int64": typing.Type[Int64], "number": typing.Type[Number], - "float": typing.Type[_Float], + "float": typing.Type[Float], "float32": typing.Type[Float32], "double": typing.Type[Double], "float64": typing.Type[Float64], @@ -278,6 +278,11 @@ def __new__( int, schemas.Unset ] = schemas.unset, + float: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, float32: typing.Union[ int, float, @@ -350,6 +355,7 @@ def __new__( ("int32", int32), ("int32withValidations", int32withValidations), ("int64", int64), + ("float", float), ("float32", float32), ("double", double), ("float64", float64), @@ -448,6 +454,16 @@ def int64(self) -> typing.Union[int, schemas.Unset]: val ) + @property + def float(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + @property def float32(self) -> typing.Union[int, float, schemas.Unset]: val = self.get("float32", schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py index 368f7f1857e..83a263c61b9 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -72,9 +72,6 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) FruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - -from petstore_api.components.schema import apple -from petstore_api.components.schema import banana OneOf = typing.Tuple[ typing.Type[apple.Apple], typing.Type[banana.Banana], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 09cccde5e45..b60c7051cea 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -11,9 +11,6 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] _0: typing_extensions.TypeAlias = schemas.NoneSchema - -from petstore_api.components.schema import apple_req -from petstore_api.components.schema import banana_req OneOf = typing.Tuple[ typing.Type[_0], typing.Type[apple_req.AppleReq], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index fa6efa80e25..febe8cc25cd 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -72,9 +72,6 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) GmFruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - -from petstore_api.components.schema import apple -from petstore_api.components.schema import banana AnyOf = typing.Tuple[ typing.Type[apple.Apple], typing.Type[banana.Banana], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 1160964736a..e881d030b41 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -158,8 +158,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index bf294f2501a..0e71d4294ac 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -10,10 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from petstore_api.components.schema import json_patch_request_add_replace_test -from petstore_api.components.schema import json_patch_request_move_copy -from petstore_api.components.schema import json_patch_request_remove OneOf = typing.Tuple[ typing.Type[json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest], typing.Type[json_patch_request_remove.JSONPatchRequestRemove], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 88517c1749b..13ac497198d 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -11,7 +11,7 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -_From: typing_extensions.TypeAlias = schemas.StrSchema +From: typing_extensions.TypeAlias = schemas.StrSchema Path: typing_extensions.TypeAlias = schemas.StrSchema @@ -84,7 +84,7 @@ def validate( Properties = typing.TypedDict( 'Properties', { - "from": typing.Type[_From], + "from": typing.Type[From], "path": typing.Type[Path], "op": typing.Type[Op], } @@ -104,6 +104,7 @@ class JSONPatchRequestMoveCopyDict(schemas.immutabledict[str, str]): def __new__( cls, *, + from: str, op: typing.Literal[ "move", "copy" @@ -112,6 +113,7 @@ def __new__( configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = { + "from": from, "op": op, "path": path, } @@ -128,6 +130,10 @@ def from_dict_( ) -> JSONPatchRequestMoveCopyDict: return JSONPatchRequestMoveCopy.validate(arg, configuration=configuration) + @property + def from(self) -> str: + return self.__getitem__("from") + @property def op(self) -> typing.Literal["move", "copy"]: return typing.cast( diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/client/petstore/python/src/petstore_api/components/schema/name.py index ae1fd324f03..f4c09377735 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/name.py @@ -12,13 +12,13 @@ Name2: typing_extensions.TypeAlias = schemas.Int32Schema SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema -_Property: typing_extensions.TypeAlias = schemas.StrSchema +Property: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { "name": typing.Type[Name2], "snake_case": typing.Type[SnakeCase], - "property": typing.Type[_Property], + "property": typing.Type[Property], } ) @@ -41,6 +41,10 @@ def __new__( int, schemas.Unset ] = schemas.unset, + property: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): @@ -49,6 +53,7 @@ def __new__( } for key_, val in ( ("snake_case", snake_case), + ("property", property), ): if isinstance(val, schemas.Unset): continue @@ -84,6 +89,16 @@ def snake_case(self) -> typing.Union[int, schemas.Unset]: val ) + @property + def property(self) -> typing.Union[str, schemas.Unset]: + val = self.get("property", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 2862a7f6282..270629b4219 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -11,9 +11,6 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] _2: typing_extensions.TypeAlias = schemas.NoneSchema - -from petstore_api.components.schema import quadrilateral -from petstore_api.components.schema import triangle OneOf = typing.Tuple[ typing.Type[triangle.Triangle], typing.Type[quadrilateral.Quadrilateral], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 0f7123417ed..5ad17229b93 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -62,8 +62,6 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) ObjWithRequiredPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - -from petstore_api.components.schema import obj_with_required_props_base AllOf = typing.Tuple[ typing.Type[obj_with_required_props_base.ObjWithRequiredPropsBase], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 3d8a9445522..e92a874ebd5 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -117,8 +117,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import object_with_optional_test_prop AllOf = typing.Tuple[ typing.Type[object_with_optional_test_prop.ObjectWithOptionalTestProp], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 96717a68915..93f6b20ee10 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -34,10 +34,15 @@ class ObjectWithInvalidNamedRefedPropertiesDict(schemas.immutabledict[str, schem def __new__( cls, *, + from: typing.Union[ + from_schema.FromSchemaDictInput, + from_schema.FromSchemaDict, + ], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): arg_: typing.Dict[str, typing.Any] = { + "from": from, } arg_.update(kwargs) used_arg_ = typing.cast(ObjectWithInvalidNamedRefedPropertiesDictInput, arg_) @@ -53,6 +58,13 @@ def from_dict_( ) -> ObjectWithInvalidNamedRefedPropertiesDict: return ObjectWithInvalidNamedRefedProperties.validate(arg, configuration=configuration) + @property + def from(self) -> from_schema.FromSchemaDict: + return typing.cast( + from_schema.FromSchemaDict, + self.__getitem__("from") + ) + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index c6ce3983b33..62c60170c1c 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -12,7 +12,6 @@ from petstore_api.components.schema import child_cat -from petstore_api.components.schema import grandparent_animal AllOf = typing.Tuple[ typing.Type[grandparent_animal.GrandparentAnimal], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/return.py b/samples/client/petstore/python/src/petstore_api/components/schema/return.py new file mode 100644 index 00000000000..f88ba0894b0 --- /dev/null +++ b/samples/client/petstore/python/src/petstore_api/components/schema/return.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. # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator +""" + +from __future__ import annotations +from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +Return2: typing_extensions.TypeAlias = schemas.Int32Schema +Properties = typing.TypedDict( + 'Properties', + { + "return": typing.Type[Return2], + } +) + + +class ReturnDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): + + __required_keys__: typing.FrozenSet[str] = frozenset({ + }) + __optional_keys__: typing.FrozenSet[str] = frozenset({ + "return", + }) + + def __new__( + cls, + *, + return: typing.Union[ + int, + schemas.Unset + ] = schemas.unset, + configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, + **kwargs: schemas.INPUT_TYPES_ALL, + ): + arg_: typing.Dict[str, typing.Any] = {} + for key_, val in ( + ("return", return), + ): + if isinstance(val, schemas.Unset): + continue + arg_[key_] = val + arg_.update(kwargs) + used_arg_ = typing.cast(ReturnDictInput, arg_) + return Return.validate(used_arg_, configuration=configuration_) + + @staticmethod + def from_dict_( + arg: typing.Union[ + ReturnDictInput, + ReturnDict + ], + configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None + ) -> ReturnDict: + return Return.validate(arg, configuration=configuration) + + @property + def return(self) -> typing.Union[int, schemas.Unset]: + val = self.get("return", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + int, + val + ) + + def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: + schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) + return self.get(name, schemas.unset) +ReturnDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + + +@dataclasses.dataclass(frozen=True) +class Return( + schemas.AnyTypeSchema[ReturnDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], +): + """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. + Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator + + Do not edit the class manually. + + Model for testing reserved words + """ + # any type + properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore + type_to_output_cls: typing.Mapping[ + typing.Type, + typing.Type + ] = dataclasses.field( + default_factory=lambda: { + schemas.immutabledict: ReturnDict, + } + ) + diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 795839948d7..67d7ad2b678 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -158,8 +158,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 4e963b524c3..185b49039f7 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -158,8 +158,6 @@ def validate( configuration=configuration, ) - -from petstore_api.components.schema import quadrilateral_interface AllOf = typing.Tuple[ typing.Type[quadrilateral_interface.QuadrilateralInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py index f932790d932..f1802311809 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -10,8 +10,6 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -from petstore_api.components.schema import object_interface AllOf = typing.Tuple[ typing.Type[object_interface.ObjectInterface], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/client/petstore/python/src/petstore_api/components/schema/user.py index 1ec18d5a8a0..1868e365208 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/user.py @@ -56,7 +56,7 @@ def validate( ) AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema -_Not: typing_extensions.TypeAlias = schemas.NoneSchema +Not: typing_extensions.TypeAlias = schemas.NoneSchema @dataclasses.dataclass(frozen=True) @@ -64,7 +64,7 @@ class AnyTypeExceptNullProp( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore + not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema Properties = typing.TypedDict( diff --git a/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py b/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py index bb4af2063cf..df81ea92b61 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py +++ b/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py @@ -122,7 +122,7 @@ from petstore_api.components.schema.req_props_from_explicit_add_props import ReqPropsFromExplicitAddProps from petstore_api.components.schema.req_props_from_true_add_props import ReqPropsFromTrueAddProps from petstore_api.components.schema.req_props_from_unset_add_props import ReqPropsFromUnsetAddProps -from petstore_api.components.schema._return import _Return +from petstore_api.components.schema.return import Return from petstore_api.components.schema.scalene_triangle import ScaleneTriangle from petstore_api.components.schema.self_referencing_array_model import SelfReferencingArrayModel from petstore_api.components.schema.self_referencing_object_model import SelfReferencingObjectModel diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index fba8912dd7c..2672b34d10e 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -50,7 +50,7 @@ class Number( @dataclasses.dataclass(frozen=True) -class _Float( +class Float( schemas.Float32Schema ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -131,7 +131,7 @@ class Password( "int32": typing.Type[Int32], "int64": typing.Type[Int64], "number": typing.Type[Number], - "float": typing.Type[_Float], + "float": typing.Type[Float], "double": typing.Type[Double], "string": typing.Type[String], "pattern_without_delimiter": typing.Type[PatternWithoutDelimiter], @@ -191,6 +191,11 @@ def __new__( int, schemas.Unset ] = schemas.unset, + float: typing.Union[ + int, + float, + schemas.Unset + ] = schemas.unset, string: typing.Union[ str, schemas.Unset @@ -233,6 +238,7 @@ def __new__( ("integer", integer), ("int32", int32), ("int64", int64), + ("float", float), ("string", string), ("binary", binary), ("date", date), @@ -315,6 +321,16 @@ def int64(self) -> typing.Union[int, schemas.Unset]: val ) + @property + def float(self) -> typing.Union[int, float, schemas.Unset]: + val = self.get("float", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + typing.Union[int, float], + val + ) + @property def string(self) -> typing.Union[str, schemas.Unset]: val = self.get("string", schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py index c5ff4b4f1b9..439f40fd378 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py @@ -52,12 +52,17 @@ def __new__( str, schemas.Unset ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), ("Ab", Ab), + ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -94,6 +99,16 @@ def Ab(self) -> typing.Union[str, schemas.Unset]: str, val ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) CookieParametersDictInput = typing.TypedDict( 'CookieParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py index c0811f84bb5..fa1f5abfae9 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py @@ -45,11 +45,16 @@ def __new__( str, schemas.Unset ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), + ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -76,6 +81,16 @@ def aB(self) -> typing.Union[str, schemas.Unset]: str, val ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) HeaderParametersDictInput = typing.TypedDict( 'HeaderParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py index 4c338531011..4e83ff0a816 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py @@ -46,11 +46,13 @@ def __new__( *, Ab: str, aB: str, + self: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = { "Ab": Ab, "aB": aB, + "self": self, } used_arg_ = typing.cast(PathParametersDictInput, arg_) return PathParameters.validate(used_arg_, configuration=configuration_) @@ -78,6 +80,13 @@ def aB(self) -> str: str, self.__getitem__("aB") ) + + @property + def self(self) -> str: + return typing.cast( + str, + self.__getitem__("self") + ) PathParametersDictInput = typing.TypedDict( 'PathParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py index f3009762b0e..a6f98c151ad 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py @@ -52,12 +52,17 @@ def __new__( str, schemas.Unset ] = schemas.unset, + self: typing.Union[ + str, + schemas.Unset + ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), ("Ab", Ab), + ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -94,6 +99,16 @@ def Ab(self) -> typing.Union[str, schemas.Unset]: str, val ) + + @property + def self(self) -> typing.Union[str, schemas.Unset]: + val = self.get("self", schemas.unset) + if isinstance(val, schemas.Unset): + return val + return typing.cast( + str, + val + ) QueryParametersDictInput = typing.TypedDict( 'QueryParametersDictInput', { From 93fbd38a97490048253a6437c2b8b2217cdb0005 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 15:42:56 -0700 Subject: [PATCH 35/44] Samples regen with fixed java config file inputs --- .../java_3_0_3_unit_test.yaml | 2 +- .../java_3_1_0_unit_test.yaml | 2 +- samples/client/3_0_3_unit_test/java/README.md | 6 +- samples/client/3_0_3_unit_test/java/pom.xml | 4 +- .../java/.openapi-generator/FILES | 771 +++++++----------- samples/client/3_1_0_unit_test/java/README.md | 8 +- .../schemas/ASchemaGivenForPrefixitems.md | 6 +- .../AdditionalItemsAreAllowedByDefault.md | 4 +- ...AdditionalpropertiesAreAllowedByDefault.md | 6 +- .../AdditionalpropertiesCanExistByItself.md | 18 +- ...ionalpropertiesDoesNotLookInApplicators.md | 6 +- ...pertiesWithNullValuedInstanceProperties.md | 18 +- .../schemas/AdditionalpropertiesWithSchema.md | 22 +- .../java/docs/components/schemas/Allof.md | 6 +- .../schemas/AllofCombinedWithAnyofOneof.md | 2 +- .../components/schemas/AllofSimpleTypes.md | 2 +- .../components/schemas/AllofWithBaseSchema.md | 8 +- .../schemas/AllofWithOneEmptySchema.md | 4 +- .../schemas/AllofWithTheFirstEmptySchema.md | 6 +- .../schemas/AllofWithTheLastEmptySchema.md | 6 +- .../schemas/AllofWithTwoEmptySchemas.md | 6 +- .../java/docs/components/schemas/Anyof.md | 4 +- .../components/schemas/AnyofComplexTypes.md | 6 +- .../components/schemas/AnyofWithBaseSchema.md | 16 +- .../schemas/AnyofWithOneEmptySchema.md | 6 +- .../schemas/ArrayTypeMatchesArrays.md | 4 +- .../schemas/BooleanTypeMatchesBooleans.md | 4 +- .../java/docs/components/schemas/ByInt.md | 2 +- .../java/docs/components/schemas/ByNumber.md | 2 +- .../docs/components/schemas/BySmallNumber.md | 2 +- .../schemas/ConstNulCharactersInStrings.md | 2 +- .../schemas/ContainsKeywordValidation.md | 2 +- .../ContainsWithNullInstanceElements.md | 4 +- .../docs/components/schemas/DateFormat.md | 2 +- .../docs/components/schemas/DateTimeFormat.md | 2 +- ...chemasDependenciesWithEscapedCharacters.md | 2 +- ...sDependentSubschemaIncompatibleWithRoot.md | 22 +- .../DependentSchemasSingleDependency.md | 6 +- .../docs/components/schemas/DurationFormat.md | 2 +- .../docs/components/schemas/EmailFormat.md | 2 +- .../components/schemas/EmptyDependents.md | 2 +- .../schemas/EnumWith0DoesNotMatchFalse.md | 16 +- .../schemas/EnumWith1DoesNotMatchTrue.md | 16 +- .../schemas/EnumWithEscapedCharacters.md | 16 +- .../schemas/EnumWithFalseDoesNotMatch0.md | 16 +- .../schemas/EnumWithTrueDoesNotMatch1.md | 16 +- .../components/schemas/EnumsInProperties.md | 44 +- .../schemas/ExclusivemaximumValidation.md | 2 +- .../schemas/ExclusiveminimumValidation.md | 2 +- .../components/schemas/FloatDivisionInf.md | 16 +- .../components/schemas/ForbiddenProperty.md | 4 +- .../docs/components/schemas/HostnameFormat.md | 2 +- .../docs/components/schemas/IdnEmailFormat.md | 2 +- .../components/schemas/IdnHostnameFormat.md | 2 +- .../schemas/IfAndElseWithoutThen.md | 2 +- .../schemas/IfAndThenWithoutElse.md | 2 +- ...WhenSerializedKeywordProcessingSequence.md | 2 +- .../components/schemas/IgnoreElseWithoutIf.md | 2 +- .../schemas/IgnoreIfWithoutThenOrElse.md | 2 +- .../components/schemas/IgnoreThenWithoutIf.md | 2 +- .../schemas/IntegerTypeMatchesIntegers.md | 4 +- .../docs/components/schemas/Ipv4Format.md | 2 +- .../docs/components/schemas/Ipv6Format.md | 2 +- .../java/docs/components/schemas/IriFormat.md | 2 +- .../components/schemas/IriReferenceFormat.md | 2 +- .../docs/components/schemas/ItemsContains.md | 16 +- .../ItemsDoesNotLookInApplicatorsValidCase.md | 16 +- .../schemas/ItemsWithNullInstanceElements.md | 18 +- .../components/schemas/JsonPointerFormat.md | 2 +- .../MaxcontainsWithoutContainsIsIgnored.md | 2 +- .../components/schemas/MaximumValidation.md | 2 +- .../MaximumValidationWithUnsignedInteger.md | 2 +- .../components/schemas/MaxitemsValidation.md | 2 +- .../components/schemas/MaxlengthValidation.md | 2 +- .../Maxproperties0MeansTheObjectIsEmpty.md | 2 +- .../schemas/MaxpropertiesValidation.md | 2 +- .../MincontainsWithoutContainsIsIgnored.md | 2 +- .../components/schemas/MinimumValidation.md | 2 +- .../MinimumValidationWithSignedInteger.md | 2 +- .../components/schemas/MinitemsValidation.md | 2 +- .../components/schemas/MinlengthValidation.md | 2 +- .../schemas/MinpropertiesValidation.md | 2 +- .../schemas/MultipleDependentsRequired.md | 2 +- ...multaneousPatternpropertiesAreValidated.md | 4 +- .../MultipleTypesCanBeSpecifiedInAnArray.md | 16 +- .../NestedAllofToCheckValidationSemantics.md | 4 +- .../NestedAnyofToCheckValidationSemantics.md | 4 +- .../docs/components/schemas/NestedItems.md | 60 +- .../NestedOneofToCheckValidationSemantics.md | 4 +- ...NonAsciiPatternWithAdditionalproperties.md | 20 +- .../NonInterferenceAcrossCombinedSchemas.md | 2 +- .../java/docs/components/schemas/Not.md | 4 +- .../schemas/NotMoreComplexSchema.md | 18 +- .../components/schemas/NotMultipleTypes.md | 16 +- .../schemas/NulCharactersInStrings.md | 16 +- .../NullTypeMatchesOnlyTheNullObject.md | 4 +- .../schemas/NumberTypeMatchesNumbers.md | 4 +- .../schemas/ObjectPropertiesValidation.md | 6 +- .../schemas/ObjectTypeMatchesObjects.md | 4 +- .../java/docs/components/schemas/Oneof.md | 4 +- .../components/schemas/OneofComplexTypes.md | 6 +- .../components/schemas/OneofWithBaseSchema.md | 16 +- .../schemas/OneofWithEmptySchema.md | 6 +- .../components/schemas/OneofWithRequired.md | 2 +- .../schemas/PatternIsNotAnchored.md | 2 +- .../components/schemas/PatternValidation.md | 2 +- ...ertiesValidatesPropertiesMatchingARegex.md | 4 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- ...lidationAdjustsTheStartingIndexForItems.md | 20 +- .../PrefixitemsWithNullInstanceElements.md | 4 +- ...opertiesAdditionalpropertiesInteraction.md | 20 +- ...seNamesAreJavascriptObjectPropertyNames.md | 8 +- .../PropertiesWithEscapedCharacters.md | 14 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- .../PropertyNamedRefThatIsNotAReference.md | 4 +- .../schemas/PropertynamesValidation.md | 16 +- .../docs/components/schemas/RegexFormat.md | 2 +- ...NotAnchoredByDefaultAndAreCaseSensitive.md | 6 +- .../schemas/RelativeJsonPointerFormat.md | 2 +- .../schemas/RequiredDefaultValidation.md | 4 +- ...seNamesAreJavascriptObjectPropertyNames.md | 2 +- .../components/schemas/RequiredValidation.md | 6 +- .../schemas/RequiredWithEmptyArray.md | 4 +- .../schemas/RequiredWithEscapedCharacters.md | 2 +- .../schemas/SimpleEnumValidation.md | 16 +- .../components/schemas/SingleDependency.md | 2 +- .../schemas/SmallMultipleOfLargeInteger.md | 16 +- .../schemas/StringTypeMatchesStrings.md | 4 +- .../docs/components/schemas/TimeFormat.md | 2 +- .../schemas/TypeArrayObjectOrNull.md | 16 +- .../components/schemas/TypeArrayOrObject.md | 2 +- .../schemas/TypeAsArrayWithOneItem.md | 4 +- .../schemas/UnevaluateditemsAsSchema.md | 4 +- ...teditemsDependsOnMultipleNestedContains.md | 2 +- .../schemas/UnevaluateditemsWithItems.md | 20 +- ...nevaluateditemsWithNullInstanceElements.md | 4 +- ...tedpropertiesNotAffectedByPropertynames.md | 18 +- .../schemas/UnevaluatedpropertiesSchema.md | 16 +- ...pertiesWithAdjacentAdditionalproperties.md | 22 +- ...pertiesWithNullValuedInstanceProperties.md | 4 +- .../schemas/UniqueitemsFalseValidation.md | 2 +- .../UniqueitemsFalseWithAnArrayOfItems.md | 6 +- .../schemas/UniqueitemsValidation.md | 2 +- .../schemas/UniqueitemsWithAnArrayOfItems.md | 6 +- .../java/docs/components/schemas/UriFormat.md | 2 +- .../components/schemas/UriReferenceFormat.md | 2 +- .../components/schemas/UriTemplateFormat.md | 2 +- .../docs/components/schemas/UuidFormat.md | 2 +- .../ValidateAgainstCorrectBranchThenVsElse.md | 2 +- .../java/docs/servers/RootServer0.md | 2 +- samples/client/3_1_0_unit_test/java/pom.xml | 4 +- 151 files changed, 828 insertions(+), 971 deletions(-) diff --git a/bin/generate_samples_configs/java_3_0_3_unit_test.yaml b/bin/generate_samples_configs/java_3_0_3_unit_test.yaml index bdd4baf6ee9..fcf39643017 100644 --- a/bin/generate_samples_configs/java_3_0_3_unit_test.yaml +++ b/bin/generate_samples_configs/java_3_0_3_unit_test.yaml @@ -2,5 +2,5 @@ generatorName: java outputDir: samples/client/3_0_3_unit_test/java inputSpec: src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec_nopaths.yaml additionalProperties: - artifactId: petstore + artifactId: unit-test-api hideGenerationTimestamp: "true" \ No newline at end of file diff --git a/bin/generate_samples_configs/java_3_1_0_unit_test.yaml b/bin/generate_samples_configs/java_3_1_0_unit_test.yaml index 873e2514255..e171ce79a27 100644 --- a/bin/generate_samples_configs/java_3_1_0_unit_test.yaml +++ b/bin/generate_samples_configs/java_3_1_0_unit_test.yaml @@ -2,4 +2,4 @@ generatorName: java outputDir: samples/client/3_1_0_unit_test/java inputSpec: src/test/resources/3_1/unit_test_spec/3_1_0_unit_test_spec_nopaths.yaml additionalProperties: - packageName: unit_test_api + artifactId: unit-test-api diff --git a/samples/client/3_0_3_unit_test/java/README.md b/samples/client/3_0_3_unit_test/java/README.md index 181a1f40c9c..6d0d0cd6b04 100644 --- a/samples/client/3_0_3_unit_test/java/README.md +++ b/samples/client/3_0_3_unit_test/java/README.md @@ -1,4 +1,4 @@ -# petstore +# unit-test-api sample spec for testing openapi functionality, built from json schema tests for draft6 This Java package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: @@ -35,7 +35,7 @@ Add this dependency to your project's POM: ```xml org.openapijsonschematools - petstore + unit-test-api 0.0.1 compile @@ -51,7 +51,7 @@ mvn clean package Then manually install the following JARs: -- `target/petstore-0.0.1.jar` +- `target/unit-test-api-0.0.1.jar` - `target/lib/*.jar` diff --git a/samples/client/3_0_3_unit_test/java/pom.xml b/samples/client/3_0_3_unit_test/java/pom.xml index d67521577de..7bc3926409e 100644 --- a/samples/client/3_0_3_unit_test/java/pom.xml +++ b/samples/client/3_0_3_unit_test/java/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.openapijsonschematools - petstore + unit-test-api jar - petstore + unit-test-api 0.0.1 https://github.com/openapi-json-schema-tools/openapi-json-schema-generator OpenAPI Java diff --git a/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES b/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES index 8d6988f333a..e00760803ba 100644 --- a/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES +++ b/samples/client/3_1_0_unit_test/java/.openapi-generator/FILES @@ -145,460 +145,317 @@ docs/components/schemas/UuidFormat.md docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md docs/servers/RootServer0.md pom.xml -src/main/java/unit_test_api/RootServerInfo.java -src/main/java/unit_test_api/apiclient/ApiClient.java -src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java -src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java -src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java -src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java -src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java -src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java -src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java -src/main/java/unit_test_api/components/schemas/Allof.java -src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java -src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java -src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java -src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java -src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java -src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java -src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java -src/main/java/unit_test_api/components/schemas/Anyof.java -src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java -src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java -src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java -src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java -src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java -src/main/java/unit_test_api/components/schemas/ByInt.java -src/main/java/unit_test_api/components/schemas/ByNumber.java -src/main/java/unit_test_api/components/schemas/BySmallNumber.java -src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java -src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java -src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java -src/main/java/unit_test_api/components/schemas/DateFormat.java -src/main/java/unit_test_api/components/schemas/DateTimeFormat.java -src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java -src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java -src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java -src/main/java/unit_test_api/components/schemas/DurationFormat.java -src/main/java/unit_test_api/components/schemas/EmailFormat.java -src/main/java/unit_test_api/components/schemas/EmptyDependents.java -src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java -src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java -src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java -src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java -src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java -src/main/java/unit_test_api/components/schemas/EnumsInProperties.java -src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java -src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java -src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java -src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java -src/main/java/unit_test_api/components/schemas/HostnameFormat.java -src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java -src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java -src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java -src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java -src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java -src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java -src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java -src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java -src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java -src/main/java/unit_test_api/components/schemas/Ipv4Format.java -src/main/java/unit_test_api/components/schemas/Ipv6Format.java -src/main/java/unit_test_api/components/schemas/IriFormat.java -src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java -src/main/java/unit_test_api/components/schemas/ItemsContains.java -src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java -src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java -src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java -src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java -src/main/java/unit_test_api/components/schemas/MaximumValidation.java -src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java -src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java -src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java -src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java -src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java -src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java -src/main/java/unit_test_api/components/schemas/MinimumValidation.java -src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java -src/main/java/unit_test_api/components/schemas/MinitemsValidation.java -src/main/java/unit_test_api/components/schemas/MinlengthValidation.java -src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java -src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java -src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java -src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java -src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java -src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java -src/main/java/unit_test_api/components/schemas/NestedItems.java -src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java -src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java -src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java -src/main/java/unit_test_api/components/schemas/Not.java -src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java -src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java -src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java -src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java -src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java -src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java -src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java -src/main/java/unit_test_api/components/schemas/Oneof.java -src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java -src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java -src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java -src/main/java/unit_test_api/components/schemas/OneofWithRequired.java -src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java -src/main/java/unit_test_api/components/schemas/PatternValidation.java -src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java -src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java -src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java -src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java -src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java -src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java -src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java -src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java -src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java -src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java -src/main/java/unit_test_api/components/schemas/RegexFormat.java -src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java -src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java -src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java -src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java -src/main/java/unit_test_api/components/schemas/RequiredValidation.java -src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java -src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java -src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java -src/main/java/unit_test_api/components/schemas/SingleDependency.java -src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java -src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java -src/main/java/unit_test_api/components/schemas/TimeFormat.java -src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java -src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java -src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java -src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java -src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java -src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java -src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java -src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java -src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java -src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java -src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java -src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java -src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java -src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java -src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java -src/main/java/unit_test_api/components/schemas/UriFormat.java -src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java -src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java -src/main/java/unit_test_api/components/schemas/UuidFormat.java -src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java -src/main/java/unit_test_api/configurations/ApiConfiguration.java -src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java -src/main/java/unit_test_api/configurations/SchemaConfiguration.java -src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java -src/main/java/unit_test_api/contenttype/ContentTypeDetector.java -src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java -src/main/java/unit_test_api/exceptions/ApiException.java -src/main/java/unit_test_api/exceptions/BaseException.java -src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java -src/main/java/unit_test_api/exceptions/NotImplementedException.java -src/main/java/unit_test_api/exceptions/UnsetPropertyException.java -src/main/java/unit_test_api/exceptions/ValidationException.java -src/main/java/unit_test_api/header/ContentHeader.java -src/main/java/unit_test_api/header/Header.java -src/main/java/unit_test_api/header/HeaderBase.java -src/main/java/unit_test_api/header/PrefixSeparatorIterator.java -src/main/java/unit_test_api/header/Rfc6570Serializer.java -src/main/java/unit_test_api/header/SchemaHeader.java -src/main/java/unit_test_api/header/StyleSerializer.java -src/main/java/unit_test_api/mediatype/Encoding.java -src/main/java/unit_test_api/mediatype/MediaType.java -src/main/java/unit_test_api/parameter/ContentParameter.java -src/main/java/unit_test_api/parameter/CookieSerializer.java -src/main/java/unit_test_api/parameter/HeadersSerializer.java -src/main/java/unit_test_api/parameter/Parameter.java -src/main/java/unit_test_api/parameter/ParameterBase.java -src/main/java/unit_test_api/parameter/ParameterInType.java -src/main/java/unit_test_api/parameter/ParameterStyle.java -src/main/java/unit_test_api/parameter/PathSerializer.java -src/main/java/unit_test_api/parameter/QuerySerializer.java -src/main/java/unit_test_api/parameter/SchemaParameter.java -src/main/java/unit_test_api/requestbody/GenericRequestBody.java -src/main/java/unit_test_api/requestbody/RequestBodySerializer.java -src/main/java/unit_test_api/requestbody/SerializedRequestBody.java -src/main/java/unit_test_api/response/ApiResponse.java -src/main/java/unit_test_api/response/DeserializedHttpResponse.java -src/main/java/unit_test_api/response/HeadersDeserializer.java -src/main/java/unit_test_api/response/ResponseDeserializer.java -src/main/java/unit_test_api/response/ResponsesDeserializer.java -src/main/java/unit_test_api/restclient/RestClient.java -src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java -src/main/java/unit_test_api/schemas/BooleanJsonSchema.java -src/main/java/unit_test_api/schemas/DateJsonSchema.java -src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java -src/main/java/unit_test_api/schemas/DecimalJsonSchema.java -src/main/java/unit_test_api/schemas/DoubleJsonSchema.java -src/main/java/unit_test_api/schemas/FloatJsonSchema.java -src/main/java/unit_test_api/schemas/GenericBuilder.java -src/main/java/unit_test_api/schemas/Int32JsonSchema.java -src/main/java/unit_test_api/schemas/Int64JsonSchema.java -src/main/java/unit_test_api/schemas/IntJsonSchema.java -src/main/java/unit_test_api/schemas/ListJsonSchema.java -src/main/java/unit_test_api/schemas/MapJsonSchema.java -src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java -src/main/java/unit_test_api/schemas/NullJsonSchema.java -src/main/java/unit_test_api/schemas/NumberJsonSchema.java -src/main/java/unit_test_api/schemas/SetMaker.java -src/main/java/unit_test_api/schemas/StringJsonSchema.java -src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java -src/main/java/unit_test_api/schemas/UuidJsonSchema.java -src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/AllOfValidator.java -src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java -src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java -src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java -src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java -src/main/java/unit_test_api/schemas/validation/ConstValidator.java -src/main/java/unit_test_api/schemas/validation/ContainsValidator.java -src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java -src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java -src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java -src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java -src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java -src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java -src/main/java/unit_test_api/schemas/validation/ElseValidator.java -src/main/java/unit_test_api/schemas/validation/EnumValidator.java -src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java -src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java -src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java -src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java -src/main/java/unit_test_api/schemas/validation/FormatValidator.java -src/main/java/unit_test_api/schemas/validation/FrozenList.java -src/main/java/unit_test_api/schemas/validation/FrozenMap.java -src/main/java/unit_test_api/schemas/validation/IfValidator.java -src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java -src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java -src/main/java/unit_test_api/schemas/validation/ItemsValidator.java -src/main/java/unit_test_api/schemas/validation/JsonSchema.java -src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java -src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java -src/main/java/unit_test_api/schemas/validation/KeywordEntry.java -src/main/java/unit_test_api/schemas/validation/KeywordValidator.java -src/main/java/unit_test_api/schemas/validation/LengthValidator.java -src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java -src/main/java/unit_test_api/schemas/validation/LongValueMethod.java -src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/MapUtils.java -src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java -src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java -src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java -src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/MaximumValidator.java -src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java -src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java -src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java -src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/MinimumValidator.java -src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java -src/main/java/unit_test_api/schemas/validation/NotValidator.java -src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java -src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/NullValueMethod.java -src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/OneOfValidator.java -src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java -src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/PatternValidator.java -src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java -src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/PropertyEntry.java -src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java -src/main/java/unit_test_api/schemas/validation/RequiredValidator.java -src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java -src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java -src/main/java/unit_test_api/schemas/validation/StringValueMethod.java -src/main/java/unit_test_api/schemas/validation/ThenValidator.java -src/main/java/unit_test_api/schemas/validation/TypeValidator.java -src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java -src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java -src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java -src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java -src/main/java/unit_test_api/schemas/validation/ValidationData.java -src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java -src/main/java/unit_test_api/servers/RootServer0.java -src/main/java/unit_test_api/servers/Server.java -src/main/java/unit_test_api/servers/ServerProvider.java -src/main/java/unit_test_api/servers/ServerWithVariables.java -src/main/java/unit_test_api/servers/ServerWithoutVariables.java -src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java -src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java -src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java -src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java -src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java -src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java -src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java -src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java -src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java -src/test/java/unit_test_api/components/schemas/AllofTest.java -src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java -src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java -src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java -src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java -src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java -src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java -src/test/java/unit_test_api/components/schemas/AnyofTest.java -src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java -src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java -src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java -src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java -src/test/java/unit_test_api/components/schemas/ByIntTest.java -src/test/java/unit_test_api/components/schemas/ByNumberTest.java -src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java -src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java -src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java -src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java -src/test/java/unit_test_api/components/schemas/DateFormatTest.java -src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java -src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java -src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java -src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java -src/test/java/unit_test_api/components/schemas/DurationFormatTest.java -src/test/java/unit_test_api/components/schemas/EmailFormatTest.java -src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java -src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java -src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java -src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java -src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java -src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java -src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java -src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java -src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java -src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java -src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java -src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java -src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java -src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java -src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java -src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java -src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java -src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java -src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java -src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java -src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java -src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java -src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java -src/test/java/unit_test_api/components/schemas/IriFormatTest.java -src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java -src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java -src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java -src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java -src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java -src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java -src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java -src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java -src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java -src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java -src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java -src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java -src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java -src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java -src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java -src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java -src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java -src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java -src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java -src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java -src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java -src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java -src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java -src/test/java/unit_test_api/components/schemas/NestedItemsTest.java -src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java -src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java -src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java -src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java -src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java -src/test/java/unit_test_api/components/schemas/NotTest.java -src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java -src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java -src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java -src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java -src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java -src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java -src/test/java/unit_test_api/components/schemas/OneofTest.java -src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java -src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java -src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java -src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java -src/test/java/unit_test_api/components/schemas/PatternValidationTest.java -src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java -src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java -src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java -src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java -src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java -src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java -src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java -src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java -src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java -src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java -src/test/java/unit_test_api/components/schemas/RegexFormatTest.java -src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java -src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java -src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java -src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java -src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java -src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java -src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java -src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java -src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java -src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java -src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java -src/test/java/unit_test_api/components/schemas/TimeFormatTest.java -src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java -src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java -src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java -src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java -src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java -src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java -src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java -src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java -src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java -src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java -src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java -src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java -src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java -src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java -src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java -src/test/java/unit_test_api/components/schemas/UriFormatTest.java -src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java -src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java -src/test/java/unit_test_api/components/schemas/UuidFormatTest.java -src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java -src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java -src/test/java/unit_test_api/header/ContentHeaderTest.java -src/test/java/unit_test_api/header/SchemaHeaderTest.java -src/test/java/unit_test_api/parameter/CookieSerializerTest.java -src/test/java/unit_test_api/parameter/HeadersSerializerTest.java -src/test/java/unit_test_api/parameter/PathSerializerTest.java -src/test/java/unit_test_api/parameter/QuerySerializerTest.java -src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java -src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java -src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java -src/test/java/unit_test_api/response/ResponseDeserializerTest.java -src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java -src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java -src/test/java/unit_test_api/schemas/BooleanSchemaTest.java -src/test/java/unit_test_api/schemas/ListBuilderTest.java -src/test/java/unit_test_api/schemas/ListSchemaTest.java -src/test/java/unit_test_api/schemas/MapSchemaTest.java -src/test/java/unit_test_api/schemas/NullSchemaTest.java -src/test/java/unit_test_api/schemas/NumberSchemaTest.java -src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java -src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java -src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java -src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java -src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java -src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java -src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java -src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java -src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java -src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java +src/main/java/org/openapijsonschematools/client/RootServerInfo.java +src/main/java/org/openapijsonschematools/client/apiclient/ApiClient.java +src/main/java/org/openapijsonschematools/client/components/schemas/ASchemaGivenForPrefixitems.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalItemsAreAllowedByDefault.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesAreAllowedByDefault.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesCanExistByItself.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesWithSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofSimpleTypes.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/ArrayTypeMatchesArrays.java +src/main/java/org/openapijsonschematools/client/components/schemas/BooleanTypeMatchesBooleans.java +src/main/java/org/openapijsonschematools/client/components/schemas/ByInt.java +src/main/java/org/openapijsonschematools/client/components/schemas/ByNumber.java +src/main/java/org/openapijsonschematools/client/components/schemas/BySmallNumber.java +src/main/java/org/openapijsonschematools/client/components/schemas/ConstNulCharactersInStrings.java +src/main/java/org/openapijsonschematools/client/components/schemas/ContainsKeywordValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/ContainsWithNullInstanceElements.java +src/main/java/org/openapijsonschematools/client/components/schemas/DateFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/DateTimeFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java +src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java +src/main/java/org/openapijsonschematools/client/components/schemas/DependentSchemasSingleDependency.java +src/main/java/org/openapijsonschematools/client/components/schemas/DurationFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/EmailFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/EmptyDependents.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith0DoesNotMatchFalse.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumWith1DoesNotMatchTrue.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithEscapedCharacters.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithFalseDoesNotMatch0.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumWithTrueDoesNotMatch1.java +src/main/java/org/openapijsonschematools/client/components/schemas/EnumsInProperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/ExclusivemaximumValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/ExclusiveminimumValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/FloatDivisionInf.java +src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +src/main/java/org/openapijsonschematools/client/components/schemas/HostnameFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/IdnEmailFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/IdnHostnameFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java +src/main/java/org/openapijsonschematools/client/components/schemas/IfAndThenWithoutElse.java +src/main/java/org/openapijsonschematools/client/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java +src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java +src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreIfWithoutThenOrElse.java +src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreThenWithoutIf.java +src/main/java/org/openapijsonschematools/client/components/schemas/IntegerTypeMatchesIntegers.java +src/main/java/org/openapijsonschematools/client/components/schemas/Ipv4Format.java +src/main/java/org/openapijsonschematools/client/components/schemas/Ipv6Format.java +src/main/java/org/openapijsonschematools/client/components/schemas/IriFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/IriReferenceFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/ItemsContains.java +src/main/java/org/openapijsonschematools/client/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java +src/main/java/org/openapijsonschematools/client/components/schemas/ItemsWithNullInstanceElements.java +src/main/java/org/openapijsonschematools/client/components/schemas/JsonPointerFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaxcontainsWithoutContainsIsIgnored.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaximumValidationWithUnsignedInteger.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaxitemsValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaxlengthValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +src/main/java/org/openapijsonschematools/client/components/schemas/MaxpropertiesValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MincontainsWithoutContainsIsIgnored.java +src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MinimumValidationWithSignedInteger.java +src/main/java/org/openapijsonschematools/client/components/schemas/MinitemsValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MinlengthValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MinpropertiesValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/MultipleDependentsRequired.java +src/main/java/org/openapijsonschematools/client/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java +src/main/java/org/openapijsonschematools/client/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java +src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +src/main/java/org/openapijsonschematools/client/components/schemas/NestedItems.java +src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java +src/main/java/org/openapijsonschematools/client/components/schemas/NonAsciiPatternWithAdditionalproperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/NonInterferenceAcrossCombinedSchemas.java +src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/NotMultipleTypes.java +src/main/java/org/openapijsonschematools/client/components/schemas/NulCharactersInStrings.java +src/main/java/org/openapijsonschematools/client/components/schemas/NullTypeMatchesOnlyTheNullObject.java +src/main/java/org/openapijsonschematools/client/components/schemas/NumberTypeMatchesNumbers.java +src/main/java/org/openapijsonschematools/client/components/schemas/ObjectPropertiesValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/ObjectTypeMatchesObjects.java +src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +src/main/java/org/openapijsonschematools/client/components/schemas/PatternIsNotAnchored.java +src/main/java/org/openapijsonschematools/client/components/schemas/PatternValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java +src/main/java/org/openapijsonschematools/client/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java +src/main/java/org/openapijsonschematools/client/components/schemas/PrefixitemsWithNullInstanceElements.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithEscapedCharacters.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWithNullValuedInstanceProperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertyNamedRefThatIsNotAReference.java +src/main/java/org/openapijsonschematools/client/components/schemas/PropertynamesValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/RegexFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java +src/main/java/org/openapijsonschematools/client/components/schemas/RelativeJsonPointerFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/RequiredDefaultValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +src/main/java/org/openapijsonschematools/client/components/schemas/RequiredValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEmptyArray.java +src/main/java/org/openapijsonschematools/client/components/schemas/RequiredWithEscapedCharacters.java +src/main/java/org/openapijsonschematools/client/components/schemas/SimpleEnumValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/SingleDependency.java +src/main/java/org/openapijsonschematools/client/components/schemas/SmallMultipleOfLargeInteger.java +src/main/java/org/openapijsonschematools/client/components/schemas/StringTypeMatchesStrings.java +src/main/java/org/openapijsonschematools/client/components/schemas/TimeFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/TypeArrayObjectOrNull.java +src/main/java/org/openapijsonschematools/client/components/schemas/TypeArrayOrObject.java +src/main/java/org/openapijsonschematools/client/components/schemas/TypeAsArrayWithOneItem.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsAsSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsWithItems.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluateditemsWithNullInstanceElements.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesSchema.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java +src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java +src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsValidation.java +src/main/java/org/openapijsonschematools/client/components/schemas/UniqueitemsWithAnArrayOfItems.java +src/main/java/org/openapijsonschematools/client/components/schemas/UriFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/UriReferenceFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/UriTemplateFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/UuidFormat.java +src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java +src/main/java/org/openapijsonschematools/client/configurations/ApiConfiguration.java +src/main/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlags.java +src/main/java/org/openapijsonschematools/client/configurations/SchemaConfiguration.java +src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeDeserializer.java +src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeDetector.java +src/main/java/org/openapijsonschematools/client/contenttype/ContentTypeSerializer.java +src/main/java/org/openapijsonschematools/client/exceptions/ApiException.java +src/main/java/org/openapijsonschematools/client/exceptions/BaseException.java +src/main/java/org/openapijsonschematools/client/exceptions/InvalidAdditionalPropertyException.java +src/main/java/org/openapijsonschematools/client/exceptions/NotImplementedException.java +src/main/java/org/openapijsonschematools/client/exceptions/UnsetPropertyException.java +src/main/java/org/openapijsonschematools/client/exceptions/ValidationException.java +src/main/java/org/openapijsonschematools/client/header/ContentHeader.java +src/main/java/org/openapijsonschematools/client/header/Header.java +src/main/java/org/openapijsonschematools/client/header/HeaderBase.java +src/main/java/org/openapijsonschematools/client/header/PrefixSeparatorIterator.java +src/main/java/org/openapijsonschematools/client/header/Rfc6570Serializer.java +src/main/java/org/openapijsonschematools/client/header/SchemaHeader.java +src/main/java/org/openapijsonschematools/client/header/StyleSerializer.java +src/main/java/org/openapijsonschematools/client/mediatype/Encoding.java +src/main/java/org/openapijsonschematools/client/mediatype/MediaType.java +src/main/java/org/openapijsonschematools/client/parameter/ContentParameter.java +src/main/java/org/openapijsonschematools/client/parameter/CookieSerializer.java +src/main/java/org/openapijsonschematools/client/parameter/HeadersSerializer.java +src/main/java/org/openapijsonschematools/client/parameter/Parameter.java +src/main/java/org/openapijsonschematools/client/parameter/ParameterBase.java +src/main/java/org/openapijsonschematools/client/parameter/ParameterInType.java +src/main/java/org/openapijsonschematools/client/parameter/ParameterStyle.java +src/main/java/org/openapijsonschematools/client/parameter/PathSerializer.java +src/main/java/org/openapijsonschematools/client/parameter/QuerySerializer.java +src/main/java/org/openapijsonschematools/client/parameter/SchemaParameter.java +src/main/java/org/openapijsonschematools/client/requestbody/GenericRequestBody.java +src/main/java/org/openapijsonschematools/client/requestbody/RequestBodySerializer.java +src/main/java/org/openapijsonschematools/client/requestbody/SerializedRequestBody.java +src/main/java/org/openapijsonschematools/client/response/ApiResponse.java +src/main/java/org/openapijsonschematools/client/response/DeserializedHttpResponse.java +src/main/java/org/openapijsonschematools/client/response/HeadersDeserializer.java +src/main/java/org/openapijsonschematools/client/response/ResponseDeserializer.java +src/main/java/org/openapijsonschematools/client/response/ResponsesDeserializer.java +src/main/java/org/openapijsonschematools/client/restclient/RestClient.java +src/main/java/org/openapijsonschematools/client/schemas/AnyTypeJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/BooleanJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/DateJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/DateTimeJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/DecimalJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/DoubleJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/FloatJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/GenericBuilder.java +src/main/java/org/openapijsonschematools/client/schemas/Int32JsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/Int64JsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/IntJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/ListJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/MapJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/NotAnyTypeJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/NullJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/NumberJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/SetMaker.java +src/main/java/org/openapijsonschematools/client/schemas/StringJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/UnsetAddPropsSetter.java +src/main/java/org/openapijsonschematools/client/schemas/UuidJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/AllOfValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/AnyOfValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/BigDecimalValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/BooleanValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ConstValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ContainsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/CustomIsoparser.java +src/main/java/org/openapijsonschematools/client/schemas/validation/DefaultValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/DependentRequiredValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/DependentSchemasValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/DoubleEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/DoubleValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ElseValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/EnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ExclusiveMaximumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ExclusiveMinimumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/FloatEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/FloatValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/FormatValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenList.java +src/main/java/org/openapijsonschematools/client/schemas/validation/FrozenMap.java +src/main/java/org/openapijsonschematools/client/schemas/validation/IfValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/IntegerEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/IntegerValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaFactory.java +src/main/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaInfo.java +src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordEntry.java +src/main/java/org/openapijsonschematools/client/schemas/validation/KeywordValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/LengthValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ListSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/LongEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/LongValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MapSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MapUtils.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MaxContainsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MaxItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MaxLengthValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MaxPropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MaximumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MinContainsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MinItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MinLengthValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MinPropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MinimumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/MultipleOfValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/NotValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/NullEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/NullSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/NullValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/NumberSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/OneOfValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PathToSchemasMap.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PatternPropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PatternValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PrefixItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PropertyEntry.java +src/main/java/org/openapijsonschematools/client/schemas/validation/PropertyNamesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/RequiredValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/StringEnumValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/StringSchemaValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/StringValueMethod.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ThenValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/TypeValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/UnevaluatedItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/UnevaluatedPropertiesValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/UniqueItemsValidator.java +src/main/java/org/openapijsonschematools/client/schemas/validation/UnsetAnyTypeJsonSchema.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationData.java +src/main/java/org/openapijsonschematools/client/schemas/validation/ValidationMetadata.java +src/main/java/org/openapijsonschematools/client/servers/RootServer0.java +src/main/java/org/openapijsonschematools/client/servers/Server.java +src/main/java/org/openapijsonschematools/client/servers/ServerProvider.java +src/main/java/org/openapijsonschematools/client/servers/ServerWithVariables.java +src/main/java/org/openapijsonschematools/client/servers/ServerWithoutVariables.java +src/test/java/org/openapijsonschematools/client/configurations/JsonSchemaKeywordFlagsTest.java +src/test/java/org/openapijsonschematools/client/header/ContentHeaderTest.java +src/test/java/org/openapijsonschematools/client/header/SchemaHeaderTest.java +src/test/java/org/openapijsonschematools/client/parameter/CookieSerializerTest.java +src/test/java/org/openapijsonschematools/client/parameter/HeadersSerializerTest.java +src/test/java/org/openapijsonschematools/client/parameter/PathSerializerTest.java +src/test/java/org/openapijsonschematools/client/parameter/QuerySerializerTest.java +src/test/java/org/openapijsonschematools/client/parameter/SchemaNonQueryParameterTest.java +src/test/java/org/openapijsonschematools/client/parameter/SchemaQueryParameterTest.java +src/test/java/org/openapijsonschematools/client/requestbody/RequestBodySerializerTest.java +src/test/java/org/openapijsonschematools/client/response/ResponseDeserializerTest.java +src/test/java/org/openapijsonschematools/client/schemas/AnyTypeSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/ArrayTypeSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/BooleanSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/ListBuilderTest.java +src/test/java/org/openapijsonschematools/client/schemas/ListSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/MapSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/NullSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/NumberSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/ObjectTypeSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/RefBooleanSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/AdditionalPropertiesValidatorTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/CustomIsoparserTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/FormatValidatorTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/ItemsValidatorTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/JsonSchemaTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/PropertiesValidatorTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/RequiredValidatorTest.java +src/test/java/org/openapijsonschematools/client/schemas/validation/TypeValidatorTest.java diff --git a/samples/client/3_1_0_unit_test/java/README.md b/samples/client/3_1_0_unit_test/java/README.md index 0845d55bcb8..e14c9cfe8ec 100644 --- a/samples/client/3_1_0_unit_test/java/README.md +++ b/samples/client/3_1_0_unit_test/java/README.md @@ -1,4 +1,4 @@ -# +# unit-test-api sample spec for testing openapi functionality, built from json schema tests for draft2020-12 This Java package is automatically generated by the [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) project: @@ -35,7 +35,7 @@ Add this dependency to your project's POM: ```xml org.openapijsonschematools - + unit-test-api 0.0.1 compile @@ -51,7 +51,7 @@ mvn clean package Then manually install the following JARs: -- `target/-0.0.1.jar` +- `target/unit-test-api-0.0.1.jar` - `target/lib/*.jar` @@ -142,7 +142,7 @@ is stored as a string. ## Getting Started Please follow the [installation procedure](#installation) and then use the JsonSchema classes in -unit_test_api.components.schemas to validate input payloads and instances of validated Map and List +org.openapijsonschematools.client.components.schemas to validate input payloads and instances of validated Map and List output classes. Json schemas allow multiple types for one schema, so a schema's validate method can have allowed input and output types. diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md index 4ef6a85c8d6..4e7390d7215 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ASchemaGivenForPrefixitems.md @@ -1,5 +1,5 @@ # ASchemaGivenForPrefixitems -unit_test_api.components.schemas.ASchemaGivenForPrefixitems.java +org.openapijsonschematools.client.components.schemas.ASchemaGivenForPrefixitems.java public class ASchemaGivenForPrefixitems
          A class that contains necessary nested @@ -206,7 +206,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -241,7 +241,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md index 0c950234a79..05046febeb6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalItemsAreAllowedByDefault.md @@ -1,5 +1,5 @@ # AdditionalItemsAreAllowedByDefault -unit_test_api.components.schemas.AdditionalItemsAreAllowedByDefault.java +org.openapijsonschematools.client.components.schemas.AdditionalItemsAreAllowedByDefault.java public class AdditionalItemsAreAllowedByDefault
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md index 43742e47485..b7e5ca27e35 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesAreAllowedByDefault.md @@ -1,5 +1,5 @@ # AdditionalpropertiesAreAllowedByDefault -unit_test_api.components.schemas.AdditionalpropertiesAreAllowedByDefault.java +org.openapijsonschematools.client.components.schemas.AdditionalpropertiesAreAllowedByDefault.java public class AdditionalpropertiesAreAllowedByDefault
          A class that contains necessary nested @@ -363,7 +363,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -488,7 +488,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md index 9b110f82e71..4b4177aa3aa 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesCanExistByItself.md @@ -1,5 +1,5 @@ # AdditionalpropertiesCanExistByItself -unit_test_api.components.schemas.AdditionalpropertiesCanExistByItself.java +org.openapijsonschematools.client.components.schemas.AdditionalpropertiesCanExistByItself.java public class AdditionalpropertiesCanExistByItself
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.AdditionalpropertiesCanExistByItself; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesCanExistByItself; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md index da1c4d303c6..d76f03d1168 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.md @@ -1,5 +1,5 @@ # AdditionalpropertiesDoesNotLookInApplicators -unit_test_api.components.schemas.AdditionalpropertiesDoesNotLookInApplicators.java +org.openapijsonschematools.client.components.schemas.AdditionalpropertiesDoesNotLookInApplicators.java public class AdditionalpropertiesDoesNotLookInApplicators
          A class that contains necessary nested @@ -535,7 +535,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -570,7 +570,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md index f0cdca7009a..6695fe35a49 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties.java +org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties.java public class AdditionalpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithNullValuedInstanceProperties; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md index 815ef959e19..8cc723bb7e6 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AdditionalpropertiesWithSchema.md @@ -1,5 +1,5 @@ # AdditionalpropertiesWithSchema -unit_test_api.components.schemas.AdditionalpropertiesWithSchema.java +org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithSchema.java public class AdditionalpropertiesWithSchema
          A class that contains necessary nested @@ -69,13 +69,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.AdditionalpropertiesWithSchema; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.AdditionalpropertiesWithSchema; import java.util.Arrays; import java.util.List; @@ -278,7 +278,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -403,7 +403,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -438,7 +438,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md index 753e839ffd1..079e4fe18ca 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Allof.md @@ -1,5 +1,5 @@ # Allof -unit_test_api.components.schemas.Allof.java +org.openapijsonschematools.client.components.schemas.Allof.java public class Allof
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md index 649bd2d6673..8aa4f4859ce 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofCombinedWithAnyofOneof.md @@ -1,5 +1,5 @@ # AllofCombinedWithAnyofOneof -unit_test_api.components.schemas.AllofCombinedWithAnyofOneof.java +org.openapijsonschematools.client.components.schemas.AllofCombinedWithAnyofOneof.java public class AllofCombinedWithAnyofOneof
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md index 6e87c68ba67..6e506fe215a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofSimpleTypes.md @@ -1,5 +1,5 @@ # AllofSimpleTypes -unit_test_api.components.schemas.AllofSimpleTypes.java +org.openapijsonschematools.client.components.schemas.AllofSimpleTypes.java public class AllofSimpleTypes
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md index a75c46117e0..81125243a09 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithBaseSchema.md @@ -1,5 +1,5 @@ # AllofWithBaseSchema -unit_test_api.components.schemas.AllofWithBaseSchema.java +org.openapijsonschematools.client.components.schemas.AllofWithBaseSchema.java public class AllofWithBaseSchema
          A class that contains necessary nested @@ -288,7 +288,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -525,7 +525,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -762,7 +762,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md index 60227abeae2..353eef7b1a4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithOneEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithOneEmptySchema -unit_test_api.components.schemas.AllofWithOneEmptySchema.java +org.openapijsonschematools.client.components.schemas.AllofWithOneEmptySchema.java public class AllofWithOneEmptySchema
          A class that contains necessary nested @@ -294,7 +294,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md index d76896938ca..f4341590119 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheFirstEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithTheFirstEmptySchema -unit_test_api.components.schemas.AllofWithTheFirstEmptySchema.java +org.openapijsonschematools.client.components.schemas.AllofWithTheFirstEmptySchema.java public class AllofWithTheFirstEmptySchema
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md index 09febfa0056..6d626d52eb9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTheLastEmptySchema.md @@ -1,5 +1,5 @@ # AllofWithTheLastEmptySchema -unit_test_api.components.schemas.AllofWithTheLastEmptySchema.java +org.openapijsonschematools.client.components.schemas.AllofWithTheLastEmptySchema.java public class AllofWithTheLastEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md index 8513231195c..4875f70770c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AllofWithTwoEmptySchemas.md @@ -1,5 +1,5 @@ # AllofWithTwoEmptySchemas -unit_test_api.components.schemas.AllofWithTwoEmptySchemas.java +org.openapijsonschematools.client.components.schemas.AllofWithTwoEmptySchemas.java public class AllofWithTwoEmptySchemas
          A class that contains necessary nested @@ -302,7 +302,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -427,7 +427,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md index bd92dc52feb..316b94bb0d9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Anyof.md @@ -1,5 +1,5 @@ # Anyof -unit_test_api.components.schemas.Anyof.java +org.openapijsonschematools.client.components.schemas.Anyof.java public class Anyof
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md index c2bb5ab263a..9d0ee6763c9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofComplexTypes.md @@ -1,5 +1,5 @@ # AnyofComplexTypes -unit_test_api.components.schemas.AnyofComplexTypes.java +org.openapijsonschematools.client.components.schemas.AnyofComplexTypes.java public class AnyofComplexTypes
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md index cdb743b16b3..90d702e5191 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithBaseSchema.md @@ -1,5 +1,5 @@ # AnyofWithBaseSchema -unit_test_api.components.schemas.AnyofWithBaseSchema.java +org.openapijsonschematools.client.components.schemas.AnyofWithBaseSchema.java public class AnyofWithBaseSchema
          A class that contains necessary nested @@ -62,13 +62,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.AnyofWithBaseSchema; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.AnyofWithBaseSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md index f54f814aca9..863a2b98c1b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/AnyofWithOneEmptySchema.md @@ -1,5 +1,5 @@ # AnyofWithOneEmptySchema -unit_test_api.components.schemas.AnyofWithOneEmptySchema.java +org.openapijsonschematools.client.components.schemas.AnyofWithOneEmptySchema.java public class AnyofWithOneEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md index 304cdf0b483..a81c51803a8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ArrayTypeMatchesArrays.md @@ -1,5 +1,5 @@ # ArrayTypeMatchesArrays -unit_test_api.components.schemas.ArrayTypeMatchesArrays.java +org.openapijsonschematools.client.components.schemas.ArrayTypeMatchesArrays.java public class ArrayTypeMatchesArrays
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends ListJsonSchema.ListJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.ListJsonSchema.ListJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.ListJsonSchema.ListJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md index 792ac41e5ab..96a41c9abfc 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BooleanTypeMatchesBooleans.md @@ -1,5 +1,5 @@ # BooleanTypeMatchesBooleans -unit_test_api.components.schemas.BooleanTypeMatchesBooleans.java +org.openapijsonschematools.client.components.schemas.BooleanTypeMatchesBooleans.java public class BooleanTypeMatchesBooleans
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md index 641497f5f07..a403f2e86af 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByInt.md @@ -1,5 +1,5 @@ # ByInt -unit_test_api.components.schemas.ByInt.java +org.openapijsonschematools.client.components.schemas.ByInt.java public class ByInt
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md index a59346ab71a..18757b1d71f 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ByNumber.md @@ -1,5 +1,5 @@ # ByNumber -unit_test_api.components.schemas.ByNumber.java +org.openapijsonschematools.client.components.schemas.ByNumber.java public class ByNumber
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md index 1662e93d9d3..db570d6827a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/BySmallNumber.md @@ -1,5 +1,5 @@ # BySmallNumber -unit_test_api.components.schemas.BySmallNumber.java +org.openapijsonschematools.client.components.schemas.BySmallNumber.java public class BySmallNumber
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md index dedb518e1f3..e406aa2b1d1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ConstNulCharactersInStrings.md @@ -1,5 +1,5 @@ # ConstNulCharactersInStrings -unit_test_api.components.schemas.ConstNulCharactersInStrings.java +org.openapijsonschematools.client.components.schemas.ConstNulCharactersInStrings.java public class ConstNulCharactersInStrings
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md index a7053ba88b8..939c4213f16 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsKeywordValidation.md @@ -1,5 +1,5 @@ # ContainsKeywordValidation -unit_test_api.components.schemas.ContainsKeywordValidation.java +org.openapijsonschematools.client.components.schemas.ContainsKeywordValidation.java public class ContainsKeywordValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md index adb32bfe538..ff7b6e33b02 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ContainsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # ContainsWithNullInstanceElements -unit_test_api.components.schemas.ContainsWithNullInstanceElements.java +org.openapijsonschematools.client.components.schemas.ContainsWithNullInstanceElements.java public class ContainsWithNullInstanceElements
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md index 7ad1c8521f5..8e7001d5b91 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateFormat.md @@ -1,5 +1,5 @@ # DateFormat -unit_test_api.components.schemas.DateFormat.java +org.openapijsonschematools.client.components.schemas.DateFormat.java public class DateFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md index dedfc63e009..dc179875fd1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DateTimeFormat.md @@ -1,5 +1,5 @@ # DateTimeFormat -unit_test_api.components.schemas.DateTimeFormat.java +org.openapijsonschematools.client.components.schemas.DateTimeFormat.java public class DateTimeFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md index e26993eaecb..d1ec58ee656 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.md @@ -1,5 +1,5 @@ # DependentSchemasDependenciesWithEscapedCharacters -unit_test_api.components.schemas.DependentSchemasDependenciesWithEscapedCharacters.java +org.openapijsonschematools.client.components.schemas.DependentSchemasDependenciesWithEscapedCharacters.java public class DependentSchemasDependenciesWithEscapedCharacters
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md index 0566b2cf794..b2cb24f5ce9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.md @@ -1,5 +1,5 @@ # DependentSchemasDependentSubschemaIncompatibleWithRoot -unit_test_api.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot.java +org.openapijsonschematools.client.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot.java public class DependentSchemasDependentSubschemaIncompatibleWithRoot
          A class that contains necessary nested @@ -367,7 +367,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -404,13 +404,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.DependentSchemasDependentSubschemaIncompatibleWithRoot; import java.util.Arrays; import java.util.List; @@ -599,7 +599,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -724,7 +724,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md index f8819337c12..89850d5e1b3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DependentSchemasSingleDependency.md @@ -1,5 +1,5 @@ # DependentSchemasSingleDependency -unit_test_api.components.schemas.DependentSchemasSingleDependency.java +org.openapijsonschematools.client.components.schemas.DependentSchemasSingleDependency.java public class DependentSchemasSingleDependency
          A class that contains necessary nested @@ -408,7 +408,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -443,7 +443,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md index edb5b87329c..9c74f82ceda 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/DurationFormat.md @@ -1,5 +1,5 @@ # DurationFormat -unit_test_api.components.schemas.DurationFormat.java +org.openapijsonschematools.client.components.schemas.DurationFormat.java public class DurationFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md index f8854e93d2b..b3448fb331a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmailFormat.md @@ -1,5 +1,5 @@ # EmailFormat -unit_test_api.components.schemas.EmailFormat.java +org.openapijsonschematools.client.components.schemas.EmailFormat.java public class EmailFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md index fdc9605acfa..61fd3611c08 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EmptyDependents.md @@ -1,5 +1,5 @@ # EmptyDependents -unit_test_api.components.schemas.EmptyDependents.java +org.openapijsonschematools.client.components.schemas.EmptyDependents.java public class EmptyDependents
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md index 12cfbc2ae4e..40344018d18 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith0DoesNotMatchFalse.md @@ -1,5 +1,5 @@ # EnumWith0DoesNotMatchFalse -unit_test_api.components.schemas.EnumWith0DoesNotMatchFalse.java +org.openapijsonschematools.client.components.schemas.EnumWith0DoesNotMatchFalse.java public class EnumWith0DoesNotMatchFalse
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumWith0DoesNotMatchFalse; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumWith0DoesNotMatchFalse; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md index 13e67fc2bd3..c8b731041b0 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWith1DoesNotMatchTrue.md @@ -1,5 +1,5 @@ # EnumWith1DoesNotMatchTrue -unit_test_api.components.schemas.EnumWith1DoesNotMatchTrue.java +org.openapijsonschematools.client.components.schemas.EnumWith1DoesNotMatchTrue.java public class EnumWith1DoesNotMatchTrue
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumWith1DoesNotMatchTrue; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumWith1DoesNotMatchTrue; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md index 938983886ad..633a79af9af 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithEscapedCharacters.md @@ -1,5 +1,5 @@ # EnumWithEscapedCharacters -unit_test_api.components.schemas.EnumWithEscapedCharacters.java +org.openapijsonschematools.client.components.schemas.EnumWithEscapedCharacters.java public class EnumWithEscapedCharacters
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumWithEscapedCharacters; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumWithEscapedCharacters; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md index 1caa8ee0250..dfbab8589b3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithFalseDoesNotMatch0.md @@ -1,5 +1,5 @@ # EnumWithFalseDoesNotMatch0 -unit_test_api.components.schemas.EnumWithFalseDoesNotMatch0.java +org.openapijsonschematools.client.components.schemas.EnumWithFalseDoesNotMatch0.java public class EnumWithFalseDoesNotMatch0
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumWithFalseDoesNotMatch0; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumWithFalseDoesNotMatch0; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md index c1d6de1a711..d5060d82ffb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumWithTrueDoesNotMatch1.md @@ -1,5 +1,5 @@ # EnumWithTrueDoesNotMatch1 -unit_test_api.components.schemas.EnumWithTrueDoesNotMatch1.java +org.openapijsonschematools.client.components.schemas.EnumWithTrueDoesNotMatch1.java public class EnumWithTrueDoesNotMatch1
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumWithTrueDoesNotMatch1; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumWithTrueDoesNotMatch1; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md index 6b2495212af..d8817265151 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/EnumsInProperties.md @@ -1,5 +1,5 @@ # EnumsInProperties -unit_test_api.components.schemas.EnumsInProperties.java +org.openapijsonschematools.client.components.schemas.EnumsInProperties.java public class EnumsInProperties
          A class that contains necessary nested @@ -59,13 +59,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumsInProperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; @@ -191,13 +191,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumsInProperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; @@ -270,13 +270,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.EnumsInProperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.EnumsInProperties; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md index fba825f7cff..ca6f30db8cb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusivemaximumValidation.md @@ -1,5 +1,5 @@ # ExclusivemaximumValidation -unit_test_api.components.schemas.ExclusivemaximumValidation.java +org.openapijsonschematools.client.components.schemas.ExclusivemaximumValidation.java public class ExclusivemaximumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md index 58f2f9a69ca..e9c2e63c0af 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ExclusiveminimumValidation.md @@ -1,5 +1,5 @@ # ExclusiveminimumValidation -unit_test_api.components.schemas.ExclusiveminimumValidation.java +org.openapijsonschematools.client.components.schemas.ExclusiveminimumValidation.java public class ExclusiveminimumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md index 0370dfb1b14..3c961a255fc 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/FloatDivisionInf.md @@ -1,5 +1,5 @@ # FloatDivisionInf -unit_test_api.components.schemas.FloatDivisionInf.java +org.openapijsonschematools.client.components.schemas.FloatDivisionInf.java public class FloatDivisionInf
          A class that contains necessary nested @@ -46,13 +46,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.FloatDivisionInf; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.FloatDivisionInf; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md index 5a09febeb6a..a0b819b97ca 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ForbiddenProperty.md @@ -1,5 +1,5 @@ # ForbiddenProperty -unit_test_api.components.schemas.ForbiddenProperty.java +org.openapijsonschematools.client.components.schemas.ForbiddenProperty.java public class ForbiddenProperty
          A class that contains necessary nested @@ -500,7 +500,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md index ec578b68951..085ff0c08a1 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/HostnameFormat.md @@ -1,5 +1,5 @@ # HostnameFormat -unit_test_api.components.schemas.HostnameFormat.java +org.openapijsonschematools.client.components.schemas.HostnameFormat.java public class HostnameFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md index efd774890dd..0b756db3627 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnEmailFormat.md @@ -1,5 +1,5 @@ # IdnEmailFormat -unit_test_api.components.schemas.IdnEmailFormat.java +org.openapijsonschematools.client.components.schemas.IdnEmailFormat.java public class IdnEmailFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md index bc9f5486850..046d158dc78 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IdnHostnameFormat.md @@ -1,5 +1,5 @@ # IdnHostnameFormat -unit_test_api.components.schemas.IdnHostnameFormat.java +org.openapijsonschematools.client.components.schemas.IdnHostnameFormat.java public class IdnHostnameFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md index 572667636c8..23bad84b6e8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md @@ -1,5 +1,5 @@ # IfAndElseWithoutThen -unit_test_api.components.schemas.IfAndElseWithoutThen.java +org.openapijsonschematools.client.components.schemas.IfAndElseWithoutThen.java public class IfAndElseWithoutThen
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md index 0b9d1b5dd5c..30168d5f831 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md @@ -1,5 +1,5 @@ # IfAndThenWithoutElse -unit_test_api.components.schemas.IfAndThenWithoutElse.java +org.openapijsonschematools.client.components.schemas.IfAndThenWithoutElse.java public class IfAndThenWithoutElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md index 13f8945cce9..cf769cf4aa2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md @@ -1,5 +1,5 @@ # IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence -unit_test_api.components.schemas.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java +org.openapijsonschematools.client.components.schemas.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md index 00704723e95..242395210ce 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md @@ -1,5 +1,5 @@ # IgnoreElseWithoutIf -unit_test_api.components.schemas.IgnoreElseWithoutIf.java +org.openapijsonschematools.client.components.schemas.IgnoreElseWithoutIf.java public class IgnoreElseWithoutIf
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md index ea600d96557..7a3b61ef811 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md @@ -1,5 +1,5 @@ # IgnoreIfWithoutThenOrElse -unit_test_api.components.schemas.IgnoreIfWithoutThenOrElse.java +org.openapijsonschematools.client.components.schemas.IgnoreIfWithoutThenOrElse.java public class IgnoreIfWithoutThenOrElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md index 9179e78a9cf..22c93058573 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreThenWithoutIf.md @@ -1,5 +1,5 @@ # IgnoreThenWithoutIf -unit_test_api.components.schemas.IgnoreThenWithoutIf.java +org.openapijsonschematools.client.components.schemas.IgnoreThenWithoutIf.java public class IgnoreThenWithoutIf
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md index 99ca2b2708c..1e84368f22a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IntegerTypeMatchesIntegers.md @@ -1,5 +1,5 @@ # IntegerTypeMatchesIntegers -unit_test_api.components.schemas.IntegerTypeMatchesIntegers.java +org.openapijsonschematools.client.components.schemas.IntegerTypeMatchesIntegers.java public class IntegerTypeMatchesIntegers
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md index a97f33672a6..fc4821b8b70 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv4Format.md @@ -1,5 +1,5 @@ # Ipv4Format -unit_test_api.components.schemas.Ipv4Format.java +org.openapijsonschematools.client.components.schemas.Ipv4Format.java public class Ipv4Format
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md index 0759a0f3407..b7e6fa306b8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Ipv6Format.md @@ -1,5 +1,5 @@ # Ipv6Format -unit_test_api.components.schemas.Ipv6Format.java +org.openapijsonschematools.client.components.schemas.Ipv6Format.java public class Ipv6Format
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md index fe0477d22e0..2a8f1ba9564 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriFormat.md @@ -1,5 +1,5 @@ # IriFormat -unit_test_api.components.schemas.IriFormat.java +org.openapijsonschematools.client.components.schemas.IriFormat.java public class IriFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md index d8ec145cc95..d7d17b32f51 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IriReferenceFormat.md @@ -1,5 +1,5 @@ # IriReferenceFormat -unit_test_api.components.schemas.IriReferenceFormat.java +org.openapijsonschematools.client.components.schemas.IriReferenceFormat.java public class IriReferenceFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md index e4838689e31..ce3c0ad26f3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsContains.md @@ -1,5 +1,5 @@ # ItemsContains -unit_test_api.components.schemas.ItemsContains.java +org.openapijsonschematools.client.components.schemas.ItemsContains.java public class ItemsContains
          A class that contains necessary nested @@ -66,13 +66,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.ItemsContains; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.ItemsContains; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md index 7e3a8d63046..70b39df59f3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.md @@ -1,5 +1,5 @@ # ItemsDoesNotLookInApplicatorsValidCase -unit_test_api.components.schemas.ItemsDoesNotLookInApplicatorsValidCase.java +org.openapijsonschematools.client.components.schemas.ItemsDoesNotLookInApplicatorsValidCase.java public class ItemsDoesNotLookInApplicatorsValidCase
          A class that contains necessary nested @@ -58,13 +58,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.ItemsDoesNotLookInApplicatorsValidCase; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.ItemsDoesNotLookInApplicatorsValidCase; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md index 4a418dc3a94..e0801cd8a5a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ItemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # ItemsWithNullInstanceElements -unit_test_api.components.schemas.ItemsWithNullInstanceElements.java +org.openapijsonschematools.client.components.schemas.ItemsWithNullInstanceElements.java public class ItemsWithNullInstanceElements
          A class that contains necessary nested @@ -53,13 +53,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.ItemsWithNullInstanceElements; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.ItemsWithNullInstanceElements; import java.util.Arrays; import java.util.List; @@ -151,7 +151,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md index cb265c809d9..65c23c09e6c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/JsonPointerFormat.md @@ -1,5 +1,5 @@ # JsonPointerFormat -unit_test_api.components.schemas.JsonPointerFormat.java +org.openapijsonschematools.client.components.schemas.JsonPointerFormat.java public class JsonPointerFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md index 3a2f3946d2c..34f9ac593c7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxcontainsWithoutContainsIsIgnored.md @@ -1,5 +1,5 @@ # MaxcontainsWithoutContainsIsIgnored -unit_test_api.components.schemas.MaxcontainsWithoutContainsIsIgnored.java +org.openapijsonschematools.client.components.schemas.MaxcontainsWithoutContainsIsIgnored.java public class MaxcontainsWithoutContainsIsIgnored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md index 55ccc37adb1..ea90b82fd0b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidation.md @@ -1,5 +1,5 @@ # MaximumValidation -unit_test_api.components.schemas.MaximumValidation.java +org.openapijsonschematools.client.components.schemas.MaximumValidation.java public class MaximumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md index 0d3c9e0ea62..319d16fd33e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaximumValidationWithUnsignedInteger.md @@ -1,5 +1,5 @@ # MaximumValidationWithUnsignedInteger -unit_test_api.components.schemas.MaximumValidationWithUnsignedInteger.java +org.openapijsonschematools.client.components.schemas.MaximumValidationWithUnsignedInteger.java public class MaximumValidationWithUnsignedInteger
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md index 19fd08cb032..1fd4640fa8a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxitemsValidation.md @@ -1,5 +1,5 @@ # MaxitemsValidation -unit_test_api.components.schemas.MaxitemsValidation.java +org.openapijsonschematools.client.components.schemas.MaxitemsValidation.java public class MaxitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md index c9a3645e921..e828355331e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxlengthValidation.md @@ -1,5 +1,5 @@ # MaxlengthValidation -unit_test_api.components.schemas.MaxlengthValidation.java +org.openapijsonschematools.client.components.schemas.MaxlengthValidation.java public class MaxlengthValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md index f75e42f9c2e..0f8c895fdcd 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Maxproperties0MeansTheObjectIsEmpty.md @@ -1,5 +1,5 @@ # Maxproperties0MeansTheObjectIsEmpty -unit_test_api.components.schemas.Maxproperties0MeansTheObjectIsEmpty.java +org.openapijsonschematools.client.components.schemas.Maxproperties0MeansTheObjectIsEmpty.java public class Maxproperties0MeansTheObjectIsEmpty
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md index 2b7d6be86e9..0ee228096d5 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MaxpropertiesValidation.md @@ -1,5 +1,5 @@ # MaxpropertiesValidation -unit_test_api.components.schemas.MaxpropertiesValidation.java +org.openapijsonschematools.client.components.schemas.MaxpropertiesValidation.java public class MaxpropertiesValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md index 0fa75c955e3..4bfad67b17b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MincontainsWithoutContainsIsIgnored.md @@ -1,5 +1,5 @@ # MincontainsWithoutContainsIsIgnored -unit_test_api.components.schemas.MincontainsWithoutContainsIsIgnored.java +org.openapijsonschematools.client.components.schemas.MincontainsWithoutContainsIsIgnored.java public class MincontainsWithoutContainsIsIgnored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md index 8042a55985c..26df31b73bd 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidation.md @@ -1,5 +1,5 @@ # MinimumValidation -unit_test_api.components.schemas.MinimumValidation.java +org.openapijsonschematools.client.components.schemas.MinimumValidation.java public class MinimumValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md index 1cabf4e36e9..8cf8b08f2a7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinimumValidationWithSignedInteger.md @@ -1,5 +1,5 @@ # MinimumValidationWithSignedInteger -unit_test_api.components.schemas.MinimumValidationWithSignedInteger.java +org.openapijsonschematools.client.components.schemas.MinimumValidationWithSignedInteger.java public class MinimumValidationWithSignedInteger
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md index c991619e956..0f8a46474b2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinitemsValidation.md @@ -1,5 +1,5 @@ # MinitemsValidation -unit_test_api.components.schemas.MinitemsValidation.java +org.openapijsonschematools.client.components.schemas.MinitemsValidation.java public class MinitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md index 664fb21bd9e..bf689a4ffa4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinlengthValidation.md @@ -1,5 +1,5 @@ # MinlengthValidation -unit_test_api.components.schemas.MinlengthValidation.java +org.openapijsonschematools.client.components.schemas.MinlengthValidation.java public class MinlengthValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md index 00ddf738001..43f7370e423 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MinpropertiesValidation.md @@ -1,5 +1,5 @@ # MinpropertiesValidation -unit_test_api.components.schemas.MinpropertiesValidation.java +org.openapijsonschematools.client.components.schemas.MinpropertiesValidation.java public class MinpropertiesValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md index 07e0e79b621..11eb2987149 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleDependentsRequired.md @@ -1,5 +1,5 @@ # MultipleDependentsRequired -unit_test_api.components.schemas.MultipleDependentsRequired.java +org.openapijsonschematools.client.components.schemas.MultipleDependentsRequired.java public class MultipleDependentsRequired
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md index de3eb9d4ce3..618e43d1420 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.md @@ -1,5 +1,5 @@ # MultipleSimultaneousPatternpropertiesAreValidated -unit_test_api.components.schemas.MultipleSimultaneousPatternpropertiesAreValidated.java +org.openapijsonschematools.client.components.schemas.MultipleSimultaneousPatternpropertiesAreValidated.java public class MultipleSimultaneousPatternpropertiesAreValidated
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md index f1437b08dad..06690dbdf66 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.md @@ -1,5 +1,5 @@ # MultipleTypesCanBeSpecifiedInAnArray -unit_test_api.components.schemas.MultipleTypesCanBeSpecifiedInAnArray.java +org.openapijsonschematools.client.components.schemas.MultipleTypesCanBeSpecifiedInAnArray.java public class MultipleTypesCanBeSpecifiedInAnArray
          A class that contains necessary nested @@ -65,13 +65,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.MultipleTypesCanBeSpecifiedInAnArray; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.MultipleTypesCanBeSpecifiedInAnArray; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md index 4326297da84..ebf65ca84c7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAllofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedAllofToCheckValidationSemantics -unit_test_api.components.schemas.NestedAllofToCheckValidationSemantics.java +org.openapijsonschematools.client.components.schemas.NestedAllofToCheckValidationSemantics.java public class NestedAllofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md index 3fc7ee694c9..dc2de71feb0 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedAnyofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedAnyofToCheckValidationSemantics -unit_test_api.components.schemas.NestedAnyofToCheckValidationSemantics.java +org.openapijsonschematools.client.components.schemas.NestedAnyofToCheckValidationSemantics.java public class NestedAnyofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md index 8c88cf74646..ad403371444 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedItems.md @@ -1,5 +1,5 @@ # NestedItems -unit_test_api.components.schemas.NestedItems.java +org.openapijsonschematools.client.components.schemas.NestedItems.java public class NestedItems
          A class that contains necessary nested @@ -68,13 +68,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NestedItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -175,13 +175,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NestedItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -280,13 +280,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NestedItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -383,13 +383,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NestedItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NestedItems; import java.util.Arrays; import java.util.List; @@ -484,7 +484,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md index 9344a3cd40e..ee3e1712834 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NestedOneofToCheckValidationSemantics.md @@ -1,5 +1,5 @@ # NestedOneofToCheckValidationSemantics -unit_test_api.components.schemas.NestedOneofToCheckValidationSemantics.java +org.openapijsonschematools.client.components.schemas.NestedOneofToCheckValidationSemantics.java public class NestedOneofToCheckValidationSemantics
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md index f988f39da3f..6a63f2af1d2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonAsciiPatternWithAdditionalproperties.md @@ -1,5 +1,5 @@ # NonAsciiPatternWithAdditionalproperties -unit_test_api.components.schemas.NonAsciiPatternWithAdditionalproperties.java +org.openapijsonschematools.client.components.schemas.NonAsciiPatternWithAdditionalproperties.java public class NonAsciiPatternWithAdditionalproperties
          A class that contains necessary nested @@ -66,13 +66,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NonAsciiPatternWithAdditionalproperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NonAsciiPatternWithAdditionalproperties; import java.util.Arrays; import java.util.List; @@ -251,7 +251,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -376,7 +376,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md index caa0f4a586f..980d373f1f4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md @@ -1,5 +1,5 @@ # NonInterferenceAcrossCombinedSchemas -unit_test_api.components.schemas.NonInterferenceAcrossCombinedSchemas.java +org.openapijsonschematools.client.components.schemas.NonInterferenceAcrossCombinedSchemas.java public class NonInterferenceAcrossCombinedSchemas
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md index 3f5593a4988..8358d5d2f6e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Not.md @@ -1,5 +1,5 @@ # Not -unit_test_api.components.schemas.Not.java +org.openapijsonschematools.client.components.schemas.Not.java public class Not
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md index 4f329c5db3d..6663a4c2e36 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMoreComplexSchema.md @@ -1,5 +1,5 @@ # NotMoreComplexSchema -unit_test_api.components.schemas.NotMoreComplexSchema.java +org.openapijsonschematools.client.components.schemas.NotMoreComplexSchema.java public class NotMoreComplexSchema
          A class that contains necessary nested @@ -208,13 +208,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NotMoreComplexSchema; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NotMoreComplexSchema; import java.util.Arrays; import java.util.List; @@ -316,7 +316,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md index babce8c862e..bc0434cc3ef 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NotMultipleTypes.md @@ -1,5 +1,5 @@ # NotMultipleTypes -unit_test_api.components.schemas.NotMultipleTypes.java +org.openapijsonschematools.client.components.schemas.NotMultipleTypes.java public class NotMultipleTypes
          A class that contains necessary nested @@ -220,13 +220,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NotMultipleTypes; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NotMultipleTypes; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md index 755c5137d35..ec4d57963c7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NulCharactersInStrings.md @@ -1,5 +1,5 @@ # NulCharactersInStrings -unit_test_api.components.schemas.NulCharactersInStrings.java +org.openapijsonschematools.client.components.schemas.NulCharactersInStrings.java public class NulCharactersInStrings
          A class that contains necessary nested @@ -48,13 +48,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.NulCharactersInStrings; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.NulCharactersInStrings; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md index 3d82aa77257..a7bf060e212 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NullTypeMatchesOnlyTheNullObject.md @@ -1,5 +1,5 @@ # NullTypeMatchesOnlyTheNullObject -unit_test_api.components.schemas.NullTypeMatchesOnlyTheNullObject.java +org.openapijsonschematools.client.components.schemas.NullTypeMatchesOnlyTheNullObject.java public class NullTypeMatchesOnlyTheNullObject
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md index 67611072686..76a1b65da1a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NumberTypeMatchesNumbers.md @@ -1,5 +1,5 @@ # NumberTypeMatchesNumbers -unit_test_api.components.schemas.NumberTypeMatchesNumbers.java +org.openapijsonschematools.client.components.schemas.NumberTypeMatchesNumbers.java public class NumberTypeMatchesNumbers
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md index ac1394472b7..2427b5219d5 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectPropertiesValidation.md @@ -1,5 +1,5 @@ # ObjectPropertiesValidation -unit_test_api.components.schemas.ObjectPropertiesValidation.java +org.openapijsonschematools.client.components.schemas.ObjectPropertiesValidation.java public class ObjectPropertiesValidation
          A class that contains necessary nested @@ -250,7 +250,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -285,7 +285,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md index b1ad71a13d3..f169645577b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ObjectTypeMatchesObjects.md @@ -1,5 +1,5 @@ # ObjectTypeMatchesObjects -unit_test_api.components.schemas.ObjectTypeMatchesObjects.java +org.openapijsonschematools.client.components.schemas.ObjectTypeMatchesObjects.java public class ObjectTypeMatchesObjects
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends MapJsonSchema.MapJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.MapJsonSchema.MapJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.MapJsonSchema.MapJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md index b7657b3f123..f4c0b682e27 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/Oneof.md @@ -1,5 +1,5 @@ # Oneof -unit_test_api.components.schemas.Oneof.java +org.openapijsonschematools.client.components.schemas.Oneof.java public class Oneof
          A class that contains necessary nested @@ -354,7 +354,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md index 02c0f0b08a4..182a53d6956 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofComplexTypes.md @@ -1,5 +1,5 @@ # OneofComplexTypes -unit_test_api.components.schemas.OneofComplexTypes.java +org.openapijsonschematools.client.components.schemas.OneofComplexTypes.java public class OneofComplexTypes
          A class that contains necessary nested @@ -426,7 +426,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -666,7 +666,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md index e3d01cf99c6..48247523768 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithBaseSchema.md @@ -1,5 +1,5 @@ # OneofWithBaseSchema -unit_test_api.components.schemas.OneofWithBaseSchema.java +org.openapijsonschematools.client.components.schemas.OneofWithBaseSchema.java public class OneofWithBaseSchema
          A class that contains necessary nested @@ -62,13 +62,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.OneofWithBaseSchema; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.OneofWithBaseSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md index 1cee29e9a90..a3b4f2933cb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithEmptySchema.md @@ -1,5 +1,5 @@ # OneofWithEmptySchema -unit_test_api.components.schemas.OneofWithEmptySchema.java +org.openapijsonschematools.client.components.schemas.OneofWithEmptySchema.java public class OneofWithEmptySchema
          A class that contains necessary nested @@ -297,7 +297,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -332,7 +332,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md index 800c6eacd2e..b5daaad8023 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/OneofWithRequired.md @@ -1,5 +1,5 @@ # OneofWithRequired -unit_test_api.components.schemas.OneofWithRequired.java +org.openapijsonschematools.client.components.schemas.OneofWithRequired.java public class OneofWithRequired
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md index 5995571dece..15a76dd0a5d 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternIsNotAnchored.md @@ -1,5 +1,5 @@ # PatternIsNotAnchored -unit_test_api.components.schemas.PatternIsNotAnchored.java +org.openapijsonschematools.client.components.schemas.PatternIsNotAnchored.java public class PatternIsNotAnchored
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md index e47d6ad566e..ddec1547b2a 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternValidation.md @@ -1,5 +1,5 @@ # PatternValidation -unit_test_api.components.schemas.PatternValidation.java +org.openapijsonschematools.client.components.schemas.PatternValidation.java public class PatternValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md index f33b038e4a3..837555c8491 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.md @@ -1,5 +1,5 @@ # PatternpropertiesValidatesPropertiesMatchingARegex -unit_test_api.components.schemas.PatternpropertiesValidatesPropertiesMatchingARegex.java +org.openapijsonschematools.client.components.schemas.PatternpropertiesValidatesPropertiesMatchingARegex.java public class PatternpropertiesValidatesPropertiesMatchingARegex
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md index 09bfc0a8916..74e030b224e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # PatternpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schemas.PatternpropertiesWithNullValuedInstanceProperties.java +org.openapijsonschematools.client.components.schemas.PatternpropertiesWithNullValuedInstanceProperties.java public class PatternpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md index 6e420a942a2..3e224cac359 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.md @@ -1,5 +1,5 @@ # PrefixitemsValidationAdjustsTheStartingIndexForItems -unit_test_api.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems.java +org.openapijsonschematools.client.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems.java public class PrefixitemsValidationAdjustsTheStartingIndexForItems
          A class that contains necessary nested @@ -56,13 +56,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.PrefixitemsValidationAdjustsTheStartingIndexForItems; import java.util.Arrays; import java.util.List; @@ -126,7 +126,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -194,7 +194,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md index 97cb7e3bfc7..7ca15c2ac9e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PrefixitemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # PrefixitemsWithNullInstanceElements -unit_test_api.components.schemas.PrefixitemsWithNullInstanceElements.java +org.openapijsonschematools.client.components.schemas.PrefixitemsWithNullInstanceElements.java public class PrefixitemsWithNullInstanceElements
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md index c921ebfc750..bf391634266 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.md @@ -1,5 +1,5 @@ # PropertiesPatternpropertiesAdditionalpropertiesInteraction -unit_test_api.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction.java +org.openapijsonschematools.client.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction.java public class PropertiesPatternpropertiesAdditionalpropertiesInteraction
          A class that contains necessary nested @@ -67,13 +67,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.PropertiesPatternpropertiesAdditionalpropertiesInteraction; import java.util.Arrays; import java.util.List; @@ -174,7 +174,7 @@ extends ListJsonSchema.ListJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.ListJsonSchema.ListJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.ListJsonSchema.ListJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -400,7 +400,7 @@ extends IntJsonSchema.IntJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.IntJsonSchema.IntJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.IntJsonSchema.IntJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 061f1f4edf6..79d86cedacc 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -1,5 +1,5 @@ # PropertiesWhoseNamesAreJavascriptObjectPropertyNames -unit_test_api.components.schemas.PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +org.openapijsonschematools.client.components.schemas.PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java public class PropertiesWhoseNamesAreJavascriptObjectPropertyNames
          A class that contains necessary nested @@ -276,7 +276,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -497,7 +497,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -532,7 +532,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md index 1af2b6bfdcd..de3e6fe1410 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithEscapedCharacters.md @@ -1,5 +1,5 @@ # PropertiesWithEscapedCharacters -unit_test_api.components.schemas.PropertiesWithEscapedCharacters.java +org.openapijsonschematools.client.components.schemas.PropertiesWithEscapedCharacters.java public class PropertiesWithEscapedCharacters
          A class that contains necessary nested @@ -280,7 +280,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -315,7 +315,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -350,7 +350,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -385,7 +385,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -420,7 +420,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -455,7 +455,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md index 625097b1e51..fed56234823 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # PropertiesWithNullValuedInstanceProperties -unit_test_api.components.schemas.PropertiesWithNullValuedInstanceProperties.java +org.openapijsonschematools.client.components.schemas.PropertiesWithNullValuedInstanceProperties.java public class PropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -242,7 +242,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md index ddde0b2def1..f0a45813afa 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertyNamedRefThatIsNotAReference.md @@ -1,5 +1,5 @@ # PropertyNamedRefThatIsNotAReference -unit_test_api.components.schemas.PropertyNamedRefThatIsNotAReference.java +org.openapijsonschematools.client.components.schemas.PropertyNamedRefThatIsNotAReference.java public class PropertyNamedRefThatIsNotAReference
          A class that contains necessary nested @@ -242,7 +242,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md index 71a9ec5b087..abdbb806289 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertynamesValidation.md @@ -1,5 +1,5 @@ # PropertynamesValidation -unit_test_api.components.schemas.PropertynamesValidation.java +org.openapijsonschematools.client.components.schemas.PropertynamesValidation.java public class PropertynamesValidation
          A class that contains necessary nested @@ -201,13 +201,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.PropertynamesValidation; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.PropertynamesValidation; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md index 5405448fe04..11d63e7de13 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexFormat.md @@ -1,5 +1,5 @@ # RegexFormat -unit_test_api.components.schemas.RegexFormat.java +org.openapijsonschematools.client.components.schemas.RegexFormat.java public class RegexFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md index 26ee6f55e4d..0947b3fc9e2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.md @@ -1,5 +1,5 @@ # RegexesAreNotAnchoredByDefaultAndAreCaseSensitive -unit_test_api.components.schemas.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java +org.openapijsonschematools.client.components.schemas.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive
          A class that contains necessary nested @@ -202,7 +202,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -237,7 +237,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md index b4086a9b8e9..ec19588c4a7 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RelativeJsonPointerFormat.md @@ -1,5 +1,5 @@ # RelativeJsonPointerFormat -unit_test_api.components.schemas.RelativeJsonPointerFormat.java +org.openapijsonschematools.client.components.schemas.RelativeJsonPointerFormat.java public class RelativeJsonPointerFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md index 0cb7742bef9..365a4f96ff4 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredDefaultValidation.md @@ -1,5 +1,5 @@ # RequiredDefaultValidation -unit_test_api.components.schemas.RequiredDefaultValidation.java +org.openapijsonschematools.client.components.schemas.RequiredDefaultValidation.java public class RequiredDefaultValidation
          A class that contains necessary nested @@ -345,7 +345,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 57b218aa3b2..a11d3f1046e 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -1,5 +1,5 @@ # RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames -unit_test_api.components.schemas.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +org.openapijsonschematools.client.components.schemas.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md index b88dd290a39..8db2b0fbc2b 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredValidation.md @@ -1,5 +1,5 @@ # RequiredValidation -unit_test_api.components.schemas.RequiredValidation.java +org.openapijsonschematools.client.components.schemas.RequiredValidation.java public class RequiredValidation
          A class that contains necessary nested @@ -379,7 +379,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -504,7 +504,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md index afb5b32fbc7..a1761569c18 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEmptyArray.md @@ -1,5 +1,5 @@ # RequiredWithEmptyArray -unit_test_api.components.schemas.RequiredWithEmptyArray.java +org.openapijsonschematools.client.components.schemas.RequiredWithEmptyArray.java public class RequiredWithEmptyArray
          A class that contains necessary nested @@ -345,7 +345,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md index be4a766d2d8..905a7663e37 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredWithEscapedCharacters.md @@ -1,5 +1,5 @@ # RequiredWithEscapedCharacters -unit_test_api.components.schemas.RequiredWithEscapedCharacters.java +org.openapijsonschematools.client.components.schemas.RequiredWithEscapedCharacters.java public class RequiredWithEscapedCharacters
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md index 29276a8120b..365e67c9a68 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SimpleEnumValidation.md @@ -1,5 +1,5 @@ # SimpleEnumValidation -unit_test_api.components.schemas.SimpleEnumValidation.java +org.openapijsonschematools.client.components.schemas.SimpleEnumValidation.java public class SimpleEnumValidation
          A class that contains necessary nested @@ -51,13 +51,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.SimpleEnumValidation; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.SimpleEnumValidation; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md index 3faba9520b1..feb7bdac989 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SingleDependency.md @@ -1,5 +1,5 @@ # SingleDependency -unit_test_api.components.schemas.SingleDependency.java +org.openapijsonschematools.client.components.schemas.SingleDependency.java public class SingleDependency
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md index ebbdd196e68..62c43b97063 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/SmallMultipleOfLargeInteger.md @@ -1,5 +1,5 @@ # SmallMultipleOfLargeInteger -unit_test_api.components.schemas.SmallMultipleOfLargeInteger.java +org.openapijsonschematools.client.components.schemas.SmallMultipleOfLargeInteger.java public class SmallMultipleOfLargeInteger
          A class that contains necessary nested @@ -46,13 +46,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.SmallMultipleOfLargeInteger; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.SmallMultipleOfLargeInteger; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md index 31c0a2e3314..5166ec0ed59 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/StringTypeMatchesStrings.md @@ -1,5 +1,5 @@ # StringTypeMatchesStrings -unit_test_api.components.schemas.StringTypeMatchesStrings.java +org.openapijsonschematools.client.components.schemas.StringTypeMatchesStrings.java public class StringTypeMatchesStrings
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md index 2083d945ad2..aadc93a5b33 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TimeFormat.md @@ -1,5 +1,5 @@ # TimeFormat -unit_test_api.components.schemas.TimeFormat.java +org.openapijsonschematools.client.components.schemas.TimeFormat.java public class TimeFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md index 6a37377f639..0a9655e6820 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayObjectOrNull.md @@ -1,5 +1,5 @@ # TypeArrayObjectOrNull -unit_test_api.components.schemas.TypeArrayObjectOrNull.java +org.openapijsonschematools.client.components.schemas.TypeArrayObjectOrNull.java public class TypeArrayObjectOrNull
          A class that contains necessary nested @@ -84,13 +84,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.TypeArrayObjectOrNull; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.TypeArrayObjectOrNull; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md index 32ad7a9d991..5bb799c1fdb 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeArrayOrObject.md @@ -1,5 +1,5 @@ # TypeArrayOrObject -unit_test_api.components.schemas.TypeArrayOrObject.java +org.openapijsonschematools.client.components.schemas.TypeArrayOrObject.java public class TypeArrayOrObject
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md index fa6baf032ff..a50422c5a6f 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/TypeAsArrayWithOneItem.md @@ -1,5 +1,5 @@ # TypeAsArrayWithOneItem -unit_test_api.components.schemas.TypeAsArrayWithOneItem.java +org.openapijsonschematools.client.components.schemas.TypeAsArrayWithOneItem.java public class TypeAsArrayWithOneItem
          A class that contains necessary nested @@ -44,7 +44,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md index 8c48bc142e7..0d9460530b0 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsAsSchema.md @@ -1,5 +1,5 @@ # UnevaluateditemsAsSchema -unit_test_api.components.schemas.UnevaluateditemsAsSchema.java +org.openapijsonschematools.client.components.schemas.UnevaluateditemsAsSchema.java public class UnevaluateditemsAsSchema
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md index 14d3164f4a7..419b1e650e2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.md @@ -1,5 +1,5 @@ # UnevaluateditemsDependsOnMultipleNestedContains -unit_test_api.components.schemas.UnevaluateditemsDependsOnMultipleNestedContains.java +org.openapijsonschematools.client.components.schemas.UnevaluateditemsDependsOnMultipleNestedContains.java public class UnevaluateditemsDependsOnMultipleNestedContains
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md index 4f36765573c..60a1ad340b8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithItems.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithItems -unit_test_api.components.schemas.UnevaluateditemsWithItems.java +org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithItems.java public class UnevaluateditemsWithItems
          A class that contains necessary nested @@ -56,13 +56,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.UnevaluateditemsWithItems; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithItems; import java.util.Arrays; import java.util.List; @@ -126,7 +126,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -193,7 +193,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md index 1469924eba9..3fc8d9e757c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluateditemsWithNullInstanceElements.md @@ -1,5 +1,5 @@ # UnevaluateditemsWithNullInstanceElements -unit_test_api.components.schemas.UnevaluateditemsWithNullInstanceElements.java +org.openapijsonschematools.client.components.schemas.UnevaluateditemsWithNullInstanceElements.java public class UnevaluateditemsWithNullInstanceElements
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md index 252c966dd48..0eac3865a05 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesNotAffectedByPropertynames -unit_test_api.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames.java +org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames.java public class UnevaluatedpropertiesNotAffectedByPropertynames
          A class that contains necessary nested @@ -203,7 +203,7 @@ extends NumberJsonSchema.NumberJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NumberJsonSchema.NumberJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -240,13 +240,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesNotAffectedByPropertynames; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md index 3f88e89340d..bae10cae359 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesSchema.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesSchema -unit_test_api.components.schemas.UnevaluatedpropertiesSchema.java +org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesSchema.java public class UnevaluatedpropertiesSchema
          A class that contains necessary nested @@ -93,13 +93,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.UnevaluatedpropertiesSchema; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesSchema; import java.util.Arrays; import java.util.List; diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md index daf74e7c5e4..b0158a7076f 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithAdjacentAdditionalproperties -unit_test_api.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties.java +org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties.java public class UnevaluatedpropertiesWithAdjacentAdditionalproperties
          A class that contains necessary nested @@ -69,13 +69,13 @@ A schema class that validates payloads ### Code Sample ``` -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties; +import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; +import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; +import org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithAdjacentAdditionalproperties; import java.util.Arrays; import java.util.List; @@ -230,7 +230,7 @@ extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -304,7 +304,7 @@ extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.StringJsonSchema.StringJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -429,7 +429,7 @@ extends AnyTypeJsonSchema.AnyTypeJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.AnyTypeJsonSchema.AnyTypeJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md index d51a8a53046..128bdcf42de 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.md @@ -1,5 +1,5 @@ # UnevaluatedpropertiesWithNullValuedInstanceProperties -unit_test_api.components.schemas.UnevaluatedpropertiesWithNullValuedInstanceProperties.java +org.openapijsonschematools.client.components.schemas.UnevaluatedpropertiesWithNullValuedInstanceProperties.java public class UnevaluatedpropertiesWithNullValuedInstanceProperties
          A class that contains necessary nested @@ -199,7 +199,7 @@ extends NullJsonSchema.NullJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.NullJsonSchema.NullJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.NullJsonSchema.NullJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md index 3a52a034075..322fd231596 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseValidation.md @@ -1,5 +1,5 @@ # UniqueitemsFalseValidation -unit_test_api.components.schemas.UniqueitemsFalseValidation.java +org.openapijsonschematools.client.components.schemas.UniqueitemsFalseValidation.java public class UniqueitemsFalseValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md index 634c076c35d..1ecfacb8e78 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsFalseWithAnArrayOfItems.md @@ -1,5 +1,5 @@ # UniqueitemsFalseWithAnArrayOfItems -unit_test_api.components.schemas.UniqueitemsFalseWithAnArrayOfItems.java +org.openapijsonschematools.client.components.schemas.UniqueitemsFalseWithAnArrayOfItems.java public class UniqueitemsFalseWithAnArrayOfItems
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -242,7 +242,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md index 56bd58729fb..be6b794fe51 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsValidation.md @@ -1,5 +1,5 @@ # UniqueitemsValidation -unit_test_api.components.schemas.UniqueitemsValidation.java +org.openapijsonschematools.client.components.schemas.UniqueitemsValidation.java public class UniqueitemsValidation
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md index 6417e3cf453..ca977d4c703 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UniqueitemsWithAnArrayOfItems.md @@ -1,5 +1,5 @@ # UniqueitemsWithAnArrayOfItems -unit_test_api.components.schemas.UniqueitemsWithAnArrayOfItems.java +org.openapijsonschematools.client.components.schemas.UniqueitemsWithAnArrayOfItems.java public class UniqueitemsWithAnArrayOfItems
          A class that contains necessary nested @@ -207,7 +207,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | @@ -242,7 +242,7 @@ extends BooleanJsonSchema.BooleanJsonSchema1 A schema class that validates payloads -| Methods Inherited from class unit_test_api.schemas.BooleanJsonSchema.BooleanJsonSchema1 | +| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | | ------------------------------------------------------------------ | | validate | | validateAndBox | diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md index 571b7215c64..86070ed0198 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriFormat.md @@ -1,5 +1,5 @@ # UriFormat -unit_test_api.components.schemas.UriFormat.java +org.openapijsonschematools.client.components.schemas.UriFormat.java public class UriFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md index fa20d965144..9b8f21979a3 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriReferenceFormat.md @@ -1,5 +1,5 @@ # UriReferenceFormat -unit_test_api.components.schemas.UriReferenceFormat.java +org.openapijsonschematools.client.components.schemas.UriReferenceFormat.java public class UriReferenceFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md index 49d873f014b..a95971b7ca9 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UriTemplateFormat.md @@ -1,5 +1,5 @@ # UriTemplateFormat -unit_test_api.components.schemas.UriTemplateFormat.java +org.openapijsonschematools.client.components.schemas.UriTemplateFormat.java public class UriTemplateFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md index d7fcc2c5f9c..ed984bd9617 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/UuidFormat.md @@ -1,5 +1,5 @@ # UuidFormat -unit_test_api.components.schemas.UuidFormat.java +org.openapijsonschematools.client.components.schemas.UuidFormat.java public class UuidFormat
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md index 1d688e2a04c..92addae6f95 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md @@ -1,5 +1,5 @@ # ValidateAgainstCorrectBranchThenVsElse -unit_test_api.components.schemas.ValidateAgainstCorrectBranchThenVsElse.java +org.openapijsonschematools.client.components.schemas.ValidateAgainstCorrectBranchThenVsElse.java public class ValidateAgainstCorrectBranchThenVsElse
          A class that contains necessary nested diff --git a/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md b/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md index b9c92985f32..08ddb1be947 100644 --- a/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md +++ b/samples/client/3_1_0_unit_test/java/docs/servers/RootServer0.md @@ -1,4 +1,4 @@ -unit_test_api.servers.RootServer0 +org.openapijsonschematools.client.servers.RootServer0 # Server RootServer0 public class RootServer0 diff --git a/samples/client/3_1_0_unit_test/java/pom.xml b/samples/client/3_1_0_unit_test/java/pom.xml index 17ed5c19822..7bc3926409e 100644 --- a/samples/client/3_1_0_unit_test/java/pom.xml +++ b/samples/client/3_1_0_unit_test/java/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.openapijsonschematools - + unit-test-api jar - + unit-test-api 0.0.1 https://github.com/openapi-json-schema-tools/openapi-json-schema-generator OpenAPI Java From 181cb90dc0025c19477dd9435f7f34db58b65f0a Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 15:55:50 -0700 Subject: [PATCH 36/44] Changes generatorMetadata usages to use the getGeneratorMetadata method --- .../codegen/generators/DefaultGenerator.java | 13 ++++++------- .../codegen/generators/JavaClientGenerator.java | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java index 2a849831d33..3990dc0bc3f 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/DefaultGenerator.java @@ -821,7 +821,7 @@ public GeneratorMetadata getGeneratorMetadata() { * @return the sanitized variable name */ public String toVarName(final String name) { - if (generatorMetadata.getReservedWords().contains(name)) { + if (getGeneratorMetadata().getReservedWords().contains(name)) { return escapeReservedWord(name); } else if (name.chars().anyMatch(character -> specialCharReplacements.containsKey(String.valueOf((char) character)))) { return org.openapijsonschematools.codegen.common.StringUtils.escape(name, specialCharReplacements, null, null); @@ -846,7 +846,7 @@ public String toParamName(String name) { result = result.substring(0, 1).toLowerCase(Locale.ROOT) + result.substring(1); } name = result; // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. - if (generatorMetadata.getReservedWords().contains(name)) { + if (getGeneratorMetadata().getReservedWords().contains(name)) { return escapeReservedWord(name); } else if (name.chars().anyMatch(character -> specialCharReplacements.containsKey(String.valueOf((char) character)))) { return org.openapijsonschematools.codegen.common.StringUtils.escape(name, specialCharReplacements, null, null); @@ -2067,7 +2067,7 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ // import from $ref property.imports = new TreeSet<>(); assert generatorMetadata != null; - addImports(property.imports, getImports(sourceJsonPath, property, generatorMetadata.getFeatureSet())); + addImports(property.imports, getImports(sourceJsonPath, property, getGeneratorMetadata().getFeatureSet())); } if (p.getSpecVersion().compareTo(SpecVersion.V31) < 0) { // stop processing if version is less than 3.1.0 @@ -2342,8 +2342,7 @@ public CodegenSchema fromSchema(Schema p, String sourceJsonPath, String currentJ if (addSchemaImportsFromV3SpecLocations && sourceJsonPath != null && sourceJsonPath.equals(currentJsonPath)) { // imports from properties/items/additionalProperties/oneOf/anyOf/allOf/not property.imports = new TreeSet<>(); - assert generatorMetadata != null; - addImports(property.imports, getImports(sourceJsonPath, property, generatorMetadata.getFeatureSet())); + addImports(property.imports, getImports(sourceJsonPath, property, getGeneratorMetadata().getFeatureSet())); } LOGGER.debug("debugging fromSchema return: {}", property); @@ -2775,7 +2774,7 @@ private CodegenSchema getXParametersSchema(HashMap xParametersPr xParametersSchema.setAdditionalProperties(Boolean.FALSE); CodegenSchema schema = fromSchema(xParametersSchema, sourceJsonPath, currentJsonPath); schema.imports = new TreeSet<>(); - addImports(schema.imports, getImports(sourceJsonPath, schema, generatorMetadata.getFeatureSet())); + addImports(schema.imports, getImports(sourceJsonPath, schema, getGeneratorMetadata().getFeatureSet())); return schema; } @@ -3386,7 +3385,7 @@ protected static Set getLowerCaseWords(List words) { } protected boolean isReservedWord(String word) { - return word != null && generatorMetadata.getReservedWords().contains(word.toLowerCase(Locale.ROOT)); + return word != null && getGeneratorMetadata().getReservedWords().contains(word.toLowerCase(Locale.ROOT)); } /** diff --git a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java index 94fd11132fa..23de6836528 100644 --- a/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java +++ b/src/main/java/org/openapijsonschematools/codegen/generators/JavaClientGenerator.java @@ -1075,7 +1075,7 @@ public Map postProcessSupportingFileData(Map dat @Override public String toApiVarName(String name) { String apiVarName = super.toApiVarName(name); - if (generatorMetadata.getReservedWords().contains(apiVarName)) { + if (getGeneratorMetadata().getReservedWords().contains(apiVarName)) { apiVarName = escapeReservedWord(apiVarName); } return apiVarName; From d0cadbb6dbe7c3d57fffdc58037b14397909aa48 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:07:01 -0700 Subject: [PATCH 37/44] Samples regen --- docs/generators/java.md | 1 - ...lpropertiesShouldNotLookInApplicators.java | 3 + .../client/components/schemas/Allof.java | 4 + .../schemas/AllofCombinedWithAnyofOneof.java | 1 + .../schemas/AllofWithBaseSchema.java | 2 + .../schemas/AllofWithOneEmptySchema.java | 1 + .../schemas/AllofWithTheFirstEmptySchema.java | 2 + .../schemas/AllofWithTheLastEmptySchema.java | 2 + .../schemas/AllofWithTwoEmptySchemas.java | 1 + .../client/components/schemas/Anyof.java | 1 + .../components/schemas/AnyofComplexTypes.java | 4 + .../schemas/AnyofWithBaseSchema.java | 16 + .../schemas/AnyofWithOneEmptySchema.java | 2 + .../components/schemas/ForbiddenProperty.java | 1 + ...NestedAllofToCheckValidationSemantics.java | 1 + ...NestedAnyofToCheckValidationSemantics.java | 1 + ...NestedOneofToCheckValidationSemantics.java | 1 + .../client/components/schemas/Not.java | 1 + .../schemas/NotMoreComplexSchema.java | 3 + .../client/components/schemas/Oneof.java | 1 + .../components/schemas/OneofComplexTypes.java | 4 + .../schemas/OneofWithBaseSchema.java | 16 + .../schemas/OneofWithEmptySchema.java | 2 + .../components/schemas/OneofWithRequired.java | 10 + .../python/.openapi-generator/FILES | 8 +- .../client/3_0_3_unit_test/python/README.md | 14 +- .../components/schema/forbidden_property.md | 4 +- .../schema/not_more_complex_schema.md | 4 +- .../post.md | 4 +- .../post.md | 4 +- .../post.md | 8 +- .../content/application_json/schema.md | 2 +- .../post.md | 10 +- .../post.md | 10 +- .../post.md | 12 +- .../content/application_json/schema.md | 2 +- .../src/unit_test_api/apis/tag_to_api.py | 6 +- .../schema/not_more_complex_schema.py | 8 +- .../components/schema/ref_in_allof.py | 2 + .../components/schema/ref_in_anyof.py | 2 + .../components/schema/ref_in_not.py | 2 + .../components/schema/ref_in_oneof.py | 2 + .../components/schemas/__init__.py | 2 +- .../post/operation.py | 2 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../schemas/IfAndElseWithoutThen.md | 200 ++++---- .../schemas/IfAndThenWithoutElse.md | 100 ++-- ...WhenSerializedKeywordProcessingSequence.md | 200 ++++---- .../components/schemas/IgnoreElseWithoutIf.md | 100 ++-- .../schemas/IgnoreIfWithoutThenOrElse.md | 100 ++-- .../NonInterferenceAcrossCombinedSchemas.md | 200 ++++---- ...seNamesAreJavascriptObjectPropertyNames.md | 103 ++-- ...seNamesAreJavascriptObjectPropertyNames.md | 3 +- .../ValidateAgainstCorrectBranchThenVsElse.md | 200 ++++---- ...nalpropertiesDoesNotLookInApplicators.java | 3 + .../client/components/schemas/Allof.java | 4 + .../schemas/AllofCombinedWithAnyofOneof.java | 1 + .../schemas/AllofWithBaseSchema.java | 2 + .../schemas/AllofWithOneEmptySchema.java | 1 + .../schemas/AllofWithTheFirstEmptySchema.java | 2 + .../schemas/AllofWithTheLastEmptySchema.java | 2 + .../schemas/AllofWithTwoEmptySchemas.java | 1 + .../client/components/schemas/Anyof.java | 1 + .../components/schemas/AnyofComplexTypes.java | 4 + .../schemas/AnyofWithBaseSchema.java | 16 + .../schemas/AnyofWithOneEmptySchema.java | 2 + .../components/schemas/ForbiddenProperty.java | 1 + .../schemas/IfAndElseWithoutThen.java | 104 ++-- .../schemas/IfAndThenWithoutElse.java | 52 +- ...enSerializedKeywordProcessingSequence.java | 104 ++-- .../schemas/IgnoreElseWithoutIf.java | 52 +- .../schemas/IgnoreIfWithoutThenOrElse.java | 52 +- ...NestedAllofToCheckValidationSemantics.java | 1 + ...NestedAnyofToCheckValidationSemantics.java | 1 + ...NestedOneofToCheckValidationSemantics.java | 1 + .../NonInterferenceAcrossCombinedSchemas.java | 105 ++-- .../client/components/schemas/Not.java | 1 + .../schemas/NotMoreComplexSchema.java | 3 + .../client/components/schemas/Oneof.java | 1 + .../components/schemas/OneofComplexTypes.java | 4 + .../schemas/OneofWithBaseSchema.java | 16 + .../schemas/OneofWithEmptySchema.java | 2 + .../components/schemas/OneofWithRequired.java | 10 + ...NamesAreJavascriptObjectPropertyNames.java | 90 ++-- ...NamesAreJavascriptObjectPropertyNames.java | 46 +- ...alidateAgainstCorrectBranchThenVsElse.java | 104 ++-- .../python/.openapi-generator/FILES | 8 +- .../client/3_1_0_unit_test/python/README.md | 18 +- .../components/schema/forbidden_property.md | 4 +- .../schema/not_more_complex_schema.md | 4 +- .../components/schema/not_multiple_types.md | 4 +- .../post.md | 4 +- .../post.md | 4 +- .../post.md | 4 +- .../post.md | 8 +- .../content/application_json/schema.md | 2 +- .../post.md | 10 +- .../post.md | 10 +- .../post.md | 10 +- .../post.md | 12 +- .../content/application_json/schema.md | 2 +- .../src/unit_test_api/apis/tag_to_api.py | 6 +- .../components/schema/forbidden_property.py | 4 +- .../schema/if_and_else_without_then.py | 8 +- .../schema/if_and_then_without_else.py | 4 +- ..._serialized_keyword_processing_sequence.py | 10 +- .../schema/ignore_else_without_if.py | 6 +- .../schema/ignore_if_without_then_or_else.py | 6 +- ...on_interference_across_combined_schemas.py | 8 +- .../schema/not_more_complex_schema.py | 8 +- .../components/schema/not_multiple_types.py | 4 +- ...ate_against_correct_branch_then_vs_else.py | 8 +- .../components/schemas/__init__.py | 2 +- .../post/operation.py | 2 +- .../content/application_json/schema.py | 4 +- .../content/application_json/schema.py | 4 +- .../petstore/java/.openapi-generator/FILES | 20 +- samples/client/petstore/java/README.md | 14 +- .../java/docs/apis/paths/Fakerefsboolean.md | 2 +- .../java/docs/apis/paths/Fakerefsstring.md | 2 +- .../petstore/java/docs/apis/tags/Fake.md | 20 +- .../responses/SuccessWithJsonApiResponse.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../components/schemas/AnyTypeAndFormat.md | 472 +++++++++--------- .../docs/components/schemas/ClassModel.md | 26 +- .../docs/components/schemas/FormatTest.md | 330 ++++++------ ...dPropertiesAndAdditionalPropertiesClass.md | 67 ++- .../schemas/ObjectModelWithRefProps.md | 2 +- .../components/schemas/Schema200Response.md | 30 +- .../ApplicationxwwwformurlencodedSchema.md | 181 ++++--- ...magewithrequiredfilePostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../fakerefsboolean/FakerefsbooleanPost.md | 12 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../fakerefsstring/FakerefsstringPost.md | 12 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../FakeuploadfilePostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../FakeuploadfilesPostCode200Response.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 4 +- .../applicationjson/ApplicationjsonSchema.md | 6 +- .../client/apis/tags/Fake.java | 4 +- .../responses/SuccessWithJsonApiResponse.java | 2 +- .../HeadersWithNoBodyHeadersSchema.java | 1 + ...ssInlineContentAndHeaderHeadersSchema.java | 1 + ...ccessWithJsonApiResponseHeadersSchema.java | 1 + .../ApplicationjsonSchema.java | 6 +- .../schemas/AdditionalPropertiesSchema.java | 12 + .../components/schemas/AnyTypeAndFormat.java | 394 +++++++-------- .../components/schemas/AnyTypeNotString.java | 1 + .../client/components/schemas/AppleReq.java | 1 + .../client/components/schemas/BananaReq.java | 1 + .../client/components/schemas/Cat.java | 3 + .../client/components/schemas/ChildCat.java | 3 + .../client/components/schemas/ClassModel.java | 20 +- .../schemas/ComplexQuadrilateral.java | 5 + ...posedAnyOfDifferentTypesNoValidations.java | 13 + .../components/schemas/ComposedBool.java | 1 + .../components/schemas/ComposedNone.java | 1 + .../components/schemas/ComposedNumber.java | 1 + .../components/schemas/ComposedObject.java | 1 + .../schemas/ComposedOneOfDifferentTypes.java | 4 + .../components/schemas/ComposedString.java | 1 + .../client/components/schemas/Dog.java | 3 + .../schemas/EquilateralTriangle.java | 5 + .../client/components/schemas/FormatTest.java | 368 ++++++-------- .../client/components/schemas/FruitReq.java | 1 + .../components/schemas/IsoscelesTriangle.java | 5 + .../schemas/JSONPatchRequestMoveCopy.java | 1 + .../schemas/JSONPatchRequestRemove.java | 1 + ...ropertiesAndAdditionalPropertiesClass.java | 76 ++- .../client/components/schemas/Money.java | 1 + .../schemas/MultiPropertiesSchema.java | 1 + .../components/schemas/MyObjectDto.java | 1 + .../schemas/NoAdditionalProperties.java | 1 + .../components/schemas/NullableShape.java | 1 + .../schemas/ObjectModelWithRefProps.java | 4 +- ...hAllOfWithReqTestPropFromUnsetAddProp.java | 3 + .../schemas/ObjectWithOnlyOptionalProps.java | 1 + .../schemas/PaginatedResultMyObjectDto.java | 1 + .../components/schemas/ScaleneTriangle.java | 5 + .../components/schemas/Schema200Response.java | 32 +- .../components/schemas/ShapeOrNull.java | 1 + .../schemas/SimpleQuadrilateral.java | 5 + .../client/components/schemas/User.java | 1 + ...mmonparamsubdirDeleteHeaderParameters.java | 1 + ...CommonparamsubdirDeletePathParameters.java | 1 + .../CommonparamsubdirGetPathParameters.java | 1 + .../CommonparamsubdirGetQueryParameters.java | 1 + ...CommonparamsubdirPostHeaderParameters.java | 1 + .../CommonparamsubdirPostPathParameters.java | 1 + .../delete/FakeDeleteHeaderParameters.java | 1 + .../delete/FakeDeleteQueryParameters.java | 1 + .../fake/get/FakeGetHeaderParameters.java | 1 + .../fake/get/FakeGetQueryParameters.java | 1 + .../ApplicationxwwwformurlencodedSchema.java | 90 +--- ...bodywithqueryparamsPutQueryParameters.java | 1 + ...casesensitiveparamsPutQueryParameters.java | 1 + ...akedeletecoffeeidDeletePathParameters.java | 1 + ...einlinecompositionPostQueryParameters.java | 1 + .../get/FakeobjinqueryGetQueryParameters.java | 1 + ...isions1ababselfabPostCookieParameters.java | 1 + ...isions1ababselfabPostHeaderParameters.java | 1 + ...llisions1ababselfabPostPathParameters.java | 1 + ...lisions1ababselfabPostQueryParameters.java | 1 + ...agewithrequiredfilePostPathParameters.java | 1 + ...gewithrequiredfilePostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- ...withjsoncontenttypeGetQueryParameters.java | 1 + .../FakerefobjinqueryGetQueryParameters.java | 1 + .../fakerefsboolean/FakerefsbooleanPost.java | 4 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 6 +- .../fakerefsstring/FakerefsstringPost.java | 4 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 6 +- ...etestqueryparamtersPutQueryParameters.java | 1 + .../FakeuploadfilePostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- .../FakeuploadfilesPostCode200Response.java | 2 +- .../ApplicationjsonSchema.java | 6 +- .../ApplicationjsonSchema.java | 12 +- .../server1/FooGetServer1Variables.java | 1 + .../PetfindbystatusGetQueryParameters.java | 1 + .../PetfindbystatusServer1Variables.java | 1 + .../get/PetfindbytagsGetQueryParameters.java | 1 + .../PetpetidDeleteHeaderParameters.java | 1 + .../delete/PetpetidDeletePathParameters.java | 1 + .../get/PetpetidGetPathParameters.java | 1 + .../post/PetpetidPostPathParameters.java | 1 + ...PetpetiduploadimagePostPathParameters.java | 1 + ...StoreorderorderidDeletePathParameters.java | 1 + .../StoreorderorderidGetPathParameters.java | 1 + .../get/UserloginGetQueryParameters.java | 1 + ...rloginGetCode200ResponseHeadersSchema.java | 1 + .../UserusernameDeletePathParameters.java | 1 + .../get/UserusernameGetPathParameters.java | 1 + .../put/UserusernamePutPathParameters.java | 1 + .../rootserver0/RootServer0Variables.java | 1 + .../rootserver1/RootServer1Variables.java | 1 + .../petstore/python/.openapi-generator/FILES | 4 +- samples/client/petstore/python/README.md | 2 +- .../docs/components/schema/_200_response.md | 3 +- .../components/schema/any_type_and_format.md | 6 +- .../components/schema/any_type_not_string.md | 4 +- .../docs/components/schema/format_test.md | 7 +- .../schema/json_patch_request_move_copy.md | 3 +- ...perties_and_additional_properties_class.md | 5 +- .../python/docs/components/schema/name.md | 3 +- ...ect_with_invalid_named_refed_properties.md | 8 +- .../python/docs/components/schema/user.md | 4 +- .../petstore/python/docs/paths/fake/post.md | 7 +- .../schema.md | 5 +- .../post.md | 16 +- .../components/schema/_200_response.py | 19 +- .../components/schema/any_type_and_format.py | 38 +- .../components/schema/any_type_not_string.py | 4 +- .../src/petstore_api/components/schema/cat.py | 2 + .../components/schema/child_cat.py | 2 + .../components/schema/class_model.py | 4 +- .../schema/complex_quadrilateral.py | 2 + .../schema/composed_one_of_different_types.py | 3 + .../src/petstore_api/components/schema/dog.py | 2 + .../components/schema/equilateral_triangle.py | 2 + .../components/schema/format_test.py | 60 +-- .../petstore_api/components/schema/fruit.py | 3 + .../components/schema/fruit_req.py | 3 + .../components/schema/gm_fruit.py | 3 + .../components/schema/isosceles_triangle.py | 2 + .../components/schema/json_patch_request.py | 4 + .../schema/json_patch_request_move_copy.py | 10 +- ...perties_and_additional_properties_class.py | 40 +- .../petstore_api/components/schema/name.py | 19 +- .../components/schema/nullable_shape.py | 3 + .../schema/obj_with_required_props.py | 2 + ..._with_req_test_prop_from_unset_add_prop.py | 2 + ...ect_with_invalid_named_refed_properties.py | 12 - .../components/schema/parent_pet.py | 1 + .../components/schema/scalene_triangle.py | 2 + .../components/schema/simple_quadrilateral.py | 2 + .../components/schema/some_object.py | 2 + .../petstore_api/components/schema/user.py | 4 +- .../components/schemas/__init__.py | 2 +- .../schema.py | 40 +- .../post/cookie_parameters.py | 15 - .../post/header_parameters.py | 15 - .../post/path_parameters.py | 9 - .../post/query_parameters.py | 15 - 291 files changed, 2548 insertions(+), 2695 deletions(-) diff --git a/docs/generators/java.md b/docs/generators/java.md index 5893890d14a..93ff4abcfe7 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -21,7 +21,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapi-json-schema-tools/openapi-json-schema-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |developerEmail|developer email in generated pom.xml| |team@openapijsonschematools.org| diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java index 440d5977005..e0e8acfbbb5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesShouldNotLookInApplicators.java @@ -16,8 +16,10 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; @@ -29,6 +31,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index c1dc5bacc2e..8e7bc5d7152 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index bf14383c104..fa51a189f38 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index 8968227f734..b2d64cdcdff 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -18,6 +18,8 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.NullJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index dffa31278f9..09d4d5bd234 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index c9b1f4a933c..5db2ddd6167 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 78f6e9d4040..17920aead56 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index 241ab07693f..3fbe112d6c6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 43696f26f02..65d6fc3dc39 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index c2f66f7defb..713f9fcbc2e 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index 2b166776e74..dd8146a6928 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -1,15 +1,31 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index 33583e2bf32..70fdcfb67c3 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index 0bacecab5df..97ae41e88ad 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java index 14c42003ea9..f05f987e5e5 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAllofToCheckValidationSemantics.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java index 6a9ae4d36e4..4b123ad5b55 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedAnyofToCheckValidationSemantics.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java index ea9982cb925..096f3d30b79 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NestedOneofToCheckValidationSemantics.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index 65923d494b7..56e58519e7d 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index 217572bfa8c..2d64dcfa61b 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index ac189abd5a2..2472dd24499 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 98ce23a61c8..97370cd35ac 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 36024642e7c..619be52f3e2 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -1,15 +1,31 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index b8201add5a5..6a2499aefa6 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index 0fc34edbc6c..4dde715b451 100644 --- a/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_0_3_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -1,4 +1,6 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -7,18 +9,26 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithRequired { diff --git a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES index 4b9ece83d3f..54c2a4d140f 100644 --- a/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ b/samples/client/3_0_3_unit_test/python/.openapi-generator/FILES @@ -2,6 +2,7 @@ .gitlab-ci.yml .travis.yml README.md +docs/apis/tags/_not_api.md docs/apis/tags/additional_properties_api.md docs/apis/tags/all_of_api.md docs/apis/tags/any_of_api.md @@ -19,7 +20,6 @@ docs/apis/tags/min_length_api.md docs/apis/tags/min_properties_api.md docs/apis/tags/minimum_api.md docs/apis/tags/multiple_of_api.md -docs/apis/tags/not_api.md docs/apis/tags/one_of_api.md docs/apis/tags/operation_request_body_api.md docs/apis/tags/path_post_api.md @@ -30,6 +30,7 @@ docs/apis/tags/required_api.md docs/apis/tags/response_content_content_type_schema_api.md docs/apis/tags/type_api.md docs/apis/tags/unique_items_api.md +docs/components/schema/_not.md docs/components/schema/additionalproperties_allows_a_schema_which_should_validate.md docs/components/schema/additionalproperties_are_allowed_by_default.md docs/components/schema/additionalproperties_can_exist_by_itself.md @@ -82,7 +83,6 @@ docs/components/schema/nested_allof_to_check_validation_semantics.md docs/components/schema/nested_anyof_to_check_validation_semantics.md docs/components/schema/nested_items.md docs/components/schema/nested_oneof_to_check_validation_semantics.md -docs/components/schema/not.md docs/components/schema/not_more_complex_schema.md docs/components/schema/nul_characters_in_strings.md docs/components/schema/null_type_matches_only_the_null_object.md @@ -653,6 +653,7 @@ src/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_bo src/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py src/unit_test_api/apis/tag_to_api.py src/unit_test_api/apis/tags/__init__.py +src/unit_test_api/apis/tags/_not_api.py src/unit_test_api/apis/tags/additional_properties_api.py src/unit_test_api/apis/tags/all_of_api.py src/unit_test_api/apis/tags/any_of_api.py @@ -670,7 +671,6 @@ src/unit_test_api/apis/tags/min_length_api.py src/unit_test_api/apis/tags/min_properties_api.py src/unit_test_api/apis/tags/minimum_api.py src/unit_test_api/apis/tags/multiple_of_api.py -src/unit_test_api/apis/tags/not_api.py src/unit_test_api/apis/tags/one_of_api.py src/unit_test_api/apis/tags/operation_request_body_api.py src/unit_test_api/apis/tags/path_post_api.py @@ -683,6 +683,7 @@ src/unit_test_api/apis/tags/type_api.py src/unit_test_api/apis/tags/unique_items_api.py src/unit_test_api/components/__init__.py src/unit_test_api/components/schema/__init__.py +src/unit_test_api/components/schema/_not.py src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py @@ -735,7 +736,6 @@ src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.p src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py src/unit_test_api/components/schema/nested_items.py src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py -src/unit_test_api/components/schema/not.py src/unit_test_api/components/schema/not_more_complex_schema.py src/unit_test_api/components/schema/nul_characters_in_strings.py src/unit_test_api/components/schema/null_type_matches_only_the_null_object.py diff --git a/samples/client/3_0_3_unit_test/python/README.md b/samples/client/3_0_3_unit_test/python/README.md index a601d645a3d..c782d21bbe4 100644 --- a/samples/client/3_0_3_unit_test/python/README.md +++ b/samples/client/3_0_3_unit_test/python/README.md @@ -202,7 +202,7 @@ HTTP request | Method | Description /requestBody/postEnumWithFalseDoesNotMatch0RequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_false_does_not_match0_request_body](docs/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.md) | /requestBody/postEnumWithTrueDoesNotMatch1RequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_true_does_not_match1_request_body](docs/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.md) | /requestBody/postEnumsInPropertiesRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enums_in_properties_request_body](docs/paths/request_body_post_enums_in_properties_request_body/post.md) | -/requestBody/postForbiddenPropertyRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) | +/requestBody/postForbiddenPropertyRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_request_body](docs/paths/request_body_post_forbidden_property_request_body/post.md) | /requestBody/postHostnameFormatRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) [FormatApi](docs/apis/tags/format_api.md).[post_hostname_format_request_body](docs/paths/request_body_post_hostname_format_request_body/post.md) | /requestBody/postIntegerTypeMatchesIntegersRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_integer_type_matches_integers_request_body](docs/paths/request_body_post_integer_type_matches_integers_request_body/post.md) | /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody **post** | [MultipleOfApi](docs/apis/tags/multiple_of_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body](docs/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.md) | @@ -225,8 +225,8 @@ HTTP request | Method | Description /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) [AnyOfApi](docs/apis/tags/any_of_api.md).[post_nested_anyof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.md) | /requestBody/postNestedItemsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) [ItemsApi](docs/apis/tags/items_api.md).[post_nested_items_request_body](docs/paths/request_body_post_nested_items_request_body/post.md) | /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [OneOfApi](docs/apis/tags/one_of_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_oneof_to_check_validation_semantics_request_body](docs/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.md) | -/requestBody/postNotMoreComplexSchemaRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) | -/requestBody/postNotRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [NotApi](docs/apis/tags/not_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) | +/requestBody/postNotMoreComplexSchemaRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_request_body](docs/paths/request_body_post_not_more_complex_schema_request_body/post.md) | +/requestBody/postNotRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [_NotApi](docs/apis/tags/_not_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_request_body](docs/paths/request_body_post_not_request_body/post.md) | /requestBody/postNulCharactersInStringsRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_nul_characters_in_strings_request_body](docs/paths/request_body_post_nul_characters_in_strings_request_body/post.md) | /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_null_type_matches_only_the_null_object_request_body](docs/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.md) | /requestBody/postNumberTypeMatchesNumbersRequestBody **post** | [OperationRequestBodyApi](docs/apis/tags/operation_request_body_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_number_type_matches_numbers_request_body](docs/paths/request_body_post_number_type_matches_numbers_request_body/post.md) | @@ -289,7 +289,7 @@ HTTP request | Method | Description /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_false_does_not_match0_response_body_for_content_types](docs/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.md) | /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enum_with_true_does_not_match1_response_body_for_content_types](docs/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.md) | /responseBody/postEnumsInPropertiesResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_enums_in_properties_response_body_for_content_types](docs/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.md) | -/responseBody/postForbiddenPropertyResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | +/responseBody/postForbiddenPropertyResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_forbidden_property_response_body_for_content_types](docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | /responseBody/postHostnameFormatResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [FormatApi](docs/apis/tags/format_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_hostname_format_response_body_for_content_types](docs/paths/response_body_post_hostname_format_response_body_for_content_types/post.md) | /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_integer_type_matches_integers_response_body_for_content_types](docs/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.md) | /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes **post** | [MultipleOfApi](docs/apis/tags/multiple_of_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types](docs/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.md) | @@ -312,8 +312,8 @@ HTTP request | Method | Description /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [AnyOfApi](docs/apis/tags/any_of_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_anyof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.md) | /responseBody/postNestedItemsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ItemsApi](docs/apis/tags/items_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_items_response_body_for_content_types](docs/paths/response_body_post_nested_items_response_body_for_content_types/post.md) | /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes **post** | [OneOfApi](docs/apis/tags/one_of_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nested_oneof_to_check_validation_semantics_response_body_for_content_types](docs/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.md) | -/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | -/responseBody/postNotResponseBodyForContentTypes **post** | [NotApi](docs/apis/tags/not_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) | +/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_more_complex_schema_response_body_for_content_types](docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | +/responseBody/postNotResponseBodyForContentTypes **post** | [_NotApi](docs/apis/tags/_not_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [PathPostApi](docs/apis/tags/path_post_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_not_response_body_for_content_types](docs/paths/response_body_post_not_response_body_for_content_types/post.md) | /responseBody/postNulCharactersInStringsResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) [EnumApi](docs/apis/tags/enum_api.md).[post_nul_characters_in_strings_response_body_for_content_types](docs/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.md) | /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_null_type_matches_only_the_null_object_response_body_for_content_types](docs/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.md) | /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes **post** | [PathPostApi](docs/apis/tags/path_post_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [ContentTypeJsonApi](docs/apis/tags/content_type_json_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [TypeApi](docs/apis/tags/type_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) [ResponseContentContentTypeSchemaApi](docs/apis/tags/response_content_content_type_schema_api.md).[post_number_type_matches_numbers_response_body_for_content_types](docs/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.md) | @@ -404,7 +404,7 @@ Class | Description [NestedAnyofToCheckValidationSemantics](docs/components/schema/nested_anyof_to_check_validation_semantics.md) | [NestedItems](docs/components/schema/nested_items.md) | [NestedOneofToCheckValidationSemantics](docs/components/schema/nested_oneof_to_check_validation_semantics.md) | -[Not](docs/components/schema/not.md) | +[_Not](docs/components/schema/_not.md) | [NotMoreComplexSchema](docs/components/schema/not_more_complex_schema.md) | [NulCharactersInStrings](docs/components/schema/nul_characters_in_strings.md) | [NullTypeMatchesOnlyTheNullObject](docs/components/schema/null_type_matches_only_the_null_object.md) | diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md index f1d695dc38b..dfd224ae2ed 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/forbidden_property.md @@ -54,9 +54,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[Not](#not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[_Not](#_not) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO -# Not +# _Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md index b0ca5d6504f..0deae4d934b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/components/schema/not_more_complex_schema.md @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[Not](#not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) +[_Not](#_not) | [NotDictInput](#notdictinput), [NotDict](#notdict) | [NotDict](#notdict) -# Not +# _Not ``` type: schemas.Schema ``` diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md index 4cfe00679d2..9f6b6d47e94 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_forbidden_property_request_body/post.md @@ -4,7 +4,7 @@ unit_test_api.paths.request_body_post_forbidden_property_request_body.operation | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_forbidden_property_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_forbidden_property_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_forbidden_property_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_forbidden_property_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -109,7 +109,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md index e65fd623351..526f9766094 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_more_complex_schema_request_body/post.md @@ -4,7 +4,7 @@ unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.opera | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_more_complex_schema_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_more_complex_schema_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -109,7 +109,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md index efb4c5a68aa..f84e41a222b 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post.md @@ -4,7 +4,7 @@ unit_test_api.paths.request_body_post_not_request_body.operation | Method Name | Api Class | Notes | | ----------- | --------- | ----- | | post_not_request_body | [OperationRequestBodyApi](../../apis/tags/operation_request_body_api.md) | This api is only for tag=operation.requestBody | -| post_not_request_body | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_request_body | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_request_body | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_request_body | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post | ApiForPost | This api is only for this endpoint | @@ -49,7 +49,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Return Types @@ -97,7 +97,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) # example passing only required values which don't have defaults set - body = not.Not.validate(None) + body = _not._Not.validate(None) try: api_response = api_instance.post_not_request_body( body=body, @@ -109,7 +109,7 @@ with unit_test_api.ApiClient(used_configuration) as api_client: [[Back to top]](#top) [[Back to OperationRequestBodyApi API]](../../apis/tags/operation_request_body_api.md) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) \ No newline at end of file diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md index e162a0a7b57..6d44ea35a50 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md index da449217a99..e782eee6871 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_forbidden_property_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_forbidden_property_response_body_for_cont | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_forbidden_property_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_forbidden_property_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_forbidden_property_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_forbidden_property_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_forbidden_property_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_forbidden_property_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index 627eda73e39..00a52498cda 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_more_complex_schema_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_more_complex_schema_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index b3332703e5a..365b2bbe3c8 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_not_response_body_for_content_types.opera | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -66,7 +66,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Servers @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md index d862f126030..e821bba20a4 100644 --- a/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md +++ b/samples/client/3_0_3_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py index 8d5e7a3ebac..62866c1972f 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tag_to_api.py @@ -11,7 +11,7 @@ from unit_test_api.apis.tags.multiple_of_api import MultipleOfApi from unit_test_api.apis.tags.format_api import FormatApi from unit_test_api.apis.tags.enum_api import EnumApi -from unit_test_api.apis.tags.not_api import NotApi +from unit_test_api.apis.tags._not_api import _NotApi from unit_test_api.apis.tags.default_api import DefaultApi from unit_test_api.apis.tags.maximum_api import MaximumApi from unit_test_api.apis.tags.max_items_api import MaxItemsApi @@ -43,7 +43,7 @@ "multipleOf": typing.Type[MultipleOfApi], "format": typing.Type[FormatApi], "enum": typing.Type[EnumApi], - "not": typing.Type[NotApi], + "not": typing.Type[_NotApi], "default": typing.Type[DefaultApi], "maximum": typing.Type[MaximumApi], "maxItems": typing.Type[MaxItemsApi], @@ -76,7 +76,7 @@ "multipleOf": MultipleOfApi, "format": FormatApi, "enum": EnumApi, - "not": NotApi, + "not": _NotApi, "default": DefaultApi, "maximum": MaximumApi, "maxItems": MaxItemsApi, diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index 00f00f63247..43fe91544f3 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -46,7 +46,7 @@ def __new__( arg_[key_] = val arg_.update(kwargs) used_arg_ = typing.cast(NotDictInput, arg_) - return Not.validate(used_arg_, configuration=configuration_) + return _Not.validate(used_arg_, configuration=configuration_) @staticmethod def from_dict_( @@ -56,7 +56,7 @@ def from_dict_( ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> NotDict: - return Not.validate(arg, configuration=configuration) + return _Not.validate(arg, configuration=configuration) @property def foo(self) -> typing.Union[str, schemas.Unset]: @@ -75,7 +75,7 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS @dataclasses.dataclass(frozen=True) -class Not( +class _Not( schemas.Schema[NotDict, tuple] ): types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) @@ -115,5 +115,5 @@ class NotMoreComplexSchema( Do not edit the class manually. """ # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py index 1764bbf1f22..01293605bb2 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py @@ -10,6 +10,8 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference AllOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py index 070c9eaffe6..8552478f77b 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py @@ -10,6 +10,8 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference AnyOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py index e7d8fad7430..207b523b5be 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py @@ -24,3 +24,5 @@ class RefInNot( # any type not_: typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference] = dataclasses.field(default_factory=lambda: property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference) # type: ignore + +from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py index af3526bcaaf..1b4425f219e 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py @@ -10,6 +10,8 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from unit_test_api.components.schema import property_named_ref_that_is_not_a_reference OneOf = typing.Tuple[ typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference], ] diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py index 68c8f77e506..7244d2f60b7 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schemas/__init__.py @@ -63,7 +63,7 @@ from unit_test_api.components.schema.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics from unit_test_api.components.schema.nested_items import NestedItems from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api.components.schema.not import Not +from unit_test_api.components.schema._not import _Not from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings from unit_test_api.components.schema.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py index ca1d6ae6f0a..538a42fdf50 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py @@ -9,7 +9,7 @@ from unit_test_api import api_client from unit_test_api.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not +from unit_test_api.components.schema import _not from .. import path from .responses import response_200 diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py index 74344df6988..ed5c9c4760f 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not -Schema: typing_extensions.TypeAlias = not.Not +from unit_test_api.components.schema import _not +Schema: typing_extensions.TypeAlias = _not._Not diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py index 74344df6988..ed5c9c4760f 100644 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ b/samples/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not -Schema: typing_extensions.TypeAlias = not.Not +from unit_test_api.components.schema import _not +Schema: typing_extensions.TypeAlias = _not._Not diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md index 23bad84b6e8..66ec8e109bf 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndElseWithoutThen.md @@ -18,22 +18,22 @@ A class that contains necessary nested | record | [IfAndElseWithoutThen.IfAndElseWithoutThen1BoxedList](#ifandelsewithoutthen1boxedlist)
          boxed class to store validated List payloads | | record | [IfAndElseWithoutThen.IfAndElseWithoutThen1BoxedMap](#ifandelsewithoutthen1boxedmap)
          boxed class to store validated Map payloads | | static class | [IfAndElseWithoutThen.IfAndElseWithoutThen1](#ifandelsewithoutthen1)
          schema class | -| sealed interface | [IfAndElseWithoutThen.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [IfAndElseWithoutThen.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndElseWithoutThen.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndElseWithoutThen.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndElseWithoutThen.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndElseWithoutThen.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndElseWithoutThen.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndElseWithoutThen.If](#if)
          schema class | -| sealed interface | [IfAndElseWithoutThen.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | -| record | [IfAndElseWithoutThen.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndElseWithoutThen.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndElseWithoutThen.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndElseWithoutThen.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndElseWithoutThen.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndElseWithoutThen.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndElseWithoutThen.Else](#else)
          schema class | +| sealed interface | [IfAndElseWithoutThen.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndElseWithoutThen.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndElseWithoutThen.IfSchema](#ifschema)
          schema class | +| sealed interface | [IfAndElseWithoutThen.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndElseWithoutThen.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndElseWithoutThen.ElseSchema](#elseschema)
          schema class | ## IfAndElseWithoutThen1Boxed public sealed interface IfAndElseWithoutThen1Boxed
          @@ -158,8 +158,8 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | -| Class | elseSchema = [Else.class](#else) | +| Class | if = [IfSchema.class](#ifschema) | +| Class | elseSchema = [ElseSchema.class](#elseschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -183,28 +183,28 @@ A schema class that validates payloads | [IfAndElseWithoutThen1Boxed](#ifandelsewithoutthen1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -212,16 +212,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -229,16 +229,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -246,16 +246,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -263,16 +263,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -280,16 +280,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -297,8 +297,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -321,37 +321,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseBoxed -public sealed interface ElseBoxed
          +## ElseSchemaBoxed +public sealed interface ElseSchemaBoxed
          permits
          -[ElseBoxedVoid](#elseboxedvoid), -[ElseBoxedBoolean](#elseboxedboolean), -[ElseBoxedNumber](#elseboxednumber), -[ElseBoxedString](#elseboxedstring), -[ElseBoxedList](#elseboxedlist), -[ElseBoxedMap](#elseboxedmap) +[ElseSchemaBoxedVoid](#elseschemaboxedvoid), +[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), +[ElseSchemaBoxedNumber](#elseschemaboxednumber), +[ElseSchemaBoxedString](#elseschemaboxedstring), +[ElseSchemaBoxedList](#elseschemaboxedlist), +[ElseSchemaBoxedMap](#elseschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseBoxedVoid -public record ElseBoxedVoid
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedVoid +public record ElseSchemaBoxedVoid
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -359,16 +359,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedBoolean -public record ElseBoxedBoolean
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedBoolean +public record ElseSchemaBoxedBoolean
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -376,16 +376,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedNumber -public record ElseBoxedNumber
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedNumber +public record ElseSchemaBoxedNumber
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -393,16 +393,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedString -public record ElseBoxedString
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedString +public record ElseSchemaBoxedString
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedString(String data)
          Creates an instance, private visibility | +| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -410,16 +410,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedList -public record ElseBoxedList
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedList +public record ElseSchemaBoxedList
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -427,16 +427,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedMap -public record ElseBoxedMap
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedMap +public record ElseSchemaBoxedMap
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -444,8 +444,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Else -public static class Else
          +## ElseSchema +public static class ElseSchema
          extends JsonSchema A schema class that validates payloads @@ -468,13 +468,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md index 30168d5f831..7f611633c05 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAndThenWithoutElse.md @@ -26,14 +26,14 @@ A class that contains necessary nested | record | [IfAndThenWithoutElse.ThenBoxedList](#thenboxedlist)
          boxed class to store validated List payloads | | record | [IfAndThenWithoutElse.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [IfAndThenWithoutElse.Then](#then)
          schema class | -| sealed interface | [IfAndThenWithoutElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [IfAndThenWithoutElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAndThenWithoutElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAndThenWithoutElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAndThenWithoutElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [IfAndThenWithoutElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [IfAndThenWithoutElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAndThenWithoutElse.If](#if)
          schema class | +| sealed interface | [IfAndThenWithoutElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IfAndThenWithoutElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAndThenWithoutElse.IfSchema](#ifschema)
          schema class | ## IfAndThenWithoutElse1Boxed public sealed interface IfAndThenWithoutElse1Boxed
          @@ -158,7 +158,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | +| Class | if = [IfSchema.class](#ifschema) | | Class | then = [Then.class](#then) | ### Method Summary @@ -330,28 +330,28 @@ A schema class that validates payloads | [ThenBoxed](#thenboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -359,16 +359,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -376,16 +376,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -393,16 +393,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -410,16 +410,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -427,16 +427,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -444,8 +444,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -468,13 +468,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md index cf769cf4aa2..35f6c235a13 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.md @@ -28,22 +28,22 @@ A class that contains necessary nested | record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.Then](#then)
          schema class | | enum | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.StringThenConst](#stringthenconst)
          String enum | -| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.If](#if)
          schema class | -| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | -| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | -| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.Else](#else)
          schema class | +| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfSchema](#ifschema)
          schema class | +| sealed interface | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.ElseSchema](#elseschema)
          schema class | | enum | [IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.StringElseConst](#stringelseconst)
          String enum | ## IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed @@ -169,9 +169,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | +| Class | if = [IfSchema.class](#ifschema) | | Class | then = [Then.class](#then) | -| Class | elseSchema = [Else.class](#else) | +| Class | elseSchema = [ElseSchema.class](#elseschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -353,28 +353,28 @@ A class that stores String enum values | ------------- | ----------- | | YES | value = "yes" | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -382,16 +382,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -399,16 +399,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -416,16 +416,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -433,16 +433,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -450,16 +450,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -467,8 +467,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -491,37 +491,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseBoxed -public sealed interface ElseBoxed
          +## ElseSchemaBoxed +public sealed interface ElseSchemaBoxed
          permits
          -[ElseBoxedVoid](#elseboxedvoid), -[ElseBoxedBoolean](#elseboxedboolean), -[ElseBoxedNumber](#elseboxednumber), -[ElseBoxedString](#elseboxedstring), -[ElseBoxedList](#elseboxedlist), -[ElseBoxedMap](#elseboxedmap) +[ElseSchemaBoxedVoid](#elseschemaboxedvoid), +[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), +[ElseSchemaBoxedNumber](#elseschemaboxednumber), +[ElseSchemaBoxedString](#elseschemaboxedstring), +[ElseSchemaBoxedList](#elseschemaboxedlist), +[ElseSchemaBoxedMap](#elseschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseBoxedVoid -public record ElseBoxedVoid
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedVoid +public record ElseSchemaBoxedVoid
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -529,16 +529,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedBoolean -public record ElseBoxedBoolean
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedBoolean +public record ElseSchemaBoxedBoolean
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -546,16 +546,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedNumber -public record ElseBoxedNumber
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedNumber +public record ElseSchemaBoxedNumber
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -563,16 +563,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedString -public record ElseBoxedString
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedString +public record ElseSchemaBoxedString
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedString(String data)
          Creates an instance, private visibility | +| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -580,16 +580,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedList -public record ElseBoxedList
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedList +public record ElseSchemaBoxedList
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -597,16 +597,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedMap -public record ElseBoxedMap
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedMap +public record ElseSchemaBoxedMap
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -614,8 +614,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Else -public static class Else
          +## ElseSchema +public static class ElseSchema
          extends JsonSchema A schema class that validates payloads @@ -638,13 +638,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringElseConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md index 242395210ce..dc5da4ce435 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreElseWithoutIf.md @@ -19,14 +19,14 @@ A class that contains necessary nested | record | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1BoxedList](#ignoreelsewithoutif1boxedlist)
          boxed class to store validated List payloads | | record | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1BoxedMap](#ignoreelsewithoutif1boxedmap)
          boxed class to store validated Map payloads | | static class | [IgnoreElseWithoutIf.IgnoreElseWithoutIf1](#ignoreelsewithoutif1)
          schema class | -| sealed interface | [IgnoreElseWithoutIf.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | -| record | [IgnoreElseWithoutIf.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | -| static class | [IgnoreElseWithoutIf.Else](#else)
          schema class | +| sealed interface | [IgnoreElseWithoutIf.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IgnoreElseWithoutIf.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IgnoreElseWithoutIf.ElseSchema](#elseschema)
          schema class | | enum | [IgnoreElseWithoutIf.StringElseConst](#stringelseconst)
          String enum | ## IgnoreElseWithoutIf1Boxed @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | elseSchema = [Else.class](#else) | +| Class | elseSchema = [ElseSchema.class](#elseschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -176,28 +176,28 @@ A schema class that validates payloads | [IgnoreElseWithoutIf1Boxed](#ignoreelsewithoutif1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseBoxed -public sealed interface ElseBoxed
          +## ElseSchemaBoxed +public sealed interface ElseSchemaBoxed
          permits
          -[ElseBoxedVoid](#elseboxedvoid), -[ElseBoxedBoolean](#elseboxedboolean), -[ElseBoxedNumber](#elseboxednumber), -[ElseBoxedString](#elseboxedstring), -[ElseBoxedList](#elseboxedlist), -[ElseBoxedMap](#elseboxedmap) +[ElseSchemaBoxedVoid](#elseschemaboxedvoid), +[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), +[ElseSchemaBoxedNumber](#elseschemaboxednumber), +[ElseSchemaBoxedString](#elseschemaboxedstring), +[ElseSchemaBoxedList](#elseschemaboxedlist), +[ElseSchemaBoxedMap](#elseschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseBoxedVoid -public record ElseBoxedVoid
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedVoid +public record ElseSchemaBoxedVoid
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -205,16 +205,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedBoolean -public record ElseBoxedBoolean
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedBoolean +public record ElseSchemaBoxedBoolean
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -222,16 +222,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedNumber -public record ElseBoxedNumber
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedNumber +public record ElseSchemaBoxedNumber
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,16 +239,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedString -public record ElseBoxedString
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedString +public record ElseSchemaBoxedString
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedString(String data)
          Creates an instance, private visibility | +| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -256,16 +256,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedList -public record ElseBoxedList
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedList +public record ElseSchemaBoxedList
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -273,16 +273,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedMap -public record ElseBoxedMap
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedMap +public record ElseSchemaBoxedMap
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -290,8 +290,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Else -public static class Else
          +## ElseSchema +public static class ElseSchema
          extends JsonSchema A schema class that validates payloads @@ -314,13 +314,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringElseConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md index 7a3b61ef811..8c9062f441c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/IgnoreIfWithoutThenOrElse.md @@ -19,14 +19,14 @@ A class that contains necessary nested | record | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1BoxedList](#ignoreifwithoutthenorelse1boxedlist)
          boxed class to store validated List payloads | | record | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1BoxedMap](#ignoreifwithoutthenorelse1boxedmap)
          boxed class to store validated Map payloads | | static class | [IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1](#ignoreifwithoutthenorelse1)
          schema class | -| sealed interface | [IgnoreIfWithoutThenOrElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [IgnoreIfWithoutThenOrElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [IgnoreIfWithoutThenOrElse.If](#if)
          schema class | +| sealed interface | [IgnoreIfWithoutThenOrElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [IgnoreIfWithoutThenOrElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [IgnoreIfWithoutThenOrElse.IfSchema](#ifschema)
          schema class | | enum | [IgnoreIfWithoutThenOrElse.StringIfConst](#stringifconst)
          String enum | ## IgnoreIfWithoutThenOrElse1Boxed @@ -152,7 +152,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | +| Class | if = [IfSchema.class](#ifschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -176,28 +176,28 @@ A schema class that validates payloads | [IgnoreIfWithoutThenOrElse1Boxed](#ignoreifwithoutthenorelse1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -205,16 +205,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -222,16 +222,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,16 +239,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -256,16 +256,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -273,16 +273,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -290,8 +290,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -314,13 +314,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## StringIfConst diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md index 980d373f1f4..727c527c7b2 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/NonInterferenceAcrossCombinedSchemas.md @@ -26,14 +26,14 @@ A class that contains necessary nested | record | [NonInterferenceAcrossCombinedSchemas.Schema2BoxedList](#schema2boxedlist)
          boxed class to store validated List payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema2BoxedMap](#schema2boxedmap)
          boxed class to store validated Map payloads | | static class | [NonInterferenceAcrossCombinedSchemas.Schema2](#schema2)
          schema class | -| sealed interface | [NonInterferenceAcrossCombinedSchemas.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | -| record | [NonInterferenceAcrossCombinedSchemas.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | -| static class | [NonInterferenceAcrossCombinedSchemas.Else](#else)
          schema class | +| sealed interface | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | +| record | [NonInterferenceAcrossCombinedSchemas.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [NonInterferenceAcrossCombinedSchemas.ElseSchema](#elseschema)
          schema class | | sealed interface | [NonInterferenceAcrossCombinedSchemas.Schema1Boxed](#schema1boxed)
          sealed interface for validated payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema1BoxedVoid](#schema1boxedvoid)
          boxed class to store validated null payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema1BoxedBoolean](#schema1boxedboolean)
          boxed class to store validated boolean payloads | @@ -58,14 +58,14 @@ A class that contains necessary nested | record | [NonInterferenceAcrossCombinedSchemas.Schema0BoxedList](#schema0boxedlist)
          boxed class to store validated List payloads | | record | [NonInterferenceAcrossCombinedSchemas.Schema0BoxedMap](#schema0boxedmap)
          boxed class to store validated Map payloads | | static class | [NonInterferenceAcrossCombinedSchemas.Schema0](#schema0)
          schema class | -| sealed interface | [NonInterferenceAcrossCombinedSchemas.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [NonInterferenceAcrossCombinedSchemas.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [NonInterferenceAcrossCombinedSchemas.If](#if)
          schema class | +| sealed interface | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [NonInterferenceAcrossCombinedSchemas.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [NonInterferenceAcrossCombinedSchemas.IfSchema](#ifschema)
          schema class | ## NonInterferenceAcrossCombinedSchemas1Boxed public sealed interface NonInterferenceAcrossCombinedSchemas1Boxed
          @@ -337,7 +337,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | elseSchema = [Else.class](#else) | +| Class | elseSchema = [ElseSchema.class](#elseschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -361,28 +361,28 @@ A schema class that validates payloads | [Schema2Boxed](#schema2boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseBoxed -public sealed interface ElseBoxed
          +## ElseSchemaBoxed +public sealed interface ElseSchemaBoxed
          permits
          -[ElseBoxedVoid](#elseboxedvoid), -[ElseBoxedBoolean](#elseboxedboolean), -[ElseBoxedNumber](#elseboxednumber), -[ElseBoxedString](#elseboxedstring), -[ElseBoxedList](#elseboxedlist), -[ElseBoxedMap](#elseboxedmap) +[ElseSchemaBoxedVoid](#elseschemaboxedvoid), +[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), +[ElseSchemaBoxedNumber](#elseschemaboxednumber), +[ElseSchemaBoxedString](#elseschemaboxedstring), +[ElseSchemaBoxedList](#elseschemaboxedlist), +[ElseSchemaBoxedMap](#elseschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseBoxedVoid -public record ElseBoxedVoid
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedVoid +public record ElseSchemaBoxedVoid
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -390,16 +390,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedBoolean -public record ElseBoxedBoolean
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedBoolean +public record ElseSchemaBoxedBoolean
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -407,16 +407,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedNumber -public record ElseBoxedNumber
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedNumber +public record ElseSchemaBoxedNumber
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -424,16 +424,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedString -public record ElseBoxedString
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedString +public record ElseSchemaBoxedString
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedString(String data)
          Creates an instance, private visibility | +| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -441,16 +441,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedList -public record ElseBoxedList
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedList +public record ElseSchemaBoxedList
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -458,16 +458,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedMap -public record ElseBoxedMap
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedMap +public record ElseSchemaBoxedMap
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -475,8 +475,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Else -public static class Else
          +## ElseSchema +public static class ElseSchema
          extends JsonSchema A schema class that validates payloads @@ -499,13 +499,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Schema1Boxed @@ -925,7 +925,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | +| Class | if = [IfSchema.class](#ifschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -949,28 +949,28 @@ A schema class that validates payloads | [Schema0Boxed](#schema0boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -978,16 +978,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -995,16 +995,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1012,16 +1012,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1029,16 +1029,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1046,16 +1046,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1063,8 +1063,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -1087,13 +1087,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index 79d86cedacc..89fe00d535c 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -25,14 +25,14 @@ A class that contains necessary nested | sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ConstructorBoxed](#constructorboxed)
          sealed interface for validated payloads | | record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ConstructorBoxedNumber](#constructorboxednumber)
          boxed class to store validated Number payloads | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.Constructor](#constructor)
          schema class | -| sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxed](#tostringboxed)
          sealed interface for validated payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedVoid](#tostringboxedvoid)
          boxed class to store validated null payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedBoolean](#tostringboxedboolean)
          boxed class to store validated boolean payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedNumber](#tostringboxednumber)
          boxed class to store validated Number payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedString](#tostringboxedstring)
          boxed class to store validated String payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedList](#tostringboxedlist)
          boxed class to store validated List payloads | -| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringBoxedMap](#tostringboxedmap)
          boxed class to store validated Map payloads | -| static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToString](#tostring)
          schema class | +| sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxed](#tostringschemaboxed)
          sealed interface for validated payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedVoid](#tostringschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedNumber](#tostringschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedString](#tostringschemaboxedstring)
          boxed class to store validated String payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedList](#tostringschemaboxedlist)
          boxed class to store validated List payloads | +| record | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchemaBoxedMap](#tostringschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringSchema](#tostringschema)
          schema class | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringMapBuilder](#tostringmapbuilder)
          builder for Map payloads | | static class | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.ToStringMap](#tostringmap)
          output class for Map payloads | | sealed interface | [PropertiesWhoseNamesAreJavascriptObjectPropertyNames.LengthBoxed](#lengthboxed)
          sealed interface for validated payloads | @@ -165,7 +165,7 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("__proto__", [Proto.class](#proto))),
              new PropertyEntry("toString", [ToString.class](#tostring))),
              new PropertyEntry("constructor", [Constructor.class](#constructor)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("__proto__", [Proto.class](#proto))),
              new PropertyEntry("toString", [ToStringSchema.class](#tostringschema))),
              new PropertyEntry("constructor", [Constructor.class](#constructor)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -241,9 +241,8 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap](#propertieswhosenamesarejavascriptobjectpropertynamesmap) | of([Map](#propertieswhosenamesarejavascriptobjectpropertynamesmapbuilder) arg, SchemaConfiguration configuration) | -| @Nullable Object | toString()
          [optional] | | Number | constructor()
          [optional] | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], instance["toString"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## ConstructorBoxed @@ -281,28 +280,28 @@ A schema class that validates payloads | validate | | validateAndBox | -## ToStringBoxed -public sealed interface ToStringBoxed
          +## ToStringSchemaBoxed +public sealed interface ToStringSchemaBoxed
          permits
          -[ToStringBoxedVoid](#tostringboxedvoid), -[ToStringBoxedBoolean](#tostringboxedboolean), -[ToStringBoxedNumber](#tostringboxednumber), -[ToStringBoxedString](#tostringboxedstring), -[ToStringBoxedList](#tostringboxedlist), -[ToStringBoxedMap](#tostringboxedmap) +[ToStringSchemaBoxedVoid](#tostringschemaboxedvoid), +[ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean), +[ToStringSchemaBoxedNumber](#tostringschemaboxednumber), +[ToStringSchemaBoxedString](#tostringschemaboxedstring), +[ToStringSchemaBoxedList](#tostringschemaboxedlist), +[ToStringSchemaBoxedMap](#tostringschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ToStringBoxedVoid -public record ToStringBoxedVoid
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedVoid +public record ToStringSchemaBoxedVoid
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedVoid(Void data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -310,16 +309,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringBoxedBoolean -public record ToStringBoxedBoolean
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedBoolean +public record ToStringSchemaBoxedBoolean
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -327,16 +326,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringBoxedNumber -public record ToStringBoxedNumber
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedNumber +public record ToStringSchemaBoxedNumber
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedNumber(Number data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -344,16 +343,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringBoxedString -public record ToStringBoxedString
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedString +public record ToStringSchemaBoxedString
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedString(String data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -361,16 +360,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringBoxedList -public record ToStringBoxedList
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedList +public record ToStringSchemaBoxedList
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -378,16 +377,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToStringBoxedMap -public record ToStringBoxedMap
          -implements [ToStringBoxed](#tostringboxed) +## ToStringSchemaBoxedMap +public record ToStringSchemaBoxedMap
          +implements [ToStringSchemaBoxed](#tostringschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ToStringBoxedMap([ToStringMap](#tostringmap) data)
          Creates an instance, private visibility | +| ToStringSchemaBoxedMap([ToStringMap](#tostringmap) data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -395,8 +394,8 @@ record that stores validated Map payloads, sealed permits implementation | [ToStringMap](#tostringmap) | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ToString -public static class ToString
          +## ToStringSchema +public static class ToStringSchema
          extends JsonSchema A schema class that validates payloads @@ -419,13 +418,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | [ToStringMap](#tostringmap) | validate([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ToStringBoxedString](#tostringboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ToStringBoxedVoid](#tostringboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ToStringBoxedNumber](#tostringboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ToStringBoxedBoolean](#tostringboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ToStringBoxedMap](#tostringboxedmap) | validateAndBox([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | -| [ToStringBoxedList](#tostringboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ToStringBoxed](#tostringboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedString](#tostringschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedVoid](#tostringschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedNumber](#tostringschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedBoolean](#tostringschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedMap](#tostringschemaboxedmap) | validateAndBox([Map<?, ?>](#tostringmapbuilder) arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxedList](#tostringschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ToStringSchemaBoxed](#tostringschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## ToStringMapBuilder diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md index a11d3f1046e..490111f55e8 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.md @@ -419,8 +419,7 @@ A class to store validated Map payloads | ----------------- | ---------------------- | | static [RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap](#requiredpropertieswhosenamesarejavascriptobjectpropertynamesmap) | of([Map](#requiredpropertieswhosenamesarejavascriptobjectpropertynamesmapbuilder) arg, SchemaConfiguration configuration) | | @Nullable Object | constructor()
          | -| @Nullable Object | toString()
          | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["__proto__"], instance["toString"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md index 92addae6f95..38fda5efcca 100644 --- a/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md +++ b/samples/client/3_1_0_unit_test/java/docs/components/schemas/ValidateAgainstCorrectBranchThenVsElse.md @@ -26,22 +26,22 @@ A class that contains necessary nested | record | [ValidateAgainstCorrectBranchThenVsElse.ThenBoxedList](#thenboxedlist)
          boxed class to store validated List payloads | | record | [ValidateAgainstCorrectBranchThenVsElse.ThenBoxedMap](#thenboxedmap)
          boxed class to store validated Map payloads | | static class | [ValidateAgainstCorrectBranchThenVsElse.Then](#then)
          schema class | -| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.IfBoxed](#ifboxed)
          sealed interface for validated payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedVoid](#ifboxedvoid)
          boxed class to store validated null payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedBoolean](#ifboxedboolean)
          boxed class to store validated boolean payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedNumber](#ifboxednumber)
          boxed class to store validated Number payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedString](#ifboxedstring)
          boxed class to store validated String payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedList](#ifboxedlist)
          boxed class to store validated List payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.IfBoxedMap](#ifboxedmap)
          boxed class to store validated Map payloads | -| static class | [ValidateAgainstCorrectBranchThenVsElse.If](#if)
          schema class | -| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxed](#elseboxed)
          sealed interface for validated payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedVoid](#elseboxedvoid)
          boxed class to store validated null payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedBoolean](#elseboxedboolean)
          boxed class to store validated boolean payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedNumber](#elseboxednumber)
          boxed class to store validated Number payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedString](#elseboxedstring)
          boxed class to store validated String payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedList](#elseboxedlist)
          boxed class to store validated List payloads | -| record | [ValidateAgainstCorrectBranchThenVsElse.ElseBoxedMap](#elseboxedmap)
          boxed class to store validated Map payloads | -| static class | [ValidateAgainstCorrectBranchThenVsElse.Else](#else)
          schema class | +| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxed](#ifschemaboxed)
          sealed interface for validated payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedVoid](#ifschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedBoolean](#ifschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedNumber](#ifschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedString](#ifschemaboxedstring)
          boxed class to store validated String payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedList](#ifschemaboxedlist)
          boxed class to store validated List payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.IfSchemaBoxedMap](#ifschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [ValidateAgainstCorrectBranchThenVsElse.IfSchema](#ifschema)
          schema class | +| sealed interface | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxed](#elseschemaboxed)
          sealed interface for validated payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedVoid](#elseschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedBoolean](#elseschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedNumber](#elseschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedString](#elseschemaboxedstring)
          boxed class to store validated String payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedList](#elseschemaboxedlist)
          boxed class to store validated List payloads | +| record | [ValidateAgainstCorrectBranchThenVsElse.ElseSchemaBoxedMap](#elseschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [ValidateAgainstCorrectBranchThenVsElse.ElseSchema](#elseschema)
          schema class | ## ValidateAgainstCorrectBranchThenVsElse1Boxed public sealed interface ValidateAgainstCorrectBranchThenVsElse1Boxed
          @@ -166,9 +166,9 @@ A schema class that validates payloads ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Class | if = [If.class](#if) | +| Class | if = [IfSchema.class](#ifschema) | | Class | then = [Then.class](#then) | -| Class | elseSchema = [Else.class](#else) | +| Class | elseSchema = [ElseSchema.class](#elseschema) | ### Method Summary | Modifier and Type | Method and Description | @@ -339,28 +339,28 @@ A schema class that validates payloads | [ThenBoxed](#thenboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## IfBoxed -public sealed interface IfBoxed
          +## IfSchemaBoxed +public sealed interface IfSchemaBoxed
          permits
          -[IfBoxedVoid](#ifboxedvoid), -[IfBoxedBoolean](#ifboxedboolean), -[IfBoxedNumber](#ifboxednumber), -[IfBoxedString](#ifboxedstring), -[IfBoxedList](#ifboxedlist), -[IfBoxedMap](#ifboxedmap) +[IfSchemaBoxedVoid](#ifschemaboxedvoid), +[IfSchemaBoxedBoolean](#ifschemaboxedboolean), +[IfSchemaBoxedNumber](#ifschemaboxednumber), +[IfSchemaBoxedString](#ifschemaboxedstring), +[IfSchemaBoxedList](#ifschemaboxedlist), +[IfSchemaBoxedMap](#ifschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## IfBoxedVoid -public record IfBoxedVoid
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedVoid +public record IfSchemaBoxedVoid
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedVoid(Void data)
          Creates an instance, private visibility | +| IfSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -368,16 +368,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedBoolean -public record IfBoxedBoolean
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedBoolean +public record IfSchemaBoxedBoolean
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| IfSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -385,16 +385,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedNumber -public record IfBoxedNumber
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedNumber +public record IfSchemaBoxedNumber
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedNumber(Number data)
          Creates an instance, private visibility | +| IfSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -402,16 +402,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedString -public record IfBoxedString
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedString +public record IfSchemaBoxedString
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedString(String data)
          Creates an instance, private visibility | +| IfSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -419,16 +419,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedList -public record IfBoxedList
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedList +public record IfSchemaBoxedList
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -436,16 +436,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## IfBoxedMap -public record IfBoxedMap
          -implements [IfBoxed](#ifboxed) +## IfSchemaBoxedMap +public record IfSchemaBoxedMap
          +implements [IfSchemaBoxed](#ifschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IfBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| IfSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -453,8 +453,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## If -public static class If
          +## IfSchema +public static class IfSchema
          extends JsonSchema A schema class that validates payloads @@ -477,37 +477,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [IfBoxedString](#ifboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [IfBoxedVoid](#ifboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [IfBoxedNumber](#ifboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IfBoxedBoolean](#ifboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [IfBoxedMap](#ifboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [IfBoxedList](#ifboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [IfBoxed](#ifboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedString](#ifschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedVoid](#ifschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedNumber](#ifschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedBoolean](#ifschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedMap](#ifschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [IfSchemaBoxedList](#ifschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [IfSchemaBoxed](#ifschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## ElseBoxed -public sealed interface ElseBoxed
          +## ElseSchemaBoxed +public sealed interface ElseSchemaBoxed
          permits
          -[ElseBoxedVoid](#elseboxedvoid), -[ElseBoxedBoolean](#elseboxedboolean), -[ElseBoxedNumber](#elseboxednumber), -[ElseBoxedString](#elseboxedstring), -[ElseBoxedList](#elseboxedlist), -[ElseBoxedMap](#elseboxedmap) +[ElseSchemaBoxedVoid](#elseschemaboxedvoid), +[ElseSchemaBoxedBoolean](#elseschemaboxedboolean), +[ElseSchemaBoxedNumber](#elseschemaboxednumber), +[ElseSchemaBoxedString](#elseschemaboxedstring), +[ElseSchemaBoxedList](#elseschemaboxedlist), +[ElseSchemaBoxedMap](#elseschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## ElseBoxedVoid -public record ElseBoxedVoid
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedVoid +public record ElseSchemaBoxedVoid
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedVoid(Void data)
          Creates an instance, private visibility | +| ElseSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -515,16 +515,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedBoolean -public record ElseBoxedBoolean
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedBoolean +public record ElseSchemaBoxedBoolean
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| ElseSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -532,16 +532,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedNumber -public record ElseBoxedNumber
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedNumber +public record ElseSchemaBoxedNumber
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedNumber(Number data)
          Creates an instance, private visibility | +| ElseSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -549,16 +549,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedString -public record ElseBoxedString
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedString +public record ElseSchemaBoxedString
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedString(String data)
          Creates an instance, private visibility | +| ElseSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -566,16 +566,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedList -public record ElseBoxedList
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedList +public record ElseSchemaBoxedList
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -583,16 +583,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## ElseBoxedMap -public record ElseBoxedMap
          -implements [ElseBoxed](#elseboxed) +## ElseSchemaBoxedMap +public record ElseSchemaBoxedMap
          +implements [ElseSchemaBoxed](#elseschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ElseBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -600,8 +600,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Else -public static class Else
          +## ElseSchema +public static class ElseSchema
          extends JsonSchema A schema class that validates payloads @@ -624,13 +624,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [ElseBoxedString](#elseboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [ElseBoxedVoid](#elseboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [ElseBoxedNumber](#elseboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [ElseBoxedBoolean](#elseboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [ElseBoxedMap](#elseboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [ElseBoxedList](#elseboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [ElseBoxed](#elseboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedString](#elseschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedVoid](#elseschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedNumber](#elseschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedBoolean](#elseschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedMap](#elseschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxedList](#elseschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [ElseSchemaBoxed](#elseschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java index 348d7ffd3fb..507dbc069ab 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java @@ -16,8 +16,10 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; @@ -29,6 +31,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java index c1dc5bacc2e..8e7bc5d7152 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Allof.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java index bf14383c104..fa51a189f38 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofCombinedWithAnyofOneof.java @@ -1,4 +1,5 @@ package org.openapijsonschematools.client.components.schemas; +import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.ArrayList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java index 8968227f734..b2d64cdcdff 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithBaseSchema.java @@ -18,6 +18,8 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.NullJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java index dffa31278f9..09d4d5bd234 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithOneEmptySchema.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java index c9b1f4a933c..5db2ddd6167 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheFirstEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java index 78f6e9d4040..17920aead56 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTheLastEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java index 241ab07693f..3fbe112d6c6 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AllofWithTwoEmptySchemas.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java index 43696f26f02..65d6fc3dc39 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Anyof.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java index c2f66f7defb..713f9fcbc2e 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofComplexTypes.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java index 2b166776e74..dd8146a6928 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithBaseSchema.java @@ -1,15 +1,31 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java index 33583e2bf32..70fdcfb67c3 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyofWithOneEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java index 2132a11b594..dcffcc4c62b 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ForbiddenProperty.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java index 5ab443fa24d..6ee6e0267b7 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IfAndElseWithoutThen.java @@ -35,46 +35,46 @@ public class IfAndElseWithoutThen { // nest classes so all schemas and input/output classes can be public - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { @Nullable Object getData(); } - public record ElseBoxedVoid(Void data) implements ElseBoxed { + public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedNumber(Number data) implements ElseBoxed { + public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedString(String data) implements ElseBoxed { + public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -82,18 +82,18 @@ public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxe } - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; + public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { + private static @Nullable ElseSchema instance = null; - protected Else() { + protected ElseSchema() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static Else getInstance() { + public static ElseSchema getInstance() { if (instance == null) { - instance = new Else(); + instance = new ElseSchema(); } return instance; } @@ -276,31 +276,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); + public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); + public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); + public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); + public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedString(validate(arg, configuration)); } @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); + public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedList(validate(arg, configuration)); } @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); + public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedMap(validate(arg, configuration)); } @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -320,46 +320,46 @@ public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration config } } - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { @Nullable Object getData(); } - public record IfBoxedVoid(Void data) implements IfBoxed { + public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedBoolean(boolean data) implements IfBoxed { + public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedNumber(Number data) implements IfBoxed { + public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedString(String data) implements IfBoxed { + public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -367,18 +367,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -561,31 +561,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -663,8 +663,8 @@ public static class IfAndElseWithoutThen1 extends JsonSchema data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -81,18 +81,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -275,31 +275,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -662,7 +662,7 @@ public static class IfAndThenWithoutElse1 extends JsonSchema data) implements ElseBoxed { + public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxe } - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; + public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { + private static @Nullable ElseSchema instance = null; - protected Else() { + protected ElseSchema() { super(new JsonSchemaInfo() .constValue("other") ); } - public static Else getInstance() { + public static ElseSchema getInstance() { if (instance == null) { - instance = new Else(); + instance = new ElseSchema(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); + public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); + public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); + public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); + public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedString(validate(arg, configuration)); } @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); + public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedList(validate(arg, configuration)); } @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); + public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedMap(validate(arg, configuration)); } @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -333,46 +333,46 @@ public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration config } } - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { @Nullable Object getData(); } - public record IfBoxedVoid(Void data) implements IfBoxed { + public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedBoolean(boolean data) implements IfBoxed { + public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedNumber(Number data) implements IfBoxed { + public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedString(String data) implements IfBoxed { + public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -380,18 +380,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .maxLength(4) ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -574,31 +574,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -973,9 +973,9 @@ public static class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 ex protected IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1() { super(new JsonSchemaInfo() - .ifSchema(If.class) + .ifSchema(IfSchema.class) .then(Then.class) - .elseSchema(Else.class) + .elseSchema(ElseSchema.class) ); } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java index 20b569e152d..69f39db1275 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/IgnoreElseWithoutIf.java @@ -48,46 +48,46 @@ public String value() { } - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { @Nullable Object getData(); } - public record ElseBoxedVoid(Void data) implements ElseBoxed { + public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedNumber(Number data) implements ElseBoxed { + public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedString(String data) implements ElseBoxed { + public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxe } - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; + public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { + private static @Nullable ElseSchema instance = null; - protected Else() { + protected ElseSchema() { super(new JsonSchemaInfo() .constValue("0") ); } - public static Else getInstance() { + public static ElseSchema getInstance() { if (instance == null) { - instance = new Else(); + instance = new ElseSchema(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); + public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); + public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); + public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); + public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedString(validate(arg, configuration)); } @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); + public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedList(validate(arg, configuration)); } @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); + public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedMap(validate(arg, configuration)); } @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -391,7 +391,7 @@ public static class IgnoreElseWithoutIf1 extends JsonSchema data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -95,18 +95,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .constValue("0") ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -289,31 +289,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -391,7 +391,7 @@ public static class IgnoreIfWithoutThenOrElse1 extends JsonSchema data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -81,18 +82,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -275,31 +276,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -371,7 +372,7 @@ public static class Schema0 extends JsonSchema implements NullSche protected Schema0() { super(new JsonSchemaInfo() - .ifSchema(If.class) + .ifSchema(IfSchema.class) ); } @@ -1174,46 +1175,46 @@ public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration con } } - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { @Nullable Object getData(); } - public record ElseBoxedVoid(Void data) implements ElseBoxed { + public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedNumber(Number data) implements ElseBoxed { + public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedString(String data) implements ElseBoxed { + public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -1221,18 +1222,18 @@ public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxe } - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; + public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { + private static @Nullable ElseSchema instance = null; - protected Else() { + protected ElseSchema() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static Else getInstance() { + public static ElseSchema getInstance() { if (instance == null) { - instance = new Else(); + instance = new ElseSchema(); } return instance; } @@ -1415,31 +1416,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); + public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); + public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); + public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); + public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedString(validate(arg, configuration)); } @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); + public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedList(validate(arg, configuration)); } @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); + public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedMap(validate(arg, configuration)); } @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -1511,7 +1512,7 @@ public static class Schema2 extends JsonSchema implements NullSche protected Schema2() { super(new JsonSchemaInfo() - .elseSchema(Else.class) + .elseSchema(ElseSchema.class) ); } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java index 65923d494b7..56e58519e7d 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Not.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java index 217572bfa8c..2d64dcfa61b 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/NotMoreComplexSchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java index ac189abd5a2..2472dd24499 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/Oneof.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java index 98ce23a61c8..97370cd35ac 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofComplexTypes.java @@ -16,6 +16,9 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +30,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java index 36024642e7c..619be52f3e2 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithBaseSchema.java @@ -1,15 +1,31 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.ArrayList; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; +import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; +import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; +import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java index b8201add5a5..6a2499aefa6 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithEmptySchema.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java index 0fc34edbc6c..4dde715b451 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/OneofWithRequired.java @@ -1,4 +1,6 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -7,18 +9,26 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class OneofWithRequired { diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java index b60f026d0d4..d751523546f 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -69,7 +69,7 @@ protected ToStringMap(FrozenMap<@Nullable Object> m) { "length" ); public static ToStringMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ToString.getInstance().validate(arg, configuration); + return ToStringSchema.getInstance().validate(arg, configuration); } public String length() throws UnsetPropertyException { @@ -126,46 +126,46 @@ public ToStringMapBuilder getBuilderAfterAdditionalProperty(Map data) implements ToStringBoxed { + public record ToStringSchemaBoxedList(FrozenList<@Nullable Object> data) implements ToStringSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ToStringBoxedMap(ToStringMap data) implements ToStringBoxed { + public record ToStringSchemaBoxedMap(ToStringMap data) implements ToStringSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -173,10 +173,10 @@ public record ToStringBoxedMap(ToStringMap data) implements ToStringBoxed { } - public static class ToString extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringBoxedList>, MapSchemaValidator { - private static @Nullable ToString instance = null; + public static class ToStringSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringSchemaBoxedList>, MapSchemaValidator { + private static @Nullable ToStringSchema instance = null; - protected ToString() { + protected ToStringSchema() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("length", Length.class) @@ -184,9 +184,9 @@ protected ToString() { ); } - public static ToString getInstance() { + public static ToStringSchema getInstance() { if (instance == null) { - instance = new ToString(); + instance = new ToStringSchema(); } return instance; } @@ -369,31 +369,31 @@ public ToStringMap validate(Map arg, SchemaConfiguration configuration) th throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ToStringBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedVoid(validate(arg, configuration)); + public ToStringSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ToStringBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedBoolean(validate(arg, configuration)); + public ToStringSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ToStringBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedNumber(validate(arg, configuration)); + public ToStringSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ToStringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedString(validate(arg, configuration)); + public ToStringSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedString(validate(arg, configuration)); } @Override - public ToStringBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedList(validate(arg, configuration)); + public ToStringSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedList(validate(arg, configuration)); } @Override - public ToStringBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedMap(validate(arg, configuration)); + public ToStringSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ToStringSchemaBoxedMap(validate(arg, configuration)); } @Override - public ToStringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ToStringSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -438,16 +438,6 @@ public static PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map { + public interface SetterForToStringSchema { Map getInstance(); - T getBuilderAfterToString(Map instance); + T getBuilderAfterToStringSchema(Map instance); default T toString(Void value) { var instance = getInstance(); instance.put("toString", null); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(boolean value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(String value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(int value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(float value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(long value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(double value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(List value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(Map value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } } @@ -582,7 +572,7 @@ default T constructor(double value) { } } - public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToString, SetterForConstructor { + public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToStringSchema, SetterForConstructor { private final Map instance; private static final Set knownKeys = Set.of( "__proto__", @@ -604,7 +594,7 @@ public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterProto(Map instance) { return this; } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToString(Map instance) { + public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToStringSchema(Map instance) { return this; } public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterConstructor(Map instance) { @@ -676,7 +666,7 @@ protected PropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("__proto__", Proto.class), - new PropertyEntry("toString", ToString.class), + new PropertyEntry("toString", ToStringSchema.class), new PropertyEntry("constructor", Constructor.class) )) ); diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java index de93766a126..0ba4a54153f 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java @@ -57,14 +57,6 @@ public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of } } - public @Nullable Object toString() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -190,62 +182,62 @@ default T constructor(Map value) { } } - public interface SetterForToString { + public interface SetterForToStringSchema { Map getInstance(); - T getBuilderAfterToString(Map instance); + T getBuilderAfterToStringSchema(Map instance); default T toString(Void value) { var instance = getInstance(); instance.put("toString", null); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(boolean value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(String value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(int value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(float value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(long value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(double value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(List value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } default T toString(Map value) { var instance = getInstance(); instance.put("toString", value); - return getBuilderAfterToString(instance); + return getBuilderAfterToStringSchema(instance); } } @@ -273,7 +265,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToString { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToStringSchema { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(Map instance) { this.instance = instance; @@ -281,7 +273,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder public Map getInstance() { return instance; } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToString(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToStringSchema(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); } } @@ -299,7 +291,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToString { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToStringSchema { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(Map instance) { this.instance = instance; @@ -310,7 +302,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterConstructor(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToString(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToStringSchema(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); } } @@ -328,7 +320,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToString { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToStringSchema { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(Map instance) { this.instance = instance; @@ -339,7 +331,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterProto(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToString(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToStringSchema(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); } } @@ -360,7 +352,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder } } - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToString { + public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToStringSchema { private final Map instance; public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { this.instance = new LinkedHashMap<>(); @@ -374,7 +366,7 @@ public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder getBuilderAfterConstructor(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(instance); } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToString(Map instance) { + public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToStringSchema(Map instance) { return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(instance); } } diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java index 411272d145d..5def190d1a3 100644 --- a/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java +++ b/samples/client/3_1_0_unit_test/java/src/main/java/org/openapijsonschematools/client/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java @@ -35,46 +35,46 @@ public class ValidateAgainstCorrectBranchThenVsElse { // nest classes so all schemas and input/output classes can be public - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { + public sealed interface ElseSchemaBoxed permits ElseSchemaBoxedVoid, ElseSchemaBoxedBoolean, ElseSchemaBoxedNumber, ElseSchemaBoxedString, ElseSchemaBoxedList, ElseSchemaBoxedMap { @Nullable Object getData(); } - public record ElseBoxedVoid(Void data) implements ElseBoxed { + public record ElseSchemaBoxedVoid(Void data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { + public record ElseSchemaBoxedBoolean(boolean data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedNumber(Number data) implements ElseBoxed { + public record ElseSchemaBoxedNumber(Number data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedString(String data) implements ElseBoxed { + public record ElseSchemaBoxedString(String data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedList(FrozenList<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { + public record ElseSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ElseSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -82,18 +82,18 @@ public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxe } - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; + public static class ElseSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseSchemaBoxedList>, MapSchemaValidator, ElseSchemaBoxedMap> { + private static @Nullable ElseSchema instance = null; - protected Else() { + protected ElseSchema() { super(new JsonSchemaInfo() .multipleOf(new BigDecimal("2")) ); } - public static Else getInstance() { + public static ElseSchema getInstance() { if (instance == null) { - instance = new Else(); + instance = new ElseSchema(); } return instance; } @@ -276,31 +276,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); + public ElseSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedVoid(validate(arg, configuration)); } @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); + public ElseSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); + public ElseSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedNumber(validate(arg, configuration)); } @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); + public ElseSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedString(validate(arg, configuration)); } @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); + public ElseSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedList(validate(arg, configuration)); } @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); + public ElseSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new ElseSchemaBoxedMap(validate(arg, configuration)); } @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public ElseSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -320,46 +320,46 @@ public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration config } } - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { + public sealed interface IfSchemaBoxed permits IfSchemaBoxedVoid, IfSchemaBoxedBoolean, IfSchemaBoxedNumber, IfSchemaBoxedString, IfSchemaBoxedList, IfSchemaBoxedMap { @Nullable Object getData(); } - public record IfBoxedVoid(Void data) implements IfBoxed { + public record IfSchemaBoxedVoid(Void data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedBoolean(boolean data) implements IfBoxed { + public record IfSchemaBoxedBoolean(boolean data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedNumber(Number data) implements IfBoxed { + public record IfSchemaBoxedNumber(Number data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedString(String data) implements IfBoxed { + public record IfSchemaBoxedString(String data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedList(FrozenList<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { + public record IfSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements IfSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -367,18 +367,18 @@ public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { } - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; + public static class IfSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfSchemaBoxedList>, MapSchemaValidator, IfSchemaBoxedMap> { + private static @Nullable IfSchema instance = null; - protected If() { + protected IfSchema() { super(new JsonSchemaInfo() .exclusiveMaximum(0) ); } - public static If getInstance() { + public static IfSchema getInstance() { if (instance == null) { - instance = new If(); + instance = new IfSchema(); } return instance; } @@ -561,31 +561,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); + public IfSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedVoid(validate(arg, configuration)); } @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); + public IfSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); + public IfSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); + public IfSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedString(validate(arg, configuration)); } @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); + public IfSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedList(validate(arg, configuration)); } @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); + public IfSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new IfSchemaBoxedMap(validate(arg, configuration)); } @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IfSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -948,9 +948,9 @@ public static class ValidateAgainstCorrectBranchThenVsElse1 extends JsonSchemapost_forbidden_property_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md index cf1a565aacb..30770bcc8f1 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_more_complex_schema_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_more_complex_schema_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_more_complex_schema_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_more_complex_schema_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_more_complex_schema_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md index 87d672b3b40..3c92e883433 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_not_multiple_types_response_body_for_cont | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_multiple_types_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_multiple_types_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_multiple_types_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_multiple_types_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_multiple_types_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_multiple_types_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_not_multiple_types_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_not_multiple_types_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md index 03ca994fe97..c514091bf50 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post.md @@ -3,7 +3,7 @@ unit_test_api.paths.response_body_post_not_response_body_for_content_types.opera | Method Name | Api Class | Notes | | ----------- | --------- | ----- | -| post_not_response_body_for_content_types | [NotApi](../../apis/tags/not_api.md) | This api is only for tag=not | +| post_not_response_body_for_content_types | [_NotApi](../../apis/tags/_not_api.md) | This api is only for tag=not | | post_not_response_body_for_content_types | [PathPostApi](../../apis/tags/path_post_api.md) | This api is only for tag=path.post | | post_not_response_body_for_content_types | [ContentTypeJsonApi](../../apis/tags/content_type_json_api.md) | This api is only for tag=contentType_json | | post_not_response_body_for_content_types | [ResponseContentContentTypeSchemaApi](../../apis/tags/response_content_content_type_schema_api.md) | This api is only for tag=response.content.contentType.schema | @@ -66,7 +66,7 @@ type: schemas.Schema ##### Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO ## Servers @@ -85,25 +85,25 @@ server_index | Class | Description ```python import unit_test_api from unit_test_api.configurations import api_configuration -from unit_test_api.apis.tags import not_api +from unit_test_api.apis.tags import _not_api from pprint import pprint used_configuration = api_configuration.ApiConfiguration( ) # Enter a context with an instance of the API client with unit_test_api.ApiClient(used_configuration) as api_client: # Create an instance of the API class - api_instance = not_api.NotApi(api_client) + api_instance = _not_api._NotApi(api_client) # example, this endpoint has no required or optional parameters try: api_response = api_instance.post_not_response_body_for_content_types() pprint(api_response) except unit_test_api.ApiException as e: - print("Exception when calling NotApi->post_not_response_body_for_content_types: %s\n" % e) + print("Exception when calling _NotApi->post_not_response_body_for_content_types: %s\n" % e) ``` [[Back to top]](#top) -[[Back to NotApi API]](../../apis/tags/not_api.md) +[[Back to _NotApi API]](../../apis/tags/_not_api.md) [[Back to PathPostApi API]](../../apis/tags/path_post_api.md) [[Back to ContentTypeJsonApi API]](../../apis/tags/content_type_json_api.md) [[Back to ResponseContentContentTypeSchemaApi API]](../../apis/tags/response_content_content_type_schema_api.md) diff --git a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md index befa85299f4..ba78ba3a0ce 100644 --- a/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md +++ b/samples/client/3_1_0_unit_test/python/docs/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.md @@ -6,4 +6,4 @@ type: schemas.Schema ## Ref Schema Info Ref Schema | Input Type | Output Type ---------- | ---------- | ----------- -[**not.Not**](../../../../../../../components/schema/not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO +[**_not._Not**](../../../../../../../components/schema/_not.md) | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py index 2d893695d85..34a66428b01 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tag_to_api.py @@ -18,7 +18,7 @@ from unit_test_api.apis.tags.enum_api import EnumApi from unit_test_api.apis.tags.exclusive_maximum_api import ExclusiveMaximumApi from unit_test_api.apis.tags.exclusive_minimum_api import ExclusiveMinimumApi -from unit_test_api.apis.tags.not_api import NotApi +from unit_test_api.apis.tags._not_api import _NotApi from unit_test_api.apis.tags.if_then_else_api import IfThenElseApi from unit_test_api.apis.tags.items_api import ItemsApi from unit_test_api.apis.tags.max_contains_api import MaxContainsApi @@ -63,7 +63,7 @@ "enum": typing.Type[EnumApi], "exclusiveMaximum": typing.Type[ExclusiveMaximumApi], "exclusiveMinimum": typing.Type[ExclusiveMinimumApi], - "not": typing.Type[NotApi], + "not": typing.Type[_NotApi], "if-then-else": typing.Type[IfThenElseApi], "items": typing.Type[ItemsApi], "maxContains": typing.Type[MaxContainsApi], @@ -109,7 +109,7 @@ "enum": EnumApi, "exclusiveMaximum": ExclusiveMaximumApi, "exclusiveMinimum": ExclusiveMinimumApi, - "not": NotApi, + "not": _NotApi, "if-then-else": IfThenElseApi, "items": ItemsApi, "maxContains": MaxContainsApi, diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py index 9d32e259436..5eea502f2ea 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py @@ -10,7 +10,7 @@ from __future__ import annotations from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema +_Not: typing_extensions.TypeAlias = schemas.AnyTypeSchema @dataclasses.dataclass(frozen=True) @@ -18,7 +18,7 @@ class Foo( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore Properties = typing.TypedDict( 'Properties', diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py index ad83473927b..63f498c4997 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_else_without_then.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class Else( +class _Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -22,7 +22,7 @@ class Else( @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -40,6 +40,6 @@ class IfAndElseWithoutThen( Do not edit the class manually. """ # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore + else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py index 93612911c8a..e331a745941 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_and_then_without_else.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -40,6 +40,6 @@ class IfAndThenWithoutElse( Do not edit the class manually. """ # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py index ce0429724d9..fd810e09525 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/if_appears_at_the_end_when_serialized_keyword_processing_sequence.py @@ -16,11 +16,11 @@ class ElseConst: @schemas.classproperty def OTHER(cls) -> typing.Literal["other"]: - return Else.validate("other") + return _Else.validate("other") @dataclasses.dataclass(frozen=True) -class Else( +class _Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -34,7 +34,7 @@ class Else( @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -73,7 +73,7 @@ class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence( Do not edit the class manually. """ # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py index 0a4c2afb734..014a693f23f 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_else_without_if.py @@ -16,11 +16,11 @@ class ElseConst: @schemas.classproperty def POSITIVE_0(cls) -> typing.Literal["0"]: - return Else.validate("0") + return _Else.validate("0") @dataclasses.dataclass(frozen=True) -class Else( +class _Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -43,5 +43,5 @@ class IgnoreElseWithoutIf( Do not edit the class manually. """ # any type - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py index 4b018c342a0..e126e6d805c 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/ignore_if_without_then_or_else.py @@ -16,11 +16,11 @@ class IfConst: @schemas.classproperty def POSITIVE_0(cls) -> typing.Literal["0"]: - return If.validate("0") + return _If.validate("0") @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -43,5 +43,5 @@ class IgnoreIfWithoutThenOrElse( Do not edit the class manually. """ # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py index 713a75aaa34..57ec2513f21 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/non_interference_across_combined_schemas.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -26,7 +26,7 @@ class _0( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore @@ -49,7 +49,7 @@ class _1( @dataclasses.dataclass(frozen=True) -class Else( +class _Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -62,7 +62,7 @@ class _2( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore AllOf = typing.Tuple[ typing.Type[_0], diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index 9e8196377bd..2697580593b 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -46,7 +46,7 @@ def __new__( arg_[key_] = val arg_.update(kwargs) used_arg_ = typing.cast(NotDictInput, arg_) - return Not.validate(used_arg_, configuration=configuration_) + return _Not.validate(used_arg_, configuration=configuration_) @staticmethod def from_dict_( @@ -56,7 +56,7 @@ def from_dict_( ], configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None ) -> NotDict: - return Not.validate(arg, configuration=configuration) + return _Not.validate(arg, configuration=configuration) @property def foo(self) -> typing.Union[str, schemas.Unset]: @@ -75,7 +75,7 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS @dataclasses.dataclass(frozen=True) -class Not( +class _Not( schemas.Schema[NotDict, tuple] ): types: typing.FrozenSet[typing.Type] = frozenset({schemas.immutabledict}) @@ -115,5 +115,5 @@ class NotMoreComplexSchema( Do not edit the class manually. """ # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py index 4e39a12d5d7..380e4ad932f 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not_multiple_types.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class Not( +class _Not( schemas.Schema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -59,5 +59,5 @@ class NotMultipleTypes( Do not edit the class manually. """ # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py index 405db7947f8..560234699ee 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/validate_against_correct_branch_then_vs_else.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class Else( +class _Else( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -22,7 +22,7 @@ class Else( @dataclasses.dataclass(frozen=True) -class If( +class _If( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -49,7 +49,7 @@ class ValidateAgainstCorrectBranchThenVsElse( Do not edit the class manually. """ # any type - if_: typing.Type[If] = dataclasses.field(default_factory=lambda: If) # type: ignore + if_: typing.Type[_If] = dataclasses.field(default_factory=lambda: _If) # type: ignore then: typing.Type[Then] = dataclasses.field(default_factory=lambda: Then) # type: ignore - else_: typing.Type[Else] = dataclasses.field(default_factory=lambda: Else) # type: ignore + else_: typing.Type[_Else] = dataclasses.field(default_factory=lambda: _Else) # type: ignore diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py index 77bdbe22aa6..152a30935a4 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schemas/__init__.py @@ -96,7 +96,7 @@ from unit_test_api.components.schema.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics from unit_test_api.components.schema.non_ascii_pattern_with_additionalproperties import NonAsciiPatternWithAdditionalproperties from unit_test_api.components.schema.non_interference_across_combined_schemas import NonInterferenceAcrossCombinedSchemas -from unit_test_api.components.schema.not import Not +from unit_test_api.components.schema._not import _Not from unit_test_api.components.schema.not_more_complex_schema import NotMoreComplexSchema from unit_test_api.components.schema.not_multiple_types import NotMultipleTypes from unit_test_api.components.schema.nul_characters_in_strings import NulCharactersInStrings diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py index 63b78e740e1..931ebbe2b70 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py @@ -9,7 +9,7 @@ from unit_test_api import api_client from unit_test_api.shared_imports.operation_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not +from unit_test_api.components.schema import _not from .. import path from .responses import response_200 diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py index 64c9b542b1e..d300522c724 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not -Schema2: typing_extensions.TypeAlias = not.Not +from unit_test_api.components.schema import _not +Schema2: typing_extensions.TypeAlias = _not._Not diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py index 64c9b542b1e..d300522c724 100644 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py +++ b/samples/client/3_1_0_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/responses/response_200/content/application_json/schema.py @@ -9,5 +9,5 @@ from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -from unit_test_api.components.schema import not -Schema2: typing_extensions.TypeAlias = not.Not +from unit_test_api.components.schema import _not +Schema2: typing_extensions.TypeAlias = _not._Not diff --git a/samples/client/petstore/java/.openapi-generator/FILES b/samples/client/petstore/java/.openapi-generator/FILES index 11caf1eade2..8ee910d207d 100644 --- a/samples/client/petstore/java/.openapi-generator/FILES +++ b/samples/client/petstore/java/.openapi-generator/FILES @@ -114,7 +114,7 @@ docs/components/schemas/Animal.md docs/components/schemas/AnimalFarm.md docs/components/schemas/AnyTypeAndFormat.md docs/components/schemas/AnyTypeNotString.md -docs/components/schemas/ApiResponse.md +docs/components/schemas/ApiResponseSchema.md docs/components/schemas/Apple.md docs/components/schemas/AppleReq.md docs/components/schemas/ArrayHoldingAnyType.md @@ -127,8 +127,8 @@ docs/components/schemas/Banana.md docs/components/schemas/BananaReq.md docs/components/schemas/Bar.md docs/components/schemas/BasquePig.md -docs/components/schemas/Boolean.md docs/components/schemas/BooleanEnum.md +docs/components/schemas/BooleanSchema.md docs/components/schemas/Capitalization.md docs/components/schemas/Cat.md docs/components/schemas/Category.md @@ -191,8 +191,8 @@ docs/components/schemas/NoAdditionalProperties.md docs/components/schemas/NullableClass.md docs/components/schemas/NullableShape.md docs/components/schemas/NullableString.md -docs/components/schemas/Number.md docs/components/schemas/NumberOnly.md +docs/components/schemas/NumberSchema.md docs/components/schemas/NumberWithExclusiveMinMax.md docs/components/schemas/NumberWithValidations.md docs/components/schemas/ObjWithRequiredProps.md @@ -224,7 +224,7 @@ docs/components/schemas/RefPet.md docs/components/schemas/ReqPropsFromExplicitAddProps.md docs/components/schemas/ReqPropsFromTrueAddProps.md docs/components/schemas/ReqPropsFromUnsetAddProps.md -docs/components/schemas/Return.md +docs/components/schemas/ReturnSchema.md docs/components/schemas/ScaleneTriangle.md docs/components/schemas/Schema200Response.md docs/components/schemas/SelfReferencingArrayModel.md @@ -234,10 +234,10 @@ docs/components/schemas/ShapeOrNull.md docs/components/schemas/SimpleQuadrilateral.md docs/components/schemas/SomeObject.md docs/components/schemas/SpecialModelname.md -docs/components/schemas/String.md docs/components/schemas/StringBooleanMap.md docs/components/schemas/StringEnum.md docs/components/schemas/StringEnumWithDefaultValue.md +docs/components/schemas/StringSchema.md docs/components/schemas/StringWithValidation.md docs/components/schemas/Tag.md docs/components/schemas/Triangle.md @@ -878,7 +878,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/Animal.java src/main/java/org/openapijsonschematools/client/components/schemas/AnimalFarm.java src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java -src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java +src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponseSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/Apple.java src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java src/main/java/org/openapijsonschematools/client/components/schemas/ArrayHoldingAnyType.java @@ -891,8 +891,8 @@ src/main/java/org/openapijsonschematools/client/components/schemas/Banana.java src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java src/main/java/org/openapijsonschematools/client/components/schemas/Bar.java src/main/java/org/openapijsonschematools/client/components/schemas/BasquePig.java -src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java src/main/java/org/openapijsonschematools/client/components/schemas/BooleanEnum.java +src/main/java/org/openapijsonschematools/client/components/schemas/BooleanSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/Capitalization.java src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java src/main/java/org/openapijsonschematools/client/components/schemas/Category.java @@ -955,8 +955,8 @@ src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalP src/main/java/org/openapijsonschematools/client/components/schemas/NullableClass.java src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java src/main/java/org/openapijsonschematools/client/components/schemas/NullableString.java -src/main/java/org/openapijsonschematools/client/components/schemas/Number.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberOnly.java +src/main/java/org/openapijsonschematools/client/components/schemas/NumberSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithExclusiveMinMax.java src/main/java/org/openapijsonschematools/client/components/schemas/NumberWithValidations.java src/main/java/org/openapijsonschematools/client/components/schemas/ObjWithRequiredProps.java @@ -988,7 +988,7 @@ src/main/java/org/openapijsonschematools/client/components/schemas/RefPet.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromExplicitAddProps.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromTrueAddProps.java src/main/java/org/openapijsonschematools/client/components/schemas/ReqPropsFromUnsetAddProps.java -src/main/java/org/openapijsonschematools/client/components/schemas/Return.java +src/main/java/org/openapijsonschematools/client/components/schemas/ReturnSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java src/main/java/org/openapijsonschematools/client/components/schemas/SelfReferencingArrayModel.java @@ -998,10 +998,10 @@ src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.j src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java src/main/java/org/openapijsonschematools/client/components/schemas/SomeObject.java src/main/java/org/openapijsonschematools/client/components/schemas/SpecialModelname.java -src/main/java/org/openapijsonschematools/client/components/schemas/String.java src/main/java/org/openapijsonschematools/client/components/schemas/StringBooleanMap.java src/main/java/org/openapijsonschematools/client/components/schemas/StringEnum.java src/main/java/org/openapijsonschematools/client/components/schemas/StringEnumWithDefaultValue.java +src/main/java/org/openapijsonschematools/client/components/schemas/StringSchema.java src/main/java/org/openapijsonschematools/client/components/schemas/StringWithValidation.java src/main/java/org/openapijsonschematools/client/components/schemas/Tag.java src/main/java/org/openapijsonschematools/client/components/schemas/Triangle.java diff --git a/samples/client/petstore/java/README.md b/samples/client/petstore/java/README.md index 53770b76b62..5a29bf2142b 100644 --- a/samples/client/petstore/java/README.md +++ b/samples/client/petstore/java/README.md @@ -273,13 +273,13 @@ All URIs are relative to the selected server | /fake/refObjInQuery **get** | [Fake.refObjectInQuery](docs/apis/tags/Fake.md#refobjectinquery) [Fakerefobjinquery.get](docs/apis/paths/Fakerefobjinquery.md#get) [FakerefobjinqueryGet.Get.get](docs/paths/fakerefobjinquery/FakerefobjinqueryGet.md#get) | user list | | /fake/refs/array-of-enums **post** | [Fake.arrayOfEnums](docs/apis/tags/Fake.md#arrayofenums) [Fakerefsarrayofenums.post](docs/apis/paths/Fakerefsarrayofenums.md#post) [FakerefsarrayofenumsPost.Post.post](docs/paths/fakerefsarrayofenums/FakerefsarrayofenumsPost.md#post) | Array of Enums | | /fake/refs/arraymodel **post** | [Fake.arrayModel](docs/apis/tags/Fake.md#arraymodel) [Fakerefsarraymodel.post](docs/apis/paths/Fakerefsarraymodel.md#post) [FakerefsarraymodelPost.Post.post](docs/paths/fakerefsarraymodel/FakerefsarraymodelPost.md#post) | | -| /fake/refs/boolean **post** | [Fake.boolean](docs/apis/tags/Fake.md#boolean) [Fakerefsboolean.post](docs/apis/paths/Fakerefsboolean.md#post) [FakerefsbooleanPost.Post.post](docs/paths/fakerefsboolean/FakerefsbooleanPost.md#post) | | +| /fake/refs/boolean **post** | [Fake.modelBoolean](docs/apis/tags/Fake.md#modelboolean) [Fakerefsboolean.post](docs/apis/paths/Fakerefsboolean.md#post) [FakerefsbooleanPost.Post.post](docs/paths/fakerefsboolean/FakerefsbooleanPost.md#post) | | | /fake/refs/composed_one_of_number_with_validations **post** | [Fake.composedOneOfDifferentTypes](docs/apis/tags/Fake.md#composedoneofdifferenttypes) [Fakerefscomposedoneofnumberwithvalidations.post](docs/apis/paths/Fakerefscomposedoneofnumberwithvalidations.md#post) [FakerefscomposedoneofnumberwithvalidationsPost.Post.post](docs/paths/fakerefscomposedoneofnumberwithvalidations/FakerefscomposedoneofnumberwithvalidationsPost.md#post) | | | /fake/refs/enum **post** | [Fake.stringEnum](docs/apis/tags/Fake.md#stringenum) [Fakerefsenum.post](docs/apis/paths/Fakerefsenum.md#post) [FakerefsenumPost.Post.post](docs/paths/fakerefsenum/FakerefsenumPost.md#post) | | | /fake/refs/mammal **post** | [Fake.mammal](docs/apis/tags/Fake.md#mammal) [Fakerefsmammal.post](docs/apis/paths/Fakerefsmammal.md#post) [FakerefsmammalPost.Post.post](docs/paths/fakerefsmammal/FakerefsmammalPost.md#post) | | | /fake/refs/number **post** | [Fake.numberWithValidations](docs/apis/tags/Fake.md#numberwithvalidations) [Fakerefsnumber.post](docs/apis/paths/Fakerefsnumber.md#post) [FakerefsnumberPost.Post.post](docs/paths/fakerefsnumber/FakerefsnumberPost.md#post) | | | /fake/refs/object_model_with_ref_props **post** | [Fake.objectModelWithRefProps](docs/apis/tags/Fake.md#objectmodelwithrefprops) [Fakerefsobjectmodelwithrefprops.post](docs/apis/paths/Fakerefsobjectmodelwithrefprops.md#post) [FakerefsobjectmodelwithrefpropsPost.Post.post](docs/paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#post) | | -| /fake/refs/string **post** | [Fake.string](docs/apis/tags/Fake.md#string) [Fakerefsstring.post](docs/apis/paths/Fakerefsstring.md#post) [FakerefsstringPost.Post.post](docs/paths/fakerefsstring/FakerefsstringPost.md#post) | | +| /fake/refs/string **post** | [Fake.modelString](docs/apis/tags/Fake.md#modelstring) [Fakerefsstring.post](docs/apis/paths/Fakerefsstring.md#post) [FakerefsstringPost.Post.post](docs/paths/fakerefsstring/FakerefsstringPost.md#post) | | | /fake/responseWithoutSchema **get** | [Fake.responseWithoutSchema](docs/apis/tags/Fake.md#responsewithoutschema) [Fakeresponsewithoutschema.get](docs/apis/paths/Fakeresponsewithoutschema.md#get) [FakeresponsewithoutschemaGet.Get.get](docs/paths/fakeresponsewithoutschema/FakeresponsewithoutschemaGet.md#get) | receives a response without schema | | /fake/test-query-paramters **put** | [Fake.queryParameterCollectionFormat](docs/apis/tags/Fake.md#queryparametercollectionformat) [Faketestqueryparamters.put](docs/apis/paths/Faketestqueryparamters.md#put) [FaketestqueryparamtersPut.Put.put](docs/paths/faketestqueryparamters/FaketestqueryparamtersPut.md#put) | | | /fake/uploadDownloadFile **post** | [Fake.uploadDownloadFile](docs/apis/tags/Fake.md#uploaddownloadfile) [Fakeuploaddownloadfile.post](docs/apis/paths/Fakeuploaddownloadfile.md#post) [FakeuploaddownloadfilePost.Post.post](docs/paths/fakeuploaddownloadfile/FakeuploaddownloadfilePost.md#post) | uploads a file and downloads a file using application/octet-stream | @@ -323,7 +323,7 @@ All URIs are relative to the selected server | [AnimalFarm.AnimalFarm1](docs/components/schemas/AnimalFarm.md#animalfarm1) | | | [AnyTypeAndFormat.AnyTypeAndFormat1](docs/components/schemas/AnyTypeAndFormat.md#anytypeandformat1) | | | [AnyTypeNotString.AnyTypeNotString1](docs/components/schemas/AnyTypeNotString.md#anytypenotstring1) | | -| [ApiResponse.ApiResponse1](docs/components/schemas/ApiResponse.md#apiresponse1) | | +| [ApiResponseSchema.ApiResponseSchema1](docs/components/schemas/ApiResponseSchema.md#apiresponseschema1) | | | [ArrayHoldingAnyType.ArrayHoldingAnyType1](docs/components/schemas/ArrayHoldingAnyType.md#arrayholdinganytype1) | | | [ArrayOfArrayOfNumberOnly.ArrayOfArrayOfNumberOnly1](docs/components/schemas/ArrayOfArrayOfNumberOnly.md#arrayofarrayofnumberonly1) | | | [ArrayOfEnums.ArrayOfEnums1](docs/components/schemas/ArrayOfEnums.md#arrayofenums1) | | @@ -332,7 +332,7 @@ All URIs are relative to the selected server | [ArrayWithValidationsInItems.ArrayWithValidationsInItems1](docs/components/schemas/ArrayWithValidationsInItems.md#arraywithvalidationsinitems1) | | | [Bar.Bar1](docs/components/schemas/Bar.md#bar1) | | | [BasquePig.BasquePig1](docs/components/schemas/BasquePig.md#basquepig1) | | -| [Boolean.Boolean1](docs/components/schemas/Boolean.md#boolean1) | | +| [BooleanSchema.BooleanSchema1](docs/components/schemas/BooleanSchema.md#booleanschema1) | | | [BooleanEnum.BooleanEnum1](docs/components/schemas/BooleanEnum.md#booleanenum1) | | | [Capitalization.Capitalization1](docs/components/schemas/Capitalization.md#capitalization1) | | | [Cat.Cat1](docs/components/schemas/Cat.md#cat1) | | @@ -391,7 +391,7 @@ All URIs are relative to the selected server | [NullableClass.NullableClass1](docs/components/schemas/NullableClass.md#nullableclass1) | | | [NullableShape.NullableShape1](docs/components/schemas/NullableShape.md#nullableshape1) | The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) | | [NullableString.NullableString1](docs/components/schemas/NullableString.md#nullablestring1) | | -| [Number.Number1](docs/components/schemas/Number.md#number1) | | +| [NumberSchema.NumberSchema1](docs/components/schemas/NumberSchema.md#numberschema1) | | | [NumberOnly.NumberOnly1](docs/components/schemas/NumberOnly.md#numberonly1) | | | [NumberWithExclusiveMinMax.NumberWithExclusiveMinMax1](docs/components/schemas/NumberWithExclusiveMinMax.md#numberwithexclusiveminmax1) | | | [NumberWithValidations.NumberWithValidations1](docs/components/schemas/NumberWithValidations.md#numberwithvalidations1) | | @@ -424,7 +424,7 @@ All URIs are relative to the selected server | [ReqPropsFromExplicitAddProps.ReqPropsFromExplicitAddProps1](docs/components/schemas/ReqPropsFromExplicitAddProps.md#reqpropsfromexplicitaddprops1) | | | [ReqPropsFromTrueAddProps.ReqPropsFromTrueAddProps1](docs/components/schemas/ReqPropsFromTrueAddProps.md#reqpropsfromtrueaddprops1) | | | [ReqPropsFromUnsetAddProps.ReqPropsFromUnsetAddProps1](docs/components/schemas/ReqPropsFromUnsetAddProps.md#reqpropsfromunsetaddprops1) | | -| [Return.Return1](docs/components/schemas/Return.md#return1) | Model for testing reserved words | +| [ReturnSchema.ReturnSchema1](docs/components/schemas/ReturnSchema.md#returnschema1) | Model for testing reserved words | | [ScaleneTriangle.ScaleneTriangle1](docs/components/schemas/ScaleneTriangle.md#scalenetriangle1) | | | [SelfReferencingArrayModel.SelfReferencingArrayModel1](docs/components/schemas/SelfReferencingArrayModel.md#selfreferencingarraymodel1) | | | [SelfReferencingObjectModel.SelfReferencingObjectModel1](docs/components/schemas/SelfReferencingObjectModel.md#selfreferencingobjectmodel1) | | @@ -432,7 +432,7 @@ All URIs are relative to the selected server | [ShapeOrNull.ShapeOrNull1](docs/components/schemas/ShapeOrNull.md#shapeornull1) | The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. | | [SimpleQuadrilateral.SimpleQuadrilateral1](docs/components/schemas/SimpleQuadrilateral.md#simplequadrilateral1) | | | [SomeObject.SomeObject1](docs/components/schemas/SomeObject.md#someobject1) | | -| [String.String1](docs/components/schemas/String.md#string1) | | +| [StringSchema.StringSchema1](docs/components/schemas/StringSchema.md#stringschema1) | | | [StringBooleanMap.StringBooleanMap1](docs/components/schemas/StringBooleanMap.md#stringbooleanmap1) | | | [StringEnum.StringEnum1](docs/components/schemas/StringEnum.md#stringenum1) | | | [StringEnumWithDefaultValue.StringEnumWithDefaultValue1](docs/components/schemas/StringEnumWithDefaultValue.md#stringenumwithdefaultvalue1) | | diff --git a/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md b/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md index 93ec3379427..08d970ada80 100644 --- a/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md +++ b/samples/client/petstore/java/docs/apis/paths/Fakerefsboolean.md @@ -42,7 +42,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.Boolean; +import org.openapijsonschematools.client.components.schemas.BooleanSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md b/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md index 45a68b0e7c7..c7875ab8678 100644 --- a/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md +++ b/samples/client/petstore/java/docs/apis/paths/Fakerefsstring.md @@ -42,7 +42,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.String; +import org.openapijsonschematools.client.components.schemas.StringSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/apis/tags/Fake.md b/samples/client/petstore/java/docs/apis/tags/Fake.md index 4c083bc42e9..69b4c83b6d9 100644 --- a/samples/client/petstore/java/docs/apis/tags/Fake.md +++ b/samples/client/petstore/java/docs/apis/tags/Fake.md @@ -26,11 +26,11 @@ public class Fake extends extends ApiClient implements [FakerefsobjectmodelwithrefpropsPost.ObjectModelWithRefPropsOperation](../../paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#objectmodelwithrefpropsoperation), [FakepemcontenttypeGet.PemContentTypeOperation](../../paths/fakepemcontenttype/FakepemcontenttypeGet.md#pemcontenttypeoperation), [FakerefsnumberPost.NumberWithValidationsOperation](../../paths/fakerefsnumber/FakerefsnumberPost.md#numberwithvalidationsoperation), -[FakerefsstringPost.StringOperation](../../paths/fakerefsstring/FakerefsstringPost.md#stringoperation), +[FakerefsstringPost.ModelStringOperation](../../paths/fakerefsstring/FakerefsstringPost.md#modelstringoperation), [FakeinlineadditionalpropertiesPost.InlineAdditionalPropertiesOperation](../../paths/fakeinlineadditionalproperties/FakeinlineadditionalpropertiesPost.md#inlineadditionalpropertiesoperation), [FakerefsmammalPost.MammalOperation](../../paths/fakerefsmammal/FakerefsmammalPost.md#mammaloperation), [SolidusGet.SlashRouteOperation](../../paths/solidus/SolidusGet.md#slashrouteoperation), -[FakerefsbooleanPost.BooleanOperation](../../paths/fakerefsboolean/FakerefsbooleanPost.md#booleanoperation), +[FakerefsbooleanPost.ModelBooleanOperation](../../paths/fakerefsboolean/FakerefsbooleanPost.md#modelbooleanoperation), [FakejsonformdataGet.JsonFormDataOperation](../../paths/fakejsonformdata/FakejsonformdataGet.md#jsonformdataoperation), [Fakeparametercollisions1ababselfabPost.ParameterCollisionsOperation](../../paths/fakeparametercollisions1ababselfab/Fakeparametercollisions1ababselfabPost.md#parametercollisionsoperation), [FakequeryparamwithjsoncontenttypeGet.QueryParamWithJsonContentTypeOperation](../../paths/fakequeryparamwithjsoncontenttype/FakequeryparamwithjsoncontenttypeGet.md#queryparamwithjsoncontenttypeoperation), @@ -75,11 +75,11 @@ an api client class which contains all the routes for tag="fake" | [FakerefsobjectmodelwithrefpropsPostResponses.EndpointResponse](../../paths/fakerefsobjectmodelwithrefprops/post/FakerefsobjectmodelwithrefpropsPostResponses.md#endpointresponse) | [objectModelWithRefProps](#objectmodelwithrefprops)([FakerefsobjectmodelwithrefpropsPost.PostRequest](../../paths/fakerefsobjectmodelwithrefprops/FakerefsobjectmodelwithrefpropsPost.md#postrequest) request)
          Test serialization of object with $refed properties | | [FakepemcontenttypeGetResponses.EndpointResponse](../../paths/fakepemcontenttype/get/FakepemcontenttypeGetResponses.md#endpointresponse) | [pemContentType](#pemcontenttype)([FakepemcontenttypeGet.GetRequest](../../paths/fakepemcontenttype/FakepemcontenttypeGet.md#getrequest) request) | | [FakerefsnumberPostResponses.EndpointResponse](../../paths/fakerefsnumber/post/FakerefsnumberPostResponses.md#endpointresponse) | [numberWithValidations](#numberwithvalidations)([FakerefsnumberPost.PostRequest](../../paths/fakerefsnumber/FakerefsnumberPost.md#postrequest) request)
          Test serialization of outer number types | -| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | [string](#string)([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request)
          Test serialization of outer string types | +| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | [modelString](#modelstring)([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request)
          Test serialization of outer string types | | [FakeinlineadditionalpropertiesPostResponses.EndpointResponse](../../paths/fakeinlineadditionalproperties/post/FakeinlineadditionalpropertiesPostResponses.md#endpointresponse) | [inlineAdditionalProperties](#inlineadditionalproperties)([FakeinlineadditionalpropertiesPost.PostRequest](../../paths/fakeinlineadditionalproperties/FakeinlineadditionalpropertiesPost.md#postrequest) request)
          | | [FakerefsmammalPostResponses.EndpointResponse](../../paths/fakerefsmammal/post/FakerefsmammalPostResponses.md#endpointresponse) | [mammal](#mammal)([FakerefsmammalPost.PostRequest](../../paths/fakerefsmammal/FakerefsmammalPost.md#postrequest) request)
          Test serialization of mammals | | [SolidusGetResponses.EndpointResponse](../../paths/solidus/get/SolidusGetResponses.md#endpointresponse) | [slashRoute](#slashroute)([SolidusGet.GetRequest](../../paths/solidus/SolidusGet.md#getrequest) request) | -| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | [boolean](#boolean)([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request)
          Test serialization of outer boolean types | +| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | [modelBoolean](#modelboolean)([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request)
          Test serialization of outer boolean types | | [FakejsonformdataGetResponses.EndpointResponse](../../paths/fakejsonformdata/get/FakejsonformdataGetResponses.md#endpointresponse) | [jsonFormData](#jsonformdata)([FakejsonformdataGet.GetRequest](../../paths/fakejsonformdata/FakejsonformdataGet.md#getrequest) request)
          | | [Fakeparametercollisions1ababselfabPostResponses.EndpointResponse](../../paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostResponses.md#endpointresponse) | [parameterCollisions](#parametercollisions)([Fakeparametercollisions1ababselfabPost.PostRequest](../../paths/fakeparametercollisions1ababselfab/Fakeparametercollisions1ababselfabPost.md#postrequest) request) | | [FakequeryparamwithjsoncontenttypeGetResponses.EndpointResponse](../../paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetResponses.md#endpointresponse) | [queryParamWithJsonContentType](#queryparamwithjsoncontenttype)([FakequeryparamwithjsoncontenttypeGet.GetRequest](../../paths/fakequeryparamwithjsoncontenttype/FakequeryparamwithjsoncontenttypeGet.md#getrequest) request) | @@ -2555,8 +2555,8 @@ FakerefsnumberPostResponses.EndpointFakerefsnumberPostCode200Response castRespon FakerefsnumberPostCode200Response.ApplicationjsonResponseBody deserializedBody = (FakerefsnumberPostCode200Response.ApplicationjsonResponseBody) castResponse.body; // handle deserialized body here ``` -### string -public [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) string([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request) +### modelString +public [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) modelString([FakerefsstringPost.PostRequest](../../paths/fakerefsstring/FakerefsstringPost.md#postrequest) request) Test serialization of outer string types @@ -2585,7 +2585,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.String; +import org.openapijsonschematools.client.components.schemas.StringSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -2930,8 +2930,8 @@ try { } SolidusGetResponses.EndpointSolidusGetCode200Response castResponse = (SolidusGetResponses.EndpointSolidusGetCode200Response) response; ``` -### boolean -public [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) boolean([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request) +### modelBoolean +public [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) modelBoolean([FakerefsbooleanPost.PostRequest](../../paths/fakerefsboolean/FakerefsbooleanPost.md#postrequest) request) Test serialization of outer boolean types @@ -2960,7 +2960,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.Boolean; +import org.openapijsonschematools.client.components.schemas.BooleanSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; diff --git a/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md b/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md index a3a31972a37..9c2ac509e44 100644 --- a/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md +++ b/samples/client/petstore/java/docs/components/responses/SuccessWithJsonApiResponse.md @@ -59,12 +59,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponse1Boxed](../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | ## SuccessWithJsonApiResponse1 public static class SuccessWithJsonApiResponse1
          diff --git a/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md index 9509b66a669..a340ff691f7 100644 --- a/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponse1](../../../../../components/schemas/ApiResponse.md#apiresponse) +extends [ApiResponseSchema1](../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponse.ApiResponse1](../../../../../components/schemas/ApiResponse.md#apiresponse1) +extends [ApiResponseSchema.ApiResponseSchema1](../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md index 222ada78836..d5040963ffc 100644 --- a/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md +++ b/samples/client/petstore/java/docs/components/schemas/AnyTypeAndFormat.md @@ -17,22 +17,22 @@ A class that contains necessary nested | static class | [AnyTypeAndFormat.AnyTypeAndFormat1](#anytypeandformat1)
          schema class | | static class | [AnyTypeAndFormat.AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder)
          builder for Map payloads | | static class | [AnyTypeAndFormat.AnyTypeAndFormatMap](#anytypeandformatmap)
          output class for Map payloads | -| sealed interface | [AnyTypeAndFormat.FloatBoxed](#floatboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.FloatBoxedVoid](#floatboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.FloatBoxedBoolean](#floatboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.FloatBoxedNumber](#floatboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.FloatBoxedString](#floatboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.FloatBoxedList](#floatboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.FloatBoxedMap](#floatboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.Float](#float)
          schema class | -| sealed interface | [AnyTypeAndFormat.DoubleBoxed](#doubleboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.DoubleBoxedVoid](#doubleboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.DoubleBoxedBoolean](#doubleboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.DoubleBoxedNumber](#doubleboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.DoubleBoxedString](#doubleboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.DoubleBoxedList](#doubleboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.DoubleBoxedMap](#doubleboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.Double](#double)
          schema class | +| sealed interface | [AnyTypeAndFormat.FloatSchemaBoxed](#floatschemaboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedVoid](#floatschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedBoolean](#floatschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedNumber](#floatschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedString](#floatschemaboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedList](#floatschemaboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.FloatSchemaBoxedMap](#floatschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.FloatSchema](#floatschema)
          schema class | +| sealed interface | [AnyTypeAndFormat.DoubleSchemaBoxed](#doubleschemaboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedVoid](#doubleschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedNumber](#doubleschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedString](#doubleschemaboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedList](#doubleschemaboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.DoubleSchemaBoxedMap](#doubleschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.DoubleSchema](#doubleschema)
          schema class | | sealed interface | [AnyTypeAndFormat.Int64Boxed](#int64boxed)
          sealed interface for validated payloads | | record | [AnyTypeAndFormat.Int64BoxedVoid](#int64boxedvoid)
          boxed class to store validated null payloads | | record | [AnyTypeAndFormat.Int64BoxedBoolean](#int64boxedboolean)
          boxed class to store validated boolean payloads | @@ -57,14 +57,14 @@ A class that contains necessary nested | record | [AnyTypeAndFormat.BinaryBoxedList](#binaryboxedlist)
          boxed class to store validated List payloads | | record | [AnyTypeAndFormat.BinaryBoxedMap](#binaryboxedmap)
          boxed class to store validated Map payloads | | static class | [AnyTypeAndFormat.Binary](#binary)
          schema class | -| sealed interface | [AnyTypeAndFormat.NumberBoxed](#numberboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.NumberBoxedVoid](#numberboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.NumberBoxedBoolean](#numberboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.NumberBoxedNumber](#numberboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.NumberBoxedString](#numberboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.NumberBoxedList](#numberboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.NumberBoxedMap](#numberboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.Number](#number)
          schema class | +| sealed interface | [AnyTypeAndFormat.NumberSchemaBoxed](#numberschemaboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedVoid](#numberschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedBoolean](#numberschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedNumber](#numberschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedString](#numberschemaboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedList](#numberschemaboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.NumberSchemaBoxedMap](#numberschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.NumberSchema](#numberschema)
          schema class | | sealed interface | [AnyTypeAndFormat.DatetimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [AnyTypeAndFormat.DatetimeBoxedVoid](#datetimeboxedvoid)
          boxed class to store validated null payloads | | record | [AnyTypeAndFormat.DatetimeBoxedBoolean](#datetimeboxedboolean)
          boxed class to store validated boolean payloads | @@ -81,14 +81,14 @@ A class that contains necessary nested | record | [AnyTypeAndFormat.DateBoxedList](#dateboxedlist)
          boxed class to store validated List payloads | | record | [AnyTypeAndFormat.DateBoxedMap](#dateboxedmap)
          boxed class to store validated Map payloads | | static class | [AnyTypeAndFormat.Date](#date)
          schema class | -| sealed interface | [AnyTypeAndFormat.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | -| record | [AnyTypeAndFormat.UuidBoxedVoid](#uuidboxedvoid)
          boxed class to store validated null payloads | -| record | [AnyTypeAndFormat.UuidBoxedBoolean](#uuidboxedboolean)
          boxed class to store validated boolean payloads | -| record | [AnyTypeAndFormat.UuidBoxedNumber](#uuidboxednumber)
          boxed class to store validated Number payloads | -| record | [AnyTypeAndFormat.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | -| record | [AnyTypeAndFormat.UuidBoxedList](#uuidboxedlist)
          boxed class to store validated List payloads | -| record | [AnyTypeAndFormat.UuidBoxedMap](#uuidboxedmap)
          boxed class to store validated Map payloads | -| static class | [AnyTypeAndFormat.Uuid](#uuid)
          schema class | +| sealed interface | [AnyTypeAndFormat.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedVoid](#uuidschemaboxedvoid)
          boxed class to store validated null payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedBoolean](#uuidschemaboxedboolean)
          boxed class to store validated boolean payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedNumber](#uuidschemaboxednumber)
          boxed class to store validated Number payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedList](#uuidschemaboxedlist)
          boxed class to store validated List payloads | +| record | [AnyTypeAndFormat.UuidSchemaBoxedMap](#uuidschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [AnyTypeAndFormat.UuidSchema](#uuidschema)
          schema class | ## AnyTypeAndFormat1Boxed public sealed interface AnyTypeAndFormat1Boxed
          @@ -149,7 +149,7 @@ AnyTypeAndFormat.AnyTypeAndFormatMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("date-time", [Datetime.class](#datetime))),
              new PropertyEntry("number", [Number.class](#number))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("double", [Double.class](#double))),
              new PropertyEntry("float", [Float.class](#float)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("date-time", [Datetime.class](#datetime))),
              new PropertyEntry("number", [NumberSchema.class](#numberschema))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
              new PropertyEntry("float", [FloatSchema.class](#floatschema)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -174,15 +174,15 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | uuid(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setUuid(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | date(String value) | @@ -201,15 +201,15 @@ A class that builds the Map input type | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(double value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(List value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | dateHyphenMinusTime(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | number(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setNumber(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | binary(String value) | @@ -237,24 +237,24 @@ A class that builds the Map input type | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(double value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(List value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | int64(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | double(Map value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(Void value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(boolean value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(String value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(int value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(float value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(long value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(double value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(List value) | -| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | float(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setDouble(Map value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(Void value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(boolean value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(String value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(int value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(float value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(long value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(double value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(List value) | +| [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | setFloat(Map value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, Void value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, boolean value) | | [AnyTypeAndFormatMapBuilder](#anytypeandformatmapbuilder) | additionalProperty(String key, String value) | @@ -275,39 +275,35 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [AnyTypeAndFormatMap](#anytypeandformatmap) | of([Map](#anytypeandformatmapbuilder) arg, SchemaConfiguration configuration) | -| @Nullable Object | uuid()
          [optional] value must be a uuid | | @Nullable Object | date()
          [optional] value must conform to RFC-3339 full-date YYYY-MM-DD | -| @Nullable Object | number()
          [optional] value must be int or float numeric | | @Nullable Object | binary()
          [optional] | | @Nullable Object | int32()
          [optional] value must be a 32 bit integer | | @Nullable Object | int64()
          [optional] value must be a 64 bit integer | -| @Nullable Object | double()
          [optional] value must be a 64 bit float | -| @Nullable Object | float()
          [optional] value must be a 32 bit float | -| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["date-time"], | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["uuid"], instance["date-time"], instance["number"], instance["double"], instance["float"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## FloatBoxed -public sealed interface FloatBoxed
          +## FloatSchemaBoxed +public sealed interface FloatSchemaBoxed
          permits
          -[FloatBoxedVoid](#floatboxedvoid), -[FloatBoxedBoolean](#floatboxedboolean), -[FloatBoxedNumber](#floatboxednumber), -[FloatBoxedString](#floatboxedstring), -[FloatBoxedList](#floatboxedlist), -[FloatBoxedMap](#floatboxedmap) +[FloatSchemaBoxedVoid](#floatschemaboxedvoid), +[FloatSchemaBoxedBoolean](#floatschemaboxedboolean), +[FloatSchemaBoxedNumber](#floatschemaboxednumber), +[FloatSchemaBoxedString](#floatschemaboxedstring), +[FloatSchemaBoxedList](#floatschemaboxedlist), +[FloatSchemaBoxedMap](#floatschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## FloatBoxedVoid -public record FloatBoxedVoid
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedVoid +public record FloatSchemaBoxedVoid
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedVoid(Void data)
          Creates an instance, private visibility | +| FloatSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -315,16 +311,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatBoxedBoolean -public record FloatBoxedBoolean
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedBoolean +public record FloatSchemaBoxedBoolean
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| FloatSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -332,16 +328,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatBoxedNumber -public record FloatBoxedNumber
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedNumber +public record FloatSchemaBoxedNumber
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedNumber(Number data)
          Creates an instance, private visibility | +| FloatSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -349,16 +345,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatBoxedString -public record FloatBoxedString
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedString +public record FloatSchemaBoxedString
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedString(String data)
          Creates an instance, private visibility | +| FloatSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -366,16 +362,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatBoxedList -public record FloatBoxedList
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedList +public record FloatSchemaBoxedList
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| FloatSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -383,16 +379,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## FloatBoxedMap -public record FloatBoxedMap
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedMap +public record FloatSchemaBoxedMap
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| FloatSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -400,8 +396,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Float -public static class Float
          +## FloatSchema +public static class FloatSchema
          extends JsonSchema A schema class that validates payloads @@ -424,37 +420,37 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [FloatBoxedString](#floatboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [FloatBoxedVoid](#floatboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [FloatBoxedNumber](#floatboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [FloatBoxedBoolean](#floatboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [FloatBoxedMap](#floatboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [FloatBoxedList](#floatboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [FloatBoxed](#floatboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedString](#floatschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedVoid](#floatschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedNumber](#floatschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedBoolean](#floatschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedMap](#floatschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedList](#floatschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxed](#floatschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## DoubleBoxed -public sealed interface DoubleBoxed
          +## DoubleSchemaBoxed +public sealed interface DoubleSchemaBoxed
          permits
          -[DoubleBoxedVoid](#doubleboxedvoid), -[DoubleBoxedBoolean](#doubleboxedboolean), -[DoubleBoxedNumber](#doubleboxednumber), -[DoubleBoxedString](#doubleboxedstring), -[DoubleBoxedList](#doubleboxedlist), -[DoubleBoxedMap](#doubleboxedmap) +[DoubleSchemaBoxedVoid](#doubleschemaboxedvoid), +[DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean), +[DoubleSchemaBoxedNumber](#doubleschemaboxednumber), +[DoubleSchemaBoxedString](#doubleschemaboxedstring), +[DoubleSchemaBoxedList](#doubleschemaboxedlist), +[DoubleSchemaBoxedMap](#doubleschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## DoubleBoxedVoid -public record DoubleBoxedVoid
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedVoid +public record DoubleSchemaBoxedVoid
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedVoid(Void data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -462,16 +458,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleBoxedBoolean -public record DoubleBoxedBoolean
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedBoolean +public record DoubleSchemaBoxedBoolean
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -479,16 +475,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleBoxedNumber -public record DoubleBoxedNumber
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedNumber +public record DoubleSchemaBoxedNumber
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedNumber(Number data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -496,16 +492,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleBoxedString -public record DoubleBoxedString
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedString +public record DoubleSchemaBoxedString
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedString(String data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -513,16 +509,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleBoxedList -public record DoubleBoxedList
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedList +public record DoubleSchemaBoxedList
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -530,16 +526,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## DoubleBoxedMap -public record DoubleBoxedMap
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedMap +public record DoubleSchemaBoxedMap
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -547,8 +543,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Double -public static class Double
          +## DoubleSchema +public static class DoubleSchema
          extends JsonSchema A schema class that validates payloads @@ -571,13 +567,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [DoubleBoxedString](#doubleboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [DoubleBoxedVoid](#doubleboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [DoubleBoxedNumber](#doubleboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [DoubleBoxedBoolean](#doubleboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [DoubleBoxedMap](#doubleboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [DoubleBoxedList](#doubleboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [DoubleBoxed](#doubleboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedString](#doubleschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedVoid](#doubleschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedNumber](#doubleschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedBoolean](#doubleschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedMap](#doubleschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedList](#doubleschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxed](#doubleschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Int64Boxed @@ -1021,28 +1017,28 @@ A schema class that validates payloads | [BinaryBoxed](#binaryboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## NumberBoxed -public sealed interface NumberBoxed
          +## NumberSchemaBoxed +public sealed interface NumberSchemaBoxed
          permits
          -[NumberBoxedVoid](#numberboxedvoid), -[NumberBoxedBoolean](#numberboxedboolean), -[NumberBoxedNumber](#numberboxednumber), -[NumberBoxedString](#numberboxedstring), -[NumberBoxedList](#numberboxedlist), -[NumberBoxedMap](#numberboxedmap) +[NumberSchemaBoxedVoid](#numberschemaboxedvoid), +[NumberSchemaBoxedBoolean](#numberschemaboxedboolean), +[NumberSchemaBoxedNumber](#numberschemaboxednumber), +[NumberSchemaBoxedString](#numberschemaboxedstring), +[NumberSchemaBoxedList](#numberschemaboxedlist), +[NumberSchemaBoxedMap](#numberschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## NumberBoxedVoid -public record NumberBoxedVoid
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedVoid +public record NumberSchemaBoxedVoid
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedVoid(Void data)
          Creates an instance, private visibility | +| NumberSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1050,16 +1046,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberBoxedBoolean -public record NumberBoxedBoolean
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedBoolean +public record NumberSchemaBoxedBoolean
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| NumberSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1067,16 +1063,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberBoxedNumber -public record NumberBoxedNumber
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedNumber +public record NumberSchemaBoxedNumber
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedNumber(Number data)
          Creates an instance, private visibility | +| NumberSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1084,16 +1080,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberBoxedString -public record NumberBoxedString
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedString +public record NumberSchemaBoxedString
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedString(String data)
          Creates an instance, private visibility | +| NumberSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1101,16 +1097,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberBoxedList -public record NumberBoxedList
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedList +public record NumberSchemaBoxedList
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| NumberSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1118,16 +1114,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## NumberBoxedMap -public record NumberBoxedMap
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedMap +public record NumberSchemaBoxedMap
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| NumberSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1135,8 +1131,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Number -public static class Number
          +## NumberSchema +public static class NumberSchema
          extends JsonSchema A schema class that validates payloads @@ -1159,13 +1155,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [NumberBoxedString](#numberboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [NumberBoxedVoid](#numberboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [NumberBoxedNumber](#numberboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [NumberBoxedBoolean](#numberboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [NumberBoxedMap](#numberboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [NumberBoxedList](#numberboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [NumberBoxed](#numberboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedString](#numberschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedVoid](#numberschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedNumber](#numberschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedBoolean](#numberschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedMap](#numberschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedList](#numberschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxed](#numberschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## DatetimeBoxed @@ -1462,28 +1458,28 @@ A schema class that validates payloads | [DateBoxed](#dateboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## UuidBoxed -public sealed interface UuidBoxed
          +## UuidSchemaBoxed +public sealed interface UuidSchemaBoxed
          permits
          -[UuidBoxedVoid](#uuidboxedvoid), -[UuidBoxedBoolean](#uuidboxedboolean), -[UuidBoxedNumber](#uuidboxednumber), -[UuidBoxedString](#uuidboxedstring), -[UuidBoxedList](#uuidboxedlist), -[UuidBoxedMap](#uuidboxedmap) +[UuidSchemaBoxedVoid](#uuidschemaboxedvoid), +[UuidSchemaBoxedBoolean](#uuidschemaboxedboolean), +[UuidSchemaBoxedNumber](#uuidschemaboxednumber), +[UuidSchemaBoxedString](#uuidschemaboxedstring), +[UuidSchemaBoxedList](#uuidschemaboxedlist), +[UuidSchemaBoxedMap](#uuidschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## UuidBoxedVoid -public record UuidBoxedVoid
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedVoid +public record UuidSchemaBoxedVoid
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated null payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedVoid(Void data)
          Creates an instance, private visibility | +| UuidSchemaBoxedVoid(Void data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1491,16 +1487,16 @@ record that stores validated null payloads, sealed permits implementation | Void | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidBoxedBoolean -public record UuidBoxedBoolean
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedBoolean +public record UuidSchemaBoxedBoolean
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated boolean payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedBoolean(boolean data)
          Creates an instance, private visibility | +| UuidSchemaBoxedBoolean(boolean data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1508,16 +1504,16 @@ record that stores validated boolean payloads, sealed permits implementation | boolean | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidBoxedNumber -public record UuidBoxedNumber
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedNumber +public record UuidSchemaBoxedNumber
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedNumber(Number data)
          Creates an instance, private visibility | +| UuidSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1525,16 +1521,16 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidBoxedString -public record UuidBoxedString
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedString +public record UuidSchemaBoxedString
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedString(String data)
          Creates an instance, private visibility | +| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1542,16 +1538,16 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidBoxedList -public record UuidBoxedList
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedList +public record UuidSchemaBoxedList
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated List payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | +| UuidSchemaBoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1559,16 +1555,16 @@ record that stores validated List payloads, sealed permits implementation | FrozenList<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## UuidBoxedMap -public record UuidBoxedMap
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedMap +public record UuidSchemaBoxedMap
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | +| UuidSchemaBoxedMap(FrozenMap<@Nullable Object> data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1576,8 +1572,8 @@ record that stores validated Map payloads, sealed permits implementation | FrozenMap<@Nullable Object> | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Uuid -public static class Uuid
          +## UuidSchema +public static class UuidSchema
          extends JsonSchema A schema class that validates payloads @@ -1600,13 +1596,13 @@ A schema class that validates payloads | boolean | validate(boolean arg, SchemaConfiguration configuration) | | FrozenMap<@Nullable Object> | validate(Map<?, ?> arg, SchemaConfiguration configuration) | | FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [UuidBoxedString](#uuidboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [UuidBoxedVoid](#uuidboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [UuidBoxedNumber](#uuidboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [UuidBoxedBoolean](#uuidboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [UuidBoxedMap](#uuidboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | -| [UuidBoxedList](#uuidboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [UuidBoxed](#uuidboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedString](#uuidschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedVoid](#uuidschemaboxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedNumber](#uuidschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedBoolean](#uuidschemaboxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedMap](#uuidschemaboxedmap) | validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxedList](#uuidschemaboxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | +| [UuidSchemaBoxed](#uuidschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/ClassModel.md b/samples/client/petstore/java/docs/components/schemas/ClassModel.md index 2b13c142395..f73c00b29b0 100644 --- a/samples/client/petstore/java/docs/components/schemas/ClassModel.md +++ b/samples/client/petstore/java/docs/components/schemas/ClassModel.md @@ -22,9 +22,9 @@ A class that contains necessary nested | static class | [ClassModel.ClassModel1](#classmodel1)
          schema class | | static class | [ClassModel.ClassModelMapBuilder](#classmodelmapbuilder)
          builder for Map payloads | | static class | [ClassModel.ClassModelMap](#classmodelmap)
          output class for Map payloads | -| sealed interface | [ClassModel.ClassBoxed](#classboxed)
          sealed interface for validated payloads | -| record | [ClassModel.ClassBoxedString](#classboxedstring)
          boxed class to store validated String payloads | -| static class | [ClassModel.Class](#class)
          schema class | +| sealed interface | [ClassModel.ClassSchemaBoxed](#classschemaboxed)
          sealed interface for validated payloads | +| record | [ClassModel.ClassSchemaBoxedString](#classschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [ClassModel.ClassSchema](#classschema)
          schema class | ## ClassModel1Boxed public sealed interface ClassModel1Boxed
          @@ -152,7 +152,7 @@ Model for testing model with "_class" property ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("_class", [Class.class](#class)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("_class", [ClassSchema.class](#classschema)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -215,23 +215,23 @@ A class to store validated Map payloads | @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["_class"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## ClassBoxed -public sealed interface ClassBoxed
          +## ClassSchemaBoxed +public sealed interface ClassSchemaBoxed
          permits
          -[ClassBoxedString](#classboxedstring) +[ClassSchemaBoxedString](#classschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## ClassBoxedString -public record ClassBoxedString
          -implements [ClassBoxed](#classboxed) +## ClassSchemaBoxedString +public record ClassSchemaBoxedString
          +implements [ClassSchemaBoxed](#classschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ClassBoxedString(String data)
          Creates an instance, private visibility | +| ClassSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -239,8 +239,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Class -public static class Class
          +## ClassSchema +public static class ClassSchema
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/FormatTest.md b/samples/client/petstore/java/docs/components/schemas/FormatTest.md index fb49c6e5d18..1d986b4ed3c 100644 --- a/samples/client/petstore/java/docs/components/schemas/FormatTest.md +++ b/samples/client/petstore/java/docs/components/schemas/FormatTest.md @@ -34,9 +34,9 @@ A class that contains necessary nested | sealed interface | [FormatTest.UuidNoExampleBoxed](#uuidnoexampleboxed)
          sealed interface for validated payloads | | record | [FormatTest.UuidNoExampleBoxedString](#uuidnoexampleboxedstring)
          boxed class to store validated String payloads | | static class | [FormatTest.UuidNoExample](#uuidnoexample)
          schema class | -| sealed interface | [FormatTest.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | -| record | [FormatTest.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.Uuid](#uuid)
          schema class | +| sealed interface | [FormatTest.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.UuidSchema](#uuidschema)
          schema class | | sealed interface | [FormatTest.DateTimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [FormatTest.DateTimeBoxedString](#datetimeboxedstring)
          boxed class to store validated String payloads | | static class | [FormatTest.DateTime](#datetime)
          schema class | @@ -45,12 +45,12 @@ A class that contains necessary nested | static class | [FormatTest.Date](#date)
          schema class | | sealed interface | [FormatTest.BinaryBoxed](#binaryboxed)
          sealed interface for validated payloads | | static class | [FormatTest.Binary](#binary)
          schema class | -| sealed interface | [FormatTest.ByteBoxed](#byteboxed)
          sealed interface for validated payloads | -| record | [FormatTest.ByteBoxedString](#byteboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.Byte](#byte)
          schema class | -| sealed interface | [FormatTest.StringBoxed](#stringboxed)
          sealed interface for validated payloads | -| record | [FormatTest.StringBoxedString](#stringboxedstring)
          boxed class to store validated String payloads | -| static class | [FormatTest.String](#string)
          schema class | +| sealed interface | [FormatTest.ByteSchemaBoxed](#byteschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.ByteSchemaBoxedString](#byteschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.ByteSchema](#byteschema)
          schema class | +| sealed interface | [FormatTest.StringSchemaBoxed](#stringschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.StringSchemaBoxedString](#stringschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [FormatTest.StringSchema](#stringschema)
          schema class | | sealed interface | [FormatTest.ArrayWithUniqueItemsBoxed](#arraywithuniqueitemsboxed)
          sealed interface for validated payloads | | record | [FormatTest.ArrayWithUniqueItemsBoxedList](#arraywithuniqueitemsboxedlist)
          boxed class to store validated List payloads | | static class | [FormatTest.ArrayWithUniqueItems](#arraywithuniqueitems)
          schema class | @@ -62,18 +62,18 @@ A class that contains necessary nested | sealed interface | [FormatTest.Float64Boxed](#float64boxed)
          sealed interface for validated payloads | | record | [FormatTest.Float64BoxedNumber](#float64boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Float64](#float64)
          schema class | -| sealed interface | [FormatTest.DoubleBoxed](#doubleboxed)
          sealed interface for validated payloads | -| record | [FormatTest.DoubleBoxedNumber](#doubleboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.Double](#double)
          schema class | +| sealed interface | [FormatTest.DoubleSchemaBoxed](#doubleschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.DoubleSchemaBoxedNumber](#doubleschemaboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.DoubleSchema](#doubleschema)
          schema class | | sealed interface | [FormatTest.Float32Boxed](#float32boxed)
          sealed interface for validated payloads | | record | [FormatTest.Float32BoxedNumber](#float32boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Float32](#float32)
          schema class | -| sealed interface | [FormatTest.FloatBoxed](#floatboxed)
          sealed interface for validated payloads | -| record | [FormatTest.FloatBoxedNumber](#floatboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.Float](#float)
          schema class | -| sealed interface | [FormatTest.NumberBoxed](#numberboxed)
          sealed interface for validated payloads | -| record | [FormatTest.NumberBoxedNumber](#numberboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.Number](#number)
          schema class | +| sealed interface | [FormatTest.FloatSchemaBoxed](#floatschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.FloatSchemaBoxedNumber](#floatschemaboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.FloatSchema](#floatschema)
          schema class | +| sealed interface | [FormatTest.NumberSchemaBoxed](#numberschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.NumberSchemaBoxedNumber](#numberschemaboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.NumberSchema](#numberschema)
          schema class | | sealed interface | [FormatTest.Int64Boxed](#int64boxed)
          sealed interface for validated payloads | | record | [FormatTest.Int64BoxedNumber](#int64boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Int64](#int64)
          schema class | @@ -83,9 +83,9 @@ A class that contains necessary nested | sealed interface | [FormatTest.Int32Boxed](#int32boxed)
          sealed interface for validated payloads | | record | [FormatTest.Int32BoxedNumber](#int32boxednumber)
          boxed class to store validated Number payloads | | static class | [FormatTest.Int32](#int32)
          schema class | -| sealed interface | [FormatTest.IntegerBoxed](#integerboxed)
          sealed interface for validated payloads | -| record | [FormatTest.IntegerBoxedNumber](#integerboxednumber)
          boxed class to store validated Number payloads | -| static class | [FormatTest.Integer](#integer)
          schema class | +| sealed interface | [FormatTest.IntegerSchemaBoxed](#integerschemaboxed)
          sealed interface for validated payloads | +| record | [FormatTest.IntegerSchemaBoxedNumber](#integerschemaboxednumber)
          boxed class to store validated Number payloads | +| static class | [FormatTest.IntegerSchema](#integerschema)
          schema class | ## FormatTest1Boxed public sealed interface FormatTest1Boxed
          @@ -137,15 +137,15 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso FormatTest.FormatTestMap validatedPayload = FormatTest.FormatTest1.validate( new FormatTest.FormatTestMapBuilder() - .byte("a") + .setByte("a") .date("2020-12-13") - .number(1) + .setNumber(1) .password("a") - .integer(1) + .setInteger(1) .int32(1) @@ -153,11 +153,11 @@ FormatTest.FormatTestMap validatedPayload = .int64(1L) - .float(3.14f) + .setFloat(3.14f) .float32(3.14f) - .double(3.14d) + .setDouble(3.14d) .float64(3.14d) @@ -166,13 +166,13 @@ FormatTest.FormatTestMap validatedPayload = 1 ) ) - .string("A") + .setString("A") .binary("a") .dateTime("1970-01-01T00:00:00.00Z") - .uuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") + .setUuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") .uuidNoExample("046b6c7f-0b8a-43b9-b35d-6489e6daee91") @@ -191,7 +191,7 @@ FormatTest.FormatTestMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("integer", [Integer.class](#integer))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("number", [Number.class](#number))),
              new PropertyEntry("float", [Float.class](#float))),
              new PropertyEntry("float32", [Float32.class](#float32))),
              new PropertyEntry("double", [Double.class](#double))),
              new PropertyEntry("float64", [Float64.class](#float64))),
              new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
              new PropertyEntry("string", [String.class](#string))),
              new PropertyEntry("byte", [Byte.class](#byte))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
              new PropertyEntry("password", [Password.class](#password))),
              new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
              new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
              new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("integer", [IntegerSchema.class](#integerschema))),
              new PropertyEntry("int32", [Int32.class](#int32))),
              new PropertyEntry("int32withValidations", [Int32withValidations.class](#int32withvalidations))),
              new PropertyEntry("int64", [Int64.class](#int64))),
              new PropertyEntry("number", [NumberSchema.class](#numberschema))),
              new PropertyEntry("float", [FloatSchema.class](#floatschema))),
              new PropertyEntry("float32", [Float32.class](#float32))),
              new PropertyEntry("double", [DoubleSchema.class](#doubleschema))),
              new PropertyEntry("float64", [Float64.class](#float64))),
              new PropertyEntry("arrayWithUniqueItems", [ArrayWithUniqueItems.class](#arraywithuniqueitems))),
              new PropertyEntry("string", [StringSchema.class](#stringschema))),
              new PropertyEntry("byte", [ByteSchema.class](#byteschema))),
              new PropertyEntry("binary", [Binary.class](#binary))),
              new PropertyEntry("date", [Date.class](#date))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("uuidNoExample", [UuidNoExample.class](#uuidnoexample))),
              new PropertyEntry("password", [Password.class](#password))),
              new PropertyEntry("pattern_with_digits", [PatternWithDigits.class](#patternwithdigits))),
              new PropertyEntry("pattern_with_digits_and_delimiter", [PatternWithDigitsAndDelimiter.class](#patternwithdigitsanddelimiter))),
              new PropertyEntry("noneProp", [NoneProp.class](#noneprop)))
          )
          | | Set | required = Set.of(
              "byte",
              "date",
              "number",
              "password"
          )
          | ### Method Summary @@ -217,10 +217,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | integer(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setInteger(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int32withValidations(int value) | @@ -229,27 +229,27 @@ A class that builds the Map input type | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | int64(double value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | float(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | float(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | float(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | float(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setFloat(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float32(double value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | double(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | double(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | double(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | double(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setDouble(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(int value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(float value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(long value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | float64(double value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | arrayWithUniqueItems(List value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | string(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setString(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | binary(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | dateTime(String value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | uuid(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setUuid(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | uuidNoExample(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | pattern_with_digits(String value) | | [FormatTestMap0000Builder](#formattestmap0000builder) | pattern_with_digits_and_delimiter(String value) | @@ -294,10 +294,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0000Builder](#formattestmap0000builder) | number(int value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | number(float value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | number(long value) | -| [FormatTestMap0000Builder](#formattestmap0000builder) | number(double value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(int value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(float value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(long value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setNumber(double value) | ## FormatTestMap0011Builder public class FormatTestMap0011Builder
          @@ -313,10 +313,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0001Builder](#formattestmap0001builder) | number(int value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | number(float value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | number(long value) | -| [FormatTestMap0001Builder](#formattestmap0001builder) | number(double value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(int value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(float value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(long value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | setNumber(double value) | | [FormatTestMap0010Builder](#formattestmap0010builder) | password(String value) | ## FormatTestMap0100Builder @@ -367,10 +367,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [FormatTestMap0010Builder](#formattestmap0010builder) | date(String value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | number(int value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | number(float value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | number(long value) | -| [FormatTestMap0100Builder](#formattestmap0100builder) | number(double value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(int value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(float value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(long value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | setNumber(double value) | ## FormatTestMap0111Builder public class FormatTestMap0111Builder
          @@ -387,10 +387,10 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [FormatTestMap0011Builder](#formattestmap0011builder) | date(String value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | number(int value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | number(float value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | number(long value) | -| [FormatTestMap0101Builder](#formattestmap0101builder) | number(double value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(int value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(float value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(long value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | setNumber(double value) | | [FormatTestMap0110Builder](#formattestmap0110builder) | password(String value) | ## FormatTestMap1000Builder @@ -407,7 +407,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0000Builder](#formattestmap0000builder) | byte(String value) | +| [FormatTestMap0000Builder](#formattestmap0000builder) | setByte(String value) | ## FormatTestMap1001Builder public class FormatTestMap1001Builder
          @@ -423,7 +423,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0001Builder](#formattestmap0001builder) | byte(String value) | +| [FormatTestMap0001Builder](#formattestmap0001builder) | setByte(String value) | | [FormatTestMap1000Builder](#formattestmap1000builder) | password(String value) | ## FormatTestMap1010Builder @@ -440,11 +440,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0010Builder](#formattestmap0010builder) | byte(String value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | number(int value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | number(float value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | number(long value) | -| [FormatTestMap1000Builder](#formattestmap1000builder) | number(double value) | +| [FormatTestMap0010Builder](#formattestmap0010builder) | setByte(String value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(int value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(float value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(long value) | +| [FormatTestMap1000Builder](#formattestmap1000builder) | setNumber(double value) | ## FormatTestMap1011Builder public class FormatTestMap1011Builder
          @@ -460,11 +460,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0011Builder](#formattestmap0011builder) | byte(String value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | number(int value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | number(float value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | number(long value) | -| [FormatTestMap1001Builder](#formattestmap1001builder) | number(double value) | +| [FormatTestMap0011Builder](#formattestmap0011builder) | setByte(String value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(int value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(float value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(long value) | +| [FormatTestMap1001Builder](#formattestmap1001builder) | setNumber(double value) | | [FormatTestMap1010Builder](#formattestmap1010builder) | password(String value) | ## FormatTestMap1100Builder @@ -481,7 +481,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0100Builder](#formattestmap0100builder) | byte(String value) | +| [FormatTestMap0100Builder](#formattestmap0100builder) | setByte(String value) | | [FormatTestMap1000Builder](#formattestmap1000builder) | date(String value) | ## FormatTestMap1101Builder @@ -498,7 +498,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0101Builder](#formattestmap0101builder) | byte(String value) | +| [FormatTestMap0101Builder](#formattestmap0101builder) | setByte(String value) | | [FormatTestMap1001Builder](#formattestmap1001builder) | date(String value) | | [FormatTestMap1100Builder](#formattestmap1100builder) | password(String value) | @@ -516,12 +516,12 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0110Builder](#formattestmap0110builder) | byte(String value) | +| [FormatTestMap0110Builder](#formattestmap0110builder) | setByte(String value) | | [FormatTestMap1010Builder](#formattestmap1010builder) | date(String value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | number(int value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | number(float value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | number(long value) | -| [FormatTestMap1100Builder](#formattestmap1100builder) | number(double value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(int value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(float value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(long value) | +| [FormatTestMap1100Builder](#formattestmap1100builder) | setNumber(double value) | ## FormatTestMapBuilder public class FormatTestMapBuilder
          @@ -537,12 +537,12 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FormatTestMap0111Builder](#formattestmap0111builder) | byte(String value) | +| [FormatTestMap0111Builder](#formattestmap0111builder) | setByte(String value) | | [FormatTestMap1011Builder](#formattestmap1011builder) | date(String value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | number(int value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | number(float value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | number(long value) | -| [FormatTestMap1101Builder](#formattestmap1101builder) | number(double value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(int value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(float value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(long value) | +| [FormatTestMap1101Builder](#formattestmap1101builder) | setNumber(double value) | | [FormatTestMap1110Builder](#formattestmap1110builder) | password(String value) | ## FormatTestMap @@ -555,27 +555,21 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [FormatTestMap](#formattestmap) | of([Map](#formattestmapbuilder) arg, SchemaConfiguration configuration) | -| String | byte()
          | | String | date()
          value must conform to RFC-3339 full-date YYYY-MM-DD | -| Number | number()
          | | String | password()
          | -| Number | integer()
          [optional] | | Number | int32()
          [optional] value must be a 32 bit integer | | Number | int32withValidations()
          [optional] value must be a 32 bit integer | | Number | int64()
          [optional] value must be a 64 bit integer | -| Number | float()
          [optional] value must be a 32 bit float | | Number | float32()
          [optional] value must be a 32 bit float | -| Number | double()
          [optional] value must be a 64 bit float | | Number | float64()
          [optional] value must be a 64 bit float | | [ArrayWithUniqueItemsList](#arraywithuniqueitemslist) | arrayWithUniqueItems()
          [optional] | -| String | string()
          [optional] | | String | binary()
          [optional] | | String | dateTime()
          [optional] value must conform to RFC-3339 date-time | -| String | uuid()
          [optional] value must be a uuid | | String | uuidNoExample()
          [optional] value must be a uuid | | String | pattern_with_digits()
          [optional] | | String | pattern_with_digits_and_delimiter()
          [optional] | | Void | noneProp()
          [optional] | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["byte"], instance["number"], instance["integer"], instance["float"], instance["double"], instance["string"], instance["uuid"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## NonePropBoxed @@ -857,23 +851,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## UuidBoxed -public sealed interface UuidBoxed
          +## UuidSchemaBoxed +public sealed interface UuidSchemaBoxed
          permits
          -[UuidBoxedString](#uuidboxedstring) +[UuidSchemaBoxedString](#uuidschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## UuidBoxedString -public record UuidBoxedString
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedString +public record UuidSchemaBoxedString
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedString(String data)
          Creates an instance, private visibility | +| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -881,8 +875,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Uuid -public static class Uuid
          +## UuidSchema +public static class UuidSchema
          extends UuidJsonSchema.UuidJsonSchema1 A schema class that validates payloads @@ -974,23 +968,23 @@ extends JsonSchema A schema class that validates payloads -## ByteBoxed -public sealed interface ByteBoxed
          +## ByteSchemaBoxed +public sealed interface ByteSchemaBoxed
          permits
          -[ByteBoxedString](#byteboxedstring) +[ByteSchemaBoxedString](#byteschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## ByteBoxedString -public record ByteBoxedString
          -implements [ByteBoxed](#byteboxed) +## ByteSchemaBoxedString +public record ByteSchemaBoxedString
          +implements [ByteSchemaBoxed](#byteschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ByteBoxedString(String data)
          Creates an instance, private visibility | +| ByteSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -998,29 +992,29 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Byte -public static class Byte
          +## ByteSchema +public static class ByteSchema
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads -## StringBoxed -public sealed interface StringBoxed
          +## StringSchemaBoxed +public sealed interface StringSchemaBoxed
          permits
          -[StringBoxedString](#stringboxedstring) +[StringSchemaBoxedString](#stringschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## StringBoxedString -public record StringBoxedString
          -implements [StringBoxed](#stringboxed) +## StringSchemaBoxedString +public record StringSchemaBoxedString
          +implements [StringSchemaBoxed](#stringschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| StringBoxedString(String data)
          Creates an instance, private visibility | +| StringSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1028,8 +1022,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## String -public static class String
          +## StringSchema +public static class StringSchema
          extends JsonSchema A schema class that validates payloads @@ -1051,7 +1045,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // String validation -String validatedPayload = FormatTest.String.validate( +String validatedPayload = FormatTest.StringSchema.validate( "A", configuration ); @@ -1067,8 +1061,8 @@ String validatedPayload = FormatTest.String.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | String | validate(String arg, SchemaConfiguration configuration) | -| [StringBoxedString](#stringboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [StringBoxed](#stringboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [StringSchemaBoxedString](#stringschemaboxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | +| [StringSchemaBoxed](#stringschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## ArrayWithUniqueItemsBoxed @@ -1245,23 +1239,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## DoubleBoxed -public sealed interface DoubleBoxed
          +## DoubleSchemaBoxed +public sealed interface DoubleSchemaBoxed
          permits
          -[DoubleBoxedNumber](#doubleboxednumber) +[DoubleSchemaBoxedNumber](#doubleschemaboxednumber) sealed interface that stores validated payloads using boxed classes -## DoubleBoxedNumber -public record DoubleBoxedNumber
          -implements [DoubleBoxed](#doubleboxed) +## DoubleSchemaBoxedNumber +public record DoubleSchemaBoxedNumber
          +implements [DoubleSchemaBoxed](#doubleschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| DoubleBoxedNumber(Number data)
          Creates an instance, private visibility | +| DoubleSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1269,8 +1263,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Double -public static class Double
          +## DoubleSchema +public static class DoubleSchema
          extends JsonSchema A schema class that validates payloads @@ -1292,7 +1286,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // double validation -double validatedPayload = FormatTest.Double.validate( +double validatedPayload = FormatTest.DoubleSchema.validate( 3.14d, configuration ); @@ -1310,8 +1304,8 @@ double validatedPayload = FormatTest.Double.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | double | validate(double arg, SchemaConfiguration configuration) | -| [DoubleBoxedNumber](#doubleboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [DoubleBoxed](#doubleboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxedNumber](#doubleschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [DoubleSchemaBoxed](#doubleschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Float32Boxed @@ -1349,23 +1343,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## FloatBoxed -public sealed interface FloatBoxed
          +## FloatSchemaBoxed +public sealed interface FloatSchemaBoxed
          permits
          -[FloatBoxedNumber](#floatboxednumber) +[FloatSchemaBoxedNumber](#floatschemaboxednumber) sealed interface that stores validated payloads using boxed classes -## FloatBoxedNumber -public record FloatBoxedNumber
          -implements [FloatBoxed](#floatboxed) +## FloatSchemaBoxedNumber +public record FloatSchemaBoxedNumber
          +implements [FloatSchemaBoxed](#floatschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| FloatBoxedNumber(Number data)
          Creates an instance, private visibility | +| FloatSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1373,8 +1367,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Float -public static class Float
          +## FloatSchema +public static class FloatSchema
          extends JsonSchema A schema class that validates payloads @@ -1399,7 +1393,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // float validation -float validatedPayload = FormatTest.Float.validate( +float validatedPayload = FormatTest.FloatSchema.validate( 3.14f, configuration ); @@ -1417,27 +1411,27 @@ float validatedPayload = FormatTest.Float.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | float | validate(float arg, SchemaConfiguration configuration) | -| [FloatBoxedNumber](#floatboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [FloatBoxed](#floatboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxedNumber](#floatschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [FloatSchemaBoxed](#floatschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | -## NumberBoxed -public sealed interface NumberBoxed
          +## NumberSchemaBoxed +public sealed interface NumberSchemaBoxed
          permits
          -[NumberBoxedNumber](#numberboxednumber) +[NumberSchemaBoxedNumber](#numberschemaboxednumber) sealed interface that stores validated payloads using boxed classes -## NumberBoxedNumber -public record NumberBoxedNumber
          -implements [NumberBoxed](#numberboxed) +## NumberSchemaBoxedNumber +public record NumberSchemaBoxedNumber
          +implements [NumberSchemaBoxed](#numberschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| NumberBoxedNumber(Number data)
          Creates an instance, private visibility | +| NumberSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1445,8 +1439,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Number -public static class Number
          +## NumberSchema +public static class NumberSchema
          extends JsonSchema A schema class that validates payloads @@ -1468,7 +1462,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // int validation -int validatedPayload = FormatTest.Number.validate( +int validatedPayload = FormatTest.NumberSchema.validate( 1, configuration ); @@ -1486,8 +1480,8 @@ int validatedPayload = FormatTest.Number.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Number | validate(Number arg, SchemaConfiguration configuration) | -| [NumberBoxedNumber](#numberboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [NumberBoxed](#numberboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxedNumber](#numberschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [NumberSchemaBoxed](#numberschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## Int64Boxed @@ -1629,23 +1623,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## IntegerBoxed -public sealed interface IntegerBoxed
          +## IntegerSchemaBoxed +public sealed interface IntegerSchemaBoxed
          permits
          -[IntegerBoxedNumber](#integerboxednumber) +[IntegerSchemaBoxedNumber](#integerschemaboxednumber) sealed interface that stores validated payloads using boxed classes -## IntegerBoxedNumber -public record IntegerBoxedNumber
          -implements [IntegerBoxed](#integerboxed) +## IntegerSchemaBoxedNumber +public record IntegerSchemaBoxedNumber
          +implements [IntegerSchemaBoxed](#integerschemaboxed) record that stores validated Number payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| IntegerBoxedNumber(Number data)
          Creates an instance, private visibility | +| IntegerSchemaBoxedNumber(Number data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -1653,8 +1647,8 @@ record that stores validated Number payloads, sealed permits implementation | Number | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Integer -public static class Integer
          +## IntegerSchema +public static class IntegerSchema
          extends JsonSchema A schema class that validates payloads @@ -1676,7 +1670,7 @@ import java.util.AbstractMap; static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); // int validation -int validatedPayload = FormatTest.Integer.validate( +int validatedPayload = FormatTest.IntegerSchema.validate( 1L, configuration ); @@ -1695,8 +1689,8 @@ int validatedPayload = FormatTest.Integer.validate( | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | long | validate(long arg, SchemaConfiguration configuration) | -| [IntegerBoxedNumber](#integerboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [IntegerBoxed](#integerboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [IntegerSchemaBoxedNumber](#integerschemaboxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | +| [IntegerSchemaBoxed](#integerschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md index 9a687b2c483..3f4b18423cc 100644 --- a/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/java/docs/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.md @@ -17,17 +17,17 @@ A class that contains necessary nested | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClass1](#mixedpropertiesandadditionalpropertiesclass1)
          schema class | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder)
          builder for Map payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMap](#mixedpropertiesandadditionalpropertiesclassmap)
          output class for Map payloads | -| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.MapBoxed](#mapboxed)
          sealed interface for validated payloads | -| record | [MixedPropertiesAndAdditionalPropertiesClass.MapBoxedMap](#mapboxedmap)
          boxed class to store validated Map payloads | -| static class | [MixedPropertiesAndAdditionalPropertiesClass.Map](#map)
          schema class | +| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.MapSchemaBoxed](#mapschemaboxed)
          sealed interface for validated payloads | +| record | [MixedPropertiesAndAdditionalPropertiesClass.MapSchemaBoxedMap](#mapschemaboxedmap)
          boxed class to store validated Map payloads | +| static class | [MixedPropertiesAndAdditionalPropertiesClass.MapSchema](#mapschema)
          schema class | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MapMapBuilder](#mapmapbuilder)
          builder for Map payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.MapMap](#mapmap)
          output class for Map payloads | | sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.DateTimeBoxed](#datetimeboxed)
          sealed interface for validated payloads | | record | [MixedPropertiesAndAdditionalPropertiesClass.DateTimeBoxedString](#datetimeboxedstring)
          boxed class to store validated String payloads | | static class | [MixedPropertiesAndAdditionalPropertiesClass.DateTime](#datetime)
          schema class | -| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.UuidBoxed](#uuidboxed)
          sealed interface for validated payloads | -| record | [MixedPropertiesAndAdditionalPropertiesClass.UuidBoxedString](#uuidboxedstring)
          boxed class to store validated String payloads | -| static class | [MixedPropertiesAndAdditionalPropertiesClass.Uuid](#uuid)
          schema class | +| sealed interface | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchemaBoxed](#uuidschemaboxed)
          sealed interface for validated payloads | +| record | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchemaBoxedString](#uuidschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [MixedPropertiesAndAdditionalPropertiesClass.UuidSchema](#uuidschema)
          schema class | ## MixedPropertiesAndAdditionalPropertiesClass1Boxed public sealed interface MixedPropertiesAndAdditionalPropertiesClass1Boxed
          @@ -79,11 +79,11 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMap validatedPayload = MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClass1.validate( new MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalPropertiesClassMapBuilder() - .uuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") + .setUuid("046b6c7f-0b8a-43b9-b35d-6489e6daee91") .dateTime("1970-01-01T00:00:00.00Z") - .map( + .setMap( MapUtils.makeMap( new AbstractMap.SimpleEntry>( "someAdditionalProperty", @@ -109,7 +109,7 @@ MixedPropertiesAndAdditionalPropertiesClass.MixedPropertiesAndAdditionalProperti | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [Uuid.class](#uuid))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("map", [Map.class](#map)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("uuid", [UuidSchema.class](#uuidschema))),
              new PropertyEntry("dateTime", [DateTime.class](#datetime))),
              new PropertyEntry("map", [MapSchema.class](#mapschema)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -134,9 +134,9 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | uuid(String value) | +| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | setUuid(String value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | dateTime(String value) | -| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | map(Map> value) | +| [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | setMap(Map> value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, Void value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, boolean value) | | [MixedPropertiesAndAdditionalPropertiesClassMapBuilder](#mixedpropertiesandadditionalpropertiesclassmapbuilder) | additionalProperty(String key, String value) | @@ -157,28 +157,27 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [MixedPropertiesAndAdditionalPropertiesClassMap](#mixedpropertiesandadditionalpropertiesclassmap) | of([Map](#mixedpropertiesandadditionalpropertiesclassmapbuilder) arg, SchemaConfiguration configuration) | -| String | uuid()
          [optional] value must be a uuid | | String | dateTime()
          [optional] value must conform to RFC-3339 date-time | -| [MapMap](#mapmap) | map()
          [optional] | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["uuid"], instance["map"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## MapBoxed -public sealed interface MapBoxed
          +## MapSchemaBoxed +public sealed interface MapSchemaBoxed
          permits
          -[MapBoxedMap](#mapboxedmap) +[MapSchemaBoxedMap](#mapschemaboxedmap) sealed interface that stores validated payloads using boxed classes -## MapBoxedMap -public record MapBoxedMap
          -implements [MapBoxed](#mapboxed) +## MapSchemaBoxedMap +public record MapSchemaBoxedMap
          +implements [MapSchemaBoxed](#mapschemaboxed) record that stores validated Map payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| MapBoxedMap([MapMap](#mapmap) data)
          Creates an instance, private visibility | +| MapSchemaBoxedMap([MapMap](#mapmap) data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -186,8 +185,8 @@ record that stores validated Map payloads, sealed permits implementation | [MapMap](#mapmap) | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Map -public static class Map
          +## MapSchema +public static class MapSchema
          extends JsonSchema A schema class that validates payloads @@ -210,7 +209,7 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso // Map validation MixedPropertiesAndAdditionalPropertiesClass.MapMap validatedPayload = - MixedPropertiesAndAdditionalPropertiesClass.Map.validate( + MixedPropertiesAndAdditionalPropertiesClass.MapSchema.validate( new MixedPropertiesAndAdditionalPropertiesClass.MapMapBuilder() .additionalProperty( "someAdditionalProperty", @@ -240,8 +239,8 @@ MixedPropertiesAndAdditionalPropertiesClass.MapMap validatedPayload = | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | [MapMap](#mapmap) | validate([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | -| [MapBoxedMap](#mapboxedmap) | validateAndBox([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | -| [MapBoxed](#mapboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | +| [MapSchemaBoxedMap](#mapschemaboxedmap) | validateAndBox([Map<?, ?>](#mapmapbuilder) arg, SchemaConfiguration configuration) | +| [MapSchemaBoxed](#mapschemaboxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | | @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | ## MapMapBuilder @@ -308,23 +307,23 @@ A schema class that validates payloads | validate | | validateAndBox | -## UuidBoxed -public sealed interface UuidBoxed
          +## UuidSchemaBoxed +public sealed interface UuidSchemaBoxed
          permits
          -[UuidBoxedString](#uuidboxedstring) +[UuidSchemaBoxedString](#uuidschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## UuidBoxedString -public record UuidBoxedString
          -implements [UuidBoxed](#uuidboxed) +## UuidSchemaBoxedString +public record UuidSchemaBoxedString
          +implements [UuidSchemaBoxed](#uuidschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| UuidBoxedString(String data)
          Creates an instance, private visibility | +| UuidSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -332,8 +331,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Uuid -public static class Uuid
          +## UuidSchema +public static class UuidSchema
          extends UuidJsonSchema.UuidJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md index 1e8e670ef61..e4a3c0b56ca 100644 --- a/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md +++ b/samples/client/petstore/java/docs/components/schemas/ObjectModelWithRefProps.md @@ -80,7 +80,7 @@ ObjectModelWithRefProps.ObjectModelWithRefPropsMap validatedPayload = | Modifier and Type | Field and Description | | ----------------- | ---------------------- | | Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
              new PropertyEntry("myString", [String.String1.class](../../components/schemas/String.md#string1)),
              new PropertyEntry("myBoolean", [Boolean.Boolean1.class](../../components/schemas/Boolean.md#boolean1))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("myNumber", [NumberWithValidations.NumberWithValidations1.class](../../components/schemas/NumberWithValidations.md#numberwithvalidations1)),
              new PropertyEntry("myString", [StringSchema.StringSchema1.class](../../components/schemas/StringSchema.md#stringschema1)),
              new PropertyEntry("myBoolean", [BooleanSchema.BooleanSchema1.class](../../components/schemas/BooleanSchema.md#booleanschema1))
          )
          | ### Method Summary | Modifier and Type | Method and Description | diff --git a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md index 53d81aa13b0..e5f2df3e162 100644 --- a/samples/client/petstore/java/docs/components/schemas/Schema200Response.md +++ b/samples/client/petstore/java/docs/components/schemas/Schema200Response.md @@ -22,9 +22,9 @@ A class that contains necessary nested | static class | [Schema200Response.Schema200Response1](#schema200response1)
          schema class | | static class | [Schema200Response.Schema200ResponseMapBuilder](#schema200responsemapbuilder)
          builder for Map payloads | | static class | [Schema200Response.Schema200ResponseMap](#schema200responsemap)
          output class for Map payloads | -| sealed interface | [Schema200Response.ClassBoxed](#classboxed)
          sealed interface for validated payloads | -| record | [Schema200Response.ClassBoxedString](#classboxedstring)
          boxed class to store validated String payloads | -| static class | [Schema200Response.Class](#class)
          schema class | +| sealed interface | [Schema200Response.ClassSchemaBoxed](#classschemaboxed)
          sealed interface for validated payloads | +| record | [Schema200Response.ClassSchemaBoxedString](#classschemaboxedstring)
          boxed class to store validated String payloads | +| static class | [Schema200Response.ClassSchema](#classschema)
          schema class | | sealed interface | [Schema200Response.NameBoxed](#nameboxed)
          sealed interface for validated payloads | | record | [Schema200Response.NameBoxedNumber](#nameboxednumber)
          boxed class to store validated Number payloads | | static class | [Schema200Response.Name](#name)
          schema class | @@ -155,7 +155,7 @@ model with an invalid class name for python, starts with a number ### Field Summary | Modifier and Type | Field and Description | | ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("name", [Name.class](#name))),
              new PropertyEntry("class", [Class.class](#class)))
          )
          | +| Map> | properties = Map.ofEntries(
              new PropertyEntry("name", [Name.class](#name))),
              new PropertyEntry("class", [ClassSchema.class](#classschema)))
          )
          | ### Method Summary | Modifier and Type | Method and Description | @@ -196,7 +196,7 @@ A class that builds the Map input type | Map | build()
          Returns map input that should be used with Schema.validate | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | name(int value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | name(float value) | -| [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | class(String value) | +| [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | setClass(String value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, Void value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, boolean value) | | [Schema200ResponseMapBuilder](#schema200responsemapbuilder) | additionalProperty(String key, String value) | @@ -218,26 +218,26 @@ A class to store validated Map payloads | ----------------- | ---------------------- | | static [Schema200ResponseMap](#schema200responsemap) | of([Map](#schema200responsemapbuilder) arg, SchemaConfiguration configuration) | | Number | name()
          [optional] value must be a 32 bit integer | -| String | class()
          [optional] | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["class"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | -## ClassBoxed -public sealed interface ClassBoxed
          +## ClassSchemaBoxed +public sealed interface ClassSchemaBoxed
          permits
          -[ClassBoxedString](#classboxedstring) +[ClassSchemaBoxedString](#classschemaboxedstring) sealed interface that stores validated payloads using boxed classes -## ClassBoxedString -public record ClassBoxedString
          -implements [ClassBoxed](#classboxed) +## ClassSchemaBoxedString +public record ClassSchemaBoxedString
          +implements [ClassSchemaBoxed](#classschemaboxed) record that stores validated String payloads, sealed permits implementation ### Constructor Summary | Constructor and Description | | --------------------------- | -| ClassBoxedString(String data)
          Creates an instance, private visibility | +| ClassSchemaBoxedString(String data)
          Creates an instance, private visibility | ### Method Summary | Modifier and Type | Method and Description | @@ -245,8 +245,8 @@ record that stores validated String payloads, sealed permits implementation | String | data()
          validated payload | | @Nullable Object | getData()
          validated payload | -## Class -public static class Class
          +## ClassSchema +public static class ClassSchema
          extends StringJsonSchema.StringJsonSchema1 A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md index dcc30ca5a02..5075ea7d3c7 100644 --- a/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md +++ b/samples/client/petstore/java/docs/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.md @@ -108,23 +108,23 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchemaMap validatedPayload = ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchema1.validate( new ApplicationxwwwformurlencodedSchema.ApplicationxwwwformurlencodedSchemaMapBuilder() - .byte("a") + .setByte("a") - .double(3.14d) + .setDouble(3.14d) - .number(1) + .setNumber(1) .pattern_without_delimiter("AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>") - .integer(1) + .setInteger(1) .int32(1) .int64(1L) - .float(3.14f) + .setFloat(3.14f) - .string("A") + .setString("A") .binary("a") @@ -171,21 +171,21 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | integer(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setInteger(double value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int32(int value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int32(float value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(int value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(float value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(long value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | int64(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | float(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | string(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setFloat(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setString(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | binary(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | date(String value) | | [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | dateTime(String value) | @@ -231,10 +231,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setNumber(double value) | ## ApplicationxwwwformurlencodedSchemaMap0011Builder public class ApplicationxwwwformurlencodedSchemaMap0011Builder
          @@ -250,10 +250,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setNumber(double value) | | [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap0100Builder @@ -270,10 +270,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setDouble(double value) | ## ApplicationxwwwformurlencodedSchemaMap0101Builder public class ApplicationxwwwformurlencodedSchemaMap0101Builder
          @@ -289,10 +289,10 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setDouble(double value) | | [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap0110Builder @@ -309,14 +309,14 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | double(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setNumber(double value) | ## ApplicationxwwwformurlencodedSchemaMap0111Builder public class ApplicationxwwwformurlencodedSchemaMap0111Builder
          @@ -332,14 +332,14 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | double(double value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setNumber(double value) | | [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1000Builder @@ -356,7 +356,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0000Builder](#applicationxwwwformurlencodedschemamap0000builder) | setByte(String value) | ## ApplicationxwwwformurlencodedSchemaMap1001Builder public class ApplicationxwwwformurlencodedSchemaMap1001Builder
          @@ -372,7 +372,7 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | byte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap0001Builder](#applicationxwwwformurlencodedschemamap0001builder) | setByte(String value) | | [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1010Builder @@ -389,11 +389,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0010Builder](#applicationxwwwformurlencodedschemamap0010builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setNumber(double value) | ## ApplicationxwwwformurlencodedSchemaMap1011Builder public class ApplicationxwwwformurlencodedSchemaMap1011Builder
          @@ -409,11 +409,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0011Builder](#applicationxwwwformurlencodedschemamap0011builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setNumber(double value) | | [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1100Builder @@ -430,11 +430,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0100Builder](#applicationxwwwformurlencodedschemamap0100builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1000Builder](#applicationxwwwformurlencodedschemamap1000builder) | setDouble(double value) | ## ApplicationxwwwformurlencodedSchemaMap1101Builder public class ApplicationxwwwformurlencodedSchemaMap1101Builder
          @@ -450,11 +450,11 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | double(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0101Builder](#applicationxwwwformurlencodedschemamap0101builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1001Builder](#applicationxwwwformurlencodedschemamap1001builder) | setDouble(double value) | | [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap1110Builder @@ -471,15 +471,15 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | double(double value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0110Builder](#applicationxwwwformurlencodedschemamap0110builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1010Builder](#applicationxwwwformurlencodedschemamap1010builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1100Builder](#applicationxwwwformurlencodedschemamap1100builder) | setNumber(double value) | ## ApplicationxwwwformurlencodedSchemaMapBuilder public class ApplicationxwwwformurlencodedSchemaMapBuilder
          @@ -495,15 +495,15 @@ A class that builds the Map input type ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [ApplicationxwwwformurlencodedSchemaMap0111Builder](#applicationxwwwformurlencodedschemamap0111builder) | byte(String value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | double(double value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(int value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(float value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(long value) | -| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | number(double value) | +| [ApplicationxwwwformurlencodedSchemaMap0111Builder](#applicationxwwwformurlencodedschemamap0111builder) | setByte(String value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1011Builder](#applicationxwwwformurlencodedschemamap1011builder) | setDouble(double value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(int value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(float value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(long value) | +| [ApplicationxwwwformurlencodedSchemaMap1101Builder](#applicationxwwwformurlencodedschemamap1101builder) | setNumber(double value) | | [ApplicationxwwwformurlencodedSchemaMap1110Builder](#applicationxwwwformurlencodedschemamap1110builder) | pattern_without_delimiter(String value) | ## ApplicationxwwwformurlencodedSchemaMap @@ -516,20 +516,15 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [ApplicationxwwwformurlencodedSchemaMap](#applicationxwwwformurlencodedschemamap) | of([Map](#applicationxwwwformurlencodedschemamapbuilder) arg, SchemaConfiguration configuration) | -| String | byte()
          | -| Number | double()
          value must be a 64 bit float | -| Number | number()
          | | String | pattern_without_delimiter()
          | -| Number | integer()
          [optional] | | Number | int32()
          [optional] value must be a 32 bit integer | | Number | int64()
          [optional] value must be a 64 bit integer | -| Number | float()
          [optional] value must be a 32 bit float | -| String | string()
          [optional] | | String | binary()
          [optional] | | String | date()
          [optional] value must conform to RFC-3339 full-date YYYY-MM-DD | | String | dateTime()
          [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time | | String | password()
          [optional] | | String | callback()
          [optional] | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["byte"], instance["double"], instance["number"], instance["integer"], instance["float"], instance["string"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | ## ApplicationxwwwformurlencodedCallbackBoxed diff --git a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md index bc11af6fd18..fecda0a9b1d 100644 --- a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | ## FakepetiduploadimagewithrequiredfilePostCode200Response1 public static class FakepetiduploadimagewithrequiredfilePostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index f52c617c14b..bb60c5776fb 100644 --- a/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) +extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) +extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md index f82e5061f56..e24e63e6ee3 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/FakerefsbooleanPost.md @@ -12,7 +12,7 @@ A class that contains necessary endpoint classes | Modifier and Type | Class and Description | | ----------------- | --------------------- | | static class | [Post](#post)
          The class that has a post method to call the endpoint | -| interface | [BooleanOperation](#booleanoperation)
          The interface that has a boolean method to call the endpoint | +| interface | [ModelBooleanOperation](#modelbooleanoperation)
          The interface that has a modelBoolean method to call the endpoint | | static class | [PostRequest](#postrequest)
          The request inputs class | | static class | [PostRequestBuilder](#postrequestbuilder)
          A builder for the request input class | @@ -33,7 +33,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsboolean.post.FakerefsbooleanPostRequestBody; -import org.openapijsonschematools.client.components.schemas.Boolean; +import org.openapijsonschematools.client.components.schemas.BooleanSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -105,15 +105,15 @@ FakerefsbooleanPostCode200Response.ApplicationjsonResponseBody deserializedBody | ----------------- | ---------------------- | | [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | post([PostRequest](#postrequest) request) | -## BooleanOperation -public interface BooleanOperation
          +## ModelBooleanOperation +public interface ModelBooleanOperation
          -an interface that allows one to call the endpoint using a method named boolean by the operationId +an interface that allows one to call the endpoint using a method named modelBoolean by the operationId ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | boolean([PostRequest](#postrequest) request) | +| [FakerefsbooleanPostResponses.EndpointResponse](../../paths/fakerefsboolean/post/FakerefsbooleanPostResponses.md#endpointresponse) | modelBoolean([PostRequest](#postrequest) request) | ## PostRequest public static class PostRequest
          diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md index 9584c679c16..d0446d3d804 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [Boolean1](../../../../../../components/schemas/Boolean.md#boolean) +extends [BooleanSchema1](../../../../../../components/schemas/BooleanSchema.md#booleanschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [Boolean.Boolean1](../../../../../../components/schemas/Boolean.md#boolean1) +extends [BooleanSchema.BooleanSchema1](../../../../../../components/schemas/BooleanSchema.md#booleanschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index 8c9446ef380..1694ac4a00a 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [Boolean1](../../../../../../../components/schemas/Boolean.md#boolean) +extends [BooleanSchema1](../../../../../../../components/schemas/BooleanSchema.md#booleanschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [Boolean.Boolean1](../../../../../../../components/schemas/Boolean.md#boolean1) +extends [BooleanSchema.BooleanSchema1](../../../../../../../components/schemas/BooleanSchema.md#booleanschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md b/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md index e7cfc88741d..0a83e8e30bd 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/FakerefsstringPost.md @@ -12,7 +12,7 @@ A class that contains necessary endpoint classes | Modifier and Type | Class and Description | | ----------------- | --------------------- | | static class | [Post](#post)
          The class that has a post method to call the endpoint | -| interface | [StringOperation](#stringoperation)
          The interface that has a string method to call the endpoint | +| interface | [ModelStringOperation](#modelstringoperation)
          The interface that has a modelString method to call the endpoint | | static class | [PostRequest](#postrequest)
          The request inputs class | | static class | [PostRequestBuilder](#postrequestbuilder)
          A builder for the request input class | @@ -33,7 +33,7 @@ import org.openapijsonschematools.client.schemas.validation.MapUtils; import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.paths.fakerefsstring.post.FakerefsstringPostRequestBody; -import org.openapijsonschematools.client.components.schemas.String; +import org.openapijsonschematools.client.components.schemas.StringSchema; import org.openapijsonschematools.client.RootServerInfo; import org.openapijsonschematools.client.servers.RootServer0; import org.openapijsonschematools.client.servers.RootServer1; @@ -105,15 +105,15 @@ FakerefsstringPostCode200Response.ApplicationjsonResponseBody deserializedBody = | ----------------- | ---------------------- | | [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | post([PostRequest](#postrequest) request) | -## StringOperation -public interface StringOperation
          +## ModelStringOperation +public interface ModelStringOperation
          -an interface that allows one to call the endpoint using a method named string by the operationId +an interface that allows one to call the endpoint using a method named modelString by the operationId ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | string([PostRequest](#postrequest) request) | +| [FakerefsstringPostResponses.EndpointResponse](../../paths/fakerefsstring/post/FakerefsstringPostResponses.md#endpointresponse) | modelString([PostRequest](#postrequest) request) | ## PostRequest public static class PostRequest
          diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md index 37761de0d18..abe4f0713c9 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [String1](../../../../../../components/schemas/String.md#string) +extends [StringSchema1](../../../../../../components/schemas/StringSchema.md#stringschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [String.String1](../../../../../../components/schemas/String.md#string1) +extends [StringSchema.StringSchema1](../../../../../../components/schemas/StringSchema.md#stringschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index bff0c0aed91..8fadd779761 100644 --- a/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [String1](../../../../../../../components/schemas/String.md#string) +extends [StringSchema1](../../../../../../../components/schemas/StringSchema.md#stringschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [String.String1](../../../../../../../components/schemas/String.md#string1) +extends [StringSchema.StringSchema1](../../../../../../../components/schemas/StringSchema.md#stringschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md index a004a7be8c5..9d6a4abeeb9 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | ## FakeuploadfilePostCode200Response1 public static class FakeuploadfilePostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index f52c617c14b..bb60c5776fb 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) +extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) +extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md index 6ac7b8f442e..995bbba0333 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.md @@ -58,12 +58,12 @@ A record class to store response body for contentType="application/json" ### Constructor Summary | Constructor and Description | | --------------------------- | -| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) body)
          Creates an instance | +| ApplicationjsonResponseBody(ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) body)
          Creates an instance | ### Method Summary | Modifier and Type | Method and Description | | ----------------- | ---------------------- | -| ApplicationjsonSchema.[ApiResponse1Boxed](../../../../components/schemas/ApiResponse.md#apiresponse1boxed) | body()
          returns the body passed in in the constructor | +| ApplicationjsonSchema.[ApiResponseSchema1Boxed](../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1boxed) | body()
          returns the body passed in in the constructor | ## FakeuploadfilesPostCode200Response1 public static class FakeuploadfilesPostCode200Response1
          diff --git a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md index f52c617c14b..bb60c5776fb 100644 --- a/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.md @@ -1,6 +1,6 @@ # ApplicationjsonSchema public class ApplicationjsonSchema
          -extends [ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse) +extends [ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema) A class that contains necessary nested - schema classes (which validate payloads), extends JsonSchema @@ -14,6 +14,6 @@ A class that contains necessary nested ## ApplicationjsonSchema1 public static class ApplicationjsonSchema1
          -extends [ApiResponse.ApiResponse1](../../../../../../../components/schemas/ApiResponse.md#apiresponse1) +extends [ApiResponseSchema.ApiResponseSchema1](../../../../../../../components/schemas/ApiResponseSchema.md#apiresponseschema1) A schema class that validates payloads diff --git a/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md b/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md index 1a19fcaf83b..e7695fd64d2 100644 --- a/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md +++ b/samples/client/petstore/java/docs/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.md @@ -67,7 +67,7 @@ static final SchemaConfiguration configuration = new SchemaConfiguration(new Jso ApplicationjsonSchema.ApplicationjsonSchemaMap validatedPayload = ApplicationjsonSchema.ApplicationjsonSchema1.validate( new ApplicationjsonSchema.ApplicationjsonSchemaMapBuilder() - .string( + .setString( MapUtils.makeMap( new AbstractMap.SimpleEntry( "bar", @@ -109,7 +109,7 @@ A class that builds the Map input type | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | Map | build()
          Returns map input that should be used with Schema.validate | -| [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | string(Map value) | +| [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | setString(Map value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, Void value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, boolean value) | | [ApplicationjsonSchemaMapBuilder](#applicationjsonschemamapbuilder) | additionalProperty(String key, String value) | @@ -130,5 +130,5 @@ A class to store validated Map payloads | Modifier and Type | Method and Description | | ----------------- | ---------------------- | | static [ApplicationjsonSchemaMap](#applicationjsonschemamap) | of([Map](#applicationjsonschemamapbuilder) arg, SchemaConfiguration configuration) | -| [Foo.FooMap](../../../../../../../components/schemas/Foo.md#foomap) | string()
          [optional] | +| @Nullable Object | get(String key)
          This schema has invalid Java names so this method must be used when you access instance["string"], | | @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java index b67ecd28e10..2694e40d4c0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/apis/tags/Fake.java @@ -73,11 +73,11 @@ public class Fake extends ApiClient implements FakerefsobjectmodelwithrefpropsPost.ObjectModelWithRefPropsOperation, FakepemcontenttypeGet.PemContentTypeOperation, FakerefsnumberPost.NumberWithValidationsOperation, - FakerefsstringPost.StringOperation, + FakerefsstringPost.ModelStringOperation, FakeinlineadditionalpropertiesPost.InlineAdditionalPropertiesOperation, FakerefsmammalPost.MammalOperation, SolidusGet.SlashRouteOperation, - FakerefsbooleanPost.BooleanOperation, + FakerefsbooleanPost.ModelBooleanOperation, FakejsonformdataGet.JsonFormDataOperation, Fakeparametercollisions1ababselfabPost.ParameterCollisionsOperation, FakequeryparamwithjsoncontenttypeGet.QueryParamWithJsonContentTypeOperation, diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java index 8cc5d0b585d..e48fd69140e 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/SuccessWithJsonApiResponse.java @@ -29,7 +29,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } public static class SuccessWithJsonApiResponse1 extends ResponseDeserializer { public SuccessWithJsonApiResponse1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java index 40a729c54a3..cc291e51828 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/headerswithnobody/HeadersWithNoBodyHeadersSchema.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java index 2e6d42b58ac..239beb71bb8 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successinlinecontentandheader/SuccessInlineContentAndHeaderHeadersSchema.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java index e0341e16b15..230de7a475d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/SuccessWithJsonApiResponseHeadersSchema.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java index 111bf2914cc..b8f8b6efa4a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/responses/successwithjsonapiresponse/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.components.responses.successwithjsonapiresponse.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponse; +import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; -public class ApplicationjsonSchema extends ApiResponse { +public class ApplicationjsonSchema extends ApiResponseSchema { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponse1 { + public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java index 090f606f6b4..bdbdb6c4a0c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AdditionalPropertiesSchema.java @@ -1,4 +1,6 @@ package org.openapijsonschematools.client.components.schemas; +import java.time.LocalDate; +import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; @@ -7,18 +9,28 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.UUID; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; +import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.FrozenList; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; +import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.MapUtils; +import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class AdditionalPropertiesSchema { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java index 33410b0aef0..c848804a745 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeAndFormat.java @@ -36,46 +36,46 @@ public class AnyTypeAndFormat { // nest classes so all schemas and input/output classes can be public - public sealed interface UuidBoxed permits UuidBoxedVoid, UuidBoxedBoolean, UuidBoxedNumber, UuidBoxedString, UuidBoxedList, UuidBoxedMap { + public sealed interface UuidSchemaBoxed permits UuidSchemaBoxedVoid, UuidSchemaBoxedBoolean, UuidSchemaBoxedNumber, UuidSchemaBoxedString, UuidSchemaBoxedList, UuidSchemaBoxedMap { @Nullable Object getData(); } - public record UuidBoxedVoid(Void data) implements UuidBoxed { + public record UuidSchemaBoxedVoid(Void data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidBoxedBoolean(boolean data) implements UuidBoxed { + public record UuidSchemaBoxedBoolean(boolean data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidBoxedNumber(Number data) implements UuidBoxed { + public record UuidSchemaBoxedNumber(Number data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidBoxedString(String data) implements UuidBoxed { + public record UuidSchemaBoxedString(String data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidBoxedList(FrozenList<@Nullable Object> data) implements UuidBoxed { + public record UuidSchemaBoxedList(FrozenList<@Nullable Object> data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record UuidBoxedMap(FrozenMap<@Nullable Object> data) implements UuidBoxed { + public record UuidSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements UuidSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -83,18 +83,18 @@ public record UuidBoxedMap(FrozenMap<@Nullable Object> data) implements UuidBoxe } - public static class Uuid extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidBoxedList>, MapSchemaValidator, UuidBoxedMap> { - private static @Nullable Uuid instance = null; + public static class UuidSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidSchemaBoxedList>, MapSchemaValidator, UuidSchemaBoxedMap> { + private static @Nullable UuidSchema instance = null; - protected Uuid() { + protected UuidSchema() { super(new JsonSchemaInfo() .format("uuid") ); } - public static Uuid getInstance() { + public static UuidSchema getInstance() { if (instance == null) { - instance = new Uuid(); + instance = new UuidSchema(); } return instance; } @@ -277,31 +277,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public UuidBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedVoid(validate(arg, configuration)); + public UuidSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedVoid(validate(arg, configuration)); } @Override - public UuidBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedBoolean(validate(arg, configuration)); + public UuidSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public UuidBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedNumber(validate(arg, configuration)); + public UuidSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedNumber(validate(arg, configuration)); } @Override - public UuidBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedString(validate(arg, configuration)); + public UuidSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedString(validate(arg, configuration)); } @Override - public UuidBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedList(validate(arg, configuration)); + public UuidSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedList(validate(arg, configuration)); } @Override - public UuidBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidBoxedMap(validate(arg, configuration)); + public UuidSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new UuidSchemaBoxedMap(validate(arg, configuration)); } @Override - public UuidBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public UuidSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -891,46 +891,46 @@ public DatetimeBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration co } } - public sealed interface NumberBoxed permits NumberBoxedVoid, NumberBoxedBoolean, NumberBoxedNumber, NumberBoxedString, NumberBoxedList, NumberBoxedMap { + public sealed interface NumberSchemaBoxed permits NumberSchemaBoxedVoid, NumberSchemaBoxedBoolean, NumberSchemaBoxedNumber, NumberSchemaBoxedString, NumberSchemaBoxedList, NumberSchemaBoxedMap { @Nullable Object getData(); } - public record NumberBoxedVoid(Void data) implements NumberBoxed { + public record NumberSchemaBoxedVoid(Void data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberBoxedBoolean(boolean data) implements NumberBoxed { + public record NumberSchemaBoxedBoolean(boolean data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberBoxedNumber(Number data) implements NumberBoxed { + public record NumberSchemaBoxedNumber(Number data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberBoxedString(String data) implements NumberBoxed { + public record NumberSchemaBoxedString(String data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberBoxedList(FrozenList<@Nullable Object> data) implements NumberBoxed { + public record NumberSchemaBoxedList(FrozenList<@Nullable Object> data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record NumberBoxedMap(FrozenMap<@Nullable Object> data) implements NumberBoxed { + public record NumberSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -938,18 +938,18 @@ public record NumberBoxedMap(FrozenMap<@Nullable Object> data) implements Number } - public static class Number extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NumberBoxedList>, MapSchemaValidator, NumberBoxedMap> { - private static @Nullable Number instance = null; + public static class NumberSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NumberSchemaBoxedList>, MapSchemaValidator, NumberSchemaBoxedMap> { + private static @Nullable NumberSchema instance = null; - protected Number() { + protected NumberSchema() { super(new JsonSchemaInfo() .format("number") ); } - public static Number getInstance() { + public static NumberSchema getInstance() { if (instance == null) { - instance = new Number(); + instance = new NumberSchema(); } return instance; } @@ -1132,31 +1132,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public NumberBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedVoid(validate(arg, configuration)); + public NumberSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedVoid(validate(arg, configuration)); } @Override - public NumberBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedBoolean(validate(arg, configuration)); + public NumberSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public NumberBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedNumber(validate(arg, configuration)); + public NumberSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedNumber(validate(arg, configuration)); } @Override - public NumberBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedString(validate(arg, configuration)); + public NumberSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedString(validate(arg, configuration)); } @Override - public NumberBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedList(validate(arg, configuration)); + public NumberSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedList(validate(arg, configuration)); } @Override - public NumberBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedMap(validate(arg, configuration)); + public NumberSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedMap(validate(arg, configuration)); } @Override - public NumberBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public NumberSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2031,46 +2031,46 @@ public Int64Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration confi } } - public sealed interface DoubleBoxed permits DoubleBoxedVoid, DoubleBoxedBoolean, DoubleBoxedNumber, DoubleBoxedString, DoubleBoxedList, DoubleBoxedMap { + public sealed interface DoubleSchemaBoxed permits DoubleSchemaBoxedVoid, DoubleSchemaBoxedBoolean, DoubleSchemaBoxedNumber, DoubleSchemaBoxedString, DoubleSchemaBoxedList, DoubleSchemaBoxedMap { @Nullable Object getData(); } - public record DoubleBoxedVoid(Void data) implements DoubleBoxed { + public record DoubleSchemaBoxedVoid(Void data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleBoxedBoolean(boolean data) implements DoubleBoxed { + public record DoubleSchemaBoxedBoolean(boolean data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleBoxedNumber(Number data) implements DoubleBoxed { + public record DoubleSchemaBoxedNumber(Number data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleBoxedString(String data) implements DoubleBoxed { + public record DoubleSchemaBoxedString(String data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleBoxedList(FrozenList<@Nullable Object> data) implements DoubleBoxed { + public record DoubleSchemaBoxedList(FrozenList<@Nullable Object> data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record DoubleBoxedMap(FrozenMap<@Nullable Object> data) implements DoubleBoxed { + public record DoubleSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -2078,18 +2078,18 @@ public record DoubleBoxedMap(FrozenMap<@Nullable Object> data) implements Double } - public static class Double extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DoubleBoxedList>, MapSchemaValidator, DoubleBoxedMap> { - private static @Nullable Double instance = null; + public static class DoubleSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DoubleSchemaBoxedList>, MapSchemaValidator, DoubleSchemaBoxedMap> { + private static @Nullable DoubleSchema instance = null; - protected Double() { + protected DoubleSchema() { super(new JsonSchemaInfo() .format("double") ); } - public static Double getInstance() { + public static DoubleSchema getInstance() { if (instance == null) { - instance = new Double(); + instance = new DoubleSchema(); } return instance; } @@ -2272,31 +2272,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public DoubleBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedVoid(validate(arg, configuration)); + public DoubleSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedVoid(validate(arg, configuration)); } @Override - public DoubleBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedBoolean(validate(arg, configuration)); + public DoubleSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public DoubleBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedNumber(validate(arg, configuration)); + public DoubleSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedNumber(validate(arg, configuration)); } @Override - public DoubleBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedString(validate(arg, configuration)); + public DoubleSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedString(validate(arg, configuration)); } @Override - public DoubleBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedList(validate(arg, configuration)); + public DoubleSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedList(validate(arg, configuration)); } @Override - public DoubleBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedMap(validate(arg, configuration)); + public DoubleSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedMap(validate(arg, configuration)); } @Override - public DoubleBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public DoubleSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2316,46 +2316,46 @@ public DoubleBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration conf } } - public sealed interface FloatBoxed permits FloatBoxedVoid, FloatBoxedBoolean, FloatBoxedNumber, FloatBoxedString, FloatBoxedList, FloatBoxedMap { + public sealed interface FloatSchemaBoxed permits FloatSchemaBoxedVoid, FloatSchemaBoxedBoolean, FloatSchemaBoxedNumber, FloatSchemaBoxedString, FloatSchemaBoxedList, FloatSchemaBoxedMap { @Nullable Object getData(); } - public record FloatBoxedVoid(Void data) implements FloatBoxed { + public record FloatSchemaBoxedVoid(Void data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatBoxedBoolean(boolean data) implements FloatBoxed { + public record FloatSchemaBoxedBoolean(boolean data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatBoxedNumber(Number data) implements FloatBoxed { + public record FloatSchemaBoxedNumber(Number data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatBoxedString(String data) implements FloatBoxed { + public record FloatSchemaBoxedString(String data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatBoxedList(FrozenList<@Nullable Object> data) implements FloatBoxed { + public record FloatSchemaBoxedList(FrozenList<@Nullable Object> data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; } } - public record FloatBoxedMap(FrozenMap<@Nullable Object> data) implements FloatBoxed { + public record FloatSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -2363,18 +2363,18 @@ public record FloatBoxedMap(FrozenMap<@Nullable Object> data) implements FloatBo } - public static class Float extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FloatBoxedList>, MapSchemaValidator, FloatBoxedMap> { - private static @Nullable Float instance = null; + public static class FloatSchema extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FloatSchemaBoxedList>, MapSchemaValidator, FloatSchemaBoxedMap> { + private static @Nullable FloatSchema instance = null; - protected Float() { + protected FloatSchema() { super(new JsonSchemaInfo() .format("float") ); } - public static Float getInstance() { + public static FloatSchema getInstance() { if (instance == null) { - instance = new Float(); + instance = new FloatSchema(); } return instance; } @@ -2557,31 +2557,31 @@ public String validate(UUID arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public FloatBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedVoid(validate(arg, configuration)); + public FloatSchemaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedVoid(validate(arg, configuration)); } @Override - public FloatBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedBoolean(validate(arg, configuration)); + public FloatSchemaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedBoolean(validate(arg, configuration)); } @Override - public FloatBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedNumber(validate(arg, configuration)); + public FloatSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedNumber(validate(arg, configuration)); } @Override - public FloatBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedString(validate(arg, configuration)); + public FloatSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedString(validate(arg, configuration)); } @Override - public FloatBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedList(validate(arg, configuration)); + public FloatSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedList(validate(arg, configuration)); } @Override - public FloatBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedMap(validate(arg, configuration)); + public FloatSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedMap(validate(arg, configuration)); } @Override - public FloatBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public FloatSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg == null) { Void castArg = (Void) arg; return validateAndBox(castArg, configuration); @@ -2621,18 +2621,10 @@ public static AnyTypeAndFormatMap of(Map arg return AnyTypeAndFormat1.getInstance().validate(arg, configuration); } - public @Nullable Object uuid() throws UnsetPropertyException { - return getOrThrow("uuid"); - } - public @Nullable Object date() throws UnsetPropertyException { return getOrThrow("date"); } - public @Nullable Object number() throws UnsetPropertyException { - return getOrThrow("number"); - } - public @Nullable Object binary() throws UnsetPropertyException { return getOrThrow("binary"); } @@ -2645,14 +2637,6 @@ public static AnyTypeAndFormatMap of(Map arg return getOrThrow("int64"); } - public @Nullable Object double() throws UnsetPropertyException { - return getOrThrow("double"); - } - - public @Nullable Object float() throws UnsetPropertyException { - return getOrThrow("float"); - } - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -2660,62 +2644,62 @@ public static AnyTypeAndFormatMap of(Map arg } } - public interface SetterForUuid { + public interface SetterForUuidSchema { Map getInstance(); - T getBuilderAfterUuid(Map instance); + T getBuilderAfterUuidSchema(Map instance); - default T uuid(Void value) { + default T setUuid(Void value) { var instance = getInstance(); instance.put("uuid", null); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(boolean value) { + default T setUuid(boolean value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(String value) { + default T setUuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(int value) { + default T setUuid(int value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(float value) { + default T setUuid(float value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(long value) { + default T setUuid(long value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(double value) { + default T setUuid(double value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(List value) { + default T setUuid(List value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } - default T uuid(Map value) { + default T setUuid(Map value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } } @@ -2837,62 +2821,62 @@ default T dateHyphenMinusTime(Map value) { } } - public interface SetterForNumber { + public interface SetterForNumberSchema { Map getInstance(); - T getBuilderAfterNumber(Map instance); + T getBuilderAfterNumberSchema(Map instance); - default T number(Void value) { + default T setNumber(Void value) { var instance = getInstance(); instance.put("number", null); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(boolean value) { + default T setNumber(boolean value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(String value) { + default T setNumber(String value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(int value) { + default T setNumber(int value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(float value) { + default T setNumber(float value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(long value) { + default T setNumber(long value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(double value) { + default T setNumber(double value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(List value) { + default T setNumber(List value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(Map value) { + default T setNumber(Map value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } } @@ -3073,125 +3057,125 @@ default T int64(Map value) { } } - public interface SetterForDouble { + public interface SetterForDoubleSchema { Map getInstance(); - T getBuilderAfterDouble(Map instance); + T getBuilderAfterDoubleSchema(Map instance); - default T double(Void value) { + default T setDouble(Void value) { var instance = getInstance(); instance.put("double", null); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(boolean value) { + default T setDouble(boolean value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(String value) { + default T setDouble(String value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(int value) { + default T setDouble(int value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(float value) { + default T setDouble(float value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(long value) { + default T setDouble(long value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(double value) { + default T setDouble(double value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(List value) { + default T setDouble(List value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(Map value) { + default T setDouble(Map value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } } - public interface SetterForFloat { + public interface SetterForFloatSchema { Map getInstance(); - T getBuilderAfterFloat(Map instance); + T getBuilderAfterFloatSchema(Map instance); - default T float(Void value) { + default T setFloat(Void value) { var instance = getInstance(); instance.put("float", null); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(boolean value) { + default T setFloat(boolean value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(String value) { + default T setFloat(String value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(int value) { + default T setFloat(int value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(float value) { + default T setFloat(float value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(long value) { + default T setFloat(long value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(double value) { + default T setFloat(double value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(List value) { + default T setFloat(List value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(Map value) { + default T setFloat(Map value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } } - public static class AnyTypeAndFormatMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuid, SetterForDate, SetterForDatetime, SetterForNumber, SetterForBinary, SetterForInt32, SetterForInt64, SetterForDouble, SetterForFloat { + public static class AnyTypeAndFormatMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuidSchema, SetterForDate, SetterForDatetime, SetterForNumberSchema, SetterForBinary, SetterForInt32, SetterForInt64, SetterForDoubleSchema, SetterForFloatSchema { private final Map instance; private static final Set knownKeys = Set.of( "uuid", @@ -3216,7 +3200,7 @@ public AnyTypeAndFormatMapBuilder() { public Map getInstance() { return instance; } - public AnyTypeAndFormatMapBuilder getBuilderAfterUuid(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterUuidSchema(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterDate(Map instance) { @@ -3225,7 +3209,7 @@ public AnyTypeAndFormatMapBuilder getBuilderAfterDate(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterNumber(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterNumberSchema(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterBinary(Map instance) { @@ -3237,10 +3221,10 @@ public AnyTypeAndFormatMapBuilder getBuilderAfterInt32(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterDouble(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterDoubleSchema(Map instance) { return this; } - public AnyTypeAndFormatMapBuilder getBuilderAfterFloat(Map instance) { + public AnyTypeAndFormatMapBuilder getBuilderAfterFloatSchema(Map instance) { return this; } public AnyTypeAndFormatMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -3274,15 +3258,15 @@ protected AnyTypeAndFormat1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("uuid", Uuid.class), + new PropertyEntry("uuid", UuidSchema.class), new PropertyEntry("date", Date.class), new PropertyEntry("date-time", Datetime.class), - new PropertyEntry("number", Number.class), + new PropertyEntry("number", NumberSchema.class), new PropertyEntry("binary", Binary.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int64", Int64.class), - new PropertyEntry("double", Double.class), - new PropertyEntry("float", Float.class) + new PropertyEntry("double", DoubleSchema.class), + new PropertyEntry("float", FloatSchema.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java index 568ff777664..f6359fa6a6b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AnyTypeNotString.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java index d7fe4969111..78bd0f9b51f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/AppleReq.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java index ee1f0ff1dd1..4eb9b17c467 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/BananaReq.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.BooleanJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java index c4aa25e19d7..4179781a6db 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Cat.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.BooleanJsonSchema; +import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java index 5acbe2f8f96..4ccac34248a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ChildCat.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java index 501fa39e92f..7dce00fc68c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ClassModel.java @@ -37,11 +37,11 @@ public class ClassModel { // nest classes so all schemas and input/output classes can be public - public static class Class extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Class instance = null; - public static Class getInstance() { + public static class ClassSchema extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable ClassSchema instance = null; + public static ClassSchema getInstance() { if (instance == null) { - instance = new Class(); + instance = new ClassSchema(); } return instance; } @@ -67,18 +67,18 @@ public static ClassModelMap of(Map arg, Sche } } - public interface SetterForClass { + public interface SetterForClassSchema { Map getInstance(); - T getBuilderAfterClass(Map instance); + T getBuilderAfterClassSchema(Map instance); default T lowLineClass(String value) { var instance = getInstance(); instance.put("_class", value); - return getBuilderAfterClass(instance); + return getBuilderAfterClassSchema(instance); } } - public static class ClassModelMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForClass { + public static class ClassModelMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForClassSchema { private final Map instance; private static final Set knownKeys = Set.of( "_class" @@ -95,7 +95,7 @@ public ClassModelMapBuilder() { public Map getInstance() { return instance; } - public ClassModelMapBuilder getBuilderAfterClass(Map instance) { + public ClassModelMapBuilder getBuilderAfterClassSchema(Map instance) { return this; } public ClassModelMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -165,7 +165,7 @@ public static class ClassModel1 extends JsonSchema implements protected ClassModel1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( - new PropertyEntry("_class", Class.class) + new PropertyEntry("_class", ClassSchema.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java index cb97fa5b4b4..fd093488cbd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComplexQuadrilateral.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,7 +29,10 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ComplexQuadrilateral { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java index bcd8ad3ac43..aaf28dcaed1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedAnyOfDifferentTypesNoValidations.java @@ -16,6 +16,19 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.BooleanJsonSchema; +import org.openapijsonschematools.client.schemas.DateJsonSchema; +import org.openapijsonschematools.client.schemas.DateTimeJsonSchema; +import org.openapijsonschematools.client.schemas.DoubleJsonSchema; +import org.openapijsonschematools.client.schemas.FloatJsonSchema; +import org.openapijsonschematools.client.schemas.Int32JsonSchema; +import org.openapijsonschematools.client.schemas.Int64JsonSchema; +import org.openapijsonschematools.client.schemas.IntJsonSchema; +import org.openapijsonschematools.client.schemas.MapJsonSchema; +import org.openapijsonschematools.client.schemas.NullJsonSchema; +import org.openapijsonschematools.client.schemas.NumberJsonSchema; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java index 9ef2a4f9dcd..6e3fc408ed7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedBool.java @@ -8,6 +8,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java index c71651c745e..1cf5c72941d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNone.java @@ -8,6 +8,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java index fd63d70525f..44bb713e4de 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedNumber.java @@ -8,6 +8,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java index 536bad5e41c..77d4eaa3c95 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedObject.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.FrozenMap; import org.openapijsonschematools.client.schemas.validation.JsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java index 702a4da219d..fc81432334a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedOneOfDifferentTypes.java @@ -10,12 +10,16 @@ import java.util.Objects; import java.util.Set; import java.util.UUID; +import java.util.regex.Pattern; import org.checkerframework.checker.nullness.qual.Nullable; import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; +import org.openapijsonschematools.client.schemas.DateJsonSchema; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java index a5ebe9f0e72..73214362cf6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ComposedString.java @@ -8,6 +8,7 @@ import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchema; import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java index 142e3e1f314..9b469609eee 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Dog.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java index 2a7db518c9d..f5699c5e806 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/EquilateralTriangle.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,7 +29,10 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class EquilateralTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java index 4f66c8e036c..a45071394a6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FormatTest.java @@ -43,11 +43,11 @@ public class FormatTest { // nest classes so all schemas and input/output classes can be public - public sealed interface IntegerBoxed permits IntegerBoxedNumber { + public sealed interface IntegerSchemaBoxed permits IntegerSchemaBoxedNumber { @Nullable Object getData(); } - public record IntegerBoxedNumber(Number data) implements IntegerBoxed { + public record IntegerSchemaBoxedNumber(Number data) implements IntegerSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -56,10 +56,10 @@ public record IntegerBoxedNumber(Number data) implements IntegerBoxed { - public static class Integer extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Integer instance = null; + public static class IntegerSchema extends JsonSchema implements NumberSchemaValidator { + private static @Nullable IntegerSchema instance = null; - protected Integer() { + protected IntegerSchema() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -74,9 +74,9 @@ protected Integer() { ); } - public static Integer getInstance() { + public static IntegerSchema getInstance() { if (instance == null) { - instance = new Integer(); + instance = new IntegerSchema(); } return instance; } @@ -123,11 +123,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public IntegerBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IntegerBoxedNumber(validate(arg, configuration)); + public IntegerSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new IntegerSchemaBoxedNumber(validate(arg, configuration)); } @Override - public IntegerBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public IntegerSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -240,11 +240,11 @@ public static Int64 getInstance() { } - public sealed interface NumberBoxed permits NumberBoxedNumber { + public sealed interface NumberSchemaBoxed permits NumberSchemaBoxedNumber { @Nullable Object getData(); } - public record NumberBoxedNumber(Number data) implements NumberBoxed { + public record NumberSchemaBoxedNumber(Number data) implements NumberSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -253,10 +253,10 @@ public record NumberBoxedNumber(Number data) implements NumberBoxed { - public static class Number extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Number instance = null; + public static class NumberSchema extends JsonSchema implements NumberSchemaValidator { + private static @Nullable NumberSchema instance = null; - protected Number() { + protected NumberSchema() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -270,9 +270,9 @@ protected Number() { ); } - public static Number getInstance() { + public static NumberSchema getInstance() { if (instance == null) { - instance = new Number(); + instance = new NumberSchema(); } return instance; } @@ -319,11 +319,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public NumberBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberBoxedNumber(validate(arg, configuration)); + public NumberSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new NumberSchemaBoxedNumber(validate(arg, configuration)); } @Override - public NumberBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public NumberSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -331,11 +331,11 @@ public NumberBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration conf } } - public sealed interface FloatBoxed permits FloatBoxedNumber { + public sealed interface FloatSchemaBoxed permits FloatSchemaBoxedNumber { @Nullable Object getData(); } - public record FloatBoxedNumber(Number data) implements FloatBoxed { + public record FloatSchemaBoxedNumber(Number data) implements FloatSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -344,10 +344,10 @@ public record FloatBoxedNumber(Number data) implements FloatBoxed { - public static class Float extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Float instance = null; + public static class FloatSchema extends JsonSchema implements NumberSchemaValidator { + private static @Nullable FloatSchema instance = null; - protected Float() { + protected FloatSchema() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -361,9 +361,9 @@ protected Float() { ); } - public static Float getInstance() { + public static FloatSchema getInstance() { if (instance == null) { - instance = new Float(); + instance = new FloatSchema(); } return instance; } @@ -397,11 +397,11 @@ public float validate(float arg, SchemaConfiguration configuration) throws Valid throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public FloatBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatBoxedNumber(validate(arg, configuration)); + public FloatSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new FloatSchemaBoxedNumber(validate(arg, configuration)); } @Override - public FloatBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public FloatSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -420,11 +420,11 @@ public static Float32 getInstance() { } - public sealed interface DoubleBoxed permits DoubleBoxedNumber { + public sealed interface DoubleSchemaBoxed permits DoubleSchemaBoxedNumber { @Nullable Object getData(); } - public record DoubleBoxedNumber(Number data) implements DoubleBoxed { + public record DoubleSchemaBoxedNumber(Number data) implements DoubleSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -433,10 +433,10 @@ public record DoubleBoxedNumber(Number data) implements DoubleBoxed { - public static class Double extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Double instance = null; + public static class DoubleSchema extends JsonSchema implements NumberSchemaValidator { + private static @Nullable DoubleSchema instance = null; - protected Double() { + protected DoubleSchema() { super(new JsonSchemaInfo() .type(Set.of( Integer.class, @@ -450,9 +450,9 @@ protected Double() { ); } - public static Double getInstance() { + public static DoubleSchema getInstance() { if (instance == null) { - instance = new Double(); + instance = new DoubleSchema(); } return instance; } @@ -486,11 +486,11 @@ public double validate(double arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public DoubleBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleBoxedNumber(validate(arg, configuration)); + public DoubleSchemaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { + return new DoubleSchemaBoxedNumber(validate(arg, configuration)); } @Override - public DoubleBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public DoubleSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Number castArg) { return validateAndBox(castArg, configuration); } @@ -658,11 +658,11 @@ public ArrayWithUniqueItemsBoxed validateAndBox(@Nullable Object arg, SchemaConf } } - public sealed interface StringBoxed permits StringBoxedString { + public sealed interface StringSchemaBoxed permits StringSchemaBoxedString { @Nullable Object getData(); } - public record StringBoxedString(String data) implements StringBoxed { + public record StringSchemaBoxedString(String data) implements StringSchemaBoxed { @Override public @Nullable Object getData() { return data; @@ -671,10 +671,10 @@ public record StringBoxedString(String data) implements StringBoxed { - public static class String extends JsonSchema implements StringSchemaValidator { - private static @Nullable String instance = null; + public static class StringSchema extends JsonSchema implements StringSchemaValidator { + private static @Nullable StringSchema instance = null; - protected String() { + protected StringSchema() { super(new JsonSchemaInfo() .type(Set.of( String.class @@ -686,9 +686,9 @@ protected String() { ); } - public static String getInstance() { + public static StringSchema getInstance() { if (instance == null) { - instance = new String(); + instance = new StringSchema(); } return instance; } @@ -719,11 +719,11 @@ public String validate(String arg, SchemaConfiguration configuration) throws Val throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public StringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new StringBoxedString(validate(arg, configuration)); + public StringSchemaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { + return new StringSchemaBoxedString(validate(arg, configuration)); } @Override - public StringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public StringSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof String castArg) { return validateAndBox(castArg, configuration); } @@ -731,11 +731,11 @@ public StringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration conf } } - public static class Byte extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Byte instance = null; - public static Byte getInstance() { + public static class ByteSchema extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable ByteSchema instance = null; + public static ByteSchema getInstance() { if (instance == null) { - instance = new Byte(); + instance = new ByteSchema(); } return instance; } @@ -776,11 +776,11 @@ public static DateTime getInstance() { } - public static class Uuid extends UuidJsonSchema.UuidJsonSchema1 { - private static @Nullable Uuid instance = null; - public static Uuid getInstance() { + public static class UuidSchema extends UuidJsonSchema.UuidJsonSchema1 { + private static @Nullable UuidSchema instance = null; + public static UuidSchema getInstance() { if (instance == null) { - instance = new Uuid(); + instance = new UuidSchema(); } return instance; } @@ -1059,14 +1059,6 @@ public static FormatTestMap of(Map arg, Sche return FormatTest1.getInstance().validate(arg, configuration); } - public String byte() { - @Nullable Object value = get("byte"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for byte"); - } - return (String) value; - } - public String date() { @Nullable Object value = get("date"); if (!(value instanceof String)) { @@ -1075,14 +1067,6 @@ public String date() { return (String) value; } - public Number number() { - @Nullable Object value = get("number"); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for number"); - } - return (Number) value; - } - public String password() { @Nullable Object value = get("password"); if (!(value instanceof String)) { @@ -1091,16 +1075,6 @@ public String password() { return (String) value; } - public Number integer() throws UnsetPropertyException { - String key = "integer"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for integer"); - } - return (Number) value; - } - public Number int32() throws UnsetPropertyException { String key = "int32"; throwIfKeyNotPresent(key); @@ -1131,16 +1105,6 @@ public Number int64() throws UnsetPropertyException { return (Number) value; } - public Number float() throws UnsetPropertyException { - String key = "float"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for float"); - } - return (Number) value; - } - public Number float32() throws UnsetPropertyException { String key = "float32"; throwIfKeyNotPresent(key); @@ -1151,16 +1115,6 @@ public Number float32() throws UnsetPropertyException { return (Number) value; } - public Number double() throws UnsetPropertyException { - String key = "double"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for double"); - } - return (Number) value; - } - public Number float64() throws UnsetPropertyException { String key = "float64"; throwIfKeyNotPresent(key); @@ -1181,16 +1135,6 @@ public ArrayWithUniqueItemsList arrayWithUniqueItems() throws UnsetPropertyExcep return (ArrayWithUniqueItemsList) value; } - public String string() throws UnsetPropertyException { - String key = "string"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for string"); - } - return (String) value; - } - public String binary() throws UnsetPropertyException { String key = "binary"; throwIfKeyNotPresent(key); @@ -1211,16 +1155,6 @@ public String dateTime() throws UnsetPropertyException { return (String) value; } - public String uuid() throws UnsetPropertyException { - String key = "uuid"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for uuid"); - } - return (String) value; - } - public String uuidNoExample() throws UnsetPropertyException { String key = "uuidNoExample"; throwIfKeyNotPresent(key); @@ -1268,14 +1202,14 @@ public Void noneProp() throws UnsetPropertyException { } } - public interface SetterForByte { + public interface SetterForByteSchema { Map getInstance(); - T getBuilderAfterByte(Map instance); + T getBuilderAfterByteSchema(Map instance); - default T byte(String value) { + default T setByte(String value) { var instance = getInstance(); instance.put("byte", value); - return getBuilderAfterByte(instance); + return getBuilderAfterByteSchema(instance); } } @@ -1290,32 +1224,32 @@ default T date(String value) { } } - public interface SetterForNumber { + public interface SetterForNumberSchema { Map getInstance(); - T getBuilderAfterNumber(Map instance); + T getBuilderAfterNumberSchema(Map instance); - default T number(int value) { + default T setNumber(int value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(float value) { + default T setNumber(float value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(long value) { + default T setNumber(long value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } - default T number(double value) { + default T setNumber(double value) { var instance = getInstance(); instance.put("number", value); - return getBuilderAfterNumber(instance); + return getBuilderAfterNumberSchema(instance); } } @@ -1330,32 +1264,32 @@ default T password(String value) { } } - public interface SetterForInteger { + public interface SetterForIntegerSchema { Map getInstance(); - T getBuilderAfterInteger(Map instance); + T getBuilderAfterIntegerSchema(Map instance); - default T integer(int value) { + default T setInteger(int value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterInteger(instance); + return getBuilderAfterIntegerSchema(instance); } - default T integer(float value) { + default T setInteger(float value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterInteger(instance); + return getBuilderAfterIntegerSchema(instance); } - default T integer(long value) { + default T setInteger(long value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterInteger(instance); + return getBuilderAfterIntegerSchema(instance); } - default T integer(double value) { + default T setInteger(double value) { var instance = getInstance(); instance.put("integer", value); - return getBuilderAfterInteger(instance); + return getBuilderAfterIntegerSchema(instance); } } @@ -1422,32 +1356,32 @@ default T int64(double value) { } } - public interface SetterForFloat { + public interface SetterForFloatSchema { Map getInstance(); - T getBuilderAfterFloat(Map instance); + T getBuilderAfterFloatSchema(Map instance); - default T float(int value) { + default T setFloat(int value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(float value) { + default T setFloat(float value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(long value) { + default T setFloat(long value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } - default T float(double value) { + default T setFloat(double value) { var instance = getInstance(); instance.put("float", value); - return getBuilderAfterFloat(instance); + return getBuilderAfterFloatSchema(instance); } } @@ -1480,32 +1414,32 @@ default T float32(double value) { } } - public interface SetterForDouble { + public interface SetterForDoubleSchema { Map getInstance(); - T getBuilderAfterDouble(Map instance); + T getBuilderAfterDoubleSchema(Map instance); - default T double(int value) { + default T setDouble(int value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(float value) { + default T setDouble(float value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(long value) { + default T setDouble(long value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } - default T double(double value) { + default T setDouble(double value) { var instance = getInstance(); instance.put("double", value); - return getBuilderAfterDouble(instance); + return getBuilderAfterDoubleSchema(instance); } } @@ -1549,14 +1483,14 @@ default T arrayWithUniqueItems(List value) { } } - public interface SetterForString { + public interface SetterForStringSchema { Map getInstance(); - T getBuilderAfterString(Map instance); + T getBuilderAfterStringSchema(Map instance); - default T string(String value) { + default T setString(String value) { var instance = getInstance(); instance.put("string", value); - return getBuilderAfterString(instance); + return getBuilderAfterStringSchema(instance); } } @@ -1582,14 +1516,14 @@ default T dateTime(String value) { } } - public interface SetterForUuid { + public interface SetterForUuidSchema { Map getInstance(); - T getBuilderAfterUuid(Map instance); + T getBuilderAfterUuidSchema(Map instance); - default T uuid(String value) { + default T setUuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } } @@ -1637,7 +1571,7 @@ default T noneProp(Void value) { } } - public static class FormatTestMap0000Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForInteger, SetterForInt32, SetterForInt32withValidations, SetterForInt64, SetterForFloat, SetterForFloat32, SetterForDouble, SetterForFloat64, SetterForArrayWithUniqueItems, SetterForString, SetterForBinary, SetterForDateTime, SetterForUuid, SetterForUuidNoExample, SetterForPatternWithDigits, SetterForPatternWithDigitsAndDelimiter, SetterForNoneProp { + public static class FormatTestMap0000Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForIntegerSchema, SetterForInt32, SetterForInt32withValidations, SetterForInt64, SetterForFloatSchema, SetterForFloat32, SetterForDoubleSchema, SetterForFloat64, SetterForArrayWithUniqueItems, SetterForStringSchema, SetterForBinary, SetterForDateTime, SetterForUuidSchema, SetterForUuidNoExample, SetterForPatternWithDigits, SetterForPatternWithDigitsAndDelimiter, SetterForNoneProp { private final Map instance; private static final Set knownKeys = Set.of( "byte", @@ -1674,7 +1608,7 @@ public FormatTestMap0000Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterInteger(Map instance) { + public FormatTestMap0000Builder getBuilderAfterIntegerSchema(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterInt32(Map instance) { @@ -1686,13 +1620,13 @@ public FormatTestMap0000Builder getBuilderAfterInt32withValidations(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterFloat(Map instance) { + public FormatTestMap0000Builder getBuilderAfterFloatSchema(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterFloat32(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterDouble(Map instance) { + public FormatTestMap0000Builder getBuilderAfterDoubleSchema(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterFloat64(Map instance) { @@ -1701,7 +1635,7 @@ public FormatTestMap0000Builder getBuilderAfterFloat64(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterString(Map instance) { + public FormatTestMap0000Builder getBuilderAfterStringSchema(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterBinary(Map instance) { @@ -1710,7 +1644,7 @@ public FormatTestMap0000Builder getBuilderAfterBinary(Map instance) { return this; } - public FormatTestMap0000Builder getBuilderAfterUuid(Map instance) { + public FormatTestMap0000Builder getBuilderAfterUuidSchema(Map instance) { return this; } public FormatTestMap0000Builder getBuilderAfterUuidNoExample(Map instance) { @@ -1743,7 +1677,7 @@ public FormatTestMap0000Builder getBuilderAfterPassword(Map { + public static class FormatTestMap0010Builder implements SetterForNumberSchema { private final Map instance; public FormatTestMap0010Builder(Map instance) { this.instance = instance; @@ -1751,12 +1685,12 @@ public FormatTestMap0010Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap0000Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap0000Builder(instance); } } - public static class FormatTestMap0011Builder implements SetterForNumber, SetterForPassword { + public static class FormatTestMap0011Builder implements SetterForNumberSchema, SetterForPassword { private final Map instance; public FormatTestMap0011Builder(Map instance) { this.instance = instance; @@ -1764,7 +1698,7 @@ public FormatTestMap0011Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0001Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap0001Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap0001Builder(instance); } public FormatTestMap0010Builder getBuilderAfterPassword(Map instance) { @@ -1801,7 +1735,7 @@ public FormatTestMap0100Builder getBuilderAfterPassword(Map, SetterForNumber { + public static class FormatTestMap0110Builder implements SetterForDate, SetterForNumberSchema { private final Map instance; public FormatTestMap0110Builder(Map instance) { this.instance = instance; @@ -1812,12 +1746,12 @@ public FormatTestMap0110Builder(Map instance) { public FormatTestMap0010Builder getBuilderAfterDate(Map instance) { return new FormatTestMap0010Builder(instance); } - public FormatTestMap0100Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap0100Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap0100Builder(instance); } } - public static class FormatTestMap0111Builder implements SetterForDate, SetterForNumber, SetterForPassword { + public static class FormatTestMap0111Builder implements SetterForDate, SetterForNumberSchema, SetterForPassword { private final Map instance; public FormatTestMap0111Builder(Map instance) { this.instance = instance; @@ -1828,7 +1762,7 @@ public FormatTestMap0111Builder(Map instance) { public FormatTestMap0011Builder getBuilderAfterDate(Map instance) { return new FormatTestMap0011Builder(instance); } - public FormatTestMap0101Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap0101Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap0101Builder(instance); } public FormatTestMap0110Builder getBuilderAfterPassword(Map instance) { @@ -1836,7 +1770,7 @@ public FormatTestMap0110Builder getBuilderAfterPassword(Map { + public static class FormatTestMap1000Builder implements SetterForByteSchema { private final Map instance; public FormatTestMap1000Builder(Map instance) { this.instance = instance; @@ -1844,12 +1778,12 @@ public FormatTestMap1000Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0000Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0000Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0000Builder(instance); } } - public static class FormatTestMap1001Builder implements SetterForByte, SetterForPassword { + public static class FormatTestMap1001Builder implements SetterForByteSchema, SetterForPassword { private final Map instance; public FormatTestMap1001Builder(Map instance) { this.instance = instance; @@ -1857,7 +1791,7 @@ public FormatTestMap1001Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0001Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0001Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0001Builder(instance); } public FormatTestMap1000Builder getBuilderAfterPassword(Map instance) { @@ -1865,7 +1799,7 @@ public FormatTestMap1000Builder getBuilderAfterPassword(Map, SetterForNumber { + public static class FormatTestMap1010Builder implements SetterForByteSchema, SetterForNumberSchema { private final Map instance; public FormatTestMap1010Builder(Map instance) { this.instance = instance; @@ -1873,15 +1807,15 @@ public FormatTestMap1010Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0010Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0010Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0010Builder(instance); } - public FormatTestMap1000Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap1000Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap1000Builder(instance); } } - public static class FormatTestMap1011Builder implements SetterForByte, SetterForNumber, SetterForPassword { + public static class FormatTestMap1011Builder implements SetterForByteSchema, SetterForNumberSchema, SetterForPassword { private final Map instance; public FormatTestMap1011Builder(Map instance) { this.instance = instance; @@ -1889,10 +1823,10 @@ public FormatTestMap1011Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0011Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0011Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0011Builder(instance); } - public FormatTestMap1001Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap1001Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap1001Builder(instance); } public FormatTestMap1010Builder getBuilderAfterPassword(Map instance) { @@ -1900,7 +1834,7 @@ public FormatTestMap1010Builder getBuilderAfterPassword(Map, SetterForDate { + public static class FormatTestMap1100Builder implements SetterForByteSchema, SetterForDate { private final Map instance; public FormatTestMap1100Builder(Map instance) { this.instance = instance; @@ -1908,7 +1842,7 @@ public FormatTestMap1100Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0100Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0100Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0100Builder(instance); } public FormatTestMap1000Builder getBuilderAfterDate(Map instance) { @@ -1916,7 +1850,7 @@ public FormatTestMap1000Builder getBuilderAfterDate(Map, SetterForDate, SetterForPassword { + public static class FormatTestMap1101Builder implements SetterForByteSchema, SetterForDate, SetterForPassword { private final Map instance; public FormatTestMap1101Builder(Map instance) { this.instance = instance; @@ -1924,7 +1858,7 @@ public FormatTestMap1101Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0101Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0101Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0101Builder(instance); } public FormatTestMap1001Builder getBuilderAfterDate(Map instance) { @@ -1935,7 +1869,7 @@ public FormatTestMap1100Builder getBuilderAfterPassword(Map, SetterForDate, SetterForNumber { + public static class FormatTestMap1110Builder implements SetterForByteSchema, SetterForDate, SetterForNumberSchema { private final Map instance; public FormatTestMap1110Builder(Map instance) { this.instance = instance; @@ -1943,18 +1877,18 @@ public FormatTestMap1110Builder(Map instance) { public Map getInstance() { return instance; } - public FormatTestMap0110Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0110Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0110Builder(instance); } public FormatTestMap1010Builder getBuilderAfterDate(Map instance) { return new FormatTestMap1010Builder(instance); } - public FormatTestMap1100Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap1100Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap1100Builder(instance); } } - public static class FormatTestMapBuilder implements SetterForByte, SetterForDate, SetterForNumber, SetterForPassword { + public static class FormatTestMapBuilder implements SetterForByteSchema, SetterForDate, SetterForNumberSchema, SetterForPassword { private final Map instance; public FormatTestMapBuilder() { this.instance = new LinkedHashMap<>(); @@ -1962,13 +1896,13 @@ public FormatTestMapBuilder() { public Map getInstance() { return instance; } - public FormatTestMap0111Builder getBuilderAfterByte(Map instance) { + public FormatTestMap0111Builder getBuilderAfterByteSchema(Map instance) { return new FormatTestMap0111Builder(instance); } public FormatTestMap1011Builder getBuilderAfterDate(Map instance) { return new FormatTestMap1011Builder(instance); } - public FormatTestMap1101Builder getBuilderAfterNumber(Map instance) { + public FormatTestMap1101Builder getBuilderAfterNumberSchema(Map instance) { return new FormatTestMap1101Builder(instance); } public FormatTestMap1110Builder getBuilderAfterPassword(Map instance) { @@ -2002,22 +1936,22 @@ protected FormatTest1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("integer", Integer.class), + new PropertyEntry("integer", IntegerSchema.class), new PropertyEntry("int32", Int32.class), new PropertyEntry("int32withValidations", Int32withValidations.class), new PropertyEntry("int64", Int64.class), - new PropertyEntry("number", Number.class), - new PropertyEntry("float", Float.class), + new PropertyEntry("number", NumberSchema.class), + new PropertyEntry("float", FloatSchema.class), new PropertyEntry("float32", Float32.class), - new PropertyEntry("double", Double.class), + new PropertyEntry("double", DoubleSchema.class), new PropertyEntry("float64", Float64.class), new PropertyEntry("arrayWithUniqueItems", ArrayWithUniqueItems.class), - new PropertyEntry("string", String.class), - new PropertyEntry("byte", Byte.class), + new PropertyEntry("string", StringSchema.class), + new PropertyEntry("byte", ByteSchema.class), new PropertyEntry("binary", Binary.class), new PropertyEntry("date", Date.class), new PropertyEntry("dateTime", DateTime.class), - new PropertyEntry("uuid", Uuid.class), + new PropertyEntry("uuid", UuidSchema.class), new PropertyEntry("uuidNoExample", UuidNoExample.class), new PropertyEntry("password", Password.class), new PropertyEntry("pattern_with_digits", PatternWithDigits.class), diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java index 2ef24b11071..a1720d94d2a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/FruitReq.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java index 212c7601506..0e6b7c0a3b6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/IsoscelesTriangle.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,7 +29,10 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class IsoscelesTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java index 6b7776e0231..d44c2b8b87a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestMoveCopy.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java index 0b06f5405b2..5268a23c3d3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/JSONPatchRequestRemove.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java index a7c67f60728..d80e56f8f70 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MixedPropertiesAndAdditionalPropertiesClass.java @@ -30,11 +30,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass { // nest classes so all schemas and input/output classes can be public - public static class Uuid extends UuidJsonSchema.UuidJsonSchema1 { - private static @Nullable Uuid instance = null; - public static Uuid getInstance() { + public static class UuidSchema extends UuidJsonSchema.UuidJsonSchema1 { + private static @Nullable UuidSchema instance = null; + public static UuidSchema getInstance() { if (instance == null) { - instance = new Uuid(); + instance = new UuidSchema(); } return instance; } @@ -59,7 +59,7 @@ protected MapMap(FrozenMap m) { public static final Set requiredKeys = Set.of(); public static final Set optionalKeys = Set.of(); public static MapMap of(Map> arg, SchemaConfiguration configuration) throws ValidationException { - return Map.getInstance().validate(arg, configuration); + return MapSchema.getInstance().validate(arg, configuration); } public Animal.AnimalMap getAdditionalProperty(String name) throws UnsetPropertyException { @@ -101,11 +101,11 @@ public MapMapBuilder getBuilderAfterAdditionalProperty(Map implements MapSchemaValidator { - private static @Nullable Map instance = null; + public static class MapSchema extends JsonSchema implements MapSchemaValidator { + private static @Nullable MapSchema instance = null; - protected Map() { + protected MapSchema() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .additionalProperties(Animal.Animal1.class) ); } - public static Map getInstance() { + public static MapSchema getInstance() { if (instance == null) { - instance = new Map(); + instance = new MapSchema(); } return instance; } @@ -182,11 +182,11 @@ public MapMap validate(Map arg, SchemaConfiguration configuration) throws throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); } @Override - public MapBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MapBoxedMap(validate(arg, configuration)); + public MapSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { + return new MapSchemaBoxedMap(validate(arg, configuration)); } @Override - public MapBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { + public MapSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { if (arg instanceof Map castArg) { return validateAndBox(castArg, configuration); } @@ -209,16 +209,6 @@ public static MixedPropertiesAndAdditionalPropertiesClassMap of(Map { + public interface SetterForUuidSchema { Map getInstance(); - T getBuilderAfterUuid(Map instance); + T getBuilderAfterUuidSchema(Map instance); - default T uuid(String value) { + default T setUuid(String value) { var instance = getInstance(); instance.put("uuid", value); - return getBuilderAfterUuid(instance); + return getBuilderAfterUuidSchema(instance); } } @@ -268,18 +248,18 @@ default T dateTime(String value) { } } - public interface SetterForMap { + public interface SetterForMapSchema { Map getInstance(); - T getBuilderAfterMap(Map instance); + T getBuilderAfterMapSchema(Map instance); - default T map(Map> value) { + default T setMap(Map> value) { var instance = getInstance(); instance.put("map", value); - return getBuilderAfterMap(instance); + return getBuilderAfterMapSchema(instance); } } - public static class MixedPropertiesAndAdditionalPropertiesClassMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuid, SetterForDateTime, SetterForMap { + public static class MixedPropertiesAndAdditionalPropertiesClassMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForUuidSchema, SetterForDateTime, SetterForMapSchema { private final Map instance; private static final Set knownKeys = Set.of( "uuid", @@ -298,13 +278,13 @@ public MixedPropertiesAndAdditionalPropertiesClassMapBuilder() { public Map getInstance() { return instance; } - public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterUuid(Map instance) { + public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterUuidSchema(Map instance) { return this; } public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterDateTime(Map instance) { return this; } - public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterMap(Map instance) { + public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterMapSchema(Map instance) { return this; } public MixedPropertiesAndAdditionalPropertiesClassMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -338,9 +318,9 @@ protected MixedPropertiesAndAdditionalPropertiesClass1() { super(new JsonSchemaInfo() .type(Set.of(Map.class)) .properties(Map.ofEntries( - new PropertyEntry("uuid", Uuid.class), + new PropertyEntry("uuid", UuidSchema.class), new PropertyEntry("dateTime", DateTime.class), - new PropertyEntry("map", Map.class) + new PropertyEntry("map", MapSchema.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java index 2a63a1c5366..cb104f6ed20 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Money.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.DecimalJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java index 91f4dc99bcf..b8ebf95ee51 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MultiPropertiesSchema.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.Int32JsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java index b239431412f..60550891650 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/MyObjectDto.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.UuidJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java index 7775c183045..cd4697afb7d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NoAdditionalProperties.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java index 40e499ef269..f27a0c68104 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/NullableShape.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java index 8697a0285f2..aeadbe04628 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectModelWithRefProps.java @@ -191,8 +191,8 @@ protected ObjectModelWithRefProps1() { .type(Set.of(Map.class)) .properties(Map.ofEntries( new PropertyEntry("myNumber", NumberWithValidations.NumberWithValidations1.class), - new PropertyEntry("myString", String.String1.class), - new PropertyEntry("myBoolean", Boolean.Boolean1.class) + new PropertyEntry("myString", StringSchema.StringSchema1.class), + new PropertyEntry("myBoolean", BooleanSchema.BooleanSchema1.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java index 1131157be30..6ad9540bcde 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,6 +29,7 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java index 7862426918b..8acf3e09db6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ObjectWithOnlyOptionalProps.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.NumberJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java index c16f59ebd3e..008eec6ea65 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/PaginatedResultMyObjectDto.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.IntJsonSchema; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java index cc4a53ba472..d4f0af142dc 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ScaleneTriangle.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,7 +29,10 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class ScaleneTriangle { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java index 986358566e1..e6139c4da81 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Schema200Response.java @@ -49,11 +49,11 @@ public static Name getInstance() { } - public static class Class extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Class instance = null; - public static Class getInstance() { + public static class ClassSchema extends StringJsonSchema.StringJsonSchema1 { + private static @Nullable ClassSchema instance = null; + public static ClassSchema getInstance() { if (instance == null) { - instance = new Class(); + instance = new ClassSchema(); } return instance; } @@ -83,16 +83,6 @@ public Number name() throws UnsetPropertyException { return (Number) value; } - public String class() throws UnsetPropertyException { - String key = "class"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for class"); - } - return (String) value; - } - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { throwIfKeyKnown(name, requiredKeys, optionalKeys); throwIfKeyNotPresent(name); @@ -117,18 +107,18 @@ default T name(float value) { } } - public interface SetterForClass { + public interface SetterForClassSchema { Map getInstance(); - T getBuilderAfterClass(Map instance); + T getBuilderAfterClassSchema(Map instance); - default T class(String value) { + default T setClass(String value) { var instance = getInstance(); instance.put("class", value); - return getBuilderAfterClass(instance); + return getBuilderAfterClassSchema(instance); } } - public static class Schema200ResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForName, SetterForClass { + public static class Schema200ResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForName, SetterForClassSchema { private final Map instance; private static final Set knownKeys = Set.of( "name", @@ -149,7 +139,7 @@ public Schema200ResponseMapBuilder() { public Schema200ResponseMapBuilder getBuilderAfterName(Map instance) { return this; } - public Schema200ResponseMapBuilder getBuilderAfterClass(Map instance) { + public Schema200ResponseMapBuilder getBuilderAfterClassSchema(Map instance) { return this; } public Schema200ResponseMapBuilder getBuilderAfterAdditionalProperty(Map instance) { @@ -220,7 +210,7 @@ protected Schema200Response1() { super(new JsonSchemaInfo() .properties(Map.ofEntries( new PropertyEntry("name", Name.class), - new PropertyEntry("class", Class.class) + new PropertyEntry("class", ClassSchema.class) )) ); } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java index 5f2bc1be314..388bc3c5804 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ShapeOrNull.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java index aaabd725f98..e0e76218a64 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/SimpleQuadrilateral.java @@ -16,6 +16,8 @@ import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.GenericBuilder; +import org.openapijsonschematools.client.schemas.SetMaker; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; import org.openapijsonschematools.client.schemas.validation.FrozenList; @@ -27,7 +29,10 @@ import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; +import org.openapijsonschematools.client.schemas.validation.PropertyEntry; +import org.openapijsonschematools.client.schemas.validation.StringEnumValidator; import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; +import org.openapijsonschematools.client.schemas.validation.StringValueMethod; import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; public class SimpleQuadrilateral { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java index 31785ecac55..e799c5ef168 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/User.java @@ -21,6 +21,7 @@ import org.openapijsonschematools.client.schemas.Int32JsonSchema; import org.openapijsonschematools.client.schemas.Int64JsonSchema; import org.openapijsonschematools.client.schemas.MapJsonSchema; +import org.openapijsonschematools.client.schemas.NullJsonSchema; import org.openapijsonschematools.client.schemas.StringJsonSchema; import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java index 206182606a8..c54c33bc4bb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeleteHeaderParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.delete.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java index 05c6f7de7e9..e45331271e1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/delete/CommonparamsubdirDeletePathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.delete.parameters.parameter1.Schema1; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java index b0929b0705c..6f36aeb9763 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.parameters.routeparameter0.RouteParamSchema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java index a352d5fac83..23c81934321 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/get/CommonparamsubdirGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java index 264a3996489..d800414c7de 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostHeaderParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.post.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java index 9d8161b54c7..def8072055c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/commonparamsubdir/post/CommonparamsubdirPostPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.commonparamsubdir.parameters.routeparameter0.RouteParamSchema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java index 71610662542..e9bde480d1f 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteHeaderParameters.java @@ -14,6 +14,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter1.Schema1; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter4.Schema4; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java index 6b66038337c..f5036456013 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/delete/FakeDeleteQueryParameters.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fake.delete.parameters.parameter5.Schema5; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java index a5bc9a282eb..4ac48925b27 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetHeaderParameters.java @@ -14,6 +14,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter1.Schema1; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java index 310f7f82c54..90bb2fbb2a0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/get/FakeGetQueryParameters.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.paths.fake.get.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter4.Schema4; import org.openapijsonschematools.client.paths.fake.get.parameters.parameter5.Schema5; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java index 7f53e9f2fcf..06108b5c1e0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fake/post/requestbody/content/applicationxwwwformurlencoded/ApplicationxwwwformurlencodedSchema.java @@ -830,30 +830,6 @@ public static ApplicationxwwwformurlencodedSchemaMap of(Map { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedByte(Map instance); - default T byte(String value) { + default T setByte(String value) { var instance = getInstance(); instance.put("byte", value); return getBuilderAfterApplicationxwwwformurlencodedByte(instance); @@ -984,25 +930,25 @@ public interface SetterForApplicationxwwwformurlencodedDouble { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedDouble(Map instance); - default T double(int value) { + default T setDouble(int value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T double(float value) { + default T setDouble(float value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T double(long value) { + default T setDouble(long value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); } - default T double(double value) { + default T setDouble(double value) { var instance = getInstance(); instance.put("double", value); return getBuilderAfterApplicationxwwwformurlencodedDouble(instance); @@ -1013,25 +959,25 @@ public interface SetterForApplicationxwwwformurlencodedNumber { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedNumber(Map instance); - default T number(int value) { + default T setNumber(int value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T number(float value) { + default T setNumber(float value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T number(long value) { + default T setNumber(long value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); } - default T number(double value) { + default T setNumber(double value) { var instance = getInstance(); instance.put("number", value); return getBuilderAfterApplicationxwwwformurlencodedNumber(instance); @@ -1053,25 +999,25 @@ public interface SetterForApplicationxwwwformurlencodedInteger { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedInteger(Map instance); - default T integer(int value) { + default T setInteger(int value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T integer(float value) { + default T setInteger(float value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T integer(long value) { + default T setInteger(long value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); } - default T integer(double value) { + default T setInteger(double value) { var instance = getInstance(); instance.put("integer", value); return getBuilderAfterApplicationxwwwformurlencodedInteger(instance); @@ -1128,25 +1074,25 @@ public interface SetterForApplicationxwwwformurlencodedFloat { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedFloat(Map instance); - default T float(int value) { + default T setFloat(int value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T float(float value) { + default T setFloat(float value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T float(long value) { + default T setFloat(long value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); } - default T float(double value) { + default T setFloat(double value) { var instance = getInstance(); instance.put("float", value); return getBuilderAfterApplicationxwwwformurlencodedFloat(instance); @@ -1157,7 +1103,7 @@ public interface SetterForApplicationxwwwformurlencodedString { Map getInstance(); T getBuilderAfterApplicationxwwwformurlencodedString(Map instance); - default T string(String value) { + default T setString(String value) { var instance = getInstance(); instance.put("string", value); return getBuilderAfterApplicationxwwwformurlencodedString(instance); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java index 19e5490ae8d..e2e28ed10d7 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakebodywithqueryparams/put/FakebodywithqueryparamsPutQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakebodywithqueryparams.put.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java index 45cb87aacd8..67958cf44dd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakecasesensitiveparams/put/FakecasesensitiveparamsPutQueryParameters.java @@ -15,6 +15,7 @@ import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter1.Schema1; import org.openapijsonschematools.client.paths.fakecasesensitiveparams.put.parameters.parameter2.Schema2; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java index dba19df786e..b2171bdfaf0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakedeletecoffeeid/delete/FakedeletecoffeeidDeletePathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakedeletecoffeeid.delete.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java index 4311ac77cac..c4529070458 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeinlinecomposition/post/FakeinlinecompositionPostQueryParameters.java @@ -14,6 +14,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakeinlinecomposition.post.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.fakeinlinecomposition.post.parameters.parameter1.Schema1; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java index 4efa995a625..bd8b2045e9c 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeobjinquery/get/FakeobjinqueryGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakeobjinquery.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java index 2e8a084b127..1fde72f7396 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostCookieParameters.java @@ -17,6 +17,7 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter16.Schema16; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter17.Schema17; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter18.Schema18; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java index f01fa286e4d..ab6e94846b2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostHeaderParameters.java @@ -16,6 +16,7 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter6.Schema6; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter7.Schema7; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter8.Schema8; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java index 6de2537846c..15c92f81def 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostPathParameters.java @@ -17,6 +17,7 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter12.Schema12; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter13.Schema13; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter9.Schema9; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java index 32ae30a04e2..2336817442d 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeparametercollisions1ababselfab/post/Fakeparametercollisions1ababselfabPostQueryParameters.java @@ -17,6 +17,7 @@ import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.fakeparametercollisions1ababselfab.post.parameters.parameter4.Schema4; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java index 3959e3610dd..caf128e85f0 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/FakepetiduploadimagewithrequiredfilePostPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakepetiduploadimagewithrequiredfile.post.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java index bc2c3e1e81a..6cd3b657919 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/FakepetiduploadimagewithrequiredfilePostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } public static class FakepetiduploadimagewithrequiredfilePostCode200Response1 extends ResponseDeserializer { public FakepetiduploadimagewithrequiredfilePostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 6305ff6a241..42e57377e16 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakepetiduploadimagewithrequiredfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakepetiduploadimagewithrequiredfile.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponse; +import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; -public class ApplicationjsonSchema extends ApiResponse { +public class ApplicationjsonSchema extends ApiResponseSchema { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponse1 { + public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java index 30f5dfcf7d4..e9336753ff1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakequeryparamwithjsoncontenttype/get/FakequeryparamwithjsoncontenttypeGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.fakequeryparamwithjsoncontenttype.get.parameters.parameter0.content.applicationjson.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java index 56a0f8335e6..8fd0df37aa2 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefobjinquery/get/FakerefobjinqueryGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java index ed2766fafab..48e40534184 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/FakerefsbooleanPost.java @@ -71,11 +71,11 @@ default FakerefsbooleanPostResponses.EndpointResponse post(PostRequest request) } } - public interface BooleanOperation { + public interface ModelBooleanOperation { ApiConfiguration getApiConfiguration(); SchemaConfiguration getSchemaConfiguration(); HttpClient getClient(); - default FakerefsbooleanPostResponses.EndpointResponse boolean(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { + default FakerefsbooleanPostResponses.EndpointResponse modelBoolean(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { return PostProvider.post(request, getApiConfiguration(), getSchemaConfiguration(), getClient()); } } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java index c58fa42e1fc..6c465dba460 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/requestbody/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsboolean.post.requestbody.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.Boolean; +import org.openapijsonschematools.client.components.schemas.BooleanSchema; -public class ApplicationjsonSchema extends Boolean { +public class ApplicationjsonSchema extends BooleanSchema { // $refed class - public static class ApplicationjsonSchema1 extends Boolean1 { + public static class ApplicationjsonSchema1 extends BooleanSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index eb66a7305cb..064050b09bf 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsboolean/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsboolean.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.Boolean; +import org.openapijsonschematools.client.components.schemas.BooleanSchema; -public class ApplicationjsonSchema extends Boolean { +public class ApplicationjsonSchema extends BooleanSchema { // $refed class - public static class ApplicationjsonSchema1 extends Boolean1 { + public static class ApplicationjsonSchema1 extends BooleanSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java index ff866fdb975..adc7818a1fa 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/FakerefsstringPost.java @@ -71,11 +71,11 @@ default FakerefsstringPostResponses.EndpointResponse post(PostRequest request) t } } - public interface StringOperation { + public interface ModelStringOperation { ApiConfiguration getApiConfiguration(); SchemaConfiguration getSchemaConfiguration(); HttpClient getClient(); - default FakerefsstringPostResponses.EndpointResponse string(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { + default FakerefsstringPostResponses.EndpointResponse modelString(PostRequest request) throws IOException, InterruptedException, ValidationException, NotImplementedException, ApiException { return PostProvider.post(request, getApiConfiguration(), getSchemaConfiguration(), getClient()); } } diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java index a17b34126c0..7ebeea7dcd3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/requestbody/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsstring.post.requestbody.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.String; +import org.openapijsonschematools.client.components.schemas.StringSchema; -public class ApplicationjsonSchema extends String { +public class ApplicationjsonSchema extends StringSchema { // $refed class - public static class ApplicationjsonSchema1 extends String1 { + public static class ApplicationjsonSchema1 extends StringSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 046d0344e2f..9f140dc31c3 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakerefsstring/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakerefsstring.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.String; +import org.openapijsonschematools.client.components.schemas.StringSchema; -public class ApplicationjsonSchema extends String { +public class ApplicationjsonSchema extends StringSchema { // $refed class - public static class ApplicationjsonSchema1 extends String1 { + public static class ApplicationjsonSchema1 extends StringSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java index a2846f9dda9..91dbcc45d71 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/faketestqueryparamters/put/FaketestqueryparamtersPutQueryParameters.java @@ -18,6 +18,7 @@ import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter2.Schema2; import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter3.Schema3; import org.openapijsonschematools.client.paths.faketestqueryparamters.put.parameters.parameter4.Schema4; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java index 01c9d7ab1e1..19ee4cb8e6b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/FakeuploadfilePostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } public static class FakeuploadfilePostCode200Response1 extends ResponseDeserializer { public FakeuploadfilePostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 2d0523a5fd4..efbbe4fc405 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfile/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakeuploadfile.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponse; +import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; -public class ApplicationjsonSchema extends ApiResponse { +public class ApplicationjsonSchema extends ApiResponseSchema { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponse1 { + public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java index 567b5b5054b..b2d4ff90442 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/FakeuploadfilesPostCode200Response.java @@ -27,7 +27,7 @@ public Void encoding() { } } public sealed interface SealedResponseBody permits ApplicationjsonResponseBody {} - public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponse1Boxed body) implements SealedResponseBody { } + public record ApplicationjsonResponseBody(ApplicationjsonSchema.ApiResponseSchema1Boxed body) implements SealedResponseBody { } public static class FakeuploadfilesPostCode200Response1 extends ResponseDeserializer { public FakeuploadfilesPostCode200Response1() { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java index 594a56ed5d9..df28450acdb 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/fakeuploadfiles/post/responses/code200response/content/applicationjson/ApplicationjsonSchema.java @@ -1,13 +1,13 @@ package org.openapijsonschematools.client.paths.fakeuploadfiles.post.responses.code200response.content.applicationjson; import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.components.schemas.ApiResponse; +import org.openapijsonschematools.client.components.schemas.ApiResponseSchema; -public class ApplicationjsonSchema extends ApiResponse { +public class ApplicationjsonSchema extends ApiResponseSchema { // $refed class - public static class ApplicationjsonSchema1 extends ApiResponse1 { + public static class ApplicationjsonSchema1 extends ApiResponseSchema1 { private static @Nullable ApplicationjsonSchema1 instance = null; public static ApplicationjsonSchema1 getInstance() { if (instance == null) { diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java index dcd05ae1066..8c8442fee2b 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/responses/codedefaultresponse/content/applicationjson/ApplicationjsonSchema.java @@ -40,16 +40,6 @@ public static ApplicationjsonSchemaMap of(Map { Map getInstance(); T getBuilderAfterApplicationjsonString(Map instance); - default T string(Map value) { + default T setString(Map value) { var instance = getInstance(); instance.put("string", value); return getBuilderAfterApplicationjsonString(instance); diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java index 2d0062b67c3..35368a77bd1 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/foo/get/servers/server1/FooGetServer1Variables.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java index a2b9b294ae1..903dcda7c49 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/get/PetfindbystatusGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petfindbystatus.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java index b7c7c966e67..73133822702 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbystatus/servers/server1/PetfindbystatusServer1Variables.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java index 95bde4cc713..39aba0ed1c6 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petfindbytags/get/PetfindbytagsGetQueryParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petfindbytags.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenList; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java index 434de1dab78..3bdf3b1f609 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeleteHeaderParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.delete.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java index 57a0ce458fb..217bc3b8e83 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/delete/PetpetidDeletePathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.delete.parameters.parameter1.Schema1; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java index a86ecdd788d..498b007f37a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/get/PetpetidGetPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java index 6739d83a409..28daa3aee1a 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetid/post/PetpetidPostPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetid.post.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java index 967f8cf0cbd..29b957c98cd 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/petpetiduploadimage/post/PetpetiduploadimagePostPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.petpetiduploadimage.post.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java index 2902f42453f..333df7667ee 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/delete/StoreorderorderidDeletePathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.storeorderorderid.delete.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java index 811e3aff78d..b103bb5c279 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/storeorderorderid/get/StoreorderorderidGetPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.storeorderorderid.get.parameters.parameter0.Schema0; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java index e3ba2024c26..c42b97df5ca 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/UserloginGetQueryParameters.java @@ -14,6 +14,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.userlogin.get.parameters.parameter0.Schema0; import org.openapijsonschematools.client.paths.userlogin.get.parameters.parameter1.Schema1; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java index 3e77269c9d2..49828653caa 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userlogin/get/responses/code200response/UserloginGetCode200ResponseHeadersSchema.java @@ -17,6 +17,7 @@ import org.openapijsonschematools.client.exceptions.ValidationException; import org.openapijsonschematools.client.paths.userlogin.get.responses.code200response.headers.xexpiresafter.XExpiresAfterSchema; import org.openapijsonschematools.client.paths.userlogin.get.responses.code200response.headers.xratelimit.content.applicationjson.XRateLimitSchema; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java index b19aacf329a..4d8cbc3a337 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/delete/UserusernameDeletePathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java index dc2cecfd9d4..c1a9b62fb37 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/get/UserusernameGetPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java index 1c4fb2a9040..f5c674bac20 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/paths/userusername/put/UserusernamePutPathParameters.java @@ -13,6 +13,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.validation.FrozenMap; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java index 0690caa9505..f8f7eac2b21 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver0/RootServer0Variables.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java index e4564f47d41..6204a0b7cff 100644 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java +++ b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/servers/rootserver1/RootServer1Variables.java @@ -12,6 +12,7 @@ import org.openapijsonschematools.client.configurations.SchemaConfiguration; import org.openapijsonschematools.client.exceptions.UnsetPropertyException; import org.openapijsonschematools.client.exceptions.ValidationException; +import org.openapijsonschematools.client.schemas.AnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.GenericBuilder; import org.openapijsonschematools.client.schemas.NotAnyTypeJsonSchema; import org.openapijsonschematools.client.schemas.SetMaker; diff --git a/samples/client/petstore/python/.openapi-generator/FILES b/samples/client/petstore/python/.openapi-generator/FILES index 3139190a751..1a383c7c6d8 100644 --- a/samples/client/petstore/python/.openapi-generator/FILES +++ b/samples/client/petstore/python/.openapi-generator/FILES @@ -52,6 +52,7 @@ docs/components/responses/response_successful_xml_and_json_array_of_pet.md docs/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.md docs/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.md docs/components/schema/_200_response.md +docs/components/schema/_return.md docs/components/schema/abstract_step_message.md docs/components/schema/additional_properties_class.md docs/components/schema/additional_properties_schema.md @@ -171,7 +172,6 @@ docs/components/schema/ref_pet.md docs/components/schema/req_props_from_explicit_add_props.md docs/components/schema/req_props_from_true_add_props.md docs/components/schema/req_props_from_unset_add_props.md -docs/components/schema/return.md docs/components/schema/scalene_triangle.md docs/components/schema/self_referencing_array_model.md docs/components/schema/self_referencing_object_model.md @@ -573,6 +573,7 @@ src/petstore_api/components/responses/response_successful_xml_and_json_array_of_ src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py src/petstore_api/components/schema/_200_response.py src/petstore_api/components/schema/__init__.py +src/petstore_api/components/schema/_return.py src/petstore_api/components/schema/abstract_step_message.py src/petstore_api/components/schema/additional_properties_class.py src/petstore_api/components/schema/additional_properties_schema.py @@ -692,7 +693,6 @@ src/petstore_api/components/schema/ref_pet.py src/petstore_api/components/schema/req_props_from_explicit_add_props.py src/petstore_api/components/schema/req_props_from_true_add_props.py src/petstore_api/components/schema/req_props_from_unset_add_props.py -src/petstore_api/components/schema/return.py src/petstore_api/components/schema/scalene_triangle.py src/petstore_api/components/schema/self_referencing_array_model.py src/petstore_api/components/schema/self_referencing_object_model.py diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index f0ab2d8b3f0..b2797133f3d 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -353,7 +353,7 @@ Class | Description [ReqPropsFromExplicitAddProps](docs/components/schema/req_props_from_explicit_add_props.md) | [ReqPropsFromTrueAddProps](docs/components/schema/req_props_from_true_add_props.md) | [ReqPropsFromUnsetAddProps](docs/components/schema/req_props_from_unset_add_props.md) | -[Return](docs/components/schema/return.md) | Model for testing reserved words +[_Return](docs/components/schema/_return.md) | Model for testing reserved words [ScaleneTriangle](docs/components/schema/scalene_triangle.md) | [SelfReferencingArrayModel](docs/components/schema/self_referencing_array_model.md) | [SelfReferencingObjectModel](docs/components/schema/self_referencing_object_model.md) | diff --git a/samples/client/petstore/python/docs/components/schema/_200_response.md b/samples/client/petstore/python/docs/components/schema/_200_response.md index 66bf9060ccf..47f532c521c 100644 --- a/samples/client/petstore/python/docs/components/schema/_200_response.md +++ b/samples/client/petstore/python/docs/components/schema/_200_response.md @@ -31,19 +31,18 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **name** | int, schemas.Unset | | [optional] value must be a 32 bit integer -**class** | str, schemas.Unset | this is a reserved python keyword | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type model with an invalid class name for python, starts with a number | [optional] typed value is accessed with the get_additional_property_ method ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **name** | int, schemas.Unset | | [optional] value must be a 32 bit integer -**class** | str, schemas.Unset | this is a reserved python keyword | [optional] ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [_200ResponseDictInput](#_200responsedictinput), [_200ResponseDict](#_200responsedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [_200ResponseDict](#_200responsedict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["class"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md index 63232aafe36..92b59d00fc6 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_and_format.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_and_format.md @@ -34,33 +34,29 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- -**uuid** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a uuid **date** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD **number** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be int or float numeric **binary** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] **int32** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 64 bit integer **double** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 64 bit float -**float** | dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] value must be a 32 bit float **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- -**uuid** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a uuid **date** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD **number** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be int or float numeric **binary** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] **int32** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 64 bit integer **double** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 64 bit float -**float** | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO, schemas.Unset | | [optional] value must be a 32 bit float ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [AnyTypeAndFormatDictInput](#anytypeandformatdictinput), [AnyTypeAndFormatDict](#anytypeandformatdict) | [AnyTypeAndFormatDict](#anytypeandformatdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["date-time"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["uuid"], instance["date-time"], instance["float"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md index 48b33c08565..6c3f844159d 100644 --- a/samples/client/petstore/python/docs/components/schema/any_type_not_string.md +++ b/samples/client/petstore/python/docs/components/schema/any_type_not_string.md @@ -13,9 +13,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[Not](#not) | str | str +[_Not](#_not) | str | str -# Not +# _Not ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/components/schema/format_test.md b/samples/client/petstore/python/docs/components/schema/format_test.md index 37fdc6fddda..592c8e34d8a 100644 --- a/samples/client/petstore/python/docs/components/schema/format_test.md +++ b/samples/client/petstore/python/docs/components/schema/format_test.md @@ -54,15 +54,12 @@ Keyword Argument | Type | Description | Notes **int32** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int32withValidations** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit float **float32** | float, int, schemas.Unset | | [optional] value must be a 32 bit float **double** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **float64** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **arrayWithUniqueItems** | [ArrayWithUniqueItemsTupleInput](#arraywithuniqueitemstupleinput), [ArrayWithUniqueItemsTuple](#arraywithuniqueitemstuple), schemas.Unset | | [optional] **string** | str, schemas.Unset | | [optional] **binary** | bytes, io.FileIO, io.BufferedReader, schemas.Unset | | [optional] -**dateTime** | str, datetime.datetime, schemas.Unset | | [optional] value must conform to RFC-3339 date-time -**uuid** | str, uuid.UUID, schemas.Unset | | [optional] value must be a uuid **uuidNoExample** | str, uuid.UUID, schemas.Unset | | [optional] value must be a uuid **pattern_with_digits** | str, schemas.Unset | A string that is a 10 digit number. Can have leading zeros. | [optional] **pattern_with_digits_and_delimiter** | str, schemas.Unset | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] @@ -80,15 +77,12 @@ Property | Type | Description | Notes **int32** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int32withValidations** | int, schemas.Unset | | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit float **float32** | float, int, schemas.Unset | | [optional] value must be a 32 bit float **double** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **float64** | float, int, schemas.Unset | | [optional] value must be a 64 bit float **arrayWithUniqueItems** | [ArrayWithUniqueItemsTuple](#arraywithuniqueitemstuple), schemas.Unset | | [optional] **string** | str, schemas.Unset | | [optional] **binary** | bytes, io.FileIO, schemas.Unset | | [optional] -**dateTime** | str, schemas.Unset | | [optional] value must conform to RFC-3339 date-time -**uuid** | str, schemas.Unset | | [optional] value must be a uuid **uuidNoExample** | str, schemas.Unset | | [optional] value must be a uuid **pattern_with_digits** | str, schemas.Unset | A string that is a 10 digit number. Can have leading zeros. | [optional] **pattern_with_digits_and_delimiter** | str, schemas.Unset | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] @@ -98,6 +92,7 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [FormatTestDictInput](#formattestdictinput), [FormatTestDict](#formattestdict) | [FormatTestDict](#formattestdict) | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], instance["dateTime"], instance["uuid"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties # ArrayWithUniqueItems diff --git a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md index beab1f84d4b..fcf768c474a 100644 --- a/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md +++ b/samples/client/petstore/python/docs/components/schema/json_patch_request_move_copy.md @@ -27,14 +27,12 @@ base class: schemas.immutabledict[str, str] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- -**from** | str | A JSON Pointer path. | **op** | typing.Literal["move", "copy"] | The operation to perform. | must be one of ["move", "copy"] **path** | str | A JSON Pointer path. | ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- -**from** | str | A JSON Pointer path. | **op** | typing.Literal["move", "copy"] | The operation to perform. | must be one of ["move", "copy"] **path** | str | A JSON Pointer path. | @@ -42,5 +40,6 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [JSONPatchRequestMoveCopyDictInput](#jsonpatchrequestmovecopydictinput), [JSONPatchRequestMoveCopyDict](#jsonpatchrequestmovecopydict) | [JSONPatchRequestMoveCopyDict](#jsonpatchrequestmovecopydict) | a constructor +__getitem__ | str | str | This model has invalid python names so this method is used under the hood when you access instance["from"], [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md index eb234501433..bda90d83669 100644 --- a/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md +++ b/samples/client/petstore/python/docs/components/schema/mixed_properties_and_additional_properties_class.md @@ -28,22 +28,19 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- -**uuid** | str, uuid.UUID, schemas.Unset | | [optional] value must be a uuid -**dateTime** | str, datetime.datetime, schemas.Unset | | [optional] value must conform to RFC-3339 date-time **map** | [MapDictInput](#mapdictinput), [MapDict](#mapdict), schemas.Unset | | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method ### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- -**uuid** | str, schemas.Unset | | [optional] value must be a uuid -**dateTime** | str, schemas.Unset | | [optional] value must conform to RFC-3339 date-time **map** | [MapDict](#mapdict), schemas.Unset | | [optional] ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [MixedPropertiesAndAdditionalPropertiesClassDictInput](#mixedpropertiesandadditionalpropertiesclassdictinput), [MixedPropertiesAndAdditionalPropertiesClassDict](#mixedpropertiesandadditionalpropertiesclassdict) | [MixedPropertiesAndAdditionalPropertiesClassDict](#mixedpropertiesandadditionalpropertiesclassdict) | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["uuid"], instance["dateTime"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties # Map diff --git a/samples/client/petstore/python/docs/components/schema/name.md b/samples/client/petstore/python/docs/components/schema/name.md index 2d09d1038c9..8aaeedc84e8 100644 --- a/samples/client/petstore/python/docs/components/schema/name.md +++ b/samples/client/petstore/python/docs/components/schema/name.md @@ -33,7 +33,6 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **name** | int | | value must be a 32 bit integer **snake_case** | int, schemas.Unset | | [optional] value must be a 32 bit integer -**property** | str, schemas.Unset | this is a reserved python keyword | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type Model for testing model name same as property name | [optional] typed value is accessed with the get_additional_property_ method ### properties @@ -41,12 +40,12 @@ Property | Type | Description | Notes -------- | ---- | ----------- | ----- **name** | int | | value must be a 32 bit integer **snake_case** | int, schemas.Unset | | [optional] value must be a 32 bit integer -**property** | str, schemas.Unset | this is a reserved python keyword | [optional] ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [NameDictInput](#namedictinput), [NameDict](#namedict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [NameDict](#namedict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["property"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md index 125f9daa388..aae0ac5ca90 100644 --- a/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md +++ b/samples/client/petstore/python/docs/components/schema/object_with_invalid_named_refed_properties.md @@ -27,19 +27,13 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] ### __new__ method Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- -**from** | [from_schema.FromSchemaDictInput](../../components/schema/from_schema.md#fromschemadictinput), [from_schema.FromSchemaDict](../../components/schema/from_schema.md#fromschemadict) | | **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method -### properties -Property | Type | Description | Notes --------- | ---- | ----------- | ----- -**from** | [from_schema.FromSchemaDict](../../components/schema/from_schema.md#fromschemadict) | | - ### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [ObjectWithInvalidNamedRefedPropertiesDictInput](#objectwithinvalidnamedrefedpropertiesdictinput), [ObjectWithInvalidNamedRefedPropertiesDict](#objectwithinvalidnamedrefedpropertiesdict) | [ObjectWithInvalidNamedRefedPropertiesDict](#objectwithinvalidnamedrefedpropertiesdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["!reference"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["!reference"], instance["from"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties [[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/docs/components/schema/user.md b/samples/client/petstore/python/docs/components/schema/user.md index b6d86daa6d9..9176682d41c 100644 --- a/samples/client/petstore/python/docs/components/schema/user.md +++ b/samples/client/petstore/python/docs/components/schema/user.md @@ -119,9 +119,9 @@ dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, i ## not Schema Class | Input Type | Return Type ------------ | ---------- | ----------- -[Not](#not) | None | None +[_Not](#_not) | None | None -# Not +# _Not ``` type: schemas.Schema ``` diff --git a/samples/client/petstore/python/docs/paths/fake/post.md b/samples/client/petstore/python/docs/paths/fake/post.md index c509d8288a4..99cd828b2ab 100644 --- a/samples/client/petstore/python/docs/paths/fake/post.md +++ b/samples/client/petstore/python/docs/paths/fake/post.md @@ -89,11 +89,9 @@ Keyword Argument | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, io.BufferedReader, schemas.Unset | None | [optional] **date** | str, datetime.date, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, datetime.datetime, schemas.Unset | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time **password** | str, schemas.Unset | None | [optional] **callback** | str, schemas.Unset | None | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method @@ -108,11 +106,9 @@ Property | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, schemas.Unset | None | [optional] **date** | str, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, schemas.Unset | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time **password** | str, schemas.Unset | None | [optional] **callback** | str, schemas.Unset | None | [optional] @@ -120,6 +116,7 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [SchemaDictInput](#requestbody-content-applicationxwwwformurlencoded-schema-schemadictinput), [SchemaDict](#requestbody-content-applicationxwwwformurlencoded-schema-schemadict) | [SchemaDict](#requestbody-content-applicationxwwwformurlencoded-schema-schemadict) | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], instance["dateTime"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties ## Return Types @@ -202,7 +199,7 @@ with petstore_api.ApiClient(used_configuration) as api_client: "int32": 20, "int64": 1, "number": 32.1, - "float": 3.14, + "_float": 3.14, "double": 67.8, "string": "A", "pattern_without_delimiter": "AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", diff --git a/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md b/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md index cce61f789c8..32e96d5f71b 100644 --- a/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md +++ b/samples/client/petstore/python/docs/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.md @@ -45,11 +45,9 @@ Keyword Argument | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, io.BufferedReader, schemas.Unset | None | [optional] **date** | str, datetime.date, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, datetime.datetime, schemas.Unset | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time **password** | str, schemas.Unset | None | [optional] **callback** | str, schemas.Unset | None | [optional] **kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method @@ -64,11 +62,9 @@ Property | Type | Description | Notes **integer** | int, schemas.Unset | None | [optional] **int32** | int, schemas.Unset | None | [optional] value must be a 32 bit integer **int64** | int, schemas.Unset | None | [optional] value must be a 64 bit integer -**float** | float, int, schemas.Unset | None | [optional] value must be a 32 bit float **string** | str, schemas.Unset | None | [optional] **binary** | bytes, io.FileIO, schemas.Unset | None | [optional] **date** | str, schemas.Unset | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, schemas.Unset | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.111110+01:00 value must conform to RFC-3339 date-time **password** | str, schemas.Unset | None | [optional] **callback** | str, schemas.Unset | None | [optional] @@ -76,4 +72,5 @@ Property | Type | Description | Notes Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [SchemaDictInput](#schemadictinput), [SchemaDict](#schemadict) | [SchemaDict](#schemadict) | a constructor +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["float"], instance["dateTime"], get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties diff --git a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md index 443e7823331..83475935410 100644 --- a/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md +++ b/samples/client/petstore/python/docs/paths/fake_parameter_collisions1_abab_self_ab/post.md @@ -86,20 +86,18 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [QueryParametersDictInput](#queryparameters-queryparametersdictinput), [QueryParametersDict](#queryparameters-queryparametersdict) | [QueryParametersDict](#queryparameters-queryparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], ### header_params ### HeaderParameters ``` @@ -131,19 +129,17 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [HeaderParametersDictInput](#headerparameters-headerparametersdictinput), [HeaderParametersDict](#headerparameters-headerparametersdict) | [HeaderParametersDict](#headerparameters-headerparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], ### path_params ### PathParameters ``` @@ -177,20 +173,18 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **Ab** | str | | **aB** | str | | -**self** | str | | ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **Ab** | str | | **aB** | str | | -**self** | str | | ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [PathParametersDictInput](#pathparameters-pathparametersdictinput), [PathParametersDict](#pathparameters-pathparametersdict) | [PathParametersDict](#pathparameters-pathparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], ### cookie_params ### CookieParameters ``` @@ -224,20 +218,18 @@ Keyword Argument | Type | Description | Notes ---------------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### properties Property | Type | Description | Notes -------- | ---- | ----------- | ----- **aB** | str, schemas.Unset | | [optional] **Ab** | str, schemas.Unset | | [optional] -**self** | str, schemas.Unset | | [optional] ##### methods Method | Input Type | Return Type | Notes ------ | ---------- | ----------- | ------ from_dict_ | [CookieParametersDictInput](#cookieparameters-cookieparametersdictinput), [CookieParametersDict](#cookieparameters-cookieparametersdict) | [CookieParametersDict](#cookieparameters-cookieparametersdict) | a constructor -__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], +__getitem__ | str | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | This model has invalid python names so this method is used under the hood when you access instance["1"], instance["A-B"], instance["self"], ## Return Types diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py index d1d2d1e982b..906a633a051 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -11,12 +11,12 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] Name: typing_extensions.TypeAlias = schemas.Int32Schema -Class: typing_extensions.TypeAlias = schemas.StrSchema +_Class: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { "name": typing.Type[Name], - "class": typing.Type[Class], + "class": typing.Type[_Class], } ) @@ -37,17 +37,12 @@ def __new__( int, schemas.Unset ] = schemas.unset, - class: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("name", name), - ("class", class), ): if isinstance(val, schemas.Unset): continue @@ -76,16 +71,6 @@ def name(self) -> typing.Union[int, schemas.Unset]: val ) - @property - def class(self) -> typing.Union[str, schemas.Unset]: - val = self.get("class", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index dcf002804d7..88f923486c4 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -13,7 +13,7 @@ @dataclasses.dataclass(frozen=True) -class Uuid( +class _Uuid( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -31,7 +31,7 @@ class Date( @dataclasses.dataclass(frozen=True) -class DateTime( +class _DateTime( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -85,7 +85,7 @@ class Double( @dataclasses.dataclass(frozen=True) -class Float( +class _Float( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type @@ -94,15 +94,15 @@ class Float( Properties = typing.TypedDict( 'Properties', { - "uuid": typing.Type[Uuid], + "uuid": typing.Type[_Uuid], "date": typing.Type[Date], - "date-time": typing.Type[DateTime], + "date-time": typing.Type[_DateTime], "number": typing.Type[Number], "binary": typing.Type[Binary], "int32": typing.Type[Int32], "int64": typing.Type[Int64], "double": typing.Type[Double], - "float": typing.Type[Float], + "float": typing.Type[_Float], } ) @@ -126,11 +126,6 @@ class AnyTypeAndFormatDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] def __new__( cls, *, - uuid: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, date: typing.Union[ schemas.INPUT_TYPES_ALL, schemas.OUTPUT_BASE_TYPES, @@ -161,24 +156,17 @@ def __new__( schemas.OUTPUT_BASE_TYPES, schemas.Unset ] = schemas.unset, - float: typing.Union[ - schemas.INPUT_TYPES_ALL, - schemas.OUTPUT_BASE_TYPES, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( - ("uuid", uuid), ("date", date), ("number", number), ("binary", binary), ("int32", int32), ("int64", int64), ("double", double), - ("float", float), ): if isinstance(val, schemas.Unset): continue @@ -197,13 +185,6 @@ def from_dict_( ) -> AnyTypeAndFormatDict: return AnyTypeAndFormat.validate(arg, configuration=configuration) - @property - def uuid(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - @property def date(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: val = self.get("date", schemas.unset) @@ -246,13 +227,6 @@ def double(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: return val return val - @property - def float(self) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return val - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index bddd0dec2c0..cfdad38a366 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -10,7 +10,7 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -Not: typing_extensions.TypeAlias = schemas.StrSchema +_Not: typing_extensions.TypeAlias = schemas.StrSchema @dataclasses.dataclass(frozen=True) @@ -23,5 +23,5 @@ class AnyTypeNotString( Do not edit the class manually. """ # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/client/petstore/python/src/petstore_api/components/schema/cat.py index 19d2e4c76e5..58e2dd0325c 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -103,6 +103,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import animal AllOf = typing.Tuple[ typing.Type[animal.Animal], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 2282ada70b0..86f10f194d6 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -103,6 +103,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import parent_pet AllOf = typing.Tuple[ typing.Type[parent_pet.ParentPet], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py index 477e26912c6..6227adce43b 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -10,11 +10,11 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -Class: typing_extensions.TypeAlias = schemas.StrSchema +_Class: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { - "_class": typing.Type[Class], + "_class": typing.Type[_Class], } ) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index 1adce2057b2..ab0aaab9312 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -158,6 +158,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import quadrilateral_interface AllOf = typing.Tuple[ typing.Type[quadrilateral_interface.QuadrilateralInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 8b54ef95053..04a2d0d4f4f 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -105,6 +105,9 @@ class _6( pattern: schemas.PatternInfo = schemas.PatternInfo( pattern=r'^2020.*' # noqa: E501 ) + +from petstore_api.components.schema import animal +from petstore_api.components.schema import number_with_validations OneOf = typing.Tuple[ typing.Type[number_with_validations.NumberWithValidations], typing.Type[animal.Animal], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/client/petstore/python/src/petstore_api/components/schema/dog.py index 796b03a5296..5b082a354d2 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -103,6 +103,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import animal AllOf = typing.Tuple[ typing.Type[animal.Animal], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index 1028fbe1f55..24d9116ab24 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -158,6 +158,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py index 440c0fec2a5..b8b0c0d990b 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -53,7 +53,7 @@ class Number( @dataclasses.dataclass(frozen=True) -class Float( +class _Float( schemas.Float32Schema ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -152,8 +152,8 @@ class String( Byte: typing_extensions.TypeAlias = schemas.StrSchema Binary: typing_extensions.TypeAlias = schemas.BinarySchema Date: typing_extensions.TypeAlias = schemas.DateSchema -DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema -Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema +_DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema +_Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema UuidNoExample: typing_extensions.TypeAlias = schemas.UUIDSchema @@ -201,7 +201,7 @@ class PatternWithDigitsAndDelimiter( "int32withValidations": typing.Type[Int32withValidations], "int64": typing.Type[Int64], "number": typing.Type[Number], - "float": typing.Type[Float], + "float": typing.Type[_Float], "float32": typing.Type[Float32], "double": typing.Type[Double], "float64": typing.Type[Float64], @@ -210,8 +210,8 @@ class PatternWithDigitsAndDelimiter( "byte": typing.Type[Byte], "binary": typing.Type[Binary], "date": typing.Type[Date], - "dateTime": typing.Type[DateTime], - "uuid": typing.Type[Uuid], + "dateTime": typing.Type[_DateTime], + "uuid": typing.Type[_Uuid], "uuidNoExample": typing.Type[UuidNoExample], "password": typing.Type[Password], "pattern_with_digits": typing.Type[PatternWithDigits], @@ -278,11 +278,6 @@ def __new__( int, schemas.Unset ] = schemas.unset, - float: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, float32: typing.Union[ int, float, @@ -314,16 +309,6 @@ def __new__( schemas.FileIO, schemas.Unset ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, - uuid: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, uuidNoExample: typing.Union[ str, uuid.UUID, @@ -355,15 +340,12 @@ def __new__( ("int32", int32), ("int32withValidations", int32withValidations), ("int64", int64), - ("float", float), ("float32", float32), ("double", double), ("float64", float64), ("arrayWithUniqueItems", arrayWithUniqueItems), ("string", string), ("binary", binary), - ("dateTime", dateTime), - ("uuid", uuid), ("uuidNoExample", uuidNoExample), ("pattern_with_digits", pattern_with_digits), ("pattern_with_digits_and_delimiter", pattern_with_digits_and_delimiter), @@ -454,16 +436,6 @@ def int64(self) -> typing.Union[int, schemas.Unset]: val ) - @property - def float(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - @property def float32(self) -> typing.Union[int, float, schemas.Unset]: val = self.get("float32", schemas.unset) @@ -524,26 +496,6 @@ def binary(self) -> typing.Union[bytes, schemas.FileIO, schemas.Unset]: val ) - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def uuid(self) -> typing.Union[str, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - @property def uuidNoExample(self) -> typing.Union[str, schemas.Unset]: val = self.get("uuidNoExample", schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py index 83a263c61b9..368f7f1857e 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -72,6 +72,9 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) FruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + +from petstore_api.components.schema import apple +from petstore_api.components.schema import banana OneOf = typing.Tuple[ typing.Type[apple.Apple], typing.Type[banana.Banana], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index b60c7051cea..09cccde5e45 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -11,6 +11,9 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] _0: typing_extensions.TypeAlias = schemas.NoneSchema + +from petstore_api.components.schema import apple_req +from petstore_api.components.schema import banana_req OneOf = typing.Tuple[ typing.Type[_0], typing.Type[apple_req.AppleReq], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index febe8cc25cd..fa6efa80e25 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -72,6 +72,9 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) GmFruitDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + +from petstore_api.components.schema import apple +from petstore_api.components.schema import banana AnyOf = typing.Tuple[ typing.Type[apple.Apple], typing.Type[banana.Banana], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index e881d030b41..1160964736a 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -158,6 +158,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 0e71d4294ac..bf294f2501a 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -10,6 +10,10 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from petstore_api.components.schema import json_patch_request_add_replace_test +from petstore_api.components.schema import json_patch_request_move_copy +from petstore_api.components.schema import json_patch_request_remove OneOf = typing.Tuple[ typing.Type[json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest], typing.Type[json_patch_request_remove.JSONPatchRequestRemove], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index 13ac497198d..88517c1749b 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -11,7 +11,7 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] AdditionalProperties: typing_extensions.TypeAlias = schemas.NotAnyTypeSchema -From: typing_extensions.TypeAlias = schemas.StrSchema +_From: typing_extensions.TypeAlias = schemas.StrSchema Path: typing_extensions.TypeAlias = schemas.StrSchema @@ -84,7 +84,7 @@ def validate( Properties = typing.TypedDict( 'Properties', { - "from": typing.Type[From], + "from": typing.Type[_From], "path": typing.Type[Path], "op": typing.Type[Op], } @@ -104,7 +104,6 @@ class JSONPatchRequestMoveCopyDict(schemas.immutabledict[str, str]): def __new__( cls, *, - from: str, op: typing.Literal[ "move", "copy" @@ -113,7 +112,6 @@ def __new__( configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = { - "from": from, "op": op, "path": path, } @@ -130,10 +128,6 @@ def from_dict_( ) -> JSONPatchRequestMoveCopyDict: return JSONPatchRequestMoveCopy.validate(arg, configuration=configuration) - @property - def from(self) -> str: - return self.__getitem__("from") - @property def op(self) -> typing.Literal["move", "copy"]: return typing.cast( diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index 1d318bc62a0..ab8a7225c20 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -10,8 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] -Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema -DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema +_Uuid: typing_extensions.TypeAlias = schemas.UUIDSchema +_DateTime: typing_extensions.TypeAlias = schemas.DateTimeSchema from petstore_api.components.schema import animal @@ -93,8 +93,8 @@ def validate( Properties = typing.TypedDict( 'Properties', { - "uuid": typing.Type[Uuid], - "dateTime": typing.Type[DateTime], + "uuid": typing.Type[_Uuid], + "dateTime": typing.Type[_DateTime], "map": typing.Type[Map], } ) @@ -113,16 +113,6 @@ class MixedPropertiesAndAdditionalPropertiesClassDict(schemas.immutabledict[str, def __new__( cls, *, - uuid: typing.Union[ - str, - uuid.UUID, - schemas.Unset - ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, map: typing.Union[ MapDictInput, MapDict, @@ -133,8 +123,6 @@ def __new__( ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( - ("uuid", uuid), - ("dateTime", dateTime), ("map", map), ): if isinstance(val, schemas.Unset): @@ -154,26 +142,6 @@ def from_dict_( ) -> MixedPropertiesAndAdditionalPropertiesClassDict: return MixedPropertiesAndAdditionalPropertiesClass.validate(arg, configuration=configuration) - @property - def uuid(self) -> typing.Union[str, schemas.Unset]: - val = self.get("uuid", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - @property def map(self) -> typing.Union[MapDict, schemas.Unset]: val = self.get("map", schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/client/petstore/python/src/petstore_api/components/schema/name.py index f4c09377735..ae1fd324f03 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/name.py @@ -12,13 +12,13 @@ Name2: typing_extensions.TypeAlias = schemas.Int32Schema SnakeCase: typing_extensions.TypeAlias = schemas.Int32Schema -Property: typing_extensions.TypeAlias = schemas.StrSchema +_Property: typing_extensions.TypeAlias = schemas.StrSchema Properties = typing.TypedDict( 'Properties', { "name": typing.Type[Name2], "snake_case": typing.Type[SnakeCase], - "property": typing.Type[Property], + "property": typing.Type[_Property], } ) @@ -41,10 +41,6 @@ def __new__( int, schemas.Unset ] = schemas.unset, - property: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): @@ -53,7 +49,6 @@ def __new__( } for key_, val in ( ("snake_case", snake_case), - ("property", property), ): if isinstance(val, schemas.Unset): continue @@ -89,16 +84,6 @@ def snake_case(self) -> typing.Union[int, schemas.Unset]: val ) - @property - def property(self) -> typing.Union[str, schemas.Unset]: - val = self.get("property", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 270629b4219..2862a7f6282 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -11,6 +11,9 @@ from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] _2: typing_extensions.TypeAlias = schemas.NoneSchema + +from petstore_api.components.schema import quadrilateral +from petstore_api.components.schema import triangle OneOf = typing.Tuple[ typing.Type[triangle.Triangle], typing.Type[quadrilateral.Quadrilateral], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index 5ad17229b93..0f7123417ed 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -62,6 +62,8 @@ def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BAS schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) ObjWithRequiredPropsDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] + +from petstore_api.components.schema import obj_with_required_props_base AllOf = typing.Tuple[ typing.Type[obj_with_required_props_base.ObjWithRequiredPropsBase], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index e92a874ebd5..3d8a9445522 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -117,6 +117,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import object_with_optional_test_prop AllOf = typing.Tuple[ typing.Type[object_with_optional_test_prop.ObjectWithOptionalTestProp], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 93f6b20ee10..96717a68915 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -34,15 +34,10 @@ class ObjectWithInvalidNamedRefedPropertiesDict(schemas.immutabledict[str, schem def __new__( cls, *, - from: typing.Union[ - from_schema.FromSchemaDictInput, - from_schema.FromSchemaDict, - ], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, **kwargs: schemas.INPUT_TYPES_ALL, ): arg_: typing.Dict[str, typing.Any] = { - "from": from, } arg_.update(kwargs) used_arg_ = typing.cast(ObjectWithInvalidNamedRefedPropertiesDictInput, arg_) @@ -58,13 +53,6 @@ def from_dict_( ) -> ObjectWithInvalidNamedRefedPropertiesDict: return ObjectWithInvalidNamedRefedProperties.validate(arg, configuration=configuration) - @property - def from(self) -> from_schema.FromSchemaDict: - return typing.cast( - from_schema.FromSchemaDict, - self.__getitem__("from") - ) - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) return self.get(name, schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index 62c60170c1c..c6ce3983b33 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -12,6 +12,7 @@ from petstore_api.components.schema import child_cat +from petstore_api.components.schema import grandparent_animal AllOf = typing.Tuple[ typing.Type[grandparent_animal.GrandparentAnimal], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 67d7ad2b678..795839948d7 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -158,6 +158,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import triangle_interface AllOf = typing.Tuple[ typing.Type[triangle_interface.TriangleInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 185b49039f7..4e963b524c3 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -158,6 +158,8 @@ def validate( configuration=configuration, ) + +from petstore_api.components.schema import quadrilateral_interface AllOf = typing.Tuple[ typing.Type[quadrilateral_interface.QuadrilateralInterface], typing.Type[_1], diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py index f1802311809..f932790d932 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -10,6 +10,8 @@ from __future__ import annotations from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] + +from petstore_api.components.schema import object_interface AllOf = typing.Tuple[ typing.Type[object_interface.ObjectInterface], ] diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/client/petstore/python/src/petstore_api/components/schema/user.py index 1868e365208..1ec18d5a8a0 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/client/petstore/python/src/petstore_api/components/schema/user.py @@ -56,7 +56,7 @@ def validate( ) AnyTypeProp: typing_extensions.TypeAlias = schemas.AnyTypeSchema -Not: typing_extensions.TypeAlias = schemas.NoneSchema +_Not: typing_extensions.TypeAlias = schemas.NoneSchema @dataclasses.dataclass(frozen=True) @@ -64,7 +64,7 @@ class AnyTypeExceptNullProp( schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], ): # any type - not_: typing.Type[Not] = dataclasses.field(default_factory=lambda: Not) # type: ignore + not_: typing.Type[_Not] = dataclasses.field(default_factory=lambda: _Not) # type: ignore AnyTypePropNullable: typing_extensions.TypeAlias = schemas.AnyTypeSchema Properties = typing.TypedDict( diff --git a/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py b/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py index df81ea92b61..bb4af2063cf 100644 --- a/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py +++ b/samples/client/petstore/python/src/petstore_api/components/schemas/__init__.py @@ -122,7 +122,7 @@ from petstore_api.components.schema.req_props_from_explicit_add_props import ReqPropsFromExplicitAddProps from petstore_api.components.schema.req_props_from_true_add_props import ReqPropsFromTrueAddProps from petstore_api.components.schema.req_props_from_unset_add_props import ReqPropsFromUnsetAddProps -from petstore_api.components.schema.return import Return +from petstore_api.components.schema._return import _Return from petstore_api.components.schema.scalene_triangle import ScaleneTriangle from petstore_api.components.schema.self_referencing_array_model import SelfReferencingArrayModel from petstore_api.components.schema.self_referencing_object_model import SelfReferencingObjectModel diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 2672b34d10e..abe8330dc39 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -50,7 +50,7 @@ class Number( @dataclasses.dataclass(frozen=True) -class Float( +class _Float( schemas.Float32Schema ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -103,7 +103,7 @@ class PatternWithoutDelimiter( @dataclasses.dataclass(frozen=True) -class DateTime( +class _DateTime( schemas.DateTimeSchema ): types: typing.FrozenSet[typing.Type] = frozenset({ @@ -131,14 +131,14 @@ class Password( "int32": typing.Type[Int32], "int64": typing.Type[Int64], "number": typing.Type[Number], - "float": typing.Type[Float], + "float": typing.Type[_Float], "double": typing.Type[Double], "string": typing.Type[String], "pattern_without_delimiter": typing.Type[PatternWithoutDelimiter], "byte": typing.Type[Byte], "binary": typing.Type[Binary], "date": typing.Type[Date], - "dateTime": typing.Type[DateTime], + "dateTime": typing.Type[_DateTime], "password": typing.Type[Password], "callback": typing.Type[Callback], } @@ -191,11 +191,6 @@ def __new__( int, schemas.Unset ] = schemas.unset, - float: typing.Union[ - int, - float, - schemas.Unset - ] = schemas.unset, string: typing.Union[ str, schemas.Unset @@ -212,11 +207,6 @@ def __new__( datetime.date, schemas.Unset ] = schemas.unset, - dateTime: typing.Union[ - str, - datetime.datetime, - schemas.Unset - ] = schemas.unset, password: typing.Union[ str, schemas.Unset @@ -238,11 +228,9 @@ def __new__( ("integer", integer), ("int32", int32), ("int64", int64), - ("float", float), ("string", string), ("binary", binary), ("date", date), - ("dateTime", dateTime), ("password", password), ("callback", callback), ): @@ -321,16 +309,6 @@ def int64(self) -> typing.Union[int, schemas.Unset]: val ) - @property - def float(self) -> typing.Union[int, float, schemas.Unset]: - val = self.get("float", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - typing.Union[int, float], - val - ) - @property def string(self) -> typing.Union[str, schemas.Unset]: val = self.get("string", schemas.unset) @@ -361,16 +339,6 @@ def date(self) -> typing.Union[str, schemas.Unset]: val ) - @property - def dateTime(self) -> typing.Union[str, schemas.Unset]: - val = self.get("dateTime", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) - @property def password(self) -> typing.Union[str, schemas.Unset]: val = self.get("password", schemas.unset) diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py index 439f40fd378..c5ff4b4f1b9 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/cookie_parameters.py @@ -52,17 +52,12 @@ def __new__( str, schemas.Unset ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), ("Ab", Ab), - ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -99,16 +94,6 @@ def Ab(self) -> typing.Union[str, schemas.Unset]: str, val ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) CookieParametersDictInput = typing.TypedDict( 'CookieParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py index fa1f5abfae9..c0811f84bb5 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/header_parameters.py @@ -45,16 +45,11 @@ def __new__( str, schemas.Unset ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), - ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -81,16 +76,6 @@ def aB(self) -> typing.Union[str, schemas.Unset]: str, val ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) HeaderParametersDictInput = typing.TypedDict( 'HeaderParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py index 4e83ff0a816..4c338531011 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/path_parameters.py @@ -46,13 +46,11 @@ def __new__( *, Ab: str, aB: str, - self: str, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = { "Ab": Ab, "aB": aB, - "self": self, } used_arg_ = typing.cast(PathParametersDictInput, arg_) return PathParameters.validate(used_arg_, configuration=configuration_) @@ -80,13 +78,6 @@ def aB(self) -> str: str, self.__getitem__("aB") ) - - @property - def self(self) -> str: - return typing.cast( - str, - self.__getitem__("self") - ) PathParametersDictInput = typing.TypedDict( 'PathParametersDictInput', { diff --git a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py index a6f98c151ad..f3009762b0e 100644 --- a/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py +++ b/samples/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/query_parameters.py @@ -52,17 +52,12 @@ def __new__( str, schemas.Unset ] = schemas.unset, - self: typing.Union[ - str, - schemas.Unset - ] = schemas.unset, configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, ): arg_: typing.Dict[str, typing.Any] = {} for key_, val in ( ("aB", aB), ("Ab", Ab), - ("self", self), ): if isinstance(val, schemas.Unset): continue @@ -99,16 +94,6 @@ def Ab(self) -> typing.Union[str, schemas.Unset]: str, val ) - - @property - def self(self) -> typing.Union[str, schemas.Unset]: - val = self.get("self", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - str, - val - ) QueryParametersDictInput = typing.TypedDict( 'QueryParametersDictInput', { From df224b63e5e7d7509858cad522a778a3d633dc71 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:12:39 -0700 Subject: [PATCH 38/44] Removes lingering unused folder --- .../java/unit_test_api/RootServerInfo.java | 46 - .../unit_test_api/apiclient/ApiClient.java | 39 - .../schemas/ASchemaGivenForPrefixitems.java | 426 ---- .../AdditionalItemsAreAllowedByDefault.java | 413 ---- ...ditionalpropertiesAreAllowedByDefault.java | 531 ----- .../AdditionalpropertiesCanExistByItself.java | 194 -- ...nalpropertiesDoesNotLookInApplicators.java | 806 ------- ...rtiesWithNullValuedInstanceProperties.java | 189 -- .../AdditionalpropertiesWithSchema.java | 357 --- .../components/schemas/Allof.java | 1098 --------- .../schemas/AllofCombinedWithAnyofOneof.java | 1190 ---------- .../components/schemas/AllofSimpleTypes.java | 900 -------- .../schemas/AllofWithBaseSchema.java | 1192 ---------- .../schemas/AllofWithOneEmptySchema.java | 340 --- .../schemas/AllofWithTheFirstEmptySchema.java | 352 --- .../schemas/AllofWithTheLastEmptySchema.java | 352 --- .../schemas/AllofWithTwoEmptySchemas.java | 352 --- .../components/schemas/Anyof.java | 626 ----- .../components/schemas/AnyofComplexTypes.java | 1098 --------- .../schemas/AnyofWithBaseSchema.java | 669 ------ .../schemas/AnyofWithOneEmptySchema.java | 352 --- .../schemas/ArrayTypeMatchesArrays.java | 20 - .../schemas/BooleanTypeMatchesBooleans.java | 19 - .../components/schemas/ByInt.java | 328 --- .../components/schemas/ByNumber.java | 328 --- .../components/schemas/BySmallNumber.java | 328 --- .../schemas/ConstNulCharactersInStrings.java | 341 --- .../schemas/ContainsKeywordValidation.java | 612 ----- .../ContainsWithNullInstanceElements.java | 339 --- .../components/schemas/DateFormat.java | 327 --- .../components/schemas/DateTimeFormat.java | 327 --- ...emasDependenciesWithEscapedCharacters.java | 1018 -------- ...ependentSubschemaIncompatibleWithRoot.java | 672 ------ .../DependentSchemasSingleDependency.java | 770 ------- .../components/schemas/DurationFormat.java | 327 --- .../components/schemas/EmailFormat.java | 327 --- .../components/schemas/EmptyDependents.java | 336 --- .../schemas/EnumWith0DoesNotMatchFalse.java | 195 -- .../schemas/EnumWith1DoesNotMatchTrue.java | 195 -- .../schemas/EnumWithEscapedCharacters.java | 120 - .../schemas/EnumWithFalseDoesNotMatch0.java | 119 - .../schemas/EnumWithTrueDoesNotMatch1.java | 119 - .../components/schemas/EnumsInProperties.java | 427 ---- .../schemas/ExclusivemaximumValidation.java | 327 --- .../schemas/ExclusiveminimumValidation.java | 327 --- .../components/schemas/FloatDivisionInf.java | 117 - .../components/schemas/ForbiddenProperty.java | 735 ------ .../components/schemas/HostnameFormat.java | 327 --- .../components/schemas/IdnEmailFormat.java | 327 --- .../components/schemas/IdnHostnameFormat.java | 327 --- .../schemas/IfAndElseWithoutThen.java | 899 -------- .../schemas/IfAndThenWithoutElse.java | 898 -------- ...enSerializedKeywordProcessingSequence.java | 1210 ---------- .../schemas/IgnoreElseWithoutIf.java | 626 ----- .../schemas/IgnoreIfWithoutThenOrElse.java | 626 ----- .../schemas/IgnoreThenWithoutIf.java | 626 ----- .../schemas/IntegerTypeMatchesIntegers.java | 19 - .../components/schemas/Ipv4Format.java | 327 --- .../components/schemas/Ipv6Format.java | 327 --- .../components/schemas/IriFormat.java | 327 --- .../schemas/IriReferenceFormat.java | 327 --- .../components/schemas/ItemsContains.java | 773 ------- ...temsDoesNotLookInApplicatorsValidCase.java | 486 ---- .../ItemsWithNullInstanceElements.java | 163 -- .../components/schemas/JsonPointerFormat.java | 327 --- .../MaxcontainsWithoutContainsIsIgnored.java | 327 --- .../components/schemas/MaximumValidation.java | 327 --- .../MaximumValidationWithUnsignedInteger.java | 327 --- .../schemas/MaxitemsValidation.java | 327 --- .../schemas/MaxlengthValidation.java | 327 --- .../Maxproperties0MeansTheObjectIsEmpty.java | 327 --- .../schemas/MaxpropertiesValidation.java | 327 --- .../MincontainsWithoutContainsIsIgnored.java | 327 --- .../components/schemas/MinimumValidation.java | 327 --- .../MinimumValidationWithSignedInteger.java | 327 --- .../schemas/MinitemsValidation.java | 327 --- .../schemas/MinlengthValidation.java | 327 --- .../schemas/MinpropertiesValidation.java | 327 --- .../schemas/MultipleDependentsRequired.java | 338 --- ...ltaneousPatternpropertiesAreValidated.java | 629 ----- .../MultipleTypesCanBeSpecifiedInAnArray.java | 146 -- ...NestedAllofToCheckValidationSemantics.java | 627 ----- ...NestedAnyofToCheckValidationSemantics.java | 627 ----- .../components/schemas/NestedItems.java | 544 ----- ...NestedOneofToCheckValidationSemantics.java | 627 ----- ...nAsciiPatternWithAdditionalproperties.java | 180 -- .../NonInterferenceAcrossCombinedSchemas.java | 2041 ----------------- .../unit_test_api/components/schemas/Not.java | 338 --- .../schemas/NotMoreComplexSchema.java | 497 ---- .../components/schemas/NotMultipleTypes.java | 448 ---- .../schemas/NulCharactersInStrings.java | 118 - .../NullTypeMatchesOnlyTheNullObject.java | 19 - .../schemas/NumberTypeMatchesNumbers.java | 19 - .../schemas/ObjectPropertiesValidation.java | 466 ---- .../schemas/ObjectTypeMatchesObjects.java | 20 - .../components/schemas/Oneof.java | 626 ----- .../components/schemas/OneofComplexTypes.java | 1098 --------- .../schemas/OneofWithBaseSchema.java | 669 ------ .../schemas/OneofWithEmptySchema.java | 352 --- .../components/schemas/OneofWithRequired.java | 1143 --------- .../schemas/PatternIsNotAnchored.java | 330 --- .../components/schemas/PatternValidation.java | 330 --- ...tiesValidatesPropertiesMatchingARegex.java | 343 --- ...rtiesWithNullValuedInstanceProperties.java | 343 --- ...dationAdjustsTheStartingIndexForItems.java | 198 -- .../PrefixitemsWithNullInstanceElements.java | 413 ---- ...ertiesAdditionalpropertiesInteraction.java | 673 ------ ...NamesAreJavascriptObjectPropertyNames.java | 913 -------- .../PropertiesWithEscapedCharacters.java | 647 ------ ...rtiesWithNullValuedInstanceProperties.java | 409 ---- .../PropertyNamedRefThatIsNotAReference.java | 399 ---- .../schemas/PropertynamesValidation.java | 397 ---- .../components/schemas/RegexFormat.java | 327 --- ...tAnchoredByDefaultAndAreCaseSensitive.java | 356 --- .../schemas/RelativeJsonPointerFormat.java | 327 --- .../schemas/RequiredDefaultValidation.java | 451 ---- ...NamesAreJavascriptObjectPropertyNames.java | 677 ------ .../schemas/RequiredValidation.java | 549 ----- .../schemas/RequiredWithEmptyArray.java | 451 ---- .../RequiredWithEscapedCharacters.java | 1947 ---------------- .../schemas/SimpleEnumValidation.java | 205 -- .../components/schemas/SingleDependency.java | 337 --- .../schemas/SmallMultipleOfLargeInteger.java | 117 - .../schemas/StringTypeMatchesStrings.java | 19 - .../components/schemas/TimeFormat.java | 327 --- .../schemas/TypeArrayObjectOrNull.java | 205 -- .../components/schemas/TypeArrayOrObject.java | 174 -- .../schemas/TypeAsArrayWithOneItem.java | 19 - .../schemas/UnevaluateditemsAsSchema.java | 339 --- ...ditemsDependsOnMultipleNestedContains.java | 1757 -------------- .../schemas/UnevaluateditemsWithItems.java | 191 -- ...valuateditemsWithNullInstanceElements.java | 339 --- ...dpropertiesNotAffectedByPropertynames.java | 410 ---- .../schemas/UnevaluatedpropertiesSchema.java | 195 -- ...rtiesWithAdjacentAdditionalproperties.java | 301 --- ...rtiesWithNullValuedInstanceProperties.java | 339 --- .../schemas/UniqueitemsFalseValidation.java | 327 --- .../UniqueitemsFalseWithAnArrayOfItems.java | 426 ---- .../schemas/UniqueitemsValidation.java | 327 --- .../UniqueitemsWithAnArrayOfItems.java | 426 ---- .../components/schemas/UriFormat.java | 327 --- .../schemas/UriReferenceFormat.java | 327 --- .../components/schemas/UriTemplateFormat.java | 327 --- .../components/schemas/UuidFormat.java | 327 --- ...alidateAgainstCorrectBranchThenVsElse.java | 1185 ---------- .../configurations/ApiConfiguration.java | 101 - .../JsonSchemaKeywordFlags.java | 334 --- .../configurations/SchemaConfiguration.java | 4 - .../contenttype/ContentTypeDeserializer.java | 18 - .../contenttype/ContentTypeDetector.java | 18 - .../contenttype/ContentTypeSerializer.java | 18 - .../exceptions/ApiException.java | 13 - .../exceptions/BaseException.java | 8 - .../InvalidAdditionalPropertyException.java | 8 - .../exceptions/NotImplementedException.java | 8 - .../exceptions/UnsetPropertyException.java | 8 - .../exceptions/ValidationException.java | 8 - .../unit_test_api/header/ContentHeader.java | 59 - .../java/unit_test_api/header/Header.java | 14 - .../java/unit_test_api/header/HeaderBase.java | 18 - .../header/PrefixSeparatorIterator.java | 27 - .../header/Rfc6570Serializer.java | 193 -- .../unit_test_api/header/SchemaHeader.java | 97 - .../unit_test_api/header/StyleSerializer.java | 99 - .../unit_test_api/mediatype/Encoding.java | 30 - .../unit_test_api/mediatype/MediaType.java | 16 - .../parameter/ContentParameter.java | 30 - .../parameter/CookieSerializer.java | 36 - .../parameter/HeadersSerializer.java | 32 - .../unit_test_api/parameter/Parameter.java | 10 - .../parameter/ParameterBase.java | 15 - .../parameter/ParameterInType.java | 8 - .../parameter/ParameterStyle.java | 11 - .../parameter/PathSerializer.java | 30 - .../parameter/QuerySerializer.java | 48 - .../parameter/SchemaParameter.java | 60 - .../requestbody/GenericRequestBody.java | 6 - .../requestbody/RequestBodySerializer.java | 47 - .../requestbody/SerializedRequestBody.java | 13 - .../unit_test_api/response/ApiResponse.java | 9 - .../response/DeserializedHttpResponse.java | 6 - .../response/HeadersDeserializer.java | 37 - .../response/ResponseDeserializer.java | 74 - .../response/ResponsesDeserializer.java | 11 - .../unit_test_api/restclient/RestClient.java | 67 - .../schemas/AnyTypeJsonSchema.java | 315 --- .../schemas/BooleanJsonSchema.java | 88 - .../unit_test_api/schemas/DateJsonSchema.java | 94 - .../schemas/DateTimeJsonSchema.java | 94 - .../schemas/DecimalJsonSchema.java | 87 - .../schemas/DoubleJsonSchema.java | 91 - .../schemas/FloatJsonSchema.java | 91 - .../unit_test_api/schemas/GenericBuilder.java | 9 - .../schemas/Int32JsonSchema.java | 98 - .../schemas/Int64JsonSchema.java | 108 - .../unit_test_api/schemas/IntJsonSchema.java | 108 - .../unit_test_api/schemas/ListJsonSchema.java | 108 - .../unit_test_api/schemas/MapJsonSchema.java | 112 - .../schemas/NotAnyTypeJsonSchema.java | 317 --- .../unit_test_api/schemas/NullJsonSchema.java | 87 - .../schemas/NumberJsonSchema.java | 107 - .../java/unit_test_api/schemas/SetMaker.java | 20 - .../schemas/StringJsonSchema.java | 106 - .../schemas/UnsetAddPropsSetter.java | 77 - .../unit_test_api/schemas/UuidJsonSchema.java | 94 - .../AdditionalPropertiesValidator.java | 58 - .../schemas/validation/AllOfValidator.java | 23 - .../schemas/validation/AnyOfValidator.java | 45 - .../validation/BigDecimalValidator.java | 21 - .../validation/BooleanEnumValidator.java | 8 - .../validation/BooleanSchemaValidator.java | 9 - .../validation/BooleanValueMethod.java | 5 - .../schemas/validation/ConstValidator.java | 33 - .../schemas/validation/ContainsValidator.java | 30 - .../schemas/validation/CustomIsoparser.java | 16 - .../validation/DefaultValueMethod.java | 7 - .../DependentRequiredValidator.java | 42 - .../validation/DependentSchemasValidator.java | 41 - .../validation/DoubleEnumValidator.java | 8 - .../schemas/validation/DoubleValueMethod.java | 5 - .../schemas/validation/ElseValidator.java | 31 - .../schemas/validation/EnumValidator.java | 43 - .../validation/ExclusiveMaximumValidator.java | 45 - .../validation/ExclusiveMinimumValidator.java | 45 - .../validation/FloatEnumValidator.java | 8 - .../schemas/validation/FloatValueMethod.java | 5 - .../schemas/validation/FormatValidator.java | 158 -- .../schemas/validation/FrozenList.java | 30 - .../schemas/validation/FrozenMap.java | 54 - .../schemas/validation/IfValidator.java | 28 - .../validation/IntegerEnumValidator.java | 8 - .../validation/IntegerValueMethod.java | 5 - .../schemas/validation/ItemsValidator.java | 45 - .../schemas/validation/JsonSchema.java | 499 ---- .../schemas/validation/JsonSchemaFactory.java | 32 - .../schemas/validation/JsonSchemaInfo.java | 210 -- .../schemas/validation/KeywordEntry.java | 10 - .../schemas/validation/KeywordValidator.java | 11 - .../schemas/validation/LengthValidator.java | 16 - .../validation/ListSchemaValidator.java | 12 - .../schemas/validation/LongEnumValidator.java | 8 - .../schemas/validation/LongValueMethod.java | 5 - .../validation/MapSchemaValidator.java | 13 - .../schemas/validation/MapUtils.java | 37 - .../validation/MaxContainsValidator.java | 32 - .../schemas/validation/MaxItemsValidator.java | 25 - .../validation/MaxLengthValidator.java | 24 - .../validation/MaxPropertiesValidator.java | 25 - .../schemas/validation/MaximumValidator.java | 45 - .../validation/MinContainsValidator.java | 31 - .../schemas/validation/MinItemsValidator.java | 25 - .../validation/MinLengthValidator.java | 24 - .../validation/MinPropertiesValidator.java | 25 - .../schemas/validation/MinimumValidator.java | 45 - .../validation/MultipleOfValidator.java | 27 - .../schemas/validation/NotValidator.java | 30 - .../schemas/validation/NullEnumValidator.java | 8 - .../validation/NullSchemaValidator.java | 9 - .../schemas/validation/NullValueMethod.java | 5 - .../validation/NumberSchemaValidator.java | 9 - .../schemas/validation/OneOfValidator.java | 50 - .../schemas/validation/PathToSchemasMap.java | 21 - .../PatternPropertiesValidator.java | 21 - .../schemas/validation/PatternValidator.java | 23 - .../validation/PrefixItemsValidator.java | 41 - .../validation/PropertiesValidator.java | 56 - .../schemas/validation/PropertyEntry.java | 10 - .../validation/PropertyNamesValidator.java | 38 - .../schemas/validation/RequiredValidator.java | 41 - .../validation/StringEnumValidator.java | 8 - .../validation/StringSchemaValidator.java | 9 - .../schemas/validation/StringValueMethod.java | 5 - .../schemas/validation/ThenValidator.java | 32 - .../schemas/validation/TypeValidator.java | 34 - .../validation/UnevaluatedItemsValidator.java | 52 - .../UnevaluatedPropertiesValidator.java | 49 - .../validation/UniqueItemsValidator.java | 35 - .../validation/UnsetAnyTypeJsonSchema.java | 302 --- .../schemas/validation/ValidationData.java | 23 - .../validation/ValidationMetadata.java | 26 - .../unit_test_api/servers/RootServer0.java | 9 - .../java/unit_test_api/servers/Server.java | 6 - .../unit_test_api/servers/ServerProvider.java | 6 - .../servers/ServerWithVariables.java | 21 - .../servers/ServerWithoutVariables.java | 14 - 285 files changed, 72030 deletions(-) delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java deleted file mode 100644 index 7e4a833b231..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/RootServerInfo.java +++ /dev/null @@ -1,46 +0,0 @@ -package unit_test_api; - -import unit_test_api.servers.RootServer0; -import unit_test_api.servers.Server; -import unit_test_api.servers.ServerProvider; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Objects; - -public class RootServerInfo { - public static class RootServerInfo1 implements ServerProvider { - private final RootServer0 server0; - - RootServerInfo1( - @Nullable RootServer0 server0 - ) { - this.server0 = Objects.requireNonNullElseGet(server0, RootServer0::new); - } - - @Override - public Server getServer(ServerIndex serverIndex) { - return server0; - } - } - - public static class RootServerInfoBuilder { - private @Nullable RootServer0 server0; - - public RootServerInfoBuilder() {} - - public RootServerInfoBuilder rootServer0(RootServer0 server0) { - this.server0 = server0; - return this; - } - - public RootServerInfo1 build() { - return new RootServerInfo1( - server0 - ); - } - } - - public enum ServerIndex { - SERVER_0 - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java deleted file mode 100644 index d5941c8d212..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/apiclient/ApiClient.java +++ /dev/null @@ -1,39 +0,0 @@ -package unit_test_api.apiclient; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.ApiConfiguration; -import unit_test_api.configurations.SchemaConfiguration; - -import java.net.http.HttpClient; -import java.time.Duration; - -public class ApiClient { - protected final ApiConfiguration apiConfiguration; - protected final SchemaConfiguration schemaConfiguration; - protected final HttpClient client; - - public ApiClient(ApiConfiguration apiConfiguration, SchemaConfiguration schemaConfiguration) { - this.apiConfiguration = apiConfiguration; - this.schemaConfiguration = schemaConfiguration; - @Nullable Duration timeout = apiConfiguration.getTimeout(); - if (timeout != null) { - this.client = HttpClient.newBuilder() - .connectTimeout(timeout) - .build(); - } else { - this.client = HttpClient.newHttpClient(); - } - } - - public ApiConfiguration getApiConfiguration() { - return apiConfiguration; - } - - public SchemaConfiguration getSchemaConfiguration() { - return schemaConfiguration; - } - - public HttpClient getClient() { - return client; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java deleted file mode 100644 index 4b0af6c4a32..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitems.java +++ /dev/null @@ -1,426 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ASchemaGivenForPrefixitems { - // nest classes so all schemas and input/output classes can be public - - - public static class ASchemaGivenForPrefixitemsList extends FrozenList<@Nullable Object> { - protected ASchemaGivenForPrefixitemsList(FrozenList<@Nullable Object> m) { - super(m); - } - public static ASchemaGivenForPrefixitemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return ASchemaGivenForPrefixitems1.getInstance().validate(arg, configuration); - } - } - - public static class ASchemaGivenForPrefixitemsListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public ASchemaGivenForPrefixitemsListBuilder() { - list = new ArrayList<>(); - } - - public ASchemaGivenForPrefixitemsListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public ASchemaGivenForPrefixitemsListBuilder add(Void item) { - list.add(null); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(boolean item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(String item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(int item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(float item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(long item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(double item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(List item) { - list.add(item); - return this; - } - - public ASchemaGivenForPrefixitemsListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface ASchemaGivenForPrefixitems1Boxed permits ASchemaGivenForPrefixitems1BoxedVoid, ASchemaGivenForPrefixitems1BoxedBoolean, ASchemaGivenForPrefixitems1BoxedNumber, ASchemaGivenForPrefixitems1BoxedString, ASchemaGivenForPrefixitems1BoxedList, ASchemaGivenForPrefixitems1BoxedMap { - @Nullable Object getData(); - } - - public record ASchemaGivenForPrefixitems1BoxedVoid(Void data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ASchemaGivenForPrefixitems1BoxedBoolean(boolean data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ASchemaGivenForPrefixitems1BoxedNumber(Number data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ASchemaGivenForPrefixitems1BoxedString(String data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ASchemaGivenForPrefixitems1BoxedList(ASchemaGivenForPrefixitemsList data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ASchemaGivenForPrefixitems1BoxedMap(FrozenMap<@Nullable Object> data) implements ASchemaGivenForPrefixitems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ASchemaGivenForPrefixitems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, ASchemaGivenForPrefixitems1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ASchemaGivenForPrefixitems1 instance = null; - - protected ASchemaGivenForPrefixitems1() { - super(new JsonSchemaInfo() - .prefixItems(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static ASchemaGivenForPrefixitems1 getInstance() { - if (instance == null) { - instance = new ASchemaGivenForPrefixitems1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public ASchemaGivenForPrefixitemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new ASchemaGivenForPrefixitemsList(newInstanceItems); - } - - public ASchemaGivenForPrefixitemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ASchemaGivenForPrefixitems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedVoid(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedNumber(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedString(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedList(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ASchemaGivenForPrefixitems1BoxedMap(validate(arg, configuration)); - } - @Override - public ASchemaGivenForPrefixitems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java deleted file mode 100644 index 56d8e08be28..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefault.java +++ /dev/null @@ -1,413 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalItemsAreAllowedByDefault { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalItemsAreAllowedByDefaultList extends FrozenList<@Nullable Object> { - protected AdditionalItemsAreAllowedByDefaultList(FrozenList<@Nullable Object> m) { - super(m); - } - public static AdditionalItemsAreAllowedByDefaultList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalItemsAreAllowedByDefault1.getInstance().validate(arg, configuration); - } - } - - public static class AdditionalItemsAreAllowedByDefaultListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public AdditionalItemsAreAllowedByDefaultListBuilder() { - list = new ArrayList<>(); - } - - public AdditionalItemsAreAllowedByDefaultListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(Void item) { - list.add(null); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(boolean item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(String item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(int item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(float item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(long item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(double item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(List item) { - list.add(item); - return this; - } - - public AdditionalItemsAreAllowedByDefaultListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface AdditionalItemsAreAllowedByDefault1Boxed permits AdditionalItemsAreAllowedByDefault1BoxedVoid, AdditionalItemsAreAllowedByDefault1BoxedBoolean, AdditionalItemsAreAllowedByDefault1BoxedNumber, AdditionalItemsAreAllowedByDefault1BoxedString, AdditionalItemsAreAllowedByDefault1BoxedList, AdditionalItemsAreAllowedByDefault1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalItemsAreAllowedByDefault1BoxedVoid(Void data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalItemsAreAllowedByDefault1BoxedBoolean(boolean data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalItemsAreAllowedByDefault1BoxedNumber(Number data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalItemsAreAllowedByDefault1BoxedString(String data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalItemsAreAllowedByDefault1BoxedList(AdditionalItemsAreAllowedByDefaultList data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalItemsAreAllowedByDefault1BoxedMap(FrozenMap<@Nullable Object> data) implements AdditionalItemsAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalItemsAreAllowedByDefault1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, AdditionalItemsAreAllowedByDefault1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalItemsAreAllowedByDefault1 instance = null; - - protected AdditionalItemsAreAllowedByDefault1() { - super(new JsonSchemaInfo() - .prefixItems(List.of( - Schema0.class - )) - ); - } - - public static AdditionalItemsAreAllowedByDefault1 getInstance() { - if (instance == null) { - instance = new AdditionalItemsAreAllowedByDefault1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public AdditionalItemsAreAllowedByDefaultList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new AdditionalItemsAreAllowedByDefaultList(newInstanceItems); - } - - public AdditionalItemsAreAllowedByDefaultList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedVoid(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedNumber(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedString(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedList(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalItemsAreAllowedByDefault1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalItemsAreAllowedByDefault1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java deleted file mode 100644 index d806004bbed..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefault.java +++ /dev/null @@ -1,531 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalpropertiesAreAllowedByDefault { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class AdditionalpropertiesAreAllowedByDefaultMap extends FrozenMap<@Nullable Object> { - protected AdditionalpropertiesAreAllowedByDefaultMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo", - "bar" - ); - public static AdditionalpropertiesAreAllowedByDefaultMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalpropertiesAreAllowedByDefault1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object bar() throws UnsetPropertyException { - return getOrThrow("bar"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(Void value) { - var instance = getInstance(); - instance.put("bar", null); - return getBuilderAfterBar(instance); - } - - default T bar(boolean value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(List value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(Map value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class AdditionalpropertiesAreAllowedByDefaultMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public AdditionalpropertiesAreAllowedByDefaultMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterBar(Map instance) { - return this; - } - public AdditionalpropertiesAreAllowedByDefaultMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface AdditionalpropertiesAreAllowedByDefault1Boxed permits AdditionalpropertiesAreAllowedByDefault1BoxedVoid, AdditionalpropertiesAreAllowedByDefault1BoxedBoolean, AdditionalpropertiesAreAllowedByDefault1BoxedNumber, AdditionalpropertiesAreAllowedByDefault1BoxedString, AdditionalpropertiesAreAllowedByDefault1BoxedList, AdditionalpropertiesAreAllowedByDefault1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedVoid(Void data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedBoolean(boolean data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedNumber(Number data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedString(String data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedList(FrozenList<@Nullable Object> data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesAreAllowedByDefault1BoxedMap(AdditionalpropertiesAreAllowedByDefaultMap data) implements AdditionalpropertiesAreAllowedByDefault1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalpropertiesAreAllowedByDefault1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AdditionalpropertiesAreAllowedByDefault1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalpropertiesAreAllowedByDefault1 instance = null; - - protected AdditionalpropertiesAreAllowedByDefault1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - ); - } - - public static AdditionalpropertiesAreAllowedByDefault1 getInstance() { - if (instance == null) { - instance = new AdditionalpropertiesAreAllowedByDefault1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public AdditionalpropertiesAreAllowedByDefaultMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new AdditionalpropertiesAreAllowedByDefaultMap(castProperties); - } - - public AdditionalpropertiesAreAllowedByDefaultMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedVoid(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedNumber(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedString(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedList(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesAreAllowedByDefault1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesAreAllowedByDefault1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java deleted file mode 100644 index 9ff86fe8c48..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItself.java +++ /dev/null @@ -1,194 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalpropertiesCanExistByItself { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class AdditionalpropertiesCanExistByItselfMap extends FrozenMap { - protected AdditionalpropertiesCanExistByItselfMap(FrozenMap m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of(); - public static AdditionalpropertiesCanExistByItselfMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalpropertiesCanExistByItself1.getInstance().validate(arg, configuration); - } - - public boolean getAdditionalProperty(String name) throws UnsetPropertyException { - throwIfKeyNotPresent(name); - Boolean value = get(name); - if (value == null) { - throw new RuntimeException("Value may not be null"); - } - return (boolean) value; - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class AdditionalpropertiesCanExistByItselfMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of(); - public Set getKnownKeys() { - return knownKeys; - } - public AdditionalpropertiesCanExistByItselfMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AdditionalpropertiesCanExistByItselfMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface AdditionalpropertiesCanExistByItself1Boxed permits AdditionalpropertiesCanExistByItself1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalpropertiesCanExistByItself1BoxedMap(AdditionalpropertiesCanExistByItselfMap data) implements AdditionalpropertiesCanExistByItself1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalpropertiesCanExistByItself1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalpropertiesCanExistByItself1 instance = null; - - protected AdditionalpropertiesCanExistByItself1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .additionalProperties(AdditionalProperties.class) - ); - } - - public static AdditionalpropertiesCanExistByItself1 getInstance() { - if (instance == null) { - instance = new AdditionalpropertiesCanExistByItself1(); - } - return instance; - } - - public AdditionalpropertiesCanExistByItselfMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - if (!(propertyInstance instanceof Boolean)) { - throw new RuntimeException("Invalid instantiated value"); - } - properties.put(propertyName, (Boolean) propertyInstance); - } - FrozenMap castProperties = new FrozenMap<>(properties); - return new AdditionalpropertiesCanExistByItselfMap(castProperties); - } - - public AdditionalpropertiesCanExistByItselfMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalpropertiesCanExistByItself1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesCanExistByItself1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesCanExistByItself1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java deleted file mode 100644 index ef3e054f1d9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicators.java +++ /dev/null @@ -1,806 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalpropertiesDoesNotLookInApplicators { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema0MapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0MapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public Schema0MapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class AdditionalpropertiesDoesNotLookInApplicatorsMap extends FrozenMap { - protected AdditionalpropertiesDoesNotLookInApplicatorsMap(FrozenMap m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of(); - public static AdditionalpropertiesDoesNotLookInApplicatorsMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalpropertiesDoesNotLookInApplicators1.getInstance().validate(arg, configuration); - } - - public boolean getAdditionalProperty(String name) throws UnsetPropertyException { - throwIfKeyNotPresent(name); - Boolean value = get(name); - if (value == null) { - throw new RuntimeException("Value may not be null"); - } - return (boolean) value; - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of(); - public Set getKnownKeys() { - return knownKeys; - } - public AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AdditionalpropertiesDoesNotLookInApplicatorsMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface AdditionalpropertiesDoesNotLookInApplicators1Boxed permits AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid, AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean, AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber, AdditionalpropertiesDoesNotLookInApplicators1BoxedString, AdditionalpropertiesDoesNotLookInApplicators1BoxedList, AdditionalpropertiesDoesNotLookInApplicators1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid(Void data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean(boolean data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber(Number data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedString(String data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedList(FrozenList<@Nullable Object> data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AdditionalpropertiesDoesNotLookInApplicators1BoxedMap(AdditionalpropertiesDoesNotLookInApplicatorsMap data) implements AdditionalpropertiesDoesNotLookInApplicators1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalpropertiesDoesNotLookInApplicators1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AdditionalpropertiesDoesNotLookInApplicators1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalpropertiesDoesNotLookInApplicators1 instance = null; - - protected AdditionalpropertiesDoesNotLookInApplicators1() { - super(new JsonSchemaInfo() - .additionalProperties(AdditionalProperties.class) - .allOf(List.of( - Schema0.class - )) - ); - } - - public static AdditionalpropertiesDoesNotLookInApplicators1 getInstance() { - if (instance == null) { - instance = new AdditionalpropertiesDoesNotLookInApplicators1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public AdditionalpropertiesDoesNotLookInApplicatorsMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - if (!(propertyInstance instanceof Boolean)) { - throw new RuntimeException("Invalid instantiated value"); - } - properties.put(propertyName, (Boolean) propertyInstance); - } - FrozenMap castProperties = new FrozenMap<>(properties); - return new AdditionalpropertiesDoesNotLookInApplicatorsMap(castProperties); - } - - public AdditionalpropertiesDoesNotLookInApplicatorsMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedVoid(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedNumber(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedString(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedList(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesDoesNotLookInApplicators1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesDoesNotLookInApplicators1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java deleted file mode 100644 index b8d2412bc0d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstanceProperties.java +++ /dev/null @@ -1,189 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalpropertiesWithNullValuedInstanceProperties { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class AdditionalpropertiesWithNullValuedInstancePropertiesMap extends FrozenMap { - protected AdditionalpropertiesWithNullValuedInstancePropertiesMap(FrozenMap m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of(); - public static AdditionalpropertiesWithNullValuedInstancePropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalpropertiesWithNullValuedInstanceProperties1.getInstance().validate(arg, configuration); - } - - public Void getAdditionalProperty(String name) throws UnsetPropertyException { - return getOrThrow(name); - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, null); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder implements GenericBuilder>, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of(); - public Set getKnownKeys() { - return knownKeys; - } - public AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AdditionalpropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface AdditionalpropertiesWithNullValuedInstanceProperties1Boxed permits AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap(AdditionalpropertiesWithNullValuedInstancePropertiesMap data) implements AdditionalpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalpropertiesWithNullValuedInstanceProperties1 instance = null; - - protected AdditionalpropertiesWithNullValuedInstanceProperties1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .additionalProperties(AdditionalProperties.class) - ); - } - - public static AdditionalpropertiesWithNullValuedInstanceProperties1 getInstance() { - if (instance == null) { - instance = new AdditionalpropertiesWithNullValuedInstanceProperties1(); - } - return instance; - } - - public AdditionalpropertiesWithNullValuedInstancePropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - if (!(propertyInstance == null || propertyInstance instanceof Void)) { - throw new RuntimeException("Invalid instantiated value"); - } - properties.put(propertyName, (Void) propertyInstance); - } - FrozenMap castProperties = new FrozenMap<>(properties); - return new AdditionalpropertiesWithNullValuedInstancePropertiesMap(castProperties); - } - - public AdditionalpropertiesWithNullValuedInstancePropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java deleted file mode 100644 index 3ce0364bc37..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchema.java +++ /dev/null @@ -1,357 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AdditionalpropertiesWithSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class AdditionalpropertiesWithSchemaMap extends FrozenMap<@Nullable Object> { - protected AdditionalpropertiesWithSchemaMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo", - "bar" - ); - public static AdditionalpropertiesWithSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AdditionalpropertiesWithSchema1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object bar() throws UnsetPropertyException { - return getOrThrow("bar"); - } - - public boolean getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - var value = getOrThrow(name); - if (!(value instanceof Boolean)) { - throw new RuntimeException("Invalid value stored for " + name); - } - return (boolean) value; - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(Void value) { - var instance = getInstance(); - instance.put("bar", null); - return getBuilderAfterBar(instance); - } - - default T bar(boolean value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(List value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(Map value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class AdditionalpropertiesWithSchemaMapBuilder implements GenericBuilder>, SetterForFoo, SetterForBar, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public AdditionalpropertiesWithSchemaMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterBar(Map instance) { - return this; - } - public AdditionalpropertiesWithSchemaMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface AdditionalpropertiesWithSchema1Boxed permits AdditionalpropertiesWithSchema1BoxedMap { - @Nullable Object getData(); - } - - public record AdditionalpropertiesWithSchema1BoxedMap(AdditionalpropertiesWithSchemaMap data) implements AdditionalpropertiesWithSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AdditionalpropertiesWithSchema1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AdditionalpropertiesWithSchema1 instance = null; - - protected AdditionalpropertiesWithSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - .additionalProperties(AdditionalProperties.class) - ); - } - - public static AdditionalpropertiesWithSchema1 getInstance() { - if (instance == null) { - instance = new AdditionalpropertiesWithSchema1(); - } - return instance; - } - - public AdditionalpropertiesWithSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new AdditionalpropertiesWithSchemaMap(castProperties); - } - - public AdditionalpropertiesWithSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AdditionalpropertiesWithSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AdditionalpropertiesWithSchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AdditionalpropertiesWithSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java deleted file mode 100644 index c4b24728846..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Allof.java +++ /dev/null @@ -1,1098 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Allof { - // nest classes so all schemas and input/output classes can be public - - - public static class Bar extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar" - ); - public static final Set optionalKeys = Set.of(); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public Number bar() { - @Nullable Object value = get("bar"); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema0MapBuilder implements SetterForBar { - private final Map instance; - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterBar(Map instance) { - return new Schema0Map0Builder(instance); - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "bar" - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Schema1Map extends FrozenMap<@Nullable Object> { - protected Schema1Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema1.getInstance().validate(arg, configuration); - } - - public String foo() { - @Nullable Object value = get("foo"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema1Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema1MapBuilder implements SetterForFoo { - private final Map instance; - public Schema1MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterFoo(Map instance) { - return new Schema1Map0Builder(instance); - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .required(Set.of( - "foo" - )) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema1Map(castProperties); - } - - public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Allof1Boxed permits Allof1BoxedVoid, Allof1BoxedBoolean, Allof1BoxedNumber, Allof1BoxedString, Allof1BoxedList, Allof1BoxedMap { - @Nullable Object getData(); - } - - public record Allof1BoxedVoid(Void data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Allof1BoxedBoolean(boolean data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Allof1BoxedNumber(Number data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Allof1BoxedString(String data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Allof1BoxedList(FrozenList<@Nullable Object> data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Allof1BoxedMap(FrozenMap<@Nullable Object> data) implements Allof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Allof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Allof1BoxedList>, MapSchemaValidator, Allof1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Allof1 instance = null; - - protected Allof1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static Allof1 getInstance() { - if (instance == null) { - instance = new Allof1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Allof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedVoid(validate(arg, configuration)); - } - @Override - public Allof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Allof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedNumber(validate(arg, configuration)); - } - @Override - public Allof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedString(validate(arg, configuration)); - } - @Override - public Allof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedList(validate(arg, configuration)); - } - @Override - public Allof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Allof1BoxedMap(validate(arg, configuration)); - } - @Override - public Allof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java deleted file mode 100644 index 835afc78ef2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneof.java +++ /dev/null @@ -1,1190 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofCombinedWithAnyofOneof { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Schema02Boxed permits Schema02BoxedVoid, Schema02BoxedBoolean, Schema02BoxedNumber, Schema02BoxedString, Schema02BoxedList, Schema02BoxedMap { - @Nullable Object getData(); - } - - public record Schema02BoxedVoid(Void data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema02BoxedBoolean(boolean data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema02BoxedNumber(Number data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema02BoxedString(String data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema02BoxedList(FrozenList<@Nullable Object> data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema02BoxedMap(FrozenMap<@Nullable Object> data) implements Schema02Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema02 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema02BoxedList>, MapSchemaValidator, Schema02BoxedMap> { - private static @Nullable Schema02 instance = null; - - protected Schema02() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Schema02 getInstance() { - if (instance == null) { - instance = new Schema02(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema02BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema02BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema02BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema02BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedString(validate(arg, configuration)); - } - @Override - public Schema02BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedList(validate(arg, configuration)); - } - @Override - public Schema02BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema02BoxedMap(validate(arg, configuration)); - } - @Override - public Schema02Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema01Boxed permits Schema01BoxedVoid, Schema01BoxedBoolean, Schema01BoxedNumber, Schema01BoxedString, Schema01BoxedList, Schema01BoxedMap { - @Nullable Object getData(); - } - - public record Schema01BoxedVoid(Void data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema01BoxedBoolean(boolean data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema01BoxedNumber(Number data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema01BoxedString(String data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema01BoxedList(FrozenList<@Nullable Object> data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema01BoxedMap(FrozenMap<@Nullable Object> data) implements Schema01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema01 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema01BoxedList>, MapSchemaValidator, Schema01BoxedMap> { - private static @Nullable Schema01 instance = null; - - protected Schema01() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("3")) - ); - } - - public static Schema01 getInstance() { - if (instance == null) { - instance = new Schema01(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema01BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema01BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema01BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema01BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedString(validate(arg, configuration)); - } - @Override - public Schema01BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedList(validate(arg, configuration)); - } - @Override - public Schema01BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema01BoxedMap(validate(arg, configuration)); - } - @Override - public Schema01Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("5")) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface AllofCombinedWithAnyofOneof1Boxed permits AllofCombinedWithAnyofOneof1BoxedVoid, AllofCombinedWithAnyofOneof1BoxedBoolean, AllofCombinedWithAnyofOneof1BoxedNumber, AllofCombinedWithAnyofOneof1BoxedString, AllofCombinedWithAnyofOneof1BoxedList, AllofCombinedWithAnyofOneof1BoxedMap { - @Nullable Object getData(); - } - - public record AllofCombinedWithAnyofOneof1BoxedVoid(Void data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofCombinedWithAnyofOneof1BoxedBoolean(boolean data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofCombinedWithAnyofOneof1BoxedNumber(Number data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofCombinedWithAnyofOneof1BoxedString(String data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofCombinedWithAnyofOneof1BoxedList(FrozenList<@Nullable Object> data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofCombinedWithAnyofOneof1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofCombinedWithAnyofOneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofCombinedWithAnyofOneof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofCombinedWithAnyofOneof1BoxedList>, MapSchemaValidator, AllofCombinedWithAnyofOneof1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofCombinedWithAnyofOneof1 instance = null; - - protected AllofCombinedWithAnyofOneof1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema02.class - )) - .anyOf(List.of( - Schema01.class - )) - .oneOf(List.of( - Schema0.class - )) - ); - } - - public static AllofCombinedWithAnyofOneof1 getInstance() { - if (instance == null) { - instance = new AllofCombinedWithAnyofOneof1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedString(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedList(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofCombinedWithAnyofOneof1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofCombinedWithAnyofOneof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java deleted file mode 100644 index cccee81abec..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofSimpleTypes.java +++ /dev/null @@ -1,900 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofSimpleTypes { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .maximum(30) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .minimum(20) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface AllofSimpleTypes1Boxed permits AllofSimpleTypes1BoxedVoid, AllofSimpleTypes1BoxedBoolean, AllofSimpleTypes1BoxedNumber, AllofSimpleTypes1BoxedString, AllofSimpleTypes1BoxedList, AllofSimpleTypes1BoxedMap { - @Nullable Object getData(); - } - - public record AllofSimpleTypes1BoxedVoid(Void data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofSimpleTypes1BoxedBoolean(boolean data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofSimpleTypes1BoxedNumber(Number data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofSimpleTypes1BoxedString(String data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofSimpleTypes1BoxedList(FrozenList<@Nullable Object> data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofSimpleTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofSimpleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofSimpleTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofSimpleTypes1BoxedList>, MapSchemaValidator, AllofSimpleTypes1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofSimpleTypes1 instance = null; - - protected AllofSimpleTypes1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AllofSimpleTypes1 getInstance() { - if (instance == null) { - instance = new AllofSimpleTypes1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofSimpleTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedString(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedList(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofSimpleTypes1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofSimpleTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java deleted file mode 100644 index cf3e347145a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithBaseSchema.java +++ /dev/null @@ -1,1192 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofWithBaseSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public String foo() { - @Nullable Object value = get("foo"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema0MapBuilder implements SetterForFoo { - private final Map instance; - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterFoo(Map instance) { - return new Schema0Map0Builder(instance); - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .required(Set.of( - "foo" - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Baz extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Baz instance = null; - public static Baz getInstance() { - if (instance == null) { - instance = new Baz(); - } - return instance; - } - } - - - public static class Schema1Map extends FrozenMap<@Nullable Object> { - protected Schema1Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "baz" - ); - public static final Set optionalKeys = Set.of(); - public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema1.getInstance().validate(arg, configuration); - } - - public Void baz() { - @Nullable Object value = get("baz"); - if (!(value == null || value instanceof Void)) { - throw new RuntimeException("Invalid value stored for baz"); - } - return (Void) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBaz { - Map getInstance(); - T getBuilderAfterBaz(Map instance); - - default T baz(Void value) { - var instance = getInstance(); - instance.put("baz", null); - return getBuilderAfterBaz(instance); - } - } - - public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "baz" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema1Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema1MapBuilder implements SetterForBaz { - private final Map instance; - public Schema1MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterBaz(Map instance) { - return new Schema1Map0Builder(instance); - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("baz", Baz.class) - )) - .required(Set.of( - "baz" - )) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema1Map(castProperties); - } - - public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Bar extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class AllofWithBaseSchemaMap extends FrozenMap<@Nullable Object> { - protected AllofWithBaseSchemaMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar" - ); - public static final Set optionalKeys = Set.of(); - public static AllofWithBaseSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return AllofWithBaseSchema1.getInstance().validate(arg, configuration); - } - - public Number bar() { - @Nullable Object value = get("bar"); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class AllofWithBaseSchemaMap0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public AllofWithBaseSchemaMap0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public AllofWithBaseSchemaMap0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class AllofWithBaseSchemaMapBuilder implements SetterForBar { - private final Map instance; - public AllofWithBaseSchemaMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public AllofWithBaseSchemaMap0Builder getBuilderAfterBar(Map instance) { - return new AllofWithBaseSchemaMap0Builder(instance); - } - } - - - public sealed interface AllofWithBaseSchema1Boxed permits AllofWithBaseSchema1BoxedVoid, AllofWithBaseSchema1BoxedBoolean, AllofWithBaseSchema1BoxedNumber, AllofWithBaseSchema1BoxedString, AllofWithBaseSchema1BoxedList, AllofWithBaseSchema1BoxedMap { - @Nullable Object getData(); - } - - public record AllofWithBaseSchema1BoxedVoid(Void data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithBaseSchema1BoxedBoolean(boolean data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithBaseSchema1BoxedNumber(Number data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithBaseSchema1BoxedString(String data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithBaseSchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithBaseSchema1BoxedMap(AllofWithBaseSchemaMap data) implements AllofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofWithBaseSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithBaseSchema1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofWithBaseSchema1 instance = null; - - protected AllofWithBaseSchema1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "bar" - )) - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AllofWithBaseSchema1 getInstance() { - if (instance == null) { - instance = new AllofWithBaseSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public AllofWithBaseSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new AllofWithBaseSchemaMap(castProperties); - } - - public AllofWithBaseSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofWithBaseSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedString(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedList(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithBaseSchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java deleted file mode 100644 index 05ac64179fa..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithOneEmptySchema.java +++ /dev/null @@ -1,340 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofWithOneEmptySchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface AllofWithOneEmptySchema1Boxed permits AllofWithOneEmptySchema1BoxedVoid, AllofWithOneEmptySchema1BoxedBoolean, AllofWithOneEmptySchema1BoxedNumber, AllofWithOneEmptySchema1BoxedString, AllofWithOneEmptySchema1BoxedList, AllofWithOneEmptySchema1BoxedMap { - @Nullable Object getData(); - } - - public record AllofWithOneEmptySchema1BoxedVoid(Void data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithOneEmptySchema1BoxedBoolean(boolean data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithOneEmptySchema1BoxedNumber(Number data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithOneEmptySchema1BoxedString(String data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithOneEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithOneEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofWithOneEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithOneEmptySchema1BoxedList>, MapSchemaValidator, AllofWithOneEmptySchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofWithOneEmptySchema1 instance = null; - - protected AllofWithOneEmptySchema1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class - )) - ); - } - - public static AllofWithOneEmptySchema1 getInstance() { - if (instance == null) { - instance = new AllofWithOneEmptySchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofWithOneEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedString(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedList(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithOneEmptySchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofWithOneEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java deleted file mode 100644 index 8a53f25875f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchema.java +++ /dev/null @@ -1,352 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofWithTheFirstEmptySchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface AllofWithTheFirstEmptySchema1Boxed permits AllofWithTheFirstEmptySchema1BoxedVoid, AllofWithTheFirstEmptySchema1BoxedBoolean, AllofWithTheFirstEmptySchema1BoxedNumber, AllofWithTheFirstEmptySchema1BoxedString, AllofWithTheFirstEmptySchema1BoxedList, AllofWithTheFirstEmptySchema1BoxedMap { - @Nullable Object getData(); - } - - public record AllofWithTheFirstEmptySchema1BoxedVoid(Void data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheFirstEmptySchema1BoxedBoolean(boolean data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheFirstEmptySchema1BoxedNumber(Number data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheFirstEmptySchema1BoxedString(String data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheFirstEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheFirstEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTheFirstEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofWithTheFirstEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTheFirstEmptySchema1BoxedList>, MapSchemaValidator, AllofWithTheFirstEmptySchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofWithTheFirstEmptySchema1 instance = null; - - protected AllofWithTheFirstEmptySchema1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AllofWithTheFirstEmptySchema1 getInstance() { - if (instance == null) { - instance = new AllofWithTheFirstEmptySchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedString(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedList(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheFirstEmptySchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofWithTheFirstEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java deleted file mode 100644 index 4c077c7d902..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchema.java +++ /dev/null @@ -1,352 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofWithTheLastEmptySchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface AllofWithTheLastEmptySchema1Boxed permits AllofWithTheLastEmptySchema1BoxedVoid, AllofWithTheLastEmptySchema1BoxedBoolean, AllofWithTheLastEmptySchema1BoxedNumber, AllofWithTheLastEmptySchema1BoxedString, AllofWithTheLastEmptySchema1BoxedList, AllofWithTheLastEmptySchema1BoxedMap { - @Nullable Object getData(); - } - - public record AllofWithTheLastEmptySchema1BoxedVoid(Void data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheLastEmptySchema1BoxedBoolean(boolean data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheLastEmptySchema1BoxedNumber(Number data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheLastEmptySchema1BoxedString(String data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheLastEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTheLastEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTheLastEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofWithTheLastEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTheLastEmptySchema1BoxedList>, MapSchemaValidator, AllofWithTheLastEmptySchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofWithTheLastEmptySchema1 instance = null; - - protected AllofWithTheLastEmptySchema1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AllofWithTheLastEmptySchema1 getInstance() { - if (instance == null) { - instance = new AllofWithTheLastEmptySchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofWithTheLastEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedString(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedList(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTheLastEmptySchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofWithTheLastEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java deleted file mode 100644 index 44032baf2de..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemas.java +++ /dev/null @@ -1,352 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AllofWithTwoEmptySchemas { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface AllofWithTwoEmptySchemas1Boxed permits AllofWithTwoEmptySchemas1BoxedVoid, AllofWithTwoEmptySchemas1BoxedBoolean, AllofWithTwoEmptySchemas1BoxedNumber, AllofWithTwoEmptySchemas1BoxedString, AllofWithTwoEmptySchemas1BoxedList, AllofWithTwoEmptySchemas1BoxedMap { - @Nullable Object getData(); - } - - public record AllofWithTwoEmptySchemas1BoxedVoid(Void data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTwoEmptySchemas1BoxedBoolean(boolean data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTwoEmptySchemas1BoxedNumber(Number data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTwoEmptySchemas1BoxedString(String data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTwoEmptySchemas1BoxedList(FrozenList<@Nullable Object> data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AllofWithTwoEmptySchemas1BoxedMap(FrozenMap<@Nullable Object> data) implements AllofWithTwoEmptySchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AllofWithTwoEmptySchemas1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AllofWithTwoEmptySchemas1BoxedList>, MapSchemaValidator, AllofWithTwoEmptySchemas1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AllofWithTwoEmptySchemas1 instance = null; - - protected AllofWithTwoEmptySchemas1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AllofWithTwoEmptySchemas1 getInstance() { - if (instance == null) { - instance = new AllofWithTwoEmptySchemas1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AllofWithTwoEmptySchemas1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedVoid(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedNumber(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedString(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedList(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AllofWithTwoEmptySchemas1BoxedMap(validate(arg, configuration)); - } - @Override - public AllofWithTwoEmptySchemas1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java deleted file mode 100644 index cb359083622..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Anyof.java +++ /dev/null @@ -1,626 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Anyof { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .minimum(2) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Anyof1Boxed permits Anyof1BoxedVoid, Anyof1BoxedBoolean, Anyof1BoxedNumber, Anyof1BoxedString, Anyof1BoxedList, Anyof1BoxedMap { - @Nullable Object getData(); - } - - public record Anyof1BoxedVoid(Void data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Anyof1BoxedBoolean(boolean data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Anyof1BoxedNumber(Number data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Anyof1BoxedString(String data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Anyof1BoxedList(FrozenList<@Nullable Object> data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Anyof1BoxedMap(FrozenMap<@Nullable Object> data) implements Anyof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Anyof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Anyof1BoxedList>, MapSchemaValidator, Anyof1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Anyof1 instance = null; - - protected Anyof1() { - super(new JsonSchemaInfo() - .anyOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static Anyof1 getInstance() { - if (instance == null) { - instance = new Anyof1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Anyof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedVoid(validate(arg, configuration)); - } - @Override - public Anyof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Anyof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedNumber(validate(arg, configuration)); - } - @Override - public Anyof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedString(validate(arg, configuration)); - } - @Override - public Anyof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedList(validate(arg, configuration)); - } - @Override - public Anyof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Anyof1BoxedMap(validate(arg, configuration)); - } - @Override - public Anyof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java deleted file mode 100644 index 1d13e88fe38..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofComplexTypes.java +++ /dev/null @@ -1,1098 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AnyofComplexTypes { - // nest classes so all schemas and input/output classes can be public - - - public static class Bar extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar" - ); - public static final Set optionalKeys = Set.of(); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public Number bar() { - @Nullable Object value = get("bar"); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema0MapBuilder implements SetterForBar { - private final Map instance; - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterBar(Map instance) { - return new Schema0Map0Builder(instance); - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "bar" - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Schema1Map extends FrozenMap<@Nullable Object> { - protected Schema1Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema1.getInstance().validate(arg, configuration); - } - - public String foo() { - @Nullable Object value = get("foo"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema1Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema1MapBuilder implements SetterForFoo { - private final Map instance; - public Schema1MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterFoo(Map instance) { - return new Schema1Map0Builder(instance); - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .required(Set.of( - "foo" - )) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema1Map(castProperties); - } - - public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface AnyofComplexTypes1Boxed permits AnyofComplexTypes1BoxedVoid, AnyofComplexTypes1BoxedBoolean, AnyofComplexTypes1BoxedNumber, AnyofComplexTypes1BoxedString, AnyofComplexTypes1BoxedList, AnyofComplexTypes1BoxedMap { - @Nullable Object getData(); - } - - public record AnyofComplexTypes1BoxedVoid(Void data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofComplexTypes1BoxedBoolean(boolean data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofComplexTypes1BoxedNumber(Number data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofComplexTypes1BoxedString(String data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofComplexTypes1BoxedList(FrozenList<@Nullable Object> data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofComplexTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AnyofComplexTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyofComplexTypes1BoxedList>, MapSchemaValidator, AnyofComplexTypes1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AnyofComplexTypes1 instance = null; - - protected AnyofComplexTypes1() { - super(new JsonSchemaInfo() - .anyOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AnyofComplexTypes1 getInstance() { - if (instance == null) { - instance = new AnyofComplexTypes1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AnyofComplexTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedVoid(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedNumber(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedString(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedList(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofComplexTypes1BoxedMap(validate(arg, configuration)); - } - @Override - public AnyofComplexTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java deleted file mode 100644 index eea4bf0ea6d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithBaseSchema.java +++ /dev/null @@ -1,669 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AnyofWithBaseSchema { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .maxLength(2) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .minLength(4) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface AnyofWithBaseSchema1Boxed permits AnyofWithBaseSchema1BoxedString { - @Nullable Object getData(); - } - - public record AnyofWithBaseSchema1BoxedString(String data) implements AnyofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class AnyofWithBaseSchema1 extends JsonSchema implements StringSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AnyofWithBaseSchema1 instance = null; - - protected AnyofWithBaseSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .anyOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AnyofWithBaseSchema1 getInstance() { - if (instance == null) { - instance = new AnyofWithBaseSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AnyofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithBaseSchema1BoxedString(validate(arg, configuration)); - } - @Override - public AnyofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java deleted file mode 100644 index a58887e5c4b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/AnyofWithOneEmptySchema.java +++ /dev/null @@ -1,352 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class AnyofWithOneEmptySchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface AnyofWithOneEmptySchema1Boxed permits AnyofWithOneEmptySchema1BoxedVoid, AnyofWithOneEmptySchema1BoxedBoolean, AnyofWithOneEmptySchema1BoxedNumber, AnyofWithOneEmptySchema1BoxedString, AnyofWithOneEmptySchema1BoxedList, AnyofWithOneEmptySchema1BoxedMap { - @Nullable Object getData(); - } - - public record AnyofWithOneEmptySchema1BoxedVoid(Void data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofWithOneEmptySchema1BoxedBoolean(boolean data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofWithOneEmptySchema1BoxedNumber(Number data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofWithOneEmptySchema1BoxedString(String data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofWithOneEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AnyofWithOneEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyofWithOneEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class AnyofWithOneEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyofWithOneEmptySchema1BoxedList>, MapSchemaValidator, AnyofWithOneEmptySchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable AnyofWithOneEmptySchema1 instance = null; - - protected AnyofWithOneEmptySchema1() { - super(new JsonSchemaInfo() - .anyOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static AnyofWithOneEmptySchema1 getInstance() { - if (instance == null) { - instance = new AnyofWithOneEmptySchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AnyofWithOneEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedString(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedList(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyofWithOneEmptySchema1BoxedMap(validate(arg, configuration)); - } - @Override - public AnyofWithOneEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java deleted file mode 100644 index 0721ab38434..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ArrayTypeMatchesArrays.java +++ /dev/null @@ -1,20 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.ListJsonSchema; -import unit_test_api.schemas.validation.FrozenList; - -public class ArrayTypeMatchesArrays extends ListJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class ArrayTypeMatchesArrays1 extends ListJsonSchema.ListJsonSchema1 { - private static @Nullable ArrayTypeMatchesArrays1 instance = null; - public static ArrayTypeMatchesArrays1 getInstance() { - if (instance == null) { - instance = new ArrayTypeMatchesArrays1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java deleted file mode 100644 index c3c3e9d3a4d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleans.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.BooleanJsonSchema; - -public class BooleanTypeMatchesBooleans extends BooleanJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class BooleanTypeMatchesBooleans1 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable BooleanTypeMatchesBooleans1 instance = null; - public static BooleanTypeMatchesBooleans1 getInstance() { - if (instance == null) { - instance = new BooleanTypeMatchesBooleans1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java deleted file mode 100644 index 45a5b815b99..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByInt.java +++ /dev/null @@ -1,328 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ByInt { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ByInt1Boxed permits ByInt1BoxedVoid, ByInt1BoxedBoolean, ByInt1BoxedNumber, ByInt1BoxedString, ByInt1BoxedList, ByInt1BoxedMap { - @Nullable Object getData(); - } - - public record ByInt1BoxedVoid(Void data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByInt1BoxedBoolean(boolean data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByInt1BoxedNumber(Number data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByInt1BoxedString(String data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByInt1BoxedList(FrozenList<@Nullable Object> data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByInt1BoxedMap(FrozenMap<@Nullable Object> data) implements ByInt1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ByInt1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ByInt1BoxedList>, MapSchemaValidator, ByInt1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ByInt1 instance = null; - - protected ByInt1() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static ByInt1 getInstance() { - if (instance == null) { - instance = new ByInt1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ByInt1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedVoid(validate(arg, configuration)); - } - @Override - public ByInt1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ByInt1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedNumber(validate(arg, configuration)); - } - @Override - public ByInt1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedString(validate(arg, configuration)); - } - @Override - public ByInt1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedList(validate(arg, configuration)); - } - @Override - public ByInt1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ByInt1BoxedMap(validate(arg, configuration)); - } - @Override - public ByInt1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java deleted file mode 100644 index d740e736c23..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ByNumber.java +++ /dev/null @@ -1,328 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ByNumber { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ByNumber1Boxed permits ByNumber1BoxedVoid, ByNumber1BoxedBoolean, ByNumber1BoxedNumber, ByNumber1BoxedString, ByNumber1BoxedList, ByNumber1BoxedMap { - @Nullable Object getData(); - } - - public record ByNumber1BoxedVoid(Void data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByNumber1BoxedBoolean(boolean data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByNumber1BoxedNumber(Number data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByNumber1BoxedString(String data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByNumber1BoxedList(FrozenList<@Nullable Object> data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ByNumber1BoxedMap(FrozenMap<@Nullable Object> data) implements ByNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ByNumber1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ByNumber1BoxedList>, MapSchemaValidator, ByNumber1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ByNumber1 instance = null; - - protected ByNumber1() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("1.5")) - ); - } - - public static ByNumber1 getInstance() { - if (instance == null) { - instance = new ByNumber1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ByNumber1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedVoid(validate(arg, configuration)); - } - @Override - public ByNumber1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ByNumber1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedNumber(validate(arg, configuration)); - } - @Override - public ByNumber1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedString(validate(arg, configuration)); - } - @Override - public ByNumber1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedList(validate(arg, configuration)); - } - @Override - public ByNumber1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ByNumber1BoxedMap(validate(arg, configuration)); - } - @Override - public ByNumber1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java deleted file mode 100644 index e4059dfbec1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/BySmallNumber.java +++ /dev/null @@ -1,328 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class BySmallNumber { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface BySmallNumber1Boxed permits BySmallNumber1BoxedVoid, BySmallNumber1BoxedBoolean, BySmallNumber1BoxedNumber, BySmallNumber1BoxedString, BySmallNumber1BoxedList, BySmallNumber1BoxedMap { - @Nullable Object getData(); - } - - public record BySmallNumber1BoxedVoid(Void data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BySmallNumber1BoxedBoolean(boolean data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BySmallNumber1BoxedNumber(Number data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BySmallNumber1BoxedString(String data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BySmallNumber1BoxedList(FrozenList<@Nullable Object> data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BySmallNumber1BoxedMap(FrozenMap<@Nullable Object> data) implements BySmallNumber1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class BySmallNumber1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, BySmallNumber1BoxedList>, MapSchemaValidator, BySmallNumber1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable BySmallNumber1 instance = null; - - protected BySmallNumber1() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("0.00010")) - ); - } - - public static BySmallNumber1 getInstance() { - if (instance == null) { - instance = new BySmallNumber1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public BySmallNumber1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedVoid(validate(arg, configuration)); - } - @Override - public BySmallNumber1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedBoolean(validate(arg, configuration)); - } - @Override - public BySmallNumber1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedNumber(validate(arg, configuration)); - } - @Override - public BySmallNumber1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedString(validate(arg, configuration)); - } - @Override - public BySmallNumber1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedList(validate(arg, configuration)); - } - @Override - public BySmallNumber1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new BySmallNumber1BoxedMap(validate(arg, configuration)); - } - @Override - public BySmallNumber1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java deleted file mode 100644 index 4ab141a836b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ConstNulCharactersInStrings.java +++ /dev/null @@ -1,341 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ConstNulCharactersInStrings { - // nest classes so all schemas and input/output classes can be public - - public enum StringConstNulCharactersInStringsConst implements StringValueMethod { - HELLO_NULL_THERE("hello\0there"); - private final String value; - - StringConstNulCharactersInStringsConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface ConstNulCharactersInStrings1Boxed permits ConstNulCharactersInStrings1BoxedVoid, ConstNulCharactersInStrings1BoxedBoolean, ConstNulCharactersInStrings1BoxedNumber, ConstNulCharactersInStrings1BoxedString, ConstNulCharactersInStrings1BoxedList, ConstNulCharactersInStrings1BoxedMap { - @Nullable Object getData(); - } - - public record ConstNulCharactersInStrings1BoxedVoid(Void data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ConstNulCharactersInStrings1BoxedBoolean(boolean data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ConstNulCharactersInStrings1BoxedNumber(Number data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ConstNulCharactersInStrings1BoxedString(String data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ConstNulCharactersInStrings1BoxedList(FrozenList<@Nullable Object> data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ConstNulCharactersInStrings1BoxedMap(FrozenMap<@Nullable Object> data) implements ConstNulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ConstNulCharactersInStrings1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ConstNulCharactersInStrings1BoxedList>, MapSchemaValidator, ConstNulCharactersInStrings1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ConstNulCharactersInStrings1 instance = null; - - protected ConstNulCharactersInStrings1() { - super(new JsonSchemaInfo() - .constValue("hello\0there") - ); - } - - public static ConstNulCharactersInStrings1 getInstance() { - if (instance == null) { - instance = new ConstNulCharactersInStrings1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ConstNulCharactersInStrings1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedVoid(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedNumber(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedString(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedList(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ConstNulCharactersInStrings1BoxedMap(validate(arg, configuration)); - } - @Override - public ConstNulCharactersInStrings1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java deleted file mode 100644 index 34efb44fa10..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsKeywordValidation.java +++ /dev/null @@ -1,612 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ContainsKeywordValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { - @Nullable Object getData(); - } - - public record ContainsBoxedVoid(Void data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedNumber(Number data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedString(String data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { - private static @Nullable Contains instance = null; - - protected Contains() { - super(new JsonSchemaInfo() - .minimum(5) - ); - } - - public static Contains getInstance() { - if (instance == null) { - instance = new Contains(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedVoid(validate(arg, configuration)); - } - @Override - public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedBoolean(validate(arg, configuration)); - } - @Override - public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedNumber(validate(arg, configuration)); - } - @Override - public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedString(validate(arg, configuration)); - } - @Override - public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedList(validate(arg, configuration)); - } - @Override - public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedMap(validate(arg, configuration)); - } - @Override - public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ContainsKeywordValidation1Boxed permits ContainsKeywordValidation1BoxedVoid, ContainsKeywordValidation1BoxedBoolean, ContainsKeywordValidation1BoxedNumber, ContainsKeywordValidation1BoxedString, ContainsKeywordValidation1BoxedList, ContainsKeywordValidation1BoxedMap { - @Nullable Object getData(); - } - - public record ContainsKeywordValidation1BoxedVoid(Void data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsKeywordValidation1BoxedBoolean(boolean data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsKeywordValidation1BoxedNumber(Number data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsKeywordValidation1BoxedString(String data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsKeywordValidation1BoxedList(FrozenList<@Nullable Object> data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsKeywordValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ContainsKeywordValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ContainsKeywordValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsKeywordValidation1BoxedList>, MapSchemaValidator, ContainsKeywordValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ContainsKeywordValidation1 instance = null; - - protected ContainsKeywordValidation1() { - super(new JsonSchemaInfo() - .contains(Contains.class) - ); - } - - public static ContainsKeywordValidation1 getInstance() { - if (instance == null) { - instance = new ContainsKeywordValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ContainsKeywordValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedString(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedList(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsKeywordValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public ContainsKeywordValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java deleted file mode 100644 index 94656644bf4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ContainsWithNullInstanceElements.java +++ /dev/null @@ -1,339 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ContainsWithNullInstanceElements { - // nest classes so all schemas and input/output classes can be public - - - public static class Contains extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Contains instance = null; - public static Contains getInstance() { - if (instance == null) { - instance = new Contains(); - } - return instance; - } - } - - - public sealed interface ContainsWithNullInstanceElements1Boxed permits ContainsWithNullInstanceElements1BoxedVoid, ContainsWithNullInstanceElements1BoxedBoolean, ContainsWithNullInstanceElements1BoxedNumber, ContainsWithNullInstanceElements1BoxedString, ContainsWithNullInstanceElements1BoxedList, ContainsWithNullInstanceElements1BoxedMap { - @Nullable Object getData(); - } - - public record ContainsWithNullInstanceElements1BoxedVoid(Void data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsWithNullInstanceElements1BoxedBoolean(boolean data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsWithNullInstanceElements1BoxedNumber(Number data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsWithNullInstanceElements1BoxedString(String data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsWithNullInstanceElements1BoxedList(FrozenList<@Nullable Object> data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements ContainsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ContainsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsWithNullInstanceElements1BoxedList>, MapSchemaValidator, ContainsWithNullInstanceElements1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ContainsWithNullInstanceElements1 instance = null; - - protected ContainsWithNullInstanceElements1() { - super(new JsonSchemaInfo() - .contains(Contains.class) - ); - } - - public static ContainsWithNullInstanceElements1 getInstance() { - if (instance == null) { - instance = new ContainsWithNullInstanceElements1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ContainsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedString(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedList(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); - } - @Override - public ContainsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java deleted file mode 100644 index 7b2e395efbb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DateFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface DateFormat1Boxed permits DateFormat1BoxedVoid, DateFormat1BoxedBoolean, DateFormat1BoxedNumber, DateFormat1BoxedString, DateFormat1BoxedList, DateFormat1BoxedMap { - @Nullable Object getData(); - } - - public record DateFormat1BoxedVoid(Void data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateFormat1BoxedBoolean(boolean data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateFormat1BoxedNumber(Number data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateFormat1BoxedString(String data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateFormat1BoxedList(FrozenList<@Nullable Object> data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DateFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DateFormat1BoxedList>, MapSchemaValidator, DateFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DateFormat1 instance = null; - - protected DateFormat1() { - super(new JsonSchemaInfo() - .format("date") - ); - } - - public static DateFormat1 getInstance() { - if (instance == null) { - instance = new DateFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DateFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public DateFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DateFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public DateFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedString(validate(arg, configuration)); - } - @Override - public DateFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedList(validate(arg, configuration)); - } - @Override - public DateFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DateFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public DateFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java deleted file mode 100644 index 06d9e36ce0b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DateTimeFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DateTimeFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface DateTimeFormat1Boxed permits DateTimeFormat1BoxedVoid, DateTimeFormat1BoxedBoolean, DateTimeFormat1BoxedNumber, DateTimeFormat1BoxedString, DateTimeFormat1BoxedList, DateTimeFormat1BoxedMap { - @Nullable Object getData(); - } - - public record DateTimeFormat1BoxedVoid(Void data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateTimeFormat1BoxedBoolean(boolean data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateTimeFormat1BoxedNumber(Number data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateTimeFormat1BoxedString(String data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateTimeFormat1BoxedList(FrozenList<@Nullable Object> data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DateTimeFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DateTimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DateTimeFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DateTimeFormat1BoxedList>, MapSchemaValidator, DateTimeFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DateTimeFormat1 instance = null; - - protected DateTimeFormat1() { - super(new JsonSchemaInfo() - .format("date-time") - ); - } - - public static DateTimeFormat1 getInstance() { - if (instance == null) { - instance = new DateTimeFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DateTimeFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public DateTimeFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DateTimeFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public DateTimeFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedString(validate(arg, configuration)); - } - @Override - public DateTimeFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedList(validate(arg, configuration)); - } - @Override - public DateTimeFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public DateTimeFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java deleted file mode 100644 index ac7c584bbe9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharacters.java +++ /dev/null @@ -1,1018 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DependentSchemasDependenciesWithEscapedCharacters { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface FootbarBoxed permits FootbarBoxedVoid, FootbarBoxedBoolean, FootbarBoxedNumber, FootbarBoxedString, FootbarBoxedList, FootbarBoxedMap { - @Nullable Object getData(); - } - - public record FootbarBoxedVoid(Void data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FootbarBoxedBoolean(boolean data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FootbarBoxedNumber(Number data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FootbarBoxedString(String data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FootbarBoxedList(FrozenList<@Nullable Object> data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FootbarBoxedMap(FrozenMap<@Nullable Object> data) implements FootbarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Footbar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FootbarBoxedList>, MapSchemaValidator, FootbarBoxedMap> { - private static @Nullable Footbar instance = null; - - protected Footbar() { - super(new JsonSchemaInfo() - .minProperties(4) - ); - } - - public static Footbar getInstance() { - if (instance == null) { - instance = new Footbar(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FootbarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedVoid(validate(arg, configuration)); - } - @Override - public FootbarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedBoolean(validate(arg, configuration)); - } - @Override - public FootbarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedNumber(validate(arg, configuration)); - } - @Override - public FootbarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedString(validate(arg, configuration)); - } - @Override - public FootbarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedList(validate(arg, configuration)); - } - @Override - public FootbarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FootbarBoxedMap(validate(arg, configuration)); - } - @Override - public FootbarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class FoobarMap extends FrozenMap<@Nullable Object> { - protected FoobarMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo\"bar" - ); - public static final Set optionalKeys = Set.of(); - public static FoobarMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Foobar.getInstance().validate(arg, configuration); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoobar1 { - Map getInstance(); - T getBuilderAfterFoobar1(Map instance); - - default T fooReverseSolidusQuotationMarkBar(Void value) { - var instance = getInstance(); - instance.put("foo\"bar", null); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(boolean value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(String value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(int value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(float value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(long value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(double value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(List value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusQuotationMarkBar(Map value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar1(instance); - } - } - - public static class FoobarMap0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo\"bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public FoobarMap0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public FoobarMap0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class FoobarMapBuilder implements SetterForFoobar1 { - private final Map instance; - public FoobarMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public FoobarMap0Builder getBuilderAfterFoobar1(Map instance) { - return new FoobarMap0Builder(instance); - } - } - - - public sealed interface FoobarBoxed permits FoobarBoxedVoid, FoobarBoxedBoolean, FoobarBoxedNumber, FoobarBoxedString, FoobarBoxedList, FoobarBoxedMap { - @Nullable Object getData(); - } - - public record FoobarBoxedVoid(Void data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoobarBoxedBoolean(boolean data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoobarBoxedNumber(Number data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoobarBoxedString(String data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoobarBoxedList(FrozenList<@Nullable Object> data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoobarBoxedMap(FoobarMap data) implements FoobarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Foobar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FoobarBoxedList>, MapSchemaValidator { - private static @Nullable Foobar instance = null; - - protected Foobar() { - super(new JsonSchemaInfo() - .required(Set.of( - "foo\"bar" - )) - ); - } - - public static Foobar getInstance() { - if (instance == null) { - instance = new Foobar(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FoobarMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new FoobarMap(castProperties); - } - - public FoobarMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FoobarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedVoid(validate(arg, configuration)); - } - @Override - public FoobarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedBoolean(validate(arg, configuration)); - } - @Override - public FoobarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedNumber(validate(arg, configuration)); - } - @Override - public FoobarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedString(validate(arg, configuration)); - } - @Override - public FoobarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedList(validate(arg, configuration)); - } - @Override - public FoobarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FoobarBoxedMap(validate(arg, configuration)); - } - @Override - public FoobarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface DependentSchemasDependenciesWithEscapedCharacters1Boxed permits DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid, DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean, DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber, DependentSchemasDependenciesWithEscapedCharacters1BoxedString, DependentSchemasDependenciesWithEscapedCharacters1BoxedList, DependentSchemasDependenciesWithEscapedCharacters1BoxedMap { - @Nullable Object getData(); - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid(Void data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean(boolean data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber(Number data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedString(String data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependenciesWithEscapedCharacters1BoxedMap(FrozenMap<@Nullable Object> data) implements DependentSchemasDependenciesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DependentSchemasDependenciesWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasDependenciesWithEscapedCharacters1BoxedList>, MapSchemaValidator, DependentSchemasDependenciesWithEscapedCharacters1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DependentSchemasDependenciesWithEscapedCharacters1 instance = null; - - protected DependentSchemasDependenciesWithEscapedCharacters1() { - super(new JsonSchemaInfo() - .dependentSchemas(Map.ofEntries( - new PropertyEntry("foo\tbar", Footbar.class), - new PropertyEntry("foo'bar", Foobar.class) - )) - ); - } - - public static DependentSchemasDependenciesWithEscapedCharacters1 getInstance() { - if (instance == null) { - instance = new DependentSchemasDependenciesWithEscapedCharacters1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedString(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedList(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependenciesWithEscapedCharacters1BoxedMap(validate(arg, configuration)); - } - @Override - public DependentSchemasDependenciesWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java deleted file mode 100644 index a1ac2622688..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRoot.java +++ /dev/null @@ -1,672 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NotAnyTypeJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DependentSchemasDependentSubschemaIncompatibleWithRoot { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { - // NotAnyTypeSchema - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class FooMap extends FrozenMap<@Nullable Object> { - protected FooMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "bar" - ); - public static FooMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Foo1.getInstance().validate(arg, configuration); - } - - public @Nullable Object bar() throws UnsetPropertyException { - return getOrThrow("bar"); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(Void value) { - var instance = getInstance(); - instance.put("bar", null); - return getBuilderAfterBar(instance); - } - - default T bar(boolean value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(List value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(Map value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class FooMapBuilder1 implements GenericBuilder>, SetterForBar { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public FooMapBuilder1() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public FooMapBuilder1 getBuilderAfterBar(Map instance) { - return this; - } - } - - - public sealed interface Foo1Boxed permits Foo1BoxedMap { - @Nullable Object getData(); - } - - public record Foo1BoxedMap(FooMap data) implements Foo1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Foo1 extends JsonSchema implements MapSchemaValidator { - private static @Nullable Foo1 instance = null; - - protected Foo1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - .additionalProperties(AdditionalProperties.class) - ); - } - - public static Foo1 getInstance() { - if (instance == null) { - instance = new Foo1(); - } - return instance; - } - - public FooMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new FooMap(castProperties); - } - - public FooMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Foo1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Foo1BoxedMap(validate(arg, configuration)); - } - @Override - public Foo1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class DependentSchemasDependentSubschemaIncompatibleWithRootMap extends FrozenMap<@Nullable Object> { - protected DependentSchemasDependentSubschemaIncompatibleWithRootMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static DependentSchemasDependentSubschemaIncompatibleWithRootMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public DependentSchemasDependentSubschemaIncompatibleWithRootMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed permits DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap { - @Nullable Object getData(); - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid(Void data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean(boolean data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber(Number data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString(String data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap(DependentSchemasDependentSubschemaIncompatibleWithRootMap data) implements DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DependentSchemasDependentSubschemaIncompatibleWithRoot1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DependentSchemasDependentSubschemaIncompatibleWithRoot1 instance = null; - - protected DependentSchemasDependentSubschemaIncompatibleWithRoot1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .dependentSchemas(Map.ofEntries( - new PropertyEntry("foo", Foo1.class) - )) - ); - } - - public static DependentSchemasDependentSubschemaIncompatibleWithRoot1 getInstance() { - if (instance == null) { - instance = new DependentSchemasDependentSubschemaIncompatibleWithRoot1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRootMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new DependentSchemasDependentSubschemaIncompatibleWithRootMap(castProperties); - } - - public DependentSchemasDependentSubschemaIncompatibleWithRootMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedVoid(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedNumber(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedString(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedList(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasDependentSubschemaIncompatibleWithRoot1BoxedMap(validate(arg, configuration)); - } - @Override - public DependentSchemasDependentSubschemaIncompatibleWithRoot1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java deleted file mode 100644 index 243b1117529..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DependentSchemasSingleDependency.java +++ /dev/null @@ -1,770 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DependentSchemasSingleDependency { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Bar1 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Bar1 instance = null; - public static Bar1 getInstance() { - if (instance == null) { - instance = new Bar1(); - } - return instance; - } - } - - - public static class BarMap extends FrozenMap<@Nullable Object> { - protected BarMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo", - "bar" - ); - public static BarMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Bar.getInstance().validate(arg, configuration); - } - - public Number foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (Number) value; - } - - public Number bar() throws UnsetPropertyException { - String key = "bar"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar1 { - Map getInstance(); - T getBuilderAfterBar1(Map instance); - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar1(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar1(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar1(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar1(instance); - } - } - - public static class BarMapBuilder1 extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar1 { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public BarMapBuilder1() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public BarMapBuilder1 getBuilderAfterFoo(Map instance) { - return this; - } - public BarMapBuilder1 getBuilderAfterBar1(Map instance) { - return this; - } - public BarMapBuilder1 getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface BarBoxed permits BarBoxedVoid, BarBoxedBoolean, BarBoxedNumber, BarBoxedString, BarBoxedList, BarBoxedMap { - @Nullable Object getData(); - } - - public record BarBoxedVoid(Void data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BarBoxedBoolean(boolean data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BarBoxedNumber(Number data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BarBoxedString(String data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BarBoxedList(FrozenList<@Nullable Object> data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record BarBoxedMap(BarMap data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Bar extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, BarBoxedList>, MapSchemaValidator { - private static @Nullable Bar instance = null; - - protected Bar() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar1.class) - )) - ); - } - - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public BarMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new BarMap(castProperties); - } - - public BarMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public BarBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedVoid(validate(arg, configuration)); - } - @Override - public BarBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedBoolean(validate(arg, configuration)); - } - @Override - public BarBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedNumber(validate(arg, configuration)); - } - @Override - public BarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedString(validate(arg, configuration)); - } - @Override - public BarBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedList(validate(arg, configuration)); - } - @Override - public BarBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedMap(validate(arg, configuration)); - } - @Override - public BarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface DependentSchemasSingleDependency1Boxed permits DependentSchemasSingleDependency1BoxedVoid, DependentSchemasSingleDependency1BoxedBoolean, DependentSchemasSingleDependency1BoxedNumber, DependentSchemasSingleDependency1BoxedString, DependentSchemasSingleDependency1BoxedList, DependentSchemasSingleDependency1BoxedMap { - @Nullable Object getData(); - } - - public record DependentSchemasSingleDependency1BoxedVoid(Void data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasSingleDependency1BoxedBoolean(boolean data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasSingleDependency1BoxedNumber(Number data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasSingleDependency1BoxedString(String data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasSingleDependency1BoxedList(FrozenList<@Nullable Object> data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DependentSchemasSingleDependency1BoxedMap(FrozenMap<@Nullable Object> data) implements DependentSchemasSingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DependentSchemasSingleDependency1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DependentSchemasSingleDependency1BoxedList>, MapSchemaValidator, DependentSchemasSingleDependency1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DependentSchemasSingleDependency1 instance = null; - - protected DependentSchemasSingleDependency1() { - super(new JsonSchemaInfo() - .dependentSchemas(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - ); - } - - public static DependentSchemasSingleDependency1 getInstance() { - if (instance == null) { - instance = new DependentSchemasSingleDependency1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DependentSchemasSingleDependency1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedVoid(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedNumber(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedString(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedList(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DependentSchemasSingleDependency1BoxedMap(validate(arg, configuration)); - } - @Override - public DependentSchemasSingleDependency1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java deleted file mode 100644 index f53210d9a21..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/DurationFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class DurationFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface DurationFormat1Boxed permits DurationFormat1BoxedVoid, DurationFormat1BoxedBoolean, DurationFormat1BoxedNumber, DurationFormat1BoxedString, DurationFormat1BoxedList, DurationFormat1BoxedMap { - @Nullable Object getData(); - } - - public record DurationFormat1BoxedVoid(Void data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DurationFormat1BoxedBoolean(boolean data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DurationFormat1BoxedNumber(Number data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DurationFormat1BoxedString(String data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DurationFormat1BoxedList(FrozenList<@Nullable Object> data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record DurationFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements DurationFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class DurationFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, DurationFormat1BoxedList>, MapSchemaValidator, DurationFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable DurationFormat1 instance = null; - - protected DurationFormat1() { - super(new JsonSchemaInfo() - .format("duration") - ); - } - - public static DurationFormat1 getInstance() { - if (instance == null) { - instance = new DurationFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public DurationFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public DurationFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public DurationFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public DurationFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedString(validate(arg, configuration)); - } - @Override - public DurationFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedList(validate(arg, configuration)); - } - @Override - public DurationFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new DurationFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public DurationFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java deleted file mode 100644 index 50f340981a8..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmailFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EmailFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface EmailFormat1Boxed permits EmailFormat1BoxedVoid, EmailFormat1BoxedBoolean, EmailFormat1BoxedNumber, EmailFormat1BoxedString, EmailFormat1BoxedList, EmailFormat1BoxedMap { - @Nullable Object getData(); - } - - public record EmailFormat1BoxedVoid(Void data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmailFormat1BoxedBoolean(boolean data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmailFormat1BoxedNumber(Number data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmailFormat1BoxedString(String data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmailFormat1BoxedList(FrozenList<@Nullable Object> data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmailFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements EmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class EmailFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, EmailFormat1BoxedList>, MapSchemaValidator, EmailFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EmailFormat1 instance = null; - - protected EmailFormat1() { - super(new JsonSchemaInfo() - .format("email") - ); - } - - public static EmailFormat1 getInstance() { - if (instance == null) { - instance = new EmailFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EmailFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public EmailFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public EmailFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public EmailFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedString(validate(arg, configuration)); - } - @Override - public EmailFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedList(validate(arg, configuration)); - } - @Override - public EmailFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new EmailFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public EmailFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java deleted file mode 100644 index 130cc394a7e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EmptyDependents.java +++ /dev/null @@ -1,336 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EmptyDependents { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface EmptyDependents1Boxed permits EmptyDependents1BoxedVoid, EmptyDependents1BoxedBoolean, EmptyDependents1BoxedNumber, EmptyDependents1BoxedString, EmptyDependents1BoxedList, EmptyDependents1BoxedMap { - @Nullable Object getData(); - } - - public record EmptyDependents1BoxedVoid(Void data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmptyDependents1BoxedBoolean(boolean data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmptyDependents1BoxedNumber(Number data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmptyDependents1BoxedString(String data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmptyDependents1BoxedList(FrozenList<@Nullable Object> data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record EmptyDependents1BoxedMap(FrozenMap<@Nullable Object> data) implements EmptyDependents1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class EmptyDependents1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, EmptyDependents1BoxedList>, MapSchemaValidator, EmptyDependents1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EmptyDependents1 instance = null; - - protected EmptyDependents1() { - super(new JsonSchemaInfo() - .dependentRequired(MapUtils.makeMap( - new AbstractMap.SimpleEntry<>( - "bar", - SetMaker.makeSet( - ) - ) - )) - ); - } - - public static EmptyDependents1 getInstance() { - if (instance == null) { - instance = new EmptyDependents1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EmptyDependents1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedVoid(validate(arg, configuration)); - } - @Override - public EmptyDependents1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedBoolean(validate(arg, configuration)); - } - @Override - public EmptyDependents1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedNumber(validate(arg, configuration)); - } - @Override - public EmptyDependents1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedString(validate(arg, configuration)); - } - @Override - public EmptyDependents1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedList(validate(arg, configuration)); - } - @Override - public EmptyDependents1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new EmptyDependents1BoxedMap(validate(arg, configuration)); - } - @Override - public EmptyDependents1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java deleted file mode 100644 index 6ef97970a39..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalse.java +++ /dev/null @@ -1,195 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.DoubleEnumValidator; -import unit_test_api.schemas.validation.DoubleValueMethod; -import unit_test_api.schemas.validation.FloatEnumValidator; -import unit_test_api.schemas.validation.FloatValueMethod; -import unit_test_api.schemas.validation.IntegerEnumValidator; -import unit_test_api.schemas.validation.IntegerValueMethod; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.LongEnumValidator; -import unit_test_api.schemas.validation.LongValueMethod; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumWith0DoesNotMatchFalse { - // nest classes so all schemas and input/output classes can be public - - public enum IntegerEnumWith0DoesNotMatchFalseEnums implements IntegerValueMethod { - POSITIVE_0(0); - private final int value; - - IntegerEnumWith0DoesNotMatchFalseEnums(int value) { - this.value = value; - } - public int value() { - return this.value; - } - } - - public enum LongEnumWith0DoesNotMatchFalseEnums implements LongValueMethod { - POSITIVE_0(0L); - private final long value; - - LongEnumWith0DoesNotMatchFalseEnums(long value) { - this.value = value; - } - public long value() { - return this.value; - } - } - - public enum FloatEnumWith0DoesNotMatchFalseEnums implements FloatValueMethod { - POSITIVE_0(0.0f); - private final float value; - - FloatEnumWith0DoesNotMatchFalseEnums(float value) { - this.value = value; - } - public float value() { - return this.value; - } - } - - public enum DoubleEnumWith0DoesNotMatchFalseEnums implements DoubleValueMethod { - POSITIVE_0(0.0d); - private final double value; - - DoubleEnumWith0DoesNotMatchFalseEnums(double value) { - this.value = value; - } - public double value() { - return this.value; - } - } - - - public sealed interface EnumWith0DoesNotMatchFalse1Boxed permits EnumWith0DoesNotMatchFalse1BoxedNumber { - @Nullable Object getData(); - } - - public record EnumWith0DoesNotMatchFalse1BoxedNumber(Number data) implements EnumWith0DoesNotMatchFalse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class EnumWith0DoesNotMatchFalse1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumWith0DoesNotMatchFalse1 instance = null; - - protected EnumWith0DoesNotMatchFalse1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .enumValues(SetMaker.makeSet( - new BigDecimal("0") - )) - ); - } - - public static EnumWith0DoesNotMatchFalse1 getInstance() { - if (instance == null) { - instance = new EnumWith0DoesNotMatchFalse1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public int validate(IntegerEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg.value(), configuration); - } - - @Override - public long validate(LongEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg.value(), configuration); - } - - @Override - public float validate(FloatEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg.value(), configuration); - } - - @Override - public double validate(DoubleEnumWith0DoesNotMatchFalseEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumWith0DoesNotMatchFalse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumWith0DoesNotMatchFalse1BoxedNumber(validate(arg, configuration)); - } - @Override - public EnumWith0DoesNotMatchFalse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java deleted file mode 100644 index cf2de6dab3a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrue.java +++ /dev/null @@ -1,195 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.DoubleEnumValidator; -import unit_test_api.schemas.validation.DoubleValueMethod; -import unit_test_api.schemas.validation.FloatEnumValidator; -import unit_test_api.schemas.validation.FloatValueMethod; -import unit_test_api.schemas.validation.IntegerEnumValidator; -import unit_test_api.schemas.validation.IntegerValueMethod; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.LongEnumValidator; -import unit_test_api.schemas.validation.LongValueMethod; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumWith1DoesNotMatchTrue { - // nest classes so all schemas and input/output classes can be public - - public enum IntegerEnumWith1DoesNotMatchTrueEnums implements IntegerValueMethod { - POSITIVE_1(1); - private final int value; - - IntegerEnumWith1DoesNotMatchTrueEnums(int value) { - this.value = value; - } - public int value() { - return this.value; - } - } - - public enum LongEnumWith1DoesNotMatchTrueEnums implements LongValueMethod { - POSITIVE_1(1L); - private final long value; - - LongEnumWith1DoesNotMatchTrueEnums(long value) { - this.value = value; - } - public long value() { - return this.value; - } - } - - public enum FloatEnumWith1DoesNotMatchTrueEnums implements FloatValueMethod { - POSITIVE_1(1.0f); - private final float value; - - FloatEnumWith1DoesNotMatchTrueEnums(float value) { - this.value = value; - } - public float value() { - return this.value; - } - } - - public enum DoubleEnumWith1DoesNotMatchTrueEnums implements DoubleValueMethod { - POSITIVE_1(1.0d); - private final double value; - - DoubleEnumWith1DoesNotMatchTrueEnums(double value) { - this.value = value; - } - public double value() { - return this.value; - } - } - - - public sealed interface EnumWith1DoesNotMatchTrue1Boxed permits EnumWith1DoesNotMatchTrue1BoxedNumber { - @Nullable Object getData(); - } - - public record EnumWith1DoesNotMatchTrue1BoxedNumber(Number data) implements EnumWith1DoesNotMatchTrue1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class EnumWith1DoesNotMatchTrue1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumWith1DoesNotMatchTrue1 instance = null; - - protected EnumWith1DoesNotMatchTrue1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .enumValues(SetMaker.makeSet( - new BigDecimal("1") - )) - ); - } - - public static EnumWith1DoesNotMatchTrue1 getInstance() { - if (instance == null) { - instance = new EnumWith1DoesNotMatchTrue1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public int validate(IntegerEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg.value(), configuration); - } - - @Override - public long validate(LongEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg.value(), configuration); - } - - @Override - public float validate(FloatEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg.value(), configuration); - } - - @Override - public double validate(DoubleEnumWith1DoesNotMatchTrueEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumWith1DoesNotMatchTrue1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumWith1DoesNotMatchTrue1BoxedNumber(validate(arg, configuration)); - } - @Override - public EnumWith1DoesNotMatchTrue1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java deleted file mode 100644 index 4dba24f82c4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithEscapedCharacters.java +++ /dev/null @@ -1,120 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumWithEscapedCharacters { - // nest classes so all schemas and input/output classes can be public - - public enum StringEnumWithEscapedCharactersEnums implements StringValueMethod { - FOO_LINE_FEED_LF_BAR("foo\nbar"), - FOO_CARRIAGE_RETURN_CR_BAR("foo\rbar"); - private final String value; - - StringEnumWithEscapedCharactersEnums(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface EnumWithEscapedCharacters1Boxed permits EnumWithEscapedCharacters1BoxedString { - @Nullable Object getData(); - } - - public record EnumWithEscapedCharacters1BoxedString(String data) implements EnumWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class EnumWithEscapedCharacters1 extends JsonSchema implements StringSchemaValidator, StringEnumValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumWithEscapedCharacters1 instance = null; - - protected EnumWithEscapedCharacters1() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .enumValues(SetMaker.makeSet( - "foo\nbar", - "foo\rbar" - )) - ); - } - - public static EnumWithEscapedCharacters1 getInstance() { - if (instance == null) { - instance = new EnumWithEscapedCharacters1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public String validate(StringEnumWithEscapedCharactersEnums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumWithEscapedCharacters1BoxedString(validate(arg, configuration)); - } - @Override - public EnumWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java deleted file mode 100644 index 8a150ba6bd7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0.java +++ /dev/null @@ -1,119 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.BooleanEnumValidator; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.BooleanValueMethod; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumWithFalseDoesNotMatch0 { - // nest classes so all schemas and input/output classes can be public - - public enum BooleanEnumWithFalseDoesNotMatch0Enums implements BooleanValueMethod { - FALSE(false); - private final boolean value; - - BooleanEnumWithFalseDoesNotMatch0Enums(boolean value) { - this.value = value; - } - public boolean value() { - return this.value; - } - } - - - public sealed interface EnumWithFalseDoesNotMatch01Boxed permits EnumWithFalseDoesNotMatch01BoxedBoolean { - @Nullable Object getData(); - } - - public record EnumWithFalseDoesNotMatch01BoxedBoolean(boolean data) implements EnumWithFalseDoesNotMatch01Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class EnumWithFalseDoesNotMatch01 extends JsonSchema implements BooleanSchemaValidator, BooleanEnumValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumWithFalseDoesNotMatch01 instance = null; - - protected EnumWithFalseDoesNotMatch01() { - super(new JsonSchemaInfo() - .type(Set.of(Boolean.class)) - .enumValues(SetMaker.makeSet( - false - )) - ); - } - - public static EnumWithFalseDoesNotMatch01 getInstance() { - if (instance == null) { - instance = new EnumWithFalseDoesNotMatch01(); - } - return instance; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(BooleanEnumWithFalseDoesNotMatch0Enums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumWithFalseDoesNotMatch01BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumWithFalseDoesNotMatch01BoxedBoolean(validate(arg, configuration)); - } - @Override - public EnumWithFalseDoesNotMatch01Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java deleted file mode 100644 index 4c9dfa693f4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1.java +++ /dev/null @@ -1,119 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.BooleanEnumValidator; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.BooleanValueMethod; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumWithTrueDoesNotMatch1 { - // nest classes so all schemas and input/output classes can be public - - public enum BooleanEnumWithTrueDoesNotMatch1Enums implements BooleanValueMethod { - TRUE(true); - private final boolean value; - - BooleanEnumWithTrueDoesNotMatch1Enums(boolean value) { - this.value = value; - } - public boolean value() { - return this.value; - } - } - - - public sealed interface EnumWithTrueDoesNotMatch11Boxed permits EnumWithTrueDoesNotMatch11BoxedBoolean { - @Nullable Object getData(); - } - - public record EnumWithTrueDoesNotMatch11BoxedBoolean(boolean data) implements EnumWithTrueDoesNotMatch11Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class EnumWithTrueDoesNotMatch11 extends JsonSchema implements BooleanSchemaValidator, BooleanEnumValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumWithTrueDoesNotMatch11 instance = null; - - protected EnumWithTrueDoesNotMatch11() { - super(new JsonSchemaInfo() - .type(Set.of(Boolean.class)) - .enumValues(SetMaker.makeSet( - true - )) - ); - } - - public static EnumWithTrueDoesNotMatch11 getInstance() { - if (instance == null) { - instance = new EnumWithTrueDoesNotMatch11(); - } - return instance; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(BooleanEnumWithTrueDoesNotMatch1Enums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumWithTrueDoesNotMatch11BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumWithTrueDoesNotMatch11BoxedBoolean(validate(arg, configuration)); - } - @Override - public EnumWithTrueDoesNotMatch11Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java deleted file mode 100644 index d17cd9617bf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/EnumsInProperties.java +++ /dev/null @@ -1,427 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class EnumsInProperties { - // nest classes so all schemas and input/output classes can be public - - public enum StringFooEnums implements StringValueMethod { - FOO("foo"); - private final String value; - - StringFooEnums(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface FooBoxed permits FooBoxedString { - @Nullable Object getData(); - } - - public record FooBoxedString(String data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Foo extends JsonSchema implements StringSchemaValidator, StringEnumValidator { - private static @Nullable Foo instance = null; - - protected Foo() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .enumValues(SetMaker.makeSet( - "foo" - )) - ); - } - - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public String validate(StringFooEnums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FooBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedString(validate(arg, configuration)); - } - @Override - public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - public enum StringBarEnums implements StringValueMethod { - BAR("bar"); - private final String value; - - StringBarEnums(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface BarBoxed permits BarBoxedString { - @Nullable Object getData(); - } - - public record BarBoxedString(String data) implements BarBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Bar extends JsonSchema implements StringSchemaValidator, StringEnumValidator { - private static @Nullable Bar instance = null; - - protected Bar() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .enumValues(SetMaker.makeSet( - "bar" - )) - ); - } - - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public String validate(StringBarEnums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public BarBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new BarBoxedString(validate(arg, configuration)); - } - @Override - public BarBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class EnumsInPropertiesMap extends FrozenMap<@Nullable Object> { - protected EnumsInPropertiesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar" - ); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static EnumsInPropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return EnumsInProperties1.getInstance().validate(arg, configuration); - } - - public String bar() { - @Nullable Object value = get("bar"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (String) value; - } - - public String foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(StringBarEnums value) { - var instance = getInstance(); - instance.put("bar", value.value()); - return getBuilderAfterBar(instance); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(StringFooEnums value) { - var instance = getInstance(); - instance.put("foo", value.value()); - return getBuilderAfterFoo(instance); - } - } - - public static class EnumsInPropertiesMap0Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar", - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public EnumsInPropertiesMap0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public EnumsInPropertiesMap0Builder getBuilderAfterFoo(Map instance) { - return this; - } - public EnumsInPropertiesMap0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class EnumsInPropertiesMapBuilder implements SetterForBar { - private final Map instance; - public EnumsInPropertiesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public EnumsInPropertiesMap0Builder getBuilderAfterBar(Map instance) { - return new EnumsInPropertiesMap0Builder(instance); - } - } - - - public sealed interface EnumsInProperties1Boxed permits EnumsInProperties1BoxedMap { - @Nullable Object getData(); - } - - public record EnumsInProperties1BoxedMap(EnumsInPropertiesMap data) implements EnumsInProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class EnumsInProperties1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable EnumsInProperties1 instance = null; - - protected EnumsInProperties1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "bar" - )) - ); - } - - public static EnumsInProperties1 getInstance() { - if (instance == null) { - instance = new EnumsInProperties1(); - } - return instance; - } - - public EnumsInPropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new EnumsInPropertiesMap(castProperties); - } - - public EnumsInPropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public EnumsInProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new EnumsInProperties1BoxedMap(validate(arg, configuration)); - } - @Override - public EnumsInProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java deleted file mode 100644 index 213f0407936..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusivemaximumValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ExclusivemaximumValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ExclusivemaximumValidation1Boxed permits ExclusivemaximumValidation1BoxedVoid, ExclusivemaximumValidation1BoxedBoolean, ExclusivemaximumValidation1BoxedNumber, ExclusivemaximumValidation1BoxedString, ExclusivemaximumValidation1BoxedList, ExclusivemaximumValidation1BoxedMap { - @Nullable Object getData(); - } - - public record ExclusivemaximumValidation1BoxedVoid(Void data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusivemaximumValidation1BoxedBoolean(boolean data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusivemaximumValidation1BoxedNumber(Number data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusivemaximumValidation1BoxedString(String data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusivemaximumValidation1BoxedList(FrozenList<@Nullable Object> data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusivemaximumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ExclusivemaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ExclusivemaximumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ExclusivemaximumValidation1BoxedList>, MapSchemaValidator, ExclusivemaximumValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ExclusivemaximumValidation1 instance = null; - - protected ExclusivemaximumValidation1() { - super(new JsonSchemaInfo() - .exclusiveMaximum(3.0) - ); - } - - public static ExclusivemaximumValidation1 getInstance() { - if (instance == null) { - instance = new ExclusivemaximumValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ExclusivemaximumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedString(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedList(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusivemaximumValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public ExclusivemaximumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java deleted file mode 100644 index d943127b117..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ExclusiveminimumValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ExclusiveminimumValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ExclusiveminimumValidation1Boxed permits ExclusiveminimumValidation1BoxedVoid, ExclusiveminimumValidation1BoxedBoolean, ExclusiveminimumValidation1BoxedNumber, ExclusiveminimumValidation1BoxedString, ExclusiveminimumValidation1BoxedList, ExclusiveminimumValidation1BoxedMap { - @Nullable Object getData(); - } - - public record ExclusiveminimumValidation1BoxedVoid(Void data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusiveminimumValidation1BoxedBoolean(boolean data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusiveminimumValidation1BoxedNumber(Number data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusiveminimumValidation1BoxedString(String data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusiveminimumValidation1BoxedList(FrozenList<@Nullable Object> data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ExclusiveminimumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements ExclusiveminimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ExclusiveminimumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ExclusiveminimumValidation1BoxedList>, MapSchemaValidator, ExclusiveminimumValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ExclusiveminimumValidation1 instance = null; - - protected ExclusiveminimumValidation1() { - super(new JsonSchemaInfo() - .exclusiveMinimum(1.1) - ); - } - - public static ExclusiveminimumValidation1 getInstance() { - if (instance == null) { - instance = new ExclusiveminimumValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ExclusiveminimumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedString(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedList(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ExclusiveminimumValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public ExclusiveminimumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java deleted file mode 100644 index 8890a29029b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/FloatDivisionInf.java +++ /dev/null @@ -1,117 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class FloatDivisionInf { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface FloatDivisionInf1Boxed permits FloatDivisionInf1BoxedNumber { - @Nullable Object getData(); - } - - public record FloatDivisionInf1BoxedNumber(Number data) implements FloatDivisionInf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class FloatDivisionInf1 extends JsonSchema implements NumberSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable FloatDivisionInf1 instance = null; - - protected FloatDivisionInf1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .format("int") - .multipleOf(new BigDecimal("0.123456789")) - ); - } - - public static FloatDivisionInf1 getInstance() { - if (instance == null) { - instance = new FloatDivisionInf1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FloatDivisionInf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatDivisionInf1BoxedNumber(validate(arg, configuration)); - } - @Override - public FloatDivisionInf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java deleted file mode 100644 index edac4ff8637..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ForbiddenProperty.java +++ /dev/null @@ -1,735 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ForbiddenProperty { - // nest classes so all schemas and input/output classes can be public - - - public static class Not extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Not instance = null; - public static Not getInstance() { - if (instance == null) { - instance = new Not(); - } - return instance; - } - } - - - public sealed interface FooBoxed permits FooBoxedVoid, FooBoxedBoolean, FooBoxedNumber, FooBoxedString, FooBoxedList, FooBoxedMap { - @Nullable Object getData(); - } - - public record FooBoxedVoid(Void data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FooBoxedBoolean(boolean data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FooBoxedNumber(Number data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FooBoxedString(String data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FooBoxedList(FrozenList<@Nullable Object> data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FooBoxedMap(FrozenMap<@Nullable Object> data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Foo extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FooBoxedList>, MapSchemaValidator, FooBoxedMap> { - private static @Nullable Foo instance = null; - - protected Foo() { - super(new JsonSchemaInfo() - .not(Not.class) - ); - } - - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FooBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedVoid(validate(arg, configuration)); - } - @Override - public FooBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedBoolean(validate(arg, configuration)); - } - @Override - public FooBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedNumber(validate(arg, configuration)); - } - @Override - public FooBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedString(validate(arg, configuration)); - } - @Override - public FooBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedList(validate(arg, configuration)); - } - @Override - public FooBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedMap(validate(arg, configuration)); - } - @Override - public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ForbiddenPropertyMap extends FrozenMap<@Nullable Object> { - protected ForbiddenPropertyMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static ForbiddenPropertyMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ForbiddenProperty1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class ForbiddenPropertyMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public ForbiddenPropertyMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public ForbiddenPropertyMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public ForbiddenPropertyMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface ForbiddenProperty1Boxed permits ForbiddenProperty1BoxedVoid, ForbiddenProperty1BoxedBoolean, ForbiddenProperty1BoxedNumber, ForbiddenProperty1BoxedString, ForbiddenProperty1BoxedList, ForbiddenProperty1BoxedMap { - @Nullable Object getData(); - } - - public record ForbiddenProperty1BoxedVoid(Void data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ForbiddenProperty1BoxedBoolean(boolean data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ForbiddenProperty1BoxedNumber(Number data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ForbiddenProperty1BoxedString(String data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ForbiddenProperty1BoxedList(FrozenList<@Nullable Object> data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ForbiddenProperty1BoxedMap(ForbiddenPropertyMap data) implements ForbiddenProperty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ForbiddenProperty1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ForbiddenProperty1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ForbiddenProperty1 instance = null; - - protected ForbiddenProperty1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static ForbiddenProperty1 getInstance() { - if (instance == null) { - instance = new ForbiddenProperty1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ForbiddenPropertyMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new ForbiddenPropertyMap(castProperties); - } - - public ForbiddenPropertyMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ForbiddenProperty1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedVoid(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedNumber(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedString(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedList(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ForbiddenProperty1BoxedMap(validate(arg, configuration)); - } - @Override - public ForbiddenProperty1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java deleted file mode 100644 index fec49e585f6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/HostnameFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class HostnameFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface HostnameFormat1Boxed permits HostnameFormat1BoxedVoid, HostnameFormat1BoxedBoolean, HostnameFormat1BoxedNumber, HostnameFormat1BoxedString, HostnameFormat1BoxedList, HostnameFormat1BoxedMap { - @Nullable Object getData(); - } - - public record HostnameFormat1BoxedVoid(Void data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record HostnameFormat1BoxedBoolean(boolean data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record HostnameFormat1BoxedNumber(Number data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record HostnameFormat1BoxedString(String data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record HostnameFormat1BoxedList(FrozenList<@Nullable Object> data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record HostnameFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements HostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class HostnameFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, HostnameFormat1BoxedList>, MapSchemaValidator, HostnameFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable HostnameFormat1 instance = null; - - protected HostnameFormat1() { - super(new JsonSchemaInfo() - .format("hostname") - ); - } - - public static HostnameFormat1 getInstance() { - if (instance == null) { - instance = new HostnameFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public HostnameFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public HostnameFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public HostnameFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public HostnameFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedString(validate(arg, configuration)); - } - @Override - public HostnameFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedList(validate(arg, configuration)); - } - @Override - public HostnameFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new HostnameFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public HostnameFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java deleted file mode 100644 index 3ffec73ebba..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnEmailFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IdnEmailFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IdnEmailFormat1Boxed permits IdnEmailFormat1BoxedVoid, IdnEmailFormat1BoxedBoolean, IdnEmailFormat1BoxedNumber, IdnEmailFormat1BoxedString, IdnEmailFormat1BoxedList, IdnEmailFormat1BoxedMap { - @Nullable Object getData(); - } - - public record IdnEmailFormat1BoxedVoid(Void data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnEmailFormat1BoxedBoolean(boolean data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnEmailFormat1BoxedNumber(Number data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnEmailFormat1BoxedString(String data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnEmailFormat1BoxedList(FrozenList<@Nullable Object> data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnEmailFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IdnEmailFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IdnEmailFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IdnEmailFormat1BoxedList>, MapSchemaValidator, IdnEmailFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IdnEmailFormat1 instance = null; - - protected IdnEmailFormat1() { - super(new JsonSchemaInfo() - .format("idn-email") - ); - } - - public static IdnEmailFormat1 getInstance() { - if (instance == null) { - instance = new IdnEmailFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IdnEmailFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedString(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedList(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnEmailFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public IdnEmailFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java deleted file mode 100644 index 3262408bf70..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IdnHostnameFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IdnHostnameFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IdnHostnameFormat1Boxed permits IdnHostnameFormat1BoxedVoid, IdnHostnameFormat1BoxedBoolean, IdnHostnameFormat1BoxedNumber, IdnHostnameFormat1BoxedString, IdnHostnameFormat1BoxedList, IdnHostnameFormat1BoxedMap { - @Nullable Object getData(); - } - - public record IdnHostnameFormat1BoxedVoid(Void data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnHostnameFormat1BoxedBoolean(boolean data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnHostnameFormat1BoxedNumber(Number data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnHostnameFormat1BoxedString(String data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnHostnameFormat1BoxedList(FrozenList<@Nullable Object> data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IdnHostnameFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IdnHostnameFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IdnHostnameFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IdnHostnameFormat1BoxedList>, MapSchemaValidator, IdnHostnameFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IdnHostnameFormat1 instance = null; - - protected IdnHostnameFormat1() { - super(new JsonSchemaInfo() - .format("idn-hostname") - ); - } - - public static IdnHostnameFormat1 getInstance() { - if (instance == null) { - instance = new IdnHostnameFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IdnHostnameFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedString(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedList(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IdnHostnameFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public IdnHostnameFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java deleted file mode 100644 index ee77c3c67cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndElseWithoutThen.java +++ /dev/null @@ -1,899 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IfAndElseWithoutThen { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { - @Nullable Object getData(); - } - - public record ElseBoxedVoid(Void data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedNumber(Number data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedString(String data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; - - protected Else() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Else getInstance() { - if (instance == null) { - instance = new Else(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); - } - @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); - } - @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); - } - @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); - } - @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); - } - @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); - } - @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .exclusiveMaximum(0) - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfAndElseWithoutThen1Boxed permits IfAndElseWithoutThen1BoxedVoid, IfAndElseWithoutThen1BoxedBoolean, IfAndElseWithoutThen1BoxedNumber, IfAndElseWithoutThen1BoxedString, IfAndElseWithoutThen1BoxedList, IfAndElseWithoutThen1BoxedMap { - @Nullable Object getData(); - } - - public record IfAndElseWithoutThen1BoxedVoid(Void data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndElseWithoutThen1BoxedBoolean(boolean data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndElseWithoutThen1BoxedNumber(Number data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndElseWithoutThen1BoxedString(String data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndElseWithoutThen1BoxedList(FrozenList<@Nullable Object> data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndElseWithoutThen1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAndElseWithoutThen1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IfAndElseWithoutThen1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAndElseWithoutThen1BoxedList>, MapSchemaValidator, IfAndElseWithoutThen1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IfAndElseWithoutThen1 instance = null; - - protected IfAndElseWithoutThen1() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - .elseSchema(Else.class) - ); - } - - public static IfAndElseWithoutThen1 getInstance() { - if (instance == null) { - instance = new IfAndElseWithoutThen1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfAndElseWithoutThen1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedVoid(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedNumber(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedString(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedList(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndElseWithoutThen1BoxedMap(validate(arg, configuration)); - } - @Override - public IfAndElseWithoutThen1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java deleted file mode 100644 index f56754e41d2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAndThenWithoutElse.java +++ /dev/null @@ -1,898 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IfAndThenWithoutElse { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .exclusiveMaximum(0) - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { - @Nullable Object getData(); - } - - public record ThenBoxedVoid(Void data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedBoolean(boolean data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedNumber(Number data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedString(String data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { - private static @Nullable Then instance = null; - - protected Then() { - super(new JsonSchemaInfo() - .minimum(-10) - ); - } - - public static Then getInstance() { - if (instance == null) { - instance = new Then(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedVoid(validate(arg, configuration)); - } - @Override - public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedBoolean(validate(arg, configuration)); - } - @Override - public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedNumber(validate(arg, configuration)); - } - @Override - public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedString(validate(arg, configuration)); - } - @Override - public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedList(validate(arg, configuration)); - } - @Override - public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedMap(validate(arg, configuration)); - } - @Override - public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfAndThenWithoutElse1Boxed permits IfAndThenWithoutElse1BoxedVoid, IfAndThenWithoutElse1BoxedBoolean, IfAndThenWithoutElse1BoxedNumber, IfAndThenWithoutElse1BoxedString, IfAndThenWithoutElse1BoxedList, IfAndThenWithoutElse1BoxedMap { - @Nullable Object getData(); - } - - public record IfAndThenWithoutElse1BoxedVoid(Void data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndThenWithoutElse1BoxedBoolean(boolean data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndThenWithoutElse1BoxedNumber(Number data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndThenWithoutElse1BoxedString(String data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndThenWithoutElse1BoxedList(FrozenList<@Nullable Object> data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAndThenWithoutElse1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAndThenWithoutElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IfAndThenWithoutElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAndThenWithoutElse1BoxedList>, MapSchemaValidator, IfAndThenWithoutElse1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IfAndThenWithoutElse1 instance = null; - - protected IfAndThenWithoutElse1() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - .then(Then.class) - ); - } - - public static IfAndThenWithoutElse1 getInstance() { - if (instance == null) { - instance = new IfAndThenWithoutElse1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfAndThenWithoutElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedVoid(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedNumber(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedString(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedList(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAndThenWithoutElse1BoxedMap(validate(arg, configuration)); - } - @Override - public IfAndThenWithoutElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java deleted file mode 100644 index d3e1225a763..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.java +++ /dev/null @@ -1,1210 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence { - // nest classes so all schemas and input/output classes can be public - - public enum StringElseConst implements StringValueMethod { - OTHER("other"); - private final String value; - - StringElseConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { - @Nullable Object getData(); - } - - public record ElseBoxedVoid(Void data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedNumber(Number data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedString(String data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; - - protected Else() { - super(new JsonSchemaInfo() - .constValue("other") - ); - } - - public static Else getInstance() { - if (instance == null) { - instance = new Else(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); - } - @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); - } - @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); - } - @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); - } - @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); - } - @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); - } - @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .maxLength(4) - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - public enum StringThenConst implements StringValueMethod { - YES("yes"); - private final String value; - - StringThenConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { - @Nullable Object getData(); - } - - public record ThenBoxedVoid(Void data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedBoolean(boolean data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedNumber(Number data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedString(String data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { - private static @Nullable Then instance = null; - - protected Then() { - super(new JsonSchemaInfo() - .constValue("yes") - ); - } - - public static Then getInstance() { - if (instance == null) { - instance = new Then(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedVoid(validate(arg, configuration)); - } - @Override - public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedBoolean(validate(arg, configuration)); - } - @Override - public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedNumber(validate(arg, configuration)); - } - @Override - public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedString(validate(arg, configuration)); - } - @Override - public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedList(validate(arg, configuration)); - } - @Override - public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedMap(validate(arg, configuration)); - } - @Override - public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed permits IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap { - @Nullable Object getData(); - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid(Void data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean(boolean data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber(Number data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString(String data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList(FrozenList<@Nullable Object> data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap(FrozenMap<@Nullable Object> data) implements IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList>, MapSchemaValidator, IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 instance = null; - - protected IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - .then(Then.class) - .elseSchema(Else.class) - ); - } - - public static IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1 getInstance() { - if (instance == null) { - instance = new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedVoid(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedNumber(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedString(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedList(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1BoxedMap(validate(arg, configuration)); - } - @Override - public IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java deleted file mode 100644 index 7076852a42d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreElseWithoutIf.java +++ /dev/null @@ -1,626 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IgnoreElseWithoutIf { - // nest classes so all schemas and input/output classes can be public - - public enum StringElseConst implements StringValueMethod { - POSITIVE_0("0"); - private final String value; - - StringElseConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { - @Nullable Object getData(); - } - - public record ElseBoxedVoid(Void data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedNumber(Number data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedString(String data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; - - protected Else() { - super(new JsonSchemaInfo() - .constValue("0") - ); - } - - public static Else getInstance() { - if (instance == null) { - instance = new Else(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); - } - @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); - } - @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); - } - @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); - } - @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); - } - @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); - } - @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IgnoreElseWithoutIf1Boxed permits IgnoreElseWithoutIf1BoxedVoid, IgnoreElseWithoutIf1BoxedBoolean, IgnoreElseWithoutIf1BoxedNumber, IgnoreElseWithoutIf1BoxedString, IgnoreElseWithoutIf1BoxedList, IgnoreElseWithoutIf1BoxedMap { - @Nullable Object getData(); - } - - public record IgnoreElseWithoutIf1BoxedVoid(Void data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreElseWithoutIf1BoxedBoolean(boolean data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreElseWithoutIf1BoxedNumber(Number data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreElseWithoutIf1BoxedString(String data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreElseWithoutIf1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreElseWithoutIf1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreElseWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IgnoreElseWithoutIf1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreElseWithoutIf1BoxedList>, MapSchemaValidator, IgnoreElseWithoutIf1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IgnoreElseWithoutIf1 instance = null; - - protected IgnoreElseWithoutIf1() { - super(new JsonSchemaInfo() - .elseSchema(Else.class) - ); - } - - public static IgnoreElseWithoutIf1 getInstance() { - if (instance == null) { - instance = new IgnoreElseWithoutIf1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IgnoreElseWithoutIf1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedVoid(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedNumber(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedString(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedList(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreElseWithoutIf1BoxedMap(validate(arg, configuration)); - } - @Override - public IgnoreElseWithoutIf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java deleted file mode 100644 index db3fbbda19a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElse.java +++ /dev/null @@ -1,626 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IgnoreIfWithoutThenOrElse { - // nest classes so all schemas and input/output classes can be public - - public enum StringIfConst implements StringValueMethod { - POSITIVE_0("0"); - private final String value; - - StringIfConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .constValue("0") - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IgnoreIfWithoutThenOrElse1Boxed permits IgnoreIfWithoutThenOrElse1BoxedVoid, IgnoreIfWithoutThenOrElse1BoxedBoolean, IgnoreIfWithoutThenOrElse1BoxedNumber, IgnoreIfWithoutThenOrElse1BoxedString, IgnoreIfWithoutThenOrElse1BoxedList, IgnoreIfWithoutThenOrElse1BoxedMap { - @Nullable Object getData(); - } - - public record IgnoreIfWithoutThenOrElse1BoxedVoid(Void data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreIfWithoutThenOrElse1BoxedBoolean(boolean data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreIfWithoutThenOrElse1BoxedNumber(Number data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreIfWithoutThenOrElse1BoxedString(String data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreIfWithoutThenOrElse1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreIfWithoutThenOrElse1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreIfWithoutThenOrElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IgnoreIfWithoutThenOrElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreIfWithoutThenOrElse1BoxedList>, MapSchemaValidator, IgnoreIfWithoutThenOrElse1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IgnoreIfWithoutThenOrElse1 instance = null; - - protected IgnoreIfWithoutThenOrElse1() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - ); - } - - public static IgnoreIfWithoutThenOrElse1 getInstance() { - if (instance == null) { - instance = new IgnoreIfWithoutThenOrElse1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedVoid(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedNumber(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedString(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedList(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreIfWithoutThenOrElse1BoxedMap(validate(arg, configuration)); - } - @Override - public IgnoreIfWithoutThenOrElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java deleted file mode 100644 index 6570627a0d9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IgnoreThenWithoutIf.java +++ /dev/null @@ -1,626 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IgnoreThenWithoutIf { - // nest classes so all schemas and input/output classes can be public - - public enum StringThenConst implements StringValueMethod { - POSITIVE_0("0"); - private final String value; - - StringThenConst(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { - @Nullable Object getData(); - } - - public record ThenBoxedVoid(Void data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedBoolean(boolean data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedNumber(Number data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedString(String data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { - private static @Nullable Then instance = null; - - protected Then() { - super(new JsonSchemaInfo() - .constValue("0") - ); - } - - public static Then getInstance() { - if (instance == null) { - instance = new Then(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedVoid(validate(arg, configuration)); - } - @Override - public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedBoolean(validate(arg, configuration)); - } - @Override - public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedNumber(validate(arg, configuration)); - } - @Override - public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedString(validate(arg, configuration)); - } - @Override - public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedList(validate(arg, configuration)); - } - @Override - public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedMap(validate(arg, configuration)); - } - @Override - public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IgnoreThenWithoutIf1Boxed permits IgnoreThenWithoutIf1BoxedVoid, IgnoreThenWithoutIf1BoxedBoolean, IgnoreThenWithoutIf1BoxedNumber, IgnoreThenWithoutIf1BoxedString, IgnoreThenWithoutIf1BoxedList, IgnoreThenWithoutIf1BoxedMap { - @Nullable Object getData(); - } - - public record IgnoreThenWithoutIf1BoxedVoid(Void data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreThenWithoutIf1BoxedBoolean(boolean data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreThenWithoutIf1BoxedNumber(Number data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreThenWithoutIf1BoxedString(String data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreThenWithoutIf1BoxedList(FrozenList<@Nullable Object> data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IgnoreThenWithoutIf1BoxedMap(FrozenMap<@Nullable Object> data) implements IgnoreThenWithoutIf1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IgnoreThenWithoutIf1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IgnoreThenWithoutIf1BoxedList>, MapSchemaValidator, IgnoreThenWithoutIf1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IgnoreThenWithoutIf1 instance = null; - - protected IgnoreThenWithoutIf1() { - super(new JsonSchemaInfo() - .then(Then.class) - ); - } - - public static IgnoreThenWithoutIf1 getInstance() { - if (instance == null) { - instance = new IgnoreThenWithoutIf1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IgnoreThenWithoutIf1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedVoid(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedNumber(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedString(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedList(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IgnoreThenWithoutIf1BoxedMap(validate(arg, configuration)); - } - @Override - public IgnoreThenWithoutIf1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java deleted file mode 100644 index 2324dcdaa15..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegers.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.IntJsonSchema; - -public class IntegerTypeMatchesIntegers extends IntJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class IntegerTypeMatchesIntegers1 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable IntegerTypeMatchesIntegers1 instance = null; - public static IntegerTypeMatchesIntegers1 getInstance() { - if (instance == null) { - instance = new IntegerTypeMatchesIntegers1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java deleted file mode 100644 index 50396e59bbb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv4Format.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Ipv4Format { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Ipv4Format1Boxed permits Ipv4Format1BoxedVoid, Ipv4Format1BoxedBoolean, Ipv4Format1BoxedNumber, Ipv4Format1BoxedString, Ipv4Format1BoxedList, Ipv4Format1BoxedMap { - @Nullable Object getData(); - } - - public record Ipv4Format1BoxedVoid(Void data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv4Format1BoxedBoolean(boolean data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv4Format1BoxedNumber(Number data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv4Format1BoxedString(String data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv4Format1BoxedList(FrozenList<@Nullable Object> data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv4Format1BoxedMap(FrozenMap<@Nullable Object> data) implements Ipv4Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Ipv4Format1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Ipv4Format1BoxedList>, MapSchemaValidator, Ipv4Format1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Ipv4Format1 instance = null; - - protected Ipv4Format1() { - super(new JsonSchemaInfo() - .format("ipv4") - ); - } - - public static Ipv4Format1 getInstance() { - if (instance == null) { - instance = new Ipv4Format1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Ipv4Format1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedVoid(validate(arg, configuration)); - } - @Override - public Ipv4Format1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Ipv4Format1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedNumber(validate(arg, configuration)); - } - @Override - public Ipv4Format1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedString(validate(arg, configuration)); - } - @Override - public Ipv4Format1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedList(validate(arg, configuration)); - } - @Override - public Ipv4Format1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv4Format1BoxedMap(validate(arg, configuration)); - } - @Override - public Ipv4Format1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java deleted file mode 100644 index 567cb7c4fa0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Ipv6Format.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Ipv6Format { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Ipv6Format1Boxed permits Ipv6Format1BoxedVoid, Ipv6Format1BoxedBoolean, Ipv6Format1BoxedNumber, Ipv6Format1BoxedString, Ipv6Format1BoxedList, Ipv6Format1BoxedMap { - @Nullable Object getData(); - } - - public record Ipv6Format1BoxedVoid(Void data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv6Format1BoxedBoolean(boolean data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv6Format1BoxedNumber(Number data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv6Format1BoxedString(String data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv6Format1BoxedList(FrozenList<@Nullable Object> data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Ipv6Format1BoxedMap(FrozenMap<@Nullable Object> data) implements Ipv6Format1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Ipv6Format1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Ipv6Format1BoxedList>, MapSchemaValidator, Ipv6Format1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Ipv6Format1 instance = null; - - protected Ipv6Format1() { - super(new JsonSchemaInfo() - .format("ipv6") - ); - } - - public static Ipv6Format1 getInstance() { - if (instance == null) { - instance = new Ipv6Format1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Ipv6Format1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedVoid(validate(arg, configuration)); - } - @Override - public Ipv6Format1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Ipv6Format1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedNumber(validate(arg, configuration)); - } - @Override - public Ipv6Format1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedString(validate(arg, configuration)); - } - @Override - public Ipv6Format1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedList(validate(arg, configuration)); - } - @Override - public Ipv6Format1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Ipv6Format1BoxedMap(validate(arg, configuration)); - } - @Override - public Ipv6Format1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java deleted file mode 100644 index 229f00434d1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IriFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IriFormat1Boxed permits IriFormat1BoxedVoid, IriFormat1BoxedBoolean, IriFormat1BoxedNumber, IriFormat1BoxedString, IriFormat1BoxedList, IriFormat1BoxedMap { - @Nullable Object getData(); - } - - public record IriFormat1BoxedVoid(Void data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriFormat1BoxedBoolean(boolean data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriFormat1BoxedNumber(Number data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriFormat1BoxedString(String data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriFormat1BoxedList(FrozenList<@Nullable Object> data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IriFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IriFormat1BoxedList>, MapSchemaValidator, IriFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IriFormat1 instance = null; - - protected IriFormat1() { - super(new JsonSchemaInfo() - .format("iri") - ); - } - - public static IriFormat1 getInstance() { - if (instance == null) { - instance = new IriFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IriFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public IriFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IriFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public IriFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedString(validate(arg, configuration)); - } - @Override - public IriFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedList(validate(arg, configuration)); - } - @Override - public IriFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IriFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public IriFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java deleted file mode 100644 index 38f7ecb22d3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/IriReferenceFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class IriReferenceFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IriReferenceFormat1Boxed permits IriReferenceFormat1BoxedVoid, IriReferenceFormat1BoxedBoolean, IriReferenceFormat1BoxedNumber, IriReferenceFormat1BoxedString, IriReferenceFormat1BoxedList, IriReferenceFormat1BoxedMap { - @Nullable Object getData(); - } - - public record IriReferenceFormat1BoxedVoid(Void data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriReferenceFormat1BoxedBoolean(boolean data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriReferenceFormat1BoxedNumber(Number data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriReferenceFormat1BoxedString(String data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriReferenceFormat1BoxedList(FrozenList<@Nullable Object> data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IriReferenceFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements IriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class IriReferenceFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IriReferenceFormat1BoxedList>, MapSchemaValidator, IriReferenceFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable IriReferenceFormat1 instance = null; - - protected IriReferenceFormat1() { - super(new JsonSchemaInfo() - .format("iri-reference") - ); - } - - public static IriReferenceFormat1 getInstance() { - if (instance == null) { - instance = new IriReferenceFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IriReferenceFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedString(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedList(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IriReferenceFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public IriReferenceFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java deleted file mode 100644 index 8489e737c6e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsContains.java +++ /dev/null @@ -1,773 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ItemsContains { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { - @Nullable Object getData(); - } - - public record ContainsBoxedVoid(Void data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedNumber(Number data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedString(String data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { - private static @Nullable Contains instance = null; - - protected Contains() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("3")) - ); - } - - public static Contains getInstance() { - if (instance == null) { - instance = new Contains(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedVoid(validate(arg, configuration)); - } - @Override - public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedBoolean(validate(arg, configuration)); - } - @Override - public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedNumber(validate(arg, configuration)); - } - @Override - public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedString(validate(arg, configuration)); - } - @Override - public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedList(validate(arg, configuration)); - } - @Override - public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedMap(validate(arg, configuration)); - } - @Override - public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ItemsBoxed permits ItemsBoxedVoid, ItemsBoxedBoolean, ItemsBoxedNumber, ItemsBoxedString, ItemsBoxedList, ItemsBoxedMap { - @Nullable Object getData(); - } - - public record ItemsBoxedVoid(Void data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedBoolean(boolean data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedNumber(Number data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedString(String data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedList(FrozenList<@Nullable Object> data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedMap(FrozenMap<@Nullable Object> data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Items extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ItemsBoxedList>, MapSchemaValidator, ItemsBoxedMap> { - private static @Nullable Items instance = null; - - protected Items() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedVoid(validate(arg, configuration)); - } - @Override - public ItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedBoolean(validate(arg, configuration)); - } - @Override - public ItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedNumber(validate(arg, configuration)); - } - @Override - public ItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedString(validate(arg, configuration)); - } - @Override - public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedList(validate(arg, configuration)); - } - @Override - public ItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedMap(validate(arg, configuration)); - } - @Override - public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ItemsContainsList extends FrozenList<@Nullable Object> { - protected ItemsContainsList(FrozenList<@Nullable Object> m) { - super(m); - } - public static ItemsContainsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return ItemsContains1.getInstance().validate(arg, configuration); - } - } - - public static class ItemsContainsListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public ItemsContainsListBuilder() { - list = new ArrayList<>(); - } - - public ItemsContainsListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public ItemsContainsListBuilder add(Void item) { - list.add(null); - return this; - } - - public ItemsContainsListBuilder add(boolean item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(String item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(int item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(float item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(long item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(double item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(List item) { - list.add(item); - return this; - } - - public ItemsContainsListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public sealed interface ItemsContains1Boxed permits ItemsContains1BoxedList { - @Nullable Object getData(); - } - - public record ItemsContains1BoxedList(ItemsContainsList data) implements ItemsContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class ItemsContains1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ItemsContains1 instance = null; - - protected ItemsContains1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - .contains(Contains.class) - ); - } - - public static ItemsContains1 getInstance() { - if (instance == null) { - instance = new ItemsContains1(); - } - return instance; - } - - @Override - public ItemsContainsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new ItemsContainsList(newInstanceItems); - } - - public ItemsContainsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsContains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsContains1BoxedList(validate(arg, configuration)); - } - @Override - public ItemsContains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java deleted file mode 100644 index a1adb609297..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCase.java +++ /dev/null @@ -1,486 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ItemsDoesNotLookInApplicatorsValidCase { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ItemsBoxed permits ItemsBoxedVoid, ItemsBoxedBoolean, ItemsBoxedNumber, ItemsBoxedString, ItemsBoxedList, ItemsBoxedMap { - @Nullable Object getData(); - } - - public record ItemsBoxedVoid(Void data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedBoolean(boolean data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedNumber(Number data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedString(String data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedList(FrozenList<@Nullable Object> data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ItemsBoxedMap(FrozenMap<@Nullable Object> data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Items extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ItemsBoxedList>, MapSchemaValidator, ItemsBoxedMap> { - private static @Nullable Items instance = null; - - protected Items() { - super(new JsonSchemaInfo() - .minimum(5) - ); - } - - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedVoid(validate(arg, configuration)); - } - @Override - public ItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedBoolean(validate(arg, configuration)); - } - @Override - public ItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedNumber(validate(arg, configuration)); - } - @Override - public ItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedString(validate(arg, configuration)); - } - @Override - public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedList(validate(arg, configuration)); - } - @Override - public ItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedMap(validate(arg, configuration)); - } - @Override - public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ItemsDoesNotLookInApplicatorsValidCaseList extends FrozenList<@Nullable Object> { - protected ItemsDoesNotLookInApplicatorsValidCaseList(FrozenList<@Nullable Object> m) { - super(m); - } - public static ItemsDoesNotLookInApplicatorsValidCaseList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return ItemsDoesNotLookInApplicatorsValidCase1.getInstance().validate(arg, configuration); - } - } - - public static class ItemsDoesNotLookInApplicatorsValidCaseListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder() { - list = new ArrayList<>(); - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(Void item) { - list.add(null); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(boolean item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(String item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(int item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(float item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(long item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(double item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(List item) { - list.add(item); - return this; - } - - public ItemsDoesNotLookInApplicatorsValidCaseListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public sealed interface ItemsDoesNotLookInApplicatorsValidCase1Boxed permits ItemsDoesNotLookInApplicatorsValidCase1BoxedList { - @Nullable Object getData(); - } - - public record ItemsDoesNotLookInApplicatorsValidCase1BoxedList(ItemsDoesNotLookInApplicatorsValidCaseList data) implements ItemsDoesNotLookInApplicatorsValidCase1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class ItemsDoesNotLookInApplicatorsValidCase1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ItemsDoesNotLookInApplicatorsValidCase1 instance = null; - - protected ItemsDoesNotLookInApplicatorsValidCase1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - ); - } - - public static ItemsDoesNotLookInApplicatorsValidCase1 getInstance() { - if (instance == null) { - instance = new ItemsDoesNotLookInApplicatorsValidCase1(); - } - return instance; - } - - @Override - public ItemsDoesNotLookInApplicatorsValidCaseList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new ItemsDoesNotLookInApplicatorsValidCaseList(newInstanceItems); - } - - public ItemsDoesNotLookInApplicatorsValidCaseList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsDoesNotLookInApplicatorsValidCase1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsDoesNotLookInApplicatorsValidCase1BoxedList(validate(arg, configuration)); - } - @Override - public ItemsDoesNotLookInApplicatorsValidCase1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java deleted file mode 100644 index 6724839298d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ItemsWithNullInstanceElements.java +++ /dev/null @@ -1,163 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ItemsWithNullInstanceElements { - // nest classes so all schemas and input/output classes can be public - - - public static class Items extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Items instance = null; - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - } - - - public static class ItemsWithNullInstanceElementsList extends FrozenList { - protected ItemsWithNullInstanceElementsList(FrozenList m) { - super(m); - } - public static ItemsWithNullInstanceElementsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return ItemsWithNullInstanceElements1.getInstance().validate(arg, configuration); - } - } - - public static class ItemsWithNullInstanceElementsListBuilder { - // class to build List - private final List list; - - public ItemsWithNullInstanceElementsListBuilder() { - list = new ArrayList<>(); - } - - public ItemsWithNullInstanceElementsListBuilder(List list) { - this.list = list; - } - - public ItemsWithNullInstanceElementsListBuilder add(Void item) { - list.add(null); - return this; - } - - public List build() { - return list; - } - } - - - public sealed interface ItemsWithNullInstanceElements1Boxed permits ItemsWithNullInstanceElements1BoxedList { - @Nullable Object getData(); - } - - public record ItemsWithNullInstanceElements1BoxedList(ItemsWithNullInstanceElementsList data) implements ItemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class ItemsWithNullInstanceElements1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ItemsWithNullInstanceElements1 instance = null; - - protected ItemsWithNullInstanceElements1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - ); - } - - public static ItemsWithNullInstanceElements1 getInstance() { - if (instance == null) { - instance = new ItemsWithNullInstanceElements1(); - } - return instance; - } - - @Override - public ItemsWithNullInstanceElementsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance == null || itemInstance instanceof Void)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((Void) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new ItemsWithNullInstanceElementsList(newInstanceItems); - } - - public ItemsWithNullInstanceElementsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); - } - @Override - public ItemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java deleted file mode 100644 index fd8e1b14268..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/JsonPointerFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class JsonPointerFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface JsonPointerFormat1Boxed permits JsonPointerFormat1BoxedVoid, JsonPointerFormat1BoxedBoolean, JsonPointerFormat1BoxedNumber, JsonPointerFormat1BoxedString, JsonPointerFormat1BoxedList, JsonPointerFormat1BoxedMap { - @Nullable Object getData(); - } - - public record JsonPointerFormat1BoxedVoid(Void data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record JsonPointerFormat1BoxedBoolean(boolean data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record JsonPointerFormat1BoxedNumber(Number data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record JsonPointerFormat1BoxedString(String data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record JsonPointerFormat1BoxedList(FrozenList<@Nullable Object> data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record JsonPointerFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements JsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class JsonPointerFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, JsonPointerFormat1BoxedList>, MapSchemaValidator, JsonPointerFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable JsonPointerFormat1 instance = null; - - protected JsonPointerFormat1() { - super(new JsonSchemaInfo() - .format("json-pointer") - ); - } - - public static JsonPointerFormat1 getInstance() { - if (instance == null) { - instance = new JsonPointerFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public JsonPointerFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedString(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedList(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new JsonPointerFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public JsonPointerFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java deleted file mode 100644 index 89268d7cde5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnored.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaxcontainsWithoutContainsIsIgnored { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaxcontainsWithoutContainsIsIgnored1Boxed permits MaxcontainsWithoutContainsIsIgnored1BoxedVoid, MaxcontainsWithoutContainsIsIgnored1BoxedBoolean, MaxcontainsWithoutContainsIsIgnored1BoxedNumber, MaxcontainsWithoutContainsIsIgnored1BoxedString, MaxcontainsWithoutContainsIsIgnored1BoxedList, MaxcontainsWithoutContainsIsIgnored1BoxedMap { - @Nullable Object getData(); - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedVoid(Void data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedBoolean(boolean data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedNumber(Number data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedString(String data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedList(FrozenList<@Nullable Object> data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxcontainsWithoutContainsIsIgnored1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxcontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaxcontainsWithoutContainsIsIgnored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxcontainsWithoutContainsIsIgnored1BoxedList>, MapSchemaValidator, MaxcontainsWithoutContainsIsIgnored1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaxcontainsWithoutContainsIsIgnored1 instance = null; - - protected MaxcontainsWithoutContainsIsIgnored1() { - super(new JsonSchemaInfo() - .maxContains(1) - ); - } - - public static MaxcontainsWithoutContainsIsIgnored1 getInstance() { - if (instance == null) { - instance = new MaxcontainsWithoutContainsIsIgnored1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedString(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedList(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxcontainsWithoutContainsIsIgnored1BoxedMap(validate(arg, configuration)); - } - @Override - public MaxcontainsWithoutContainsIsIgnored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java deleted file mode 100644 index 71d443d4d98..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaximumValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaximumValidation1Boxed permits MaximumValidation1BoxedVoid, MaximumValidation1BoxedBoolean, MaximumValidation1BoxedNumber, MaximumValidation1BoxedString, MaximumValidation1BoxedList, MaximumValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MaximumValidation1BoxedVoid(Void data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidation1BoxedBoolean(boolean data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidation1BoxedNumber(Number data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidation1BoxedString(String data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaximumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaximumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaximumValidation1BoxedList>, MapSchemaValidator, MaximumValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaximumValidation1 instance = null; - - protected MaximumValidation1() { - super(new JsonSchemaInfo() - .maximum(3.0) - ); - } - - public static MaximumValidation1 getInstance() { - if (instance == null) { - instance = new MaximumValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaximumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaximumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaximumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaximumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MaximumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MaximumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MaximumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java deleted file mode 100644 index d8a7a429e77..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedInteger.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaximumValidationWithUnsignedInteger { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaximumValidationWithUnsignedInteger1Boxed permits MaximumValidationWithUnsignedInteger1BoxedVoid, MaximumValidationWithUnsignedInteger1BoxedBoolean, MaximumValidationWithUnsignedInteger1BoxedNumber, MaximumValidationWithUnsignedInteger1BoxedString, MaximumValidationWithUnsignedInteger1BoxedList, MaximumValidationWithUnsignedInteger1BoxedMap { - @Nullable Object getData(); - } - - public record MaximumValidationWithUnsignedInteger1BoxedVoid(Void data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidationWithUnsignedInteger1BoxedBoolean(boolean data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidationWithUnsignedInteger1BoxedNumber(Number data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidationWithUnsignedInteger1BoxedString(String data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidationWithUnsignedInteger1BoxedList(FrozenList<@Nullable Object> data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaximumValidationWithUnsignedInteger1BoxedMap(FrozenMap<@Nullable Object> data) implements MaximumValidationWithUnsignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaximumValidationWithUnsignedInteger1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaximumValidationWithUnsignedInteger1BoxedList>, MapSchemaValidator, MaximumValidationWithUnsignedInteger1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaximumValidationWithUnsignedInteger1 instance = null; - - protected MaximumValidationWithUnsignedInteger1() { - super(new JsonSchemaInfo() - .maximum(300) - ); - } - - public static MaximumValidationWithUnsignedInteger1 getInstance() { - if (instance == null) { - instance = new MaximumValidationWithUnsignedInteger1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedString(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedList(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaximumValidationWithUnsignedInteger1BoxedMap(validate(arg, configuration)); - } - @Override - public MaximumValidationWithUnsignedInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java deleted file mode 100644 index aba9b897eca..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxitemsValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaxitemsValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaxitemsValidation1Boxed permits MaxitemsValidation1BoxedVoid, MaxitemsValidation1BoxedBoolean, MaxitemsValidation1BoxedNumber, MaxitemsValidation1BoxedString, MaxitemsValidation1BoxedList, MaxitemsValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MaxitemsValidation1BoxedVoid(Void data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxitemsValidation1BoxedBoolean(boolean data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxitemsValidation1BoxedNumber(Number data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxitemsValidation1BoxedString(String data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaxitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxitemsValidation1BoxedList>, MapSchemaValidator, MaxitemsValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaxitemsValidation1 instance = null; - - protected MaxitemsValidation1() { - super(new JsonSchemaInfo() - .maxItems(2) - ); - } - - public static MaxitemsValidation1 getInstance() { - if (instance == null) { - instance = new MaxitemsValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaxitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxitemsValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MaxitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java deleted file mode 100644 index 9aa07726782..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxlengthValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaxlengthValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaxlengthValidation1Boxed permits MaxlengthValidation1BoxedVoid, MaxlengthValidation1BoxedBoolean, MaxlengthValidation1BoxedNumber, MaxlengthValidation1BoxedString, MaxlengthValidation1BoxedList, MaxlengthValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MaxlengthValidation1BoxedVoid(Void data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxlengthValidation1BoxedBoolean(boolean data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxlengthValidation1BoxedNumber(Number data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxlengthValidation1BoxedString(String data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxlengthValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxlengthValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaxlengthValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxlengthValidation1BoxedList>, MapSchemaValidator, MaxlengthValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaxlengthValidation1 instance = null; - - protected MaxlengthValidation1() { - super(new JsonSchemaInfo() - .maxLength(2) - ); - } - - public static MaxlengthValidation1 getInstance() { - if (instance == null) { - instance = new MaxlengthValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaxlengthValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxlengthValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MaxlengthValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java deleted file mode 100644 index 2e40f4b34fc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmpty.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Maxproperties0MeansTheObjectIsEmpty { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Maxproperties0MeansTheObjectIsEmpty1Boxed permits Maxproperties0MeansTheObjectIsEmpty1BoxedVoid, Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean, Maxproperties0MeansTheObjectIsEmpty1BoxedNumber, Maxproperties0MeansTheObjectIsEmpty1BoxedString, Maxproperties0MeansTheObjectIsEmpty1BoxedList, Maxproperties0MeansTheObjectIsEmpty1BoxedMap { - @Nullable Object getData(); - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedVoid(Void data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean(boolean data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedNumber(Number data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedString(String data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedList(FrozenList<@Nullable Object> data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Maxproperties0MeansTheObjectIsEmpty1BoxedMap(FrozenMap<@Nullable Object> data) implements Maxproperties0MeansTheObjectIsEmpty1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Maxproperties0MeansTheObjectIsEmpty1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Maxproperties0MeansTheObjectIsEmpty1BoxedList>, MapSchemaValidator, Maxproperties0MeansTheObjectIsEmpty1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Maxproperties0MeansTheObjectIsEmpty1 instance = null; - - protected Maxproperties0MeansTheObjectIsEmpty1() { - super(new JsonSchemaInfo() - .maxProperties(0) - ); - } - - public static Maxproperties0MeansTheObjectIsEmpty1 getInstance() { - if (instance == null) { - instance = new Maxproperties0MeansTheObjectIsEmpty1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedVoid(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedNumber(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedString(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedList(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Maxproperties0MeansTheObjectIsEmpty1BoxedMap(validate(arg, configuration)); - } - @Override - public Maxproperties0MeansTheObjectIsEmpty1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java deleted file mode 100644 index 0ee851653d3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MaxpropertiesValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MaxpropertiesValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MaxpropertiesValidation1Boxed permits MaxpropertiesValidation1BoxedVoid, MaxpropertiesValidation1BoxedBoolean, MaxpropertiesValidation1BoxedNumber, MaxpropertiesValidation1BoxedString, MaxpropertiesValidation1BoxedList, MaxpropertiesValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MaxpropertiesValidation1BoxedVoid(Void data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxpropertiesValidation1BoxedBoolean(boolean data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxpropertiesValidation1BoxedNumber(Number data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxpropertiesValidation1BoxedString(String data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxpropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MaxpropertiesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MaxpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MaxpropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MaxpropertiesValidation1BoxedList>, MapSchemaValidator, MaxpropertiesValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MaxpropertiesValidation1 instance = null; - - protected MaxpropertiesValidation1() { - super(new JsonSchemaInfo() - .maxProperties(2) - ); - } - - public static MaxpropertiesValidation1 getInstance() { - if (instance == null) { - instance = new MaxpropertiesValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MaxpropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MaxpropertiesValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MaxpropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java deleted file mode 100644 index eb2964adb45..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnored.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MincontainsWithoutContainsIsIgnored { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MincontainsWithoutContainsIsIgnored1Boxed permits MincontainsWithoutContainsIsIgnored1BoxedVoid, MincontainsWithoutContainsIsIgnored1BoxedBoolean, MincontainsWithoutContainsIsIgnored1BoxedNumber, MincontainsWithoutContainsIsIgnored1BoxedString, MincontainsWithoutContainsIsIgnored1BoxedList, MincontainsWithoutContainsIsIgnored1BoxedMap { - @Nullable Object getData(); - } - - public record MincontainsWithoutContainsIsIgnored1BoxedVoid(Void data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MincontainsWithoutContainsIsIgnored1BoxedBoolean(boolean data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MincontainsWithoutContainsIsIgnored1BoxedNumber(Number data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MincontainsWithoutContainsIsIgnored1BoxedString(String data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MincontainsWithoutContainsIsIgnored1BoxedList(FrozenList<@Nullable Object> data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MincontainsWithoutContainsIsIgnored1BoxedMap(FrozenMap<@Nullable Object> data) implements MincontainsWithoutContainsIsIgnored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MincontainsWithoutContainsIsIgnored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MincontainsWithoutContainsIsIgnored1BoxedList>, MapSchemaValidator, MincontainsWithoutContainsIsIgnored1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MincontainsWithoutContainsIsIgnored1 instance = null; - - protected MincontainsWithoutContainsIsIgnored1() { - super(new JsonSchemaInfo() - .minContains(1) - ); - } - - public static MincontainsWithoutContainsIsIgnored1 getInstance() { - if (instance == null) { - instance = new MincontainsWithoutContainsIsIgnored1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedVoid(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedNumber(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedString(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedList(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MincontainsWithoutContainsIsIgnored1BoxedMap(validate(arg, configuration)); - } - @Override - public MincontainsWithoutContainsIsIgnored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java deleted file mode 100644 index cdfc39f6c4d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MinimumValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MinimumValidation1Boxed permits MinimumValidation1BoxedVoid, MinimumValidation1BoxedBoolean, MinimumValidation1BoxedNumber, MinimumValidation1BoxedString, MinimumValidation1BoxedList, MinimumValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MinimumValidation1BoxedVoid(Void data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidation1BoxedBoolean(boolean data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidation1BoxedNumber(Number data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidation1BoxedString(String data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinimumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MinimumValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinimumValidation1BoxedList>, MapSchemaValidator, MinimumValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MinimumValidation1 instance = null; - - protected MinimumValidation1() { - super(new JsonSchemaInfo() - .minimum(1.1) - ); - } - - public static MinimumValidation1 getInstance() { - if (instance == null) { - instance = new MinimumValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MinimumValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MinimumValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MinimumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MinimumValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MinimumValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MinimumValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MinimumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java deleted file mode 100644 index 100964fdc75..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinimumValidationWithSignedInteger.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MinimumValidationWithSignedInteger { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MinimumValidationWithSignedInteger1Boxed permits MinimumValidationWithSignedInteger1BoxedVoid, MinimumValidationWithSignedInteger1BoxedBoolean, MinimumValidationWithSignedInteger1BoxedNumber, MinimumValidationWithSignedInteger1BoxedString, MinimumValidationWithSignedInteger1BoxedList, MinimumValidationWithSignedInteger1BoxedMap { - @Nullable Object getData(); - } - - public record MinimumValidationWithSignedInteger1BoxedVoid(Void data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidationWithSignedInteger1BoxedBoolean(boolean data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidationWithSignedInteger1BoxedNumber(Number data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidationWithSignedInteger1BoxedString(String data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidationWithSignedInteger1BoxedList(FrozenList<@Nullable Object> data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinimumValidationWithSignedInteger1BoxedMap(FrozenMap<@Nullable Object> data) implements MinimumValidationWithSignedInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MinimumValidationWithSignedInteger1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinimumValidationWithSignedInteger1BoxedList>, MapSchemaValidator, MinimumValidationWithSignedInteger1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MinimumValidationWithSignedInteger1 instance = null; - - protected MinimumValidationWithSignedInteger1() { - super(new JsonSchemaInfo() - .minimum(-2) - ); - } - - public static MinimumValidationWithSignedInteger1 getInstance() { - if (instance == null) { - instance = new MinimumValidationWithSignedInteger1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MinimumValidationWithSignedInteger1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedVoid(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedNumber(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedString(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedList(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MinimumValidationWithSignedInteger1BoxedMap(validate(arg, configuration)); - } - @Override - public MinimumValidationWithSignedInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java deleted file mode 100644 index 97143bc5d85..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinitemsValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MinitemsValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MinitemsValidation1Boxed permits MinitemsValidation1BoxedVoid, MinitemsValidation1BoxedBoolean, MinitemsValidation1BoxedNumber, MinitemsValidation1BoxedString, MinitemsValidation1BoxedList, MinitemsValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MinitemsValidation1BoxedVoid(Void data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinitemsValidation1BoxedBoolean(boolean data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinitemsValidation1BoxedNumber(Number data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinitemsValidation1BoxedString(String data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MinitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinitemsValidation1BoxedList>, MapSchemaValidator, MinitemsValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MinitemsValidation1 instance = null; - - protected MinitemsValidation1() { - super(new JsonSchemaInfo() - .minItems(1) - ); - } - - public static MinitemsValidation1 getInstance() { - if (instance == null) { - instance = new MinitemsValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MinitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MinitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MinitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MinitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MinitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MinitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MinitemsValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MinitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java deleted file mode 100644 index 7e0cd022795..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinlengthValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MinlengthValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MinlengthValidation1Boxed permits MinlengthValidation1BoxedVoid, MinlengthValidation1BoxedBoolean, MinlengthValidation1BoxedNumber, MinlengthValidation1BoxedString, MinlengthValidation1BoxedList, MinlengthValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MinlengthValidation1BoxedVoid(Void data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinlengthValidation1BoxedBoolean(boolean data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinlengthValidation1BoxedNumber(Number data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinlengthValidation1BoxedString(String data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinlengthValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinlengthValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinlengthValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MinlengthValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinlengthValidation1BoxedList>, MapSchemaValidator, MinlengthValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MinlengthValidation1 instance = null; - - protected MinlengthValidation1() { - super(new JsonSchemaInfo() - .minLength(2) - ); - } - - public static MinlengthValidation1 getInstance() { - if (instance == null) { - instance = new MinlengthValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MinlengthValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MinlengthValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MinlengthValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MinlengthValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MinlengthValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MinlengthValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MinlengthValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MinlengthValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java deleted file mode 100644 index 8d2d51a2778..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MinpropertiesValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MinpropertiesValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MinpropertiesValidation1Boxed permits MinpropertiesValidation1BoxedVoid, MinpropertiesValidation1BoxedBoolean, MinpropertiesValidation1BoxedNumber, MinpropertiesValidation1BoxedString, MinpropertiesValidation1BoxedList, MinpropertiesValidation1BoxedMap { - @Nullable Object getData(); - } - - public record MinpropertiesValidation1BoxedVoid(Void data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinpropertiesValidation1BoxedBoolean(boolean data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinpropertiesValidation1BoxedNumber(Number data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinpropertiesValidation1BoxedString(String data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinpropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MinpropertiesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements MinpropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MinpropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MinpropertiesValidation1BoxedList>, MapSchemaValidator, MinpropertiesValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MinpropertiesValidation1 instance = null; - - protected MinpropertiesValidation1() { - super(new JsonSchemaInfo() - .minProperties(1) - ); - } - - public static MinpropertiesValidation1 getInstance() { - if (instance == null) { - instance = new MinpropertiesValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MinpropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedString(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedList(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MinpropertiesValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public MinpropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java deleted file mode 100644 index c2f6258cefc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleDependentsRequired.java +++ /dev/null @@ -1,338 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MultipleDependentsRequired { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MultipleDependentsRequired1Boxed permits MultipleDependentsRequired1BoxedVoid, MultipleDependentsRequired1BoxedBoolean, MultipleDependentsRequired1BoxedNumber, MultipleDependentsRequired1BoxedString, MultipleDependentsRequired1BoxedList, MultipleDependentsRequired1BoxedMap { - @Nullable Object getData(); - } - - public record MultipleDependentsRequired1BoxedVoid(Void data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleDependentsRequired1BoxedBoolean(boolean data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleDependentsRequired1BoxedNumber(Number data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleDependentsRequired1BoxedString(String data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleDependentsRequired1BoxedList(FrozenList<@Nullable Object> data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleDependentsRequired1BoxedMap(FrozenMap<@Nullable Object> data) implements MultipleDependentsRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MultipleDependentsRequired1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MultipleDependentsRequired1BoxedList>, MapSchemaValidator, MultipleDependentsRequired1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MultipleDependentsRequired1 instance = null; - - protected MultipleDependentsRequired1() { - super(new JsonSchemaInfo() - .dependentRequired(MapUtils.makeMap( - new AbstractMap.SimpleEntry<>( - "quux", - SetMaker.makeSet( - "foo", - "bar" - ) - ) - )) - ); - } - - public static MultipleDependentsRequired1 getInstance() { - if (instance == null) { - instance = new MultipleDependentsRequired1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MultipleDependentsRequired1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedVoid(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedNumber(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedString(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedList(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleDependentsRequired1BoxedMap(validate(arg, configuration)); - } - @Override - public MultipleDependentsRequired1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java deleted file mode 100644 index c0d840ae2cd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidated.java +++ /dev/null @@ -1,629 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MultipleSimultaneousPatternpropertiesAreValidated { - // nest classes so all schemas and input/output classes can be public - - - public static class A extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable A instance = null; - public static A getInstance() { - if (instance == null) { - instance = new A(); - } - return instance; - } - } - - - public sealed interface AaaBoxed permits AaaBoxedVoid, AaaBoxedBoolean, AaaBoxedNumber, AaaBoxedString, AaaBoxedList, AaaBoxedMap { - @Nullable Object getData(); - } - - public record AaaBoxedVoid(Void data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AaaBoxedBoolean(boolean data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AaaBoxedNumber(Number data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AaaBoxedString(String data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AaaBoxedList(FrozenList<@Nullable Object> data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record AaaBoxedMap(FrozenMap<@Nullable Object> data) implements AaaBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Aaa extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AaaBoxedList>, MapSchemaValidator, AaaBoxedMap> { - private static @Nullable Aaa instance = null; - - protected Aaa() { - super(new JsonSchemaInfo() - .maximum(20) - ); - } - - public static Aaa getInstance() { - if (instance == null) { - instance = new Aaa(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public AaaBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedVoid(validate(arg, configuration)); - } - @Override - public AaaBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedBoolean(validate(arg, configuration)); - } - @Override - public AaaBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedNumber(validate(arg, configuration)); - } - @Override - public AaaBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedString(validate(arg, configuration)); - } - @Override - public AaaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedList(validate(arg, configuration)); - } - @Override - public AaaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AaaBoxedMap(validate(arg, configuration)); - } - @Override - public AaaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface MultipleSimultaneousPatternpropertiesAreValidated1Boxed permits MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid, MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean, MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber, MultipleSimultaneousPatternpropertiesAreValidated1BoxedString, MultipleSimultaneousPatternpropertiesAreValidated1BoxedList, MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap { - @Nullable Object getData(); - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid(Void data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean(boolean data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber(Number data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedString(String data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedList(FrozenList<@Nullable Object> data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap(FrozenMap<@Nullable Object> data) implements MultipleSimultaneousPatternpropertiesAreValidated1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class MultipleSimultaneousPatternpropertiesAreValidated1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MultipleSimultaneousPatternpropertiesAreValidated1BoxedList>, MapSchemaValidator, MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MultipleSimultaneousPatternpropertiesAreValidated1 instance = null; - - protected MultipleSimultaneousPatternpropertiesAreValidated1() { - super(new JsonSchemaInfo() - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("a*"), A.class), - new AbstractMap.SimpleEntry<>(Pattern.compile("aaa*"), Aaa.class) - )) - ); - } - - public static MultipleSimultaneousPatternpropertiesAreValidated1 getInstance() { - if (instance == null) { - instance = new MultipleSimultaneousPatternpropertiesAreValidated1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedVoid(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedBoolean(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedNumber(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedString(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedList(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleSimultaneousPatternpropertiesAreValidated1BoxedMap(validate(arg, configuration)); - } - @Override - public MultipleSimultaneousPatternpropertiesAreValidated1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java deleted file mode 100644 index 096a8d6daf6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArray.java +++ /dev/null @@ -1,146 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class MultipleTypesCanBeSpecifiedInAnArray { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface MultipleTypesCanBeSpecifiedInAnArray1Boxed permits MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber, MultipleTypesCanBeSpecifiedInAnArray1BoxedString { - @Nullable Object getData(); - } - - public record MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber(Number data) implements MultipleTypesCanBeSpecifiedInAnArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record MultipleTypesCanBeSpecifiedInAnArray1BoxedString(String data) implements MultipleTypesCanBeSpecifiedInAnArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class MultipleTypesCanBeSpecifiedInAnArray1 extends JsonSchema implements NumberSchemaValidator, StringSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable MultipleTypesCanBeSpecifiedInAnArray1 instance = null; - - protected MultipleTypesCanBeSpecifiedInAnArray1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class, - String.class - )) - .format("int") - ); - } - - public static MultipleTypesCanBeSpecifiedInAnArray1 getInstance() { - if (instance == null) { - instance = new MultipleTypesCanBeSpecifiedInAnArray1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleTypesCanBeSpecifiedInAnArray1BoxedNumber(validate(arg, configuration)); - } - @Override - public MultipleTypesCanBeSpecifiedInAnArray1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new MultipleTypesCanBeSpecifiedInAnArray1BoxedString(validate(arg, configuration)); - } - @Override - public MultipleTypesCanBeSpecifiedInAnArray1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java deleted file mode 100644 index b267ded06cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemantics.java +++ /dev/null @@ -1,627 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NestedAllofToCheckValidationSemantics { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Schema01 instance = null; - public static Schema01 getInstance() { - if (instance == null) { - instance = new Schema01(); - } - return instance; - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema01.class - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface NestedAllofToCheckValidationSemantics1Boxed permits NestedAllofToCheckValidationSemantics1BoxedVoid, NestedAllofToCheckValidationSemantics1BoxedBoolean, NestedAllofToCheckValidationSemantics1BoxedNumber, NestedAllofToCheckValidationSemantics1BoxedString, NestedAllofToCheckValidationSemantics1BoxedList, NestedAllofToCheckValidationSemantics1BoxedMap { - @Nullable Object getData(); - } - - public record NestedAllofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAllofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAllofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAllofToCheckValidationSemantics1BoxedString(String data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAllofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAllofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedAllofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NestedAllofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedAllofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedAllofToCheckValidationSemantics1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NestedAllofToCheckValidationSemantics1 instance = null; - - protected NestedAllofToCheckValidationSemantics1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class - )) - ); - } - - public static NestedAllofToCheckValidationSemantics1 getInstance() { - if (instance == null) { - instance = new NestedAllofToCheckValidationSemantics1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAllofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); - } - @Override - public NestedAllofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java deleted file mode 100644 index bfbb4568044..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemantics.java +++ /dev/null @@ -1,627 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NestedAnyofToCheckValidationSemantics { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Schema01 instance = null; - public static Schema01 getInstance() { - if (instance == null) { - instance = new Schema01(); - } - return instance; - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .anyOf(List.of( - Schema01.class - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface NestedAnyofToCheckValidationSemantics1Boxed permits NestedAnyofToCheckValidationSemantics1BoxedVoid, NestedAnyofToCheckValidationSemantics1BoxedBoolean, NestedAnyofToCheckValidationSemantics1BoxedNumber, NestedAnyofToCheckValidationSemantics1BoxedString, NestedAnyofToCheckValidationSemantics1BoxedList, NestedAnyofToCheckValidationSemantics1BoxedMap { - @Nullable Object getData(); - } - - public record NestedAnyofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAnyofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAnyofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAnyofToCheckValidationSemantics1BoxedString(String data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAnyofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedAnyofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedAnyofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NestedAnyofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedAnyofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedAnyofToCheckValidationSemantics1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NestedAnyofToCheckValidationSemantics1 instance = null; - - protected NestedAnyofToCheckValidationSemantics1() { - super(new JsonSchemaInfo() - .anyOf(List.of( - Schema0.class - )) - ); - } - - public static NestedAnyofToCheckValidationSemantics1 getInstance() { - if (instance == null) { - instance = new NestedAnyofToCheckValidationSemantics1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedAnyofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); - } - @Override - public NestedAnyofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java deleted file mode 100644 index b20e8740fbc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedItems.java +++ /dev/null @@ -1,544 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NestedItems { - // nest classes so all schemas and input/output classes can be public - - - public static class Items3 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Items3 instance = null; - public static Items3 getInstance() { - if (instance == null) { - instance = new Items3(); - } - return instance; - } - } - - - public static class ItemsList extends FrozenList { - protected ItemsList(FrozenList m) { - super(m); - } - public static ItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return Items2.getInstance().validate(arg, configuration); - } - } - - public static class ItemsListBuilder { - // class to build List - private final List list; - - public ItemsListBuilder() { - list = new ArrayList<>(); - } - - public ItemsListBuilder(List list) { - this.list = list; - } - - public ItemsListBuilder add(int item) { - list.add(item); - return this; - } - - public ItemsListBuilder add(float item) { - list.add(item); - return this; - } - - public ItemsListBuilder add(long item) { - list.add(item); - return this; - } - - public ItemsListBuilder add(double item) { - list.add(item); - return this; - } - - public List build() { - return list; - } - } - - - public sealed interface Items2Boxed permits Items2BoxedList { - @Nullable Object getData(); - } - - public record Items2BoxedList(ItemsList data) implements Items2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Items2 extends JsonSchema implements ListSchemaValidator { - private static @Nullable Items2 instance = null; - - protected Items2() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items3.class) - ); - } - - public static Items2 getInstance() { - if (instance == null) { - instance = new Items2(); - } - return instance; - } - - @Override - public ItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof Number)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((Number) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new ItemsList(newInstanceItems); - } - - public ItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Items2BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Items2BoxedList(validate(arg, configuration)); - } - @Override - public Items2Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ItemsList1 extends FrozenList { - protected ItemsList1(FrozenList m) { - super(m); - } - public static ItemsList1 of(List> arg, SchemaConfiguration configuration) throws ValidationException { - return Items1.getInstance().validate(arg, configuration); - } - } - - public static class ItemsListBuilder1 { - // class to build List> - private final List> list; - - public ItemsListBuilder1() { - list = new ArrayList<>(); - } - - public ItemsListBuilder1(List> list) { - this.list = list; - } - - public ItemsListBuilder1 add(List item) { - list.add(item); - return this; - } - - public List> build() { - return list; - } - } - - - public sealed interface Items1Boxed permits Items1BoxedList { - @Nullable Object getData(); - } - - public record Items1BoxedList(ItemsList1 data) implements Items1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Items1 extends JsonSchema implements ListSchemaValidator { - private static @Nullable Items1 instance = null; - - protected Items1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items2.class) - ); - } - - public static Items1 getInstance() { - if (instance == null) { - instance = new Items1(); - } - return instance; - } - - @Override - public ItemsList1 getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof ItemsList)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((ItemsList) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new ItemsList1(newInstanceItems); - } - - public ItemsList1 validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Items1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Items1BoxedList(validate(arg, configuration)); - } - @Override - public Items1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ItemsList2 extends FrozenList { - protected ItemsList2(FrozenList m) { - super(m); - } - public static ItemsList2 of(List>> arg, SchemaConfiguration configuration) throws ValidationException { - return Items.getInstance().validate(arg, configuration); - } - } - - public static class ItemsListBuilder2 { - // class to build List>> - private final List>> list; - - public ItemsListBuilder2() { - list = new ArrayList<>(); - } - - public ItemsListBuilder2(List>> list) { - this.list = list; - } - - public ItemsListBuilder2 add(List> item) { - list.add(item); - return this; - } - - public List>> build() { - return list; - } - } - - - public sealed interface ItemsBoxed permits ItemsBoxedList { - @Nullable Object getData(); - } - - public record ItemsBoxedList(ItemsList2 data) implements ItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Items extends JsonSchema implements ListSchemaValidator { - private static @Nullable Items instance = null; - - protected Items() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items1.class) - ); - } - - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - - @Override - public ItemsList2 getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof ItemsList1)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((ItemsList1) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new ItemsList2(newInstanceItems); - } - - public ItemsList2 validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ItemsBoxedList(validate(arg, configuration)); - } - @Override - public ItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class NestedItemsList extends FrozenList { - protected NestedItemsList(FrozenList m) { - super(m); - } - public static NestedItemsList of(List>>> arg, SchemaConfiguration configuration) throws ValidationException { - return NestedItems1.getInstance().validate(arg, configuration); - } - } - - public static class NestedItemsListBuilder { - // class to build List>>> - private final List>>> list; - - public NestedItemsListBuilder() { - list = new ArrayList<>(); - } - - public NestedItemsListBuilder(List>>> list) { - this.list = list; - } - - public NestedItemsListBuilder add(List>> item) { - list.add(item); - return this; - } - - public List>>> build() { - return list; - } - } - - - public sealed interface NestedItems1Boxed permits NestedItems1BoxedList { - @Nullable Object getData(); - } - - public record NestedItems1BoxedList(NestedItemsList data) implements NestedItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class NestedItems1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NestedItems1 instance = null; - - protected NestedItems1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - ); - } - - public static NestedItems1 getInstance() { - if (instance == null) { - instance = new NestedItems1(); - } - return instance; - } - - @Override - public NestedItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof ItemsList2)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((ItemsList2) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new NestedItemsList(newInstanceItems); - } - - public NestedItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NestedItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedItems1BoxedList(validate(arg, configuration)); - } - @Override - public NestedItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java deleted file mode 100644 index 0b8592e429b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemantics.java +++ /dev/null @@ -1,627 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NestedOneofToCheckValidationSemantics { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema01 extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Schema01 instance = null; - public static Schema01 getInstance() { - if (instance == null) { - instance = new Schema01(); - } - return instance; - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .oneOf(List.of( - Schema01.class - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface NestedOneofToCheckValidationSemantics1Boxed permits NestedOneofToCheckValidationSemantics1BoxedVoid, NestedOneofToCheckValidationSemantics1BoxedBoolean, NestedOneofToCheckValidationSemantics1BoxedNumber, NestedOneofToCheckValidationSemantics1BoxedString, NestedOneofToCheckValidationSemantics1BoxedList, NestedOneofToCheckValidationSemantics1BoxedMap { - @Nullable Object getData(); - } - - public record NestedOneofToCheckValidationSemantics1BoxedVoid(Void data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedOneofToCheckValidationSemantics1BoxedBoolean(boolean data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedOneofToCheckValidationSemantics1BoxedNumber(Number data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedOneofToCheckValidationSemantics1BoxedString(String data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedOneofToCheckValidationSemantics1BoxedList(FrozenList<@Nullable Object> data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NestedOneofToCheckValidationSemantics1BoxedMap(FrozenMap<@Nullable Object> data) implements NestedOneofToCheckValidationSemantics1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NestedOneofToCheckValidationSemantics1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NestedOneofToCheckValidationSemantics1BoxedList>, MapSchemaValidator, NestedOneofToCheckValidationSemantics1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NestedOneofToCheckValidationSemantics1 instance = null; - - protected NestedOneofToCheckValidationSemantics1() { - super(new JsonSchemaInfo() - .oneOf(List.of( - Schema0.class - )) - ); - } - - public static NestedOneofToCheckValidationSemantics1 getInstance() { - if (instance == null) { - instance = new NestedOneofToCheckValidationSemantics1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedVoid(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedNumber(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedString(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedList(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NestedOneofToCheckValidationSemantics1BoxedMap(validate(arg, configuration)); - } - @Override - public NestedOneofToCheckValidationSemantics1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java deleted file mode 100644 index dea18e11fa4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalproperties.java +++ /dev/null @@ -1,180 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NotAnyTypeJsonSchema; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NonAsciiPatternWithAdditionalproperties { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { - // NotAnyTypeSchema - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class CircumflexAccentLatinSmallLetterAWithAcute extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable CircumflexAccentLatinSmallLetterAWithAcute instance = null; - public static CircumflexAccentLatinSmallLetterAWithAcute getInstance() { - if (instance == null) { - instance = new CircumflexAccentLatinSmallLetterAWithAcute(); - } - return instance; - } - } - - - public static class NonAsciiPatternWithAdditionalpropertiesMap extends FrozenMap<@Nullable Object> { - protected NonAsciiPatternWithAdditionalpropertiesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of(); - // map with no key value pairs - public static NonAsciiPatternWithAdditionalpropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return NonAsciiPatternWithAdditionalproperties1.getInstance().validate(arg, configuration); - } - } - - public static class NonAsciiPatternWithAdditionalpropertiesMapBuilder implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of(); - public Set getKnownKeys() { - return knownKeys; - } - public NonAsciiPatternWithAdditionalpropertiesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - } - - - public sealed interface NonAsciiPatternWithAdditionalproperties1Boxed permits NonAsciiPatternWithAdditionalproperties1BoxedMap { - @Nullable Object getData(); - } - - public record NonAsciiPatternWithAdditionalproperties1BoxedMap(NonAsciiPatternWithAdditionalpropertiesMap data) implements NonAsciiPatternWithAdditionalproperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NonAsciiPatternWithAdditionalproperties1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NonAsciiPatternWithAdditionalproperties1 instance = null; - - protected NonAsciiPatternWithAdditionalproperties1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .additionalProperties(AdditionalProperties.class) - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("^á"), CircumflexAccentLatinSmallLetterAWithAcute.class) - )) - ); - } - - public static NonAsciiPatternWithAdditionalproperties1 getInstance() { - if (instance == null) { - instance = new NonAsciiPatternWithAdditionalproperties1(); - } - return instance; - } - - public NonAsciiPatternWithAdditionalpropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new NonAsciiPatternWithAdditionalpropertiesMap(castProperties); - } - - public NonAsciiPatternWithAdditionalpropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NonAsciiPatternWithAdditionalproperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NonAsciiPatternWithAdditionalproperties1BoxedMap(validate(arg, configuration)); - } - @Override - public NonAsciiPatternWithAdditionalproperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java deleted file mode 100644 index d90a59d4740..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemas.java +++ /dev/null @@ -1,2041 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NonInterferenceAcrossCombinedSchemas { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .exclusiveMaximum(0) - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { - @Nullable Object getData(); - } - - public record ThenBoxedVoid(Void data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedBoolean(boolean data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedNumber(Number data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedString(String data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { - private static @Nullable Then instance = null; - - protected Then() { - super(new JsonSchemaInfo() - .minimum(-10) - ); - } - - public static Then getInstance() { - if (instance == null) { - instance = new Then(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedVoid(validate(arg, configuration)); - } - @Override - public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedBoolean(validate(arg, configuration)); - } - @Override - public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedNumber(validate(arg, configuration)); - } - @Override - public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedString(validate(arg, configuration)); - } - @Override - public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedList(validate(arg, configuration)); - } - @Override - public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedMap(validate(arg, configuration)); - } - @Override - public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .then(Then.class) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { - @Nullable Object getData(); - } - - public record ElseBoxedVoid(Void data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedNumber(Number data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedString(String data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; - - protected Else() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Else getInstance() { - if (instance == null) { - instance = new Else(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); - } - @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); - } - @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); - } - @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); - } - @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); - } - @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); - } - @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema2Boxed permits Schema2BoxedVoid, Schema2BoxedBoolean, Schema2BoxedNumber, Schema2BoxedString, Schema2BoxedList, Schema2BoxedMap { - @Nullable Object getData(); - } - - public record Schema2BoxedVoid(Void data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema2BoxedBoolean(boolean data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema2BoxedNumber(Number data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema2BoxedString(String data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema2BoxedList(FrozenList<@Nullable Object> data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema2BoxedMap(FrozenMap<@Nullable Object> data) implements Schema2Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema2 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema2BoxedList>, MapSchemaValidator, Schema2BoxedMap> { - private static @Nullable Schema2 instance = null; - - protected Schema2() { - super(new JsonSchemaInfo() - .elseSchema(Else.class) - ); - } - - public static Schema2 getInstance() { - if (instance == null) { - instance = new Schema2(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema2BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema2BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema2BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema2BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedString(validate(arg, configuration)); - } - @Override - public Schema2BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedList(validate(arg, configuration)); - } - @Override - public Schema2BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema2BoxedMap(validate(arg, configuration)); - } - @Override - public Schema2Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface NonInterferenceAcrossCombinedSchemas1Boxed permits NonInterferenceAcrossCombinedSchemas1BoxedVoid, NonInterferenceAcrossCombinedSchemas1BoxedBoolean, NonInterferenceAcrossCombinedSchemas1BoxedNumber, NonInterferenceAcrossCombinedSchemas1BoxedString, NonInterferenceAcrossCombinedSchemas1BoxedList, NonInterferenceAcrossCombinedSchemas1BoxedMap { - @Nullable Object getData(); - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedVoid(Void data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedBoolean(boolean data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedNumber(Number data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedString(String data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedList(FrozenList<@Nullable Object> data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NonInterferenceAcrossCombinedSchemas1BoxedMap(FrozenMap<@Nullable Object> data) implements NonInterferenceAcrossCombinedSchemas1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NonInterferenceAcrossCombinedSchemas1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NonInterferenceAcrossCombinedSchemas1BoxedList>, MapSchemaValidator, NonInterferenceAcrossCombinedSchemas1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NonInterferenceAcrossCombinedSchemas1 instance = null; - - protected NonInterferenceAcrossCombinedSchemas1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class, - Schema2.class - )) - ); - } - - public static NonInterferenceAcrossCombinedSchemas1 getInstance() { - if (instance == null) { - instance = new NonInterferenceAcrossCombinedSchemas1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedVoid(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedNumber(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedString(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedList(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NonInterferenceAcrossCombinedSchemas1BoxedMap(validate(arg, configuration)); - } - @Override - public NonInterferenceAcrossCombinedSchemas1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java deleted file mode 100644 index dafd2ee2142..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Not.java +++ /dev/null @@ -1,338 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Not { - // nest classes so all schemas and input/output classes can be public - - - public static class Not2 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Not2 instance = null; - public static Not2 getInstance() { - if (instance == null) { - instance = new Not2(); - } - return instance; - } - } - - - public sealed interface Not1Boxed permits Not1BoxedVoid, Not1BoxedBoolean, Not1BoxedNumber, Not1BoxedString, Not1BoxedList, Not1BoxedMap { - @Nullable Object getData(); - } - - public record Not1BoxedVoid(Void data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Not1BoxedBoolean(boolean data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Not1BoxedNumber(Number data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Not1BoxedString(String data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Not1BoxedList(FrozenList<@Nullable Object> data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Not1BoxedMap(FrozenMap<@Nullable Object> data) implements Not1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Not1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Not1BoxedList>, MapSchemaValidator, Not1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Not1 instance = null; - - protected Not1() { - super(new JsonSchemaInfo() - .not(Not2.class) - ); - } - - public static Not1 getInstance() { - if (instance == null) { - instance = new Not1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Not1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedVoid(validate(arg, configuration)); - } - @Override - public Not1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Not1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedNumber(validate(arg, configuration)); - } - @Override - public Not1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedString(validate(arg, configuration)); - } - @Override - public Not1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedList(validate(arg, configuration)); - } - @Override - public Not1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Not1BoxedMap(validate(arg, configuration)); - } - @Override - public Not1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java deleted file mode 100644 index 66f737f2546..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMoreComplexSchema.java +++ /dev/null @@ -1,497 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NotMoreComplexSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class NotMap extends FrozenMap<@Nullable Object> { - protected NotMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static NotMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Not.getInstance().validate(arg, configuration); - } - - public String foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class NotMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public NotMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public NotMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public NotMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface NotBoxed permits NotBoxedMap { - @Nullable Object getData(); - } - - public record NotBoxedMap(NotMap data) implements NotBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Not extends JsonSchema implements MapSchemaValidator { - private static @Nullable Not instance = null; - - protected Not() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static Not getInstance() { - if (instance == null) { - instance = new Not(); - } - return instance; - } - - public NotMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new NotMap(castProperties); - } - - public NotMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NotBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NotBoxedMap(validate(arg, configuration)); - } - @Override - public NotBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - - public sealed interface NotMoreComplexSchema1Boxed permits NotMoreComplexSchema1BoxedVoid, NotMoreComplexSchema1BoxedBoolean, NotMoreComplexSchema1BoxedNumber, NotMoreComplexSchema1BoxedString, NotMoreComplexSchema1BoxedList, NotMoreComplexSchema1BoxedMap { - @Nullable Object getData(); - } - - public record NotMoreComplexSchema1BoxedVoid(Void data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMoreComplexSchema1BoxedBoolean(boolean data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMoreComplexSchema1BoxedNumber(Number data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMoreComplexSchema1BoxedString(String data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMoreComplexSchema1BoxedList(FrozenList<@Nullable Object> data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMoreComplexSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements NotMoreComplexSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NotMoreComplexSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotMoreComplexSchema1BoxedList>, MapSchemaValidator, NotMoreComplexSchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NotMoreComplexSchema1 instance = null; - - protected NotMoreComplexSchema1() { - super(new JsonSchemaInfo() - .not(Not.class) - ); - } - - public static NotMoreComplexSchema1 getInstance() { - if (instance == null) { - instance = new NotMoreComplexSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NotMoreComplexSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedString(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedList(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMoreComplexSchema1BoxedMap(validate(arg, configuration)); - } - @Override - public NotMoreComplexSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java deleted file mode 100644 index 7210bf455e2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NotMultipleTypes.java +++ /dev/null @@ -1,448 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NotMultipleTypes { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface NotBoxed permits NotBoxedNumber, NotBoxedBoolean { - @Nullable Object getData(); - } - - public record NotBoxedNumber(Number data) implements NotBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotBoxedBoolean(boolean data) implements NotBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Not extends JsonSchema implements NumberSchemaValidator, BooleanSchemaValidator { - private static @Nullable Not instance = null; - - protected Not() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class, - Boolean.class - )) - .format("int") - ); - } - - public static Not getInstance() { - if (instance == null) { - instance = new Not(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NotBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NotBoxedNumber(validate(arg, configuration)); - } - @Override - public NotBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NotBoxedBoolean(validate(arg, configuration)); - } - @Override - public NotBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface NotMultipleTypes1Boxed permits NotMultipleTypes1BoxedVoid, NotMultipleTypes1BoxedBoolean, NotMultipleTypes1BoxedNumber, NotMultipleTypes1BoxedString, NotMultipleTypes1BoxedList, NotMultipleTypes1BoxedMap { - @Nullable Object getData(); - } - - public record NotMultipleTypes1BoxedVoid(Void data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMultipleTypes1BoxedBoolean(boolean data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMultipleTypes1BoxedNumber(Number data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMultipleTypes1BoxedString(String data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMultipleTypes1BoxedList(FrozenList<@Nullable Object> data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record NotMultipleTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements NotMultipleTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class NotMultipleTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotMultipleTypes1BoxedList>, MapSchemaValidator, NotMultipleTypes1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NotMultipleTypes1 instance = null; - - protected NotMultipleTypes1() { - super(new JsonSchemaInfo() - .not(Not.class) - ); - } - - public static NotMultipleTypes1 getInstance() { - if (instance == null) { - instance = new NotMultipleTypes1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NotMultipleTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedVoid(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedBoolean(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedNumber(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedString(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedList(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NotMultipleTypes1BoxedMap(validate(arg, configuration)); - } - @Override - public NotMultipleTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java deleted file mode 100644 index a6a140e57c3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NulCharactersInStrings.java +++ /dev/null @@ -1,118 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringEnumValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.StringValueMethod; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class NulCharactersInStrings { - // nest classes so all schemas and input/output classes can be public - - public enum StringNulCharactersInStringsEnums implements StringValueMethod { - HELLO_NULL_THERE("hello\0there"); - private final String value; - - StringNulCharactersInStringsEnums(String value) { - this.value = value; - } - public String value() { - return this.value; - } - } - - - public sealed interface NulCharactersInStrings1Boxed permits NulCharactersInStrings1BoxedString { - @Nullable Object getData(); - } - - public record NulCharactersInStrings1BoxedString(String data) implements NulCharactersInStrings1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class NulCharactersInStrings1 extends JsonSchema implements StringSchemaValidator, StringEnumValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable NulCharactersInStrings1 instance = null; - - protected NulCharactersInStrings1() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .enumValues(SetMaker.makeSet( - "hello\0there" - )) - ); - } - - public static NulCharactersInStrings1 getInstance() { - if (instance == null) { - instance = new NulCharactersInStrings1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public String validate(StringNulCharactersInStringsEnums arg,SchemaConfiguration configuration) throws ValidationException { - return validate(arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public NulCharactersInStrings1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NulCharactersInStrings1BoxedString(validate(arg, configuration)); - } - @Override - public NulCharactersInStrings1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java deleted file mode 100644 index 8bbbe1c483b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObject.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.NullJsonSchema; - -public class NullTypeMatchesOnlyTheNullObject extends NullJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class NullTypeMatchesOnlyTheNullObject1 extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable NullTypeMatchesOnlyTheNullObject1 instance = null; - public static NullTypeMatchesOnlyTheNullObject1 getInstance() { - if (instance == null) { - instance = new NullTypeMatchesOnlyTheNullObject1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java deleted file mode 100644 index 86af9ace4a4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/NumberTypeMatchesNumbers.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.NumberJsonSchema; - -public class NumberTypeMatchesNumbers extends NumberJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class NumberTypeMatchesNumbers1 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable NumberTypeMatchesNumbers1 instance = null; - public static NumberTypeMatchesNumbers1 getInstance() { - if (instance == null) { - instance = new NumberTypeMatchesNumbers1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java deleted file mode 100644 index e6ce77a33d8..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectPropertiesValidation.java +++ /dev/null @@ -1,466 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ObjectPropertiesValidation { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Bar extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class ObjectPropertiesValidationMap extends FrozenMap<@Nullable Object> { - protected ObjectPropertiesValidationMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo", - "bar" - ); - public static ObjectPropertiesValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ObjectPropertiesValidation1.getInstance().validate(arg, configuration); - } - - public Number foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (Number) value; - } - - public String bar() throws UnsetPropertyException { - String key = "bar"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class ObjectPropertiesValidationMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo, SetterForBar { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public ObjectPropertiesValidationMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public ObjectPropertiesValidationMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public ObjectPropertiesValidationMapBuilder getBuilderAfterBar(Map instance) { - return this; - } - public ObjectPropertiesValidationMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface ObjectPropertiesValidation1Boxed permits ObjectPropertiesValidation1BoxedVoid, ObjectPropertiesValidation1BoxedBoolean, ObjectPropertiesValidation1BoxedNumber, ObjectPropertiesValidation1BoxedString, ObjectPropertiesValidation1BoxedList, ObjectPropertiesValidation1BoxedMap { - @Nullable Object getData(); - } - - public record ObjectPropertiesValidation1BoxedVoid(Void data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ObjectPropertiesValidation1BoxedBoolean(boolean data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ObjectPropertiesValidation1BoxedNumber(Number data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ObjectPropertiesValidation1BoxedString(String data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ObjectPropertiesValidation1BoxedList(FrozenList<@Nullable Object> data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ObjectPropertiesValidation1BoxedMap(ObjectPropertiesValidationMap data) implements ObjectPropertiesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ObjectPropertiesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ObjectPropertiesValidation1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ObjectPropertiesValidation1 instance = null; - - protected ObjectPropertiesValidation1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - ); - } - - public static ObjectPropertiesValidation1 getInstance() { - if (instance == null) { - instance = new ObjectPropertiesValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ObjectPropertiesValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new ObjectPropertiesValidationMap(castProperties); - } - - public ObjectPropertiesValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ObjectPropertiesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedString(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedList(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectPropertiesValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public ObjectPropertiesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java deleted file mode 100644 index a373c375bdd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ObjectTypeMatchesObjects.java +++ /dev/null @@ -1,20 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.MapJsonSchema; -import unit_test_api.schemas.validation.FrozenMap; - -public class ObjectTypeMatchesObjects extends MapJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class ObjectTypeMatchesObjects1 extends MapJsonSchema.MapJsonSchema1 { - private static @Nullable ObjectTypeMatchesObjects1 instance = null; - public static ObjectTypeMatchesObjects1 getInstance() { - if (instance == null) { - instance = new ObjectTypeMatchesObjects1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java deleted file mode 100644 index 45dcfee8933..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/Oneof.java +++ /dev/null @@ -1,626 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class Oneof { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .minimum(2) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Oneof1Boxed permits Oneof1BoxedVoid, Oneof1BoxedBoolean, Oneof1BoxedNumber, Oneof1BoxedString, Oneof1BoxedList, Oneof1BoxedMap { - @Nullable Object getData(); - } - - public record Oneof1BoxedVoid(Void data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Oneof1BoxedBoolean(boolean data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Oneof1BoxedNumber(Number data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Oneof1BoxedString(String data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Oneof1BoxedList(FrozenList<@Nullable Object> data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Oneof1BoxedMap(FrozenMap<@Nullable Object> data) implements Oneof1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Oneof1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Oneof1BoxedList>, MapSchemaValidator, Oneof1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable Oneof1 instance = null; - - protected Oneof1() { - super(new JsonSchemaInfo() - .oneOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static Oneof1 getInstance() { - if (instance == null) { - instance = new Oneof1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Oneof1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedVoid(validate(arg, configuration)); - } - @Override - public Oneof1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Oneof1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedNumber(validate(arg, configuration)); - } - @Override - public Oneof1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedString(validate(arg, configuration)); - } - @Override - public Oneof1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedList(validate(arg, configuration)); - } - @Override - public Oneof1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Oneof1BoxedMap(validate(arg, configuration)); - } - @Override - public Oneof1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java deleted file mode 100644 index e4e77c6e410..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofComplexTypes.java +++ /dev/null @@ -1,1098 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class OneofComplexTypes { - // nest classes so all schemas and input/output classes can be public - - - public static class Bar extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar" - ); - public static final Set optionalKeys = Set.of(); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public Number bar() { - @Nullable Object value = get("bar"); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class Schema0Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema0MapBuilder implements SetterForBar { - private final Map instance; - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema0Map0Builder getBuilderAfterBar(Map instance) { - return new Schema0Map0Builder(instance); - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "bar" - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Schema1Map extends FrozenMap<@Nullable Object> { - protected Schema1Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema1.getInstance().validate(arg, configuration); - } - - public String foo() { - @Nullable Object value = get("foo"); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema1Map0Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema1Map0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema1MapBuilder implements SetterForFoo { - private final Map instance; - public Schema1MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema1Map0Builder getBuilderAfterFoo(Map instance) { - return new Schema1Map0Builder(instance); - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .required(Set.of( - "foo" - )) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema1Map(castProperties); - } - - public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface OneofComplexTypes1Boxed permits OneofComplexTypes1BoxedVoid, OneofComplexTypes1BoxedBoolean, OneofComplexTypes1BoxedNumber, OneofComplexTypes1BoxedString, OneofComplexTypes1BoxedList, OneofComplexTypes1BoxedMap { - @Nullable Object getData(); - } - - public record OneofComplexTypes1BoxedVoid(Void data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofComplexTypes1BoxedBoolean(boolean data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofComplexTypes1BoxedNumber(Number data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofComplexTypes1BoxedString(String data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofComplexTypes1BoxedList(FrozenList<@Nullable Object> data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofComplexTypes1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofComplexTypes1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class OneofComplexTypes1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, OneofComplexTypes1BoxedList>, MapSchemaValidator, OneofComplexTypes1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable OneofComplexTypes1 instance = null; - - protected OneofComplexTypes1() { - super(new JsonSchemaInfo() - .oneOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static OneofComplexTypes1 getInstance() { - if (instance == null) { - instance = new OneofComplexTypes1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public OneofComplexTypes1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedVoid(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedBoolean(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedNumber(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedString(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedList(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofComplexTypes1BoxedMap(validate(arg, configuration)); - } - @Override - public OneofComplexTypes1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java deleted file mode 100644 index 1ee2a187b15..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithBaseSchema.java +++ /dev/null @@ -1,669 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class OneofWithBaseSchema { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .minLength(2) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .maxLength(4) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface OneofWithBaseSchema1Boxed permits OneofWithBaseSchema1BoxedString { - @Nullable Object getData(); - } - - public record OneofWithBaseSchema1BoxedString(String data) implements OneofWithBaseSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class OneofWithBaseSchema1 extends JsonSchema implements StringSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable OneofWithBaseSchema1 instance = null; - - protected OneofWithBaseSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .oneOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static OneofWithBaseSchema1 getInstance() { - if (instance == null) { - instance = new OneofWithBaseSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public OneofWithBaseSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithBaseSchema1BoxedString(validate(arg, configuration)); - } - @Override - public OneofWithBaseSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java deleted file mode 100644 index f353c280af7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithEmptySchema.java +++ /dev/null @@ -1,352 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class OneofWithEmptySchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface OneofWithEmptySchema1Boxed permits OneofWithEmptySchema1BoxedVoid, OneofWithEmptySchema1BoxedBoolean, OneofWithEmptySchema1BoxedNumber, OneofWithEmptySchema1BoxedString, OneofWithEmptySchema1BoxedList, OneofWithEmptySchema1BoxedMap { - @Nullable Object getData(); - } - - public record OneofWithEmptySchema1BoxedVoid(Void data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofWithEmptySchema1BoxedBoolean(boolean data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofWithEmptySchema1BoxedNumber(Number data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofWithEmptySchema1BoxedString(String data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofWithEmptySchema1BoxedList(FrozenList<@Nullable Object> data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record OneofWithEmptySchema1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofWithEmptySchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class OneofWithEmptySchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, OneofWithEmptySchema1BoxedList>, MapSchemaValidator, OneofWithEmptySchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable OneofWithEmptySchema1 instance = null; - - protected OneofWithEmptySchema1() { - super(new JsonSchemaInfo() - .oneOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static OneofWithEmptySchema1 getInstance() { - if (instance == null) { - instance = new OneofWithEmptySchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public OneofWithEmptySchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedString(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedList(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithEmptySchema1BoxedMap(validate(arg, configuration)); - } - @Override - public OneofWithEmptySchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java deleted file mode 100644 index 59590380e1f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/OneofWithRequired.java +++ /dev/null @@ -1,1143 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class OneofWithRequired { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema0Map extends FrozenMap<@Nullable Object> { - protected Schema0Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "bar", - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema0Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema0.getInstance().validate(arg, configuration); - } - - public @Nullable Object bar() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object foo() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(Void value) { - var instance = getInstance(); - instance.put("bar", null); - return getBuilderAfterBar(instance); - } - - default T bar(boolean value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(List value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(Map value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class Schema0Map00Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "bar", - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema0Map00Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map00Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema0Map01Builder implements SetterForFoo { - private final Map instance; - public Schema0Map01Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map00Builder getBuilderAfterFoo(Map instance) { - return new Schema0Map00Builder(instance); - } - } - - public static class Schema0Map10Builder implements SetterForBar { - private final Map instance; - public Schema0Map10Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public Schema0Map00Builder getBuilderAfterBar(Map instance) { - return new Schema0Map00Builder(instance); - } - } - - public static class Schema0MapBuilder implements SetterForBar, SetterForFoo { - private final Map instance; - public Schema0MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema0Map01Builder getBuilderAfterBar(Map instance) { - return new Schema0Map01Builder(instance); - } - public Schema0Map10Builder getBuilderAfterFoo(Map instance) { - return new Schema0Map10Builder(instance); - } - } - - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(Schema0Map data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .required(Set.of( - "bar", - "foo" - )) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema0Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema0Map(castProperties); - } - - public Schema0Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Schema1Map extends FrozenMap<@Nullable Object> { - protected Schema1Map(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "baz", - "foo" - ); - public static final Set optionalKeys = Set.of(); - public static Schema1Map of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Schema1.getInstance().validate(arg, configuration); - } - - public @Nullable Object baz() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object foo() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForBaz { - Map getInstance(); - T getBuilderAfterBaz(Map instance); - - default T baz(Void value) { - var instance = getInstance(); - instance.put("baz", null); - return getBuilderAfterBaz(instance); - } - - default T baz(boolean value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(String value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(int value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(float value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(long value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(double value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(List value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - - default T baz(Map value) { - var instance = getInstance(); - instance.put("baz", value); - return getBuilderAfterBaz(instance); - } - } - - public interface SetterForFoo1 { - Map getInstance(); - T getBuilderAfterFoo1(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo1(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo1(instance); - } - } - - public static class Schema1Map00Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "baz", - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public Schema1Map00Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map00Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class Schema1Map01Builder implements SetterForFoo1 { - private final Map instance; - public Schema1Map01Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map00Builder getBuilderAfterFoo1(Map instance) { - return new Schema1Map00Builder(instance); - } - } - - public static class Schema1Map10Builder implements SetterForBaz { - private final Map instance; - public Schema1Map10Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public Schema1Map00Builder getBuilderAfterBaz(Map instance) { - return new Schema1Map00Builder(instance); - } - } - - public static class Schema1MapBuilder implements SetterForBaz, SetterForFoo1 { - private final Map instance; - public Schema1MapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public Schema1Map01Builder getBuilderAfterBaz(Map instance) { - return new Schema1Map01Builder(instance); - } - public Schema1Map10Builder getBuilderAfterFoo1(Map instance) { - return new Schema1Map10Builder(instance); - } - } - - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(Schema1Map data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .required(Set.of( - "baz", - "foo" - )) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Schema1Map getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new Schema1Map(castProperties); - } - - public Schema1Map validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface OneofWithRequired1Boxed permits OneofWithRequired1BoxedMap { - @Nullable Object getData(); - } - - public record OneofWithRequired1BoxedMap(FrozenMap<@Nullable Object> data) implements OneofWithRequired1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class OneofWithRequired1 extends JsonSchema implements MapSchemaValidator, OneofWithRequired1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable OneofWithRequired1 instance = null; - - protected OneofWithRequired1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .oneOf(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static OneofWithRequired1 getInstance() { - if (instance == null) { - instance = new OneofWithRequired1(); - } - return instance; - } - - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public OneofWithRequired1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new OneofWithRequired1BoxedMap(validate(arg, configuration)); - } - @Override - public OneofWithRequired1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java deleted file mode 100644 index 88ee8711a13..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternIsNotAnchored.java +++ /dev/null @@ -1,330 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PatternIsNotAnchored { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface PatternIsNotAnchored1Boxed permits PatternIsNotAnchored1BoxedVoid, PatternIsNotAnchored1BoxedBoolean, PatternIsNotAnchored1BoxedNumber, PatternIsNotAnchored1BoxedString, PatternIsNotAnchored1BoxedList, PatternIsNotAnchored1BoxedMap { - @Nullable Object getData(); - } - - public record PatternIsNotAnchored1BoxedVoid(Void data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternIsNotAnchored1BoxedBoolean(boolean data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternIsNotAnchored1BoxedNumber(Number data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternIsNotAnchored1BoxedString(String data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternIsNotAnchored1BoxedList(FrozenList<@Nullable Object> data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternIsNotAnchored1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternIsNotAnchored1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PatternIsNotAnchored1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternIsNotAnchored1BoxedList>, MapSchemaValidator, PatternIsNotAnchored1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PatternIsNotAnchored1 instance = null; - - protected PatternIsNotAnchored1() { - super(new JsonSchemaInfo() - .pattern(Pattern.compile( - "a+" - )) - ); - } - - public static PatternIsNotAnchored1 getInstance() { - if (instance == null) { - instance = new PatternIsNotAnchored1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PatternIsNotAnchored1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedVoid(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedNumber(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedString(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedList(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternIsNotAnchored1BoxedMap(validate(arg, configuration)); - } - @Override - public PatternIsNotAnchored1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java deleted file mode 100644 index 3c7f6d5a51c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternValidation.java +++ /dev/null @@ -1,330 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PatternValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface PatternValidation1Boxed permits PatternValidation1BoxedVoid, PatternValidation1BoxedBoolean, PatternValidation1BoxedNumber, PatternValidation1BoxedString, PatternValidation1BoxedList, PatternValidation1BoxedMap { - @Nullable Object getData(); - } - - public record PatternValidation1BoxedVoid(Void data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternValidation1BoxedBoolean(boolean data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternValidation1BoxedNumber(Number data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternValidation1BoxedString(String data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternValidation1BoxedList(FrozenList<@Nullable Object> data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PatternValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternValidation1BoxedList>, MapSchemaValidator, PatternValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PatternValidation1 instance = null; - - protected PatternValidation1() { - super(new JsonSchemaInfo() - .pattern(Pattern.compile( - "^a*$" - )) - ); - } - - public static PatternValidation1 getInstance() { - if (instance == null) { - instance = new PatternValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PatternValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public PatternValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PatternValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public PatternValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedString(validate(arg, configuration)); - } - @Override - public PatternValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedList(validate(arg, configuration)); - } - @Override - public PatternValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public PatternValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java deleted file mode 100644 index 3560cab005d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegex.java +++ /dev/null @@ -1,343 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PatternpropertiesValidatesPropertiesMatchingARegex { - // nest classes so all schemas and input/output classes can be public - - - public static class Fo extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Fo instance = null; - public static Fo getInstance() { - if (instance == null) { - instance = new Fo(); - } - return instance; - } - } - - - public sealed interface PatternpropertiesValidatesPropertiesMatchingARegex1Boxed permits PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap { - @Nullable Object getData(); - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid(Void data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean(boolean data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber(Number data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString(String data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList(FrozenList<@Nullable Object> data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternpropertiesValidatesPropertiesMatchingARegex1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PatternpropertiesValidatesPropertiesMatchingARegex1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList>, MapSchemaValidator, PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PatternpropertiesValidatesPropertiesMatchingARegex1 instance = null; - - protected PatternpropertiesValidatesPropertiesMatchingARegex1() { - super(new JsonSchemaInfo() - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("f.*o"), Fo.class) - )) - ); - } - - public static PatternpropertiesValidatesPropertiesMatchingARegex1 getInstance() { - if (instance == null) { - instance = new PatternpropertiesValidatesPropertiesMatchingARegex1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedVoid(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedNumber(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedString(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedList(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesValidatesPropertiesMatchingARegex1BoxedMap(validate(arg, configuration)); - } - @Override - public PatternpropertiesValidatesPropertiesMatchingARegex1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java deleted file mode 100644 index 52427b682f3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstanceProperties.java +++ /dev/null @@ -1,343 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PatternpropertiesWithNullValuedInstanceProperties { - // nest classes so all schemas and input/output classes can be public - - - public static class Bar extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public sealed interface PatternpropertiesWithNullValuedInstanceProperties1Boxed permits PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid, PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean, PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber, PatternpropertiesWithNullValuedInstanceProperties1BoxedString, PatternpropertiesWithNullValuedInstanceProperties1BoxedList, PatternpropertiesWithNullValuedInstanceProperties1BoxedMap { - @Nullable Object getData(); - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PatternpropertiesWithNullValuedInstanceProperties1BoxedMap(FrozenMap<@Nullable Object> data) implements PatternpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PatternpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PatternpropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator, PatternpropertiesWithNullValuedInstanceProperties1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PatternpropertiesWithNullValuedInstanceProperties1 instance = null; - - protected PatternpropertiesWithNullValuedInstanceProperties1() { - super(new JsonSchemaInfo() - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("^.*bar$"), Bar.class) - )) - ); - } - - public static PatternpropertiesWithNullValuedInstanceProperties1 getInstance() { - if (instance == null) { - instance = new PatternpropertiesWithNullValuedInstanceProperties1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PatternpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); - } - @Override - public PatternpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java deleted file mode 100644 index 3e1c9aef782..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItems.java +++ /dev/null @@ -1,198 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PrefixitemsValidationAdjustsTheStartingIndexForItems { - // nest classes so all schemas and input/output classes can be public - - - public static class Items extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable Items instance = null; - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - } - - - public static class PrefixitemsValidationAdjustsTheStartingIndexForItemsList extends FrozenList { - protected PrefixitemsValidationAdjustsTheStartingIndexForItemsList(FrozenList m) { - super(m); - } - public static PrefixitemsValidationAdjustsTheStartingIndexForItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance().validate(arg, configuration); - } - } - - public static class PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder { - // class to build List - private final List list; - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder() { - list = new ArrayList<>(); - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder(List list) { - this.list = list; - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(int item) { - list.add(item); - return this; - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(float item) { - list.add(item); - return this; - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(long item) { - list.add(item); - return this; - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(double item) { - list.add(item); - return this; - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder add(String item) { - list.add(item); - return this; - } - - public List build() { - return list; - } - } - - - public static class Schema0 extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed permits PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList { - @Nullable Object getData(); - } - - public record PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList(PrefixitemsValidationAdjustsTheStartingIndexForItemsList data) implements PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class PrefixitemsValidationAdjustsTheStartingIndexForItems1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PrefixitemsValidationAdjustsTheStartingIndexForItems1 instance = null; - - protected PrefixitemsValidationAdjustsTheStartingIndexForItems1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - .prefixItems(List.of( - Schema0.class - )) - ); - } - - public static PrefixitemsValidationAdjustsTheStartingIndexForItems1 getInstance() { - if (instance == null) { - instance = new PrefixitemsValidationAdjustsTheStartingIndexForItems1(); - } - return instance; - } - - @Override - public PrefixitemsValidationAdjustsTheStartingIndexForItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof Object)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((Object) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new PrefixitemsValidationAdjustsTheStartingIndexForItemsList(newInstanceItems); - } - - public PrefixitemsValidationAdjustsTheStartingIndexForItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsValidationAdjustsTheStartingIndexForItems1BoxedList(validate(arg, configuration)); - } - @Override - public PrefixitemsValidationAdjustsTheStartingIndexForItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java deleted file mode 100644 index 226d6575318..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElements.java +++ /dev/null @@ -1,413 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PrefixitemsWithNullInstanceElements { - // nest classes so all schemas and input/output classes can be public - - - public static class PrefixitemsWithNullInstanceElementsList extends FrozenList<@Nullable Object> { - protected PrefixitemsWithNullInstanceElementsList(FrozenList<@Nullable Object> m) { - super(m); - } - public static PrefixitemsWithNullInstanceElementsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return PrefixitemsWithNullInstanceElements1.getInstance().validate(arg, configuration); - } - } - - public static class PrefixitemsWithNullInstanceElementsListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public PrefixitemsWithNullInstanceElementsListBuilder() { - list = new ArrayList<>(); - } - - public PrefixitemsWithNullInstanceElementsListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(Void item) { - list.add(null); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(boolean item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(String item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(int item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(float item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(long item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(double item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(List item) { - list.add(item); - return this; - } - - public PrefixitemsWithNullInstanceElementsListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public static class Schema0 extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public sealed interface PrefixitemsWithNullInstanceElements1Boxed permits PrefixitemsWithNullInstanceElements1BoxedVoid, PrefixitemsWithNullInstanceElements1BoxedBoolean, PrefixitemsWithNullInstanceElements1BoxedNumber, PrefixitemsWithNullInstanceElements1BoxedString, PrefixitemsWithNullInstanceElements1BoxedList, PrefixitemsWithNullInstanceElements1BoxedMap { - @Nullable Object getData(); - } - - public record PrefixitemsWithNullInstanceElements1BoxedVoid(Void data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PrefixitemsWithNullInstanceElements1BoxedBoolean(boolean data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PrefixitemsWithNullInstanceElements1BoxedNumber(Number data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PrefixitemsWithNullInstanceElements1BoxedString(String data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PrefixitemsWithNullInstanceElements1BoxedList(PrefixitemsWithNullInstanceElementsList data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PrefixitemsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements PrefixitemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PrefixitemsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, PrefixitemsWithNullInstanceElements1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PrefixitemsWithNullInstanceElements1 instance = null; - - protected PrefixitemsWithNullInstanceElements1() { - super(new JsonSchemaInfo() - .prefixItems(List.of( - Schema0.class - )) - ); - } - - public static PrefixitemsWithNullInstanceElements1 getInstance() { - if (instance == null) { - instance = new PrefixitemsWithNullInstanceElements1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public PrefixitemsWithNullInstanceElementsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new PrefixitemsWithNullInstanceElementsList(newInstanceItems); - } - - public PrefixitemsWithNullInstanceElementsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedString(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PrefixitemsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); - } - @Override - public PrefixitemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java deleted file mode 100644 index 5691d24dabf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteraction.java +++ /dev/null @@ -1,673 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.ListJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertiesPatternpropertiesAdditionalpropertiesInteraction { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends IntJsonSchema.IntJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public sealed interface FoBoxed permits FoBoxedVoid, FoBoxedBoolean, FoBoxedNumber, FoBoxedString, FoBoxedList, FoBoxedMap { - @Nullable Object getData(); - } - - public record FoBoxedVoid(Void data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoBoxedBoolean(boolean data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoBoxedNumber(Number data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoBoxedString(String data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoBoxedList(FrozenList<@Nullable Object> data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record FoBoxedMap(FrozenMap<@Nullable Object> data) implements FoBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Fo extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, FoBoxedList>, MapSchemaValidator, FoBoxedMap> { - private static @Nullable Fo instance = null; - - protected Fo() { - super(new JsonSchemaInfo() - .minItems(2) - ); - } - - public static Fo getInstance() { - if (instance == null) { - instance = new Fo(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FoBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedVoid(validate(arg, configuration)); - } - @Override - public FoBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedBoolean(validate(arg, configuration)); - } - @Override - public FoBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedNumber(validate(arg, configuration)); - } - @Override - public FoBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedString(validate(arg, configuration)); - } - @Override - public FoBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedList(validate(arg, configuration)); - } - @Override - public FoBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new FoBoxedMap(validate(arg, configuration)); - } - @Override - public FoBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface FooBoxed permits FooBoxedList { - @Nullable Object getData(); - } - - public record FooBoxedList(FrozenList<@Nullable Object> data) implements FooBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class Foo extends JsonSchema implements ListSchemaValidator, FooBoxedList> { - private static @Nullable Foo instance = null; - - protected Foo() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .maxItems(3) - ); - } - - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public FooBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new FooBoxedList(validate(arg, configuration)); - } - @Override - public FooBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Bar extends ListJsonSchema.ListJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMap extends FrozenMap { - protected PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(FrozenMap m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo", - "bar" - ); - public static PropertiesPatternpropertiesAdditionalpropertiesInteractionMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance().validate(arg, configuration); - } - - public FrozenList foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - Object value = get(key); - if (!(value instanceof FrozenList)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (FrozenList) value; - } - - public FrozenList bar() throws UnsetPropertyException { - String key = "bar"; - throwIfKeyNotPresent(key); - Object value = get(key); - if (!(value instanceof FrozenList)) { - throw new RuntimeException("Invalid value stored for bar"); - } - return (FrozenList) value; - } - - public Number getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - var value = getOrThrow(name); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for " + name); - } - return (Number) value; - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(List<@Nullable Object> value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(List<@Nullable Object> value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder implements GenericBuilder>, SetterForFoo, SetterForBar, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterBar(Map instance) { - return this; - } - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed permits PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap { - @Nullable Object getData(); - } - - public record PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap(PropertiesPatternpropertiesAdditionalpropertiesInteractionMap data) implements PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertiesPatternpropertiesAdditionalpropertiesInteraction1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertiesPatternpropertiesAdditionalpropertiesInteraction1 instance = null; - - protected PropertiesPatternpropertiesAdditionalpropertiesInteraction1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - .additionalProperties(AdditionalProperties.class) - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("f.o"), Fo.class) - )) - ); - } - - public static PropertiesPatternpropertiesAdditionalpropertiesInteraction1 getInstance() { - if (instance == null) { - instance = new PropertiesPatternpropertiesAdditionalpropertiesInteraction1(); - } - return instance; - } - - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - if (!(propertyInstance instanceof Object)) { - throw new RuntimeException("Invalid instantiated value"); - } - properties.put(propertyName, (Object) propertyInstance); - } - FrozenMap castProperties = new FrozenMap<>(properties); - return new PropertiesPatternpropertiesAdditionalpropertiesInteractionMap(castProperties); - } - - public PropertiesPatternpropertiesAdditionalpropertiesInteractionMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesPatternpropertiesAdditionalpropertiesInteraction1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertiesPatternpropertiesAdditionalpropertiesInteraction1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java deleted file mode 100644 index 5832d590dc9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ /dev/null @@ -1,913 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertiesWhoseNamesAreJavascriptObjectPropertyNames { - // nest classes so all schemas and input/output classes can be public - - - public static class Proto extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Proto instance = null; - public static Proto getInstance() { - if (instance == null) { - instance = new Proto(); - } - return instance; - } - } - - - public static class Length extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Length instance = null; - public static Length getInstance() { - if (instance == null) { - instance = new Length(); - } - return instance; - } - } - - - public static class ToStringMap extends FrozenMap<@Nullable Object> { - protected ToStringMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "length" - ); - public static ToStringMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ToString.getInstance().validate(arg, configuration); - } - - public String length() throws UnsetPropertyException { - String key = "length"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for length"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForLength { - Map getInstance(); - T getBuilderAfterLength(Map instance); - - default T length(String value) { - var instance = getInstance(); - instance.put("length", value); - return getBuilderAfterLength(instance); - } - } - - public static class ToStringMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForLength { - private final Map instance; - private static final Set knownKeys = Set.of( - "length" - ); - public Set getKnownKeys() { - return knownKeys; - } - public ToStringMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public ToStringMapBuilder getBuilderAfterLength(Map instance) { - return this; - } - public ToStringMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface ToStringBoxed permits ToStringBoxedVoid, ToStringBoxedBoolean, ToStringBoxedNumber, ToStringBoxedString, ToStringBoxedList, ToStringBoxedMap { - @Nullable Object getData(); - } - - public record ToStringBoxedVoid(Void data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ToStringBoxedBoolean(boolean data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ToStringBoxedNumber(Number data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ToStringBoxedString(String data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ToStringBoxedList(FrozenList<@Nullable Object> data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ToStringBoxedMap(ToStringMap data) implements ToStringBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ToString extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ToStringBoxedList>, MapSchemaValidator { - private static @Nullable ToString instance = null; - - protected ToString() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("length", Length.class) - )) - ); - } - - public static ToString getInstance() { - if (instance == null) { - instance = new ToString(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ToStringMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new ToStringMap(castProperties); - } - - public ToStringMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ToStringBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedVoid(validate(arg, configuration)); - } - @Override - public ToStringBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedBoolean(validate(arg, configuration)); - } - @Override - public ToStringBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedNumber(validate(arg, configuration)); - } - @Override - public ToStringBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedString(validate(arg, configuration)); - } - @Override - public ToStringBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedList(validate(arg, configuration)); - } - @Override - public ToStringBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ToStringBoxedMap(validate(arg, configuration)); - } - @Override - public ToStringBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class Constructor extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Constructor instance = null; - public static Constructor getInstance() { - if (instance == null) { - instance = new Constructor(); - } - return instance; - } - } - - - public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap extends FrozenMap<@Nullable Object> { - protected PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "__proto__", - "toString", - "constructor" - ); - public static PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance().validate(arg, configuration); - } - - public @Nullable Object toString() throws UnsetPropertyException { - String key = "toString"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Object)) { - throw new RuntimeException("Invalid value stored for toString"); - } - return (@Nullable Object) value; - } - - public Number constructor() throws UnsetPropertyException { - String key = "constructor"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for constructor"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForProto { - Map getInstance(); - T getBuilderAfterProto(Map instance); - - default T lowLineProto(int value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(float value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(long value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(double value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - } - - public interface SetterForToString { - Map getInstance(); - T getBuilderAfterToString(Map instance); - - default T toString(Void value) { - var instance = getInstance(); - instance.put("toString", null); - return getBuilderAfterToString(instance); - } - - default T toString(boolean value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(String value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(int value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(float value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(long value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(double value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(List value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(Map value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - } - - public interface SetterForConstructor { - Map getInstance(); - T getBuilderAfterConstructor(Map instance); - - default T constructor(int value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(float value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(long value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(double value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - } - - public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForProto, SetterForToString, SetterForConstructor { - private final Map instance; - private static final Set knownKeys = Set.of( - "__proto__", - "toString", - "constructor" - ); - public Set getKnownKeys() { - return knownKeys; - } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterProto(Map instance) { - return this; - } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterToString(Map instance) { - return this; - } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterConstructor(Map instance) { - return this; - } - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed permits PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap { - @Nullable Object getData(); - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(Void data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(boolean data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(Number data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(String data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap data) implements PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 instance = null; - - protected PropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("__proto__", Proto.class), - new PropertyEntry("toString", ToString.class), - new PropertyEntry("constructor", Constructor.class) - )) - ); - } - - public static PropertiesWhoseNamesAreJavascriptObjectPropertyNames1 getInstance() { - if (instance == null) { - instance = new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(castProperties); - } - - public PropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java deleted file mode 100644 index 9771b401609..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithEscapedCharacters.java +++ /dev/null @@ -1,647 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertiesWithEscapedCharacters { - // nest classes so all schemas and input/output classes can be public - - - public static class Foonbar extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Foonbar instance = null; - public static Foonbar getInstance() { - if (instance == null) { - instance = new Foonbar(); - } - return instance; - } - } - - - public static class Foobar extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Foobar instance = null; - public static Foobar getInstance() { - if (instance == null) { - instance = new Foobar(); - } - return instance; - } - } - - - public static class Foobar1 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Foobar1 instance = null; - public static Foobar1 getInstance() { - if (instance == null) { - instance = new Foobar1(); - } - return instance; - } - } - - - public static class Foorbar extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Foorbar instance = null; - public static Foorbar getInstance() { - if (instance == null) { - instance = new Foorbar(); - } - return instance; - } - } - - - public static class Footbar extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Footbar instance = null; - public static Footbar getInstance() { - if (instance == null) { - instance = new Footbar(); - } - return instance; - } - } - - - public static class Foofbar extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Foofbar instance = null; - public static Foofbar getInstance() { - if (instance == null) { - instance = new Foofbar(); - } - return instance; - } - } - - - public static class PropertiesWithEscapedCharactersMap extends FrozenMap<@Nullable Object> { - protected PropertiesWithEscapedCharactersMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ); - public static PropertiesWithEscapedCharactersMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return PropertiesWithEscapedCharacters1.getInstance().validate(arg, configuration); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoonbar { - Map getInstance(); - T getBuilderAfterFoonbar(Map instance); - - default T fooReverseSolidusNbar(int value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(float value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(long value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(double value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - } - - public interface SetterForFoobar { - Map getInstance(); - T getBuilderAfterFoobar(Map instance); - - default T fooReverseSolidusQuotationMarkBar(int value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(float value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(long value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(double value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - } - - public interface SetterForFoobar1 { - Map getInstance(); - T getBuilderAfterFoobar1(Map instance); - - default T fooReverseSolidusReverseSolidusBar(int value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(float value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(long value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(double value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - } - - public interface SetterForFoorbar { - Map getInstance(); - T getBuilderAfterFoorbar(Map instance); - - default T fooReverseSolidusRbar(int value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(float value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(long value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(double value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - } - - public interface SetterForFootbar { - Map getInstance(); - T getBuilderAfterFootbar(Map instance); - - default T fooReverseSolidusTbar(int value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(float value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(long value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(double value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - } - - public interface SetterForFoofbar { - Map getInstance(); - T getBuilderAfterFoofbar(Map instance); - - default T fooReverseSolidusFbar(int value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(float value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(long value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(double value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - } - - public static class PropertiesWithEscapedCharactersMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoonbar, SetterForFoobar, SetterForFoobar1, SetterForFoorbar, SetterForFootbar, SetterForFoofbar { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public PropertiesWithEscapedCharactersMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoonbar(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoobar(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoobar1(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoorbar(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFootbar(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterFoofbar(Map instance) { - return this; - } - public PropertiesWithEscapedCharactersMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface PropertiesWithEscapedCharacters1Boxed permits PropertiesWithEscapedCharacters1BoxedVoid, PropertiesWithEscapedCharacters1BoxedBoolean, PropertiesWithEscapedCharacters1BoxedNumber, PropertiesWithEscapedCharacters1BoxedString, PropertiesWithEscapedCharacters1BoxedList, PropertiesWithEscapedCharacters1BoxedMap { - @Nullable Object getData(); - } - - public record PropertiesWithEscapedCharacters1BoxedVoid(Void data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithEscapedCharacters1BoxedBoolean(boolean data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithEscapedCharacters1BoxedNumber(Number data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithEscapedCharacters1BoxedString(String data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithEscapedCharacters1BoxedMap(PropertiesWithEscapedCharactersMap data) implements PropertiesWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertiesWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWithEscapedCharacters1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertiesWithEscapedCharacters1 instance = null; - - protected PropertiesWithEscapedCharacters1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo\nbar", Foonbar.class), - new PropertyEntry("foo\"bar", Foobar.class), - new PropertyEntry("foo\\bar", Foobar1.class), - new PropertyEntry("foo\rbar", Foorbar.class), - new PropertyEntry("foo\tbar", Footbar.class), - new PropertyEntry("foo\fbar", Foofbar.class) - )) - ); - } - - public static PropertiesWithEscapedCharacters1 getInstance() { - if (instance == null) { - instance = new PropertiesWithEscapedCharacters1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public PropertiesWithEscapedCharactersMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new PropertiesWithEscapedCharactersMap(castProperties); - } - - public PropertiesWithEscapedCharactersMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertiesWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedString(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedList(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithEscapedCharacters1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertiesWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java deleted file mode 100644 index c0ae22f7fe3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstanceProperties.java +++ /dev/null @@ -1,409 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertiesWithNullValuedInstanceProperties { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class PropertiesWithNullValuedInstancePropertiesMap extends FrozenMap<@Nullable Object> { - protected PropertiesWithNullValuedInstancePropertiesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static PropertiesWithNullValuedInstancePropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return PropertiesWithNullValuedInstanceProperties1.getInstance().validate(arg, configuration); - } - - public Void foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value == null || value instanceof Void)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (Void) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - } - - public static class PropertiesWithNullValuedInstancePropertiesMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public PropertiesWithNullValuedInstancePropertiesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public PropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public PropertiesWithNullValuedInstancePropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface PropertiesWithNullValuedInstanceProperties1Boxed permits PropertiesWithNullValuedInstanceProperties1BoxedVoid, PropertiesWithNullValuedInstanceProperties1BoxedBoolean, PropertiesWithNullValuedInstanceProperties1BoxedNumber, PropertiesWithNullValuedInstanceProperties1BoxedString, PropertiesWithNullValuedInstanceProperties1BoxedList, PropertiesWithNullValuedInstanceProperties1BoxedMap { - @Nullable Object getData(); - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertiesWithNullValuedInstanceProperties1BoxedMap(PropertiesWithNullValuedInstancePropertiesMap data) implements PropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertiesWithNullValuedInstanceProperties1 instance = null; - - protected PropertiesWithNullValuedInstanceProperties1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static PropertiesWithNullValuedInstanceProperties1 getInstance() { - if (instance == null) { - instance = new PropertiesWithNullValuedInstanceProperties1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public PropertiesWithNullValuedInstancePropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new PropertiesWithNullValuedInstancePropertiesMap(castProperties); - } - - public PropertiesWithNullValuedInstancePropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java deleted file mode 100644 index d69c3729b82..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReference.java +++ /dev/null @@ -1,399 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertyNamedRefThatIsNotAReference { - // nest classes so all schemas and input/output classes can be public - - - public static class Ref extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Ref instance = null; - public static Ref getInstance() { - if (instance == null) { - instance = new Ref(); - } - return instance; - } - } - - - public static class PropertyNamedRefThatIsNotAReferenceMap extends FrozenMap<@Nullable Object> { - protected PropertyNamedRefThatIsNotAReferenceMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "$ref" - ); - public static PropertyNamedRefThatIsNotAReferenceMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return PropertyNamedRefThatIsNotAReference1.getInstance().validate(arg, configuration); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForRef { - Map getInstance(); - T getBuilderAfterRef(Map instance); - - default T dollarSignRef(String value) { - var instance = getInstance(); - instance.put("$ref", value); - return getBuilderAfterRef(instance); - } - } - - public static class PropertyNamedRefThatIsNotAReferenceMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForRef { - private final Map instance; - private static final Set knownKeys = Set.of( - "$ref" - ); - public Set getKnownKeys() { - return knownKeys; - } - public PropertyNamedRefThatIsNotAReferenceMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public PropertyNamedRefThatIsNotAReferenceMapBuilder getBuilderAfterRef(Map instance) { - return this; - } - public PropertyNamedRefThatIsNotAReferenceMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface PropertyNamedRefThatIsNotAReference1Boxed permits PropertyNamedRefThatIsNotAReference1BoxedVoid, PropertyNamedRefThatIsNotAReference1BoxedBoolean, PropertyNamedRefThatIsNotAReference1BoxedNumber, PropertyNamedRefThatIsNotAReference1BoxedString, PropertyNamedRefThatIsNotAReference1BoxedList, PropertyNamedRefThatIsNotAReference1BoxedMap { - @Nullable Object getData(); - } - - public record PropertyNamedRefThatIsNotAReference1BoxedVoid(Void data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertyNamedRefThatIsNotAReference1BoxedBoolean(boolean data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertyNamedRefThatIsNotAReference1BoxedNumber(Number data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertyNamedRefThatIsNotAReference1BoxedString(String data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertyNamedRefThatIsNotAReference1BoxedList(FrozenList<@Nullable Object> data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertyNamedRefThatIsNotAReference1BoxedMap(PropertyNamedRefThatIsNotAReferenceMap data) implements PropertyNamedRefThatIsNotAReference1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertyNamedRefThatIsNotAReference1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertyNamedRefThatIsNotAReference1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertyNamedRefThatIsNotAReference1 instance = null; - - protected PropertyNamedRefThatIsNotAReference1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("$ref", Ref.class) - )) - ); - } - - public static PropertyNamedRefThatIsNotAReference1 getInstance() { - if (instance == null) { - instance = new PropertyNamedRefThatIsNotAReference1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public PropertyNamedRefThatIsNotAReferenceMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new PropertyNamedRefThatIsNotAReferenceMap(castProperties); - } - - public PropertyNamedRefThatIsNotAReferenceMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedVoid(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedNumber(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedString(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedList(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamedRefThatIsNotAReference1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertyNamedRefThatIsNotAReference1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java deleted file mode 100644 index 2fcdc6796d5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/PropertynamesValidation.java +++ /dev/null @@ -1,397 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class PropertynamesValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface PropertyNamesBoxed permits PropertyNamesBoxedString { - @Nullable Object getData(); - } - - public record PropertyNamesBoxedString(String data) implements PropertyNamesBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class PropertyNames extends JsonSchema implements StringSchemaValidator { - private static @Nullable PropertyNames instance = null; - - protected PropertyNames() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .maxLength(3) - ); - } - - public static PropertyNames getInstance() { - if (instance == null) { - instance = new PropertyNames(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertyNamesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamesBoxedString(validate(arg, configuration)); - } - @Override - public PropertyNamesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface PropertynamesValidation1Boxed permits PropertynamesValidation1BoxedVoid, PropertynamesValidation1BoxedBoolean, PropertynamesValidation1BoxedNumber, PropertynamesValidation1BoxedString, PropertynamesValidation1BoxedList, PropertynamesValidation1BoxedMap { - @Nullable Object getData(); - } - - public record PropertynamesValidation1BoxedVoid(Void data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertynamesValidation1BoxedBoolean(boolean data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertynamesValidation1BoxedNumber(Number data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertynamesValidation1BoxedString(String data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertynamesValidation1BoxedList(FrozenList<@Nullable Object> data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record PropertynamesValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements PropertynamesValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class PropertynamesValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, PropertynamesValidation1BoxedList>, MapSchemaValidator, PropertynamesValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable PropertynamesValidation1 instance = null; - - protected PropertynamesValidation1() { - super(new JsonSchemaInfo() - .propertyNames(PropertyNames.class) - ); - } - - public static PropertynamesValidation1 getInstance() { - if (instance == null) { - instance = new PropertynamesValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertynamesValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedString(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedList(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertynamesValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public PropertynamesValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java deleted file mode 100644 index 88dfd64137e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RegexFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface RegexFormat1Boxed permits RegexFormat1BoxedVoid, RegexFormat1BoxedBoolean, RegexFormat1BoxedNumber, RegexFormat1BoxedString, RegexFormat1BoxedList, RegexFormat1BoxedMap { - @Nullable Object getData(); - } - - public record RegexFormat1BoxedVoid(Void data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexFormat1BoxedBoolean(boolean data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexFormat1BoxedNumber(Number data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexFormat1BoxedString(String data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexFormat1BoxedList(FrozenList<@Nullable Object> data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements RegexFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RegexFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RegexFormat1BoxedList>, MapSchemaValidator, RegexFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RegexFormat1 instance = null; - - protected RegexFormat1() { - super(new JsonSchemaInfo() - .format("regex") - ); - } - - public static RegexFormat1 getInstance() { - if (instance == null) { - instance = new RegexFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RegexFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public RegexFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RegexFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public RegexFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedString(validate(arg, configuration)); - } - @Override - public RegexFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedList(validate(arg, configuration)); - } - @Override - public RegexFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public RegexFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java deleted file mode 100644 index 8ce598a8add..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.java +++ /dev/null @@ -1,356 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive { - // nest classes so all schemas and input/output classes can be public - - - public static class Schema092 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Schema092 instance = null; - public static Schema092 getInstance() { - if (instance == null) { - instance = new Schema092(); - } - return instance; - } - } - - - public static class X extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable X instance = null; - public static X getInstance() { - if (instance == null) { - instance = new X(); - } - return instance; - } - } - - - public sealed interface RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed permits RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap { - @Nullable Object getData(); - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid(Void data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean(boolean data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber(Number data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString(String data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList(FrozenList<@Nullable Object> data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap(FrozenMap<@Nullable Object> data) implements RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList>, MapSchemaValidator, RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 instance = null; - - protected RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1() { - super(new JsonSchemaInfo() - .patternProperties(Map.ofEntries( - new AbstractMap.SimpleEntry<>(Pattern.compile("[0-9]{2,}"), Schema092.class), - new AbstractMap.SimpleEntry<>(Pattern.compile("X_"), X.class) - )) - ); - } - - public static RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1 getInstance() { - if (instance == null) { - instance = new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedVoid(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedNumber(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedString(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedList(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1BoxedMap(validate(arg, configuration)); - } - @Override - public RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java deleted file mode 100644 index 140279d4425..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RelativeJsonPointerFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RelativeJsonPointerFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface RelativeJsonPointerFormat1Boxed permits RelativeJsonPointerFormat1BoxedVoid, RelativeJsonPointerFormat1BoxedBoolean, RelativeJsonPointerFormat1BoxedNumber, RelativeJsonPointerFormat1BoxedString, RelativeJsonPointerFormat1BoxedList, RelativeJsonPointerFormat1BoxedMap { - @Nullable Object getData(); - } - - public record RelativeJsonPointerFormat1BoxedVoid(Void data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RelativeJsonPointerFormat1BoxedBoolean(boolean data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RelativeJsonPointerFormat1BoxedNumber(Number data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RelativeJsonPointerFormat1BoxedString(String data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RelativeJsonPointerFormat1BoxedList(FrozenList<@Nullable Object> data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RelativeJsonPointerFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements RelativeJsonPointerFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RelativeJsonPointerFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RelativeJsonPointerFormat1BoxedList>, MapSchemaValidator, RelativeJsonPointerFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RelativeJsonPointerFormat1 instance = null; - - protected RelativeJsonPointerFormat1() { - super(new JsonSchemaInfo() - .format("relative-json-pointer") - ); - } - - public static RelativeJsonPointerFormat1 getInstance() { - if (instance == null) { - instance = new RelativeJsonPointerFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RelativeJsonPointerFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedString(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedList(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RelativeJsonPointerFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public RelativeJsonPointerFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java deleted file mode 100644 index 95d070c3c66..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredDefaultValidation.java +++ /dev/null @@ -1,451 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RequiredDefaultValidation { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class RequiredDefaultValidationMap extends FrozenMap<@Nullable Object> { - protected RequiredDefaultValidationMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static RequiredDefaultValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return RequiredDefaultValidation1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class RequiredDefaultValidationMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public RequiredDefaultValidationMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public RequiredDefaultValidationMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public RequiredDefaultValidationMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface RequiredDefaultValidation1Boxed permits RequiredDefaultValidation1BoxedVoid, RequiredDefaultValidation1BoxedBoolean, RequiredDefaultValidation1BoxedNumber, RequiredDefaultValidation1BoxedString, RequiredDefaultValidation1BoxedList, RequiredDefaultValidation1BoxedMap { - @Nullable Object getData(); - } - - public record RequiredDefaultValidation1BoxedVoid(Void data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredDefaultValidation1BoxedBoolean(boolean data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredDefaultValidation1BoxedNumber(Number data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredDefaultValidation1BoxedString(String data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredDefaultValidation1BoxedList(FrozenList<@Nullable Object> data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredDefaultValidation1BoxedMap(RequiredDefaultValidationMap data) implements RequiredDefaultValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RequiredDefaultValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredDefaultValidation1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RequiredDefaultValidation1 instance = null; - - protected RequiredDefaultValidation1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static RequiredDefaultValidation1 getInstance() { - if (instance == null) { - instance = new RequiredDefaultValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public RequiredDefaultValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new RequiredDefaultValidationMap(castProperties); - } - - public RequiredDefaultValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RequiredDefaultValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedString(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedList(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredDefaultValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public RequiredDefaultValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java deleted file mode 100644 index a9981a8aa75..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.java +++ /dev/null @@ -1,677 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames { - // nest classes so all schemas and input/output classes can be public - - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap extends FrozenMap<@Nullable Object> { - protected RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "__proto__", - "constructor", - "toString" - ); - public static final Set optionalKeys = Set.of(); - public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance().validate(arg, configuration); - } - - public @Nullable Object constructor() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object toString() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForProto { - Map getInstance(); - T getBuilderAfterProto(Map instance); - - default T lowLineProto(Void value) { - var instance = getInstance(); - instance.put("__proto__", null); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(boolean value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(String value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(int value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(float value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(long value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(double value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(List value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - - default T lowLineProto(Map value) { - var instance = getInstance(); - instance.put("__proto__", value); - return getBuilderAfterProto(instance); - } - } - - public interface SetterForConstructor { - Map getInstance(); - T getBuilderAfterConstructor(Map instance); - - default T constructor(Void value) { - var instance = getInstance(); - instance.put("constructor", null); - return getBuilderAfterConstructor(instance); - } - - default T constructor(boolean value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(String value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(int value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(float value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(long value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(double value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(List value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - - default T constructor(Map value) { - var instance = getInstance(); - instance.put("constructor", value); - return getBuilderAfterConstructor(instance); - } - } - - public interface SetterForToString { - Map getInstance(); - T getBuilderAfterToString(Map instance); - - default T toString(Void value) { - var instance = getInstance(); - instance.put("toString", null); - return getBuilderAfterToString(instance); - } - - default T toString(boolean value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(String value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(int value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(float value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(long value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(double value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(List value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - - default T toString(Map value) { - var instance = getInstance(); - instance.put("toString", value); - return getBuilderAfterToString(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "__proto__", - "constructor", - "toString" - ); - public Set getKnownKeys() { - return knownKeys; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder implements SetterForToString { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterToString(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder implements SetterForConstructor { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterConstructor(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder implements SetterForConstructor, SetterForToString { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterConstructor(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterToString(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder implements SetterForProto { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder getBuilderAfterProto(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap000Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder implements SetterForProto, SetterForToString { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder getBuilderAfterProto(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap001Builder(instance); - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterToString(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder implements SetterForProto, SetterForConstructor { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder getBuilderAfterProto(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap010Builder(instance); - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder getBuilderAfterConstructor(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap100Builder(instance); - } - } - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder implements SetterForProto, SetterForConstructor, SetterForToString { - private final Map instance; - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder getBuilderAfterProto(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap011Builder(instance); - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder getBuilderAfterConstructor(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap101Builder(instance); - } - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder getBuilderAfterToString(Map instance) { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap110Builder(instance); - } - } - - - public sealed interface RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed permits RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap { - @Nullable Object getData(); - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(Void data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(boolean data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(Number data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(String data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(FrozenList<@Nullable Object> data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap data) implements RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 instance = null; - - protected RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1() { - super(new JsonSchemaInfo() - .required(Set.of( - "__proto__", - "constructor", - "toString" - )) - ); - } - - public static RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1 getInstance() { - if (instance == null) { - instance = new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap(castProperties); - } - - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedVoid(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedNumber(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedString(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedList(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1BoxedMap(validate(arg, configuration)); - } - @Override - public RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java deleted file mode 100644 index 1236ca103ae..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredValidation.java +++ /dev/null @@ -1,549 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RequiredValidation { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class Bar extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Bar instance = null; - public static Bar getInstance() { - if (instance == null) { - instance = new Bar(); - } - return instance; - } - } - - - public static class RequiredValidationMap extends FrozenMap<@Nullable Object> { - protected RequiredValidationMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo" - ); - public static final Set optionalKeys = Set.of( - "bar" - ); - public static RequiredValidationMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return RequiredValidation1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() { - try { - return getOrThrow("version"); - } catch (UnsetPropertyException e) { - throw new RuntimeException(e); - } - } - - public @Nullable Object bar() throws UnsetPropertyException { - return getOrThrow("bar"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForBar { - Map getInstance(); - T getBuilderAfterBar(Map instance); - - default T bar(Void value) { - var instance = getInstance(); - instance.put("bar", null); - return getBuilderAfterBar(instance); - } - - default T bar(boolean value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(String value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(int value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(float value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(long value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(double value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(List value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - - default T bar(Map value) { - var instance = getInstance(); - instance.put("bar", value); - return getBuilderAfterBar(instance); - } - } - - public static class RequiredValidationMap0Builder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForBar { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo", - "bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public RequiredValidationMap0Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public RequiredValidationMap0Builder getBuilderAfterBar(Map instance) { - return this; - } - public RequiredValidationMap0Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class RequiredValidationMapBuilder implements SetterForFoo { - private final Map instance; - public RequiredValidationMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public RequiredValidationMap0Builder getBuilderAfterFoo(Map instance) { - return new RequiredValidationMap0Builder(instance); - } - } - - - public sealed interface RequiredValidation1Boxed permits RequiredValidation1BoxedVoid, RequiredValidation1BoxedBoolean, RequiredValidation1BoxedNumber, RequiredValidation1BoxedString, RequiredValidation1BoxedList, RequiredValidation1BoxedMap { - @Nullable Object getData(); - } - - public record RequiredValidation1BoxedVoid(Void data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredValidation1BoxedBoolean(boolean data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredValidation1BoxedNumber(Number data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredValidation1BoxedString(String data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredValidation1BoxedList(FrozenList<@Nullable Object> data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredValidation1BoxedMap(RequiredValidationMap data) implements RequiredValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RequiredValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredValidation1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RequiredValidation1 instance = null; - - protected RequiredValidation1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class), - new PropertyEntry("bar", Bar.class) - )) - .required(Set.of( - "foo" - )) - ); - } - - public static RequiredValidation1 getInstance() { - if (instance == null) { - instance = new RequiredValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public RequiredValidationMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new RequiredValidationMap(castProperties); - } - - public RequiredValidationMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RequiredValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public RequiredValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RequiredValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public RequiredValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedString(validate(arg, configuration)); - } - @Override - public RequiredValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedList(validate(arg, configuration)); - } - @Override - public RequiredValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public RequiredValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java deleted file mode 100644 index 974ae28ac27..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEmptyArray.java +++ /dev/null @@ -1,451 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RequiredWithEmptyArray { - // nest classes so all schemas and input/output classes can be public - - - public static class Foo extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class RequiredWithEmptyArrayMap extends FrozenMap<@Nullable Object> { - protected RequiredWithEmptyArrayMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static RequiredWithEmptyArrayMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return RequiredWithEmptyArray1.getInstance().validate(arg, configuration); - } - - public @Nullable Object foo() throws UnsetPropertyException { - return getOrThrow("foo"); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(Void value) { - var instance = getInstance(); - instance.put("foo", null); - return getBuilderAfterFoo(instance); - } - - default T foo(boolean value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(int value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(float value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(long value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(double value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(List value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - - default T foo(Map value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public static class RequiredWithEmptyArrayMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForFoo { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public RequiredWithEmptyArrayMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEmptyArrayMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public RequiredWithEmptyArrayMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface RequiredWithEmptyArray1Boxed permits RequiredWithEmptyArray1BoxedVoid, RequiredWithEmptyArray1BoxedBoolean, RequiredWithEmptyArray1BoxedNumber, RequiredWithEmptyArray1BoxedString, RequiredWithEmptyArray1BoxedList, RequiredWithEmptyArray1BoxedMap { - @Nullable Object getData(); - } - - public record RequiredWithEmptyArray1BoxedVoid(Void data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEmptyArray1BoxedBoolean(boolean data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEmptyArray1BoxedNumber(Number data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEmptyArray1BoxedString(String data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEmptyArray1BoxedList(FrozenList<@Nullable Object> data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEmptyArray1BoxedMap(RequiredWithEmptyArrayMap data) implements RequiredWithEmptyArray1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RequiredWithEmptyArray1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredWithEmptyArray1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RequiredWithEmptyArray1 instance = null; - - protected RequiredWithEmptyArray1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - ); - } - - public static RequiredWithEmptyArray1 getInstance() { - if (instance == null) { - instance = new RequiredWithEmptyArray1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public RequiredWithEmptyArrayMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new RequiredWithEmptyArrayMap(castProperties); - } - - public RequiredWithEmptyArrayMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RequiredWithEmptyArray1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedVoid(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedNumber(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedString(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedList(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEmptyArray1BoxedMap(validate(arg, configuration)); - } - @Override - public RequiredWithEmptyArray1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java deleted file mode 100644 index 8919e0bbb8d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/RequiredWithEscapedCharacters.java +++ /dev/null @@ -1,1947 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class RequiredWithEscapedCharacters { - // nest classes so all schemas and input/output classes can be public - - - public static class RequiredWithEscapedCharactersMap extends FrozenMap<@Nullable Object> { - protected RequiredWithEscapedCharactersMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of( - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar" - ); - public static final Set optionalKeys = Set.of(); - public static RequiredWithEscapedCharactersMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return RequiredWithEscapedCharacters1.getInstance().validate(arg, configuration); - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForFootbar { - Map getInstance(); - T getBuilderAfterFootbar(Map instance); - - default T fooReverseSolidusTbar(Void value) { - var instance = getInstance(); - instance.put("foo\tbar", null); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(boolean value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(String value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(int value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(float value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(long value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(double value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(List value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - - default T fooReverseSolidusTbar(Map value) { - var instance = getInstance(); - instance.put("foo\tbar", value); - return getBuilderAfterFootbar(instance); - } - } - - public interface SetterForFoonbar { - Map getInstance(); - T getBuilderAfterFoonbar(Map instance); - - default T fooReverseSolidusNbar(Void value) { - var instance = getInstance(); - instance.put("foo\nbar", null); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(boolean value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(String value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(int value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(float value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(long value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(double value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(List value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - - default T fooReverseSolidusNbar(Map value) { - var instance = getInstance(); - instance.put("foo\nbar", value); - return getBuilderAfterFoonbar(instance); - } - } - - public interface SetterForFoofbar { - Map getInstance(); - T getBuilderAfterFoofbar(Map instance); - - default T fooReverseSolidusFbar(Void value) { - var instance = getInstance(); - instance.put("foo\fbar", null); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(boolean value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(String value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(int value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(float value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(long value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(double value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(List value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - - default T fooReverseSolidusFbar(Map value) { - var instance = getInstance(); - instance.put("foo\fbar", value); - return getBuilderAfterFoofbar(instance); - } - } - - public interface SetterForFoorbar { - Map getInstance(); - T getBuilderAfterFoorbar(Map instance); - - default T fooReverseSolidusRbar(Void value) { - var instance = getInstance(); - instance.put("foo\rbar", null); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(boolean value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(String value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(int value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(float value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(long value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(double value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(List value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - - default T fooReverseSolidusRbar(Map value) { - var instance = getInstance(); - instance.put("foo\rbar", value); - return getBuilderAfterFoorbar(instance); - } - } - - public interface SetterForFoobar { - Map getInstance(); - T getBuilderAfterFoobar(Map instance); - - default T fooReverseSolidusQuotationMarkBar(Void value) { - var instance = getInstance(); - instance.put("foo\"bar", null); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(boolean value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(String value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(int value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(float value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(long value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(double value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(List value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - - default T fooReverseSolidusQuotationMarkBar(Map value) { - var instance = getInstance(); - instance.put("foo\"bar", value); - return getBuilderAfterFoobar(instance); - } - } - - public interface SetterForFoobar1 { - Map getInstance(); - T getBuilderAfterFoobar1(Map instance); - - default T fooReverseSolidusReverseSolidusBar(Void value) { - var instance = getInstance(); - instance.put("foo\\bar", null); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(boolean value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(String value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(int value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(float value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(long value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(double value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(List value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - - default T fooReverseSolidusReverseSolidusBar(Map value) { - var instance = getInstance(); - instance.put("foo\\bar", value); - return getBuilderAfterFoobar1(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000000Builder extends UnsetAddPropsSetter implements GenericBuilder> { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar" - ); - public Set getKnownKeys() { - return knownKeys; - } - public RequiredWithEscapedCharactersMap000000Builder(Map instance) { - this.instance = instance; - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - public static class RequiredWithEscapedCharactersMap000001Builder implements SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap000001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000010Builder implements SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap000010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000011Builder implements SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap000011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap000001Builder(instance); - } - public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap000010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000100Builder implements SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap000100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000101Builder implements SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap000101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap000001Builder(instance); - } - public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap000100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000110Builder implements SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap000110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap000010Builder(instance); - } - public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap000100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap000111Builder implements SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap000111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap000011Builder(instance); - } - public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap000101Builder(instance); - } - public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap000110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001000Builder implements SetterForFoofbar { - private final Map instance; - public RequiredWithEscapedCharactersMap001000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001001Builder implements SetterForFoofbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap001001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000001Builder(instance); - } - public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap001000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001010Builder implements SetterForFoofbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap001010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000010Builder(instance); - } - public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap001000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001011Builder implements SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap001011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000011Builder(instance); - } - public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap001001Builder(instance); - } - public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap001010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001100Builder implements SetterForFoofbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap001100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000100Builder(instance); - } - public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap001000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001101Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap001101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000101Builder(instance); - } - public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap001001Builder(instance); - } - public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap001100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001110Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap001110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000110Builder(instance); - } - public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap001010Builder(instance); - } - public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap001100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap001111Builder implements SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap001111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap000111Builder(instance); - } - public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap001011Builder(instance); - } - public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap001101Builder(instance); - } - public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap001110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010000Builder implements SetterForFoonbar { - private final Map instance; - public RequiredWithEscapedCharactersMap010000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010001Builder implements SetterForFoonbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap010001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000001Builder(instance); - } - public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap010000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010010Builder implements SetterForFoonbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap010010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000010Builder(instance); - } - public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap010000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010011Builder implements SetterForFoonbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap010011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000011Builder(instance); - } - public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap010001Builder(instance); - } - public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap010010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010100Builder implements SetterForFoonbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap010100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000100Builder(instance); - } - public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap010000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010101Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap010101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000101Builder(instance); - } - public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap010001Builder(instance); - } - public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap010100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010110Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap010110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000110Builder(instance); - } - public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap010010Builder(instance); - } - public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap010100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap010111Builder implements SetterForFoonbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap010111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap000111Builder(instance); - } - public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap010011Builder(instance); - } - public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap010101Builder(instance); - } - public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap010110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011000Builder implements SetterForFoonbar, SetterForFoofbar { - private final Map instance; - public RequiredWithEscapedCharactersMap011000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001000Builder(instance); - } - public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011001Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap011001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001001Builder(instance); - } - public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010001Builder(instance); - } - public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap011000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011010Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap011010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001010Builder(instance); - } - public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010010Builder(instance); - } - public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap011000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011011Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap011011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001011Builder(instance); - } - public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010011Builder(instance); - } - public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap011001Builder(instance); - } - public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap011010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011100Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap011100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001100Builder(instance); - } - public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010100Builder(instance); - } - public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap011000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011101Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap011101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001101Builder(instance); - } - public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010101Builder(instance); - } - public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap011001Builder(instance); - } - public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap011100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011110Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap011110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001110Builder(instance); - } - public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010110Builder(instance); - } - public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap011010Builder(instance); - } - public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap011100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap011111Builder implements SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap011111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001111Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap001111Builder(instance); - } - public RequiredWithEscapedCharactersMap010111Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap010111Builder(instance); - } - public RequiredWithEscapedCharactersMap011011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap011011Builder(instance); - } - public RequiredWithEscapedCharactersMap011101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap011101Builder(instance); - } - public RequiredWithEscapedCharactersMap011110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap011110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100000Builder implements SetterForFootbar { - private final Map instance; - public RequiredWithEscapedCharactersMap100000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000000Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100001Builder implements SetterForFootbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap100001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000001Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000001Builder(instance); - } - public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap100000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100010Builder implements SetterForFootbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap100010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000010Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000010Builder(instance); - } - public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap100000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100011Builder implements SetterForFootbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap100011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000011Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000011Builder(instance); - } - public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap100001Builder(instance); - } - public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap100010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100100Builder implements SetterForFootbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap100100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000100Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000100Builder(instance); - } - public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap100000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100101Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap100101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000101Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000101Builder(instance); - } - public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap100001Builder(instance); - } - public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap100100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100110Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap100110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000110Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000110Builder(instance); - } - public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap100010Builder(instance); - } - public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap100100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap100111Builder implements SetterForFootbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap100111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap000111Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap000111Builder(instance); - } - public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap100011Builder(instance); - } - public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap100101Builder(instance); - } - public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap100110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101000Builder implements SetterForFootbar, SetterForFoofbar { - private final Map instance; - public RequiredWithEscapedCharactersMap101000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001000Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001000Builder(instance); - } - public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101001Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap101001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001001Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001001Builder(instance); - } - public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100001Builder(instance); - } - public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap101000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101010Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap101010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001010Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001010Builder(instance); - } - public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100010Builder(instance); - } - public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap101000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101011Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap101011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001011Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001011Builder(instance); - } - public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100011Builder(instance); - } - public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap101001Builder(instance); - } - public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap101010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101100Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap101100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001100Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001100Builder(instance); - } - public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100100Builder(instance); - } - public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap101000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101101Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap101101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001101Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001101Builder(instance); - } - public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100101Builder(instance); - } - public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap101001Builder(instance); - } - public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap101100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101110Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap101110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001110Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001110Builder(instance); - } - public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100110Builder(instance); - } - public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap101010Builder(instance); - } - public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap101100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap101111Builder implements SetterForFootbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap101111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap001111Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap001111Builder(instance); - } - public RequiredWithEscapedCharactersMap100111Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap100111Builder(instance); - } - public RequiredWithEscapedCharactersMap101011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap101011Builder(instance); - } - public RequiredWithEscapedCharactersMap101101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap101101Builder(instance); - } - public RequiredWithEscapedCharactersMap101110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap101110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110000Builder implements SetterForFootbar, SetterForFoonbar { - private final Map instance; - public RequiredWithEscapedCharactersMap110000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010000Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010000Builder(instance); - } - public RequiredWithEscapedCharactersMap100000Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110001Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap110001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010001Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010001Builder(instance); - } - public RequiredWithEscapedCharactersMap100001Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100001Builder(instance); - } - public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap110000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110010Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap110010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010010Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010010Builder(instance); - } - public RequiredWithEscapedCharactersMap100010Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100010Builder(instance); - } - public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap110000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110011Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap110011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010011Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010011Builder(instance); - } - public RequiredWithEscapedCharactersMap100011Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100011Builder(instance); - } - public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap110001Builder(instance); - } - public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap110010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110100Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap110100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010100Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010100Builder(instance); - } - public RequiredWithEscapedCharactersMap100100Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100100Builder(instance); - } - public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap110000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110101Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap110101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010101Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010101Builder(instance); - } - public RequiredWithEscapedCharactersMap100101Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100101Builder(instance); - } - public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap110001Builder(instance); - } - public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap110100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110110Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap110110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010110Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010110Builder(instance); - } - public RequiredWithEscapedCharactersMap100110Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100110Builder(instance); - } - public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap110010Builder(instance); - } - public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap110100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap110111Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap110111Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap010111Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap010111Builder(instance); - } - public RequiredWithEscapedCharactersMap100111Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap100111Builder(instance); - } - public RequiredWithEscapedCharactersMap110011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap110011Builder(instance); - } - public RequiredWithEscapedCharactersMap110101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap110101Builder(instance); - } - public RequiredWithEscapedCharactersMap110110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap110110Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111000Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar { - private final Map instance; - public RequiredWithEscapedCharactersMap111000Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011000Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011000Builder(instance); - } - public RequiredWithEscapedCharactersMap101000Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101000Builder(instance); - } - public RequiredWithEscapedCharactersMap110000Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111001Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap111001Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011001Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011001Builder(instance); - } - public RequiredWithEscapedCharactersMap101001Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101001Builder(instance); - } - public RequiredWithEscapedCharactersMap110001Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110001Builder(instance); - } - public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap111000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111010Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap111010Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011010Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011010Builder(instance); - } - public RequiredWithEscapedCharactersMap101010Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101010Builder(instance); - } - public RequiredWithEscapedCharactersMap110010Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110010Builder(instance); - } - public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap111000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111011Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap111011Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011011Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011011Builder(instance); - } - public RequiredWithEscapedCharactersMap101011Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101011Builder(instance); - } - public RequiredWithEscapedCharactersMap110011Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110011Builder(instance); - } - public RequiredWithEscapedCharactersMap111001Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap111001Builder(instance); - } - public RequiredWithEscapedCharactersMap111010Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap111010Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111100Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar { - private final Map instance; - public RequiredWithEscapedCharactersMap111100Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011100Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011100Builder(instance); - } - public RequiredWithEscapedCharactersMap101100Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101100Builder(instance); - } - public RequiredWithEscapedCharactersMap110100Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110100Builder(instance); - } - public RequiredWithEscapedCharactersMap111000Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap111000Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111101Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMap111101Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011101Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011101Builder(instance); - } - public RequiredWithEscapedCharactersMap101101Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101101Builder(instance); - } - public RequiredWithEscapedCharactersMap110101Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110101Builder(instance); - } - public RequiredWithEscapedCharactersMap111001Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap111001Builder(instance); - } - public RequiredWithEscapedCharactersMap111100Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap111100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMap111110Builder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar { - private final Map instance; - public RequiredWithEscapedCharactersMap111110Builder(Map instance) { - this.instance = instance; - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011110Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011110Builder(instance); - } - public RequiredWithEscapedCharactersMap101110Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101110Builder(instance); - } - public RequiredWithEscapedCharactersMap110110Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110110Builder(instance); - } - public RequiredWithEscapedCharactersMap111010Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap111010Builder(instance); - } - public RequiredWithEscapedCharactersMap111100Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap111100Builder(instance); - } - } - - public static class RequiredWithEscapedCharactersMapBuilder implements SetterForFootbar, SetterForFoonbar, SetterForFoofbar, SetterForFoorbar, SetterForFoobar, SetterForFoobar1 { - private final Map instance; - public RequiredWithEscapedCharactersMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map getInstance() { - return instance; - } - public RequiredWithEscapedCharactersMap011111Builder getBuilderAfterFootbar(Map instance) { - return new RequiredWithEscapedCharactersMap011111Builder(instance); - } - public RequiredWithEscapedCharactersMap101111Builder getBuilderAfterFoonbar(Map instance) { - return new RequiredWithEscapedCharactersMap101111Builder(instance); - } - public RequiredWithEscapedCharactersMap110111Builder getBuilderAfterFoofbar(Map instance) { - return new RequiredWithEscapedCharactersMap110111Builder(instance); - } - public RequiredWithEscapedCharactersMap111011Builder getBuilderAfterFoorbar(Map instance) { - return new RequiredWithEscapedCharactersMap111011Builder(instance); - } - public RequiredWithEscapedCharactersMap111101Builder getBuilderAfterFoobar(Map instance) { - return new RequiredWithEscapedCharactersMap111101Builder(instance); - } - public RequiredWithEscapedCharactersMap111110Builder getBuilderAfterFoobar1(Map instance) { - return new RequiredWithEscapedCharactersMap111110Builder(instance); - } - } - - - public sealed interface RequiredWithEscapedCharacters1Boxed permits RequiredWithEscapedCharacters1BoxedVoid, RequiredWithEscapedCharacters1BoxedBoolean, RequiredWithEscapedCharacters1BoxedNumber, RequiredWithEscapedCharacters1BoxedString, RequiredWithEscapedCharacters1BoxedList, RequiredWithEscapedCharacters1BoxedMap { - @Nullable Object getData(); - } - - public record RequiredWithEscapedCharacters1BoxedVoid(Void data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEscapedCharacters1BoxedBoolean(boolean data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEscapedCharacters1BoxedNumber(Number data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEscapedCharacters1BoxedString(String data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEscapedCharacters1BoxedList(FrozenList<@Nullable Object> data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record RequiredWithEscapedCharacters1BoxedMap(RequiredWithEscapedCharactersMap data) implements RequiredWithEscapedCharacters1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class RequiredWithEscapedCharacters1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, RequiredWithEscapedCharacters1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable RequiredWithEscapedCharacters1 instance = null; - - protected RequiredWithEscapedCharacters1() { - super(new JsonSchemaInfo() - .required(Set.of( - "foo\tbar", - "foo\nbar", - "foo\fbar", - "foo\rbar", - "foo\"bar", - "foo\\bar" - )) - ); - } - - public static RequiredWithEscapedCharacters1 getInstance() { - if (instance == null) { - instance = new RequiredWithEscapedCharacters1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public RequiredWithEscapedCharactersMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new RequiredWithEscapedCharactersMap(castProperties); - } - - public RequiredWithEscapedCharactersMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public RequiredWithEscapedCharacters1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedVoid(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedBoolean(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedNumber(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedString(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedList(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new RequiredWithEscapedCharacters1BoxedMap(validate(arg, configuration)); - } - @Override - public RequiredWithEscapedCharacters1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java deleted file mode 100644 index 31725d8732b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SimpleEnumValidation.java +++ /dev/null @@ -1,205 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.validation.DoubleEnumValidator; -import unit_test_api.schemas.validation.DoubleValueMethod; -import unit_test_api.schemas.validation.FloatEnumValidator; -import unit_test_api.schemas.validation.FloatValueMethod; -import unit_test_api.schemas.validation.IntegerEnumValidator; -import unit_test_api.schemas.validation.IntegerValueMethod; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.LongEnumValidator; -import unit_test_api.schemas.validation.LongValueMethod; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class SimpleEnumValidation { - // nest classes so all schemas and input/output classes can be public - - public enum IntegerSimpleEnumValidationEnums implements IntegerValueMethod { - POSITIVE_1(1), - POSITIVE_2(2), - POSITIVE_3(3); - private final int value; - - IntegerSimpleEnumValidationEnums(int value) { - this.value = value; - } - public int value() { - return this.value; - } - } - - public enum LongSimpleEnumValidationEnums implements LongValueMethod { - POSITIVE_1(1L), - POSITIVE_2(2L), - POSITIVE_3(3L); - private final long value; - - LongSimpleEnumValidationEnums(long value) { - this.value = value; - } - public long value() { - return this.value; - } - } - - public enum FloatSimpleEnumValidationEnums implements FloatValueMethod { - POSITIVE_1(1.0f), - POSITIVE_2(2.0f), - POSITIVE_3(3.0f); - private final float value; - - FloatSimpleEnumValidationEnums(float value) { - this.value = value; - } - public float value() { - return this.value; - } - } - - public enum DoubleSimpleEnumValidationEnums implements DoubleValueMethod { - POSITIVE_1(1.0d), - POSITIVE_2(2.0d), - POSITIVE_3(3.0d); - private final double value; - - DoubleSimpleEnumValidationEnums(double value) { - this.value = value; - } - public double value() { - return this.value; - } - } - - - public sealed interface SimpleEnumValidation1Boxed permits SimpleEnumValidation1BoxedNumber { - @Nullable Object getData(); - } - - public record SimpleEnumValidation1BoxedNumber(Number data) implements SimpleEnumValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class SimpleEnumValidation1 extends JsonSchema implements IntegerEnumValidator, LongEnumValidator, FloatEnumValidator, DoubleEnumValidator, NumberSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable SimpleEnumValidation1 instance = null; - - protected SimpleEnumValidation1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .enumValues(SetMaker.makeSet( - new BigDecimal("1"), - new BigDecimal("2"), - new BigDecimal("3") - )) - ); - } - - public static SimpleEnumValidation1 getInstance() { - if (instance == null) { - instance = new SimpleEnumValidation1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public int validate(IntegerSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg.value(), configuration); - } - - @Override - public long validate(LongSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg.value(), configuration); - } - - @Override - public float validate(FloatSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg.value(), configuration); - } - - @Override - public double validate(DoubleSimpleEnumValidationEnums arg,SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg.value(), configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public SimpleEnumValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new SimpleEnumValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public SimpleEnumValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java deleted file mode 100644 index 26181164b35..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SingleDependency.java +++ /dev/null @@ -1,337 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.SetMaker; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class SingleDependency { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface SingleDependency1Boxed permits SingleDependency1BoxedVoid, SingleDependency1BoxedBoolean, SingleDependency1BoxedNumber, SingleDependency1BoxedString, SingleDependency1BoxedList, SingleDependency1BoxedMap { - @Nullable Object getData(); - } - - public record SingleDependency1BoxedVoid(Void data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record SingleDependency1BoxedBoolean(boolean data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record SingleDependency1BoxedNumber(Number data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record SingleDependency1BoxedString(String data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record SingleDependency1BoxedList(FrozenList<@Nullable Object> data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record SingleDependency1BoxedMap(FrozenMap<@Nullable Object> data) implements SingleDependency1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class SingleDependency1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, SingleDependency1BoxedList>, MapSchemaValidator, SingleDependency1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable SingleDependency1 instance = null; - - protected SingleDependency1() { - super(new JsonSchemaInfo() - .dependentRequired(MapUtils.makeMap( - new AbstractMap.SimpleEntry<>( - "bar", - SetMaker.makeSet( - "foo" - ) - ) - )) - ); - } - - public static SingleDependency1 getInstance() { - if (instance == null) { - instance = new SingleDependency1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public SingleDependency1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedVoid(validate(arg, configuration)); - } - @Override - public SingleDependency1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedBoolean(validate(arg, configuration)); - } - @Override - public SingleDependency1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedNumber(validate(arg, configuration)); - } - @Override - public SingleDependency1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedString(validate(arg, configuration)); - } - @Override - public SingleDependency1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedList(validate(arg, configuration)); - } - @Override - public SingleDependency1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new SingleDependency1BoxedMap(validate(arg, configuration)); - } - @Override - public SingleDependency1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java deleted file mode 100644 index 810c4089611..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/SmallMultipleOfLargeInteger.java +++ /dev/null @@ -1,117 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class SmallMultipleOfLargeInteger { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface SmallMultipleOfLargeInteger1Boxed permits SmallMultipleOfLargeInteger1BoxedNumber { - @Nullable Object getData(); - } - - public record SmallMultipleOfLargeInteger1BoxedNumber(Number data) implements SmallMultipleOfLargeInteger1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class SmallMultipleOfLargeInteger1 extends JsonSchema implements NumberSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable SmallMultipleOfLargeInteger1 instance = null; - - protected SmallMultipleOfLargeInteger1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .format("int") - .multipleOf(new BigDecimal("1.0E-8")) - ); - } - - public static SmallMultipleOfLargeInteger1 getInstance() { - if (instance == null) { - instance = new SmallMultipleOfLargeInteger1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public SmallMultipleOfLargeInteger1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new SmallMultipleOfLargeInteger1BoxedNumber(validate(arg, configuration)); - } - @Override - public SmallMultipleOfLargeInteger1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java deleted file mode 100644 index e25bdecaab2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/StringTypeMatchesStrings.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.StringJsonSchema; - -public class StringTypeMatchesStrings extends StringJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class StringTypeMatchesStrings1 extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable StringTypeMatchesStrings1 instance = null; - public static StringTypeMatchesStrings1 getInstance() { - if (instance == null) { - instance = new StringTypeMatchesStrings1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java deleted file mode 100644 index e59f47dc46d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TimeFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class TimeFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface TimeFormat1Boxed permits TimeFormat1BoxedVoid, TimeFormat1BoxedBoolean, TimeFormat1BoxedNumber, TimeFormat1BoxedString, TimeFormat1BoxedList, TimeFormat1BoxedMap { - @Nullable Object getData(); - } - - public record TimeFormat1BoxedVoid(Void data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TimeFormat1BoxedBoolean(boolean data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TimeFormat1BoxedNumber(Number data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TimeFormat1BoxedString(String data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TimeFormat1BoxedList(FrozenList<@Nullable Object> data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TimeFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements TimeFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class TimeFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, TimeFormat1BoxedList>, MapSchemaValidator, TimeFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable TimeFormat1 instance = null; - - protected TimeFormat1() { - super(new JsonSchemaInfo() - .format("time") - ); - } - - public static TimeFormat1 getInstance() { - if (instance == null) { - instance = new TimeFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public TimeFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public TimeFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public TimeFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public TimeFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedString(validate(arg, configuration)); - } - @Override - public TimeFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedList(validate(arg, configuration)); - } - @Override - public TimeFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new TimeFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public TimeFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java deleted file mode 100644 index 7f4c5b4e216..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayObjectOrNull.java +++ /dev/null @@ -1,205 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class TypeArrayObjectOrNull { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface TypeArrayObjectOrNull1Boxed permits TypeArrayObjectOrNull1BoxedList, TypeArrayObjectOrNull1BoxedMap, TypeArrayObjectOrNull1BoxedVoid { - @Nullable Object getData(); - } - - public record TypeArrayObjectOrNull1BoxedList(FrozenList<@Nullable Object> data) implements TypeArrayObjectOrNull1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TypeArrayObjectOrNull1BoxedMap(FrozenMap<@Nullable Object> data) implements TypeArrayObjectOrNull1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record TypeArrayObjectOrNull1BoxedVoid(Void data) implements TypeArrayObjectOrNull1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class TypeArrayObjectOrNull1 extends JsonSchema implements ListSchemaValidator, TypeArrayObjectOrNull1BoxedList>, MapSchemaValidator, TypeArrayObjectOrNull1BoxedMap>, NullSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable TypeArrayObjectOrNull1 instance = null; - - protected TypeArrayObjectOrNull1() { - super(new JsonSchemaInfo() - .type(Set.of( - List.class, - Map.class, - Void.class - )) - ); - } - - public static TypeArrayObjectOrNull1 getInstance() { - if (instance == null) { - instance = new TypeArrayObjectOrNull1(); - } - return instance; - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } else if (arg == null) { - return validate((Void) null, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } else if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public TypeArrayObjectOrNull1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new TypeArrayObjectOrNull1BoxedList(validate(arg, configuration)); - } - @Override - public TypeArrayObjectOrNull1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new TypeArrayObjectOrNull1BoxedMap(validate(arg, configuration)); - } - @Override - public TypeArrayObjectOrNull1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new TypeArrayObjectOrNull1BoxedVoid(validate(arg, configuration)); - } - @Override - public TypeArrayObjectOrNull1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } else if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java deleted file mode 100644 index db9c883dd63..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeArrayOrObject.java +++ /dev/null @@ -1,174 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class TypeArrayOrObject { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface TypeArrayOrObject1Boxed permits TypeArrayOrObject1BoxedList, TypeArrayOrObject1BoxedMap { - @Nullable Object getData(); - } - - public record TypeArrayOrObject1BoxedList(FrozenList<@Nullable Object> data) implements TypeArrayOrObject1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record TypeArrayOrObject1BoxedMap(FrozenMap<@Nullable Object> data) implements TypeArrayOrObject1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class TypeArrayOrObject1 extends JsonSchema implements ListSchemaValidator, TypeArrayOrObject1BoxedList>, MapSchemaValidator, TypeArrayOrObject1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable TypeArrayOrObject1 instance = null; - - protected TypeArrayOrObject1() { - super(new JsonSchemaInfo() - .type(Set.of( - List.class, - Map.class - )) - ); - } - - public static TypeArrayOrObject1 getInstance() { - if (instance == null) { - instance = new TypeArrayOrObject1(); - } - return instance; - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public TypeArrayOrObject1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new TypeArrayOrObject1BoxedList(validate(arg, configuration)); - } - @Override - public TypeArrayOrObject1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new TypeArrayOrObject1BoxedMap(validate(arg, configuration)); - } - @Override - public TypeArrayOrObject1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java deleted file mode 100644 index a31652a3248..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/TypeAsArrayWithOneItem.java +++ /dev/null @@ -1,19 +0,0 @@ -package unit_test_api.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.StringJsonSchema; - -public class TypeAsArrayWithOneItem extends StringJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class TypeAsArrayWithOneItem1 extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable TypeAsArrayWithOneItem1 instance = null; - public static TypeAsArrayWithOneItem1 getInstance() { - if (instance == null) { - instance = new TypeAsArrayWithOneItem1(); - } - return instance; - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java deleted file mode 100644 index 9e7d69a673e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsAsSchema.java +++ /dev/null @@ -1,339 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluateditemsAsSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class UnevaluatedItems extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable UnevaluatedItems instance = null; - public static UnevaluatedItems getInstance() { - if (instance == null) { - instance = new UnevaluatedItems(); - } - return instance; - } - } - - - public sealed interface UnevaluateditemsAsSchema1Boxed permits UnevaluateditemsAsSchema1BoxedVoid, UnevaluateditemsAsSchema1BoxedBoolean, UnevaluateditemsAsSchema1BoxedNumber, UnevaluateditemsAsSchema1BoxedString, UnevaluateditemsAsSchema1BoxedList, UnevaluateditemsAsSchema1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluateditemsAsSchema1BoxedVoid(Void data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsAsSchema1BoxedBoolean(boolean data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsAsSchema1BoxedNumber(Number data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsAsSchema1BoxedString(String data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsAsSchema1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsAsSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsAsSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluateditemsAsSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsAsSchema1BoxedList>, MapSchemaValidator, UnevaluateditemsAsSchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluateditemsAsSchema1 instance = null; - - protected UnevaluateditemsAsSchema1() { - super(new JsonSchemaInfo() - .unevaluatedItems(UnevaluatedItems.class) - ); - } - - public static UnevaluateditemsAsSchema1 getInstance() { - if (instance == null) { - instance = new UnevaluateditemsAsSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluateditemsAsSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedString(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsAsSchema1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluateditemsAsSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java deleted file mode 100644 index b0a5afb1466..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContains.java +++ /dev/null @@ -1,1757 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluateditemsDependsOnMultipleNestedContains { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ContainsBoxed permits ContainsBoxedVoid, ContainsBoxedBoolean, ContainsBoxedNumber, ContainsBoxedString, ContainsBoxedList, ContainsBoxedMap { - @Nullable Object getData(); - } - - public record ContainsBoxedVoid(Void data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedBoolean(boolean data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedNumber(Number data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedString(String data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedList(FrozenList<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ContainsBoxedMap(FrozenMap<@Nullable Object> data) implements ContainsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Contains extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ContainsBoxedList>, MapSchemaValidator, ContainsBoxedMap> { - private static @Nullable Contains instance = null; - - protected Contains() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Contains getInstance() { - if (instance == null) { - instance = new Contains(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ContainsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedVoid(validate(arg, configuration)); - } - @Override - public ContainsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedBoolean(validate(arg, configuration)); - } - @Override - public ContainsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedNumber(validate(arg, configuration)); - } - @Override - public ContainsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedString(validate(arg, configuration)); - } - @Override - public ContainsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedList(validate(arg, configuration)); - } - @Override - public ContainsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ContainsBoxedMap(validate(arg, configuration)); - } - @Override - public ContainsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema0Boxed permits Schema0BoxedVoid, Schema0BoxedBoolean, Schema0BoxedNumber, Schema0BoxedString, Schema0BoxedList, Schema0BoxedMap { - @Nullable Object getData(); - } - - public record Schema0BoxedVoid(Void data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedBoolean(boolean data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedNumber(Number data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedString(String data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedList(FrozenList<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema0BoxedMap(FrozenMap<@Nullable Object> data) implements Schema0Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema0 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema0BoxedList>, MapSchemaValidator, Schema0BoxedMap> { - private static @Nullable Schema0 instance = null; - - protected Schema0() { - super(new JsonSchemaInfo() - .contains(Contains.class) - ); - } - - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema0BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema0BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema0BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema0BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedString(validate(arg, configuration)); - } - @Override - public Schema0BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedList(validate(arg, configuration)); - } - @Override - public Schema0BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema0BoxedMap(validate(arg, configuration)); - } - @Override - public Schema0Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Contains1Boxed permits Contains1BoxedVoid, Contains1BoxedBoolean, Contains1BoxedNumber, Contains1BoxedString, Contains1BoxedList, Contains1BoxedMap { - @Nullable Object getData(); - } - - public record Contains1BoxedVoid(Void data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Contains1BoxedBoolean(boolean data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Contains1BoxedNumber(Number data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Contains1BoxedString(String data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Contains1BoxedList(FrozenList<@Nullable Object> data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Contains1BoxedMap(FrozenMap<@Nullable Object> data) implements Contains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Contains1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Contains1BoxedList>, MapSchemaValidator, Contains1BoxedMap> { - private static @Nullable Contains1 instance = null; - - protected Contains1() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("3")) - ); - } - - public static Contains1 getInstance() { - if (instance == null) { - instance = new Contains1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Contains1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedVoid(validate(arg, configuration)); - } - @Override - public Contains1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Contains1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedNumber(validate(arg, configuration)); - } - @Override - public Contains1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedString(validate(arg, configuration)); - } - @Override - public Contains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedList(validate(arg, configuration)); - } - @Override - public Contains1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Contains1BoxedMap(validate(arg, configuration)); - } - @Override - public Contains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface Schema1Boxed permits Schema1BoxedVoid, Schema1BoxedBoolean, Schema1BoxedNumber, Schema1BoxedString, Schema1BoxedList, Schema1BoxedMap { - @Nullable Object getData(); - } - - public record Schema1BoxedVoid(Void data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedBoolean(boolean data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedNumber(Number data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedString(String data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedList(FrozenList<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Schema1BoxedMap(FrozenMap<@Nullable Object> data) implements Schema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Schema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Schema1BoxedList>, MapSchemaValidator, Schema1BoxedMap> { - private static @Nullable Schema1 instance = null; - - protected Schema1() { - super(new JsonSchemaInfo() - .contains(Contains1.class) - ); - } - - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Schema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedVoid(validate(arg, configuration)); - } - @Override - public Schema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Schema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedNumber(validate(arg, configuration)); - } - @Override - public Schema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedString(validate(arg, configuration)); - } - @Override - public Schema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedList(validate(arg, configuration)); - } - @Override - public Schema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Schema1BoxedMap(validate(arg, configuration)); - } - @Override - public Schema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface UnevaluatedItemsBoxed permits UnevaluatedItemsBoxedVoid, UnevaluatedItemsBoxedBoolean, UnevaluatedItemsBoxedNumber, UnevaluatedItemsBoxedString, UnevaluatedItemsBoxedList, UnevaluatedItemsBoxedMap { - @Nullable Object getData(); - } - - public record UnevaluatedItemsBoxedVoid(Void data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedItemsBoxedBoolean(boolean data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedItemsBoxedNumber(Number data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedItemsBoxedString(String data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedItemsBoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedItemsBoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedItemsBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluatedItems extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedItemsBoxedList>, MapSchemaValidator, UnevaluatedItemsBoxedMap> { - private static @Nullable UnevaluatedItems instance = null; - - protected UnevaluatedItems() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("5")) - ); - } - - public static UnevaluatedItems getInstance() { - if (instance == null) { - instance = new UnevaluatedItems(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedItemsBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedString(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedList(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedItemsBoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluatedItemsBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface UnevaluateditemsDependsOnMultipleNestedContains1Boxed permits UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid, UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean, UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber, UnevaluateditemsDependsOnMultipleNestedContains1BoxedString, UnevaluateditemsDependsOnMultipleNestedContains1BoxedList, UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid(Void data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean(boolean data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber(Number data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedString(String data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsDependsOnMultipleNestedContains1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluateditemsDependsOnMultipleNestedContains1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsDependsOnMultipleNestedContains1BoxedList>, MapSchemaValidator, UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluateditemsDependsOnMultipleNestedContains1 instance = null; - - protected UnevaluateditemsDependsOnMultipleNestedContains1() { - super(new JsonSchemaInfo() - .allOf(List.of( - Schema0.class, - Schema1.class - )) - .unevaluatedItems(UnevaluatedItems.class) - ); - } - - public static UnevaluateditemsDependsOnMultipleNestedContains1 getInstance() { - if (instance == null) { - instance = new UnevaluateditemsDependsOnMultipleNestedContains1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedString(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsDependsOnMultipleNestedContains1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluateditemsDependsOnMultipleNestedContains1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java deleted file mode 100644 index a6374082f2e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithItems.java +++ /dev/null @@ -1,191 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluateditemsWithItems { - // nest classes so all schemas and input/output classes can be public - - - public static class Items extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Items instance = null; - public static Items getInstance() { - if (instance == null) { - instance = new Items(); - } - return instance; - } - } - - - public static class UnevaluateditemsWithItemsList extends FrozenList { - protected UnevaluateditemsWithItemsList(FrozenList m) { - super(m); - } - public static UnevaluateditemsWithItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return UnevaluateditemsWithItems1.getInstance().validate(arg, configuration); - } - } - - public static class UnevaluateditemsWithItemsListBuilder { - // class to build List - private final List list; - - public UnevaluateditemsWithItemsListBuilder() { - list = new ArrayList<>(); - } - - public UnevaluateditemsWithItemsListBuilder(List list) { - this.list = list; - } - - public UnevaluateditemsWithItemsListBuilder add(int item) { - list.add(item); - return this; - } - - public UnevaluateditemsWithItemsListBuilder add(float item) { - list.add(item); - return this; - } - - public UnevaluateditemsWithItemsListBuilder add(long item) { - list.add(item); - return this; - } - - public UnevaluateditemsWithItemsListBuilder add(double item) { - list.add(item); - return this; - } - - public List build() { - return list; - } - } - - - public static class UnevaluatedItems extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable UnevaluatedItems instance = null; - public static UnevaluatedItems getInstance() { - if (instance == null) { - instance = new UnevaluatedItems(); - } - return instance; - } - } - - - public sealed interface UnevaluateditemsWithItems1Boxed permits UnevaluateditemsWithItems1BoxedList { - @Nullable Object getData(); - } - - public record UnevaluateditemsWithItems1BoxedList(UnevaluateditemsWithItemsList data) implements UnevaluateditemsWithItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class UnevaluateditemsWithItems1 extends JsonSchema implements ListSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluateditemsWithItems1 instance = null; - - protected UnevaluateditemsWithItems1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(Items.class) - .unevaluatedItems(UnevaluatedItems.class) - ); - } - - public static UnevaluateditemsWithItems1 getInstance() { - if (instance == null) { - instance = new UnevaluateditemsWithItems1(); - } - return instance; - } - - @Override - public UnevaluateditemsWithItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(itemInstance instanceof Number)) { - throw new RuntimeException("Invalid instantiated value"); - } - items.add((Number) itemInstance); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new UnevaluateditemsWithItemsList(newInstanceItems); - } - - public UnevaluateditemsWithItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluateditemsWithItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithItems1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java deleted file mode 100644 index 9b329ed860e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElements.java +++ /dev/null @@ -1,339 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluateditemsWithNullInstanceElements { - // nest classes so all schemas and input/output classes can be public - - - public static class UnevaluatedItems extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable UnevaluatedItems instance = null; - public static UnevaluatedItems getInstance() { - if (instance == null) { - instance = new UnevaluatedItems(); - } - return instance; - } - } - - - public sealed interface UnevaluateditemsWithNullInstanceElements1Boxed permits UnevaluateditemsWithNullInstanceElements1BoxedVoid, UnevaluateditemsWithNullInstanceElements1BoxedBoolean, UnevaluateditemsWithNullInstanceElements1BoxedNumber, UnevaluateditemsWithNullInstanceElements1BoxedString, UnevaluateditemsWithNullInstanceElements1BoxedList, UnevaluateditemsWithNullInstanceElements1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedVoid(Void data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedBoolean(boolean data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedNumber(Number data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedString(String data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluateditemsWithNullInstanceElements1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluateditemsWithNullInstanceElements1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluateditemsWithNullInstanceElements1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluateditemsWithNullInstanceElements1BoxedList>, MapSchemaValidator, UnevaluateditemsWithNullInstanceElements1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluateditemsWithNullInstanceElements1 instance = null; - - protected UnevaluateditemsWithNullInstanceElements1() { - super(new JsonSchemaInfo() - .unevaluatedItems(UnevaluatedItems.class) - ); - } - - public static UnevaluateditemsWithNullInstanceElements1 getInstance() { - if (instance == null) { - instance = new UnevaluateditemsWithNullInstanceElements1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedString(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluateditemsWithNullInstanceElements1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluateditemsWithNullInstanceElements1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java deleted file mode 100644 index 1b8dce520b4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynames.java +++ /dev/null @@ -1,410 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluatedpropertiesNotAffectedByPropertynames { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface PropertyNamesBoxed permits PropertyNamesBoxedString { - @Nullable Object getData(); - } - - public record PropertyNamesBoxedString(String data) implements PropertyNamesBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class PropertyNames extends JsonSchema implements StringSchemaValidator { - private static @Nullable PropertyNames instance = null; - - protected PropertyNames() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .maxLength(1) - ); - } - - public static PropertyNames getInstance() { - if (instance == null) { - instance = new PropertyNames(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public PropertyNamesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new PropertyNamesBoxedString(validate(arg, configuration)); - } - @Override - public PropertyNamesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class UnevaluatedProperties extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable UnevaluatedProperties instance = null; - public static UnevaluatedProperties getInstance() { - if (instance == null) { - instance = new UnevaluatedProperties(); - } - return instance; - } - } - - - public sealed interface UnevaluatedpropertiesNotAffectedByPropertynames1Boxed permits UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid(Void data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean(boolean data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber(Number data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString(String data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesNotAffectedByPropertynames1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluatedpropertiesNotAffectedByPropertynames1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList>, MapSchemaValidator, UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluatedpropertiesNotAffectedByPropertynames1 instance = null; - - protected UnevaluatedpropertiesNotAffectedByPropertynames1() { - super(new JsonSchemaInfo() - .propertyNames(PropertyNames.class) - .unevaluatedProperties(UnevaluatedProperties.class) - ); - } - - public static UnevaluatedpropertiesNotAffectedByPropertynames1 getInstance() { - if (instance == null) { - instance = new UnevaluatedpropertiesNotAffectedByPropertynames1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedString(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesNotAffectedByPropertynames1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesNotAffectedByPropertynames1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java deleted file mode 100644 index e7fde5b6ee3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchema.java +++ /dev/null @@ -1,195 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluatedpropertiesSchema { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UnevaluatedPropertiesBoxed permits UnevaluatedPropertiesBoxedString { - @Nullable Object getData(); - } - - public record UnevaluatedPropertiesBoxedString(String data) implements UnevaluatedPropertiesBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - - public static class UnevaluatedProperties extends JsonSchema implements StringSchemaValidator { - private static @Nullable UnevaluatedProperties instance = null; - - protected UnevaluatedProperties() { - super(new JsonSchemaInfo() - .type(Set.of( - String.class - )) - .minLength(3) - ); - } - - public static UnevaluatedProperties getInstance() { - if (instance == null) { - instance = new UnevaluatedProperties(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedPropertiesBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedPropertiesBoxedString(validate(arg, configuration)); - } - @Override - public UnevaluatedPropertiesBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface UnevaluatedpropertiesSchema1Boxed permits UnevaluatedpropertiesSchema1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluatedpropertiesSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluatedpropertiesSchema1 extends JsonSchema implements MapSchemaValidator, UnevaluatedpropertiesSchema1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluatedpropertiesSchema1 instance = null; - - protected UnevaluatedpropertiesSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .unevaluatedProperties(UnevaluatedProperties.class) - ); - } - - public static UnevaluatedpropertiesSchema1 getInstance() { - if (instance == null) { - instance = new UnevaluatedpropertiesSchema1(); - } - return instance; - } - - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedpropertiesSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesSchema1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java deleted file mode 100644 index 4f8d1071048..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalproperties.java +++ /dev/null @@ -1,301 +0,0 @@ -package unit_test_api.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.GenericBuilder; -import unit_test_api.schemas.NotAnyTypeJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.MapUtils; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluatedpropertiesWithAdjacentAdditionalproperties { - // nest classes so all schemas and input/output classes can be public - - - public static class AdditionalProperties extends AnyTypeJsonSchema.AnyTypeJsonSchema1 { - private static @Nullable AdditionalProperties instance = null; - public static AdditionalProperties getInstance() { - if (instance == null) { - instance = new AdditionalProperties(); - } - return instance; - } - } - - - public static class Foo extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Foo instance = null; - public static Foo getInstance() { - if (instance == null) { - instance = new Foo(); - } - return instance; - } - } - - - public static class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap extends FrozenMap<@Nullable Object> { - protected UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "foo" - ); - public static UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance().validate(arg, configuration); - } - - public String foo() throws UnsetPropertyException { - String key = "foo"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for foo"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - return getOrThrow(name); - } - } - - public interface SetterForFoo { - Map getInstance(); - T getBuilderAfterFoo(Map instance); - - default T foo(String value) { - var instance = getInstance(); - instance.put("foo", value); - return getBuilderAfterFoo(instance); - } - } - - public interface SetterForAdditionalProperties { - Set getKnownKeys(); - Map getInstance(); - T getBuilderAfterAdditionalProperty(Map instance); - - default T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, null); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, String value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, List value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - default T additionalProperty(String key, Map value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - } - - public static class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder implements GenericBuilder>, SetterForFoo, SetterForAdditionalProperties { - private final Map instance; - private static final Set knownKeys = Set.of( - "foo" - ); - public Set getKnownKeys() { - return knownKeys; - } - public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder getBuilderAfterFoo(Map instance) { - return this; - } - public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public static class UnevaluatedProperties extends NotAnyTypeJsonSchema.NotAnyTypeJsonSchema1 { - // NotAnyTypeSchema - private static @Nullable UnevaluatedProperties instance = null; - public static UnevaluatedProperties getInstance() { - if (instance == null) { - instance = new UnevaluatedProperties(); - } - return instance; - } - } - - - public sealed interface UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed permits UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap(UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap data) implements UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluatedpropertiesWithAdjacentAdditionalproperties1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluatedpropertiesWithAdjacentAdditionalproperties1 instance = null; - - protected UnevaluatedpropertiesWithAdjacentAdditionalproperties1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("foo", Foo.class) - )) - .additionalProperties(AdditionalProperties.class) - .unevaluatedProperties(UnevaluatedProperties.class) - ); - } - - public static UnevaluatedpropertiesWithAdjacentAdditionalproperties1 getInstance() { - if (instance == null) { - instance = new UnevaluatedpropertiesWithAdjacentAdditionalproperties1(); - } - return instance; - } - - public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap(castProperties); - } - - public UnevaluatedpropertiesWithAdjacentAdditionalpropertiesMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithAdjacentAdditionalproperties1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithAdjacentAdditionalproperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java deleted file mode 100644 index 26b8be4996e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstanceProperties.java +++ /dev/null @@ -1,339 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UnevaluatedpropertiesWithNullValuedInstanceProperties { - // nest classes so all schemas and input/output classes can be public - - - public static class UnevaluatedProperties extends NullJsonSchema.NullJsonSchema1 { - private static @Nullable UnevaluatedProperties instance = null; - public static UnevaluatedProperties getInstance() { - if (instance == null) { - instance = new UnevaluatedProperties(); - } - return instance; - } - } - - - public sealed interface UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed permits UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap { - @Nullable Object getData(); - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid(Void data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean(boolean data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber(Number data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString(String data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList(FrozenList<@Nullable Object> data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap(FrozenMap<@Nullable Object> data) implements UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UnevaluatedpropertiesWithNullValuedInstanceProperties1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList>, MapSchemaValidator, UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UnevaluatedpropertiesWithNullValuedInstanceProperties1 instance = null; - - protected UnevaluatedpropertiesWithNullValuedInstanceProperties1() { - super(new JsonSchemaInfo() - .unevaluatedProperties(UnevaluatedProperties.class) - ); - } - - public static UnevaluatedpropertiesWithNullValuedInstanceProperties1 getInstance() { - if (instance == null) { - instance = new UnevaluatedpropertiesWithNullValuedInstanceProperties1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedVoid(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedNumber(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedString(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedList(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnevaluatedpropertiesWithNullValuedInstanceProperties1BoxedMap(validate(arg, configuration)); - } - @Override - public UnevaluatedpropertiesWithNullValuedInstanceProperties1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java deleted file mode 100644 index 88beb9ad710..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UniqueitemsFalseValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UniqueitemsFalseValidation1Boxed permits UniqueitemsFalseValidation1BoxedVoid, UniqueitemsFalseValidation1BoxedBoolean, UniqueitemsFalseValidation1BoxedNumber, UniqueitemsFalseValidation1BoxedString, UniqueitemsFalseValidation1BoxedList, UniqueitemsFalseValidation1BoxedMap { - @Nullable Object getData(); - } - - public record UniqueitemsFalseValidation1BoxedVoid(Void data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseValidation1BoxedBoolean(boolean data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseValidation1BoxedNumber(Number data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseValidation1BoxedString(String data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseValidation1BoxedList(FrozenList<@Nullable Object> data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsFalseValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UniqueitemsFalseValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UniqueitemsFalseValidation1BoxedList>, MapSchemaValidator, UniqueitemsFalseValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UniqueitemsFalseValidation1 instance = null; - - protected UniqueitemsFalseValidation1() { - super(new JsonSchemaInfo() - .uniqueItems(false) - ); - } - - public static UniqueitemsFalseValidation1 getInstance() { - if (instance == null) { - instance = new UniqueitemsFalseValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UniqueitemsFalseValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedString(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedList(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java deleted file mode 100644 index 4a3a66bc9ef..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItems.java +++ /dev/null @@ -1,426 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UniqueitemsFalseWithAnArrayOfItems { - // nest classes so all schemas and input/output classes can be public - - - public static class UniqueitemsFalseWithAnArrayOfItemsList extends FrozenList<@Nullable Object> { - protected UniqueitemsFalseWithAnArrayOfItemsList(FrozenList<@Nullable Object> m) { - super(m); - } - public static UniqueitemsFalseWithAnArrayOfItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return UniqueitemsFalseWithAnArrayOfItems1.getInstance().validate(arg, configuration); - } - } - - public static class UniqueitemsFalseWithAnArrayOfItemsListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder() { - list = new ArrayList<>(); - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(Void item) { - list.add(null); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(boolean item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(String item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(int item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(float item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(long item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(double item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(List item) { - list.add(item); - return this; - } - - public UniqueitemsFalseWithAnArrayOfItemsListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public static class Schema0 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface UniqueitemsFalseWithAnArrayOfItems1Boxed permits UniqueitemsFalseWithAnArrayOfItems1BoxedVoid, UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean, UniqueitemsFalseWithAnArrayOfItems1BoxedNumber, UniqueitemsFalseWithAnArrayOfItems1BoxedString, UniqueitemsFalseWithAnArrayOfItems1BoxedList, UniqueitemsFalseWithAnArrayOfItems1BoxedMap { - @Nullable Object getData(); - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedVoid(Void data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean(boolean data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedNumber(Number data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedString(String data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedList(UniqueitemsFalseWithAnArrayOfItemsList data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsFalseWithAnArrayOfItems1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsFalseWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UniqueitemsFalseWithAnArrayOfItems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, UniqueitemsFalseWithAnArrayOfItems1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UniqueitemsFalseWithAnArrayOfItems1 instance = null; - - protected UniqueitemsFalseWithAnArrayOfItems1() { - super(new JsonSchemaInfo() - .uniqueItems(false) - .prefixItems(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static UniqueitemsFalseWithAnArrayOfItems1 getInstance() { - if (instance == null) { - instance = new UniqueitemsFalseWithAnArrayOfItems1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public UniqueitemsFalseWithAnArrayOfItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new UniqueitemsFalseWithAnArrayOfItemsList(newInstanceItems); - } - - public UniqueitemsFalseWithAnArrayOfItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedVoid(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedNumber(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedString(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedList(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsFalseWithAnArrayOfItems1BoxedMap(validate(arg, configuration)); - } - @Override - public UniqueitemsFalseWithAnArrayOfItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java deleted file mode 100644 index e18321bcb1c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsValidation.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UniqueitemsValidation { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UniqueitemsValidation1Boxed permits UniqueitemsValidation1BoxedVoid, UniqueitemsValidation1BoxedBoolean, UniqueitemsValidation1BoxedNumber, UniqueitemsValidation1BoxedString, UniqueitemsValidation1BoxedList, UniqueitemsValidation1BoxedMap { - @Nullable Object getData(); - } - - public record UniqueitemsValidation1BoxedVoid(Void data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsValidation1BoxedBoolean(boolean data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsValidation1BoxedNumber(Number data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsValidation1BoxedString(String data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsValidation1BoxedList(FrozenList<@Nullable Object> data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsValidation1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsValidation1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UniqueitemsValidation1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UniqueitemsValidation1BoxedList>, MapSchemaValidator, UniqueitemsValidation1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UniqueitemsValidation1 instance = null; - - protected UniqueitemsValidation1() { - super(new JsonSchemaInfo() - .uniqueItems(true) - ); - } - - public static UniqueitemsValidation1 getInstance() { - if (instance == null) { - instance = new UniqueitemsValidation1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UniqueitemsValidation1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedVoid(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedNumber(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedString(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedList(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsValidation1BoxedMap(validate(arg, configuration)); - } - @Override - public UniqueitemsValidation1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java deleted file mode 100644 index 5059d69dafa..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItems.java +++ /dev/null @@ -1,426 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.BooleanJsonSchema; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UniqueitemsWithAnArrayOfItems { - // nest classes so all schemas and input/output classes can be public - - - public static class UniqueitemsWithAnArrayOfItemsList extends FrozenList<@Nullable Object> { - protected UniqueitemsWithAnArrayOfItemsList(FrozenList<@Nullable Object> m) { - super(m); - } - public static UniqueitemsWithAnArrayOfItemsList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return UniqueitemsWithAnArrayOfItems1.getInstance().validate(arg, configuration); - } - } - - public static class UniqueitemsWithAnArrayOfItemsListBuilder { - // class to build List<@Nullable Object> - private final List<@Nullable Object> list; - - public UniqueitemsWithAnArrayOfItemsListBuilder() { - list = new ArrayList<>(); - } - - public UniqueitemsWithAnArrayOfItemsListBuilder(List<@Nullable Object> list) { - this.list = list; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(Void item) { - list.add(null); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(boolean item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(String item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(int item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(float item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(long item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(double item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(List item) { - list.add(item); - return this; - } - - public UniqueitemsWithAnArrayOfItemsListBuilder add(Map item) { - list.add(item); - return this; - } - - public List<@Nullable Object> build() { - return list; - } - } - - - public static class Schema0 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Schema0 instance = null; - public static Schema0 getInstance() { - if (instance == null) { - instance = new Schema0(); - } - return instance; - } - } - - - public static class Schema1 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Schema1 instance = null; - public static Schema1 getInstance() { - if (instance == null) { - instance = new Schema1(); - } - return instance; - } - } - - - public sealed interface UniqueitemsWithAnArrayOfItems1Boxed permits UniqueitemsWithAnArrayOfItems1BoxedVoid, UniqueitemsWithAnArrayOfItems1BoxedBoolean, UniqueitemsWithAnArrayOfItems1BoxedNumber, UniqueitemsWithAnArrayOfItems1BoxedString, UniqueitemsWithAnArrayOfItems1BoxedList, UniqueitemsWithAnArrayOfItems1BoxedMap { - @Nullable Object getData(); - } - - public record UniqueitemsWithAnArrayOfItems1BoxedVoid(Void data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsWithAnArrayOfItems1BoxedBoolean(boolean data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsWithAnArrayOfItems1BoxedNumber(Number data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsWithAnArrayOfItems1BoxedString(String data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsWithAnArrayOfItems1BoxedList(UniqueitemsWithAnArrayOfItemsList data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UniqueitemsWithAnArrayOfItems1BoxedMap(FrozenMap<@Nullable Object> data) implements UniqueitemsWithAnArrayOfItems1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UniqueitemsWithAnArrayOfItems1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, MapSchemaValidator, UniqueitemsWithAnArrayOfItems1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UniqueitemsWithAnArrayOfItems1 instance = null; - - protected UniqueitemsWithAnArrayOfItems1() { - super(new JsonSchemaInfo() - .uniqueItems(true) - .prefixItems(List.of( - Schema0.class, - Schema1.class - )) - ); - } - - public static UniqueitemsWithAnArrayOfItems1 getInstance() { - if (instance == null) { - instance = new UniqueitemsWithAnArrayOfItems1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public UniqueitemsWithAnArrayOfItemsList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return new UniqueitemsWithAnArrayOfItemsList(newInstanceItems); - } - - public UniqueitemsWithAnArrayOfItemsList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedVoid(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedNumber(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedString(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedList(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UniqueitemsWithAnArrayOfItems1BoxedMap(validate(arg, configuration)); - } - @Override - public UniqueitemsWithAnArrayOfItems1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java deleted file mode 100644 index 6d9c4c1b8d7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UriFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UriFormat1Boxed permits UriFormat1BoxedVoid, UriFormat1BoxedBoolean, UriFormat1BoxedNumber, UriFormat1BoxedString, UriFormat1BoxedList, UriFormat1BoxedMap { - @Nullable Object getData(); - } - - public record UriFormat1BoxedVoid(Void data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriFormat1BoxedBoolean(boolean data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriFormat1BoxedNumber(Number data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriFormat1BoxedString(String data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UriFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriFormat1BoxedList>, MapSchemaValidator, UriFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UriFormat1 instance = null; - - protected UriFormat1() { - super(new JsonSchemaInfo() - .format("uri") - ); - } - - public static UriFormat1 getInstance() { - if (instance == null) { - instance = new UriFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UriFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public UriFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UriFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public UriFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedString(validate(arg, configuration)); - } - @Override - public UriFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedList(validate(arg, configuration)); - } - @Override - public UriFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UriFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public UriFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java deleted file mode 100644 index 25bea0f0e3e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriReferenceFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UriReferenceFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UriReferenceFormat1Boxed permits UriReferenceFormat1BoxedVoid, UriReferenceFormat1BoxedBoolean, UriReferenceFormat1BoxedNumber, UriReferenceFormat1BoxedString, UriReferenceFormat1BoxedList, UriReferenceFormat1BoxedMap { - @Nullable Object getData(); - } - - public record UriReferenceFormat1BoxedVoid(Void data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriReferenceFormat1BoxedBoolean(boolean data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriReferenceFormat1BoxedNumber(Number data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriReferenceFormat1BoxedString(String data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriReferenceFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriReferenceFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriReferenceFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UriReferenceFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriReferenceFormat1BoxedList>, MapSchemaValidator, UriReferenceFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UriReferenceFormat1 instance = null; - - protected UriReferenceFormat1() { - super(new JsonSchemaInfo() - .format("uri-reference") - ); - } - - public static UriReferenceFormat1 getInstance() { - if (instance == null) { - instance = new UriReferenceFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UriReferenceFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedString(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedList(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UriReferenceFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public UriReferenceFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java deleted file mode 100644 index e451da35ec4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UriTemplateFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UriTemplateFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UriTemplateFormat1Boxed permits UriTemplateFormat1BoxedVoid, UriTemplateFormat1BoxedBoolean, UriTemplateFormat1BoxedNumber, UriTemplateFormat1BoxedString, UriTemplateFormat1BoxedList, UriTemplateFormat1BoxedMap { - @Nullable Object getData(); - } - - public record UriTemplateFormat1BoxedVoid(Void data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriTemplateFormat1BoxedBoolean(boolean data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriTemplateFormat1BoxedNumber(Number data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriTemplateFormat1BoxedString(String data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriTemplateFormat1BoxedList(FrozenList<@Nullable Object> data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UriTemplateFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UriTemplateFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UriTemplateFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UriTemplateFormat1BoxedList>, MapSchemaValidator, UriTemplateFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UriTemplateFormat1 instance = null; - - protected UriTemplateFormat1() { - super(new JsonSchemaInfo() - .format("uri-template") - ); - } - - public static UriTemplateFormat1 getInstance() { - if (instance == null) { - instance = new UriTemplateFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UriTemplateFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedString(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedList(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UriTemplateFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public UriTemplateFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java deleted file mode 100644 index 5dd40f9caea..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/UuidFormat.java +++ /dev/null @@ -1,327 +0,0 @@ -package unit_test_api.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class UuidFormat { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface UuidFormat1Boxed permits UuidFormat1BoxedVoid, UuidFormat1BoxedBoolean, UuidFormat1BoxedNumber, UuidFormat1BoxedString, UuidFormat1BoxedList, UuidFormat1BoxedMap { - @Nullable Object getData(); - } - - public record UuidFormat1BoxedVoid(Void data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UuidFormat1BoxedBoolean(boolean data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UuidFormat1BoxedNumber(Number data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UuidFormat1BoxedString(String data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UuidFormat1BoxedList(FrozenList<@Nullable Object> data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record UuidFormat1BoxedMap(FrozenMap<@Nullable Object> data) implements UuidFormat1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class UuidFormat1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UuidFormat1BoxedList>, MapSchemaValidator, UuidFormat1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable UuidFormat1 instance = null; - - protected UuidFormat1() { - super(new JsonSchemaInfo() - .format("uuid") - ); - } - - public static UuidFormat1 getInstance() { - if (instance == null) { - instance = new UuidFormat1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public UuidFormat1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedVoid(validate(arg, configuration)); - } - @Override - public UuidFormat1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedBoolean(validate(arg, configuration)); - } - @Override - public UuidFormat1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedNumber(validate(arg, configuration)); - } - @Override - public UuidFormat1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedString(validate(arg, configuration)); - } - @Override - public UuidFormat1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedList(validate(arg, configuration)); - } - @Override - public UuidFormat1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidFormat1BoxedMap(validate(arg, configuration)); - } - @Override - public UuidFormat1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java deleted file mode 100644 index f2de1d9e1e0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElse.java +++ /dev/null @@ -1,1185 +0,0 @@ -package unit_test_api.components.schemas; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.UnsetAddPropsSetter; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -public class ValidateAgainstCorrectBranchThenVsElse { - // nest classes so all schemas and input/output classes can be public - - - public sealed interface ElseBoxed permits ElseBoxedVoid, ElseBoxedBoolean, ElseBoxedNumber, ElseBoxedString, ElseBoxedList, ElseBoxedMap { - @Nullable Object getData(); - } - - public record ElseBoxedVoid(Void data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedBoolean(boolean data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedNumber(Number data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedString(String data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedList(FrozenList<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ElseBoxedMap(FrozenMap<@Nullable Object> data) implements ElseBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Else extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ElseBoxedList>, MapSchemaValidator, ElseBoxedMap> { - private static @Nullable Else instance = null; - - protected Else() { - super(new JsonSchemaInfo() - .multipleOf(new BigDecimal("2")) - ); - } - - public static Else getInstance() { - if (instance == null) { - instance = new Else(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ElseBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedVoid(validate(arg, configuration)); - } - @Override - public ElseBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedBoolean(validate(arg, configuration)); - } - @Override - public ElseBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedNumber(validate(arg, configuration)); - } - @Override - public ElseBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedString(validate(arg, configuration)); - } - @Override - public ElseBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedList(validate(arg, configuration)); - } - @Override - public ElseBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ElseBoxedMap(validate(arg, configuration)); - } - @Override - public ElseBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface IfBoxed permits IfBoxedVoid, IfBoxedBoolean, IfBoxedNumber, IfBoxedString, IfBoxedList, IfBoxedMap { - @Nullable Object getData(); - } - - public record IfBoxedVoid(Void data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedBoolean(boolean data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedNumber(Number data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedString(String data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedList(FrozenList<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record IfBoxedMap(FrozenMap<@Nullable Object> data) implements IfBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class If extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, IfBoxedList>, MapSchemaValidator, IfBoxedMap> { - private static @Nullable If instance = null; - - protected If() { - super(new JsonSchemaInfo() - .exclusiveMaximum(0) - ); - } - - public static If getInstance() { - if (instance == null) { - instance = new If(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public IfBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedVoid(validate(arg, configuration)); - } - @Override - public IfBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedBoolean(validate(arg, configuration)); - } - @Override - public IfBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedNumber(validate(arg, configuration)); - } - @Override - public IfBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedString(validate(arg, configuration)); - } - @Override - public IfBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedList(validate(arg, configuration)); - } - @Override - public IfBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new IfBoxedMap(validate(arg, configuration)); - } - @Override - public IfBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ThenBoxed permits ThenBoxedVoid, ThenBoxedBoolean, ThenBoxedNumber, ThenBoxedString, ThenBoxedList, ThenBoxedMap { - @Nullable Object getData(); - } - - public record ThenBoxedVoid(Void data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedBoolean(boolean data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedNumber(Number data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedString(String data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedList(FrozenList<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ThenBoxedMap(FrozenMap<@Nullable Object> data) implements ThenBoxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Then extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ThenBoxedList>, MapSchemaValidator, ThenBoxedMap> { - private static @Nullable Then instance = null; - - protected Then() { - super(new JsonSchemaInfo() - .minimum(-10) - ); - } - - public static Then getInstance() { - if (instance == null) { - instance = new Then(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ThenBoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedVoid(validate(arg, configuration)); - } - @Override - public ThenBoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedBoolean(validate(arg, configuration)); - } - @Override - public ThenBoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedNumber(validate(arg, configuration)); - } - @Override - public ThenBoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedString(validate(arg, configuration)); - } - @Override - public ThenBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedList(validate(arg, configuration)); - } - @Override - public ThenBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ThenBoxedMap(validate(arg, configuration)); - } - @Override - public ThenBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ValidateAgainstCorrectBranchThenVsElse1Boxed permits ValidateAgainstCorrectBranchThenVsElse1BoxedVoid, ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean, ValidateAgainstCorrectBranchThenVsElse1BoxedNumber, ValidateAgainstCorrectBranchThenVsElse1BoxedString, ValidateAgainstCorrectBranchThenVsElse1BoxedList, ValidateAgainstCorrectBranchThenVsElse1BoxedMap { - @Nullable Object getData(); - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedVoid(Void data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean(boolean data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedNumber(Number data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedString(String data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedList(FrozenList<@Nullable Object> data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record ValidateAgainstCorrectBranchThenVsElse1BoxedMap(FrozenMap<@Nullable Object> data) implements ValidateAgainstCorrectBranchThenVsElse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ValidateAgainstCorrectBranchThenVsElse1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, ValidateAgainstCorrectBranchThenVsElse1BoxedList>, MapSchemaValidator, ValidateAgainstCorrectBranchThenVsElse1BoxedMap> { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ValidateAgainstCorrectBranchThenVsElse1 instance = null; - - protected ValidateAgainstCorrectBranchThenVsElse1() { - super(new JsonSchemaInfo() - .ifSchema(If.class) - .then(Then.class) - .elseSchema(Else.class) - ); - } - - public static ValidateAgainstCorrectBranchThenVsElse1 getInstance() { - if (instance == null) { - instance = new ValidateAgainstCorrectBranchThenVsElse1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return castProperties; - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedVoid(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedBoolean(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedNumber(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedString(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedList(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ValidateAgainstCorrectBranchThenVsElse1BoxedMap(validate(arg, configuration)); - } - @Override - public ValidateAgainstCorrectBranchThenVsElse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java deleted file mode 100644 index e91ad8d0377..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/ApiConfiguration.java +++ /dev/null @@ -1,101 +0,0 @@ -package unit_test_api.configurations; - -import unit_test_api.servers.Server; -import unit_test_api.RootServerInfo; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.Duration; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.HashMap; - -public class ApiConfiguration { - private final ServerInfo serverInfo; - private final ServerIndexInfo serverIndexInfo; - private final @Nullable Duration timeout; - private final Map> defaultHeaders; - - public ApiConfiguration() { - serverInfo = new ServerInfoBuilder().build(); - serverIndexInfo = new ServerIndexInfoBuilder().build(); - timeout = null; - defaultHeaders = new HashMap<>(); - } - - public ApiConfiguration(ServerInfo serverInfo, ServerIndexInfo serverIndexInfo, Duration timeout, Map> defaultHeaders) { - this.serverInfo = serverInfo; - this.serverIndexInfo = serverIndexInfo; - this.timeout = timeout; - this.defaultHeaders = defaultHeaders; - } - - public static class ServerInfo { - final RootServerInfo.RootServerInfo1 rootServerInfo; - - ServerInfo( - RootServerInfo. @Nullable RootServerInfo1 rootServerInfo - ) { - this.rootServerInfo = Objects.requireNonNullElse(rootServerInfo, new RootServerInfo.RootServerInfoBuilder().build()); - } - } - - public static class ServerInfoBuilder { - private RootServerInfo. @Nullable RootServerInfo1 rootServerInfo; - public ServerInfoBuilder() {} - - public ServerInfoBuilder rootServerInfo(RootServerInfo.RootServerInfo1 rootServerInfo) { - this.rootServerInfo = rootServerInfo; - return this; - } - - public ServerInfo build() { - return new ServerInfo( - rootServerInfo - ); - } - } - - public static class ServerIndexInfo { - final RootServerInfo.ServerIndex rootServerInfoServerIndex; - - ServerIndexInfo( - RootServerInfo. @Nullable ServerIndex rootServerInfoServerIndex - ) { - this.rootServerInfoServerIndex = Objects.requireNonNullElse(rootServerInfoServerIndex, RootServerInfo.ServerIndex.SERVER_0); - } - } - - public static class ServerIndexInfoBuilder { - private RootServerInfo. @Nullable ServerIndex rootServerInfoServerIndex; - public ServerIndexInfoBuilder() {} - - public ServerIndexInfoBuilder rootServerInfoServerIndex(RootServerInfo.ServerIndex serverIndex) { - this.rootServerInfoServerIndex = serverIndex; - return this; - } - - public ServerIndexInfo build() { - return new ServerIndexInfo( - rootServerInfoServerIndex - ); - } - } - - public Server getServer(RootServerInfo. @Nullable ServerIndex serverIndex) { - var serverProvider = serverInfo.rootServerInfo; - if (serverIndex == null) { - RootServerInfo.ServerIndex configServerIndex = serverIndexInfo.rootServerInfoServerIndex; - return serverProvider.getServer(configServerIndex); - } - return serverProvider.getServer(serverIndex); - } - - public Map> getDefaultHeaders() { - return defaultHeaders; - } - - public @Nullable Duration getTimeout() { - return timeout; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java deleted file mode 100644 index a338f376306..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/JsonSchemaKeywordFlags.java +++ /dev/null @@ -1,334 +0,0 @@ -package unit_test_api.configurations; - -import java.util.LinkedHashSet; - -public record JsonSchemaKeywordFlags( - boolean additionalProperties, - boolean allOf, - boolean anyOf, - boolean const_, - boolean contains, - boolean dependentRequired, - boolean dependentSchemas, - boolean discriminator, - boolean else_, - boolean enum_, - boolean exclusiveMaximum, - boolean exclusiveMinimum, - boolean format, - boolean if_, - boolean maximum, - boolean minimum, - boolean items, - boolean maxContains, - boolean maxItems, - boolean maxLength, - boolean maxProperties, - boolean minContains, - boolean minItems, - boolean minLength, - boolean minProperties, - boolean multipleOf, - boolean not, - boolean oneOf, - boolean pattern, - boolean patternProperties, - boolean prefixItems, - boolean properties, - boolean propertyNames, - boolean required, - boolean then, - boolean type, - boolean uniqueItems, - boolean unevaluatedItems, - boolean unevaluatedProperties - ) { - - public LinkedHashSet getKeywords() { - LinkedHashSet enabledKeywords = new LinkedHashSet<>(); - if (additionalProperties) { enabledKeywords.add("additionalProperties"); } - if (allOf) { enabledKeywords.add("allOf"); } - if (anyOf) { enabledKeywords.add("anyOf"); } - if (const_) { enabledKeywords.add("const"); } - if (contains) { enabledKeywords.add("contains"); } - if (dependentRequired) { enabledKeywords.add("dependentRequired"); } - if (dependentSchemas) { enabledKeywords.add("dependentSchemas"); } - if (discriminator) { enabledKeywords.add("discriminator"); } - if (else_) { enabledKeywords.add("else_"); } - if (enum_) { enabledKeywords.add("enum_"); } - if (exclusiveMaximum) { enabledKeywords.add("exclusiveMaximum"); } - if (exclusiveMinimum) { enabledKeywords.add("exclusiveMinimum"); } - if (format) { enabledKeywords.add("format"); } - if (if_) { enabledKeywords.add("if_"); } - if (maximum) { enabledKeywords.add("maximum"); } - if (minimum) { enabledKeywords.add("minimum"); } - if (items) { enabledKeywords.add("items"); } - if (maxContains) { enabledKeywords.add("maxContains"); } - if (maxItems) { enabledKeywords.add("maxItems"); } - if (maxLength) { enabledKeywords.add("maxLength"); } - if (maxProperties) { enabledKeywords.add("maxProperties"); } - if (minContains) { enabledKeywords.add("minContains"); } - if (minItems) { enabledKeywords.add("minItems"); } - if (minLength) { enabledKeywords.add("minLength"); } - if (minProperties) { enabledKeywords.add("minProperties"); } - if (multipleOf) { enabledKeywords.add("multipleOf"); } - if (not) { enabledKeywords.add("not"); } - if (oneOf) { enabledKeywords.add("oneOf"); } - if (pattern) { enabledKeywords.add("pattern"); } - if (patternProperties) { enabledKeywords.add("patternProperties"); } - if (prefixItems) { enabledKeywords.add("prefixItems"); } - if (properties) { enabledKeywords.add("properties"); } - if (propertyNames) { enabledKeywords.add("propertyNames"); } - if (required) { enabledKeywords.add("required"); } - if (then) { enabledKeywords.add("then"); } - if (type) { enabledKeywords.add("type"); } - if (uniqueItems) { enabledKeywords.add("uniqueItems"); } - if (unevaluatedItems) { enabledKeywords.add("unevaluatedItems"); } - if (unevaluatedProperties) { enabledKeywords.add("unevaluatedProperties"); } - return enabledKeywords; - } - - public static class Builder { - private boolean additionalProperties; - private boolean allOf; - private boolean anyOf; - private boolean const_; - private boolean contains; - private boolean dependentRequired; - private boolean dependentSchemas; - private boolean discriminator; - private boolean else_; - private boolean enum_; - private boolean exclusiveMaximum; - private boolean exclusiveMinimum; - private boolean format; - private boolean if_; - private boolean maximum; - private boolean minimum; - private boolean items; - private boolean maxContains; - private boolean maxItems; - private boolean maxLength; - private boolean maxProperties; - private boolean minContains; - private boolean minItems; - private boolean minLength; - private boolean minProperties; - private boolean multipleOf; - private boolean not; - private boolean oneOf; - private boolean pattern; - private boolean patternProperties; - private boolean prefixItems; - private boolean properties; - private boolean propertyNames; - private boolean required; - private boolean then; - private boolean type; - private boolean uniqueItems; - private boolean unevaluatedItems; - private boolean unevaluatedProperties; - - public Builder() {} - - public Builder additionalProperties() { - additionalProperties = true; - return this; - } - public Builder allOf() { - allOf = true; - return this; - } - public Builder anyOf() { - anyOf = true; - return this; - } - public Builder const_() { - const_ = true; - return this; - } - public Builder contains() { - contains = true; - return this; - } - public Builder dependentRequired() { - dependentRequired = true; - return this; - } - public Builder dependentSchemas() { - dependentSchemas = true; - return this; - } - public Builder discriminator() { - discriminator = true; - return this; - } - public Builder else_() { - else_ = true; - return this; - } - public Builder enum_() { - enum_ = true; - return this; - } - public Builder exclusiveMaximum() { - exclusiveMaximum = true; - return this; - } - public Builder exclusiveMinimum() { - exclusiveMinimum = true; - return this; - } - public Builder format() { - format = true; - return this; - } - public Builder if_() { - if_ = true; - return this; - } - public Builder maximum() { - maximum = true; - return this; - } - public Builder minimum() { - minimum = true; - return this; - } - public Builder items() { - items = true; - return this; - } - public Builder maxContains() { - maxContains = true; - return this; - } - public Builder maxItems() { - maxItems = true; - return this; - } - public Builder maxLength() { - maxLength = true; - return this; - } - public Builder maxProperties() { - maxProperties = true; - return this; - } - public Builder minContains() { - minContains = true; - return this; - } - public Builder minItems() { - minItems = true; - return this; - } - public Builder minLength() { - minLength = true; - return this; - } - public Builder minProperties() { - minProperties = true; - return this; - } - public Builder multipleOf() { - multipleOf = true; - return this; - } - public Builder not() { - not = true; - return this; - } - public Builder oneOf() { - oneOf = true; - return this; - } - public Builder pattern() { - pattern = true; - return this; - } - public Builder patternProperties() { - patternProperties = true; - return this; - } - public Builder prefixItems() { - prefixItems = true; - return this; - } - public Builder properties() { - properties = true; - return this; - } - public Builder propertyNames() { - propertyNames = true; - return this; - } - public Builder required() { - required = true; - return this; - } - public Builder then() { - then = true; - return this; - } - public Builder type() { - type = true; - return this; - } - public Builder uniqueItems() { - uniqueItems = true; - return this; - } - public Builder unevaluatedItems() { - unevaluatedItems = true; - return this; - } - public Builder unevaluatedProperties() { - unevaluatedProperties = true; - return this; - } - public JsonSchemaKeywordFlags build() { - return new JsonSchemaKeywordFlags( - additionalProperties, - allOf, - anyOf, - const_, - contains, - dependentRequired, - dependentSchemas, - discriminator, - else_, - enum_, - exclusiveMaximum, - exclusiveMinimum, - format, - if_, - maximum, - minimum, - items, - maxContains, - maxItems, - maxLength, - maxProperties, - minContains, - minItems, - minLength, - minProperties, - multipleOf, - not, - oneOf, - pattern, - patternProperties, - prefixItems, - properties, - propertyNames, - required, - then, - type, - uniqueItems, - unevaluatedItems, - unevaluatedProperties - ); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java deleted file mode 100644 index b186a2289d4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/configurations/SchemaConfiguration.java +++ /dev/null @@ -1,4 +0,0 @@ -package unit_test_api.configurations; - -public record SchemaConfiguration(JsonSchemaKeywordFlags disabledKeywordFlags) { -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java deleted file mode 100644 index af4a7a37f81..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDeserializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package unit_test_api.contenttype; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.ToNumberPolicy; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class ContentTypeDeserializer { - private static final Gson gson = new GsonBuilder() - .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .create(); - - @SuppressWarnings("nullness") - public static @Nullable Object fromJson(String json) { - return gson.fromJson(json, Object.class); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java deleted file mode 100644 index 067d288a444..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeDetector.java +++ /dev/null @@ -1,18 +0,0 @@ -package unit_test_api.contenttype; - -import java.util.regex.Pattern; - -public class ContentTypeDetector { - private static final Pattern jsonContentTypePattern = Pattern.compile( - "application/[^+]*[+]?(json);?.*" - ); - private static final String textPlainContentType = "text/plain"; - - public static boolean contentTypeIsJson(String contentType) { - return jsonContentTypePattern.matcher(contentType).find(); - } - - public static boolean contentTypeIsTextPlain(String contentType) { - return textPlainContentType.equals(contentType); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java deleted file mode 100644 index 392ec7a002a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/contenttype/ContentTypeSerializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package unit_test_api.contenttype; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.ToNumberPolicy; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class ContentTypeSerializer { - private static final Gson gson = new GsonBuilder() - .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .create(); - - @SuppressWarnings("nullness") - public static String toJson(@Nullable Object body) { - return gson.toJson(body); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java deleted file mode 100644 index b69f40b7302..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ApiException.java +++ /dev/null @@ -1,13 +0,0 @@ -package unit_test_api.exceptions; - -import java.net.http.HttpResponse; - -@SuppressWarnings("serial") -public class ApiException extends BaseException { - public HttpResponse response; - - public ApiException(String s, HttpResponse response) { - super(s); - this.response = response; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java deleted file mode 100644 index 32916ec96ad..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/BaseException.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.exceptions; - -@SuppressWarnings("serial") -public class BaseException extends Exception { - public BaseException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java deleted file mode 100644 index 3fd3a00e464..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/InvalidAdditionalPropertyException.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.exceptions; - -@SuppressWarnings("serial") -public class InvalidAdditionalPropertyException extends BaseException { - public InvalidAdditionalPropertyException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java deleted file mode 100644 index cf6ee8ac6c4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/NotImplementedException.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.exceptions; - -@SuppressWarnings("serial") -public class NotImplementedException extends BaseException { - public NotImplementedException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java deleted file mode 100644 index f49e05b4742..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/UnsetPropertyException.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.exceptions; - -@SuppressWarnings("serial") -public class UnsetPropertyException extends BaseException { - public UnsetPropertyException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java deleted file mode 100644 index 3aa0e5699b6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/exceptions/ValidationException.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.exceptions; - -@SuppressWarnings("serial") -public class ValidationException extends BaseException { - public ValidationException(String s) { - super(s); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java deleted file mode 100644 index c722738d2b9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/ContentHeader.java +++ /dev/null @@ -1,59 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.contenttype.ContentTypeDetector; -import unit_test_api.contenttype.ContentTypeSerializer; -import unit_test_api.contenttype.ContentTypeDeserializer; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.mediatype.MediaType; -import unit_test_api.parameter.ParameterStyle; - -import java.net.http.HttpHeaders; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; -import java.util.function.BiPredicate; - -public class ContentHeader extends HeaderBase implements Header { - public final AbstractMap.SimpleEntry> content; - - public ContentHeader(boolean required, @Nullable Boolean allowReserved, @Nullable Boolean explode, AbstractMap.SimpleEntry> content) { - super(required, ParameterStyle.SIMPLE, explode, allowReserved); - this.content = content; - } - - private static HttpHeaders toHeaders(String name, String value) { - Map> map = Map.of(name, List.of(value)); - BiPredicate headerFilter = (key, val) -> true; - return HttpHeaders.of(map, headerFilter); - } - - @Override - public HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { - var castInData = validate ? content.getValue().schema().validate(inData, configuration) : inData ; - String contentType = content.getKey(); - if (ContentTypeDetector.contentTypeIsJson(contentType)) { - var value = ContentTypeSerializer.toJson(castInData); - return toHeaders(name, value); - } else { - throw new NotImplementedException("Serialization of "+contentType+" has not yet been implemented"); - } - } - - @Override - public @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { - String inDataJoined = String.join(",", inData); // unsure if this is needed - @Nullable Object deserializedJson = ContentTypeDeserializer.fromJson(inDataJoined); - if (validate) { - String contentType = content.getKey(); - if (ContentTypeDetector.contentTypeIsJson(contentType)) { - return content.getValue().schema().validate(deserializedJson, configuration); - } else { - throw new NotImplementedException("Header deserialization of "+contentType+" has not yet been implemented"); - } - } - return deserializedJson; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java deleted file mode 100644 index 6018aef54d3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Header.java +++ /dev/null @@ -1,14 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; - -import java.net.http.HttpHeaders; -import java.util.List; - -public interface Header { - HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException; - @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java deleted file mode 100644 index 44ef98c032d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/HeaderBase.java +++ /dev/null @@ -1,18 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.parameter.ParameterStyle; - -public class HeaderBase { - public final boolean required; - public final @Nullable ParameterStyle style; - public final @Nullable Boolean explode; - public final @Nullable Boolean allowReserved; - - public HeaderBase(boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved) { - this.required = required; - this.style = style; - this.explode = explode; - this.allowReserved = allowReserved; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java deleted file mode 100644 index 22fb55e038d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/PrefixSeparatorIterator.java +++ /dev/null @@ -1,27 +0,0 @@ -package unit_test_api.header; - -import java.util.Set; - -public class PrefixSeparatorIterator { - // A class to store prefixes and separators for rfc6570 expansions - public final String prefix; - public final String separator; - private boolean first; - public final String itemSeparator; - private static final Set reusedSeparators = Set.of(".", "|", "%20"); - - public PrefixSeparatorIterator(String prefix, String separator) { - this.prefix = prefix; - this.separator = separator; - itemSeparator = reusedSeparators.contains(separator) ? separator : ","; - first = true; - } - - public String next() { - if (first) { - first = false; - return prefix; - } - return separator; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java deleted file mode 100644 index a2cd5006219..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/Rfc6570Serializer.java +++ /dev/null @@ -1,193 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -public class Rfc6570Serializer { - private static final String ENCODING = "UTF-8"; - private static final Set namedParameterSeparators = Set.of("&", ";"); - - private static String percentEncode(String s) throws NotImplementedException { - if (s == null) { - return ""; - } - try { - return URLEncoder.encode(s, ENCODING) - // OAuth encodes some characters differently: - .replace("+", "%20").replace("*", "%2A") - .replace("%7E", "~"); - // This could be done faster with more hand-crafted code. - } catch (UnsupportedEncodingException wow) { - throw new NotImplementedException(wow.getMessage()); - } - } - - private static @Nullable String rfc6570ItemValue(@Nullable Object item, boolean percentEncode) throws NotImplementedException { - /* - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - */ - if (item instanceof String stringItem) { - if (percentEncode) { - return percentEncode(stringItem); - } - return stringItem; - } else if (item instanceof Number numberItem) { - return numberItem.toString(); - } else if (item == null) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return null; - } else if (item instanceof List && ((List) item).isEmpty()) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return null; - } else if (item instanceof Map && ((Map) item).isEmpty()) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return null; - } - throw new NotImplementedException("Unable to generate a rfc6570 item representation of "+item); - } - - private static String rfc6570StrNumberExpansion( - @Nullable Object inData, - boolean percentEncode, - PrefixSeparatorIterator prefixSeparatorIterator, - String varNamePiece, - boolean namedParameterExpansion - ) throws NotImplementedException { - var itemValue = rfc6570ItemValue(inData, percentEncode); - if (itemValue == null || (itemValue.isEmpty() && prefixSeparatorIterator.separator.equals(";"))) { - return prefixSeparatorIterator.next() + varNamePiece; - } - var valuePairEquals = namedParameterExpansion ? "=" : ""; - return prefixSeparatorIterator.next() + varNamePiece + valuePairEquals + itemValue; - } - - private static String rfc6570ListExpansion( - List inData, - boolean explode, - boolean percentEncode, - PrefixSeparatorIterator prefixSeparatorIterator, - String varNamePiece, - boolean namedParameterExpansion - ) throws NotImplementedException { - List itemValues = new ArrayList<>(); - for (Object v: inData) { - @Nullable String value = rfc6570ItemValue(v, percentEncode); - if (value == null) { - continue; - } - itemValues.add(value); - } - if (itemValues.isEmpty()) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return ""; - } - var valuePairEquals = namedParameterExpansion ? "=" : ""; - if (!explode) { - return ( - prefixSeparatorIterator.next() + - varNamePiece + - valuePairEquals + - String.join(prefixSeparatorIterator.itemSeparator, itemValues) - ); - } - // exploded - return prefixSeparatorIterator.next() + itemValues.stream().map(v -> varNamePiece + valuePairEquals + v).collect(Collectors.joining(prefixSeparatorIterator.next())); - } - - private static String rfc6570MapExpansion( - Map inData, - boolean explode, - boolean percentEncode, - PrefixSeparatorIterator prefixSeparatorIterator, - String varNamePiece, - boolean namedParameterExpansion - ) throws NotImplementedException { - Map inDataMap = new LinkedHashMap<>(); - for (Map.Entry entry: inData.entrySet()) { - @Nullable String value = rfc6570ItemValue(entry.getValue(), percentEncode); - if (value == null) { - continue; - } - @Nullable Object key = entry.getKey(); - if (!(key instanceof String strKey)) { - continue; - } - inDataMap.put(strKey, value); - } - if (inDataMap.isEmpty()) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return ""; - } - var valuePairEquals = namedParameterExpansion ? "=" : ""; - if (!explode) { - return prefixSeparatorIterator.next() + - varNamePiece + - valuePairEquals + - inDataMap.entrySet().stream().map(e -> e.getKey()+prefixSeparatorIterator.itemSeparator+e.getValue()).collect(Collectors.joining(prefixSeparatorIterator.itemSeparator)); - } - // exploded - return prefixSeparatorIterator.next() + inDataMap.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(prefixSeparatorIterator.next())); - } - - protected static String rfc6570Expansion( - String variableName, - @Nullable Object inData, - boolean explode, - boolean percentEncode, - PrefixSeparatorIterator prefixSeparatorIterator - ) throws NotImplementedException { - /* - Separator is for separate variables like dict with explode true, - not for array item separation - */ - var namedParameterExpansion = namedParameterSeparators.contains(prefixSeparatorIterator.separator); - var varNamePiece = namedParameterExpansion ? variableName : ""; - if (inData instanceof Number || inData instanceof String) { - return rfc6570StrNumberExpansion( - inData, - percentEncode, - prefixSeparatorIterator, - varNamePiece, - namedParameterExpansion - ); - } else if (inData == null) { - // ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return ""; - } else if (inData instanceof List listData) { - return rfc6570ListExpansion( - listData, - explode, - percentEncode, - prefixSeparatorIterator, - varNamePiece, - namedParameterExpansion - ); - } else if (inData instanceof Map mapData) { - return rfc6570MapExpansion( - mapData, - explode, - percentEncode, - prefixSeparatorIterator, - varNamePiece, - namedParameterExpansion - ); - } - // bool, bytes, etc - throw new NotImplementedException("Unable to generate a rfc6570 representation of "+inData); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java deleted file mode 100644 index 06c3ef68ea0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/SchemaHeader.java +++ /dev/null @@ -1,97 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.contenttype.ContentTypeDeserializer; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.parameter.ParameterStyle; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaFactory; -import unit_test_api.schemas.validation.UnsetAnyTypeJsonSchema; - -import java.net.http.HttpHeaders; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.BiPredicate; - -public class SchemaHeader extends HeaderBase implements Header { - public final JsonSchema schema; - - public SchemaHeader(boolean required, @Nullable Boolean allowReserved, @Nullable Boolean explode, JsonSchema schema) { - super(required, ParameterStyle.SIMPLE, explode, allowReserved); - this.schema = schema; - } - - private static HttpHeaders toHeaders(String name, String value) { - Map> map = Map.of(name, List.of(value)); - BiPredicate headerFilter = (key, val) -> true; - return HttpHeaders.of(map, headerFilter); - } - - @Override - public HttpHeaders serialize(@Nullable Object inData, String name, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { - var castInData = validate ? schema.validate(inData, configuration) : inData; - boolean usedExplode = explode != null && explode; - var value = StyleSerializer.serializeSimple(castInData, name, usedExplode, false); - return toHeaders(name, value); - } - - private static final Set> VOID_TYPES = Set.of(Void.class); - private static final Set> BOOLEAN_TYPES = Set.of(Boolean.class); - private static final Set> NUMERIC_TYPES = Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - ); - private static final Set> STRING_TYPES = Set.of(String.class); - private static final Set> LIST_TYPES = Set.of(List.class); - private static final Set> MAP_TYPES = Set.of(Map.class); - - private List<@Nullable Object> getList(JsonSchema schema, List inData) throws NotImplementedException { - Class> itemsSchemaCls = schema.items == null ? UnsetAnyTypeJsonSchema.UnsetAnyTypeJsonSchema1.class : schema.items; - JsonSchema itemSchema = JsonSchemaFactory.getInstance(itemsSchemaCls); - List<@Nullable Object> castList = new ArrayList<>(); - for (String inDataItem: inData) { - @Nullable Object castInDataItem = getCastInData(itemSchema, List.of(inDataItem)); - castList.add(castInDataItem); - } - return castList; - } - - private @Nullable Object getCastInData(JsonSchema schema, List inData) throws NotImplementedException { - if (schema.type == null) { - if (inData.size() == 1) { - return inData.get(0); - } - return getList(schema, inData); - } else if (schema.type.size() == 1) { - if (schema.type.equals(BOOLEAN_TYPES)) { - throw new NotImplementedException("Boolean serialization is not defined in Rfc6570, there is no agreed upon way to sent a boolean, send a string enum instead"); - } else if (schema.type.equals(VOID_TYPES) && inData.size() == 1 && inData.get(0).isEmpty()) { - return null; - } else if (schema.type.equals(STRING_TYPES) && inData.size() == 1) { - return inData.get(0); - } else if (schema.type.equals(LIST_TYPES)) { - return getList(schema, inData); - } else if (schema.type.equals(MAP_TYPES)) { - throw new NotImplementedException("Header map deserialization has not yet been implemented"); - } - } else if (schema.type.size() == 4 && schema.type.equals(NUMERIC_TYPES) && inData.size() == 1) { - return ContentTypeDeserializer.fromJson(inData.get(0)); - } - throw new NotImplementedException("Header deserialization for schemas with multiple types has not yet been implemented"); - } - - @Override - public @Nullable Object deserialize(List inData, boolean validate, SchemaConfiguration configuration) throws NotImplementedException, ValidationException { - @Nullable Object castInData = getCastInData(schema, inData); - if (validate) { - return schema.validate(castInData, configuration); - } - return castInData; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java deleted file mode 100644 index 7315f184adb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/header/StyleSerializer.java +++ /dev/null @@ -1,99 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -public class StyleSerializer extends Rfc6570Serializer { - public static String serializeSimple( - @Nullable Object inData, - String name, - boolean explode, - boolean percentEncode - ) throws NotImplementedException { - var prefixSeparatorIterator = new PrefixSeparatorIterator("", ","); - return rfc6570Expansion( - name, - inData, - explode, - percentEncode, - prefixSeparatorIterator - ); - } - - public static String serializeForm( - @Nullable Object inData, - String name, - boolean explode, - boolean percentEncode - ) throws NotImplementedException { - // todo check that the prefix and suffix matches this one - PrefixSeparatorIterator iterator = new PrefixSeparatorIterator("", "&"); - return rfc6570Expansion( - name, - inData, - explode, - percentEncode, - iterator - ); - } - - public static String serializeMatrix( - @Nullable Object inData, - String name, - boolean explode - ) throws NotImplementedException { - PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator(";", ";"); - return rfc6570Expansion( - name, - inData, - explode, - true, - usedIterator - ); - } - - public static String serializeLabel( - @Nullable Object inData, - String name, - boolean explode - ) throws NotImplementedException { - PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator(".", "."); - return rfc6570Expansion( - name, - inData, - explode, - true, - usedIterator - ); - } - - public static String serializeSpaceDelimited( - @Nullable Object inData, - String name, - boolean explode - ) throws NotImplementedException { - PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator("", "%20"); - return rfc6570Expansion( - name, - inData, - explode, - true, - usedIterator - ); - } - - public static String serializePipeDelimited( - @Nullable Object inData, - String name, - boolean explode - ) throws NotImplementedException { - PrefixSeparatorIterator usedIterator = new PrefixSeparatorIterator("", "|"); - return rfc6570Expansion( - name, - inData, - explode, - true, - usedIterator - ); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java deleted file mode 100644 index 1612c9e715b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/Encoding.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.mediatype; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.parameter.ParameterStyle; -import unit_test_api.header.Header; - -import java.util.Map; - -public class Encoding { - public final String contentType; - public final @Nullable Map headers; - public final @Nullable ParameterStyle style; - public final boolean explode; - public final boolean allowReserved; - - public Encoding(String contentType) { - this.contentType = contentType; - headers = null; - style = null; - explode = false; - allowReserved = false; - } - public Encoding(String contentType, @Nullable Map headers) { - this.contentType = contentType; - this.headers = headers; - style = null; - explode = false; - allowReserved = false; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java deleted file mode 100644 index 67308d3f739..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/mediatype/MediaType.java +++ /dev/null @@ -1,16 +0,0 @@ -package unit_test_api.mediatype; - -import unit_test_api.schemas.validation.JsonSchema; - -public interface MediaType, U> { - /* - * Used to store request and response body schema information - * encoding: - * A map between a property name and its encoding information. - * The key, being the property name, MUST exist in the schema as a property. - * The encoding object SHALL only apply to requestBody objects when the media type is - * multipart or application/x-www-form-urlencoded. - */ - T schema(); - U encoding(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java deleted file mode 100644 index 047107169cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ContentParameter.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.contenttype.ContentTypeDetector; -import unit_test_api.contenttype.ContentTypeSerializer; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.mediatype.MediaType; - -import java.util.Map; -import java.util.AbstractMap; - -public class ContentParameter extends ParameterBase implements Parameter { - public final AbstractMap.SimpleEntry> content; - - public ContentParameter(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved, AbstractMap.SimpleEntry> content) { - super(name, inType, required, style, explode, allowReserved); - this.content = content; - } - - @Override - public AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException { - String contentType = content.getKey(); - if (ContentTypeDetector.contentTypeIsJson(contentType)) { - var value = ContentTypeSerializer.toJson(inData); - return new AbstractMap.SimpleEntry<>(name, value); - } else { - throw new NotImplementedException("Serialization of "+contentType+" has not yet been implemented"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java deleted file mode 100644 index 5a3b6d7ea1f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/CookieSerializer.java +++ /dev/null @@ -1,36 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.AbstractMap; -import java.util.Map; -import java.util.TreeMap; - -public abstract class CookieSerializer { - private final Map parameters; - - protected CookieSerializer(Map parameters) { - this.parameters = parameters; - } - - public String serialize(Map inData) throws NotImplementedException { - String result = ""; - Map sortedData = new TreeMap<>(inData); - for (Map.Entry entry: sortedData.entrySet()) { - String mapKey = entry.getKey(); - @Nullable Parameter parameter = parameters.get(mapKey); - if (parameter == null) { - throw new RuntimeException("Invalid state, a parameter must exist for every key"); - } - @Nullable Object value = entry.getValue(); - AbstractMap.SimpleEntry serialized = parameter.serialize(value); - if (result.isEmpty()) { - result = serialized.getValue(); - } else { - result = result + "; " + serialized.getValue(); - } - } - return result; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java deleted file mode 100644 index d0175b8dad4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/HeadersSerializer.java +++ /dev/null @@ -1,32 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.AbstractMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.List; - -public abstract class HeadersSerializer { - private final Map parameters; - - protected HeadersSerializer(Map parameters) { - this.parameters = parameters; - } - - public Map> serialize(Map inData) throws NotImplementedException { - Map> results = new LinkedHashMap<>(); - for (Map.Entry entry: inData.entrySet()) { - String mapKey = entry.getKey(); - @Nullable Parameter parameter = parameters.get(mapKey); - if (parameter == null) { - throw new RuntimeException("Invalid state, a parameter must exist for every key"); - } - @Nullable Object value = entry.getValue(); - AbstractMap.SimpleEntry serialized = parameter.serialize(value); - results.put(serialized.getKey(), List.of(serialized.getValue())); - } - return results; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java deleted file mode 100644 index da877e30054..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/Parameter.java +++ /dev/null @@ -1,10 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.AbstractMap; - -public interface Parameter { - AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java deleted file mode 100644 index 226ac1b5929..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterBase.java +++ /dev/null @@ -1,15 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.header.HeaderBase; - -public class ParameterBase extends HeaderBase { - public final String name; - public final ParameterInType inType; - - public ParameterBase(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved) { - super(required, style, explode, allowReserved); - this.name = name; - this.inType = inType; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java deleted file mode 100644 index 916d44f09db..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterInType.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.parameter; - -public enum ParameterInType { - QUERY, - HEADER, - PATH, - COOKIE -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java deleted file mode 100644 index a3ec83969c6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/ParameterStyle.java +++ /dev/null @@ -1,11 +0,0 @@ -package unit_test_api.parameter; - -public enum ParameterStyle { - MATRIX, - LABEL, - FORM, - SIMPLE, - SPACE_DELIMITED, - PIPE_DELIMITED, - DEEP_OBJECT -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java deleted file mode 100644 index b5da5d744f0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/PathSerializer.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.AbstractMap; -import java.util.Map; - -public abstract class PathSerializer { - private final Map parameters; - - protected PathSerializer(Map parameters) { - this.parameters = parameters; - } - - public String serialize(Map inData, String pathWithPlaceholders) throws NotImplementedException { - String result = pathWithPlaceholders; - for (Map.Entry entry: inData.entrySet()) { - String mapKey = entry.getKey(); - @Nullable Parameter parameter = parameters.get(mapKey); - if (parameter == null) { - throw new RuntimeException("Invalid state, a parameter must exist for every key"); - } - @Nullable Object value = entry.getValue(); - AbstractMap.SimpleEntry serialized = parameter.serialize(value); - result = result.replace("{" + mapKey + "}", serialized.getValue()); - } - return result; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java deleted file mode 100644 index 73fca259acf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/QuerySerializer.java +++ /dev/null @@ -1,48 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.AbstractMap; -import java.util.HashMap; -import java.util.Map; -import java.util.TreeMap; - -public abstract class QuerySerializer { - private final Map parameters; - - protected QuerySerializer(Map parameters) { - this.parameters = parameters; - } - - public Map getQueryMap(Map inData) throws NotImplementedException { - Map results = new HashMap<>(); - for (Map.Entry entry: inData.entrySet()) { - String mapKey = entry.getKey(); - @Nullable Parameter parameter = parameters.get(mapKey); - if (parameter == null) { - throw new RuntimeException("Invalid state, a parameter must exist for every key"); - } - @Nullable Object value = entry.getValue(); - AbstractMap.SimpleEntry serialized = parameter.serialize(value); - results.put(serialized.getKey(), serialized.getValue()); - } - return new TreeMap<>(results); - } - - public String serialize(Map queryMap) { - if (queryMap.isEmpty()) { - return ""; - } - String result = "?"; - for (String serializedValue: queryMap.values()) { - if (result.length() == 1) { - result = result + serializedValue; - } else { - result = result + "&" + serializedValue; - } - } - // TODO what if the style is not FORM? - return result; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java deleted file mode 100644 index 489c9e1c82f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/parameter/SchemaParameter.java +++ /dev/null @@ -1,60 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.header.StyleSerializer; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.validation.JsonSchema; - -import java.util.AbstractMap; - -public class SchemaParameter extends ParameterBase implements Parameter { - public final JsonSchema schema; - - public SchemaParameter(String name, ParameterInType inType, boolean required, @Nullable ParameterStyle style, @Nullable Boolean explode, @Nullable Boolean allowReserved, JsonSchema schema) { - super(name, inType, required, style, explode, allowReserved); - this.schema = schema; - } - - private ParameterStyle getStyle() { - if (style != null) { - return style; - } - if (inType == ParameterInType.QUERY || inType == ParameterInType.COOKIE) { - return ParameterStyle.FORM; - } - // ParameterInType.HEADER || ParameterInType.PATH - return ParameterStyle.SIMPLE; - } - - @Override - public AbstractMap.SimpleEntry serialize(@Nullable Object inData) throws NotImplementedException { - ParameterStyle usedStyle = getStyle(); - boolean percentEncode = inType == ParameterInType.QUERY || inType == ParameterInType.PATH; - String value; - boolean usedExplode = explode == null ? usedStyle == ParameterStyle.FORM : explode; - if (usedStyle == ParameterStyle.SIMPLE) { - // header OR path - value = StyleSerializer.serializeSimple(inData, name, usedExplode, percentEncode); - } else if (usedStyle == ParameterStyle.FORM) { - // query OR cookie - value = StyleSerializer.serializeForm(inData, name, usedExplode, percentEncode); - } else if (usedStyle == ParameterStyle.LABEL) { - // path - value = StyleSerializer.serializeLabel(inData, name, usedExplode); - } else if (usedStyle == ParameterStyle.MATRIX) { - // path - value = StyleSerializer.serializeMatrix(inData, name, usedExplode); - } else if (usedStyle == ParameterStyle.SPACE_DELIMITED) { - // query - value = StyleSerializer.serializeSpaceDelimited(inData, name, usedExplode); - } else if (usedStyle == ParameterStyle.PIPE_DELIMITED) { - // query - value = StyleSerializer.serializePipeDelimited(inData, name, usedExplode); - } else { - // usedStyle == ParameterStyle.DEEP_OBJECT - // query - throw new NotImplementedException("Style deep object serialization has not yet been implemented."); - } - return new AbstractMap.SimpleEntry<>(name, value); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java deleted file mode 100644 index 99f6e511afd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/GenericRequestBody.java +++ /dev/null @@ -1,6 +0,0 @@ -package unit_test_api.requestbody; - -public interface GenericRequestBody { - String contentType(); - SealedSchemaOutputClass body(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java deleted file mode 100644 index f08b0398b40..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/RequestBodySerializer.java +++ /dev/null @@ -1,47 +0,0 @@ -package unit_test_api.requestbody; - -import java.net.http.HttpRequest; -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.contenttype.ContentTypeDetector; -import unit_test_api.contenttype.ContentTypeSerializer; -import unit_test_api.exceptions.NotImplementedException; - -import java.util.Map; - -public abstract class RequestBodySerializer { - /* - * Describes a single request body - * content: contentType to MediaType schema info - */ - public final Map content; - public final boolean required; - - public RequestBodySerializer(Map content, boolean required) { - this.content = content; - this.required = required; - } - - private SerializedRequestBody serializeJson(String contentType, @Nullable Object body) { - String jsonText = ContentTypeSerializer.toJson(body); - return new SerializedRequestBody(contentType, HttpRequest.BodyPublishers.ofString(jsonText)); - } - - private SerializedRequestBody serializeTextPlain(String contentType, @Nullable Object body) { - if (body instanceof String stringBody) { - return new SerializedRequestBody(contentType, HttpRequest.BodyPublishers.ofString(stringBody)); - } - throw new RuntimeException("Invalid non-string data type of "+JsonSchema.getClass(body)+" for text/plain body serialization"); - } - - protected SerializedRequestBody serialize(String contentType, @Nullable Object body) throws NotImplementedException { - if (ContentTypeDetector.contentTypeIsJson(contentType)) { - return serializeJson(contentType, body); - } else if (ContentTypeDetector.contentTypeIsTextPlain(contentType)) { - return serializeTextPlain(contentType, body); - } - throw new NotImplementedException("Serialization has not yet been implemented for contentType="+contentType+". If you need it please file a PR"); - } - - public abstract SerializedRequestBody serialize(T requestBody) throws NotImplementedException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java deleted file mode 100644 index 7267f386fcb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/requestbody/SerializedRequestBody.java +++ /dev/null @@ -1,13 +0,0 @@ -package unit_test_api.requestbody; - -import java.net.http.HttpRequest; - -public class SerializedRequestBody { - public final String contentType; - public final HttpRequest.BodyPublisher bodyPublisher; - - protected SerializedRequestBody(String contentType, HttpRequest.BodyPublisher bodyPublisher) { - this.contentType = contentType; - this.bodyPublisher = bodyPublisher; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java deleted file mode 100644 index 17c3f558a7f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ApiResponse.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.response; - -import java.net.http.HttpResponse; - -public interface ApiResponse { - HttpResponse response(); - SealedBodyOutputClass body(); - HeaderOutputClass headers(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java deleted file mode 100644 index 6c97ee424a9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/DeserializedHttpResponse.java +++ /dev/null @@ -1,6 +0,0 @@ -package unit_test_api.response; - -import java.net.http.HttpResponse; - -public record DeserializedHttpResponse(SealedBodyOutputClass body, HeaderOutputClass headers) { -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java deleted file mode 100644 index 5845a5bb484..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/HeadersDeserializer.java +++ /dev/null @@ -1,37 +0,0 @@ -package unit_test_api.response; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.header.Header; -import unit_test_api.schemas.validation.MapSchemaValidator; - -import java.net.http.HttpHeaders; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public abstract class HeadersDeserializer { - private final Map headers; - final private MapSchemaValidator headersSchema; - public HeadersDeserializer(Map headers, MapSchemaValidator headersSchema) { - this.headers = headers; - this.headersSchema = headersSchema; - } - - public OutType deserialize(HttpHeaders responseHeaders, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { - Map headersToValidate = new HashMap<>(); - for (Map.Entry> entry: responseHeaders.map().entrySet()) { - String headerName = entry.getKey(); - Header headerDeserializer = headers.get(headerName); - if (headerDeserializer == null) { - // todo put this data in headersToValidate, if only one item in list load it in, otherwise join them with commas - continue; - } - @Nullable Object headerValue = headerDeserializer.deserialize(entry.getValue(), false, configuration); - headersToValidate.put(headerName, headerValue); - } - return headersSchema.validate(headersToValidate, configuration); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java deleted file mode 100644 index 18dd7237d63..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponseDeserializer.java +++ /dev/null @@ -1,74 +0,0 @@ -package unit_test_api.response; - -import java.net.http.HttpHeaders; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Map; -import java.util.Optional; - -import org.checkerframework.checker.nullness.qual.Nullable; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.contenttype.ContentTypeDetector; -import unit_test_api.contenttype.ContentTypeDeserializer; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.exceptions.ApiException; -import unit_test_api.header.Header; - -public abstract class ResponseDeserializer { - public final Map content; - public final @Nullable Map headers; - - public ResponseDeserializer(Map content) { - this.content = content; - this.headers = null; - } - - protected abstract SealedBodyClass getBody(String contentType, SealedMediaTypeClass mediaType, byte[] body, SchemaConfiguration configuration) throws ValidationException, NotImplementedException; - protected abstract HeaderClass getHeaders(HttpHeaders headers, SchemaConfiguration configuration) throws ValidationException, NotImplementedException; - - protected @Nullable Object deserializeJson(byte[] body) { - String bodyStr = new String(body, StandardCharsets.UTF_8); - return ContentTypeDeserializer.fromJson(bodyStr); - } - - protected String deserializeTextPlain(byte[] body) { - return new String(body, StandardCharsets.UTF_8); - } - - protected T deserializeBody(String contentType, byte[] body, JsonSchema schema, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { - if (ContentTypeDetector.contentTypeIsJson(contentType)) { - @Nullable Object bodyData = deserializeJson(body); - return schema.validateAndBox(bodyData, configuration); - } else if (ContentTypeDetector.contentTypeIsTextPlain(contentType)) { - String bodyData = deserializeTextPlain(body); - return schema.validateAndBox(bodyData, configuration); - } - throw new NotImplementedException("Deserialization for contentType="+contentType+" has not yet been implemented."); - } - - public DeserializedHttpResponse deserialize(HttpResponse response, SchemaConfiguration configuration) throws ValidationException, NotImplementedException, ApiException { - Optional contentTypeInfo = response.headers().firstValue("Content-Type"); - if (contentTypeInfo.isEmpty()) { - throw new ApiException( - "Invalid response returned, Content-Type header is missing and it must be included", - response - ); - } - String contentType = contentTypeInfo.get(); - @Nullable SealedMediaTypeClass mediaType = content.get(contentType); - if (mediaType == null) { - throw new ApiException( - "Invalid contentType returned. contentType="+contentType+" was returned "+ - "when only "+content.keySet()+" are defined for statusCode="+response.statusCode(), - response - ); - } - byte[] bodyBytes = response.body(); - SealedBodyClass body = getBody(contentType, mediaType, bodyBytes, configuration); - HeaderClass headers = getHeaders(response.headers(), configuration); - return new DeserializedHttpResponse<>(body, headers); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java deleted file mode 100644 index 8005bac63f1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/response/ResponsesDeserializer.java +++ /dev/null @@ -1,11 +0,0 @@ -package unit_test_api.response; - -import unit_test_api.configurations.SchemaConfiguration; -import java.net.http.HttpResponse; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.exceptions.ApiException; - -public interface ResponsesDeserializer { - SealedResponseClass deserialize(HttpResponse response, SchemaConfiguration configuration) throws ValidationException, NotImplementedException, ApiException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java deleted file mode 100644 index f38b0005fd1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/restclient/RestClient.java +++ /dev/null @@ -1,67 +0,0 @@ -package unit_test_api.restclient; - -import org.checkerframework.checker.nullness.qual.Nullable; -import java.io.IOException; -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.time.Duration; -import java.util.List; -import java.util.Map; - -public class RestClient { - public static HttpRequest getRequest( - String serviceUrl, - String method, - HttpRequest.BodyPublisher bodyPublisher, - Map> headers, - @Nullable Duration timeout - ) { - HttpRequest.Builder request = HttpRequest.newBuilder(URI.create(serviceUrl)); - switch (method) { - case "get": - request.GET(); - break; - case "put": - request.method("PUT", bodyPublisher); - break; - case "patch": - request.method("PATCH", bodyPublisher); - break; - case "post": - request.method("POST", bodyPublisher); - break; - case "delete": - request.DELETE(); - break; - case "trace": - request.method("TRACE", bodyPublisher); - break; - case "options": - request.method("OPTIONS", bodyPublisher); - break; - case "head": - request.method("HEAD", bodyPublisher); - break; - case "connect": - request.method("CONNECT", bodyPublisher); - break; - default: - throw new RuntimeException("Invalid http method"); - } - for (Map.Entry> entry: headers.entrySet()) { - String headerName = entry.getKey(); - String headerValue = String.join(", ", entry.getValue()); - request.header(headerName, headerValue); - } - if (timeout != null) { - request.timeout(timeout); - } - return request.build(); - } - - public static HttpResponse getResponse(HttpRequest request, HttpClient client) throws IOException, InterruptedException { - return client.send(request, HttpResponse.BodyHandlers.ofByteArray()); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java deleted file mode 100644 index ad972545ccb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/AnyTypeJsonSchema.java +++ /dev/null @@ -1,315 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.HashSet; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -public class AnyTypeJsonSchema { - public sealed interface AnyTypeJsonSchema1Boxed permits AnyTypeJsonSchema1BoxedVoid, AnyTypeJsonSchema1BoxedBoolean, AnyTypeJsonSchema1BoxedNumber, AnyTypeJsonSchema1BoxedString, AnyTypeJsonSchema1BoxedList, AnyTypeJsonSchema1BoxedMap { - @Nullable Object getData(); - } - public record AnyTypeJsonSchema1BoxedVoid(Void data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record AnyTypeJsonSchema1BoxedBoolean(boolean data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record AnyTypeJsonSchema1BoxedNumber(Number data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record AnyTypeJsonSchema1BoxedString(String data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record AnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record AnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements AnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class AnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, AnyTypeJsonSchema1BoxedList>, MapSchemaValidator, AnyTypeJsonSchema1BoxedMap> { - private static @Nullable AnyTypeJsonSchema1 instance = null; - - protected AnyTypeJsonSchema1() { - super(new JsonSchemaInfo()); - } - - public static AnyTypeJsonSchema1 getInstance() { - if (instance == null) { - instance = new AnyTypeJsonSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(castItem); - i += 1; - } - return new FrozenList<>(items); - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public AnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedList(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new AnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); - } - - @Override - public AnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java deleted file mode 100644 index ecd9018eddd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/BooleanJsonSchema.java +++ /dev/null @@ -1,88 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class BooleanJsonSchema { - public sealed interface BooleanJsonSchema1Boxed permits BooleanJsonSchema1BoxedBoolean { - @Nullable Object getData(); - } - public record BooleanJsonSchema1BoxedBoolean(boolean data) implements BooleanJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public static class BooleanJsonSchema1 extends JsonSchema implements BooleanSchemaValidator { - private static @Nullable BooleanJsonSchema1 instance = null; - - protected BooleanJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Boolean.class)) - ); - } - - public static BooleanJsonSchema1 getInstance() { - if (instance == null) { - instance = new BooleanJsonSchema1(); - } - return instance; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public BooleanJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new BooleanJsonSchema1BoxedBoolean(validate(arg, configuration)); - } - - @Override - public BooleanJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java deleted file mode 100644 index 4397b18149d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateJsonSchema.java +++ /dev/null @@ -1,94 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.LocalDate; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class DateJsonSchema { - public sealed interface DateJsonSchema1Boxed permits DateJsonSchema1BoxedString { - @Nullable Object getData(); - } - public record DateJsonSchema1BoxedString(String data) implements DateJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class DateJsonSchema1 extends JsonSchema implements StringSchemaValidator { - private static @Nullable DateJsonSchema1 instance = null; - - protected DateJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - .format("date") - ); - } - - public static DateJsonSchema1 getInstance() { - if (instance == null) { - instance = new DateJsonSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof LocalDate) { - return validate((LocalDate) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public DateJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DateJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public DateJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java deleted file mode 100644 index c05063ca8b5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DateTimeJsonSchema.java +++ /dev/null @@ -1,94 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.ZonedDateTime; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class DateTimeJsonSchema { - public sealed interface DateTimeJsonSchema1Boxed permits DateTimeJsonSchema1BoxedString { - @Nullable Object getData(); - } - public record DateTimeJsonSchema1BoxedString(String data) implements DateTimeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class DateTimeJsonSchema1 extends JsonSchema implements StringSchemaValidator { - private static @Nullable DateTimeJsonSchema1 instance = null; - - protected DateTimeJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - .format("date-time") - ); - } - - public static DateTimeJsonSchema1 getInstance() { - if (instance == null) { - instance = new DateTimeJsonSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof ZonedDateTime) { - return validate((ZonedDateTime) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public DateTimeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DateTimeJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public DateTimeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java deleted file mode 100644 index 47ac9fe2f91..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DecimalJsonSchema.java +++ /dev/null @@ -1,87 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class DecimalJsonSchema { - public sealed interface DecimalJsonSchema1Boxed permits DecimalJsonSchema1BoxedString { - @Nullable Object getData(); - } - public record DecimalJsonSchema1BoxedString(String data) implements DecimalJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class DecimalJsonSchema1 extends JsonSchema implements StringSchemaValidator { - private static @Nullable DecimalJsonSchema1 instance = null; - - protected DecimalJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - .format("number") - ); - } - - public static DecimalJsonSchema1 getInstance() { - if (instance == null) { - instance = new DecimalJsonSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public DecimalJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new DecimalJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public DecimalJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java deleted file mode 100644 index e522e04b3d2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/DoubleJsonSchema.java +++ /dev/null @@ -1,91 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class DoubleJsonSchema { - public sealed interface DoubleJsonSchema1Boxed permits DoubleJsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record DoubleJsonSchema1BoxedNumber(Number data) implements DoubleJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class DoubleJsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable DoubleJsonSchema1 instance = null; - - protected DoubleJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Double.class)) - .format("double") - ); - } - - public static DoubleJsonSchema1 getInstance() { - if (instance == null) { - instance = new DoubleJsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public DoubleJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new DoubleJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public DoubleJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java deleted file mode 100644 index 60136d1b935..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/FloatJsonSchema.java +++ /dev/null @@ -1,91 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class FloatJsonSchema { - public sealed interface FloatJsonSchema1Boxed permits FloatJsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record FloatJsonSchema1BoxedNumber(Number data) implements FloatJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class FloatJsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable FloatJsonSchema1 instance = null; - - protected FloatJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Float.class)) - .format("float") - ); - } - - public static FloatJsonSchema1 getInstance() { - if (instance == null) { - instance = new FloatJsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public FloatJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new FloatJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public FloatJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java deleted file mode 100644 index 2d5d00ea4ff..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/GenericBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.schemas; - -/** - * Builders must implement this class - * @param the type that the builder returns - */ -public interface GenericBuilder { - T build(); -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java deleted file mode 100644 index f6f626576e4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int32JsonSchema.java +++ /dev/null @@ -1,98 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class Int32JsonSchema { - public sealed interface Int32JsonSchema1Boxed permits Int32JsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record Int32JsonSchema1BoxedNumber(Number data) implements Int32JsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class Int32JsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Int32JsonSchema1 instance = null; - - protected Int32JsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Float.class - )) - .format("int32") - ); - } - - public static Int32JsonSchema1 getInstance() { - if (instance == null) { - instance = new Int32JsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public Int32JsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Int32JsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public Int32JsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java deleted file mode 100644 index 8b60634feb7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/Int64JsonSchema.java +++ /dev/null @@ -1,108 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class Int64JsonSchema { - public sealed interface Int64JsonSchema1Boxed permits Int64JsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record Int64JsonSchema1BoxedNumber(Number data) implements Int64JsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class Int64JsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable Int64JsonSchema1 instance = null; - - protected Int64JsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .format("int64") - ); - } - - public static Int64JsonSchema1 getInstance() { - if (instance == null) { - instance = new Int64JsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public Int64JsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Int64JsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public Int64JsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java deleted file mode 100644 index a6bb8e6d459..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/IntJsonSchema.java +++ /dev/null @@ -1,108 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class IntJsonSchema { - public sealed interface IntJsonSchema1Boxed permits IntJsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record IntJsonSchema1BoxedNumber(Number data) implements IntJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class IntJsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable IntJsonSchema1 instance = null; - - protected IntJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - .format("int") - ); - } - - public static IntJsonSchema1 getInstance() { - if (instance == null) { - instance = new IntJsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public IntJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new IntJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public IntJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java deleted file mode 100644 index a007ccf312b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/ListJsonSchema.java +++ /dev/null @@ -1,108 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class ListJsonSchema { - public sealed interface ListJsonSchema1Boxed permits ListJsonSchema1BoxedList { - @Nullable Object getData(); - } - public record ListJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements ListJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class ListJsonSchema1 extends JsonSchema implements ListSchemaValidator, ListJsonSchema1BoxedList> { - private static @Nullable ListJsonSchema1 instance = null; - - protected ListJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - ); - } - - public static ListJsonSchema1 getInstance() { - if (instance == null) { - instance = new ListJsonSchema1(); - } - return instance; - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(castItem); - i += 1; - } - return new FrozenList<>(items); - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public ListJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ListJsonSchema1BoxedList(validate(arg, configuration)); - } - - @Override - public ListJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java deleted file mode 100644 index 4e612fbdc1c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/MapJsonSchema.java +++ /dev/null @@ -1,112 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -public class MapJsonSchema { - public sealed interface MapJsonSchema1Boxed permits MapJsonSchema1BoxedMap { - @Nullable Object getData(); - } - public record MapJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements MapJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class MapJsonSchema1 extends JsonSchema implements MapSchemaValidator, MapJsonSchema1BoxedMap> { - private static @Nullable MapJsonSchema1 instance = null; - - protected MapJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - ); - } - - public static MapJsonSchema1 getInstance() { - if (instance == null) { - instance = new MapJsonSchema1(); - } - return instance; - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof FrozenMap) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public MapJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new MapJsonSchema1BoxedMap(validate(arg, configuration)); - } - - @Override - public MapJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java deleted file mode 100644 index 8f63d19647c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NotAnyTypeJsonSchema.java +++ /dev/null @@ -1,317 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.BooleanSchemaValidator; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.HashSet; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -public class NotAnyTypeJsonSchema { - public sealed interface NotAnyTypeJsonSchema1Boxed permits NotAnyTypeJsonSchema1BoxedVoid, NotAnyTypeJsonSchema1BoxedBoolean, NotAnyTypeJsonSchema1BoxedNumber, NotAnyTypeJsonSchema1BoxedString, NotAnyTypeJsonSchema1BoxedList, NotAnyTypeJsonSchema1BoxedMap { - @Nullable Object getData(); - } - public record NotAnyTypeJsonSchema1BoxedVoid(Void data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record NotAnyTypeJsonSchema1BoxedBoolean(boolean data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record NotAnyTypeJsonSchema1BoxedNumber(Number data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record NotAnyTypeJsonSchema1BoxedString(String data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record NotAnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record NotAnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements NotAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class NotAnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, NotAnyTypeJsonSchema1BoxedList>, MapSchemaValidator, NotAnyTypeJsonSchema1BoxedMap> { - private static @Nullable NotAnyTypeJsonSchema1 instance = null; - - protected NotAnyTypeJsonSchema1() { - super(new JsonSchemaInfo() - .not(AnyTypeJsonSchema.AnyTypeJsonSchema1.class) - ); - } - - public static NotAnyTypeJsonSchema1 getInstance() { - if (instance == null) { - instance = new NotAnyTypeJsonSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(castItem); - i += 1; - } - return new FrozenList<>(items); - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public NotAnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedList(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new NotAnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); - } - - @Override - public NotAnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java deleted file mode 100644 index 77356148067..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NullJsonSchema.java +++ /dev/null @@ -1,87 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NullSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class NullJsonSchema { - public sealed interface NullJsonSchema1Boxed permits NullJsonSchema1BoxedVoid { - @Nullable Object getData(); - } - public record NullJsonSchema1BoxedVoid(Void data) implements NullJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class NullJsonSchema1 extends JsonSchema implements NullSchemaValidator { - private static @Nullable NullJsonSchema1 instance = null; - - protected NullJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(Void.class)) - ); - } - - public static NullJsonSchema1 getInstance() { - if (instance == null) { - instance = new NullJsonSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public NullJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new NullJsonSchema1BoxedVoid(validate(arg, configuration)); - } - - @Override - public NullJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java deleted file mode 100644 index 986b0728bd1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/NumberJsonSchema.java +++ /dev/null @@ -1,107 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.NumberSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class NumberJsonSchema { - public sealed interface NumberJsonSchema1Boxed permits NumberJsonSchema1BoxedNumber { - @Nullable Object getData(); - } - public record NumberJsonSchema1BoxedNumber(Number data) implements NumberJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class NumberJsonSchema1 extends JsonSchema implements NumberSchemaValidator { - private static @Nullable NumberJsonSchema1 instance = null; - - protected NumberJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of( - Integer.class, - Long.class, - Float.class, - Double.class - )) - ); - } - - public static NumberJsonSchema1 getInstance() { - if (instance == null) { - instance = new NumberJsonSchema1(); - } - return instance; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number) { - return validate((Number) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public NumberJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new NumberJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public NumberJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java deleted file mode 100644 index 7e23452373e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/SetMaker.java +++ /dev/null @@ -1,20 +0,0 @@ -package unit_test_api.schemas; - -import java.util.HashSet; -import java.util.Set; - -/** - * A builder for maps that allows in null values - * Schema tests + doc code samples need it - */ -public class SetMaker { - @SafeVarargs - @SuppressWarnings("varargs") - public static Set makeSet(E... items) { - Set set = new HashSet<>(); - for (E item : items) { - set.add(item); - } - return set; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java deleted file mode 100644 index 3ef3f124d79..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/StringJsonSchema.java +++ /dev/null @@ -1,106 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; - -public class StringJsonSchema { - public sealed interface StringJsonSchema1Boxed permits StringJsonSchema1BoxedString { - @Nullable Object getData(); - } - public record StringJsonSchema1BoxedString(String data) implements StringJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public static class StringJsonSchema1 extends JsonSchema implements StringSchemaValidator { - private static @Nullable StringJsonSchema1 instance = null; - - protected StringJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - ); - } - - public static StringJsonSchema1 getInstance() { - if (instance == null) { - instance = new StringJsonSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof UUID) { - return validate((UUID) arg, configuration); - } else if (arg instanceof LocalDate) { - return validate((LocalDate) arg, configuration); - } else if (arg instanceof ZonedDateTime) { - return validate((ZonedDateTime) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public StringJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new StringJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public StringJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java deleted file mode 100644 index 8fa96b07e3e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UnsetAddPropsSetter.java +++ /dev/null @@ -1,77 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; -import unit_test_api.schemas.validation.MapUtils; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -public abstract class UnsetAddPropsSetter { - public abstract Map getInstance(); - public abstract Set getKnownKeys(); - public abstract T getBuilderAfterAdditionalProperty(Map instance); - public T additionalProperty(String key, Void value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, boolean value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, String value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, int value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, float value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, long value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, double value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, List value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } - - public T additionalProperty(String key, Map value) throws InvalidAdditionalPropertyException { - MapUtils.throwIfKeyKnown(key, getKnownKeys(), true); - var instance = getInstance(); - instance.put(key, value); - return getBuilderAfterAdditionalProperty(instance); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java deleted file mode 100644 index 13449990291..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/UuidJsonSchema.java +++ /dev/null @@ -1,94 +0,0 @@ -package unit_test_api.schemas; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.StringSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; - -public class UuidJsonSchema { - public sealed interface UuidJsonSchema1Boxed permits UuidJsonSchema1BoxedString { - @Nullable Object getData(); - } - public record UuidJsonSchema1BoxedString(String data) implements UuidJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public static class UuidJsonSchema1 extends JsonSchema implements StringSchemaValidator { - private static @Nullable UuidJsonSchema1 instance = null; - - protected UuidJsonSchema1() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - .format("uuid") - ); - } - - public static UuidJsonSchema1 getInstance() { - if (instance == null) { - instance = new UuidJsonSchema1(); - } - return instance; - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof UUID) { - return validate((UUID) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public UuidJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UuidJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public UuidJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java deleted file mode 100644 index f3501b009fa..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AdditionalPropertiesValidator.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class AdditionalPropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - var additionalProperties = data.schema().additionalProperties; - if (additionalProperties == null) { - return null; - } - Set presentAdditionalProperties = new LinkedHashSet<>(); - for (Object key: mapArg.keySet()) { - if (key instanceof String) { - presentAdditionalProperties.add((String) key); - } - } - var properties = data.schema().properties; - if (properties != null) { - presentAdditionalProperties.removeAll(properties.keySet()); - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - for(String addPropName: presentAdditionalProperties) { - @Nullable Object propValue = mapArg.get(addPropName); - List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - propPathToItem.add(addPropName); - if (data.patternPropertiesPathToSchemas() != null && data.patternPropertiesPathToSchemas().containsKey(propPathToItem)) { - continue; - } - ValidationMetadata propValidationMetadata = new ValidationMetadata( - propPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - JsonSchema addPropsSchema = JsonSchemaFactory.getInstance(additionalProperties); - if (propValidationMetadata.validationRanEarlier(addPropsSchema)) { - // todo add_deeper_validated_schemas - continue; - } - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(addPropsSchema, propValue, propValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java deleted file mode 100644 index a4d89238336..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AllOfValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -public class AllOfValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var allOf = data.schema().allOf; - if (allOf == null) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - for(Class> allOfClass: allOf) { - JsonSchema allOfSchema = JsonSchemaFactory.getInstance(allOfClass); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(allOfSchema, data.arg(), data.validationMetadata()); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java deleted file mode 100644 index db8468d0285..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/AnyOfValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.ArrayList; -import java.util.List; - -public class AnyOfValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var anyOf = data.schema().anyOf; - if (anyOf == null) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - List>> validatedAnyOfClasses = new ArrayList<>(); - for(Class> anyOfClass: anyOf) { - if (anyOfClass == data.schema().getClass()) { - /* - optimistically assume that schema will pass validation - do not invoke _validate on it because that is recursive - */ - validatedAnyOfClasses.add(anyOfClass); - continue; - } - try { - JsonSchema anyOfSchema = JsonSchemaFactory.getInstance(anyOfClass); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(anyOfSchema, data.arg(), data.validationMetadata()); - validatedAnyOfClasses.add(anyOfClass); - pathToSchemas.update(otherPathToSchemas); - } catch (ValidationException e) { - // silence exceptions because the code needs to accumulate anyof_classes - } - } - if (validatedAnyOfClasses.isEmpty()) { - throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". None "+ - "of the anyOf schemas matched the input data." - ); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java deleted file mode 100644 index 53861826344..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BigDecimalValidator.java +++ /dev/null @@ -1,21 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; - -import java.math.BigDecimal; - -public abstract class BigDecimalValidator { - protected BigDecimal getBigDecimal(Number arg) throws ValidationException { - if (arg instanceof Integer) { - return new BigDecimal((Integer) arg); - } else if (arg instanceof Long) { - return new BigDecimal((Long) arg); - } else if (arg instanceof Float) { - return new BigDecimal(Float.toString((Float) arg)); - } else if (arg instanceof Double) { - return new BigDecimal(Double.toString((Double) arg)); - } else { - throw new ValidationException("Invalid type input for arg"); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java deleted file mode 100644 index a501b4c449a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface BooleanEnumValidator { - boolean validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java deleted file mode 100644 index 0f72d39fd22..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanSchemaValidator.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface BooleanSchemaValidator { - boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException; - T validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java deleted file mode 100644 index 7114b5ac414..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/BooleanValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface BooleanValueMethod { - boolean value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java deleted file mode 100644 index 278146bf082..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ConstValidator.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.math.BigDecimal; -import java.util.Objects; - -public class ConstValidator extends BigDecimalValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - if (!data.schema().constValueSet) { - return null; - } - var constValue = data.schema().constValue; - if (data.arg() instanceof Number numberArg) { - BigDecimal castArg = getBigDecimal(numberArg); - if (Objects.equals(castArg, constValue)) { - return null; - } - if (constValue instanceof BigDecimal && ((BigDecimal) constValue).compareTo(castArg) == 0) { - return null; - } - } else { - if (Objects.equals(data.arg(), constValue)) { - return null; - } - } - throw new ValidationException("Invalid value "+data.arg()+" was not equal to const "+constValue); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java deleted file mode 100644 index 7e1998b6cbc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ContainsValidator.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; - -public class ContainsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - if (!(data.arg() instanceof List)) { - return null; - } - var containsPathToSchemas = data.containsPathToSchemas(); - if (containsPathToSchemas == null || containsPathToSchemas.isEmpty()) { - throw new ValidationException( - "Validation failed for contains keyword in class="+data.schema().getClass() - + " at pathToItem="+data.validationMetadata().pathToItem()+". No " - + "items validated to the contains schema." - ); - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - for (PathToSchemasMap otherPathToSchema: containsPathToSchemas) { - pathToSchemas.update(otherPathToSchema); - } - return pathToSchemas; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java deleted file mode 100644 index b07e77d9c0d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/CustomIsoparser.java +++ /dev/null @@ -1,16 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.time.ZonedDateTime; -import java.time.LocalDate; - -public final class CustomIsoparser { - - public ZonedDateTime parseIsodatetime(String dateTime) { - return ZonedDateTime.parse(dateTime); - } - - public LocalDate parseIsodate(String date) { - return LocalDate.parse(date); - } - -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java deleted file mode 100644 index 4bca04ede2b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DefaultValueMethod.java +++ /dev/null @@ -1,7 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; - -public interface DefaultValueMethod { - T defaultValue() throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java deleted file mode 100644 index 9f5445a7477..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentRequiredValidator.java +++ /dev/null @@ -1,42 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -public class DependentRequiredValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - var dependentRequired = data.schema().dependentRequired; - if (dependentRequired == null) { - return null; - } - for (Map.Entry> entry: dependentRequired.entrySet()) { - if (!mapArg.containsKey(entry.getKey())) { - continue; - } - Set missingKeys = new HashSet<>(entry.getValue()); - for (Object objKey: mapArg.keySet()) { - if (objKey instanceof String key) { - missingKeys.remove(key); - } - } - if (missingKeys.isEmpty()) { - continue; - } - throw new ValidationException( - "Validation failed for dependentRequired because these_keys="+missingKeys+" are "+ - "missing at pathToItem="+data.validationMetadata().pathToItem()+" in class "+data.schema().getClass() - ); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java deleted file mode 100644 index c9ec014a3fa..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DependentSchemasValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Set; - -public class DependentSchemasValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - var dependentSchemas = data.schema().dependentSchemas; - if (dependentSchemas == null) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - Set presentProperties = new LinkedHashSet<>(); - for (Object key: mapArg.keySet()) { - if (key instanceof String) { - presentProperties.add((String) key); - } - } - for(Map.Entry>> entry: dependentSchemas.entrySet()) { - String propName = entry.getKey(); - if (!presentProperties.contains(propName)) { - continue; - } - Class> dependentSchemaClass = entry.getValue(); - JsonSchema dependentSchema = JsonSchemaFactory.getInstance(dependentSchemaClass); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(dependentSchema, mapArg, data.validationMetadata()); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java deleted file mode 100644 index 24c76250695..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface DoubleEnumValidator { - double validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java deleted file mode 100644 index 46ecd29c8e5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/DoubleValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface DoubleValueMethod { - double value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java deleted file mode 100644 index 1495aa01148..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ElseValidator.java +++ /dev/null @@ -1,31 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -public class ElseValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var elseSchema = data.schema().elseSchema; - if (elseSchema == null) { - return null; - } - var ifPathToSchemas = data.ifPathToSchemas(); - if (ifPathToSchemas == null) { - // if unset - return null; - } - if (!ifPathToSchemas.isEmpty()) { - // if validation is true - return null; - } - JsonSchema elseSchemaInstance = JsonSchemaFactory.getInstance(elseSchema); - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - var elsePathToSchemas = JsonSchema.validate(elseSchemaInstance, data.arg(), data.validationMetadata()); - // todo capture validation error and describe it as an else error? - pathToSchemas.update(elsePathToSchemas); - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java deleted file mode 100644 index ee217ce84e4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/EnumValidator.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.math.BigDecimal; -import java.util.Set; - -public class EnumValidator extends BigDecimalValidator implements KeywordValidator { - @SuppressWarnings("nullness") - private static boolean enumContainsArg(Set<@Nullable Object> enumValues, @Nullable Object arg){ - return enumValues.contains(arg); - } - - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var enumValues = data.schema().enumValues; - if (enumValues == null) { - return null; - } - if (enumValues.isEmpty()) { - throw new ValidationException("No value can match enum because enum is empty"); - } - if (data.arg() instanceof Number numberArg) { - BigDecimal castArg = getBigDecimal(numberArg); - if (enumContainsArg(enumValues, castArg)) { - return null; - } - for (Object enumValue: enumValues) { - if (enumValue instanceof BigDecimal && ((BigDecimal) enumValue).compareTo(castArg) == 0) { - return null; - } - } - } else { - if (enumContainsArg(enumValues, data.arg())) { - return null; - } - } - throw new ValidationException("Invalid value "+data.arg()+" was not one of the allowed enum "+enumValues); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java deleted file mode 100644 index b2d9e6dd199..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMaximumValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class ExclusiveMaximumValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var exclusiveMaximum = data.schema().exclusiveMaximum; - if (exclusiveMaximum == null) { - return null; - } - if (!(data.arg() instanceof Number)) { - return null; - } - String msg = "Value " + data.arg() + " is invalid because it is >= the exclusiveMaximum of " + exclusiveMaximum; - if (data.arg() instanceof Integer intArg) { - if (intArg.compareTo(exclusiveMaximum.intValue()) > -1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Long longArg) { - if (longArg.compareTo(exclusiveMaximum.longValue()) > -1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Float floatArg) { - if (floatArg.compareTo(exclusiveMaximum.floatValue()) > -1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Double doubleArg) { - if (doubleArg.compareTo(exclusiveMaximum.doubleValue()) > -1) { - throw new ValidationException(msg); - } - return null; - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java deleted file mode 100644 index ab748083287..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ExclusiveMinimumValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class ExclusiveMinimumValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var exclusiveMinimum = data.schema().exclusiveMinimum; - if (exclusiveMinimum == null) { - return null; - } - if (!(data.arg() instanceof Number)) { - return null; - } - String msg = "Value " + data.arg() + " is invalid because it is <= the exclusiveMinimum of " + exclusiveMinimum; - if (data.arg() instanceof Integer intArg) { - if (intArg.compareTo(exclusiveMinimum.intValue()) < 1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Long longArg) { - if (longArg.compareTo(exclusiveMinimum.longValue()) < 1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Float floatArg) { - if (floatArg.compareTo(exclusiveMinimum.floatValue()) < 1) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Double doubleArg) { - if (doubleArg.compareTo(exclusiveMinimum.doubleValue()) < 1) { - throw new ValidationException(msg); - } - return null; - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java deleted file mode 100644 index 884cf28bdf6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface FloatEnumValidator { - float validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java deleted file mode 100644 index 708174f43d6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FloatValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface FloatValueMethod { - float value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java deleted file mode 100644 index 39cb93c71b6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FormatValidator.java +++ /dev/null @@ -1,158 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.format.DateTimeParseException; -import java.util.UUID; - -public class FormatValidator implements KeywordValidator { - private final static BigInteger int32InclusiveMinimum = BigInteger.valueOf(-2147483648L); - private final static BigInteger int32InclusiveMaximum = BigInteger.valueOf(2147483647L); - private final static BigInteger int64InclusiveMinimum = BigInteger.valueOf(-9223372036854775808L); - private final static BigInteger int64InclusiveMaximum = BigInteger.valueOf(9223372036854775807L); - private final static BigDecimal floatInclusiveMinimum = BigDecimal.valueOf(-3.4028234663852886e+38); - private final static BigDecimal floatInclusiveMaximum = BigDecimal.valueOf(3.4028234663852886e+38); - private final static BigDecimal doubleInclusiveMinimum = BigDecimal.valueOf(-1.7976931348623157E+308d); - private final static BigDecimal doubleInclusiveMaximum = BigDecimal.valueOf(1.7976931348623157E+308d); - - private static void validateNumericFormat(Number arg, ValidationMetadata validationMetadata, String format) throws ValidationException { - if (format.startsWith("int")) { - // there is a json schema test where 1.0 validates as an integer - BigInteger intArg; - if (arg instanceof Float || arg instanceof Double) { - double doubleArg; - if (arg instanceof Float) { - doubleArg = arg.doubleValue(); - } else { - doubleArg = (Double) arg; - } - if (Math.floor(doubleArg) != doubleArg) { - throw new ValidationException( - "Invalid non-integer value " + arg + " for format " + format + " at " + validationMetadata.pathToItem() - ); - } - if (arg instanceof Float) { - Integer smallInt = Math.round((Float) arg); - intArg = BigInteger.valueOf(smallInt.longValue()); - } else { - intArg = BigInteger.valueOf(Math.round((Double) arg)); - } - } else if (arg instanceof Integer) { - intArg = BigInteger.valueOf(arg.longValue()); - } else if (arg instanceof Long) { - intArg = BigInteger.valueOf((Long) arg); - } else { - intArg = (BigInteger) arg; - } - if (format.equals("int32")) { - if (intArg.compareTo(int32InclusiveMinimum) < 0 || intArg.compareTo(int32InclusiveMaximum) > 0) { - throw new ValidationException( - "Invalid value " + arg + " for format int32 at " + validationMetadata.pathToItem() - ); - } - } else if (format.equals("int64")) { - if (intArg.compareTo(int64InclusiveMinimum) < 0 || intArg.compareTo(int64InclusiveMaximum) > 0) { - throw new ValidationException( - "Invalid value " + arg + " for format int64 at " + validationMetadata.pathToItem() - ); - } - } - } else if (format.equals("float") || format.equals("double")) { - BigDecimal decimalArg; - if (arg instanceof Float) { - decimalArg = BigDecimal.valueOf(arg.doubleValue()); - } else if (arg instanceof Double) { - decimalArg = BigDecimal.valueOf((Double) arg); - } else { - decimalArg = (BigDecimal) arg; - } - if (format.equals("float")) { - if (decimalArg.compareTo(floatInclusiveMinimum) < 0 || decimalArg.compareTo(floatInclusiveMaximum) > 0 ){ - throw new ValidationException( - "Invalid value "+arg+" for format float at "+validationMetadata.pathToItem() - ); - } - } else { - if (decimalArg.compareTo(doubleInclusiveMinimum) < 0 || decimalArg.compareTo(doubleInclusiveMaximum) > 0 ){ - throw new ValidationException( - "Invalid value "+arg+" for format double at "+validationMetadata.pathToItem() - ); - } - } - } - } - - private static void validateStringFormat(String arg, ValidationMetadata validationMetadata, String format) throws ValidationException { - switch (format) { - case "uuid" -> { - try { - UUID.fromString(arg); - } catch (IllegalArgumentException e) { - throw new ValidationException( - "Value cannot be converted to a UUID. Invalid value " + - arg + " for format uuid at " + validationMetadata.pathToItem() - ); - } - } - case "number" -> { - try { - new BigDecimal(arg); - } catch (NumberFormatException e) { - throw new ValidationException( - "Value cannot be converted to a decimal. Invalid value " + - arg + " for format number at " + validationMetadata.pathToItem() - ); - } - } - case "date" -> { - try { - new CustomIsoparser().parseIsodate(arg); - } catch (DateTimeParseException e) { - throw new ValidationException( - "Value does not conform to the required ISO-8601 date format. " + - "Invalid value " + arg + " for format date at " + validationMetadata.pathToItem() - ); - } - } - case "date-time" -> { - try { - new CustomIsoparser().parseIsodatetime(arg); - } catch (DateTimeParseException e) { - throw new ValidationException( - "Value does not conform to the required ISO-8601 datetime format. " + - "Invalid value " + arg + " for format datetime at " + validationMetadata.pathToItem() - ); - } - } - } - } - - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var format = data.schema().format; - if (format == null) { - return null; - } - if (data.arg() instanceof Number numberArg) { - validateNumericFormat( - numberArg, - data.validationMetadata(), - format - ); - return null; - } else if (data.arg() instanceof String stringArg) { - validateStringFormat( - stringArg, - data.validationMetadata(), - format - ); - return null; - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java deleted file mode 100644 index 422604d619c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenList.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -public class FrozenList extends AbstractList { - /* - A frozen List - Once schema validation has been run, indexed access returns values of the correct type - If values were mutable, the types in those methods would not agree with returned values - */ - private final List list; - public FrozenList(Collection m) { - super(); - list = new ArrayList<>(m); - } - - @Override - public E get(int index) { - return list.get(index); - } - - @Override - public int size() { - return list.size(); - } -} - diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java deleted file mode 100644 index 9f8ccc04cba..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/FrozenMap.java +++ /dev/null @@ -1,54 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.KeyFor; -import unit_test_api.exceptions.UnsetPropertyException; -import unit_test_api.exceptions.InvalidAdditionalPropertyException; - -import java.util.AbstractMap; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -public class FrozenMap extends AbstractMap { - /* - A frozen Map - Once schema validation has been run, written accessor methods return values of the correct type - If values were mutable, the types in those methods would not agree with returned values - */ - private final Map map; - public FrozenMap(Map m) { - - super(); - map = new HashMap<>(m); - } - - protected V getOrThrow(String key) throws UnsetPropertyException { - if (containsKey(key)) { - return get(key); - } - throw new UnsetPropertyException(key+" is unset"); - } - - protected void throwIfKeyNotPresent(String key) throws UnsetPropertyException { - if (!containsKey(key)) { - throw new UnsetPropertyException(key+" is unset"); - } - } - - protected void throwIfKeyKnown(String key, Set requiredKeys, Set optionalKeys) throws InvalidAdditionalPropertyException { - Set knownKeys = new HashSet<>(); - knownKeys.addAll(requiredKeys); - knownKeys.addAll(optionalKeys); - MapUtils.throwIfKeyKnown(key, knownKeys, false); - } - - @Override - public Set> entrySet() { - return map.entrySet().stream() - .map(x -> new AbstractMap.SimpleEntry<>(x.getKey(), x.getValue())) - .collect(Collectors.toSet()); - } -} - diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java deleted file mode 100644 index 7ee93a255ee..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IfValidator.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class IfValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var ifSchema = data.schema().ifSchema; - if (ifSchema == null) { - return null; - } - if (data.ifPathToSchemas() == null) { - throw new ValidationException("Invalid type for ifPathToSchemas"); - } - /* - if is false use case - ifPathToSchemas == {} - no need to add any data to pathToSchemas - - if true, then true -> true for whole schema - so validate_then will add ifPathToSchemas data to pathToSchemas - */ - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java deleted file mode 100644 index 7fcd2e9f7d6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface IntegerEnumValidator { - int validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java deleted file mode 100644 index 361a9f71e04..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/IntegerValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface IntegerValueMethod { - int value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java deleted file mode 100644 index 7e640617921..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ItemsValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.List; - -public class ItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var items = data.schema().items; - if (items == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (listArg.isEmpty()) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - int minIndex = data.schema().prefixItems != null ? data.schema().prefixItems.size() : 0; - JsonSchema itemsSchema = JsonSchemaFactory.getInstance(items); - for(int i = minIndex; i < listArg.size(); i++) { - List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - itemPathToItem.add(i); - ValidationMetadata itemValidationMetadata = new ValidationMetadata( - itemPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - if (itemValidationMetadata.validationRanEarlier(itemsSchema)) { - // todo add_deeper_validated_schemas - continue; - } - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(itemsSchema, listArg.get(i), itemValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java deleted file mode 100644 index 70859e0e61c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchema.java +++ /dev/null @@ -1,499 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.regex.Pattern; - -public abstract class JsonSchema { - public final @Nullable Set> type; - public final @Nullable String format; - public final @Nullable Class> items; - public final @Nullable Map>> properties; - public final @Nullable Set required; - public final @Nullable Number exclusiveMaximum; - public final @Nullable Number exclusiveMinimum; - public final @Nullable Integer maxItems; - public final @Nullable Integer minItems; - public final @Nullable Integer maxLength; - public final @Nullable Integer minLength; - public final @Nullable Integer maxProperties; - public final @Nullable Integer minProperties; - public final @Nullable Number maximum; - public final @Nullable Number minimum; - public final @Nullable BigDecimal multipleOf; - public final @Nullable Class> additionalProperties; - public final @Nullable List>> allOf; - public final @Nullable List>> anyOf; - public final @Nullable List>> oneOf; - public final @Nullable Class> not; - public final @Nullable Boolean uniqueItems; - public final @Nullable Set<@Nullable Object> enumValues; - public final @Nullable Pattern pattern; - public final @Nullable Object defaultValue; - public final boolean defaultValueSet; - public final @Nullable Object constValue; - public final boolean constValueSet; - public final @Nullable Class> contains; - public final @Nullable Integer maxContains; - public final @Nullable Integer minContains; - public final @Nullable Class> propertyNames; - public final @Nullable Map> dependentRequired; - public final @Nullable Map>> dependentSchemas; - public final @Nullable Map>> patternProperties; - public final @Nullable List>> prefixItems; - public final @Nullable Class> ifSchema; - public final @Nullable Class> then; - public final @Nullable Class> elseSchema; - public final @Nullable Class> unevaluatedItems; - public final @Nullable Class> unevaluatedProperties; - private final LinkedHashMap keywordToValidator; - - protected JsonSchema(JsonSchemaInfo jsonSchemaInfo) { - LinkedHashMap keywordToValidator = new LinkedHashMap<>(); - this.type = jsonSchemaInfo.type; - if (this.type != null) { - keywordToValidator.put("type", new TypeValidator()); - } - this.format = jsonSchemaInfo.format; - if (this.format != null) { - keywordToValidator.put("format", new FormatValidator()); - } - this.items = jsonSchemaInfo.items; - if (this.items != null) { - keywordToValidator.put("items", new ItemsValidator()); - } - this.properties = jsonSchemaInfo.properties; - if (this.properties != null) { - keywordToValidator.put("properties", new PropertiesValidator()); - } - this.required = jsonSchemaInfo.required; - if (this.required != null) { - keywordToValidator.put("required", new RequiredValidator()); - } - this.exclusiveMaximum = jsonSchemaInfo.exclusiveMaximum; - if (this.exclusiveMaximum != null) { - keywordToValidator.put("exclusiveMaximum", new ExclusiveMaximumValidator()); - } - this.exclusiveMinimum = jsonSchemaInfo.exclusiveMinimum; - if (this.exclusiveMinimum != null) { - keywordToValidator.put("exclusiveMinimum", new ExclusiveMinimumValidator()); - } - this.maxItems = jsonSchemaInfo.maxItems; - if (this.maxItems != null) { - keywordToValidator.put("maxItems", new MaxItemsValidator()); - } - this.minItems = jsonSchemaInfo.minItems; - if (this.minItems != null) { - keywordToValidator.put("minItems", new MinItemsValidator()); - } - this.maxLength = jsonSchemaInfo.maxLength; - if (this.maxLength != null) { - keywordToValidator.put("maxLength", new MaxLengthValidator()); - } - this.minLength = jsonSchemaInfo.minLength; - if (this.minLength != null) { - keywordToValidator.put("minLength", new MinLengthValidator()); - } - this.maxProperties = jsonSchemaInfo.maxProperties; - if (this.maxProperties != null) { - keywordToValidator.put("maxProperties", new MaxPropertiesValidator()); - } - this.minProperties = jsonSchemaInfo.minProperties; - if (this.minProperties != null) { - keywordToValidator.put("minProperties", new MinPropertiesValidator()); - } - this.maximum = jsonSchemaInfo.maximum; - if (this.maximum != null) { - keywordToValidator.put("maximum", new MaximumValidator()); - } - this.minimum = jsonSchemaInfo.minimum; - if (this.minimum != null) { - keywordToValidator.put("minimum", new MinimumValidator()); - } - this.multipleOf = jsonSchemaInfo.multipleOf; - if (this.multipleOf != null) { - keywordToValidator.put("multipleOf", new MultipleOfValidator()); - } - this.additionalProperties = jsonSchemaInfo.additionalProperties; - if (this.additionalProperties != null) { - keywordToValidator.put("additionalProperties", new AdditionalPropertiesValidator()); - } - this.allOf = jsonSchemaInfo.allOf; - if (this.allOf != null) { - keywordToValidator.put("allOf", new AllOfValidator()); - } - this.anyOf = jsonSchemaInfo.anyOf; - if (this.anyOf != null) { - keywordToValidator.put("anyOf", new AnyOfValidator()); - } - this.oneOf = jsonSchemaInfo.oneOf; - if (this.oneOf != null) { - keywordToValidator.put("oneOf", new OneOfValidator()); - } - this.not = jsonSchemaInfo.not; - if (this.not != null) { - keywordToValidator.put("not", new NotValidator()); - } - this.uniqueItems = jsonSchemaInfo.uniqueItems; - if (this.uniqueItems != null) { - keywordToValidator.put("uniqueItems", new UniqueItemsValidator()); - } - this.enumValues = jsonSchemaInfo.enumValues; - if (this.enumValues != null) { - keywordToValidator.put("enum", new EnumValidator()); - } - this.pattern = jsonSchemaInfo.pattern; - if (this.pattern != null) { - keywordToValidator.put("pattern", new PatternValidator()); - } - this.defaultValue = jsonSchemaInfo.defaultValue; - this.defaultValueSet = jsonSchemaInfo.defaultValueSet; - this.constValue = jsonSchemaInfo.constValue; - this.constValueSet = jsonSchemaInfo.constValueSet; - if (this.constValueSet) { - keywordToValidator.put("const", new ConstValidator()); - } - this.contains = jsonSchemaInfo.contains; - if (this.contains != null) { - keywordToValidator.put("contains", new ContainsValidator()); - } - this.maxContains = jsonSchemaInfo.maxContains; - if (this.maxContains != null) { - keywordToValidator.put("maxContains", new MaxContainsValidator()); - } - this.minContains = jsonSchemaInfo.minContains; - if (this.minContains != null) { - keywordToValidator.put("minContains", new MinContainsValidator()); - } - this.propertyNames = jsonSchemaInfo.propertyNames; - if (this.propertyNames != null) { - keywordToValidator.put("propertyNames", new PropertyNamesValidator()); - } - this.dependentRequired = jsonSchemaInfo.dependentRequired; - if (this.dependentRequired != null) { - keywordToValidator.put("dependentRequired", new DependentRequiredValidator()); - } - this.dependentSchemas = jsonSchemaInfo.dependentSchemas; - if (this.dependentSchemas != null) { - keywordToValidator.put("dependentSchemas", new DependentSchemasValidator()); - } - this.patternProperties = jsonSchemaInfo.patternProperties; - if (this.patternProperties != null) { - keywordToValidator.put("patternProperties", new PatternPropertiesValidator()); - } - this.prefixItems = jsonSchemaInfo.prefixItems; - if (this.prefixItems != null) { - keywordToValidator.put("prefixItems", new PrefixItemsValidator()); - } - this.ifSchema = jsonSchemaInfo.ifSchema; - if (this.ifSchema != null) { - keywordToValidator.put("if", new IfValidator()); - } - this.then = jsonSchemaInfo.then; - if (this.then != null) { - keywordToValidator.put("then", new ThenValidator()); - } - this.elseSchema = jsonSchemaInfo.elseSchema; - if (this.elseSchema != null) { - keywordToValidator.put("else", new ElseValidator()); - } - this.unevaluatedItems = jsonSchemaInfo.unevaluatedItems; - if (this.unevaluatedItems != null) { - keywordToValidator.put("unevaluatedItems", new UnevaluatedItemsValidator()); - } - this.unevaluatedProperties = jsonSchemaInfo.unevaluatedProperties; - if (this.unevaluatedProperties != null) { - keywordToValidator.put("unevaluatedProperties", new UnevaluatedPropertiesValidator()); - } - this.keywordToValidator = keywordToValidator; - } - - public abstract @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas); - public abstract @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException; - public abstract T validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException; - - private List getContainsPathToSchemas( - @Nullable Object arg, - ValidationMetadata validationMetadata - ) { - if (!(arg instanceof List listArg) || contains == null) { - return new ArrayList<>(); - } - JsonSchema containsSchema = JsonSchemaFactory.getInstance(contains); - @Nullable List containsPathToSchemas = new ArrayList<>(); - for(int i = 0; i < listArg.size(); i++) { - PathToSchemasMap thesePathToSchemas = new PathToSchemasMap(); - List itemPathToItem = new ArrayList<>(validationMetadata.pathToItem()); - itemPathToItem.add(i); - ValidationMetadata itemValidationMetadata = new ValidationMetadata( - itemPathToItem, - validationMetadata.configuration(), - validationMetadata.validatedPathToSchemas(), - validationMetadata.seenClasses() - ); - if (itemValidationMetadata.validationRanEarlier(containsSchema)) { - // todo add_deeper_validated_schemas - containsPathToSchemas.add(thesePathToSchemas); - continue; - } - - try { - PathToSchemasMap otherPathToSchemas = JsonSchema.validate( - containsSchema, listArg.get(i), itemValidationMetadata); - containsPathToSchemas.add(otherPathToSchemas); - } catch (ValidationException ignored) {} - } - return containsPathToSchemas; - } - - private PathToSchemasMap getPatternPropertiesPathToSchemas( - @Nullable Object arg, - ValidationMetadata validationMetadata - ) throws ValidationException { - if (!(arg instanceof Map mapArg) || patternProperties == null) { - return new PathToSchemasMap(); - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - for (Map.Entry entry: mapArg.entrySet()) { - Object entryKey = entry.getKey(); - if (!(entryKey instanceof String key)) { - throw new ValidationException("Invalid non-string type for map key"); - } - List propPathToItem = new ArrayList<>(validationMetadata.pathToItem()); - propPathToItem.add(key); - ValidationMetadata propValidationMetadata = new ValidationMetadata( - propPathToItem, - validationMetadata.configuration(), - validationMetadata.validatedPathToSchemas(), - validationMetadata.seenClasses() - ); - for (Map.Entry>> patternPropEntry: patternProperties.entrySet()) { - if (!patternPropEntry.getKey().matcher(key).find()) { - continue; - } - - Class> patternPropClass = patternPropEntry.getValue(); - JsonSchema patternPropSchema = JsonSchemaFactory.getInstance(patternPropClass); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(patternPropSchema, entry.getValue(), propValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - } - return pathToSchemas; - } - - private PathToSchemasMap getIfPathToSchemas( - @Nullable Object arg, - ValidationMetadata validationMetadata - ) { - if (ifSchema == null) { - return new PathToSchemasMap(); - } - JsonSchema ifSchemaInstance = JsonSchemaFactory.getInstance(ifSchema); - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - try { - var otherPathToSchemas = JsonSchema.validate(ifSchemaInstance, arg, validationMetadata); - pathToSchemas.update(otherPathToSchemas); - } catch (ValidationException ignored) {} - return pathToSchemas; - } - - public static PathToSchemasMap validate( - JsonSchema jsonSchema, - @Nullable Object arg, - ValidationMetadata validationMetadata - ) throws ValidationException { - LinkedHashSet disabledKeywords = validationMetadata.configuration().disabledKeywordFlags().getKeywords(); - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - LinkedHashMap thisKeywordToValidator = jsonSchema.keywordToValidator; - @Nullable List containsPathToSchemas = null; - if (thisKeywordToValidator.containsKey("contains")) { - containsPathToSchemas = jsonSchema.getContainsPathToSchemas(arg, validationMetadata); - } - @Nullable PathToSchemasMap patternPropertiesPathToSchemas = null; - if (thisKeywordToValidator.containsKey("patternProperties")) { - patternPropertiesPathToSchemas = jsonSchema.getPatternPropertiesPathToSchemas(arg, validationMetadata); - } - @Nullable PathToSchemasMap ifPathToSchemas = null; - if (thisKeywordToValidator.containsKey("if")) { - ifPathToSchemas = jsonSchema.getIfPathToSchemas(arg, validationMetadata); - } - @Nullable PathToSchemasMap knownPathToSchemas = null; - for (Map.Entry entry: thisKeywordToValidator.entrySet()) { - String jsonKeyword = entry.getKey(); - if (disabledKeywords.contains(jsonKeyword)) { - boolean typeIntegerUseCase = jsonKeyword.equals("format") && "int".equals(jsonSchema.format); - if (!typeIntegerUseCase) { - continue; - } - } - if ("unevaluatedItems".equals(jsonKeyword) || "unevaluatedProperties".equals(jsonKeyword)) { - knownPathToSchemas = pathToSchemas; - } - KeywordValidator validator = entry.getValue(); - ValidationData data = new ValidationData( - jsonSchema, - arg, - validationMetadata, - containsPathToSchemas, - patternPropertiesPathToSchemas, - ifPathToSchemas, - knownPathToSchemas - ); - @Nullable PathToSchemasMap otherPathToSchemas = validator.validate(data); - if (otherPathToSchemas == null) { - continue; - } - pathToSchemas.update(otherPathToSchemas); - } - List pathToItem = validationMetadata.pathToItem(); - if (!pathToSchemas.containsKey(pathToItem)) { - pathToSchemas.put(validationMetadata.pathToItem(), new LinkedHashMap<>()); - } - @Nullable LinkedHashMap, Void> schemas = pathToSchemas.get(pathToItem); - if (schemas != null) { - schemas.put(jsonSchema, null); - } - return pathToSchemas; - } - - protected String castToAllowedTypes(String arg, List pathToItem, Set> pathSet) { - pathSet.add(pathToItem); - return arg; - } - - protected Boolean castToAllowedTypes(Boolean arg, List pathToItem, Set> pathSet) { - pathSet.add(pathToItem); - return arg; - } - - protected Number castToAllowedTypes(Number arg, List pathToItem, Set> pathSet) { - pathSet.add(pathToItem); - return arg; - } - - protected Void castToAllowedTypes(Void arg, List pathToItem, Set> pathSet) { - pathSet.add(pathToItem); - return arg; - } - - protected List castToAllowedTypes(List arg, List pathToItem, Set> pathSet) throws ValidationException { - pathSet.add(pathToItem); - List<@Nullable Object> argFixed = new ArrayList<>(); - int i =0; - for (Object item: arg) { - List newPathToItem = new ArrayList<>(pathToItem); - newPathToItem.add(i); - Object fixedVal = castToAllowedObjectTypes(item, newPathToItem, pathSet); - argFixed.add(fixedVal); - i += 1; - } - return argFixed; - } - - protected Map castToAllowedTypes(Map arg, List pathToItem, Set> pathSet) throws ValidationException { - pathSet.add(pathToItem); - LinkedHashMap argFixed = new LinkedHashMap<>(); - for (Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String key)) { - throw new ValidationException("Invalid non-string key value"); - } - Object val = entry.getValue(); - List newPathToItem = new ArrayList<>(pathToItem); - newPathToItem.add(key); - Object fixedVal = castToAllowedObjectTypes(val, newPathToItem, pathSet); - argFixed.put(key, fixedVal); - } - return argFixed; - } - - private @Nullable Object castToAllowedObjectTypes(@Nullable Object arg, List pathToItem, Set> pathSet) throws ValidationException { - if (arg == null) { - return castToAllowedTypes((Void) null, pathToItem, pathSet); - } else if (arg instanceof String) { - return castToAllowedTypes((String) arg, pathToItem, pathSet); - } else if (arg instanceof Map) { - pathSet.add(pathToItem); - return castToAllowedTypes((Map) arg, pathToItem, pathSet); - } else if (arg instanceof Boolean) { - return castToAllowedTypes((Boolean) arg, pathToItem, pathSet); - } else if (arg instanceof Integer) { - return castToAllowedTypes((Number) arg, pathToItem, pathSet); - } else if (arg instanceof Long) { - return castToAllowedTypes((Number) arg, pathToItem, pathSet); - } else if (arg instanceof Float) { - return castToAllowedTypes((Number) arg, pathToItem, pathSet); - } else if (arg instanceof Double) { - return castToAllowedTypes((Number) arg, pathToItem, pathSet); - } else if (arg instanceof List) { - return castToAllowedTypes((List) arg, pathToItem, pathSet); - } else if (arg instanceof ZonedDateTime) { - return castToAllowedTypes(arg.toString(), pathToItem, pathSet); - } else if (arg instanceof LocalDate) { - return castToAllowedTypes(arg.toString(), pathToItem, pathSet); - } else if (arg instanceof UUID) { - return castToAllowedTypes(arg.toString(), pathToItem, pathSet); - } else { - Class argClass = arg.getClass(); - throw new ValidationException("Invalid type passed in for input="+arg+" type="+argClass); - } - } - - public Void getNewInstance(Void arg, List pathToItem, PathToSchemasMap pathToSchemas) { - return arg; - } - - public boolean getNewInstance(boolean arg, List pathToItem, PathToSchemasMap pathToSchemas) { - return arg; - } - - public Number getNewInstance(Number arg, List pathToItem, PathToSchemasMap pathToSchemas) { - return arg; - } - - public String getNewInstance(String arg, List pathToItem, PathToSchemasMap pathToSchemas) { - return arg; - } - - protected static PathToSchemasMap getPathToSchemas(JsonSchema jsonSchema, @Nullable Object arg, ValidationMetadata validationMetadata, Set> pathSet) throws ValidationException { - PathToSchemasMap pathToSchemasMap = new PathToSchemasMap(); - // todo add check of validationMetadata.validationRanEarlier(this) - PathToSchemasMap otherPathToSchemas = validate(jsonSchema, arg, validationMetadata); - pathToSchemasMap.update(otherPathToSchemas); - for (var schemas: pathToSchemasMap.values()) { - JsonSchema firstSchema = schemas.entrySet().iterator().next().getKey(); - schemas.clear(); - schemas.put(firstSchema, null); - } - pathSet.removeAll(pathToSchemasMap.keySet()); - if (!pathSet.isEmpty()) { - LinkedHashMap, Void> unsetAnyTypeSchema = new LinkedHashMap<>(); - unsetAnyTypeSchema.put(UnsetAnyTypeJsonSchema.UnsetAnyTypeJsonSchema1.getInstance(), null); - for (List pathToItem: pathSet) { - pathToSchemasMap.put(pathToItem, unsetAnyTypeSchema); - } - } - return pathToSchemasMap; - } - - public static String getClass(@Nullable Object arg) { - if (arg == null) { - return Void.class.getSimpleName(); - } else { - return arg.getClass().getSimpleName(); - } - } - // todo add bytes and FileIO -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java deleted file mode 100644 index 8fff8029165..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaFactory.java +++ /dev/null @@ -1,32 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; - - -public class JsonSchemaFactory { - static Map>, JsonSchema> classToInstance = new HashMap<>(); - - public static > V getInstance(Class schemaCls) { - @Nullable JsonSchema cacheInst = classToInstance.get(schemaCls); - if (cacheInst != null) { - assert schemaCls.isInstance(cacheInst); - return schemaCls.cast(cacheInst); - } - try { - Method method = schemaCls.getMethod("getInstance"); - @SuppressWarnings("nullness") @NonNull Object obj = method.invoke(null); - assert schemaCls.isInstance(obj); - V inst = schemaCls.cast(obj); - classToInstance.put(schemaCls, inst); - return inst; - } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { - throw new RuntimeException(e); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java deleted file mode 100644 index 87143cbbc00..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/JsonSchemaInfo.java +++ /dev/null @@ -1,210 +0,0 @@ -package unit_test_api.schemas.validation; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.math.BigDecimal; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -public class JsonSchemaInfo { - public @Nullable Set> type = null; - public JsonSchemaInfo type(Set> type) { - this.type = type; - return this; - } - public @Nullable String format = null; - public JsonSchemaInfo format(String format) { - this.format = format; - return this; - } - public @Nullable Class> items = null; - public JsonSchemaInfo items(Class> items) { - this.items = items; - return this; - } - public @Nullable Map>> properties = null; - public JsonSchemaInfo properties(Map>> properties) { - this.properties = properties; - return this; - } - public @Nullable Set required = null; - public JsonSchemaInfo required(Set required) { - this.required = required; - return this; - } - public @Nullable Number exclusiveMaximum = null; - public JsonSchemaInfo exclusiveMaximum(Number exclusiveMaximum) { - this.exclusiveMaximum = exclusiveMaximum; - return this; - } - public @Nullable Number exclusiveMinimum = null; - public JsonSchemaInfo exclusiveMinimum(Number exclusiveMinimum) { - this.exclusiveMinimum = exclusiveMinimum; - return this; - } - public @Nullable Integer maxItems = null; - public JsonSchemaInfo maxItems(Integer maxItems) { - this.maxItems = maxItems; - return this; - } - public @Nullable Integer minItems = null; - public JsonSchemaInfo minItems(Integer minItems) { - this.minItems = minItems; - return this; - } - public @Nullable Integer maxLength = null; - public JsonSchemaInfo maxLength(Integer maxLength) { - this.maxLength = maxLength; - return this; - } - public @Nullable Integer minLength = null; - public JsonSchemaInfo minLength(Integer minLength) { - this.minLength = minLength; - return this; - } - public @Nullable Integer maxProperties = null; - public JsonSchemaInfo maxProperties(Integer maxProperties) { - this.maxProperties = maxProperties; - return this; - } - public @Nullable Integer minProperties = null; - public JsonSchemaInfo minProperties(Integer minProperties) { - this.minProperties = minProperties; - return this; - } - public @Nullable Number maximum = null; - public JsonSchemaInfo maximum(Number maximum) { - this.maximum = maximum; - return this; - } - public @Nullable Number minimum = null; - public JsonSchemaInfo minimum(Number minimum) { - this.minimum = minimum; - return this; - } - public @Nullable BigDecimal multipleOf = null; - public JsonSchemaInfo multipleOf(BigDecimal multipleOf) { - this.multipleOf = multipleOf; - return this; - } - public @Nullable Class> additionalProperties; - public JsonSchemaInfo additionalProperties(Class> additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - public @Nullable List>> allOf = null; - public JsonSchemaInfo allOf(List>> allOf) { - this.allOf = allOf; - return this; - } - public @Nullable List>> anyOf = null; - public JsonSchemaInfo anyOf(List>> anyOf) { - this.anyOf = anyOf; - return this; - } - public @Nullable List>> oneOf = null; - public JsonSchemaInfo oneOf(List>> oneOf) { - this.oneOf = oneOf; - return this; - } - public @Nullable Class> not = null; - public JsonSchemaInfo not(Class> not) { - this.not = not; - return this; - } - public @Nullable Boolean uniqueItems = null; - public JsonSchemaInfo uniqueItems(Boolean uniqueItems) { - this.uniqueItems = uniqueItems; - return this; - } - public @Nullable Set<@Nullable Object> enumValues = null; - public JsonSchemaInfo enumValues(Set<@Nullable Object> enumValues) { - this.enumValues = enumValues; - return this; - } - public @Nullable Pattern pattern = null; - public JsonSchemaInfo pattern(Pattern pattern) { - this.pattern = pattern; - return this; - } - public @Nullable Object defaultValue = null; - public boolean defaultValueSet = false; - public JsonSchemaInfo defaultValue(@Nullable Object defaultValue) { - this.defaultValue = defaultValue; - this.defaultValueSet = true; - return this; - } - public @Nullable Object constValue = null; - public boolean constValueSet = false; - public JsonSchemaInfo constValue(@Nullable Object constValue) { - this.constValue = constValue; - this.constValueSet = true; - return this; - } - public @Nullable Class> contains = null; - public JsonSchemaInfo contains(Class> contains) { - this.contains = contains; - return this; - } - public @Nullable Integer maxContains = null; - public JsonSchemaInfo maxContains(Integer maxContains) { - this.maxContains = maxContains; - return this; - } - public @Nullable Integer minContains = null; - public JsonSchemaInfo minContains(Integer minContains) { - this.minContains = minContains; - return this; - } - public @Nullable Class> propertyNames = null; - public JsonSchemaInfo propertyNames(Class> propertyNames) { - this.propertyNames = propertyNames; - return this; - } - public @Nullable Map> dependentRequired = null; - public JsonSchemaInfo dependentRequired(Map> dependentRequired) { - this.dependentRequired = dependentRequired; - return this; - } - public @Nullable Map>> dependentSchemas = null; - public JsonSchemaInfo dependentSchemas(Map>> dependentSchemas) { - this.dependentSchemas = dependentSchemas; - return this; - } - public @Nullable Map>> patternProperties = null; - public JsonSchemaInfo patternProperties(Map>> patternProperties) { - this.patternProperties = patternProperties; - return this; - } - public @Nullable List>> prefixItems = null; - public JsonSchemaInfo prefixItems(List>> prefixItems) { - this.prefixItems = prefixItems; - return this; - } - public @Nullable Class> ifSchema = null; - public JsonSchemaInfo ifSchema(Class> ifSchema) { - this.ifSchema = ifSchema; - return this; - } - public @Nullable Class> then = null; - public JsonSchemaInfo then(Class> then) { - this.then = then; - return this; - } - public @Nullable Class> elseSchema = null; - public JsonSchemaInfo elseSchema(Class> elseSchema) { - this.elseSchema = elseSchema; - return this; - } - public @Nullable Class> unevaluatedItems = null; - public JsonSchemaInfo unevaluatedItems(Class> unevaluatedItems) { - this.unevaluatedItems = unevaluatedItems; - return this; - } - public @Nullable Class> unevaluatedProperties = null; - public JsonSchemaInfo unevaluatedProperties(Class> unevaluatedProperties) { - this.unevaluatedProperties = unevaluatedProperties; - return this; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java deleted file mode 100644 index 5a9ad21c98c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordEntry.java +++ /dev/null @@ -1,10 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.util.AbstractMap; - -@SuppressWarnings("serial") -public class KeywordEntry extends AbstractMap.SimpleEntry { - public KeywordEntry(String key, KeywordValidator value) { - super(key, value); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java deleted file mode 100644 index 10056432754..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/KeywordValidator.java +++ /dev/null @@ -1,11 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -@FunctionalInterface -public interface KeywordValidator { - @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java deleted file mode 100644 index 716c29b0c53..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LengthValidator.java +++ /dev/null @@ -1,16 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.text.BreakIterator; - -public abstract class LengthValidator { - protected int getLength(String text) { - int graphemeCount = 0; - BreakIterator graphemeCounter = BreakIterator - .getCharacterInstance(); - graphemeCounter.setText(text); - while (graphemeCounter.next() != BreakIterator.DONE) { - graphemeCount++; - } - return graphemeCount; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java deleted file mode 100644 index 5733d62f367..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ListSchemaValidator.java +++ /dev/null @@ -1,12 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; - -public interface ListSchemaValidator { - OutType getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) throws ValidationException; - OutType validate(List arg, SchemaConfiguration configuration) throws ValidationException; - BoxedType validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java deleted file mode 100644 index 8386d7c53e6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface LongEnumValidator { - long validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java deleted file mode 100644 index 4477e841978..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/LongValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface LongValueMethod { - long value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java deleted file mode 100644 index d3e45307491..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapSchemaValidator.java +++ /dev/null @@ -1,13 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; -import java.util.Map; - -public interface MapSchemaValidator { - OutType getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) throws ValidationException; - OutType validate(Map arg, SchemaConfiguration configuration) throws ValidationException; - BoxedType validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java deleted file mode 100644 index 3cf4093048c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MapUtils.java +++ /dev/null @@ -1,37 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.InvalidAdditionalPropertyException; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -public class MapUtils { - /** - * A builder for maps that allows in null values - * Schema tests + doc code samples need it - * @param entries items to add - * @return the output map - * @param key type - * @param value type - */ - @SafeVarargs - @SuppressWarnings("varargs") - public static Map makeMap(Map.Entry... entries) { - Map map = new HashMap<>(); - for (Map.Entry entry : entries) { - map.put(entry.getKey(), entry.getValue()); - } - return map; - } - - public static void throwIfKeyKnown(String key, Set knownKeys, boolean setting) throws InvalidAdditionalPropertyException { - if (knownKeys.contains(key)) { - String verb = "getting"; - if (setting) { - verb = "setting"; - } - throw new InvalidAdditionalPropertyException ("The known key " + key + " may not be passed in when "+verb+" an additional property"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java deleted file mode 100644 index e70e60fc2cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxContainsValidator.java +++ /dev/null @@ -1,32 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; - -public class MaxContainsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var maxContains = data.schema().maxContains; - if (maxContains == null) { - return null; - } - if (!(data.arg() instanceof List)) { - return null; - } - var containsPathToSchemas = data.containsPathToSchemas(); - if (containsPathToSchemas == null) { - return null; - } - if (containsPathToSchemas.size() > maxContains) { - throw new ValidationException( - "Validation failed for maxContains keyword in class="+data.schema().getClass()+ - " at pathToItem="+data.validationMetadata().pathToItem()+". Too many items validated to the contains schema." - ); - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java deleted file mode 100644 index 30177372927..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxItemsValidator.java +++ /dev/null @@ -1,25 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.List; - -public class MaxItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var maxItems = data.schema().maxItems; - if (maxItems == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (listArg.size() > maxItems) { - throw new ValidationException("Value " + listArg + " is invalid because has > the maxItems of " + maxItems); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java deleted file mode 100644 index a7c2342bb95..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxLengthValidator.java +++ /dev/null @@ -1,24 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class MaxLengthValidator extends LengthValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var maxLength = data.schema().maxLength; - if (maxLength == null) { - return null; - } - if (!(data.arg() instanceof String stringArg)) { - return null; - } - int length = getLength(stringArg); - if (length > maxLength) { - throw new ValidationException("Value " + stringArg + " is invalid because has > the maxLength of " + maxLength); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java deleted file mode 100644 index 8a8437dc1ae..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaxPropertiesValidator.java +++ /dev/null @@ -1,25 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Map; - -public class MaxPropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var maxProperties = data.schema().maxProperties; - if (maxProperties == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - if (mapArg.size() > maxProperties) { - throw new ValidationException("Value " + mapArg + " is invalid because has > the maxProperties of " + maxProperties); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java deleted file mode 100644 index 3a3e6edc57b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MaximumValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class MaximumValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var maximum = data.schema().maximum; - if (maximum == null) { - return null; - } - if (!(data.arg() instanceof Number)) { - return null; - } - String msg = "Value " + data.arg() + " is invalid because it is > the maximum of " + maximum; - if (data.arg() instanceof Integer intArg) { - if (intArg.compareTo(maximum.intValue()) > 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Long longArg) { - if (longArg.compareTo(maximum.longValue()) > 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Float floatArg) { - if (floatArg.compareTo(maximum.floatValue()) > 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Double doubleArg) { - if (doubleArg.compareTo(maximum.doubleValue()) > 0) { - throw new ValidationException(msg); - } - return null; - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java deleted file mode 100644 index 71b42fcf9f0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinContainsValidator.java +++ /dev/null @@ -1,31 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; - -public class MinContainsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var minContains = data.schema().minContains; - if (minContains == null) { - return null; - } - if (!(data.arg() instanceof List)) { - return null; - } - if (data.containsPathToSchemas() == null) { - return null; - } - if (data.containsPathToSchemas().size() < minContains) { - throw new ValidationException( - "Validation failed for minContains keyword in class="+data.schema().getClass()+ - " at pathToItem="+data.validationMetadata().pathToItem()+". Too few items validated to the contains schema." - ); - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java deleted file mode 100644 index 14356ed593e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinItemsValidator.java +++ /dev/null @@ -1,25 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.List; - -public class MinItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var minItems = data.schema().minItems; - if (minItems == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (listArg.size() < minItems) { - throw new ValidationException("Value " + listArg + " is invalid because has < the minItems of " + minItems); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java deleted file mode 100644 index acdf1d7bdb5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinLengthValidator.java +++ /dev/null @@ -1,24 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class MinLengthValidator extends LengthValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var minLength = data.schema().minLength; - if (minLength == null) { - return null; - } - if (!(data.arg() instanceof String stringArg)) { - return null; - } - int length = getLength(stringArg); - if (length < minLength) { - throw new ValidationException("Value " + stringArg + " is invalid because has < the minLength of " + minLength); - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java deleted file mode 100644 index 91654ce944a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinPropertiesValidator.java +++ /dev/null @@ -1,25 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Map; - -public class MinPropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var minProperties = data.schema().minProperties; - if (minProperties == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - if (mapArg.size() < minProperties) { - throw new ValidationException("Value " + mapArg + " is invalid because has < the minProperties of " + minProperties); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java deleted file mode 100644 index 6ad8648d81b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MinimumValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class MinimumValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var minimum = data.schema().minimum; - if (minimum == null) { - return null; - } - if (!(data.arg() instanceof Number)) { - return null; - } - String msg = "Value " + data.arg() + " is invalid because it is < the minimum of " + minimum; - if (data.arg() instanceof Integer intArg) { - if (intArg.compareTo(minimum.intValue()) < 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Long longArg) { - if (longArg.compareTo(minimum.longValue()) < 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Float floatArg) { - if (floatArg.compareTo(minimum.floatValue()) < 0) { - throw new ValidationException(msg); - } - return null; - } - if (data.arg() instanceof Double doubleArg) { - if (doubleArg.compareTo(minimum.doubleValue()) < 0) { - throw new ValidationException(msg); - } - return null; - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java deleted file mode 100644 index ed774f1b16a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/MultipleOfValidator.java +++ /dev/null @@ -1,27 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.math.BigDecimal; - -public class MultipleOfValidator extends BigDecimalValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var multipleOf = data.schema().multipleOf; - if (multipleOf == null) { - return null; - } - if (!(data.arg() instanceof Number numberArg)) { - return null; - } - BigDecimal castArg = getBigDecimal(numberArg); - String msg = "Value " + numberArg + " is invalid because it is not a multiple of " + multipleOf; - if (castArg.remainder(multipleOf).compareTo(BigDecimal.ZERO) != 0) { - throw new ValidationException(msg); - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java deleted file mode 100644 index d017751266a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NotValidator.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class NotValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var not = data.schema().not; - if (not == null) { - return null; - } - PathToSchemasMap pathToSchemas; - try { - JsonSchema notSchema = JsonSchemaFactory.getInstance(not); - pathToSchemas = JsonSchema.validate(notSchema, data.arg(), data.validationMetadata()); - } catch (ValidationException e) { - return null; - } - if (!pathToSchemas.isEmpty()) { - throw new ValidationException( - "Invalid value "+data.arg()+" was passed in to "+data.schema().getClass()+". "+ - "Value is invalid because it is disallowed by not "+not - ); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java deleted file mode 100644 index df199382e1a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface NullEnumValidator { - Void validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java deleted file mode 100644 index 95f71f458a3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullSchemaValidator.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface NullSchemaValidator { - Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException; - T validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java deleted file mode 100644 index c119daf92e2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NullValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface NullValueMethod { - Void value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java deleted file mode 100644 index ed0ce467283..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/NumberSchemaValidator.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface NumberSchemaValidator { - Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException; - T validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java deleted file mode 100644 index b628cd87811..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/OneOfValidator.java +++ /dev/null @@ -1,50 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.ArrayList; -import java.util.List; - -public class OneOfValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var oneOf = data.schema().oneOf; - if (oneOf == null) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - List>> validatedOneOfClasses = new ArrayList<>(); - for(Class> oneOfClass: oneOf) { - if (oneOfClass == data.schema().getClass()) { - /* - optimistically assume that schema will pass validation - do not invoke validate on it because that is recursive - */ - validatedOneOfClasses.add(oneOfClass); - continue; - } - try { - JsonSchema oneOfSchema = JsonSchemaFactory.getInstance(oneOfClass); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(oneOfSchema, data.arg(), data.validationMetadata()); - validatedOneOfClasses.add(oneOfClass); - pathToSchemas.update(otherPathToSchemas); - } catch (ValidationException e) { - // silence exceptions because the code needs to accumulate validatedOneOfClasses - } - } - if (validatedOneOfClasses.isEmpty()) { - throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". None "+ - "of the oneOf schemas matched the input data." - ); - } - if (validatedOneOfClasses.size() > 1) { - throw new ValidationException("Invalid inputs given to generate an instance of "+data.schema().getClass()+". Multiple "+ - "oneOf schemas validated the data, but a max of one is allowed." - ); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java deleted file mode 100644 index d0a3180f033..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PathToSchemasMap.java +++ /dev/null @@ -1,21 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -@SuppressWarnings("serial") -public class PathToSchemasMap extends LinkedHashMap, LinkedHashMap, Void>> { - - public void update(PathToSchemasMap other) { - for (Map.Entry, LinkedHashMap, Void>> entry: other.entrySet()) { - List pathToItem = entry.getKey(); - LinkedHashMap, Void> otherSchemas = entry.getValue(); - if (containsKey(pathToItem)) { - get(pathToItem).putAll(otherSchemas); - } else { - put(pathToItem, otherSchemas); - } - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java deleted file mode 100644 index bcb642e8b14..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternPropertiesValidator.java +++ /dev/null @@ -1,21 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Map; - -public class PatternPropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) { - var patternProperties = data.schema().patternProperties; - if (patternProperties == null) { - return null; - } - if (!(data.arg() instanceof Map)) { - return null; - } - return data.patternPropertiesPathToSchemas(); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java deleted file mode 100644 index 465685066f0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PatternValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -public class PatternValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var pattern = data.schema().pattern; - if (pattern == null) { - return null; - } - if (!(data.arg() instanceof String stringArg)) { - return null; - } - if (!pattern.matcher(stringArg).find()) { - throw new ValidationException("Invalid value "+stringArg+" did not find a match for pattern "+pattern); - } - return null; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java deleted file mode 100644 index 6e51519d7e2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PrefixItemsValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.List; - -public class PrefixItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var prefixItems = data.schema().prefixItems; - if (prefixItems == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (listArg.isEmpty()) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - int maxIndex = Math.min(listArg.size(), prefixItems.size()); - for (int i=0; i < maxIndex; i++) { - List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - itemPathToItem.add(i); - ValidationMetadata itemValidationMetadata = new ValidationMetadata( - itemPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - JsonSchema itemsSchema = JsonSchemaFactory.getInstance(prefixItems.get(i)); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(itemsSchema, listArg.get(i), itemValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java deleted file mode 100644 index 168afa9e9c7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertiesValidator.java +++ /dev/null @@ -1,56 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class PropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var properties = data.schema().properties; - if (properties == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - Set presentProperties = new LinkedHashSet<>(); - for (Object key: mapArg.keySet()) { - if (key instanceof String) { - presentProperties.add((String) key); - } - } - for(Map.Entry>> entry: properties.entrySet()) { - String propName = entry.getKey(); - if (!presentProperties.contains(propName)) { - continue; - } - @Nullable Object propValue = mapArg.get(propName); - List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - propPathToItem.add(propName); - ValidationMetadata propValidationMetadata = new ValidationMetadata( - propPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - Class> propClass = entry.getValue(); - JsonSchema propSchema = JsonSchemaFactory.getInstance(propClass); - if (propValidationMetadata.validationRanEarlier(propSchema)) { - // todo add_deeper_validated_schemas - continue; - } - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(propSchema, propValue, propValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java deleted file mode 100644 index 8c5d9e85cbe..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyEntry.java +++ /dev/null @@ -1,10 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.util.AbstractMap; - -@SuppressWarnings("serial") -public class PropertyEntry extends AbstractMap.SimpleEntry>> { - public PropertyEntry(String key, Class> value) { - super(key, value); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java deleted file mode 100644 index bcb5b8c81e6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/PropertyNamesValidator.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class PropertyNamesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var propertyNames = data.schema().propertyNames; - if (propertyNames == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - JsonSchema propertyNamesSchema = JsonSchemaFactory.getInstance(propertyNames); - for (Object objKey: mapArg.keySet()) { - if (objKey instanceof String key) { - List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - propPathToItem.add(key); - ValidationMetadata keyValidationMetadata = new ValidationMetadata( - propPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - JsonSchema.validate(propertyNamesSchema, key, keyValidationMetadata); - } - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java deleted file mode 100644 index 726df124d16..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/RequiredValidator.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class RequiredValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var required = data.schema().required; - if (required == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - Set missingRequiredProperties = new HashSet<>(required); - for (Object key: mapArg.keySet()) { - if (key instanceof String) { - missingRequiredProperties.remove(key); - } - } - if (!missingRequiredProperties.isEmpty()) { - List missingReqProps = missingRequiredProperties.stream().sorted().toList(); - String pluralChar = ""; - if (missingRequiredProperties.size() > 1) { - pluralChar = "s"; - } - throw new ValidationException( - data.schema().getClass()+" is missing "+missingRequiredProperties.size()+" required argument"+pluralChar+": "+missingReqProps - ); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java deleted file mode 100644 index bacab7b872f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringEnumValidator.java +++ /dev/null @@ -1,8 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface StringEnumValidator { - String validate(EnumType arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java deleted file mode 100644 index 1498b04e4e0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringSchemaValidator.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -public interface StringSchemaValidator { - String validate(String arg, SchemaConfiguration configuration) throws ValidationException; - T validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException; -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java deleted file mode 100644 index c22c975f078..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/StringValueMethod.java +++ /dev/null @@ -1,5 +0,0 @@ -package unit_test_api.schemas.validation; - -public interface StringValueMethod { - String value(); -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java deleted file mode 100644 index b59611a6bdd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ThenValidator.java +++ /dev/null @@ -1,32 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -public class ThenValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var then = data.schema().then; - if (then == null) { - return null; - } - var ifPathToSchemas = data.ifPathToSchemas(); - if (ifPathToSchemas == null) { - // if unset - return null; - } - if (ifPathToSchemas.isEmpty()) { - // if validation is false - return null; - } - JsonSchema thenSchema = JsonSchemaFactory.getInstance(then); - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - var thenPathToSchemas = JsonSchema.validate(thenSchema, data.arg(), data.validationMetadata()); - // todo capture validation error and describe it as an then error? - pathToSchemas.update(ifPathToSchemas); - pathToSchemas.update(thenPathToSchemas); - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java deleted file mode 100644 index b4c6c2686a1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/TypeValidator.java +++ /dev/null @@ -1,34 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.List; -import java.util.Map; - -public class TypeValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var type = data.schema().type; - if (type == null) { - return null; - } - Class argClass; - var arg = data.arg(); - if (arg == null) { - argClass = Void.class; - } else if (arg instanceof List) { - argClass = List.class; - } else if (arg instanceof Map) { - argClass = Map.class; - } else { - argClass = arg.getClass(); - } - if (!type.contains(argClass)) { - throw new ValidationException("invalid type"); - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java deleted file mode 100644 index d285388519c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedItemsValidator.java +++ /dev/null @@ -1,52 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.List; - -public class UnevaluatedItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var unevaluatedItems = data.schema().unevaluatedItems; - if (unevaluatedItems == null) { - return null; - } - var knownPathToSchemas = data.knownPathToSchemas(); - if (knownPathToSchemas == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (listArg.isEmpty()) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - int minIndex = data.schema().prefixItems != null ? data.schema().prefixItems.size() : 0; - JsonSchema unevaluatedItemsSchema = JsonSchemaFactory.getInstance(unevaluatedItems); - for(int i = minIndex; i < listArg.size(); i++) { - List itemPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - itemPathToItem.add(i); - if (knownPathToSchemas.containsKey(itemPathToItem)) { - continue; - } - ValidationMetadata itemValidationMetadata = new ValidationMetadata( - itemPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - if (itemValidationMetadata.validationRanEarlier(unevaluatedItemsSchema)) { - // todo add_deeper_validated_schemas - continue; - } - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(unevaluatedItemsSchema, listArg.get(i), itemValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java deleted file mode 100644 index 3d5bcae9569..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnevaluatedPropertiesValidator.java +++ /dev/null @@ -1,49 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class UnevaluatedPropertiesValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var unevaluatedProperties = data.schema().unevaluatedProperties; - if (unevaluatedProperties == null) { - return null; - } - var knownPathToSchemas = data.knownPathToSchemas(); - if (knownPathToSchemas == null) { - return null; - } - if (!(data.arg() instanceof Map mapArg)) { - return null; - } - PathToSchemasMap pathToSchemas = new PathToSchemasMap(); - JsonSchema unevaluatedPropertiesSchema = JsonSchemaFactory.getInstance(unevaluatedProperties); - for(Map.Entry entry: mapArg.entrySet()) { - if (!(entry.getKey() instanceof String propName)) { - throw new ValidationException("Map keys must be strings"); - } - List propPathToItem = new ArrayList<>(data.validationMetadata().pathToItem()); - propPathToItem.add(propName); - if (knownPathToSchemas.containsKey(propPathToItem)) { - continue; - } - @Nullable Object propValue = mapArg.get(propName); - ValidationMetadata propValidationMetadata = new ValidationMetadata( - propPathToItem, - data.validationMetadata().configuration(), - data.validationMetadata().validatedPathToSchemas(), - data.validationMetadata().seenClasses() - ); - PathToSchemasMap otherPathToSchemas = JsonSchema.validate(unevaluatedPropertiesSchema, propValue, propValidationMetadata); - pathToSchemas.update(otherPathToSchemas); - } - return pathToSchemas; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java deleted file mode 100644 index 4a3564200ca..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UniqueItemsValidator.java +++ /dev/null @@ -1,35 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.exceptions.ValidationException; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class UniqueItemsValidator implements KeywordValidator { - @Override - public @Nullable PathToSchemasMap validate( - ValidationData data - ) throws ValidationException { - var uniqueItems = data.schema().uniqueItems; - if (uniqueItems == null) { - return null; - } - if (!(data.arg() instanceof List listArg)) { - return null; - } - if (!uniqueItems) { - return null; - } - Set<@Nullable Object> seenItems = new HashSet<>(); - for (@Nullable Object item: listArg) { - int startingSeenItemsSize = seenItems.size(); - seenItems.add(item); - if (seenItems.size() == startingSeenItemsSize) { - throw new ValidationException("Invalid list value, list contains duplicate items when uniqueItems is true"); - } - } - return null; - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java deleted file mode 100644 index 33208f7d7c5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/UnsetAnyTypeJsonSchema.java +++ /dev/null @@ -1,302 +0,0 @@ -package unit_test_api.schemas.validation; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.HashSet; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -public class UnsetAnyTypeJsonSchema { - public sealed interface UnsetAnyTypeJsonSchema1Boxed permits UnsetAnyTypeJsonSchema1BoxedVoid, UnsetAnyTypeJsonSchema1BoxedBoolean, UnsetAnyTypeJsonSchema1BoxedNumber, UnsetAnyTypeJsonSchema1BoxedString, UnsetAnyTypeJsonSchema1BoxedList, UnsetAnyTypeJsonSchema1BoxedMap { - @Nullable Object getData(); - } - public record UnsetAnyTypeJsonSchema1BoxedVoid(Void data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record UnsetAnyTypeJsonSchema1BoxedBoolean(boolean data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record UnsetAnyTypeJsonSchema1BoxedNumber(Number data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record UnsetAnyTypeJsonSchema1BoxedString(String data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record UnsetAnyTypeJsonSchema1BoxedList(FrozenList<@Nullable Object> data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public record UnsetAnyTypeJsonSchema1BoxedMap(FrozenMap<@Nullable Object> data) implements UnsetAnyTypeJsonSchema1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - public static class UnsetAnyTypeJsonSchema1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, UnsetAnyTypeJsonSchema1BoxedList>, MapSchemaValidator, UnsetAnyTypeJsonSchema1BoxedMap> { - private static @Nullable UnsetAnyTypeJsonSchema1 instance = null; - - protected UnsetAnyTypeJsonSchema1() { - super(new JsonSchemaInfo()); - } - - public static UnsetAnyTypeJsonSchema1 getInstance() { - if (instance == null) { - instance = new UnsetAnyTypeJsonSchema1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(castItem); - i += 1; - } - return new FrozenList<>(items); - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedVoid(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedBoolean(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedNumber(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedString(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedList(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new UnsetAnyTypeJsonSchema1BoxedMap(validate(arg, configuration)); - } - - @Override - public UnsetAnyTypeJsonSchema1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java deleted file mode 100644 index 9efd4f0373c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationData.java +++ /dev/null @@ -1,23 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.List; - -public record ValidationData( - JsonSchema schema, - @Nullable Object arg, - ValidationMetadata validationMetadata, - @Nullable List containsPathToSchemas, - @Nullable PathToSchemasMap patternPropertiesPathToSchemas, - @Nullable PathToSchemasMap ifPathToSchemas, - @Nullable PathToSchemasMap knownPathToSchemas -) { - public ValidationData( - JsonSchema schema, - @Nullable Object arg, - ValidationMetadata validationMetadata - ) { - this(schema, arg, validationMetadata, null, null, null, null); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java deleted file mode 100644 index 98d270ed4bc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/schemas/validation/ValidationMetadata.java +++ /dev/null @@ -1,26 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import unit_test_api.configurations.SchemaConfiguration; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public record ValidationMetadata( - List pathToItem, - SchemaConfiguration configuration, - PathToSchemasMap validatedPathToSchemas, - Set> seenClasses -) { - - public boolean validationRanEarlier(JsonSchema schema) { - @Nullable Map, Void> validatedSchemas = validatedPathToSchemas.get(pathToItem); - if (validatedSchemas != null && validatedSchemas.containsKey(schema)) { - return true; - } - if (seenClasses.contains(schema)) { - return true; - } - return false; - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java deleted file mode 100644 index 063ed64de80..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/RootServer0.java +++ /dev/null @@ -1,9 +0,0 @@ -package unit_test_api.servers; - -import unit_test_api.servers.ServerWithoutVariables; - -public class RootServer0 extends ServerWithoutVariables { - public RootServer0() { - super("https://someserver.com/v1"); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java deleted file mode 100644 index a3bd3e92c99..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/Server.java +++ /dev/null @@ -1,6 +0,0 @@ -package unit_test_api.servers; - -public interface Server { - String url(); -} - diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java deleted file mode 100644 index 3e42c153a6d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerProvider.java +++ /dev/null @@ -1,6 +0,0 @@ -package unit_test_api.servers; - -public interface ServerProvider { - Server getServer(T serverIndex); -} - diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java deleted file mode 100644 index c6c1ad29e1d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithVariables.java +++ /dev/null @@ -1,21 +0,0 @@ -package unit_test_api.servers; - -import java.util.Map; - -public abstract class ServerWithVariables> implements Server { - public final String url; - public final T variables; - - protected ServerWithVariables(String url, T variables) { - this.variables = variables; - for (Map.Entry entry: variables.entrySet()) { - url = url.replace("{" + entry.getKey() + "}", entry.getValue()); - } - this.url = url; - } - - public String url(){ - return url; - } -} - diff --git a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java b/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java deleted file mode 100644 index 431f2c70e9f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/main/java/unit_test_api/servers/ServerWithoutVariables.java +++ /dev/null @@ -1,14 +0,0 @@ -package unit_test_api.servers; - -public abstract class ServerWithoutVariables implements Server { - public final String url; - - protected ServerWithoutVariables(String url) { - this.url = url; - } - - public String url(){ - return url; - } -} - From 2dd672cdc066712b6ca7a8ad9d254cc693c34e0c Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:13:45 -0700 Subject: [PATCH 39/44] Removes other unsed folder --- .../ASchemaGivenForPrefixitemsTest.java | 115 ---- ...dditionalItemsAreAllowedByDefaultTest.java | 35 - ...onalpropertiesAreAllowedByDefaultTest.java | 41 -- ...itionalpropertiesCanExistByItselfTest.java | 53 -- ...ropertiesDoesNotLookInApplicatorsTest.java | 42 -- ...sWithNullValuedInstancePropertiesTest.java | 33 - .../AdditionalpropertiesWithSchemaTest.java | 84 --- .../AllofCombinedWithAnyofOneofTest.java | 133 ---- .../schemas/AllofSimpleTypesTest.java | 43 -- .../components/schemas/AllofTest.java | 101 --- .../schemas/AllofWithBaseSchemaTest.java | 133 ---- .../schemas/AllofWithOneEmptySchemaTest.java | 28 - .../AllofWithTheFirstEmptySchemaTest.java | 43 -- .../AllofWithTheLastEmptySchemaTest.java | 43 -- .../schemas/AllofWithTwoEmptySchemasTest.java | 28 - .../schemas/AnyofComplexTypesTest.java | 91 --- .../components/schemas/AnyofTest.java | 63 -- .../schemas/AnyofWithBaseSchemaTest.java | 58 -- .../schemas/AnyofWithOneEmptySchemaTest.java | 38 -- .../schemas/ArrayTypeMatchesArraysTest.java | 120 ---- .../BooleanTypeMatchesBooleansTest.java | 160 ----- .../components/schemas/ByIntTest.java | 53 -- .../components/schemas/ByNumberTest.java | 53 -- .../components/schemas/BySmallNumberTest.java | 43 -- .../ConstNulCharactersInStringsTest.java | 43 -- .../ContainsKeywordValidationTest.java | 107 --- .../ContainsWithNullInstanceElementsTest.java | 30 - .../components/schemas/DateFormatTest.java | 90 --- .../schemas/DateTimeFormatTest.java | 90 --- ...DependenciesWithEscapedCharactersTest.java | 114 ---- ...dentSubschemaIncompatibleWithRootTest.java | 92 --- .../DependentSchemasSingleDependencyTest.java | 156 ----- .../schemas/DurationFormatTest.java | 90 --- .../components/schemas/EmailFormatTest.java | 90 --- .../schemas/EmptyDependentsTest.java | 54 -- .../EnumWith0DoesNotMatchFalseTest.java | 53 -- .../EnumWith1DoesNotMatchTrueTest.java | 53 -- .../EnumWithEscapedCharactersTest.java | 53 -- .../EnumWithFalseDoesNotMatch0Test.java | 58 -- .../EnumWithTrueDoesNotMatch1Test.java | 58 -- .../schemas/EnumsInPropertiesTest.java | 136 ---- .../ExclusivemaximumValidationTest.java | 68 -- .../ExclusiveminimumValidationTest.java | 68 -- .../schemas/FloatDivisionInfTest.java | 33 - .../schemas/ForbiddenPropertyTest.java | 61 -- .../schemas/HostnameFormatTest.java | 90 --- .../schemas/IdnEmailFormatTest.java | 90 --- .../schemas/IdnHostnameFormatTest.java | 90 --- .../schemas/IfAndElseWithoutThenTest.java | 53 -- .../schemas/IfAndThenWithoutElseTest.java | 53 -- ...rializedKeywordProcessingSequenceTest.java | 68 -- .../schemas/IgnoreElseWithoutIfTest.java | 38 -- .../IgnoreIfWithoutThenOrElseTest.java | 38 -- .../schemas/IgnoreThenWithoutIfTest.java | 38 -- .../IntegerTypeMatchesIntegersTest.java | 145 ---- .../components/schemas/Ipv4FormatTest.java | 90 --- .../components/schemas/Ipv6FormatTest.java | 90 --- .../components/schemas/IriFormatTest.java | 90 --- .../schemas/IriReferenceFormatTest.java | 90 --- .../components/schemas/ItemsContainsTest.java | 89 --- ...DoesNotLookInApplicatorsValidCaseTest.java | 51 -- .../ItemsWithNullInstanceElementsTest.java | 31 - .../schemas/JsonPointerFormatTest.java | 90 --- ...xcontainsWithoutContainsIsIgnoredTest.java | 43 -- .../schemas/MaximumValidationTest.java | 63 -- ...imumValidationWithUnsignedIntegerTest.java | 63 -- .../schemas/MaxitemsValidationTest.java | 72 -- .../schemas/MaxlengthValidationTest.java | 73 -- ...xproperties0MeansTheObjectIsEmptyTest.java | 49 -- .../schemas/MaxpropertiesValidationTest.java | 114 ---- ...ncontainsWithoutContainsIsIgnoredTest.java | 41 -- .../schemas/MinimumValidationTest.java | 63 -- ...inimumValidationWithSignedIntegerTest.java | 98 --- .../schemas/MinitemsValidationTest.java | 69 -- .../schemas/MinlengthValidationTest.java | 78 --- .../schemas/MinpropertiesValidationTest.java | 99 --- .../MultipleDependentsRequiredTest.java | 139 ---- ...eousPatternpropertiesAreValidatedTest.java | 131 ---- ...tipleTypesCanBeSpecifiedInAnArrayTest.java | 115 ---- ...edAllofToCheckValidationSemanticsTest.java | 43 -- ...edAnyofToCheckValidationSemanticsTest.java | 43 -- .../components/schemas/NestedItemsTest.java | 143 ---- ...edOneofToCheckValidationSemanticsTest.java | 43 -- ...iiPatternWithAdditionalpropertiesTest.java | 53 -- ...InterferenceAcrossCombinedSchemasTest.java | 38 -- .../schemas/NotMoreComplexSchemaTest.java | 63 -- .../schemas/NotMultipleTypesTest.java | 58 -- .../components/schemas/NotTest.java | 43 -- .../schemas/NulCharactersInStringsTest.java | 43 -- .../NullTypeMatchesOnlyTheNullObjectTest.java | 165 ----- .../schemas/NumberTypeMatchesNumbersTest.java | 140 ---- .../ObjectPropertiesValidationTest.java | 125 ---- .../schemas/ObjectTypeMatchesObjectsTest.java | 120 ---- .../schemas/OneofComplexTypesTest.java | 96 --- .../components/schemas/OneofTest.java | 68 -- .../schemas/OneofWithBaseSchemaTest.java | 58 -- .../schemas/OneofWithEmptySchemaTest.java | 43 -- .../schemas/OneofWithRequiredTest.java | 104 --- .../schemas/PatternIsNotAnchoredTest.java | 28 - .../schemas/PatternValidationTest.java | 105 --- ...ValidatesPropertiesMatchingARegexTest.java | 132 ---- ...sWithNullValuedInstancePropertiesTest.java | 33 - ...onAdjustsTheStartingIndexForItemsTest.java | 53 -- ...efixitemsWithNullInstanceElementsTest.java | 31 - ...esAdditionalpropertiesInteractionTest.java | 172 ----- ...sAreJavascriptObjectPropertyNamesTest.java | 148 ----- .../PropertiesWithEscapedCharactersTest.java | 93 --- ...sWithNullValuedInstancePropertiesTest.java | 33 - ...opertyNamedRefThatIsNotAReferenceTest.java | 53 -- .../schemas/PropertynamesValidationTest.java | 111 ---- .../components/schemas/RegexFormatTest.java | 90 --- ...horedByDefaultAndAreCaseSensitiveTest.java | 88 --- .../RelativeJsonPointerFormatTest.java | 90 --- .../RequiredDefaultValidationTest.java | 29 - ...sAreJavascriptObjectPropertyNamesTest.java | 153 ----- .../schemas/RequiredValidationTest.java | 84 --- .../schemas/RequiredWithEmptyArrayTest.java | 29 - .../RequiredWithEscapedCharactersTest.java | 77 --- .../schemas/SimpleEnumValidationTest.java | 43 -- .../schemas/SingleDependencyTest.java | 115 ---- .../SmallMultipleOfLargeIntegerTest.java | 28 - .../schemas/StringTypeMatchesStringsTest.java | 140 ---- .../components/schemas/TimeFormatTest.java | 90 --- .../schemas/TypeArrayObjectOrNullTest.java | 87 --- .../schemas/TypeArrayOrObjectTest.java | 92 --- .../schemas/TypeAsArrayWithOneItemTest.java | 43 -- .../schemas/UnevaluateditemsAsSchemaTest.java | 58 -- ...msDependsOnMultipleNestedContainsTest.java | 55 -- .../UnevaluateditemsWithItemsTest.java | 56 -- ...ateditemsWithNullInstanceElementsTest.java | 30 - ...pertiesNotAffectedByPropertynamesTest.java | 53 -- .../UnevaluatedpropertiesSchemaTest.java | 64 -- ...sWithAdjacentAdditionalpropertiesTest.java | 52 -- ...sWithNullValuedInstancePropertiesTest.java | 33 - .../UniqueitemsFalseValidationTest.java | 316 --------- ...niqueitemsFalseWithAnArrayOfItemsTest.java | 154 ----- .../schemas/UniqueitemsValidationTest.java | 627 ------------------ .../UniqueitemsWithAnArrayOfItemsTest.java | 162 ----- .../components/schemas/UriFormatTest.java | 90 --- .../schemas/UriReferenceFormatTest.java | 90 --- .../schemas/UriTemplateFormatTest.java | 90 --- .../components/schemas/UuidFormatTest.java | 90 --- ...ateAgainstCorrectBranchThenVsElseTest.java | 68 -- .../JsonSchemaKeywordFlagsTest.java | 143 ---- .../header/ContentHeaderTest.java | 120 ---- .../header/SchemaHeaderTest.java | 162 ----- .../parameter/CookieSerializerTest.java | 45 -- .../parameter/HeadersSerializerTest.java | 49 -- .../parameter/PathSerializerTest.java | 46 -- .../parameter/QuerySerializerTest.java | 52 -- .../SchemaNonQueryParameterTest.java | 397 ----------- .../parameter/SchemaQueryParameterTest.java | 193 ------ .../RequestBodySerializerTest.java | 181 ----- .../response/ResponseDeserializerTest.java | 248 ------- .../schemas/AnyTypeSchemaTest.java | 106 --- .../schemas/ArrayTypeSchemaTest.java | 252 ------- .../schemas/BooleanSchemaTest.java | 45 -- .../schemas/ListBuilderTest.java | 61 -- .../unit_test_api/schemas/ListSchemaTest.java | 46 -- .../unit_test_api/schemas/MapSchemaTest.java | 48 -- .../unit_test_api/schemas/NullSchemaTest.java | 41 -- .../schemas/NumberSchemaTest.java | 57 -- .../schemas/ObjectTypeSchemaTest.java | 538 --------------- .../schemas/RefBooleanSchemaTest.java | 49 -- .../AdditionalPropertiesValidatorTest.java | 149 ----- .../validation/CustomIsoparserTest.java | 28 - .../validation/FormatValidatorTest.java | 363 ---------- .../validation/ItemsValidatorTest.java | 131 ---- .../schemas/validation/JsonSchemaTest.java | 80 --- .../validation/PropertiesValidatorTest.java | 134 ---- .../validation/RequiredValidatorTest.java | 120 ---- .../schemas/validation/TypeValidatorTest.java | 56 -- 172 files changed, 15652 deletions(-) delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java delete mode 100644 samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java deleted file mode 100644 index 284488267bd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ASchemaGivenForPrefixitemsTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ASchemaGivenForPrefixitemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testCorrectTypesPasses() throws ValidationException { - // correct types - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - schema.validate( - new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() - .add(1) - - .add("foo") - - .build(), - configuration - ); - } - - @Test - public void testArrayWithAdditionalItemsPasses() throws ValidationException { - // array with additional items - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - schema.validate( - new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() - .add(1) - - .add("foo") - - .add(true) - - .build(), - configuration - ); - } - - @Test - public void testJavascriptPseudoArrayIsValidPasses() throws ValidationException { - // JavaScript pseudo-array is valid - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "0", - "invalid" - ), - new AbstractMap.SimpleEntry( - "1", - "valid" - ), - new AbstractMap.SimpleEntry( - "length", - 2 - ) - ), - configuration - ); - } - - @Test - public void testEmptyArrayPasses() throws ValidationException { - // empty array - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - schema.validate( - new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() - .build(), - configuration - ); - } - - @Test - public void testWrongTypesFails() { - // wrong types - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - try { - schema.validate( - Arrays.asList( - "foo", - 1 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIncompleteArrayOfItemsPasses() throws ValidationException { - // incomplete array of items - final var schema = ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitems1.getInstance(); - schema.validate( - new ASchemaGivenForPrefixitems.ASchemaGivenForPrefixitemsListBuilder() - .add(1) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java deleted file mode 100644 index 6750fb0ea73..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalItemsAreAllowedByDefaultTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalItemsAreAllowedByDefaultTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOnlyTheFirstItemIsValidatedPasses() throws ValidationException { - // only the first item is validated - final var schema = AdditionalItemsAreAllowedByDefault.AdditionalItemsAreAllowedByDefault1.getInstance(); - schema.validate( - new AdditionalItemsAreAllowedByDefault.AdditionalItemsAreAllowedByDefaultListBuilder() - .add(1) - - .add("foo") - - .add(false) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java deleted file mode 100644 index 1ca80dd4a8b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesAreAllowedByDefaultTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalpropertiesAreAllowedByDefaultTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAdditionalPropertiesAreAllowedPasses() throws ValidationException { - // additional properties are allowed - final var schema = AdditionalpropertiesAreAllowedByDefault.AdditionalpropertiesAreAllowedByDefault1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "quux", - true - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java deleted file mode 100644 index b3f8c364660..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesCanExistByItselfTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalpropertiesCanExistByItselfTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnAdditionalValidPropertyIsValidPasses() throws ValidationException { - // an additional valid property is valid - final var schema = AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - true - ) - ), - configuration - ); - } - - @Test - public void testAnAdditionalInvalidPropertyIsInvalidFails() { - // an additional invalid property is invalid - final var schema = AdditionalpropertiesCanExistByItself.AdditionalpropertiesCanExistByItself1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java deleted file mode 100644 index 3f265078383..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesDoesNotLookInApplicatorsTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalpropertiesDoesNotLookInApplicatorsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPropertiesDefinedInAllofAreNotExaminedFails() { - // properties defined in allOf are not examined - final var schema = AdditionalpropertiesDoesNotLookInApplicators.AdditionalpropertiesDoesNotLookInApplicators1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - true - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java deleted file mode 100644 index 20c6b20f13a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithNullValuedInstancePropertiesTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalpropertiesWithNullValuedInstancePropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullValuesPasses() throws ValidationException { - // allows null values - final var schema = AdditionalpropertiesWithNullValuedInstanceProperties.AdditionalpropertiesWithNullValuedInstanceProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - null - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java deleted file mode 100644 index faa04d2d50e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AdditionalpropertiesWithSchemaTest.java +++ /dev/null @@ -1,84 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AdditionalpropertiesWithSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNoAdditionalPropertiesIsValidPasses() throws ValidationException { - // no additional properties is valid - final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testAnAdditionalValidPropertyIsValidPasses() throws ValidationException { - // an additional valid property is valid - final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "quux", - true - ) - ), - configuration - ); - } - - @Test - public void testAnAdditionalInvalidPropertyIsInvalidFails() { - // an additional invalid property is invalid - final var schema = AdditionalpropertiesWithSchema.AdditionalpropertiesWithSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "quux", - 12 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java deleted file mode 100644 index 37a7b07fdcf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofCombinedWithAnyofOneofTest.java +++ /dev/null @@ -1,133 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofCombinedWithAnyofOneofTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllofFalseAnyofFalseOneofTrueFails() { - // allOf: false, anyOf: false, oneOf: true - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 5, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofFalseAnyofTrueOneofFalseFails() { - // allOf: false, anyOf: true, oneOf: false - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofFalseAnyofTrueOneofTrueFails() { - // allOf: false, anyOf: true, oneOf: true - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 15, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofTrueAnyofFalseOneofFalseFails() { - // allOf: true, anyOf: false, oneOf: false - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 2, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofTrueAnyofTrueOneofTruePasses() throws ValidationException { - // allOf: true, anyOf: true, oneOf: true - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - schema.validate( - 30, - configuration - ); - } - - @Test - public void testAllofFalseAnyofFalseOneofFalseFails() { - // allOf: false, anyOf: false, oneOf: false - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofTrueAnyofFalseOneofTrueFails() { - // allOf: true, anyOf: false, oneOf: true - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 10, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofTrueAnyofTrueOneofFalseFails() { - // allOf: true, anyOf: true, oneOf: false - final var schema = AllofCombinedWithAnyofOneof.AllofCombinedWithAnyofOneof1.getInstance(); - try { - schema.validate( - 6, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java deleted file mode 100644 index 2efe38bccbb..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofSimpleTypesTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofSimpleTypesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMismatchOneFails() { - // mismatch one - final var schema = AllofSimpleTypes.AllofSimpleTypes1.getInstance(); - try { - schema.validate( - 35, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidPasses() throws ValidationException { - // valid - final var schema = AllofSimpleTypes.AllofSimpleTypes1.getInstance(); - schema.validate( - 25, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java deleted file mode 100644 index 1c2adfcf3d3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMismatchSecondFails() { - // mismatch second - final var schema = Allof.Allof1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testWrongTypeFails() { - // wrong type - final var schema = Allof.Allof1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ), - new AbstractMap.SimpleEntry( - "bar", - "quux" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMismatchFirstFails() { - // mismatch first - final var schema = Allof.Allof1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllofPasses() throws ValidationException { - // allOf - final var schema = Allof.Allof1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java deleted file mode 100644 index 73a7742da36..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithBaseSchemaTest.java +++ /dev/null @@ -1,133 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofWithBaseSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMismatchBaseSchemaFails() { - // mismatch base schema - final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ), - new AbstractMap.SimpleEntry( - "baz", - null - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMismatchFirstAllofFails() { - // mismatch first allOf - final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "baz", - null - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidPasses() throws ValidationException { - // valid - final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "baz", - null - ) - ), - configuration - ); - } - - @Test - public void testMismatchBothFails() { - // mismatch both - final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMismatchSecondAllofFails() { - // mismatch second allOf - final var schema = AllofWithBaseSchema.AllofWithBaseSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java deleted file mode 100644 index 877f130f10c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithOneEmptySchemaTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofWithOneEmptySchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnyDataIsValidPasses() throws ValidationException { - // any data is valid - final var schema = AllofWithOneEmptySchema.AllofWithOneEmptySchema1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java deleted file mode 100644 index 73b94d2e4c2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheFirstEmptySchemaTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofWithTheFirstEmptySchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testStringIsInvalidFails() { - // string is invalid - final var schema = AllofWithTheFirstEmptySchema.AllofWithTheFirstEmptySchema1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNumberIsValidPasses() throws ValidationException { - // number is valid - final var schema = AllofWithTheFirstEmptySchema.AllofWithTheFirstEmptySchema1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java deleted file mode 100644 index d033bafa948..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTheLastEmptySchemaTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofWithTheLastEmptySchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testStringIsInvalidFails() { - // string is invalid - final var schema = AllofWithTheLastEmptySchema.AllofWithTheLastEmptySchema1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNumberIsValidPasses() throws ValidationException { - // number is valid - final var schema = AllofWithTheLastEmptySchema.AllofWithTheLastEmptySchema1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java deleted file mode 100644 index 985a293c0de..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AllofWithTwoEmptySchemasTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AllofWithTwoEmptySchemasTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnyDataIsValidPasses() throws ValidationException { - // any data is valid - final var schema = AllofWithTwoEmptySchemas.AllofWithTwoEmptySchemas1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java deleted file mode 100644 index dfb86cfd747..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofComplexTypesTest.java +++ /dev/null @@ -1,91 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AnyofComplexTypesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testSecondAnyofValidComplexPasses() throws ValidationException { - // second anyOf valid (complex) - final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ) - ), - configuration - ); - } - - @Test - public void testBothAnyofValidComplexPasses() throws ValidationException { - // both anyOf valid (complex) - final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testFirstAnyofValidComplexPasses() throws ValidationException { - // first anyOf valid (complex) - final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testNeitherAnyofValidComplexFails() { - // neither anyOf valid (complex) - final var schema = AnyofComplexTypes.AnyofComplexTypes1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 2 - ), - new AbstractMap.SimpleEntry( - "bar", - "quux" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java deleted file mode 100644 index 297306c4fee..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AnyofTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBothAnyofValidPasses() throws ValidationException { - // both anyOf valid - final var schema = Anyof.Anyof1.getInstance(); - schema.validate( - 3, - configuration - ); - } - - @Test - public void testNeitherAnyofValidFails() { - // neither anyOf valid - final var schema = Anyof.Anyof1.getInstance(); - try { - schema.validate( - 1.5d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFirstAnyofValidPasses() throws ValidationException { - // first anyOf valid - final var schema = Anyof.Anyof1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testSecondAnyofValidPasses() throws ValidationException { - // second anyOf valid - final var schema = Anyof.Anyof1.getInstance(); - schema.validate( - 2.5d, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java deleted file mode 100644 index 3b59f10f89a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithBaseSchemaTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AnyofWithBaseSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMismatchBaseSchemaFails() { - // mismatch base schema - final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testOneAnyofValidPasses() throws ValidationException { - // one anyOf valid - final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } - - @Test - public void testBothAnyofInvalidFails() { - // both anyOf invalid - final var schema = AnyofWithBaseSchema.AnyofWithBaseSchema1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java deleted file mode 100644 index 8f3047bded0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/AnyofWithOneEmptySchemaTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class AnyofWithOneEmptySchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNumberIsValidPasses() throws ValidationException { - // number is valid - final var schema = AnyofWithOneEmptySchema.AnyofWithOneEmptySchema1.getInstance(); - schema.validate( - 123, - configuration - ); - } - - @Test - public void testStringIsValidPasses() throws ValidationException { - // string is valid - final var schema = AnyofWithOneEmptySchema.AnyofWithOneEmptySchema1.getInstance(); - schema.validate( - "foo", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java deleted file mode 100644 index daffbe914bd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ArrayTypeMatchesArraysTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ArrayTypeMatchesArraysTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testABooleanIsNotAnArrayFails() { - // a boolean is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatIsNotAnArrayFails() { - // a float is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnArrayIsAnArrayPasses() throws ValidationException { - // an array is an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testNullIsNotAnArrayFails() { - // null is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsNotAnArrayFails() { - // a string is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsNotAnArrayFails() { - // an integer is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnObjectIsNotAnArrayFails() { - // an object is not an array - final var schema = ArrayTypeMatchesArrays.ArrayTypeMatchesArrays1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java deleted file mode 100644 index 3df1dedc7a2..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BooleanTypeMatchesBooleansTest.java +++ /dev/null @@ -1,160 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class BooleanTypeMatchesBooleansTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAFloatIsNotABooleanFails() { - // a float is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsNotABooleanFails() { - // a string is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFalseIsABooleanPasses() throws ValidationException { - // false is a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - schema.validate( - false, - configuration - ); - } - - @Test - public void testTrueIsABooleanPasses() throws ValidationException { - // true is a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - schema.validate( - true, - configuration - ); - } - - @Test - public void testAnObjectIsNotABooleanFails() { - // an object is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnArrayIsNotABooleanFails() { - // an array is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsNotABooleanFails() { - // null is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsNotABooleanFails() { - // an integer is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testZeroIsNotABooleanFails() { - // zero is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - 0, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnEmptyStringIsNotABooleanFails() { - // an empty string is not a boolean - final var schema = BooleanTypeMatchesBooleans.BooleanTypeMatchesBooleans1.getInstance(); - try { - schema.validate( - "", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java deleted file mode 100644 index 7d8e5c050c1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByIntTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ByIntTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testIntByIntFailFails() { - // int by int fail - final var schema = ByInt.ByInt1.getInstance(); - try { - schema.validate( - 7, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIntByIntPasses() throws ValidationException { - // int by int - final var schema = ByInt.ByInt1.getInstance(); - schema.validate( - 10, - configuration - ); - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = ByInt.ByInt1.getInstance(); - schema.validate( - "foo", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java deleted file mode 100644 index 57acee70500..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ByNumberTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ByNumberTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void test35IsNotMultipleOf15Fails() { - // 35 is not multiple of 1.5 - final var schema = ByNumber.ByNumber1.getInstance(); - try { - schema.validate( - 35, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void test45IsMultipleOf15Passes() throws ValidationException { - // 4.5 is multiple of 1.5 - final var schema = ByNumber.ByNumber1.getInstance(); - schema.validate( - 4.5d, - configuration - ); - } - - @Test - public void testZeroIsMultipleOfAnythingPasses() throws ValidationException { - // zero is multiple of anything - final var schema = ByNumber.ByNumber1.getInstance(); - schema.validate( - 0, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java deleted file mode 100644 index 36b5c58ddf9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/BySmallNumberTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class BySmallNumberTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void test000751IsNotMultipleOf00001Fails() { - // 0.00751 is not multiple of 0.0001 - final var schema = BySmallNumber.BySmallNumber1.getInstance(); - try { - schema.validate( - 0.00751d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void test00075IsMultipleOf00001Passes() throws ValidationException { - // 0.0075 is multiple of 0.0001 - final var schema = BySmallNumber.BySmallNumber1.getInstance(); - schema.validate( - 0.0075d, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java deleted file mode 100644 index 70ef56e92e9..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ConstNulCharactersInStringsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ConstNulCharactersInStringsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMatchStringWithNulPasses() throws ValidationException { - // match string with nul - final var schema = ConstNulCharactersInStrings.ConstNulCharactersInStrings1.getInstance(); - schema.validate( - "hello\0there", - configuration - ); - } - - @Test - public void testDoNotMatchStringLackingNulFails() { - // do not match string lacking nul - final var schema = ConstNulCharactersInStrings.ConstNulCharactersInStrings1.getInstance(); - try { - schema.validate( - "hellothere", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java deleted file mode 100644 index acc3e61153d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsKeywordValidationTest.java +++ /dev/null @@ -1,107 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ContainsKeywordValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testArrayWithTwoItemsMatchingSchema56IsValidPasses() throws ValidationException { - // array with two items matching schema (5, 6) is valid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - schema.validate( - Arrays.asList( - 3, - 4, - 5, - 6 - ), - configuration - ); - } - - @Test - public void testNotArrayIsValidPasses() throws ValidationException { - // not array is valid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testArrayWithItemMatchingSchema5IsValidPasses() throws ValidationException { - // array with item matching schema (5) is valid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - schema.validate( - Arrays.asList( - 3, - 4, - 5 - ), - configuration - ); - } - - @Test - public void testArrayWithItemMatchingSchema6IsValidPasses() throws ValidationException { - // array with item matching schema (6) is valid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - schema.validate( - Arrays.asList( - 3, - 4, - 6 - ), - configuration - ); - } - - @Test - public void testArrayWithoutItemsMatchingSchemaIsInvalidFails() { - // array without items matching schema is invalid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - 2, - 3, - 4 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testEmptyArrayIsInvalidFails() { - // empty array is invalid - final var schema = ContainsKeywordValidation.ContainsKeywordValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java deleted file mode 100644 index faaa8d9007e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ContainsWithNullInstanceElementsTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ContainsWithNullInstanceElementsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullItemsPasses() throws ValidationException { - // allows null items - final var schema = ContainsWithNullInstanceElements.ContainsWithNullInstanceElements1.getInstance(); - schema.validate( - Arrays.asList( - (Void) null - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java deleted file mode 100644 index 4739c6aa31e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DateFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidDateStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid date string is only an annotation by default - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - "06/19/1963", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = DateFormat.DateFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java deleted file mode 100644 index 0840d217dfe..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DateTimeFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DateTimeFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testInvalidDateTimeStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid date-time string is only an annotation by default - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - "1990-02-31T15:59:60.123-08:00", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = DateTimeFormat.DateTimeFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java deleted file mode 100644 index fa02edb7b36..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependenciesWithEscapedCharactersTest.java +++ /dev/null @@ -1,114 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DependentSchemasDependenciesWithEscapedCharactersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testQuotedQuoteInvalidUnderDependentSchemaFails() { - // quoted quote invalid under dependent schema - final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo'bar", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testQuotedTabInvalidUnderDependentSchemaFails() { - // quoted tab invalid under dependent schema - final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\tbar", - 1 - ), - new AbstractMap.SimpleEntry( - "a", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testQuotedTabPasses() throws ValidationException { - // quoted tab - final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\tbar", - 1 - ), - new AbstractMap.SimpleEntry( - "a", - 2 - ), - new AbstractMap.SimpleEntry( - "b", - 3 - ), - new AbstractMap.SimpleEntry( - "c", - 4 - ) - ), - configuration - ); - } - - @Test - public void testQuotedQuoteFails() { - // quoted quote - final var schema = DependentSchemasDependenciesWithEscapedCharacters.DependentSchemasDependenciesWithEscapedCharacters1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo'bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\"bar", - 1 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java deleted file mode 100644 index bdf3892da3f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasDependentSubschemaIncompatibleWithRootTest.java +++ /dev/null @@ -1,92 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DependentSchemasDependentSubschemaIncompatibleWithRootTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMatchesRootFails() { - // matches root - final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMatchesDependencyPasses() throws ValidationException { - // matches dependency - final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 1 - ) - ), - configuration - ); - } - - @Test - public void testNoDependencyPasses() throws ValidationException { - // no dependency - final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - 1 - ) - ), - configuration - ); - } - - @Test - public void testMatchesBothFails() { - // matches both - final var schema = DependentSchemasDependentSubschemaIncompatibleWithRoot.DependentSchemasDependentSubschemaIncompatibleWithRoot1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java deleted file mode 100644 index 45f4324fc8c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DependentSchemasSingleDependencyTest.java +++ /dev/null @@ -1,156 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DependentSchemasSingleDependencyTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testWrongTypeFails() { - // wrong type - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidPasses() throws ValidationException { - // valid - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testNoDependencyPasses() throws ValidationException { - // no dependency - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ) - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - schema.validate( - Arrays.asList( - "bar" - ), - configuration - ); - } - - @Test - public void testWrongTypeBothFails() { - // wrong type both - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "quux" - ), - new AbstractMap.SimpleEntry( - "bar", - "quux" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } - - @Test - public void testWrongTypeOtherFails() { - // wrong type other - final var schema = DependentSchemasSingleDependency.DependentSchemasSingleDependency1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 2 - ), - new AbstractMap.SimpleEntry( - "bar", - "quux" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java deleted file mode 100644 index cc8121dcb2d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/DurationFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class DurationFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidDurationStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid duration string is only an annotation by default - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - "PT1D", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = DurationFormat.DurationFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java deleted file mode 100644 index f3c32e469cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmailFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EmailFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidEmailStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid email string is only an annotation by default - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - "2962", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = EmailFormat.EmailFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java deleted file mode 100644 index c45e66c5684..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EmptyDependentsTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EmptyDependentsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testEmptyObjectPasses() throws ValidationException { - // empty object - final var schema = EmptyDependents.EmptyDependents1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testNonObjectIsValidPasses() throws ValidationException { - // non-object is valid - final var schema = EmptyDependents.EmptyDependents1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testObjectWithOnePropertyPasses() throws ValidationException { - // object with one property - final var schema = EmptyDependents.EmptyDependents1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java deleted file mode 100644 index f9a055bd3e0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith0DoesNotMatchFalseTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumWith0DoesNotMatchFalseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testFloatZeroIsValidPasses() throws ValidationException { - // float zero is valid - final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); - schema.validate( - 0.0d, - configuration - ); - } - - @Test - public void testFalseIsInvalidFails() { - // false is invalid - final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); - try { - schema.validate( - false, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIntegerZeroIsValidPasses() throws ValidationException { - // integer zero is valid - final var schema = EnumWith0DoesNotMatchFalse.EnumWith0DoesNotMatchFalse1.getInstance(); - schema.validate( - 0, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java deleted file mode 100644 index 15f9e439f00..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWith1DoesNotMatchTrueTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumWith1DoesNotMatchTrueTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testTrueIsInvalidFails() { - // true is invalid - final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFloatOneIsValidPasses() throws ValidationException { - // float one is valid - final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); - schema.validate( - 1.0d, - configuration - ); - } - - @Test - public void testIntegerOneIsValidPasses() throws ValidationException { - // integer one is valid - final var schema = EnumWith1DoesNotMatchTrue.EnumWith1DoesNotMatchTrue1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java deleted file mode 100644 index 09ae09b1dcd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithEscapedCharactersTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumWithEscapedCharactersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnotherStringIsInvalidFails() { - // another string is invalid - final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); - try { - schema.validate( - "abc", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMember2IsValidPasses() throws ValidationException { - // member 2 is valid - final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); - schema.validate( - "foo\rbar", - configuration - ); - } - - @Test - public void testMember1IsValidPasses() throws ValidationException { - // member 1 is valid - final var schema = EnumWithEscapedCharacters.EnumWithEscapedCharacters1.getInstance(); - schema.validate( - "foo\nbar", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java deleted file mode 100644 index b68e97a99f5..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithFalseDoesNotMatch0Test.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumWithFalseDoesNotMatch0Test { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testFloatZeroIsInvalidFails() { - // float zero is invalid - final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); - try { - schema.validate( - 0.0d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFalseIsValidPasses() throws ValidationException { - // false is valid - final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); - schema.validate( - false, - configuration - ); - } - - @Test - public void testIntegerZeroIsInvalidFails() { - // integer zero is invalid - final var schema = EnumWithFalseDoesNotMatch0.EnumWithFalseDoesNotMatch01.getInstance(); - try { - schema.validate( - 0, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java deleted file mode 100644 index 18f7cacd701..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumWithTrueDoesNotMatch1Test.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumWithTrueDoesNotMatch1Test { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testFloatOneIsInvalidFails() { - // float one is invalid - final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); - try { - schema.validate( - 1.0d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIntegerOneIsInvalidFails() { - // integer one is invalid - final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testTrueIsValidPasses() throws ValidationException { - // true is valid - final var schema = EnumWithTrueDoesNotMatch1.EnumWithTrueDoesNotMatch11.getInstance(); - schema.validate( - true, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java deleted file mode 100644 index 9d0940a0f9b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/EnumsInPropertiesTest.java +++ /dev/null @@ -1,136 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class EnumsInPropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testWrongBarValueFails() { - // wrong bar value - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ), - new AbstractMap.SimpleEntry( - "bar", - "bart" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testWrongFooValueFails() { - // wrong foo value - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foot" - ), - new AbstractMap.SimpleEntry( - "bar", - "bar" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMissingAllPropertiesIsInvalidFails() { - // missing all properties is invalid - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testBothPropertiesAreValidPasses() throws ValidationException { - // both properties are valid - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ), - new AbstractMap.SimpleEntry( - "bar", - "bar" - ) - ), - configuration - ); - } - - @Test - public void testMissingOptionalPropertyIsValidPasses() throws ValidationException { - // missing optional property is valid - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - "bar" - ) - ), - configuration - ); - } - - @Test - public void testMissingRequiredPropertyIsInvalidFails() { - // missing required property is invalid - final var schema = EnumsInProperties.EnumsInProperties1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java deleted file mode 100644 index 2a88965561f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusivemaximumValidationTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ExclusivemaximumValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBelowTheExclusivemaximumIsValidPasses() throws ValidationException { - // below the exclusiveMaximum is valid - final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); - schema.validate( - 2.2d, - configuration - ); - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); - schema.validate( - "x", - configuration - ); - } - - @Test - public void testAboveTheExclusivemaximumIsInvalidFails() { - // above the exclusiveMaximum is invalid - final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); - try { - schema.validate( - 3.5d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testBoundaryPointIsInvalidFails() { - // boundary point is invalid - final var schema = ExclusivemaximumValidation.ExclusivemaximumValidation1.getInstance(); - try { - schema.validate( - 3.0d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java deleted file mode 100644 index f593db14032..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ExclusiveminimumValidationTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ExclusiveminimumValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBelowTheExclusiveminimumIsInvalidFails() { - // below the exclusiveMinimum is invalid - final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); - try { - schema.validate( - 0.6d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAboveTheExclusiveminimumIsValidPasses() throws ValidationException { - // above the exclusiveMinimum is valid - final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); - schema.validate( - 1.2d, - configuration - ); - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); - schema.validate( - "x", - configuration - ); - } - - @Test - public void testBoundaryPointIsInvalidFails() { - // boundary point is invalid - final var schema = ExclusiveminimumValidation.ExclusiveminimumValidation1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java deleted file mode 100644 index 314edb3f19e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/FloatDivisionInfTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class FloatDivisionInfTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAlwaysInvalidButNaiveImplementationsMayRaiseAnOverflowErrorFails() { - // always invalid, but naive implementations may raise an overflow error - final var schema = FloatDivisionInf.FloatDivisionInf1.getInstance(); - try { - schema.validate( - 1.0E308d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java deleted file mode 100644 index 7b8d4f21cb0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ForbiddenPropertyTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ForbiddenPropertyTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPropertyPresentFails() { - // property present - final var schema = ForbiddenProperty.ForbiddenProperty1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testPropertyAbsentPasses() throws ValidationException { - // property absent - final var schema = ForbiddenProperty.ForbiddenProperty1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 1 - ), - new AbstractMap.SimpleEntry( - "baz", - 2 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java deleted file mode 100644 index bd857a59cfe..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/HostnameFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class HostnameFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidHostnameStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid hostname string is only an annotation by default - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - "-a-host-name-that-starts-with--", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = HostnameFormat.HostnameFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java deleted file mode 100644 index 7c63e49f704..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnEmailFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IdnEmailFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidIdnEmailStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid idn-email string is only an annotation by default - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - "2962", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = IdnEmailFormat.IdnEmailFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java deleted file mode 100644 index 246539a667a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IdnHostnameFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IdnHostnameFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidIdnHostnameStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid idn-hostname string is only an annotation by default - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - "〮실례.테스트", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = IdnHostnameFormat.IdnHostnameFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java deleted file mode 100644 index 463ce7d7d7a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndElseWithoutThenTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IfAndElseWithoutThenTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidWhenIfTestPassesPasses() throws ValidationException { - // valid when if test passes - final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); - schema.validate( - -1, - configuration - ); - } - - @Test - public void testValidThroughElsePasses() throws ValidationException { - // valid through else - final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); - schema.validate( - 4, - configuration - ); - } - - @Test - public void testInvalidThroughElseFails() { - // invalid through else - final var schema = IfAndElseWithoutThen.IfAndElseWithoutThen1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java deleted file mode 100644 index 3865e1b9066..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAndThenWithoutElseTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IfAndThenWithoutElseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidThroughThenPasses() throws ValidationException { - // valid through then - final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); - schema.validate( - -1, - configuration - ); - } - - @Test - public void testInvalidThroughThenFails() { - // invalid through then - final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); - try { - schema.validate( - -100, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidWhenIfTestFailsPasses() throws ValidationException { - // valid when if test fails - final var schema = IfAndThenWithoutElse.IfAndThenWithoutElse1.getInstance(); - schema.validate( - 3, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java deleted file mode 100644 index 0c833303d13..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IfAppearsAtTheEndWhenSerializedKeywordProcessingSequenceTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testInvalidRedirectsToElseAndFailsFails() { - // invalid redirects to else and fails - final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); - try { - schema.validate( - "invalid", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testYesRedirectsToThenAndPassesPasses() throws ValidationException { - // yes redirects to then and passes - final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); - schema.validate( - "yes", - configuration - ); - } - - @Test - public void testOtherRedirectsToElseAndPassesPasses() throws ValidationException { - // other redirects to else and passes - final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); - schema.validate( - "other", - configuration - ); - } - - @Test - public void testNoRedirectsToThenAndFailsFails() { - // no redirects to then and fails - final var schema = IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence.IfAppearsAtTheEndWhenSerializedKeywordProcessingSequence1.getInstance(); - try { - schema.validate( - "no", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java deleted file mode 100644 index 2e82402dc50..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreElseWithoutIfTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IgnoreElseWithoutIfTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidWhenInvalidAgainstLoneElsePasses() throws ValidationException { - // valid when invalid against lone else - final var schema = IgnoreElseWithoutIf.IgnoreElseWithoutIf1.getInstance(); - schema.validate( - "hello", - configuration - ); - } - - @Test - public void testValidWhenValidAgainstLoneElsePasses() throws ValidationException { - // valid when valid against lone else - final var schema = IgnoreElseWithoutIf.IgnoreElseWithoutIf1.getInstance(); - schema.validate( - 0, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java deleted file mode 100644 index 2625cec629c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreIfWithoutThenOrElseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IgnoreIfWithoutThenOrElseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidWhenInvalidAgainstLoneIfPasses() throws ValidationException { - // valid when invalid against lone if - final var schema = IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1.getInstance(); - schema.validate( - "hello", - configuration - ); - } - - @Test - public void testValidWhenValidAgainstLoneIfPasses() throws ValidationException { - // valid when valid against lone if - final var schema = IgnoreIfWithoutThenOrElse.IgnoreIfWithoutThenOrElse1.getInstance(); - schema.validate( - 0, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java deleted file mode 100644 index 4303dcbe30d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IgnoreThenWithoutIfTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IgnoreThenWithoutIfTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidWhenValidAgainstLoneThenPasses() throws ValidationException { - // valid when valid against lone then - final var schema = IgnoreThenWithoutIf.IgnoreThenWithoutIf1.getInstance(); - schema.validate( - 0, - configuration - ); - } - - @Test - public void testValidWhenInvalidAgainstLoneThenPasses() throws ValidationException { - // valid when invalid against lone then - final var schema = IgnoreThenWithoutIf.IgnoreThenWithoutIf1.getInstance(); - schema.validate( - "hello", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java deleted file mode 100644 index 06c0aad43ed..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IntegerTypeMatchesIntegersTest.java +++ /dev/null @@ -1,145 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IntegerTypeMatchesIntegersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnObjectIsNotAnIntegerFails() { - // an object is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnArrayIsNotAnIntegerFails() { - // an array is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsNotAnIntegerFails() { - // null is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatWithZeroFractionalPartIsAnIntegerPasses() throws ValidationException { - // a float with zero fractional part is an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - schema.validate( - 1.0d, - configuration - ); - } - - @Test - public void testABooleanIsNotAnIntegerFails() { - // a boolean is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsStillNotAnIntegerEvenIfItLooksLikeOneFails() { - // a string is still not an integer, even if it looks like one - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - "1", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsNotAnIntegerFails() { - // a string is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsAnIntegerPasses() throws ValidationException { - // an integer is an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testAFloatIsNotAnIntegerFails() { - // a float is not an integer - final var schema = IntegerTypeMatchesIntegers.IntegerTypeMatchesIntegers1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java deleted file mode 100644 index cd26ed36e5a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv4FormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class Ipv4FormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidIpv4StringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid ipv4 string is only an annotation by default - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - "127.0.0.0.1", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = Ipv4Format.Ipv4Format1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java deleted file mode 100644 index 3d7d73ca943..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Ipv6FormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class Ipv6FormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidIpv6StringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid ipv6 string is only an annotation by default - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - "12345::", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = Ipv6Format.Ipv6Format1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java deleted file mode 100644 index 115a5e1186e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IriFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidIriStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid iri string is only an annotation by default - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = IriFormat.IriFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java deleted file mode 100644 index fa4317cf6fc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/IriReferenceFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class IriReferenceFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidIriReferenceStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid iri-reference string is only an annotation by default - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - "\\\\WINDOWS\\filëßåré", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = IriReferenceFormat.IriReferenceFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java deleted file mode 100644 index cbe64da59bc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsContainsTest.java +++ /dev/null @@ -1,89 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ItemsContainsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMatchesItemsDoesNotMatchContainsFails() { - // matches items, does not match contains - final var schema = ItemsContains.ItemsContains1.getInstance(); - try { - schema.validate( - Arrays.asList( - 2, - 4, - 8 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMatchesNeitherItemsNorContainsFails() { - // matches neither items nor contains - final var schema = ItemsContains.ItemsContains1.getInstance(); - try { - schema.validate( - Arrays.asList( - 1, - 5 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testDoesNotMatchItemsMatchesContainsFails() { - // does not match items, matches contains - final var schema = ItemsContains.ItemsContains1.getInstance(); - try { - schema.validate( - Arrays.asList( - 3, - 6, - 9 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMatchesBothItemsAndContainsPasses() throws ValidationException { - // matches both items and contains - final var schema = ItemsContains.ItemsContains1.getInstance(); - schema.validate( - new ItemsContains.ItemsContainsListBuilder() - .add(6) - - .add(12) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java deleted file mode 100644 index 9ea14c90696..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsDoesNotLookInApplicatorsValidCaseTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ItemsDoesNotLookInApplicatorsValidCaseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPrefixitemsInAllofDoesNotConstrainItemsValidCasePasses() throws ValidationException { - // prefixItems in allOf does not constrain items, valid case - final var schema = ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCase1.getInstance(); - schema.validate( - new ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCaseListBuilder() - .add(5) - - .add(5) - - .build(), - configuration - ); - } - - @Test - public void testPrefixitemsInAllofDoesNotConstrainItemsInvalidCaseFails() { - // prefixItems in allOf does not constrain items, invalid case - final var schema = ItemsDoesNotLookInApplicatorsValidCase.ItemsDoesNotLookInApplicatorsValidCase1.getInstance(); - try { - schema.validate( - Arrays.asList( - 3, - 5 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java deleted file mode 100644 index c1bb5e83996..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ItemsWithNullInstanceElementsTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ItemsWithNullInstanceElementsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullElementsPasses() throws ValidationException { - // allows null elements - final var schema = ItemsWithNullInstanceElements.ItemsWithNullInstanceElements1.getInstance(); - schema.validate( - new ItemsWithNullInstanceElements.ItemsWithNullInstanceElementsListBuilder() - .add((Void) null) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java deleted file mode 100644 index 8229841c57f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/JsonPointerFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class JsonPointerFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testInvalidJsonPointerStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid json-pointer string is only an annotation by default - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - "/foo/bar~", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = JsonPointerFormat.JsonPointerFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java deleted file mode 100644 index 179ec3f4445..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxcontainsWithoutContainsIsIgnoredTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaxcontainsWithoutContainsIsIgnoredTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testTwoItemsStillValidAgainstLoneMaxcontainsPasses() throws ValidationException { - // two items still valid against lone maxContains - final var schema = MaxcontainsWithoutContainsIsIgnored.MaxcontainsWithoutContainsIsIgnored1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2 - ), - configuration - ); - } - - @Test - public void testOneItemValidAgainstLoneMaxcontainsPasses() throws ValidationException { - // one item valid against lone maxContains - final var schema = MaxcontainsWithoutContainsIsIgnored.MaxcontainsWithoutContainsIsIgnored1.getInstance(); - schema.validate( - Arrays.asList( - 1 - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java deleted file mode 100644 index 136888772af..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaximumValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAboveTheMaximumIsInvalidFails() { - // above the maximum is invalid - final var schema = MaximumValidation.MaximumValidation1.getInstance(); - try { - schema.validate( - 3.5d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testBoundaryPointIsValidPasses() throws ValidationException { - // boundary point is valid - final var schema = MaximumValidation.MaximumValidation1.getInstance(); - schema.validate( - 3.0d, - configuration - ); - } - - @Test - public void testBelowTheMaximumIsValidPasses() throws ValidationException { - // below the maximum is valid - final var schema = MaximumValidation.MaximumValidation1.getInstance(); - schema.validate( - 2.6d, - configuration - ); - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = MaximumValidation.MaximumValidation1.getInstance(); - schema.validate( - "x", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java deleted file mode 100644 index a0422226455..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaximumValidationWithUnsignedIntegerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaximumValidationWithUnsignedIntegerTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAboveTheMaximumIsInvalidFails() { - // above the maximum is invalid - final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); - try { - schema.validate( - 300.5d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testBelowTheMaximumIsInvalidPasses() throws ValidationException { - // below the maximum is invalid - final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); - schema.validate( - 299.97d, - configuration - ); - } - - @Test - public void testBoundaryPointIntegerIsValidPasses() throws ValidationException { - // boundary point integer is valid - final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); - schema.validate( - 300, - configuration - ); - } - - @Test - public void testBoundaryPointFloatIsValidPasses() throws ValidationException { - // boundary point float is valid - final var schema = MaximumValidationWithUnsignedInteger.MaximumValidationWithUnsignedInteger1.getInstance(); - schema.validate( - 300.0d, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java deleted file mode 100644 index 79a6696a813..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxitemsValidationTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaxitemsValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testShorterIsValidPasses() throws ValidationException { - // shorter is valid - final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1 - ), - configuration - ); - } - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2 - ), - configuration - ); - } - - @Test - public void testTooLongIsInvalidFails() { - // too long is invalid - final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - 1, - 2, - 3 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresNonArraysPasses() throws ValidationException { - // ignores non-arrays - final var schema = MaxitemsValidation.MaxitemsValidation1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java deleted file mode 100644 index ea48261ed95..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxlengthValidationTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaxlengthValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testShorterIsValidPasses() throws ValidationException { - // shorter is valid - final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); - schema.validate( - "f", - configuration - ); - } - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); - schema.validate( - "fo", - configuration - ); - } - - @Test - public void testTooLongIsInvalidFails() { - // too long is invalid - final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresNonStringsPasses() throws ValidationException { - // ignores non-strings - final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); - schema.validate( - 100, - configuration - ); - } - - @Test - public void testTwoSupplementaryUnicodeCodePointsIsLongEnoughPasses() throws ValidationException { - // two supplementary Unicode code points is long enough - final var schema = MaxlengthValidation.MaxlengthValidation1.getInstance(); - schema.validate( - "💩💩", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java deleted file mode 100644 index 5952d96354c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/Maxproperties0MeansTheObjectIsEmptyTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class Maxproperties0MeansTheObjectIsEmptyTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOnePropertyIsInvalidFails() { - // one property is invalid - final var schema = Maxproperties0MeansTheObjectIsEmpty.Maxproperties0MeansTheObjectIsEmpty1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNoPropertiesIsValidPasses() throws ValidationException { - // no properties is valid - final var schema = Maxproperties0MeansTheObjectIsEmpty.Maxproperties0MeansTheObjectIsEmpty1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java deleted file mode 100644 index 38a3c96ac35..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MaxpropertiesValidationTest.java +++ /dev/null @@ -1,114 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MaxpropertiesValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testShorterIsValidPasses() throws ValidationException { - // shorter is valid - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testTooLongIsInvalidFails() { - // too long is invalid - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "baz", - 3 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2, - 3 - ), - configuration - ); - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = MaxpropertiesValidation.MaxpropertiesValidation1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java deleted file mode 100644 index c63e02df3c8..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MincontainsWithoutContainsIsIgnoredTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MincontainsWithoutContainsIsIgnoredTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOneItemValidAgainstLoneMincontainsPasses() throws ValidationException { - // one item valid against lone minContains - final var schema = MincontainsWithoutContainsIsIgnored.MincontainsWithoutContainsIsIgnored1.getInstance(); - schema.validate( - Arrays.asList( - 1 - ), - configuration - ); - } - - @Test - public void testZeroItemsStillValidAgainstLoneMincontainsPasses() throws ValidationException { - // zero items still valid against lone minContains - final var schema = MincontainsWithoutContainsIsIgnored.MincontainsWithoutContainsIsIgnored1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java deleted file mode 100644 index 24749bd1749..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MinimumValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBoundaryPointIsValidPasses() throws ValidationException { - // boundary point is valid - final var schema = MinimumValidation.MinimumValidation1.getInstance(); - schema.validate( - 1.1d, - configuration - ); - } - - @Test - public void testBelowTheMinimumIsInvalidFails() { - // below the minimum is invalid - final var schema = MinimumValidation.MinimumValidation1.getInstance(); - try { - schema.validate( - 0.6d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = MinimumValidation.MinimumValidation1.getInstance(); - schema.validate( - "x", - configuration - ); - } - - @Test - public void testAboveTheMinimumIsValidPasses() throws ValidationException { - // above the minimum is valid - final var schema = MinimumValidation.MinimumValidation1.getInstance(); - schema.validate( - 2.6d, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java deleted file mode 100644 index c12065a89a3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinimumValidationWithSignedIntegerTest.java +++ /dev/null @@ -1,98 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MinimumValidationWithSignedIntegerTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBoundaryPointWithFloatIsValidPasses() throws ValidationException { - // boundary point with float is valid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - schema.validate( - -2.0d, - configuration - ); - } - - @Test - public void testBoundaryPointIsValidPasses() throws ValidationException { - // boundary point is valid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - schema.validate( - -2, - configuration - ); - } - - @Test - public void testIntBelowTheMinimumIsInvalidFails() { - // int below the minimum is invalid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - try { - schema.validate( - -3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testPositiveAboveTheMinimumIsValidPasses() throws ValidationException { - // positive above the minimum is valid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - schema.validate( - 0, - configuration - ); - } - - @Test - public void testNegativeAboveTheMinimumIsValidPasses() throws ValidationException { - // negative above the minimum is valid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - schema.validate( - -1, - configuration - ); - } - - @Test - public void testIgnoresNonNumbersPasses() throws ValidationException { - // ignores non-numbers - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - schema.validate( - "x", - configuration - ); - } - - @Test - public void testFloatBelowTheMinimumIsInvalidFails() { - // float below the minimum is invalid - final var schema = MinimumValidationWithSignedInteger.MinimumValidationWithSignedInteger1.getInstance(); - try { - schema.validate( - -2.0001d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java deleted file mode 100644 index feeffb264fe..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinitemsValidationTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MinitemsValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1 - ), - configuration - ); - } - - @Test - public void testIgnoresNonArraysPasses() throws ValidationException { - // ignores non-arrays - final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); - schema.validate( - "", - configuration - ); - } - - @Test - public void testLongerIsValidPasses() throws ValidationException { - // longer is valid - final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2 - ), - configuration - ); - } - - @Test - public void testTooShortIsInvalidFails() { - // too short is invalid - final var schema = MinitemsValidation.MinitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java deleted file mode 100644 index 48d34362c9f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinlengthValidationTest.java +++ /dev/null @@ -1,78 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MinlengthValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); - schema.validate( - "fo", - configuration - ); - } - - @Test - public void testLongerIsValidPasses() throws ValidationException { - // longer is valid - final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); - schema.validate( - "foo", - configuration - ); - } - - @Test - public void testIgnoresNonStringsPasses() throws ValidationException { - // ignores non-strings - final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testTooShortIsInvalidFails() { - // too short is invalid - final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); - try { - schema.validate( - "f", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testOneSupplementaryUnicodeCodePointIsNotLongEnoughFails() { - // one supplementary Unicode code point is not long enough - final var schema = MinlengthValidation.MinlengthValidation1.getInstance(); - try { - schema.validate( - "💩", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java deleted file mode 100644 index 8a96571263c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MinpropertiesValidationTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MinpropertiesValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testExactLengthIsValidPasses() throws ValidationException { - // exact length is valid - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testLongerIsValidPasses() throws ValidationException { - // longer is valid - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testTooShortIsInvalidFails() { - // too short is invalid - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = MinpropertiesValidation.MinpropertiesValidation1.getInstance(); - schema.validate( - "", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java deleted file mode 100644 index 9fdaaf6373c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleDependentsRequiredTest.java +++ /dev/null @@ -1,139 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MultipleDependentsRequiredTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNondependantsPasses() throws ValidationException { - // nondependants - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testMissingOtherDependencyFails() { - // missing other dependency - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 1 - ), - new AbstractMap.SimpleEntry( - "quux", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testWithDependenciesPasses() throws ValidationException { - // with dependencies - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "quux", - 3 - ) - ), - configuration - ); - } - - @Test - public void testMissingBothDependenciesFails() { - // missing both dependencies - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "quux", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMissingDependencyFails() { - // missing dependency - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "quux", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNeitherPasses() throws ValidationException { - // neither - final var schema = MultipleDependentsRequired.MultipleDependentsRequired1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java deleted file mode 100644 index 359ad467a22..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleSimultaneousPatternpropertiesAreValidatedTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MultipleSimultaneousPatternpropertiesAreValidatedTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testASimultaneousMatchIsValidPasses() throws ValidationException { - // a simultaneous match is valid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "aaaa", - 18 - ) - ), - configuration - ); - } - - @Test - public void testASingleValidMatchIsValidPasses() throws ValidationException { - // a single valid match is valid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 21 - ) - ), - configuration - ); - } - - @Test - public void testAnInvalidDueToTheOtherIsInvalidFails() { - // an invalid due to the other is invalid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "aaaa", - 31 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMultipleMatchesIsValidPasses() throws ValidationException { - // multiple matches is valid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 21 - ), - new AbstractMap.SimpleEntry( - "aaaa", - 18 - ) - ), - configuration - ); - } - - @Test - public void testAnInvalidDueToOneIsInvalidFails() { - // an invalid due to one is invalid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - "bar" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnInvalidDueToBothIsInvalidFails() { - // an invalid due to both is invalid - final var schema = MultipleSimultaneousPatternpropertiesAreValidated.MultipleSimultaneousPatternpropertiesAreValidated1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "aaa", - "foo" - ), - new AbstractMap.SimpleEntry( - "aaaa", - 31 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java deleted file mode 100644 index fed9d95f30d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/MultipleTypesCanBeSpecifiedInAnArrayTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class MultipleTypesCanBeSpecifiedInAnArrayTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNullIsInvalidFails() { - // null is invalid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsValidPasses() throws ValidationException { - // an integer is valid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testAnArrayIsInvalidFails() { - // an array is invalid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testABooleanIsInvalidFails() { - // a boolean is invalid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatIsInvalidFails() { - // a float is invalid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsValidPasses() throws ValidationException { - // a string is valid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - schema.validate( - "foo", - configuration - ); - } - - @Test - public void testAnObjectIsInvalidFails() { - // an object is invalid - final var schema = MultipleTypesCanBeSpecifiedInAnArray.MultipleTypesCanBeSpecifiedInAnArray1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java deleted file mode 100644 index 87eb5700a2e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAllofToCheckValidationSemanticsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NestedAllofToCheckValidationSemanticsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNullIsValidPasses() throws ValidationException { - // null is valid - final var schema = NestedAllofToCheckValidationSemantics.NestedAllofToCheckValidationSemantics1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAnythingNonNullIsInvalidFails() { - // anything non-null is invalid - final var schema = NestedAllofToCheckValidationSemantics.NestedAllofToCheckValidationSemantics1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java deleted file mode 100644 index 4c3c388465f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedAnyofToCheckValidationSemanticsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NestedAnyofToCheckValidationSemanticsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNullIsValidPasses() throws ValidationException { - // null is valid - final var schema = NestedAnyofToCheckValidationSemantics.NestedAnyofToCheckValidationSemantics1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAnythingNonNullIsInvalidFails() { - // anything non-null is invalid - final var schema = NestedAnyofToCheckValidationSemantics.NestedAnyofToCheckValidationSemantics1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java deleted file mode 100644 index a9fff49775c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedItemsTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NestedItemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNestedArrayWithInvalidTypeFails() { - // nested array with invalid type - final var schema = NestedItems.NestedItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - Arrays.asList( - Arrays.asList( - Arrays.asList( - "1" - ) - ), - Arrays.asList( - Arrays.asList( - 2 - ), - Arrays.asList( - 3 - ) - ) - ), - Arrays.asList( - Arrays.asList( - Arrays.asList( - 4 - ), - Arrays.asList( - 5 - ), - Arrays.asList( - 6 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNotDeepEnoughFails() { - // not deep enough - final var schema = NestedItems.NestedItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - Arrays.asList( - Arrays.asList( - 1 - ), - Arrays.asList( - 2 - ), - Arrays.asList( - 3 - ) - ), - Arrays.asList( - Arrays.asList( - 4 - ), - Arrays.asList( - 5 - ), - Arrays.asList( - 6 - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidNestedArrayPasses() throws ValidationException { - // valid nested array - final var schema = NestedItems.NestedItems1.getInstance(); - schema.validate( - new NestedItems.NestedItemsListBuilder() - .add( - Arrays.asList( - Arrays.asList( - Arrays.asList( - 1 - ) - ), - Arrays.asList( - Arrays.asList( - 2 - ), - Arrays.asList( - 3 - ) - ) - ) - ) - .add( - Arrays.asList( - Arrays.asList( - Arrays.asList( - 4 - ), - Arrays.asList( - 5 - ), - Arrays.asList( - 6 - ) - ) - ) - ) - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java deleted file mode 100644 index 47b72ed27d0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NestedOneofToCheckValidationSemanticsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NestedOneofToCheckValidationSemanticsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNullIsValidPasses() throws ValidationException { - // null is valid - final var schema = NestedOneofToCheckValidationSemantics.NestedOneofToCheckValidationSemantics1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAnythingNonNullIsInvalidFails() { - // anything non-null is invalid - final var schema = NestedOneofToCheckValidationSemantics.NestedOneofToCheckValidationSemantics1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java deleted file mode 100644 index 47ed2c7f9dc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonAsciiPatternWithAdditionalpropertiesTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NonAsciiPatternWithAdditionalpropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNotMatchingThePatternIsInvalidFails() { - // not matching the pattern is invalid - final var schema = NonAsciiPatternWithAdditionalproperties.NonAsciiPatternWithAdditionalproperties1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "élmény", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMatchingThePatternIsValidPasses() throws ValidationException { - // matching the pattern is valid - final var schema = NonAsciiPatternWithAdditionalproperties.NonAsciiPatternWithAdditionalproperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "ármányos", - 2 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java deleted file mode 100644 index 840b6fee169..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NonInterferenceAcrossCombinedSchemasTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NonInterferenceAcrossCombinedSchemasTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidButWouldHaveBeenInvalidThroughElsePasses() throws ValidationException { - // valid, but would have been invalid through else - final var schema = NonInterferenceAcrossCombinedSchemas.NonInterferenceAcrossCombinedSchemas1.getInstance(); - schema.validate( - 3, - configuration - ); - } - - @Test - public void testValidButWouldHaveBeenInvalidThroughThenPasses() throws ValidationException { - // valid, but would have been invalid through then - final var schema = NonInterferenceAcrossCombinedSchemas.NonInterferenceAcrossCombinedSchemas1.getInstance(); - schema.validate( - -100, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java deleted file mode 100644 index 20148bd0088..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMoreComplexSchemaTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NotMoreComplexSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOtherMatchPasses() throws ValidationException { - // other match - final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testMismatchFails() { - // mismatch - final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMatchPasses() throws ValidationException { - // match - final var schema = NotMoreComplexSchema.NotMoreComplexSchema1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java deleted file mode 100644 index e04bd6c9128..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotMultipleTypesTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NotMultipleTypesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOtherMismatchFails() { - // other mismatch - final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidPasses() throws ValidationException { - // valid - final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); - schema.validate( - "foo", - configuration - ); - } - - @Test - public void testMismatchFails() { - // mismatch - final var schema = NotMultipleTypes.NotMultipleTypes1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java deleted file mode 100644 index 9df4b9be0c1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NotTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NotTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testDisallowedFails() { - // disallowed - final var schema = Not.Not1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllowedPasses() throws ValidationException { - // allowed - final var schema = Not.Not1.getInstance(); - schema.validate( - "foo", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java deleted file mode 100644 index ee525a77792..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NulCharactersInStringsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NulCharactersInStringsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMatchStringWithNulPasses() throws ValidationException { - // match string with nul - final var schema = NulCharactersInStrings.NulCharactersInStrings1.getInstance(); - schema.validate( - "hello\0there", - configuration - ); - } - - @Test - public void testDoNotMatchStringLackingNulFails() { - // do not match string lacking nul - final var schema = NulCharactersInStrings.NulCharactersInStrings1.getInstance(); - try { - schema.validate( - "hellothere", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java deleted file mode 100644 index 529a7073b08..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NullTypeMatchesOnlyTheNullObjectTest.java +++ /dev/null @@ -1,165 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NullTypeMatchesOnlyTheNullObjectTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testZeroIsNotNullFails() { - // zero is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - 0, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnArrayIsNotNullFails() { - // an array is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnObjectIsNotNullFails() { - // an object is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testTrueIsNotNullFails() { - // true is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFalseIsNotNullFails() { - // false is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - false, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsNullPasses() throws ValidationException { - // null is null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAStringIsNotNullFails() { - // a string is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsNotNullFails() { - // an integer is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnEmptyStringIsNotNullFails() { - // an empty string is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - "", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatIsNotNullFails() { - // a float is not null - final var schema = NullTypeMatchesOnlyTheNullObject.NullTypeMatchesOnlyTheNullObject1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java deleted file mode 100644 index 6af4cdfde77..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/NumberTypeMatchesNumbersTest.java +++ /dev/null @@ -1,140 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NumberTypeMatchesNumbersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAFloatIsANumberPasses() throws ValidationException { - // a float is a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - schema.validate( - 1.1d, - configuration - ); - } - - @Test - public void testAnIntegerIsANumberPasses() throws ValidationException { - // an integer is a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - schema.validate( - 1, - configuration - ); - } - - @Test - public void testAStringIsStillNotANumberEvenIfItLooksLikeOneFails() { - // a string is still not a number, even if it looks like one - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - "1", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testABooleanIsNotANumberFails() { - // a boolean is not a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatWithZeroFractionalPartIsANumberAndAnIntegerPasses() throws ValidationException { - // a float with zero fractional part is a number (and an integer) - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - schema.validate( - 1.0d, - configuration - ); - } - - @Test - public void testNullIsNotANumberFails() { - // null is not a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsNotANumberFails() { - // a string is not a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnArrayIsNotANumberFails() { - // an array is not a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnObjectIsNotANumberFails() { - // an object is not a number - final var schema = NumberTypeMatchesNumbers.NumberTypeMatchesNumbers1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java deleted file mode 100644 index 68ad1cb30cf..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectPropertiesValidationTest.java +++ /dev/null @@ -1,125 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ObjectPropertiesValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBothPropertiesPresentAndValidIsValidPasses() throws ValidationException { - // both properties present and valid is valid - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - "baz" - ) - ), - configuration - ); - } - - @Test - public void testDoesnTInvalidateOtherPropertiesPasses() throws ValidationException { - // doesn't invalidate other properties - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "quux", - Arrays.asList( - ) - ) - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testBothPropertiesInvalidIsInvalidFails() { - // both properties invalid is invalid - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - Arrays.asList( - ) - ), - new AbstractMap.SimpleEntry( - "bar", - MapUtils.makeMap( - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testOnePropertyInvalidIsInvalidFails() { - // one property invalid is invalid - final var schema = ObjectPropertiesValidation.ObjectPropertiesValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - MapUtils.makeMap( - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java deleted file mode 100644 index 9763f862418..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ObjectTypeMatchesObjectsTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ObjectTypeMatchesObjectsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnObjectIsAnObjectPasses() throws ValidationException { - // an object is an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAnArrayIsNotAnObjectFails() { - // an array is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnIntegerIsNotAnObjectFails() { - // an integer is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testABooleanIsNotAnObjectFails() { - // a boolean is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsNotAnObjectFails() { - // a string is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFloatIsNotAnObjectFails() { - // a float is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsNotAnObjectFails() { - // null is not an object - final var schema = ObjectTypeMatchesObjects.ObjectTypeMatchesObjects1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java deleted file mode 100644 index 08a55997a69..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofComplexTypesTest.java +++ /dev/null @@ -1,96 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class OneofComplexTypesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testSecondOneofValidComplexPasses() throws ValidationException { - // second oneOf valid (complex) - final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ) - ), - configuration - ); - } - - @Test - public void testBothOneofValidComplexFails() { - // both oneOf valid (complex) - final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFirstOneofValidComplexPasses() throws ValidationException { - // first oneOf valid (complex) - final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testNeitherOneofValidComplexFails() { - // neither oneOf valid (complex) - final var schema = OneofComplexTypes.OneofComplexTypes1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 2 - ), - new AbstractMap.SimpleEntry( - "bar", - "quux" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java deleted file mode 100644 index db9d16178db..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class OneofTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testBothOneofValidFails() { - // both oneOf valid - final var schema = Oneof.Oneof1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNeitherOneofValidFails() { - // neither oneOf valid - final var schema = Oneof.Oneof1.getInstance(); - try { - schema.validate( - 1.5d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testSecondOneofValidPasses() throws ValidationException { - // second oneOf valid - final var schema = Oneof.Oneof1.getInstance(); - schema.validate( - 2.5d, - configuration - ); - } - - @Test - public void testFirstOneofValidPasses() throws ValidationException { - // first oneOf valid - final var schema = Oneof.Oneof1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java deleted file mode 100644 index 427d9b358ae..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithBaseSchemaTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class OneofWithBaseSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMismatchBaseSchemaFails() { - // mismatch base schema - final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testOneOneofValidPasses() throws ValidationException { - // one oneOf valid - final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } - - @Test - public void testBothOneofValidFails() { - // both oneOf valid - final var schema = OneofWithBaseSchema.OneofWithBaseSchema1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java deleted file mode 100644 index 1e59b6ff18c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithEmptySchemaTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class OneofWithEmptySchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testOneValidValidPasses() throws ValidationException { - // one valid - valid - final var schema = OneofWithEmptySchema.OneofWithEmptySchema1.getInstance(); - schema.validate( - "foo", - configuration - ); - } - - @Test - public void testBothValidInvalidFails() { - // both valid - invalid - final var schema = OneofWithEmptySchema.OneofWithEmptySchema1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java deleted file mode 100644 index 16d3bb3d839..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/OneofWithRequiredTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class OneofWithRequiredTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testFirstValidValidPasses() throws ValidationException { - // first valid - valid - final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testBothValidInvalidFails() { - // both valid - invalid - final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ), - new AbstractMap.SimpleEntry( - "baz", - 3 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testSecondValidValidPasses() throws ValidationException { - // second valid - valid - final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "baz", - 3 - ) - ), - configuration - ); - } - - @Test - public void testBothInvalidInvalidFails() { - // both invalid - invalid - final var schema = OneofWithRequired.OneofWithRequired1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java deleted file mode 100644 index 00717755f61..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternIsNotAnchoredTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PatternIsNotAnchoredTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMatchesASubstringPasses() throws ValidationException { - // matches a substring - final var schema = PatternIsNotAnchored.PatternIsNotAnchored1.getInstance(); - schema.validate( - "xxaayy", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java deleted file mode 100644 index b609897996f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternValidationTest.java +++ /dev/null @@ -1,105 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PatternValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testIgnoresBooleansPasses() throws ValidationException { - // ignores booleans - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - true, - configuration - ); - } - - @Test - public void testIgnoresFloatsPasses() throws ValidationException { - // ignores floats - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - 1.0d, - configuration - ); - } - - @Test - public void testANonMatchingPatternIsInvalidFails() { - // a non-matching pattern is invalid - final var schema = PatternValidation.PatternValidation1.getInstance(); - try { - schema.validate( - "abc", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresIntegersPasses() throws ValidationException { - // ignores integers - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - 123, - configuration - ); - } - - @Test - public void testAMatchingPatternIsValidPasses() throws ValidationException { - // a matching pattern is valid - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - "aaa", - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testIgnoresObjectsPasses() throws ValidationException { - // ignores objects - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testIgnoresNullPasses() throws ValidationException { - // ignores null - final var schema = PatternValidation.PatternValidation1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java deleted file mode 100644 index 12eef3ae2ee..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesValidatesPropertiesMatchingARegexTest.java +++ /dev/null @@ -1,132 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PatternpropertiesValidatesPropertiesMatchingARegexTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testMultipleInvalidMatchesIsInvalidFails() { - // multiple invalid matches is invalid - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ), - new AbstractMap.SimpleEntry( - "foooooo", - "baz" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testASingleValidMatchIsValidPasses() throws ValidationException { - // a single valid match is valid - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testASingleInvalidMatchIsInvalidFails() { - // a single invalid match is invalid - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ), - new AbstractMap.SimpleEntry( - "fooooo", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testMultipleValidMatchesIsValidPasses() throws ValidationException { - // multiple valid matches is valid - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "foooooo", - 2 - ) - ), - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - schema.validate( - Arrays.asList( - "foo" - ), - configuration - ); - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = PatternpropertiesValidatesPropertiesMatchingARegex.PatternpropertiesValidatesPropertiesMatchingARegex1.getInstance(); - schema.validate( - "foo", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java deleted file mode 100644 index 15e068fdd20..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PatternpropertiesWithNullValuedInstancePropertiesTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PatternpropertiesWithNullValuedInstancePropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullValuesPasses() throws ValidationException { - // allows null values - final var schema = PatternpropertiesWithNullValuedInstanceProperties.PatternpropertiesWithNullValuedInstanceProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foobar", - null - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java deleted file mode 100644 index 0fb6804f928..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsValidationAdjustsTheStartingIndexForItemsTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PrefixitemsValidationAdjustsTheStartingIndexForItemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidItemsPasses() throws ValidationException { - // valid items - final var schema = PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance(); - schema.validate( - new PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItemsListBuilder() - .add("x") - - .add(2) - - .add(3) - - .build(), - configuration - ); - } - - @Test - public void testWrongTypeOfSecondItemFails() { - // wrong type of second item - final var schema = PrefixitemsValidationAdjustsTheStartingIndexForItems.PrefixitemsValidationAdjustsTheStartingIndexForItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - "x", - "y" - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java deleted file mode 100644 index 91fb02e0c7b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PrefixitemsWithNullInstanceElementsTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PrefixitemsWithNullInstanceElementsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullElementsPasses() throws ValidationException { - // allows null elements - final var schema = PrefixitemsWithNullInstanceElements.PrefixitemsWithNullInstanceElements1.getInstance(); - schema.validate( - new PrefixitemsWithNullInstanceElements.PrefixitemsWithNullInstanceElementsListBuilder() - .add((Void) null) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java deleted file mode 100644 index 4225f19de58..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesPatternpropertiesAdditionalpropertiesInteractionTest.java +++ /dev/null @@ -1,172 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertiesPatternpropertiesAdditionalpropertiesInteractionTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPropertyValidatesPropertyPasses() throws ValidationException { - // property validates property - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - Arrays.asList( - 1, - 2 - ) - ) - ), - configuration - ); - } - - @Test - public void testAdditionalpropertyIgnoresPropertyPasses() throws ValidationException { - // additionalProperty ignores property - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - Arrays.asList( - ) - ) - ), - configuration - ); - } - - @Test - public void testPatternpropertyInvalidatesPropertyFails() { - // patternProperty invalidates property - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - Arrays.asList( - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testPatternpropertyValidatesNonpropertyPasses() throws ValidationException { - // patternProperty validates nonproperty - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "fxo", - Arrays.asList( - 1, - 2 - ) - ) - ), - configuration - ); - } - - @Test - public void testPatternpropertyInvalidatesNonpropertyFails() { - // patternProperty invalidates nonproperty - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "fxo", - Arrays.asList( - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testPropertyInvalidatesPropertyFails() { - // property invalidates property - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - Arrays.asList( - 1, - 2, - 3, - 4 - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAdditionalpropertyInvalidatesOthersFails() { - // additionalProperty invalidates others - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "quux", - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAdditionalpropertyValidatesOthersPasses() throws ValidationException { - // additionalProperty validates others - final var schema = PropertiesPatternpropertiesAdditionalpropertiesInteraction.PropertiesPatternpropertiesAdditionalpropertiesInteraction1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "quux", - 3 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java deleted file mode 100644 index 4dd062ed195..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java +++ /dev/null @@ -1,148 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testProtoNotValidFails() { - // __proto__ not valid - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "__proto__", - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNoneOfThePropertiesMentionedPasses() throws ValidationException { - // none of the properties mentioned - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllPresentAndValidPasses() throws ValidationException { - // all present and valid - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "__proto__", - 12 - ), - new AbstractMap.SimpleEntry( - "toString", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - "foo" - ) - ) - ), - new AbstractMap.SimpleEntry( - "constructor", - 37 - ) - ), - configuration - ); - } - - @Test - public void testConstructorNotValidFails() { - // constructor not valid - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "constructor", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - 37 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testTostringNotValidFails() { - // toString not valid - final var schema = PropertiesWhoseNamesAreJavascriptObjectPropertyNames.PropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "toString", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - 37 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java deleted file mode 100644 index c0279809721..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithEscapedCharactersTest.java +++ /dev/null @@ -1,93 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertiesWithEscapedCharactersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testObjectWithAllNumbersIsValidPasses() throws ValidationException { - // object with all numbers is valid - final var schema = PropertiesWithEscapedCharacters.PropertiesWithEscapedCharacters1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\nbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\"bar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\\bar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\rbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\tbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\fbar", - 1 - ) - ), - configuration - ); - } - - @Test - public void testObjectWithStringsIsInvalidFails() { - // object with strings is invalid - final var schema = PropertiesWithEscapedCharacters.PropertiesWithEscapedCharacters1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\nbar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\"bar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\\bar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\rbar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\tbar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\fbar", - "1" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java deleted file mode 100644 index 8104644c9e4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertiesWithNullValuedInstancePropertiesTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertiesWithNullValuedInstancePropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullValuesPasses() throws ValidationException { - // allows null values - final var schema = PropertiesWithNullValuedInstanceProperties.PropertiesWithNullValuedInstanceProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - null - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java deleted file mode 100644 index d86c328b696..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertyNamedRefThatIsNotAReferenceTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertyNamedRefThatIsNotAReferenceTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPropertyNamedRefValidPasses() throws ValidationException { - // property named $ref valid - final var schema = PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "$ref", - "a" - ) - ), - configuration - ); - } - - @Test - public void testPropertyNamedRefInvalidFails() { - // property named $ref invalid - final var schema = PropertyNamedRefThatIsNotAReference.PropertyNamedRefThatIsNotAReference1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "$ref", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java deleted file mode 100644 index c2eaabe2bd3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/PropertynamesValidationTest.java +++ /dev/null @@ -1,111 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class PropertynamesValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testSomePropertyNamesInvalidFails() { - // some property names invalid - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - ) - ), - new AbstractMap.SimpleEntry>( - "foobar", - MapUtils.makeMap( - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllPropertyNamesValidPasses() throws ValidationException { - // all property names valid - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "f", - MapUtils.makeMap( - ) - ), - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - ) - ) - ), - configuration - ); - } - - @Test - public void testObjectWithoutPropertiesIsValidPasses() throws ValidationException { - // object without properties is valid - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2, - 3, - 4 - ), - configuration - ); - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = PropertynamesValidation.PropertynamesValidation1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java deleted file mode 100644 index 6b9b07ae5b8..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RegexFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testInvalidRegexStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid regex string is only an annotation by default - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - "^(abc]", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = RegexFormat.RegexFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java deleted file mode 100644 index 30e27a3e43f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RegexesAreNotAnchoredByDefaultAndAreCaseSensitiveTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testRegexesAreCaseSensitivePasses() throws ValidationException { - // regexes are case sensitive - final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a_x_3", - 3 - ) - ), - configuration - ); - } - - @Test - public void testNonRecognizedMembersAreIgnoredPasses() throws ValidationException { - // non recognized members are ignored - final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "answer 1", - "42" - ) - ), - configuration - ); - } - - @Test - public void testRecognizedMembersAreAccountedForFails() { - // recognized members are accounted for - final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a31b", - null - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testRegexesAreCaseSensitive2Fails() { - // regexes are case sensitive, 2 - final var schema = RegexesAreNotAnchoredByDefaultAndAreCaseSensitive.RegexesAreNotAnchoredByDefaultAndAreCaseSensitive1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a_X_3", - 3 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java deleted file mode 100644 index 19489f3f87f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RelativeJsonPointerFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RelativeJsonPointerFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testInvalidRelativeJsonPointerStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid relative-json-pointer string is only an annotation by default - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - "/foo/bar", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = RelativeJsonPointerFormat.RelativeJsonPointerFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java deleted file mode 100644 index 2de57ddce3b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredDefaultValidationTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RequiredDefaultValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNotRequiredByDefaultPasses() throws ValidationException { - // not required by default - final var schema = RequiredDefaultValidation.RequiredDefaultValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java deleted file mode 100644 index cb6d55bbc67..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest.java +++ /dev/null @@ -1,153 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNamesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testTostringPresentFails() { - // toString present - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "toString", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - 37 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNoneOfThePropertiesMentionedFails() { - // none of the properties mentioned - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testConstructorPresentFails() { - // constructor present - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "constructor", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - 37 - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAllPresentPasses() throws ValidationException { - // all present - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "__proto__", - 12 - ), - new AbstractMap.SimpleEntry( - "toString", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "length", - "foo" - ) - ) - ), - new AbstractMap.SimpleEntry( - "constructor", - 37 - ) - ), - configuration - ); - } - - @Test - public void testProtoPresentFails() { - // __proto__ present - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "__proto__", - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames.RequiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java deleted file mode 100644 index 57b9a69a1be..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredValidationTest.java +++ /dev/null @@ -1,84 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RequiredValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPresentRequiredPropertyIsValidPasses() throws ValidationException { - // present required property is valid - final var schema = RequiredValidation.RequiredValidation1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = RequiredValidation.RequiredValidation1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = RequiredValidation.RequiredValidation1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = RequiredValidation.RequiredValidation1.getInstance(); - schema.validate( - "", - configuration - ); - } - - @Test - public void testNonPresentRequiredPropertyIsInvalidFails() { - // non-present required property is invalid - final var schema = RequiredValidation.RequiredValidation1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 1 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java deleted file mode 100644 index 2aacbb45c61..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEmptyArrayTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RequiredWithEmptyArrayTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testPropertyNotRequiredPasses() throws ValidationException { - // property not required - final var schema = RequiredWithEmptyArray.RequiredWithEmptyArray1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java deleted file mode 100644 index c9cab6a99a1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/RequiredWithEscapedCharactersTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class RequiredWithEscapedCharactersTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testObjectWithSomePropertiesMissingIsInvalidFails() { - // object with some properties missing is invalid - final var schema = RequiredWithEscapedCharacters.RequiredWithEscapedCharacters1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\nbar", - "1" - ), - new AbstractMap.SimpleEntry( - "foo\"bar", - "1" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testObjectWithAllPropertiesPresentIsValidPasses() throws ValidationException { - // object with all properties present is valid - final var schema = RequiredWithEscapedCharacters.RequiredWithEscapedCharacters1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo\nbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\"bar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\\bar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\rbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\tbar", - 1 - ), - new AbstractMap.SimpleEntry( - "foo\fbar", - 1 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java deleted file mode 100644 index 899c2eff0ed..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SimpleEnumValidationTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class SimpleEnumValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testSomethingElseIsInvalidFails() { - // something else is invalid - final var schema = SimpleEnumValidation.SimpleEnumValidation1.getInstance(); - try { - schema.validate( - 4, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testOneOfTheEnumIsValidPasses() throws ValidationException { - // one of the enum is valid - final var schema = SimpleEnumValidation.SimpleEnumValidation1.getInstance(); - schema.validate( - 1, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java deleted file mode 100644 index 25c6bb05a1e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SingleDependencyTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class SingleDependencyTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNondependantPasses() throws ValidationException { - // nondependant - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ) - ), - configuration - ); - } - - @Test - public void testWithDependencyPasses() throws ValidationException { - // with dependency - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 1 - ), - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - } - - @Test - public void testMissingDependencyFails() { - // missing dependency - final var schema = SingleDependency.SingleDependency1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - 2 - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testIgnoresOtherNonObjectsPasses() throws ValidationException { - // ignores other non-objects - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testIgnoresArraysPasses() throws ValidationException { - // ignores arrays - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - Arrays.asList( - "bar" - ), - configuration - ); - } - - @Test - public void testNeitherPasses() throws ValidationException { - // neither - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testIgnoresStringsPasses() throws ValidationException { - // ignores strings - final var schema = SingleDependency.SingleDependency1.getInstance(); - schema.validate( - "foobar", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java deleted file mode 100644 index c3fca3c15be..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/SmallMultipleOfLargeIntegerTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class SmallMultipleOfLargeIntegerTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAnyIntegerIsAMultipleOf1E8Passes() throws ValidationException { - // any integer is a multiple of 1e-8 - final var schema = SmallMultipleOfLargeInteger.SmallMultipleOfLargeInteger1.getInstance(); - schema.validate( - 12391239123L, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java deleted file mode 100644 index c20ee9688ba..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/StringTypeMatchesStringsTest.java +++ /dev/null @@ -1,140 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class StringTypeMatchesStringsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAStringIsStillAStringEvenIfItLooksLikeANumberPasses() throws ValidationException { - // a string is still a string, even if it looks like a number - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - schema.validate( - "1", - configuration - ); - } - - @Test - public void test1IsNotAStringFails() { - // 1 is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - 1, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testABooleanIsNotAStringFails() { - // a boolean is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - true, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnEmptyStringIsStillAStringPasses() throws ValidationException { - // an empty string is still a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - schema.validate( - "", - configuration - ); - } - - @Test - public void testAnArrayIsNotAStringFails() { - // an array is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - Arrays.asList( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAnObjectIsNotAStringFails() { - // an object is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsNotAStringFails() { - // null is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAStringIsAStringPasses() throws ValidationException { - // a string is a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - schema.validate( - "foo", - configuration - ); - } - - @Test - public void testAFloatIsNotAStringFails() { - // a float is not a string - final var schema = StringTypeMatchesStrings.StringTypeMatchesStrings1.getInstance(); - try { - schema.validate( - 1.1d, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java deleted file mode 100644 index 4cfeea8b005..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TimeFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class TimeFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidTimeStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid time string is only an annotation by default - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - "08:30:06 PST", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = TimeFormat.TimeFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java deleted file mode 100644 index 5385d23f3f3..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayObjectOrNullTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class TypeArrayObjectOrNullTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNumberIsInvalidFails() { - // number is invalid - final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsValidPasses() throws ValidationException { - // null is valid - final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testStringIsInvalidFails() { - // string is invalid - final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testArrayIsValidPasses() throws ValidationException { - // array is valid - final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2, - 3 - ), - configuration - ); - } - - @Test - public void testObjectIsValidPasses() throws ValidationException { - // object is valid - final var schema = TypeArrayObjectOrNull.TypeArrayObjectOrNull1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 123 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java deleted file mode 100644 index 0b996a08c00..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeArrayOrObjectTest.java +++ /dev/null @@ -1,92 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class TypeArrayOrObjectTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNumberIsInvalidFails() { - // number is invalid - final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testStringIsInvalidFails() { - // string is invalid - final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); - try { - schema.validate( - "foo", - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNullIsInvalidFails() { - // null is invalid - final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); - try { - schema.validate( - (Void) null, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testArrayIsValidPasses() throws ValidationException { - // array is valid - final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2, - 3 - ), - configuration - ); - } - - @Test - public void testObjectIsValidPasses() throws ValidationException { - // object is valid - final var schema = TypeArrayOrObject.TypeArrayOrObject1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - 123 - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java deleted file mode 100644 index 10be79baf15..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/TypeAsArrayWithOneItemTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class TypeAsArrayWithOneItemTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNumberIsInvalidFails() { - // number is invalid - final var schema = TypeAsArrayWithOneItem.TypeAsArrayWithOneItem1.getInstance(); - try { - schema.validate( - 123, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testStringIsValidPasses() throws ValidationException { - // string is valid - final var schema = TypeAsArrayWithOneItem.TypeAsArrayWithOneItem1.getInstance(); - schema.validate( - "foo", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java deleted file mode 100644 index aa980b3cf2a..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsAsSchemaTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluateditemsAsSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testWithValidUnevaluatedItemsPasses() throws ValidationException { - // with valid unevaluated items - final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); - schema.validate( - Arrays.asList( - "foo" - ), - configuration - ); - } - - @Test - public void testWithInvalidUnevaluatedItemsFails() { - // with invalid unevaluated items - final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); - try { - schema.validate( - Arrays.asList( - 42 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testWithNoUnevaluatedItemsPasses() throws ValidationException { - // with no unevaluated items - final var schema = UnevaluateditemsAsSchema.UnevaluateditemsAsSchema1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java deleted file mode 100644 index 75725f1095c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsDependsOnMultipleNestedContainsTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluateditemsDependsOnMultipleNestedContainsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void test7NotEvaluatedFailsUnevaluateditemsFails() { - // 7 not evaluated, fails unevaluatedItems - final var schema = UnevaluateditemsDependsOnMultipleNestedContains.UnevaluateditemsDependsOnMultipleNestedContains1.getInstance(); - try { - schema.validate( - Arrays.asList( - 2, - 3, - 4, - 7, - 8 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void test5NotEvaluatedPassesUnevaluateditemsPasses() throws ValidationException { - // 5 not evaluated, passes unevaluatedItems - final var schema = UnevaluateditemsDependsOnMultipleNestedContains.UnevaluateditemsDependsOnMultipleNestedContains1.getInstance(); - schema.validate( - Arrays.asList( - 2, - 3, - 4, - 5, - 6 - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java deleted file mode 100644 index db3378ff893..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithItemsTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluateditemsWithItemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testInvalidUnderItemsFails() { - // invalid under items - final var schema = UnevaluateditemsWithItems.UnevaluateditemsWithItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - "foo", - "bar", - "baz" - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidUnderItemsPasses() throws ValidationException { - // valid under items - final var schema = UnevaluateditemsWithItems.UnevaluateditemsWithItems1.getInstance(); - schema.validate( - new UnevaluateditemsWithItems.UnevaluateditemsWithItemsListBuilder() - .add(5) - - .add(6) - - .add(7) - - .add(8) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java deleted file mode 100644 index 1a08c3235f7..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluateditemsWithNullInstanceElementsTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluateditemsWithNullInstanceElementsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullElementsPasses() throws ValidationException { - // allows null elements - final var schema = UnevaluateditemsWithNullInstanceElements.UnevaluateditemsWithNullInstanceElements1.getInstance(); - schema.validate( - Arrays.asList( - (Void) null - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java deleted file mode 100644 index 225ed16c176..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesNotAffectedByPropertynamesTest.java +++ /dev/null @@ -1,53 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluatedpropertiesNotAffectedByPropertynamesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsOnlyNumberPropertiesPasses() throws ValidationException { - // allows only number properties - final var schema = UnevaluatedpropertiesNotAffectedByPropertynames.UnevaluatedpropertiesNotAffectedByPropertynames1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 1 - ) - ), - configuration - ); - } - - @Test - public void testStringPropertyIsInvalidFails() { - // string property is invalid - final var schema = UnevaluatedpropertiesNotAffectedByPropertynames.UnevaluatedpropertiesNotAffectedByPropertynames1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - "b" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java deleted file mode 100644 index efe97f20b0c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesSchemaTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluatedpropertiesSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testWithInvalidUnevaluatedPropertiesFails() { - // with invalid unevaluated properties - final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); - try { - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "fo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testWithNoUnevaluatedPropertiesPasses() throws ValidationException { - // with no unevaluated properties - final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testWithValidUnevaluatedPropertiesPasses() throws ValidationException { - // with valid unevaluated properties - final var schema = UnevaluatedpropertiesSchema.UnevaluatedpropertiesSchema1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java deleted file mode 100644 index 037e2aef978..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluatedpropertiesWithAdjacentAdditionalpropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testWithAdditionalPropertiesPasses() throws ValidationException { - // with additional properties - final var schema = UnevaluatedpropertiesWithAdjacentAdditionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ), - new AbstractMap.SimpleEntry( - "bar", - "bar" - ) - ), - configuration - ); - } - - @Test - public void testWithNoAdditionalPropertiesPasses() throws ValidationException { - // with no additional properties - final var schema = UnevaluatedpropertiesWithAdjacentAdditionalproperties.UnevaluatedpropertiesWithAdjacentAdditionalproperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "foo" - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java deleted file mode 100644 index 67a9630eda1..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UnevaluatedpropertiesWithNullValuedInstancePropertiesTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UnevaluatedpropertiesWithNullValuedInstancePropertiesTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllowsNullValuedPropertiesPasses() throws ValidationException { - // allows null valued properties - final var schema = UnevaluatedpropertiesWithNullValuedInstanceProperties.UnevaluatedpropertiesWithNullValuedInstanceProperties1.getInstance(); - schema.validate( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - null - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java deleted file mode 100644 index 75d8d3f310f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseValidationTest.java +++ /dev/null @@ -1,316 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UniqueitemsFalseValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNumbersAreUniqueIfMathematicallyUnequalPasses() throws ValidationException { - // numbers are unique if mathematically unequal - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1.0d, - 1.0d, - 1 - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfIntegersIsValidPasses() throws ValidationException { - // non-unique array of integers is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 1 - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfObjectsIsValidPasses() throws ValidationException { - // non-unique array of objects is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfArraysIsValidPasses() throws ValidationException { - // non-unique array of arrays is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - "foo" - ), - Arrays.asList( - "foo" - ) - ), - configuration - ); - } - - @Test - public void test1AndTrueAreUniquePasses() throws ValidationException { - // 1 and true are unique - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - true - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { - // unique array of nested objects is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - false - ) - ) - ) - ) - ) - ) - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfArraysIsValidPasses() throws ValidationException { - // unique array of arrays is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - "foo" - ), - Arrays.asList( - "bar" - ) - ), - configuration - ); - } - - @Test - public void testTrueIsNotEqualToOnePasses() throws ValidationException { - // true is not equal to one - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - true - ), - configuration - ); - } - - @Test - public void testNonUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { - // non-unique heterogeneous types are valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - ), - Arrays.asList( - 1 - ), - true, - null, - MapUtils.makeMap( - ), - 1 - ), - configuration - ); - } - - @Test - public void testFalseIsNotEqualToZeroPasses() throws ValidationException { - // false is not equal to zero - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 0, - false - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfIntegersIsValidPasses() throws ValidationException { - // unique array of integers is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2 - ), - configuration - ); - } - - @Test - public void test0AndFalseAreUniquePasses() throws ValidationException { - // 0 and false are unique - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - 0, - false - ), - configuration - ); - } - - @Test - public void testUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { - // unique heterogeneous types are valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - ), - Arrays.asList( - 1 - ), - true, - null, - 1 - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfObjectsIsValidPasses() throws ValidationException { - // unique array of objects is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ) - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { - // non-unique array of nested objects is valid - final var schema = UniqueitemsFalseValidation.UniqueitemsFalseValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ) - ), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java deleted file mode 100644 index a52a980b3b4..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsFalseWithAnArrayOfItemsTest.java +++ /dev/null @@ -1,154 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UniqueitemsFalseWithAnArrayOfItemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testFalseFalseFromItemsArrayIsValidPasses() throws ValidationException { - // [false, false] from items array is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(false) - - .add(false) - - .build(), - configuration - ); - } - - @Test - public void testNonUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { - // non-unique array extended from [false, true] is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(false) - - .add(true) - - .add("foo") - - .add("foo") - - .build(), - configuration - ); - } - - @Test - public void testTrueTrueFromItemsArrayIsValidPasses() throws ValidationException { - // [true, true] from items array is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(true) - - .add(true) - - .build(), - configuration - ); - } - - @Test - public void testUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { - // unique array extended from [false, true] is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(false) - - .add(true) - - .add("foo") - - .add("bar") - - .build(), - configuration - ); - } - - @Test - public void testUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { - // unique array extended from [true, false] is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(true) - - .add(false) - - .add("foo") - - .add("bar") - - .build(), - configuration - ); - } - - @Test - public void testFalseTrueFromItemsArrayIsValidPasses() throws ValidationException { - // [false, true] from items array is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(false) - - .add(true) - - .build(), - configuration - ); - } - - @Test - public void testTrueFalseFromItemsArrayIsValidPasses() throws ValidationException { - // [true, false] from items array is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(true) - - .add(false) - - .build(), - configuration - ); - } - - @Test - public void testNonUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { - // non-unique array extended from [true, false] is valid - final var schema = UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsFalseWithAnArrayOfItems.UniqueitemsFalseWithAnArrayOfItemsListBuilder() - .add(true) - - .add(false) - - .add("foo") - - .add("foo") - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java deleted file mode 100644 index edd2a8c1305..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsValidationTest.java +++ /dev/null @@ -1,627 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UniqueitemsValidationTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testNonUniqueArrayOfMoreThanTwoIntegersIsInvalidFails() { - // non-unique array of more than two integers is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - 1, - 2, - 1 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNonUniqueArrayOfObjectsIsInvalidFails() { - // non-unique array of objects is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testPropertyOrderOfArrayOfObjectsIsIgnoredFails() { - // property order of array of objects is ignored - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ), - new AbstractMap.SimpleEntry( - "bar", - "foo" - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "bar", - "foo" - ), - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testATrueAndA1AreUniquePasses() throws ValidationException { - // {\\\"a\\\": true} and {\\\"a\\\": 1} are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - true - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 1 - ) - ) - ), - configuration - ); - } - - @Test - public void test1AndTrueAreUniquePasses() throws ValidationException { - // [1] and [true] are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - 1 - ), - Arrays.asList( - true - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfIntegersIsInvalidFails() { - // non-unique array of integers is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - 1, - 1 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNested0AndFalseAreUniquePasses() throws ValidationException { - // nested [0] and [false] are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - Arrays.asList( - 0 - ), - "foo" - ), - Arrays.asList( - Arrays.asList( - false - ), - "foo" - ) - ), - configuration - ); - } - - @Test - public void testObjectsAreNonUniqueDespiteKeyOrderFails() { - // objects are non-unique despite key order - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 1 - ), - new AbstractMap.SimpleEntry( - "b", - 2 - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "b", - 2 - ), - new AbstractMap.SimpleEntry( - "a", - 1 - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNonUniqueArrayOfArraysIsInvalidFails() { - // non-unique array of arrays is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - Arrays.asList( - "foo" - ), - Arrays.asList( - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testAFalseAndA0AreUniquePasses() throws ValidationException { - // {\\\"a\\\": false} and {\\\"a\\\": 0} are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - false - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 0 - ) - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfMoreThanTwoArraysIsInvalidFails() { - // non-unique array of more than two arrays is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - Arrays.asList( - "foo" - ), - Arrays.asList( - "bar" - ), - Arrays.asList( - "foo" - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void test0AndFalseAreUniquePasses() throws ValidationException { - // [0] and [false] are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - 0 - ), - Arrays.asList( - false - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueArrayOfNestedObjectsIsInvalidFails() { - // non-unique array of nested objects is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ) - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNumbersAreUniqueIfMathematicallyUnequalFails() { - // numbers are unique if mathematically unequal - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - 1.0d, - 1.0d, - 1 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNonUniqueArrayOfStringsIsInvalidFails() { - // non-unique array of strings is invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - "foo", - "bar", - "foo" - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testUniqueArrayOfNestedObjectsIsValidPasses() throws ValidationException { - // unique array of nested objects is valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - true - ) - ) - ) - ) - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "foo", - MapUtils.makeMap( - new AbstractMap.SimpleEntry>( - "bar", - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "baz", - false - ) - ) - ) - ) - ) - ) - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfArraysIsValidPasses() throws ValidationException { - // unique array of arrays is valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - "foo" - ), - Arrays.asList( - "bar" - ) - ), - configuration - ); - } - - @Test - public void testTrueIsNotEqualToOnePasses() throws ValidationException { - // true is not equal to one - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - true - ), - configuration - ); - } - - @Test - public void testNested1AndTrueAreUniquePasses() throws ValidationException { - // nested [1] and [true] are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - Arrays.asList( - Arrays.asList( - 1 - ), - "foo" - ), - Arrays.asList( - Arrays.asList( - true - ), - "foo" - ) - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfStringsIsValidPasses() throws ValidationException { - // unique array of strings is valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - "foo", - "bar", - "baz" - ), - configuration - ); - } - - @Test - public void testFalseIsNotEqualToZeroPasses() throws ValidationException { - // false is not equal to zero - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 0, - false - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfIntegersIsValidPasses() throws ValidationException { - // unique array of integers is valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - 1, - 2 - ), - configuration - ); - } - - @Test - public void testDifferentObjectsAreUniquePasses() throws ValidationException { - // different objects are unique - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 1 - ), - new AbstractMap.SimpleEntry( - "b", - 2 - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "a", - 2 - ), - new AbstractMap.SimpleEntry( - "b", - 1 - ) - ) - ), - configuration - ); - } - - @Test - public void testUniqueHeterogeneousTypesAreValidPasses() throws ValidationException { - // unique heterogeneous types are valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - ), - Arrays.asList( - 1 - ), - true, - null, - 1, - "{}" - ), - configuration - ); - } - - @Test - public void testUniqueArrayOfObjectsIsValidPasses() throws ValidationException { - // unique array of objects is valid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - schema.validate( - Arrays.asList( - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "bar" - ) - ), - MapUtils.makeMap( - new AbstractMap.SimpleEntry( - "foo", - "baz" - ) - ) - ), - configuration - ); - } - - @Test - public void testNonUniqueHeterogeneousTypesAreInvalidFails() { - // non-unique heterogeneous types are invalid - final var schema = UniqueitemsValidation.UniqueitemsValidation1.getInstance(); - try { - schema.validate( - Arrays.asList( - MapUtils.makeMap( - ), - Arrays.asList( - 1 - ), - true, - null, - MapUtils.makeMap( - ), - 1 - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java deleted file mode 100644 index 3921696f587..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UniqueitemsWithAnArrayOfItemsTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UniqueitemsWithAnArrayOfItemsTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testTrueTrueFromItemsArrayIsNotValidFails() { - // [true, true] from items array is not valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - true, - true - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testUniqueArrayExtendedFromFalseTrueIsValidPasses() throws ValidationException { - // unique array extended from [false, true] is valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() - .add(false) - - .add(true) - - .add("foo") - - .add("bar") - - .build(), - configuration - ); - } - - @Test - public void testFalseFalseFromItemsArrayIsNotValidFails() { - // [false, false] from items array is not valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - false, - false - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testUniqueArrayExtendedFromTrueFalseIsValidPasses() throws ValidationException { - // unique array extended from [true, false] is valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() - .add(true) - - .add(false) - - .add("foo") - - .add("bar") - - .build(), - configuration - ); - } - - @Test - public void testNonUniqueArrayExtendedFromFalseTrueIsNotValidFails() { - // non-unique array extended from [false, true] is not valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - false, - true, - "foo", - "foo" - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testNonUniqueArrayExtendedFromTrueFalseIsNotValidFails() { - // non-unique array extended from [true, false] is not valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - try { - schema.validate( - Arrays.asList( - true, - false, - "foo", - "foo" - ), - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testFalseTrueFromItemsArrayIsValidPasses() throws ValidationException { - // [false, true] from items array is valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() - .add(false) - - .add(true) - - .build(), - configuration - ); - } - - @Test - public void testTrueFalseFromItemsArrayIsValidPasses() throws ValidationException { - // [true, false] from items array is valid - final var schema = UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItems1.getInstance(); - schema.validate( - new UniqueitemsWithAnArrayOfItems.UniqueitemsWithAnArrayOfItemsListBuilder() - .add(true) - - .add(false) - - .build(), - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java deleted file mode 100644 index c7e3f7164b6..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UriFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidUriStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid uri string is only an annotation by default - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - "//foo.bar/?baz=qux#quux", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = UriFormat.UriFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java deleted file mode 100644 index 3df9522ec6e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriReferenceFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UriReferenceFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testInvalidUriReferenceStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid uri-reference string is only an annotation by default - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - "\\\\WINDOWS\\fileshare", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = UriReferenceFormat.UriReferenceFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java deleted file mode 100644 index 636360b6c6d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UriTemplateFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UriTemplateFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } - - @Test - public void testInvalidUriTemplateStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid uri-template string is only an annotation by default - final var schema = UriTemplateFormat.UriTemplateFormat1.getInstance(); - schema.validate( - "http://example.com/dictionary/{term:1}/{term", - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java deleted file mode 100644 index ab9e49d053d..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/UuidFormatTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class UuidFormatTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testAllStringFormatsIgnoreIntegersPasses() throws ValidationException { - // all string formats ignore integers - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - 12, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreNullsPasses() throws ValidationException { - // all string formats ignore nulls - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - (Void) null, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreObjectsPasses() throws ValidationException { - // all string formats ignore objects - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - MapUtils.makeMap( - ), - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreFloatsPasses() throws ValidationException { - // all string formats ignore floats - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - 13.7d, - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreArraysPasses() throws ValidationException { - // all string formats ignore arrays - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - Arrays.asList( - ), - configuration - ); - } - - @Test - public void testInvalidUuidStringIsOnlyAnAnnotationByDefaultPasses() throws ValidationException { - // invalid uuid string is only an annotation by default - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - "2eb8aa08-aa98-11ea-b4aa-73b441d1638", - configuration - ); - } - - @Test - public void testAllStringFormatsIgnoreBooleansPasses() throws ValidationException { - // all string formats ignore booleans - final var schema = UuidFormat.UuidFormat1.getInstance(); - schema.validate( - false, - configuration - ); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java deleted file mode 100644 index e1e1ff747cc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/components/schemas/ValidateAgainstCorrectBranchThenVsElseTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package unit_test_api.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ValidateAgainstCorrectBranchThenVsElseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); - - @Test - public void testValidThroughThenPasses() throws ValidationException { - // valid through then - final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); - schema.validate( - -1, - configuration - ); - } - - @Test - public void testInvalidThroughThenFails() { - // invalid through then - final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); - try { - schema.validate( - -100, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } - - @Test - public void testValidThroughElsePasses() throws ValidationException { - // valid through else - final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); - schema.validate( - 4, - configuration - ); - } - - @Test - public void testInvalidThroughElseFails() { - // invalid through else - final var schema = ValidateAgainstCorrectBranchThenVsElse.ValidateAgainstCorrectBranchThenVsElse1.getInstance(); - try { - schema.validate( - 3, - configuration - ); - throw new RuntimeException("A different exception must be thrown"); - } catch (ValidationException ignored) { - ; - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java deleted file mode 100644 index 9aff3ad5ddc..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/configurations/JsonSchemaKeywordFlagsTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package unit_test_api.configurations; - -import org.junit.Assert; -import org.junit.Test; -import java.util.LinkedHashSet; - -public final class JsonSchemaKeywordFlagsTest { - - @Test - public void testGetEnabledKeywords() { - final JsonSchemaKeywordFlags jsonSchemaKeywordFlags = new JsonSchemaKeywordFlags( - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true - ); - LinkedHashSet enabledKeywords = jsonSchemaKeywordFlags.getKeywords(); - LinkedHashSet expectedEnabledKeywords = new LinkedHashSet<>(); - expectedEnabledKeywords.add("additionalProperties"); - expectedEnabledKeywords.add("allOf"); - expectedEnabledKeywords.add("anyOf"); - expectedEnabledKeywords.add("const"); - expectedEnabledKeywords.add("contains"); - expectedEnabledKeywords.add("dependentRequired"); - expectedEnabledKeywords.add("dependentSchemas"); - expectedEnabledKeywords.add("discriminator"); - expectedEnabledKeywords.add("else_"); - expectedEnabledKeywords.add("enum_"); - expectedEnabledKeywords.add("exclusiveMaximum"); - expectedEnabledKeywords.add("exclusiveMinimum"); - expectedEnabledKeywords.add("format"); - expectedEnabledKeywords.add("if_"); - expectedEnabledKeywords.add("maximum"); - expectedEnabledKeywords.add("minimum"); - expectedEnabledKeywords.add("items"); - expectedEnabledKeywords.add("maxContains"); - expectedEnabledKeywords.add("maxItems"); - expectedEnabledKeywords.add("maxLength"); - expectedEnabledKeywords.add("maxProperties"); - expectedEnabledKeywords.add("minContains"); - expectedEnabledKeywords.add("minItems"); - expectedEnabledKeywords.add("minLength"); - expectedEnabledKeywords.add("minProperties"); - expectedEnabledKeywords.add("multipleOf"); - expectedEnabledKeywords.add("not"); - expectedEnabledKeywords.add("oneOf"); - expectedEnabledKeywords.add("pattern"); - expectedEnabledKeywords.add("patternProperties"); - expectedEnabledKeywords.add("prefixItems"); - expectedEnabledKeywords.add("properties"); - expectedEnabledKeywords.add("propertyNames"); - expectedEnabledKeywords.add("required"); - expectedEnabledKeywords.add("then"); - expectedEnabledKeywords.add("type"); - expectedEnabledKeywords.add("uniqueItems"); - expectedEnabledKeywords.add("unevaluatedItems"); - expectedEnabledKeywords.add("unevaluatedProperties"); - Assert.assertEquals(enabledKeywords, expectedEnabledKeywords); - } - - @Test - public void testGetNoEnabledKeywords() { - final JsonSchemaKeywordFlags jsonSchemaKeywordFlags = new JsonSchemaKeywordFlags( - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ); - LinkedHashSet enabledKeywords = jsonSchemaKeywordFlags.getKeywords(); - LinkedHashSet expectedEnabledKeywords = new LinkedHashSet<>(); - Assert.assertEquals(enabledKeywords, expectedEnabledKeywords); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java deleted file mode 100644 index b26f95ffd02..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/ContentHeaderTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.mediatype.MediaType; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.net.http.HttpHeaders; -import java.util.AbstractMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.function.BiPredicate; - -public class ContentHeaderTest { - public record ParamTestCase(@Nullable Object payload, Map> expectedSerialization, @Nullable Boolean explode) { - public ParamTestCase(@Nullable Object payload, Map> expectedSerialization) { - this(payload, expectedSerialization, null); - } - } - - @Test - public void testSerialization() throws ValidationException, NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - Map.of("color", List.of("null")) - ), - new ParamTestCase( - true, - Map.of("color", List.of("true")) - ), - new ParamTestCase( - false, - Map.of("color", List.of("false")) - ), - new ParamTestCase( - 1, - Map.of("color", List.of("1")) - ), - new ParamTestCase( - 3.14, - Map.of("color",List.of("3.14")) - ), - new ParamTestCase( - "blue", - Map.of("color", List.of("\"blue\"")) - ), - new ParamTestCase( - "hello world", - Map.of("color", List.of("\"hello world\"")) - ), - new ParamTestCase( - "", - Map.of("color", List.of("\"\"")) - ), - new ParamTestCase( - List.of(), - Map.of("color", List.of("[]")) - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - Map.of("color", List.of("[\"blue\",\"black\",\"brown\"]")) - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - Map.of("color", List.of("[\"blue\",\"black\",\"brown\"]")), - true - ), - new ParamTestCase( - Map.of(), - Map.of("color", List.of("{}")) - ), - new ParamTestCase( - mapPayload, - Map.of("color", List.of("{\"R\":100,\"G\":200,\"B\":150}")) - ), - new ParamTestCase( - mapPayload, - Map.of("color", List.of("{\"R\":100,\"G\":200,\"B\":150}")), - true - ) - ); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - BiPredicate headerFilter = (key, val) -> true; - class ApplicationJsonMediaType implements MediaType { - @Override - public AnyTypeJsonSchema.AnyTypeJsonSchema1 schema() { - return AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance(); - } - - @Override - public Void encoding() { - return null; - } - } - AbstractMap.SimpleEntry> content = new AbstractMap.SimpleEntry<>( - "application/json", new ApplicationJsonMediaType() - ); - for (ParamTestCase testCase: testCases) { - var header = new ContentHeader( - true, - false, - testCase.explode, - content - ); - var serialization = header.serialize(testCase.payload, "color", false, configuration); - Assert.assertEquals(HttpHeaders.of(testCase.expectedSerialization, headerFilter), serialization); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java deleted file mode 100644 index acc5ef4dcfd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/header/SchemaHeaderTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package unit_test_api.header; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.ListJsonSchema; -import unit_test_api.schemas.NullJsonSchema; -import unit_test_api.schemas.NumberJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.schemas.validation.JsonSchema; - -import java.net.http.HttpHeaders; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.BiPredicate; - -public class SchemaHeaderTest { - public record ParamTestCase(@Nullable Object payload, Map> expectedSerialization, @Nullable Boolean explode) { - public ParamTestCase(@Nullable Object payload, Map> expectedSerialization) { - this(payload, expectedSerialization, null); - } - } - - @Test - public void testSerialization() throws ValidationException, NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - var testCases = List.of( - new ParamTestCase( - null, - Map.of("color", List.of("")) - ), - new ParamTestCase( - 1, - Map.of("color", List.of("1")) - ), - new ParamTestCase( - 3.14, - Map.of("color",List.of("3.14")) - ), - new ParamTestCase( - "blue", - Map.of("color", List.of("blue")) - ), - new ParamTestCase( - "hello world", - Map.of("color", List.of("hello world")) - ), - new ParamTestCase( - "", - Map.of("color", List.of("")) - ), - new ParamTestCase( - List.of(), - Map.of("color", List.of("")) - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - Map.of("color", List.of("blue,black,brown")) - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - Map.of("color", List.of("blue,black,brown")), - true - ), - new ParamTestCase( - Map.of(), - Map.of("color", List.of("")) - ), - new ParamTestCase( - mapPayload, - Map.of("color", List.of("R,100,G,200,B,150")) - ), - new ParamTestCase( - mapPayload, - Map.of("color", List.of("R=100,G=200,B=150")), - true - ) - ); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - BiPredicate headerFilter = (key, val) -> true; - for (ParamTestCase testCase: testCases) { - var header = new SchemaHeader( - true, - false, - testCase.explode, - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance() - ); - var serialization = header.serialize(testCase.payload, "color", false, configuration); - Assert.assertEquals(HttpHeaders.of(testCase.expectedSerialization, headerFilter), serialization); - } - SchemaHeader boolHeader = new SchemaHeader( - true, - false, - false, - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance() - ); - for (boolean value: Set.of(true, false)) { - Assert.assertThrows( - NotImplementedException.class, - () -> boolHeader.serialize(value, "color", false, configuration) - ); - } - } - - private static SchemaHeader getHeader(JsonSchema schema) { - return new SchemaHeader( - true, - false, - false, - schema - ); - } - - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testDeserialization() throws ValidationException, NotImplementedException { - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - - SchemaHeader header = getHeader(NullJsonSchema.NullJsonSchema1.getInstance()); - @Nullable Object deserialized = header.deserialize(List.of(""), false, configuration); - assertNull(deserialized); - - header = getHeader(NumberJsonSchema.NumberJsonSchema1.getInstance()); - deserialized = header.deserialize(List.of("1"), false, configuration); - @Nullable Object expected = 1L; - Assert.assertEquals(expected, deserialized); - - header = getHeader(NumberJsonSchema.NumberJsonSchema1.getInstance()); - deserialized = header.deserialize(List.of("3.14"), false, configuration); - expected = 3.14d; - Assert.assertEquals(expected, deserialized); - - header = getHeader(StringJsonSchema.StringJsonSchema1.getInstance()); - deserialized = header.deserialize(List.of("blue"), false, configuration); - expected = "blue"; - Assert.assertEquals(expected, deserialized); - - header = getHeader(StringJsonSchema.StringJsonSchema1.getInstance()); - deserialized = header.deserialize(List.of("hello world"), false, configuration); - expected = "hello world"; - Assert.assertEquals(expected, deserialized); - - header = getHeader(ListJsonSchema.ListJsonSchema1.getInstance()); - deserialized = header.deserialize(List.of("blue", "black", "brown"), false, configuration); - expected = List.of("blue", "black", "brown"); - Assert.assertEquals(expected, deserialized); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java deleted file mode 100644 index 04d75d06d42..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/CookieSerializerTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.parameter; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.AbstractMap; -import java.util.Map; - -public class CookieSerializerTest { - public static class Parameter1 extends SchemaParameter { - public Parameter1() { - super("param1", ParameterInType.COOKIE, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class Parameter2 extends SchemaParameter { - public Parameter2() { - super("param2", ParameterInType.COOKIE, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class CookieParametersSerializer extends CookieSerializer { - protected CookieParametersSerializer() { - super( - Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", new Parameter1()), - new AbstractMap.SimpleEntry<>("param2", new Parameter2()) - ) - ); - } - } - - @Test - public void testSerialization() throws NotImplementedException { - Map inData = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", "a"), - new AbstractMap.SimpleEntry<>("param2", 3.14d) - ); - String cookie = new CookieParametersSerializer().serialize(inData); - String expectedCookie = "param1=a; param2=3.14"; - Assert.assertEquals(expectedCookie, cookie); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java deleted file mode 100644 index a6a0498bc90..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/HeadersSerializerTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package unit_test_api.parameter; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.AbstractMap; -import java.util.Map; -import java.util.List; - -public class HeadersSerializerTest { - public static class Param1HeaderParameter extends SchemaParameter { - public Param1HeaderParameter() { - super("param1", ParameterInType.HEADER, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class Param2HeaderParameter extends SchemaParameter { - public Param2HeaderParameter() { - super("param2", ParameterInType.HEADER, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class HeaderParametersSerializer extends HeadersSerializer { - protected HeaderParametersSerializer() { - super( - Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", new Param1HeaderParameter()), - new AbstractMap.SimpleEntry<>("param2", new Param2HeaderParameter()) - ) - ); - } - } - - @Test - public void testSerialization() throws NotImplementedException { - Map inData = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", "a"), - new AbstractMap.SimpleEntry<>("param2", 3.14d) - ); - Map> expectedHeaders = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", List.of("a")), - new AbstractMap.SimpleEntry<>("param2", List.of("3.14")) - ); - Map> headers = new HeaderParametersSerializer().serialize(inData); - Assert.assertEquals(expectedHeaders, headers); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java deleted file mode 100644 index 654a52f27ab..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/PathSerializerTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package unit_test_api.parameter; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.AbstractMap; -import java.util.Map; - -public class PathSerializerTest { - public static class Parameter1 extends SchemaParameter { - public Parameter1() { - super("param1", ParameterInType.PATH, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class Parameter2 extends SchemaParameter { - public Parameter2() { - super("param2", ParameterInType.PATH, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class PathParametersSerializer extends PathSerializer { - protected PathParametersSerializer() { - super( - Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", new Parameter1()), - new AbstractMap.SimpleEntry<>("param2", new Parameter2()) - ) - ); - } - } - - @Test - public void testSerialization() throws NotImplementedException { - Map inData = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", "a"), - new AbstractMap.SimpleEntry<>("param2", 3.14d) - ); - String pathWithPlaceholders = "/{param1}/{param2}"; - String path = new PathParametersSerializer().serialize(inData, pathWithPlaceholders); - String expectedPath = "/a/3.14"; - Assert.assertEquals(expectedPath, path); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java deleted file mode 100644 index 65909820d34..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/QuerySerializerTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package unit_test_api.parameter; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.AbstractMap; -import java.util.Map; - -public class QuerySerializerTest { - public static class Param1QueryParameter extends SchemaParameter { - public Param1QueryParameter() { - super("param1", ParameterInType.QUERY, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class Param2QueryParameter extends SchemaParameter { - public Param2QueryParameter() { - super("param2", ParameterInType.QUERY, true, null, null, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - public static class QueryParametersSerializer extends QuerySerializer { - protected QueryParametersSerializer() { - super( - Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", new Param1QueryParameter()), - new AbstractMap.SimpleEntry<>("param2", new Param2QueryParameter()) - ) - ); - } - } - - @Test - public void testSerialization() throws NotImplementedException { - Map inData = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", "a"), - new AbstractMap.SimpleEntry<>("param2", 3.14d) - ); - var serializer = new QueryParametersSerializer(); - var queryMap = serializer.getQueryMap(inData); - Map expectedQueryMap = Map.ofEntries( - new AbstractMap.SimpleEntry<>("param1", "param1=a"), - new AbstractMap.SimpleEntry<>("param2", "param2=3.14") - ); - Assert.assertEquals(expectedQueryMap, queryMap); - String query = serializer.serialize(queryMap); - String expectedQuery = "?param1=a¶m2=3.14"; - Assert.assertEquals(expectedQuery, query); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java deleted file mode 100644 index 2103f6b1d76..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaNonQueryParameterTest.java +++ /dev/null @@ -1,397 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; -import java.util.Set; - -public class SchemaNonQueryParameterTest { - public record ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization, @Nullable Boolean explode) { - public ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization) { - this(payload, expectedSerialization, null); - } - } - - public static class HeaderParameter extends SchemaParameter { - public HeaderParameter(@Nullable Boolean explode) { - super("color", ParameterInType.HEADER, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testHeaderSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", "1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color","3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", "blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", "hello world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue,black,brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue,black,brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R,100,G,200,B,150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100,G=200,B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var header = new HeaderParameter(testCase.explode); - var serialization = header.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - var boolHeader = new HeaderParameter(false); - for (boolean value: Set.of(true, false)) { - Assert.assertThrows( - NotImplementedException.class, - () -> boolHeader.serialize(value) - ); - } - } - - public static class PathParameter extends SchemaParameter { - public PathParameter(@Nullable Boolean explode) { - super("color", ParameterInType.PATH, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testPathSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", "1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color","3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", "blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", "hello%20world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue,black,brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue,black,brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R,100,G,200,B,150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100,G=200,B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var pathParameter = new PathParameter(testCase.explode); - var serialization = pathParameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - var pathParameter = new PathParameter(false); - for (boolean value: Set.of(true, false)) { - Assert.assertThrows( - NotImplementedException.class, - () -> pathParameter.serialize(value) - ); - } - } - - public static class CookieParameter extends SchemaParameter { - public CookieParameter(@Nullable Boolean explode) { - super("color", ParameterInType.COOKIE, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testCookieSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", "color=1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color","color=3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", "color=blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", "color=hello world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", "color=") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var cookieParameter = new CookieParameter(testCase.explode); - var serialization = cookieParameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - var cookieParameter = new CookieParameter(false); - for (boolean value: Set.of(true, false)) { - Assert.assertThrows( - NotImplementedException.class, - () -> cookieParameter.serialize(value) - ); - } - } - - public static class PathMatrixParameter extends SchemaParameter { - public PathMatrixParameter(@Nullable Boolean explode) { - super("color", ParameterInType.PATH, true, ParameterStyle.MATRIX, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testPathMatrixSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", ";color=1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color",";color=3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", ";color=blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", ";color=hello%20world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", ";color") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", ";color=blue,black,brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", ";color=blue;color=black;color=brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", ";color=R,100,G,200,B,150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", ";R=100;G=200;B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var pathParameter = new PathMatrixParameter(testCase.explode); - var serialization = pathParameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - } - - public static class PathLabelParameter extends SchemaParameter { - public PathLabelParameter(@Nullable Boolean explode) { - super("color", ParameterInType.PATH, true, ParameterStyle.LABEL, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testPathLabelSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", ".1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color",".3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", ".blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", ".hello%20world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", ".") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", ".blue.black.brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", ".blue.black.brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", ".R.100.G.200.B.150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", ".R=100.G=200.B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var pathParameter = new PathLabelParameter(testCase.explode); - var serialization = pathParameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java deleted file mode 100644 index a191dc0148e..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/parameter/SchemaQueryParameterTest.java +++ /dev/null @@ -1,193 +0,0 @@ -package unit_test_api.parameter; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.schemas.AnyTypeJsonSchema; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.AbstractMap; -import java.util.Map; -import java.util.Set; - -public class SchemaQueryParameterTest { - public record ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization, @Nullable Boolean explode) { - public ParamTestCase(@Nullable Object payload, AbstractMap.SimpleEntry expectedSerialization) { - this(payload, expectedSerialization, null); - } - } - - public static class QueryParameterNoStyle extends SchemaParameter { - public QueryParameterNoStyle(@Nullable Boolean explode) { - super("color", ParameterInType.QUERY, true, null, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testQueryParameterNoStyleSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - null, - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - 1, - new AbstractMap.SimpleEntry<>("color", "color=1") - ), - new ParamTestCase( - 3.14, - new AbstractMap.SimpleEntry<>("color","color=3.14") - ), - new ParamTestCase( - "blue", - new AbstractMap.SimpleEntry<>("color", "color=blue") - ), - new ParamTestCase( - "hello world", - new AbstractMap.SimpleEntry<>("color", "color=hello%20world") - ), - new ParamTestCase( - "", - new AbstractMap.SimpleEntry<>("color", "color=") - ), - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "color=blue&color=black&color=brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100&G=200&B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var parameter = new QueryParameterNoStyle(testCase.explode); - var serialization = parameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - var parameter = new QueryParameterNoStyle(false); - for (boolean value: Set.of(true, false)) { - Assert.assertThrows( - NotImplementedException.class, - () -> parameter.serialize(value) - ); - } - } - - public static class QueryParameterSpaceDelimited extends SchemaParameter { - public QueryParameterSpaceDelimited(@Nullable Boolean explode) { - super("color", ParameterInType.QUERY, true, ParameterStyle.SPACE_DELIMITED, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testQueryParameterSpaceDelimitedSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue%20black%20brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue%20black%20brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R%20100%20G%20200%20B%20150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100%20G=200%20B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var parameter = new QueryParameterSpaceDelimited(testCase.explode); - var serialization = parameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - } - - public static class QueryParameterPipeDelimited extends SchemaParameter { - public QueryParameterPipeDelimited(@Nullable Boolean explode) { - super("color", ParameterInType.QUERY, true, ParameterStyle.PIPE_DELIMITED, explode, null, AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - } - - @Test - public void testQueryParameterPipeDelimitedSerialization() throws NotImplementedException { - var mapPayload = new LinkedHashMap(); - mapPayload.put("R", 100); - mapPayload.put("G", 200); - mapPayload.put("B", 150); - List testCases = List.of( - new ParamTestCase( - List.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue|black|brown") - ), - new ParamTestCase( - List.of("blue", "black", "brown"), - new AbstractMap.SimpleEntry<>("color", "blue|black|brown"), - true - ), - new ParamTestCase( - Map.of(), - new AbstractMap.SimpleEntry<>("color", "") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R|100|G|200|B|150") - ), - new ParamTestCase( - mapPayload, - new AbstractMap.SimpleEntry<>("color", "R=100|G=200|B=150"), - true - ) - ); - for (ParamTestCase testCase: testCases) { - var parameter = new QueryParameterPipeDelimited(testCase.explode); - var serialization = parameter.serialize(testCase.payload); - Assert.assertEquals(testCase.expectedSerialization, serialization); - } - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java deleted file mode 100644 index dcb2605b844..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/requestbody/RequestBodySerializerTest.java +++ /dev/null @@ -1,181 +0,0 @@ -package unit_test_api.requestbody; - -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.contenttype.ContentTypeDetector; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.StringJsonSchema; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; - -import java.net.http.HttpResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.AbstractMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Flow; - -public final class RequestBodySerializerTest { - public sealed interface SealedMediaType permits ApplicationjsonMediaType, TextplainMediaType {} - public record ApplicationjsonMediaType(AnyTypeJsonSchema.AnyTypeJsonSchema1 schema) implements SealedMediaType {} - public record TextplainMediaType(StringJsonSchema.StringJsonSchema1 schema) implements SealedMediaType {} - - public sealed interface SealedRequestBody permits ApplicationjsonRequestBody, TextplainRequestBody {} - public record ApplicationjsonRequestBody(AnyTypeJsonSchema.AnyTypeJsonSchema1Boxed body) implements SealedRequestBody, GenericRequestBody<@Nullable Object> { - @Override - public String contentType() { - return "application/json"; - } - } - public record TextplainRequestBody(StringJsonSchema.StringJsonSchema1Boxed body) implements SealedRequestBody, GenericRequestBody<@Nullable Object> { - @Override - public String contentType() { - return "text/plain"; - } - } - - public static class MyRequestBodySerializer extends RequestBodySerializer { - public MyRequestBodySerializer() { - super( - Map.ofEntries( - new AbstractMap.SimpleEntry<>("application/json", new ApplicationjsonMediaType(AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance())), - new AbstractMap.SimpleEntry<>("text/plain", new TextplainMediaType(StringJsonSchema.StringJsonSchema1.getInstance())) - ), - true); - } - - public SerializedRequestBody serialize(SealedRequestBody requestBody) throws NotImplementedException { - if (requestBody instanceof ApplicationjsonRequestBody requestBody0) { - return serialize(requestBody0.contentType(), requestBody0.body().getData()); - } else { - TextplainRequestBody requestBody1 = (TextplainRequestBody) requestBody; - return serialize(requestBody1.contentType(), requestBody1.body().getData()); - } - } - } - - @Test - public void testContentTypeIsJson() { - Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json")); - Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json; charset=UTF-8")); - Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/json-patch+json")); - Assert.assertTrue(ContentTypeDetector.contentTypeIsJson("application/geo+json")); - - Assert.assertFalse(ContentTypeDetector.contentTypeIsJson("application/octet-stream")); - Assert.assertFalse(ContentTypeDetector.contentTypeIsJson("text/plain")); - } - - static final class StringSubscriber implements Flow.Subscriber { - final HttpResponse.BodySubscriber wrapped; - StringSubscriber(HttpResponse.BodySubscriber wrapped) { - this.wrapped = wrapped; - } - @Override - public void onSubscribe(Flow.Subscription subscription) { - wrapped.onSubscribe(subscription); - } - @Override - public void onNext(ByteBuffer item) { wrapped.onNext(List.of(item)); } - @Override - public void onError(Throwable throwable) { wrapped.onError(throwable); } - @Override - public void onComplete() { wrapped.onComplete(); } - } - - private String getJsonBody(SerializedRequestBody requestBody) { - var bodySubscriber = HttpResponse.BodySubscribers.ofString(StandardCharsets.UTF_8); - var flowSubscriber = new StringSubscriber(bodySubscriber); - requestBody.bodyPublisher.subscribe(flowSubscriber); - return bodySubscriber.getBody().toCompletableFuture().join(); - } - - @Test - public void testSerializeApplicationJson() throws ValidationException, NotImplementedException { - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - var serializer = new MyRequestBodySerializer(); - String jsonBody; - SerializedRequestBody requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(1, configuration) - ) - ); - Assert.assertEquals("application/json", requestBody.contentType); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "1"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(3.14, configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "3.14"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox((Void) null, configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "null"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(true, configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "true"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(false, configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "false"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(List.of(), configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "[]"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(Map.of(), configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "{}"); - - requestBody = serializer.serialize( - new ApplicationjsonRequestBody( - AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance().validateAndBox(Map.of("k1", "v1", "k2", "v2"), configuration) - ) - ); - jsonBody = getJsonBody(requestBody); - Assert.assertEquals(jsonBody, "{\"k2\":\"v2\",\"k1\":\"v1\"}"); - } - - @Test - public void testSerializeTextPlain() throws ValidationException, NotImplementedException { - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - var serializer = new MyRequestBodySerializer(); - SerializedRequestBody requestBody = serializer.serialize( - new TextplainRequestBody( - StringJsonSchema.StringJsonSchema1.getInstance().validateAndBox("a", configuration) - ) - ); - Assert.assertEquals("text/plain", requestBody.contentType); - String textBody = getJsonBody(requestBody); - Assert.assertEquals(textBody, "a"); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java deleted file mode 100644 index 42ae6ad9e6f..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/response/ResponseDeserializerTest.java +++ /dev/null @@ -1,248 +0,0 @@ -package unit_test_api.response; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.ToNumberPolicy; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.NotImplementedException; -import unit_test_api.exceptions.ApiException; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.mediatype.MediaType; -import unit_test_api.schemas.AnyTypeJsonSchema; -import unit_test_api.schemas.StringJsonSchema; - -import javax.net.ssl.SSLSession; -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpHeaders; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.BiPredicate; - -public class ResponseDeserializerTest { - private static final Gson gson = new GsonBuilder() - .setObjectToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .setNumberToNumberStrategy(ToNumberPolicy.LONG_OR_DOUBLE) - .create(); - public sealed interface SealedResponseBody permits ApplicationjsonBody, TextplainBody { } - - public record ApplicationjsonBody(AnyTypeJsonSchema.AnyTypeJsonSchema1Boxed body) implements SealedResponseBody { } - - public record TextplainBody(StringJsonSchema.StringJsonSchema1Boxed body) implements SealedResponseBody {} - - public sealed interface SealedMediaType permits ApplicationjsonMediatype, TextplainMediatype { } - - public record ApplicationjsonMediatype(AnyTypeJsonSchema.AnyTypeJsonSchema1 schema) implements SealedMediaType, MediaType { - public ApplicationjsonMediatype() { - this(AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance()); - } - @Override - public Void encoding() { - return null; - } - } - - public record TextplainMediatype(StringJsonSchema.StringJsonSchema1 schema) implements SealedMediaType, MediaType { - public TextplainMediatype() { - this(StringJsonSchema.StringJsonSchema1.getInstance()); - } - @Override - public Void encoding() { - return null; - } - } - - public static class MyResponseDeserializer extends ResponseDeserializer { - - public MyResponseDeserializer() { - super(Map.of("application/json", new ApplicationjsonMediatype(), "text/plain", new TextplainMediatype())); - } - - @Override - protected SealedResponseBody getBody(String contentType, SealedMediaType mediaType, byte[] body, SchemaConfiguration configuration) throws ValidationException, NotImplementedException { - if (mediaType instanceof ApplicationjsonMediatype thisMediaType) { - var deserializedBody = deserializeBody(contentType, body, thisMediaType.schema(), configuration); - return new ApplicationjsonBody(deserializedBody); - } else { - TextplainMediatype thisMediaType = (TextplainMediatype) mediaType; - var deserializedBody = deserializeBody(contentType, body, thisMediaType.schema(), configuration); - return new TextplainBody(deserializedBody); - } - } - - @Override - protected Void getHeaders(HttpHeaders headers, SchemaConfiguration configuration) { - return null; - } - } - - public static class BytesHttpResponse implements HttpResponse { - private final byte[] body; - private final HttpHeaders headers; - private final HttpRequest request; - private final URI uri; - private final HttpClient.Version version; - public BytesHttpResponse(byte[] body, String contentType) { - this.body = body; - BiPredicate headerFilter = (key, val) -> true; - headers = HttpHeaders.of(Map.of("Content-Type", List.of(contentType)), headerFilter); - uri = URI.create("https://abc.com/"); - request = HttpRequest.newBuilder().uri(uri).build(); - version = HttpClient.Version.HTTP_2; - } - - @Override - public int statusCode() { - return 202; - } - - @Override - public HttpRequest request() { - return request; - } - - @Override - public Optional> previousResponse() { - return Optional.empty(); - } - - @Override - public HttpHeaders headers() { - return headers; - } - - @Override - public byte[] body() { - return body; - } - - @Override - public Optional sslSession() { - return Optional.empty(); - } - - @Override - public URI uri() { - return uri; - } - - @Override - public HttpClient.Version version() { - return version; - } - } - - @SuppressWarnings("nullness") - private String toJson(@Nullable Object body) { - return gson.toJson(body); - } - - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testDeserializeApplicationJsonNull() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson(null).getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedVoid boxedVoid)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedVoid"); - } - assertNull(boxedVoid.data()); - } - - @Test - public void testDeserializeApplicationJsonTrue() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson(true).getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedBoolean boxedBoolean)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedBoolean"); - } - Assert.assertTrue(boxedBoolean.data()); - } - - @Test - public void testDeserializeApplicationJsonFalse() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson(false).getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedBoolean boxedBoolean)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedBoolean"); - } - Assert.assertFalse(boxedBoolean.data()); - } - - @Test - public void testDeserializeApplicationJsonInt() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson(1).getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedNumber boxedNumber)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedNumber"); - } - Assert.assertEquals(boxedNumber.data(), 1L); - } - - @Test - public void testDeserializeApplicationJsonFloat() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson(3.14).getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedNumber boxedNumber)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedNumber"); - } - Assert.assertEquals(boxedNumber.data(), 3.14); - } - - @Test - public void testDeserializeApplicationJsonString() throws ValidationException, ApiException, NotImplementedException { - var deserializer = new MyResponseDeserializer(); - byte[] bodyBytes = toJson("a").getBytes(StandardCharsets.UTF_8); - BytesHttpResponse response = new BytesHttpResponse(bodyBytes, "application/json"); - SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - DeserializedHttpResponse apiResponse = deserializer.deserialize(response, configuration); - if (!(apiResponse.body() instanceof ApplicationjsonBody jsonBody)) { - throw new RuntimeException("body must be type ApplicationjsonBody"); - } - if (!(jsonBody.body() instanceof AnyTypeJsonSchema.AnyTypeJsonSchema1BoxedString boxedString)) { - throw new RuntimeException("body must be type AnyTypeJsonSchema1BoxedString"); - } - Assert.assertEquals(boxedString.data(), "a"); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java deleted file mode 100644 index 8e46bf4334c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/AnyTypeSchemaTest.java +++ /dev/null @@ -1,106 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.FrozenMap; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.LinkedHashMap; - - -public class AnyTypeSchemaTest { - static final AnyTypeJsonSchema.AnyTypeJsonSchema1 schema = AnyTypeJsonSchema.AnyTypeJsonSchema1.getInstance(); - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - - @SuppressWarnings("nullness") - private Void assertNull(@Nullable Object object) { - Assert.assertNull(object); - return null; - } - - @Test - public void testValidateNull() throws ValidationException { - Void validatedValue = schema.validate((Void) null, configuration); - assertNull(validatedValue); - } - - @Test - public void testValidateBoolean() throws ValidationException { - boolean trueValue = schema.validate(true, configuration); - Assert.assertTrue(trueValue); - - boolean falseValue = schema.validate(false, configuration); - Assert.assertFalse(falseValue); - } - - @Test - public void testValidateInteger() throws ValidationException { - int validatedValue = schema.validate(1, configuration); - Assert.assertEquals(validatedValue, 1); - } - - @Test - public void testValidateLong() throws ValidationException { - long validatedValue = schema.validate(1L, configuration); - Assert.assertEquals(validatedValue, 1L); - } - - @Test - public void testValidateFloat() throws ValidationException { - float validatedValue = schema.validate(3.14f, configuration); - Assert.assertEquals(Float.compare(validatedValue, 3.14f), 0); - } - - @Test - public void testValidateDouble() throws ValidationException { - double validatedValue = schema.validate(70.6458763d, configuration); - Assert.assertEquals(Double.compare(validatedValue, 70.6458763d), 0); - } - - @Test - public void testValidateString() throws ValidationException { - String validatedValue = schema.validate("a", configuration); - Assert.assertEquals(validatedValue, "a"); - } - - @Test - public void testValidateZonedDateTime() throws ValidationException { - String validatedValue = schema.validate(ZonedDateTime.of(2017, 7, 21, 17, 32, 28, 0, ZoneId.of("Z")), configuration); - Assert.assertEquals(validatedValue, "2017-07-21T17:32:28Z"); - } - - @Test - public void testValidateLocalDate() throws ValidationException { - String validatedValue = schema.validate(LocalDate.of(2017, 7, 21), configuration); - Assert.assertEquals(validatedValue, "2017-07-21"); - } - - @Test - public void testValidateMap() throws ValidationException { - LinkedHashMap inMap = new LinkedHashMap<>(); - inMap.put("today", LocalDate.of(2017, 7, 21)); - FrozenMap validatedValue = schema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("today", "2017-07-21"); - Assert.assertEquals(validatedValue, outMap); - } - - @Test - public void testValidateList() throws ValidationException { - ArrayList inList = new ArrayList<>(); - inList.add(LocalDate.of(2017, 7, 21)); - FrozenList validatedValue = schema.validate(inList, configuration); - ArrayList outList = new ArrayList<>(); - outList.add( "2017-07-21"); - Assert.assertEquals(validatedValue, outList); - } -} - diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java deleted file mode 100644 index 983bc20e9d8..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ArrayTypeSchemaTest.java +++ /dev/null @@ -1,252 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ListSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; - -public class ArrayTypeSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - public sealed interface ArrayWithItemsSchemaBoxed permits ArrayWithItemsSchemaBoxedList { - } - public record ArrayWithItemsSchemaBoxedList(FrozenList data) implements ArrayWithItemsSchemaBoxed { - } - - public static class ArrayWithItemsSchema extends JsonSchema implements ListSchemaValidator, ArrayWithItemsSchemaBoxedList> { - public ArrayWithItemsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(StringJsonSchema.StringJsonSchema1.class) - ); - } - - @Override - public FrozenList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(castItem instanceof String)) { - throw new RuntimeException("Instantiated type of item is invalid"); - } - items.add((String) castItem); - i += 1; - } - return new FrozenList<>(items); - } - - public FrozenList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ArrayWithItemsSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ArrayWithItemsSchemaBoxedList(validate(arg, configuration)); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ArrayWithItemsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List listArg) { - return new ArrayWithItemsSchemaBoxedList(validate(listArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public static class ArrayWithOutputClsSchemaList extends FrozenList { - protected ArrayWithOutputClsSchemaList(FrozenList m) { - super(m); - } - - public static ArrayWithOutputClsSchemaList of(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ArrayWithOutputClsSchema().validate(arg, configuration); - } - } - - public sealed interface ArrayWithOutputClsSchemaBoxed permits ArrayWithOutputClsSchemaBoxedList { - } - public record ArrayWithOutputClsSchemaBoxedList(ArrayWithOutputClsSchemaList data) implements ArrayWithOutputClsSchemaBoxed { - } - public static class ArrayWithOutputClsSchema extends JsonSchema implements ListSchemaValidator { - public ArrayWithOutputClsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(StringJsonSchema.StringJsonSchema1.class) - ); - - } - - @Override - public ArrayWithOutputClsSchemaList getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castItem = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - if (!(castItem instanceof String)) { - throw new RuntimeException("Instantiated type of item is invalid"); - } - items.add((String) castItem); - i += 1; - } - FrozenList newInstanceItems = new FrozenList<>(items); - return new ArrayWithOutputClsSchemaList(newInstanceItems); - } - - public ArrayWithOutputClsSchemaList validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ArrayWithOutputClsSchemaBoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new ArrayWithOutputClsSchemaBoxedList(validate(arg, configuration)); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List) { - return validate((List) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ArrayWithOutputClsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List listArg) { - return new ArrayWithOutputClsSchemaBoxedList(validate(listArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - new ArrayWithItemsSchema(), - null, - validationMetadata - )); - } - - @Test - public void testValidateArrayWithItemsSchema() throws ValidationException { - // list with only item works - List inList = new ArrayList<>(); - inList.add("abc"); - FrozenList validatedValue = new ArrayWithItemsSchema().validate(inList, configuration); - List outList = new ArrayList<>(); - outList.add("abc"); - Assert.assertEquals(validatedValue, outList); - - // list with no items works - inList = new ArrayList<>(); - validatedValue = new ArrayWithItemsSchema().validate(inList, configuration); - outList = new ArrayList<>(); - Assert.assertEquals(validatedValue, outList); - - // invalid item type fails - List intList = List.of(1); - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - new ArrayWithItemsSchema(), - intList, - validationMetadata - )); - } - - @Test - public void testValidateArrayWithOutputClsSchema() throws ValidationException { - // list with only item works - List inList = new ArrayList<>(); - inList.add("abc"); - ArrayWithOutputClsSchemaList validatedValue = new ArrayWithOutputClsSchema().validate(inList, configuration); - List outList = new ArrayList<>(); - outList.add("abc"); - Assert.assertEquals(validatedValue, outList); - - // list with no items works - inList = new ArrayList<>(); - validatedValue = new ArrayWithOutputClsSchema().validate(inList, configuration); - outList = new ArrayList<>(); - Assert.assertEquals(validatedValue, outList); - - // invalid item type fails - List intList = List.of(1); - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - new ArrayWithOutputClsSchema(), - intList, - validationMetadata - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java deleted file mode 100644 index e458f6ada89..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/BooleanSchemaTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package unit_test_api.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.LinkedHashSet; -import java.util.List; - -public class BooleanSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final BooleanJsonSchema.BooleanJsonSchema1 booleanJsonSchema = BooleanJsonSchema.BooleanJsonSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @Test - public void testValidateTrue() throws ValidationException { - boolean validatedValue = booleanJsonSchema.validate(true, configuration); - Assert.assertTrue(validatedValue); - } - - @Test - public void testValidateFalse() throws ValidationException { - boolean validatedValue = booleanJsonSchema.validate(false, configuration); - Assert.assertFalse(validatedValue); - } - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - booleanJsonSchema, - null, - validationMetadata - )); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java deleted file mode 100644 index 72de9e0f760..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListBuilderTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.List; - -public class ListBuilderTest { - public static class NullableListWithNullableItemsListBuilder { - // class to build List<@Nullable List> - private final List<@Nullable List> list; - - public NullableListWithNullableItemsListBuilder() { - list = new ArrayList<>(); - } - - public NullableListWithNullableItemsListBuilder(List<@Nullable List> list) { - this.list = list; - } - - public NullableListWithNullableItemsListBuilder add(Void item) { - list.add(null); - return this; - } - - public NullableListWithNullableItemsListBuilder add(List item) { - list.add(item); - return this; - } - - public List<@Nullable List> build() { - return list; - } - } - - @Test - public void testSucceedsWithNullInput() { - List<@Nullable List> inList = new ArrayList<>(); - inList.add(null); - var builder = new NullableListWithNullableItemsListBuilder(inList); - Assert.assertEquals(inList, builder.build()); - - builder = new NullableListWithNullableItemsListBuilder(); - builder.add((Void) null); - Assert.assertEquals(inList, builder.build()); - } - - @Test - public void testSucceedsWithNonNullInput() { - List<@Nullable List> inList = new ArrayList<>(); - inList.add(List.of(1)); - var builder = new NullableListWithNullableItemsListBuilder(inList); - Assert.assertEquals(inList, builder.build()); - - builder = new NullableListWithNullableItemsListBuilder(); - builder.add(List.of(1)); - Assert.assertEquals(inList, builder.build()); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java deleted file mode 100644 index a03c4d948dd..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ListSchemaTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.FrozenList; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; - -public class ListSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final ListJsonSchema.ListJsonSchema1 listJsonSchema = ListJsonSchema.ListJsonSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - listJsonSchema, - null, - validationMetadata - )); - } - - @Test - public void testValidateList() throws ValidationException { - List inList = new ArrayList<>(); - inList.add("today"); - FrozenList<@Nullable Object> validatedValue = listJsonSchema.validate(inList, configuration); - ArrayList outList = new ArrayList<>(); - outList.add("today"); - Assert.assertEquals(validatedValue, outList); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java deleted file mode 100644 index 7e9594bdef0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/MapSchemaTest.java +++ /dev/null @@ -1,48 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.time.LocalDate; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; - -public class MapSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final MapJsonSchema.MapJsonSchema1 mapJsonSchema = MapJsonSchema.MapJsonSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - mapJsonSchema, - null, - validationMetadata - )); - } - - @Test - public void testValidateMap() throws ValidationException { - Map inMap = new LinkedHashMap<>(); - inMap.put("today", LocalDate.of(2017, 7, 21)); - FrozenMap<@Nullable Object> validatedValue = mapJsonSchema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("today", "2017-07-21"); - Assert.assertEquals(validatedValue, outMap); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java deleted file mode 100644 index 1fc6ff86ce0..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NullSchemaTest.java +++ /dev/null @@ -1,41 +0,0 @@ -package unit_test_api.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.LinkedHashSet; -import java.util.List; - -public class NullSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final NullJsonSchema.NullJsonSchema1 nullJsonSchema = NullJsonSchema.NullJsonSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - - @Test - @SuppressWarnings("nullness") - public void testValidateNull() throws ValidationException { - Void validatedValue = nullJsonSchema.validate(null, configuration); - Assert.assertNull(validatedValue); - } - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - nullJsonSchema, - Boolean.TRUE, - validationMetadata - )); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java deleted file mode 100644 index d3b94350533..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/NumberSchemaTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package unit_test_api.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.LinkedHashSet; -import java.util.List; - -public class NumberSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final NumberJsonSchema.NumberJsonSchema1 numberJsonSchema = NumberJsonSchema.NumberJsonSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @Test - public void testValidateInteger() throws ValidationException { - int validatedValue = numberJsonSchema.validate(1, configuration); - Assert.assertEquals(validatedValue, 1); - } - - @Test - public void testValidateLong() throws ValidationException { - long validatedValue = numberJsonSchema.validate(1L, configuration); - Assert.assertEquals(validatedValue, 1L); - } - - @Test - public void testValidateFloat() throws ValidationException { - float validatedValue = numberJsonSchema.validate(3.14f, configuration); - Assert.assertEquals(Float.compare(validatedValue, 3.14f), 0); - } - - @Test - public void testValidateDouble() throws ValidationException { - double validatedValue = numberJsonSchema.validate(3.14d, configuration); - Assert.assertEquals(Double.compare(validatedValue, 3.14d), 0); - } - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - numberJsonSchema, - null, - validationMetadata - )); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java deleted file mode 100644 index 3a1309f26ba..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/ObjectTypeSchemaTest.java +++ /dev/null @@ -1,538 +0,0 @@ -package unit_test_api.schemas; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.JsonSchemaInfo; -import unit_test_api.schemas.validation.FrozenMap; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.PropertyEntry; -import unit_test_api.schemas.validation.MapSchemaValidator; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -public class ObjectTypeSchemaTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap { - } - public record ObjectWithPropsSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ObjectWithPropsSchemaBoxed { - } - public static class ObjectWithPropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithPropsSchemaBoxedMap> { - private static @Nullable ObjectWithPropsSchema instance = null; - private ObjectWithPropsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) - )) - ); - - } - - public static ObjectWithPropsSchema getInstance() { - if (instance == null) { - instance = new ObjectWithPropsSchema(); - } - return instance; - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ObjectWithPropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithPropsSchemaBoxedMap(validate(arg, configuration)); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return new ObjectWithPropsSchemaBoxedMap(validate(mapArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - - public sealed interface ObjectWithAddpropsSchemaBoxed permits ObjectWithAddpropsSchemaBoxedMap { - } - public record ObjectWithAddpropsSchemaBoxedMap(FrozenMap data) implements ObjectWithAddpropsSchemaBoxed { - } - - public static class ObjectWithAddpropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithAddpropsSchemaBoxedMap> { - private static @Nullable ObjectWithAddpropsSchema instance = null; - private ObjectWithAddpropsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .additionalProperties(StringJsonSchema.StringJsonSchema1.class) - ); - } - - public static ObjectWithAddpropsSchema getInstance() { - if (instance == null) { - instance = new ObjectWithAddpropsSchema(); - } - return instance; - } - - @Override - public FrozenMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - if (!(castValue instanceof String)) { - throw new RuntimeException("Invalid type for property value"); - } - properties.put(propertyName, (String) castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ObjectWithAddpropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithAddpropsSchemaBoxedMap(validate(arg, configuration)); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithAddpropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return new ObjectWithAddpropsSchemaBoxedMap(validate(mapArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - } - - public sealed interface ObjectWithPropsAndAddpropsSchemaBoxed permits ObjectWithPropsAndAddpropsSchemaBoxedMap { - } - public record ObjectWithPropsAndAddpropsSchemaBoxedMap(FrozenMap<@Nullable Object> data) implements ObjectWithPropsAndAddpropsSchemaBoxed { - } - public static class ObjectWithPropsAndAddpropsSchema extends JsonSchema implements MapSchemaValidator, ObjectWithPropsAndAddpropsSchemaBoxedMap> { - private static @Nullable ObjectWithPropsAndAddpropsSchema instance = null; - private ObjectWithPropsAndAddpropsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) - )) - .additionalProperties(BooleanJsonSchema.BooleanJsonSchema1.class) - ); - } - - public static ObjectWithPropsAndAddpropsSchema getInstance() { - if (instance == null) { - instance = new ObjectWithPropsAndAddpropsSchema(); - } - return instance; - } - - @Override - public FrozenMap<@Nullable Object> getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new FrozenMap<>(properties); - } - - public FrozenMap<@Nullable Object> validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ObjectWithPropsAndAddpropsSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithPropsAndAddpropsSchemaBoxedMap(validate(arg, configuration)); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithPropsAndAddpropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return new ObjectWithPropsAndAddpropsSchemaBoxedMap(validate(mapArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - } - - public static class ObjectWithOutputTypeSchemaMap extends FrozenMap<@Nullable Object> { - protected ObjectWithOutputTypeSchemaMap(FrozenMap<@Nullable Object> m) { - super(m); - } - - public static ObjectWithOutputTypeSchemaMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ObjectWithOutputTypeSchema.getInstance().validate(arg, configuration); - } - } - - public sealed interface ObjectWithOutputTypeSchemaBoxed permits ObjectWithOutputTypeSchemaBoxedMap { - } - public record ObjectWithOutputTypeSchemaBoxedMap(ObjectWithOutputTypeSchemaMap data) implements ObjectWithOutputTypeSchemaBoxed { - } - public static class ObjectWithOutputTypeSchema extends JsonSchema implements MapSchemaValidator { - private static @Nullable ObjectWithOutputTypeSchema instance = null; - public ObjectWithOutputTypeSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) - )) - ); - } - - public static ObjectWithOutputTypeSchema getInstance() { - if (instance == null) { - instance = new ObjectWithOutputTypeSchema(); - } - return instance; - } - - @Override - public ObjectWithOutputTypeSchemaMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object castValue = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, castValue); - } - return new ObjectWithOutputTypeSchemaMap(new FrozenMap<>(properties)); - } - - public ObjectWithOutputTypeSchemaMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ObjectWithOutputTypeSchemaBoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithOutputTypeSchemaBoxedMap(validate(arg, configuration)); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithOutputTypeSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return new ObjectWithOutputTypeSchemaBoxedMap(validate(mapArg, configuration)); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof FrozenMap) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - } - - @Test - public void testExceptionThrownForInvalidType() { - ObjectWithPropsSchema schema = ObjectWithPropsSchema.getInstance(); - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - schema, - null, - validationMetadata - )); - } - - @Test - public void testValidateObjectWithPropsSchema() throws ValidationException { - ObjectWithPropsSchema schema = ObjectWithPropsSchema.getInstance(); - - // map with only property works - Map inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - FrozenMap<@Nullable Object> validatedValue = schema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - Assert.assertEquals(validatedValue, outMap); - - // map with additional unvalidated property works - inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - inMap.put("someOtherString", "def"); - validatedValue = schema.validate(inMap, configuration); - outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - outMap.put("someOtherString", "def"); - Assert.assertEquals(validatedValue, outMap); - - // invalid prop type fails - inMap = new LinkedHashMap<>(); - inMap.put("someString", 1); - Map finalInMap = inMap; - Assert.assertThrows(ValidationException.class, () -> schema.validate( - finalInMap, configuration - )); - } - - @Test - public void testValidateObjectWithAddpropsSchema() throws ValidationException { - ObjectWithAddpropsSchema schema = ObjectWithAddpropsSchema.getInstance(); - - // map with only property works - Map inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - FrozenMap validatedValue = schema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - Assert.assertEquals(validatedValue, outMap); - - // map with additional properties works - inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - inMap.put("someOtherString", "def"); - validatedValue = schema.validate(inMap, configuration); - outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - outMap.put("someOtherString", "def"); - Assert.assertEquals(validatedValue, outMap); - - // invalid addProp type fails - Map invalidInput = Map.of("someString", 1); - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - schema, - invalidInput, - validationMetadata - )); - } - - @Test - public void testValidateObjectWithPropsAndAddpropsSchema() throws ValidationException { - ObjectWithPropsAndAddpropsSchema schema = ObjectWithPropsAndAddpropsSchema.getInstance(); - - // map with only property works - Map inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - FrozenMap<@Nullable Object> validatedValue = schema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - Assert.assertEquals(validatedValue, outMap); - - // map with additional properties works - inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - inMap.put("someAddProp", true); - validatedValue = schema.validate(inMap, configuration); - outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - outMap.put("someAddProp", true); - Assert.assertEquals(validatedValue, outMap); - - // invalid prop type fails - inMap = new LinkedHashMap<>(); - inMap.put("someString", 1); - Map invalidPropMap = inMap; - Assert.assertThrows(ValidationException.class, () -> schema.validate( - invalidPropMap, configuration - )); - - // invalid addProp type fails - inMap = new LinkedHashMap<>(); - inMap.put("someAddProp", 1); - Map invalidAddpropMap = inMap; - Assert.assertThrows(ValidationException.class, () -> schema.validate( - invalidAddpropMap, configuration - )); - } - - @Test - public void testValidateObjectWithOutputTypeSchema() throws ValidationException { - ObjectWithOutputTypeSchema schema = ObjectWithOutputTypeSchema.getInstance(); - - // map with only property works - Map inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - ObjectWithOutputTypeSchemaMap validatedValue = schema.validate(inMap, configuration); - LinkedHashMap outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - Assert.assertEquals(validatedValue, outMap); - - // map with additional unvalidated property works - inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - inMap.put("someOtherString", "def"); - validatedValue = schema.validate(inMap, configuration); - outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - outMap.put("someOtherString", "def"); - Assert.assertEquals(validatedValue, outMap); - - // invalid prop type fails - inMap = new LinkedHashMap<>(); - inMap.put("someString", 1); - Map finalInMap = inMap; - Assert.assertThrows(ValidationException.class, () -> schema.validate( - finalInMap, configuration - )); - - // using output class directly works - inMap = new LinkedHashMap<>(); - inMap.put("someString", "abc"); - validatedValue = ObjectWithOutputTypeSchemaMap.of(inMap, configuration); - outMap = new LinkedHashMap<>(); - outMap.put("someString", "abc"); - Assert.assertEquals(validatedValue, outMap); - } -} diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java deleted file mode 100644 index a22d9a04d8b..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/RefBooleanSchemaTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package unit_test_api.schemas; - -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.validation.JsonSchema; -import unit_test_api.schemas.validation.PathToSchemasMap; -import unit_test_api.schemas.validation.ValidationMetadata; - -import java.util.LinkedHashSet; -import java.util.List; - -public class RefBooleanSchemaTest { - public static class RefBooleanSchema { - public static class RefBooleanSchema1 extends BooleanJsonSchema.BooleanJsonSchema1 {} - } - - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - static final BooleanJsonSchema.BooleanJsonSchema1 refBooleanJsonSchema = RefBooleanSchema.RefBooleanSchema1.getInstance(); - static final ValidationMetadata validationMetadata = new ValidationMetadata( - List.of("args[0"), - configuration, - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @Test - public void testValidateTrue() throws ValidationException { - Boolean validatedValue = refBooleanJsonSchema.validate(true, configuration); - Assert.assertEquals(validatedValue, Boolean.TRUE); - } - - @Test - public void testValidateFalse() throws ValidationException { - Boolean validatedValue = refBooleanJsonSchema.validate(false, configuration); - Assert.assertEquals(validatedValue, Boolean.FALSE); - } - - @Test - public void testExceptionThrownForInvalidType() { - Assert.assertThrows(ValidationException.class, () -> JsonSchema.validate( - refBooleanJsonSchema, - null, - validationMetadata - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java deleted file mode 100644 index c1f3537f565..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/AdditionalPropertiesValidatorTest.java +++ /dev/null @@ -1,149 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.MapJsonSchema; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class AdditionalPropertiesValidatorTest { - public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap {} - public record ObjectWithPropsSchemaBoxedMap() implements ObjectWithPropsSchemaBoxed {} - - public static class ObjectWithPropsSchema extends JsonSchema { - private static @Nullable ObjectWithPropsSchema instance = null; - private ObjectWithPropsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(FrozenMap.class)) - .properties(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) - )) - .additionalProperties(StringJsonSchema.StringJsonSchema1.class) - ); - - } - - public static ObjectWithPropsSchema getInstance() { - if (instance == null) { - instance = new ObjectWithPropsSchema(); - } - return instance; - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return arg; - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return arg; - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithPropsSchemaBoxedMap(); - } - } - - @SuppressWarnings("nullness") - private Void assertNull(@Nullable Object object) { - Assert.assertNull(object); - return null; - } - - @Test - public void testCorrectPropertySucceeds() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("someString", "abc"); - mutableMap.put("someAddProp", "def"); - FrozenMap arg = new FrozenMap<>(mutableMap); - final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - ObjectWithPropsSchema.getInstance(), - arg, - validationMetadata - ) - ); - if (pathToSchemas == null) { - throw new RuntimeException("Invalid null value for pathToSchemas for this test case"); - } - List expectedPathToItem = new ArrayList<>(); - expectedPathToItem.add("args[0]"); - expectedPathToItem.add("someAddProp"); - LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); - StringJsonSchema.StringJsonSchema1 schema = JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class); - expectedClasses.put(schema, null); - PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); - expectedPathToSchemas.put(expectedPathToItem, expectedClasses); - Assert.assertEquals(pathToSchemas, expectedPathToSchemas); - } - - @Test - public void testNotApplicableTypeReturnsNull() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - MapJsonSchema.MapJsonSchema1.getInstance(), - 1, - validationMetadata - ) - ); - assertNull(pathToSchemas); - } - - @Test - public void testIncorrectPropertyValueFails() { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("someString", "abc"); - mutableMap.put("someAddProp", 1); - FrozenMap arg = new FrozenMap<>(mutableMap); - final AdditionalPropertiesValidator validator = new AdditionalPropertiesValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - ObjectWithPropsSchema.getInstance(), - arg, - validationMetadata - ) - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java deleted file mode 100644 index 2e0409c107c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/CustomIsoparserTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package unit_test_api.schemas.validation; - -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.time.ZoneId; -import org.junit.Assert; -import org.junit.Test; - -public final class CustomIsoparserTest { - - @Test - public void testParseIsodatetime() { - final CustomIsoparser parser = new CustomIsoparser(); - ZonedDateTime dateTime = parser.parseIsodatetime("2017-07-21T17:32:28Z"); - ZoneId zone = ZoneId.of("Z"); - ZonedDateTime expectedDateTime = ZonedDateTime.of(2017, 7, 21, 17, 32, 28, 0, zone); - Assert.assertEquals(dateTime, expectedDateTime); - } - - @Test - public void testParseIsodate() { - final CustomIsoparser parser = new CustomIsoparser(); - LocalDate date = parser.parseIsodate("2017-07-21"); - LocalDate expectedDate = LocalDate.of(2017, 7, 21); - Assert.assertEquals(date, expectedDate); - } - -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java deleted file mode 100644 index 6561b154170..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/FormatValidatorTest.java +++ /dev/null @@ -1,363 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.IntJsonSchema; -import unit_test_api.schemas.Int32JsonSchema; -import unit_test_api.schemas.Int64JsonSchema; -import unit_test_api.schemas.FloatJsonSchema; -import unit_test_api.schemas.DoubleJsonSchema; -import unit_test_api.schemas.DecimalJsonSchema; -import unit_test_api.schemas.DateJsonSchema; -import unit_test_api.schemas.DateTimeJsonSchema; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.LinkedHashSet; - -public class FormatValidatorTest { - static final ValidationMetadata validationMetadata = new ValidationMetadata( - new ArrayList<>(), - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testIntFormatSucceedsWithFloat() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - IntJsonSchema.IntJsonSchema1.getInstance(), - 1.0f, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testIntFormatFailsWithFloat() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - IntJsonSchema.IntJsonSchema1.getInstance(), - 3.14f, - validationMetadata - ) - )); - } - - @Test - public void testIntFormatSucceedsWithInt() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - IntJsonSchema.IntJsonSchema1.getInstance(), - 1, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInt32UnderMinFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - Int32JsonSchema.Int32JsonSchema1.getInstance(), - -2147483649L, - validationMetadata - ) - )); - } - - @Test - public void testInt32InclusiveMinSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - Int32JsonSchema.Int32JsonSchema1.getInstance(), - -2147483648, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInt32InclusiveMaxSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - Int32JsonSchema.Int32JsonSchema1.getInstance(), - 2147483647, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInt32OverMaxFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - Int32JsonSchema.Int32JsonSchema1.getInstance(), - 2147483648L, - validationMetadata - ) - )); - } - - @Test - public void testInt64UnderMinFails() { - final FormatValidator validator = new FormatValidator(); - - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - Int64JsonSchema.Int64JsonSchema1.getInstance(), - new BigInteger("-9223372036854775809"), - validationMetadata - ) - )); - } - - @Test - public void testInt64InclusiveMinSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - Int64JsonSchema.Int64JsonSchema1.getInstance(), - -9223372036854775808L, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInt64InclusiveMaxSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - Int64JsonSchema.Int64JsonSchema1.getInstance(), - 9223372036854775807L, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInt64OverMaxFails() { - final FormatValidator validator = new FormatValidator(); - - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - Int64JsonSchema.Int64JsonSchema1.getInstance(), - new BigInteger("9223372036854775808"), - validationMetadata - ) - )); - } - - @Test - public void testFloatUnderMinFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - FloatJsonSchema.FloatJsonSchema1.getInstance(), - -3.402823466385289e+38d, - validationMetadata - ) - )); - } - - @Test - public void testFloatInclusiveMinSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - FloatJsonSchema.FloatJsonSchema1.getInstance(), - -3.4028234663852886e+38f, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testFloatInclusiveMaxSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - FloatJsonSchema.FloatJsonSchema1.getInstance(), - 3.4028234663852886e+38f, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testFloatOverMaxFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - FloatJsonSchema.FloatJsonSchema1.getInstance(), - 3.402823466385289e+38d, - validationMetadata - ) - )); - } - - @Test - public void testDoubleUnderMinFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - DoubleJsonSchema.DoubleJsonSchema1.getInstance(), - new BigDecimal("-1.7976931348623157082e+308"), - validationMetadata - ) - )); - } - - @Test - public void testDoubleInclusiveMinSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DoubleJsonSchema.DoubleJsonSchema1.getInstance(), - -1.7976931348623157E+308d, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testDoubleInclusiveMaxSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DoubleJsonSchema.DoubleJsonSchema1.getInstance(), - 1.7976931348623157E+308d, - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testDoubleOverMaxFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - DoubleJsonSchema.DoubleJsonSchema1.getInstance(), - new BigDecimal("1.7976931348623157082e+308"), - validationMetadata - ) - )); - } - - @Test - public void testInvalidNumberStringFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - DecimalJsonSchema.DecimalJsonSchema1.getInstance(), - "abc", - validationMetadata - ) - )); - } - - @Test - public void testValidFloatNumberStringSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DecimalJsonSchema.DecimalJsonSchema1.getInstance(), - "3.14", - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testValidIntNumberStringSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DecimalJsonSchema.DecimalJsonSchema1.getInstance(), - "1", - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInvalidDateStringFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - DateJsonSchema.DateJsonSchema1.getInstance(), - "abc", - validationMetadata - ) - )); - } - - @Test - public void testValidDateStringSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DateJsonSchema.DateJsonSchema1.getInstance(), - "2017-01-20", - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testInvalidDateTimeStringFails() { - final FormatValidator validator = new FormatValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - DateTimeJsonSchema.DateTimeJsonSchema1.getInstance(), - "abc", - validationMetadata - ) - )); - } - - @Test - public void testValidDateTimeStringSucceeds() throws ValidationException { - final FormatValidator validator = new FormatValidator(); - PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - DateTimeJsonSchema.DateTimeJsonSchema1.getInstance(), - "2017-07-21T17:32:28Z", - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java deleted file mode 100644 index 0452126f357..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/ItemsValidatorTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.schemas.StringJsonSchema; -import unit_test_api.exceptions.ValidationException; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -public class ItemsValidatorTest { - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - public sealed interface ArrayWithItemsSchemaBoxed permits ArrayWithItemsSchemaBoxedList {} - public record ArrayWithItemsSchemaBoxedList() implements ArrayWithItemsSchemaBoxed {} - - public static class ArrayWithItemsSchema extends JsonSchema { - public ArrayWithItemsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(List.class)) - .items(StringJsonSchema.StringJsonSchema1.class) - ); - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof List listArg) { - return getNewInstance(listArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof List listArg) { - return validate(listArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ArrayWithItemsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - return new ArrayWithItemsSchemaBoxedList(); - } - } - - @Test - public void testCorrectItemsSucceeds() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - List mutableList = new ArrayList<>(); - mutableList.add("a"); - FrozenList arg = new FrozenList<>(mutableList); - final ItemsValidator validator = new ItemsValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ArrayWithItemsSchema(), - arg, - validationMetadata - ) - ); - if (pathToSchemas == null) { - throw new RuntimeException("Invalid null value in pathToSchemas for this test case"); - } - List expectedPathToItem = new ArrayList<>(); - expectedPathToItem.add("args[0]"); - expectedPathToItem.add(0); - LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); - StringJsonSchema.StringJsonSchema1 schema = JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class); - expectedClasses.put(schema, null); - PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); - expectedPathToSchemas.put(expectedPathToItem, expectedClasses); - Assert.assertEquals(pathToSchemas, expectedPathToSchemas); - } - - @Test - public void testNotApplicableTypeReturnsNull() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - final ItemsValidator validator = new ItemsValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ArrayWithItemsSchema(), - 1, - validationMetadata - ) - ); - assertNull(pathToSchemas); - } - - @Test - public void testIncorrectItemFails() { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - List mutableList = new ArrayList<>(); - mutableList.add(1); - FrozenList arg = new FrozenList<>(mutableList); - final ItemsValidator validator = new ItemsValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - new ArrayWithItemsSchema(), - arg, - validationMetadata - ) - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java deleted file mode 100644 index 75ec0f18b1c..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/JsonSchemaTest.java +++ /dev/null @@ -1,80 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -sealed interface SomeSchemaBoxed permits SomeSchemaBoxedString {} -record SomeSchemaBoxedString() implements SomeSchemaBoxed {} - -public class JsonSchemaTest { - sealed interface SomeSchemaBoxed permits SomeSchemaBoxedString {} - record SomeSchemaBoxedString() implements SomeSchemaBoxed {} - - static class SomeSchema extends JsonSchema { - private static @Nullable SomeSchema instance = null; - protected SomeSchema() { - super(new JsonSchemaInfo() - .type(Set.of(String.class)) - ); - } - - public static SomeSchema getInstance() { - if (instance == null) { - instance = new SomeSchema(); - } - return instance; - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof String) { - return arg; - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof String) { - return arg; - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public SomeSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - return new SomeSchemaBoxedString(); - } - } - - @Test - public void testValidateSucceeds() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - SomeSchema schema = JsonSchemaFactory.getInstance(SomeSchema.class); - PathToSchemasMap pathToSchemas = JsonSchema.validate( - schema, - "hi", - validationMetadata - ); - PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); - LinkedHashMap, Void> validatedClasses = new LinkedHashMap<>(); - validatedClasses.put(schema, null); - expectedPathToSchemas.put(pathToItem, validatedClasses); - Assert.assertEquals(pathToSchemas, expectedPathToSchemas); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java deleted file mode 100644 index 5d5e1e869ed..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/PropertiesValidatorTest.java +++ /dev/null @@ -1,134 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.StringJsonSchema; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class PropertiesValidatorTest { - public sealed interface ObjectWithPropsSchemaBoxed permits ObjectWithPropsSchemaBoxedMap {} - public record ObjectWithPropsSchemaBoxedMap() implements ObjectWithPropsSchemaBoxed {} - - public static class ObjectWithPropsSchema extends JsonSchema { - private ObjectWithPropsSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("someString", StringJsonSchema.StringJsonSchema1.class) - )) - ); - - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map mapArg) { - return getNewInstance(mapArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return validate(mapArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithPropsSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithPropsSchemaBoxedMap(); - } - } - - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testCorrectPropertySucceeds() throws ValidationException { - final PropertiesValidator validator = new PropertiesValidator(); - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("someString", "abc"); - FrozenMap arg = new FrozenMap<>(mutableMap); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ObjectWithPropsSchema(), - arg, - validationMetadata - ) - ); - if (pathToSchemas == null) { - throw new RuntimeException("Invalid null value for pathToSchemas for this test case"); - } - List expectedPathToItem = new ArrayList<>(); - expectedPathToItem.add("args[0]"); - expectedPathToItem.add("someString"); - LinkedHashMap, Void> expectedClasses = new LinkedHashMap<>(); - expectedClasses.put(JsonSchemaFactory.getInstance(StringJsonSchema.StringJsonSchema1.class), null); - PathToSchemasMap expectedPathToSchemas = new PathToSchemasMap(); - expectedPathToSchemas.put(expectedPathToItem, expectedClasses); - Assert.assertEquals(pathToSchemas, expectedPathToSchemas); - } - - @Test - public void testNotApplicableTypeReturnsNull() throws ValidationException { - final PropertiesValidator validator = new PropertiesValidator(); - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ObjectWithPropsSchema(), - 1, - validationMetadata - ) - ); - assertNull(pathToSchemas); - } - - @Test - public void testIncorrectPropertyValueFails() { - final PropertiesValidator validator = new PropertiesValidator(); - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("someString", 1); - FrozenMap arg = new FrozenMap<>(mutableMap); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - new ObjectWithPropsSchema(), - arg, - validationMetadata - ) - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java deleted file mode 100644 index d05368c05de..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/RequiredValidatorTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; - -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class RequiredValidatorTest { - public sealed interface ObjectWithRequiredSchemaBoxed permits ObjectWithRequiredSchemaBoxedMap {} - public record ObjectWithRequiredSchemaBoxedMap() implements ObjectWithRequiredSchemaBoxed {} - - public static class ObjectWithRequiredSchema extends JsonSchema { - private ObjectWithRequiredSchema() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .required(Set.of("someString")) - ); - - } - - @Override - public Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map mapArg) { - return getNewInstance(mapArg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map mapArg) { - return validate(mapArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - - @Override - public ObjectWithRequiredSchemaBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - return new ObjectWithRequiredSchemaBoxedMap(); - } - } - - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testCorrectPropertySucceeds() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("someString", "abc"); - FrozenMap arg = new FrozenMap<>(mutableMap); - final RequiredValidator validator = new RequiredValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ObjectWithRequiredSchema(), - arg, - validationMetadata - ) - ); - assertNull(pathToSchemas); - } - - @Test - public void testNotApplicableTypeReturnsNull() throws ValidationException { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - final RequiredValidator validator = new RequiredValidator(); - PathToSchemasMap pathToSchemas = validator.validate( - new ValidationData( - new ObjectWithRequiredSchema(), - 1, - validationMetadata - ) - ); - assertNull(pathToSchemas); - } - - @Test - public void testIncorrectPropertyFails() { - List pathToItem = List.of("args[0]"); - ValidationMetadata validationMetadata = new ValidationMetadata( - pathToItem, - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - LinkedHashMap mutableMap = new LinkedHashMap<>(); - mutableMap.put("aDifferentProp", 1); - FrozenMap arg = new FrozenMap<>(mutableMap); - final RequiredValidator validator = new RequiredValidator(); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - new ObjectWithRequiredSchema(), - arg, - validationMetadata - ) - )); - } -} \ No newline at end of file diff --git a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java b/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java deleted file mode 100644 index 1938cf3d030..00000000000 --- a/samples/client/3_1_0_unit_test/java/src/test/java/unit_test_api/schemas/validation/TypeValidatorTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package unit_test_api.schemas.validation; - -import org.checkerframework.checker.nullness.qual.Nullable; -import org.junit.Assert; -import org.junit.Test; -import unit_test_api.configurations.JsonSchemaKeywordFlags; -import unit_test_api.configurations.SchemaConfiguration; -import unit_test_api.exceptions.ValidationException; -import unit_test_api.schemas.StringJsonSchema; - -import java.util.ArrayList; -import java.util.LinkedHashSet; - -public class TypeValidatorTest { - @SuppressWarnings("nullness") - private void assertNull(@Nullable Object object) { - Assert.assertNull(object); - } - - @Test - public void testValidateSucceeds() throws ValidationException { - final TypeValidator validator = new TypeValidator(); - ValidationMetadata validationMetadata = new ValidationMetadata( - new ArrayList<>(), - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - @Nullable PathToSchemasMap pathToSchemasMap = validator.validate( - new ValidationData( - StringJsonSchema.StringJsonSchema1.getInstance(), - "hi", - validationMetadata - ) - ); - assertNull(pathToSchemasMap); - } - - @Test - public void testValidateFailsIntIsNotString() { - final TypeValidator validator = new TypeValidator(); - ValidationMetadata validationMetadata = new ValidationMetadata( - new ArrayList<>(), - new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()), - new PathToSchemasMap(), - new LinkedHashSet<>() - ); - Assert.assertThrows(ValidationException.class, () -> validator.validate( - new ValidationData( - StringJsonSchema.StringJsonSchema1.getInstance(), - 1, - validationMetadata - ) - )); - } -} \ No newline at end of file From 43eb4b0b88798f964a125ecbfe5ba4c5048d22fc Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:19:01 -0700 Subject: [PATCH 40/44] Removes not files from python 303 --- .../python/docs/apis/tags/not_api.md | 19 --------- .../python/docs/components/schema/not.md | 28 ------------- .../src/unit_test_api/apis/tags/not_api.py | 31 -------------- .../unit_test_api/components/schema/not.py | 27 ------------- .../python/test/components/schema/test_not.py | 40 ------------------- 5 files changed, 145 deletions(-) delete mode 100644 samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md delete mode 100644 samples/client/3_0_3_unit_test/python/docs/components/schema/not.md delete mode 100644 samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py delete mode 100644 samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py delete mode 100644 samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py diff --git a/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md deleted file mode 100644 index 21b54a5d8cd..00000000000 --- a/samples/client/3_0_3_unit_test/python/docs/apis/tags/not_api.md +++ /dev/null @@ -1,19 +0,0 @@ - -unit_test_api.apis.tags.not_api -# NotApi - -All URIs are relative to the selected server -- The server is selected by passing in server_info and server_index into api_configuration.ApiConfiguration -- Code samples in endpoints documents show how to do this -- server_index can also be passed in to endpoint calls, see endpoint documentation - -Method | Description ------- | ------------- -[**post_forbidden_property_request_body**](../../paths/request_body_post_forbidden_property_request_body/post.md) | -[**post_forbidden_property_response_body_for_content_types**](../../paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | -[**post_not_more_complex_schema_request_body**](../../paths/request_body_post_not_more_complex_schema_request_body/post.md) | -[**post_not_more_complex_schema_response_body_for_content_types**](../../paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | -[**post_not_request_body**](../../paths/request_body_post_not_request_body/post.md) | -[**post_not_response_body_for_content_types**](../../paths/response_body_post_not_response_body_for_content_types/post.md) | - -[[Back to top]](#top) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) diff --git a/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md b/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md deleted file mode 100644 index e10c6adbdbe..00000000000 --- a/samples/client/3_0_3_unit_test/python/docs/components/schema/not.md +++ /dev/null @@ -1,28 +0,0 @@ -# Not -unit_test_api.components.schema.not -``` -type: schemas.Schema -``` - -## validate method -Input Type | Return Type | Notes ------------- | ------------- | ------------- -dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | - -## Composed Schemas (allOf/anyOf/oneOf/not) -## not -Schema Class | Input Type | Return Type ------------- | ---------- | ----------- -[Not2](#not2) | int | int - -# Not2 -``` -type: schemas.Schema -``` - -## validate method -Input Type | Return Type | Notes ------------- | ------------- | ------------- -int | int | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py deleted file mode 100644 index ffada1b468c..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/apis/tags/not_api.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from unit_test_api.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes - - -class NotApi( - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py b/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py deleted file mode 100644 index 56d010fd571..00000000000 --- a/samples/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not2: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore - diff --git a/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py b/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py deleted file mode 100644 index ece12ae010b..00000000000 --- a/samples/client/3_0_3_unit_test/python/test/components/schema/test_not.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import unittest - -import openapi_client -from openapi_client.components.schema.not import Not -from openapi_client.configurations import schema_configuration - - -class TestNot(unittest.TestCase): - """Not unit test stubs""" - configuration = schema_configuration.SchemaConfiguration( - disabled_json_schema_keywords={'format'} - ) - - def test_allowed_passes(self): - # allowed - Not.validate( - "foo", - configuration=self.configuration - ) - - def test_disallowed_fails(self): - # disallowed - with self.assertRaises((openapi_client.ApiValueError, openapi_client.ApiTypeError)): - Not.validate( - 1, - configuration=self.configuration - ) - - -if __name__ == '__main__': - unittest.main() From 4e4185ac2c88c4969c8a0af149139a8c9317ab06 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:20:30 -0700 Subject: [PATCH 41/44] Removes not files from python 310 --- .../python/docs/apis/tags/not_api.md | 21 ---------- .../src/unit_test_api/apis/tags/not_api.py | 35 ---------------- .../unit_test_api/components/schema/not.py | 27 ------------- .../python/test/components/schema/test_not.py | 40 ------------------- 4 files changed, 123 deletions(-) delete mode 100644 samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md delete mode 100644 samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py delete mode 100644 samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py delete mode 100644 samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py diff --git a/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md b/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md deleted file mode 100644 index 44eb9af9be5..00000000000 --- a/samples/client/3_1_0_unit_test/python/docs/apis/tags/not_api.md +++ /dev/null @@ -1,21 +0,0 @@ - -unit_test_api.apis.tags.not_api -# NotApi - -All URIs are relative to the selected server -- The server is selected by passing in server_info and server_index into api_configuration.ApiConfiguration -- Code samples in endpoints documents show how to do this -- server_index can also be passed in to endpoint calls, see endpoint documentation - -Method | Description ------- | ------------- -[**post_forbidden_property_request_body**](../../paths/request_body_post_forbidden_property_request_body/post.md) | -[**post_forbidden_property_response_body_for_content_types**](../../paths/response_body_post_forbidden_property_response_body_for_content_types/post.md) | -[**post_not_more_complex_schema_request_body**](../../paths/request_body_post_not_more_complex_schema_request_body/post.md) | -[**post_not_more_complex_schema_response_body_for_content_types**](../../paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.md) | -[**post_not_multiple_types_request_body**](../../paths/request_body_post_not_multiple_types_request_body/post.md) | -[**post_not_multiple_types_response_body_for_content_types**](../../paths/response_body_post_not_multiple_types_response_body_for_content_types/post.md) | -[**post_not_request_body**](../../paths/request_body_post_not_request_body/post.md) | -[**post_not_response_body_for_content_types**](../../paths/response_body_post_not_response_body_for_content_types/post.md) | - -[[Back to top]](#top) [[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md) diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py deleted file mode 100644 index 7699bbbee87..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/apis/tags/not_api.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from unit_test_api.paths.request_body_post_not_multiple_types_request_body.post.operation import PostNotMultipleTypesRequestBody -from unit_test_api.paths.request_body_post_not_request_body.post.operation import PostNotRequestBody -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post.operation import PostNotResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_not_multiple_types_response_body_for_content_types.post.operation import PostNotMultipleTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post.operation import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post.operation import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post.operation import PostForbiddenPropertyRequestBody -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post.operation import PostNotMoreComplexSchemaResponseBodyForContentTypes - - -class NotApi( - PostNotMultipleTypesRequestBody, - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNotMultipleTypesResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - pass diff --git a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py b/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py deleted file mode 100644 index 6e9df279c3e..00000000000 --- a/samples/client/3_1_0_unit_test/python/src/unit_test_api/components/schema/not.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from unit_test_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Not2: typing_extensions.TypeAlias = schemas.IntSchema - - -@dataclasses.dataclass(frozen=True) -class Not( - schemas.AnyTypeSchema[schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES], typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - """ - # any type - not_: typing.Type[Not2] = dataclasses.field(default_factory=lambda: Not2) # type: ignore - diff --git a/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py b/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py deleted file mode 100644 index 617c2dc964a..00000000000 --- a/samples/client/3_1_0_unit_test/python/test/components/schema/test_not.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.1.0 sample spec - sample spec for testing openapi functionality, built from json schema tests for draft2020-12 # noqa: E501 - The version of the OpenAPI document: 0.0.1 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import unittest - -import openapi_client -from openapi_client.components.schema.not import Not -from openapi_client.configurations import schema_configuration - - -class TestNot(unittest.TestCase): - """Not unit test stubs""" - configuration = schema_configuration.SchemaConfiguration( - disabled_json_schema_keywords={'format'} - ) - - def test_allowed_passes(self): - # allowed - Not.validate( - "foo", - configuration=self.configuration - ) - - def test_disallowed_fails(self): - # disallowed - with self.assertRaises((openapi_client.ApiValueError, openapi_client.ApiTypeError)): - Not.validate( - 1, - configuration=self.configuration - ) - - -if __name__ == '__main__': - unittest.main() From 9cfadb423f24442999aac6928d15651c81ddb7d2 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 18 Apr 2024 16:29:27 -0700 Subject: [PATCH 42/44] Removes files generated from when reservedWords was not integrated correctly --- .../python/docs/components/schema/not.md | 28 -- .../docs/components/schemas/ApiResponse.md | 254 ----------- .../java/docs/components/schemas/Boolean.md | 52 --- .../java/docs/components/schemas/Number.md | 52 --- .../java/docs/components/schemas/Return.md | 257 ----------- .../java/docs/components/schemas/String.md | 52 --- .../components/schemas/ApiResponse.java | 289 ------------ .../client/components/schemas/Boolean.java | 19 - .../client/components/schemas/Number.java | 19 - .../client/components/schemas/Return.java | 417 ------------------ .../client/components/schemas/String.java | 19 - .../components/schemas/ApiResponseTest.java | 18 - .../components/schemas/BooleanTest.java | 18 - .../client/components/schemas/NumberTest.java | 18 - .../client/components/schemas/ReturnTest.java | 18 - .../client/components/schemas/StringTest.java | 18 - .../python/docs/components/schema/return.md | 46 -- .../petstore_api/components/schema/return.py | 98 ---- .../test/components/schema/test_return.py | 25 -- 19 files changed, 1717 deletions(-) delete mode 100644 samples/client/3_1_0_unit_test/python/docs/components/schema/not.md delete mode 100644 samples/client/petstore/java/docs/components/schemas/ApiResponse.md delete mode 100644 samples/client/petstore/java/docs/components/schemas/Boolean.md delete mode 100644 samples/client/petstore/java/docs/components/schemas/Number.md delete mode 100644 samples/client/petstore/java/docs/components/schemas/Return.md delete mode 100644 samples/client/petstore/java/docs/components/schemas/String.md delete mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java delete mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java delete mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java delete mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java delete mode 100644 samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java delete mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java delete mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java delete mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java delete mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java delete mode 100644 samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java delete mode 100644 samples/client/petstore/python/docs/components/schema/return.md delete mode 100644 samples/client/petstore/python/src/petstore_api/components/schema/return.py delete mode 100644 samples/client/petstore/python/test/components/schema/test_return.py diff --git a/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md b/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md deleted file mode 100644 index e10c6adbdbe..00000000000 --- a/samples/client/3_1_0_unit_test/python/docs/components/schema/not.md +++ /dev/null @@ -1,28 +0,0 @@ -# Not -unit_test_api.components.schema.not -``` -type: schemas.Schema -``` - -## validate method -Input Type | Return Type | Notes ------------- | ------------- | ------------- -dict, schemas.immutabledict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | schemas.immutabledict, str, float, int, bool, None, tuple, bytes, io.FileIO | - -## Composed Schemas (allOf/anyOf/oneOf/not) -## not -Schema Class | Input Type | Return Type ------------- | ---------- | ----------- -[Not2](#not2) | int | int - -# Not2 -``` -type: schemas.Schema -``` - -## validate method -Input Type | Return Type | Notes ------------- | ------------- | ------------- -int | int | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/ApiResponse.md b/samples/client/petstore/java/docs/components/schemas/ApiResponse.md deleted file mode 100644 index 2c04cf5601c..00000000000 --- a/samples/client/petstore/java/docs/components/schemas/ApiResponse.md +++ /dev/null @@ -1,254 +0,0 @@ -# ApiResponse -org.openapijsonschematools.client.components.schemas.ApiResponse.java -public class ApiResponse
          - -A class that contains necessary nested -- schema classes (which validate payloads), extends JsonSchema -- sealed interfaces which store validated payloads, java version of a sum type -- boxed classes which store validated payloads, sealed permits class implementations -- classes to store validated map payloads, extends FrozenMap -- classes to build inputs for map payloads - -## Nested Class Summary -| Modifier and Type | Class and Description | -| ----------------- | ---------------------- | -| sealed interface | [ApiResponse.ApiResponse1Boxed](#apiresponse1boxed)
          sealed interface for validated payloads | -| record | [ApiResponse.ApiResponse1BoxedMap](#apiresponse1boxedmap)
          boxed class to store validated Map payloads | -| static class | [ApiResponse.ApiResponse1](#apiresponse1)
          schema class | -| static class | [ApiResponse.ApiResponseMapBuilder](#apiresponsemapbuilder)
          builder for Map payloads | -| static class | [ApiResponse.ApiResponseMap](#apiresponsemap)
          output class for Map payloads | -| sealed interface | [ApiResponse.MessageBoxed](#messageboxed)
          sealed interface for validated payloads | -| record | [ApiResponse.MessageBoxedString](#messageboxedstring)
          boxed class to store validated String payloads | -| static class | [ApiResponse.Message](#message)
          schema class | -| sealed interface | [ApiResponse.TypeBoxed](#typeboxed)
          sealed interface for validated payloads | -| record | [ApiResponse.TypeBoxedString](#typeboxedstring)
          boxed class to store validated String payloads | -| static class | [ApiResponse.Type](#type)
          schema class | -| sealed interface | [ApiResponse.CodeBoxed](#codeboxed)
          sealed interface for validated payloads | -| record | [ApiResponse.CodeBoxedNumber](#codeboxednumber)
          boxed class to store validated Number payloads | -| static class | [ApiResponse.Code](#code)
          schema class | - -## ApiResponse1Boxed -public sealed interface ApiResponse1Boxed
          -permits
          -[ApiResponse1BoxedMap](#apiresponse1boxedmap) - -sealed interface that stores validated payloads using boxed classes - -## ApiResponse1BoxedMap -public record ApiResponse1BoxedMap
          -implements [ApiResponse1Boxed](#apiresponse1boxed) - -record that stores validated Map payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| ApiResponse1BoxedMap([ApiResponseMap](#apiresponsemap) data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| [ApiResponseMap](#apiresponsemap) | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## ApiResponse1 -public static class ApiResponse1
          -extends JsonSchema - -A schema class that validates payloads - -### Code Sample -``` -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.components.schemas.ApiResponse; - -import java.util.Arrays; -import java.util.List; -import java.util.AbstractMap; - -static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build()); - -// Map validation -ApiResponse.ApiResponseMap validatedPayload = - ApiResponse.ApiResponse1.validate( - new ApiResponse.ApiResponseMapBuilder() - .code(1) - - .type("a") - - .message("a") - - .build(), - configuration -); -``` - -### Field Summary -| Modifier and Type | Field and Description | -| ----------------- | ---------------------- | -| Set> | type = Set.of(Map.class) | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("code", [Code.class](#code))),
              new PropertyEntry("type", [Type.class](#type))),
              new PropertyEntry("message", [Message.class](#message)))
          )
          | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| [ApiResponseMap](#apiresponsemap) | validate([Map<?, ?>](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | -| [ApiResponse1BoxedMap](#apiresponse1boxedmap) | validateAndBox([Map<?, ?>](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | -| [ApiResponse1Boxed](#apiresponse1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | -| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | - -## ApiResponseMapBuilder -public class ApiResponseMapBuilder
          -builder for `Map` - -A class that builds the Map input type - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| ApiResponseMapBuilder()
          Creates a builder that contains an empty map | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Map | build()
          Returns map input that should be used with Schema.validate | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | code(int value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | code(float value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | type(String value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | message(String value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, Void value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, boolean value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, String value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, int value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, float value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, long value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, double value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, List value) | -| [ApiResponseMapBuilder](#apiresponsemapbuilder) | additionalProperty(String key, Map value) | - -## ApiResponseMap -public static class ApiResponseMap
          -extends FrozenMap - -A class to store validated Map payloads - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| static [ApiResponseMap](#apiresponsemap) | of([Map](#apiresponsemapbuilder) arg, SchemaConfiguration configuration) | -| Number | code()
          [optional] value must be a 32 bit integer | -| String | type()
          [optional] | -| String | message()
          [optional] | -| @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | - -## MessageBoxed -public sealed interface MessageBoxed
          -permits
          -[MessageBoxedString](#messageboxedstring) - -sealed interface that stores validated payloads using boxed classes - -## MessageBoxedString -public record MessageBoxedString
          -implements [MessageBoxed](#messageboxed) - -record that stores validated String payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| MessageBoxedString(String data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| String | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Message -public static class Message
          -extends StringJsonSchema.StringJsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -## TypeBoxed -public sealed interface TypeBoxed
          -permits
          -[TypeBoxedString](#typeboxedstring) - -sealed interface that stores validated payloads using boxed classes - -## TypeBoxedString -public record TypeBoxedString
          -implements [TypeBoxed](#typeboxed) - -record that stores validated String payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| TypeBoxedString(String data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| String | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Type -public static class Type
          -extends StringJsonSchema.StringJsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -## CodeBoxed -public sealed interface CodeBoxed
          -permits
          -[CodeBoxedNumber](#codeboxednumber) - -sealed interface that stores validated payloads using boxed classes - -## CodeBoxedNumber -public record CodeBoxedNumber
          -implements [CodeBoxed](#codeboxed) - -record that stores validated Number payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| CodeBoxedNumber(Number data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Number | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Code -public static class Code
          -extends Int32JsonSchema.Int32JsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/Boolean.md b/samples/client/petstore/java/docs/components/schemas/Boolean.md deleted file mode 100644 index b1352de61ca..00000000000 --- a/samples/client/petstore/java/docs/components/schemas/Boolean.md +++ /dev/null @@ -1,52 +0,0 @@ -# Boolean -org.openapijsonschematools.client.components.schemas.Boolean.java -public class Boolean
          - -A class that contains necessary nested -- schema classes (which validate payloads), extends JsonSchema -- sealed interfaces which store validated payloads, java version of a sum type -- boxed classes which store validated payloads, sealed permits class implementations - -## Nested Class Summary -| Modifier and Type | Class and Description | -| ----------------- | ---------------------- | -| sealed interface | [Boolean.Boolean1Boxed](#boolean1boxed)
          sealed interface for validated payloads | -| record | [Boolean.Boolean1BoxedBoolean](#boolean1boxedboolean)
          boxed class to store validated boolean payloads | -| static class | [Boolean.Boolean1](#boolean1)
          schema class | - -## Boolean1Boxed -public sealed interface Boolean1Boxed
          -permits
          -[Boolean1BoxedBoolean](#boolean1boxedboolean) - -sealed interface that stores validated payloads using boxed classes - -## Boolean1BoxedBoolean -public record Boolean1BoxedBoolean
          -implements [Boolean1Boxed](#boolean1boxed) - -record that stores validated boolean payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Boolean1BoxedBoolean(boolean data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| boolean | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Boolean1 -public static class Boolean1
          -extends BooleanJsonSchema.BooleanJsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.BooleanJsonSchema.BooleanJsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/Number.md b/samples/client/petstore/java/docs/components/schemas/Number.md deleted file mode 100644 index 4c145b268c4..00000000000 --- a/samples/client/petstore/java/docs/components/schemas/Number.md +++ /dev/null @@ -1,52 +0,0 @@ -# Number -org.openapijsonschematools.client.components.schemas.Number.java -public class Number
          - -A class that contains necessary nested -- schema classes (which validate payloads), extends JsonSchema -- sealed interfaces which store validated payloads, java version of a sum type -- boxed classes which store validated payloads, sealed permits class implementations - -## Nested Class Summary -| Modifier and Type | Class and Description | -| ----------------- | ---------------------- | -| sealed interface | [Number.Number1Boxed](#number1boxed)
          sealed interface for validated payloads | -| record | [Number.Number1BoxedNumber](#number1boxednumber)
          boxed class to store validated Number payloads | -| static class | [Number.Number1](#number1)
          schema class | - -## Number1Boxed -public sealed interface Number1Boxed
          -permits
          -[Number1BoxedNumber](#number1boxednumber) - -sealed interface that stores validated payloads using boxed classes - -## Number1BoxedNumber -public record Number1BoxedNumber
          -implements [Number1Boxed](#number1boxed) - -record that stores validated Number payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Number1BoxedNumber(Number data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Number | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Number1 -public static class Number1
          -extends NumberJsonSchema.NumberJsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.NumberJsonSchema.NumberJsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/Return.md b/samples/client/petstore/java/docs/components/schemas/Return.md deleted file mode 100644 index 7aa9d8cb899..00000000000 --- a/samples/client/petstore/java/docs/components/schemas/Return.md +++ /dev/null @@ -1,257 +0,0 @@ -# Return -org.openapijsonschematools.client.components.schemas.Return.java -public class Return
          - -A class that contains necessary nested -- schema classes (which validate payloads), extends JsonSchema -- sealed interfaces which store validated payloads, java version of a sum type -- boxed classes which store validated payloads, sealed permits class implementations -- classes to store validated map payloads, extends FrozenMap -- classes to build inputs for map payloads - -## Nested Class Summary -| Modifier and Type | Class and Description | -| ----------------- | ---------------------- | -| sealed interface | [Return.Return1Boxed](#return1boxed)
          sealed interface for validated payloads | -| record | [Return.Return1BoxedVoid](#return1boxedvoid)
          boxed class to store validated null payloads | -| record | [Return.Return1BoxedBoolean](#return1boxedboolean)
          boxed class to store validated boolean payloads | -| record | [Return.Return1BoxedNumber](#return1boxednumber)
          boxed class to store validated Number payloads | -| record | [Return.Return1BoxedString](#return1boxedstring)
          boxed class to store validated String payloads | -| record | [Return.Return1BoxedList](#return1boxedlist)
          boxed class to store validated List payloads | -| record | [Return.Return1BoxedMap](#return1boxedmap)
          boxed class to store validated Map payloads | -| static class | [Return.Return1](#return1)
          schema class | -| static class | [Return.ReturnMapBuilder1](#returnmapbuilder1)
          builder for Map payloads | -| static class | [Return.ReturnMap](#returnmap)
          output class for Map payloads | -| sealed interface | [Return.Return2Boxed](#return2boxed)
          sealed interface for validated payloads | -| record | [Return.Return2BoxedNumber](#return2boxednumber)
          boxed class to store validated Number payloads | -| static class | [Return.Return2](#return2)
          schema class | - -## Return1Boxed -public sealed interface Return1Boxed
          -permits
          -[Return1BoxedVoid](#return1boxedvoid), -[Return1BoxedBoolean](#return1boxedboolean), -[Return1BoxedNumber](#return1boxednumber), -[Return1BoxedString](#return1boxedstring), -[Return1BoxedList](#return1boxedlist), -[Return1BoxedMap](#return1boxedmap) - -sealed interface that stores validated payloads using boxed classes - -## Return1BoxedVoid -public record Return1BoxedVoid
          -implements [Return1Boxed](#return1boxed) - -record that stores validated null payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedVoid(Void data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Void | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1BoxedBoolean -public record Return1BoxedBoolean
          -implements [Return1Boxed](#return1boxed) - -record that stores validated boolean payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedBoolean(boolean data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| boolean | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1BoxedNumber -public record Return1BoxedNumber
          -implements [Return1Boxed](#return1boxed) - -record that stores validated Number payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedNumber(Number data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Number | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1BoxedString -public record Return1BoxedString
          -implements [Return1Boxed](#return1boxed) - -record that stores validated String payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedString(String data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| String | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1BoxedList -public record Return1BoxedList
          -implements [Return1Boxed](#return1boxed) - -record that stores validated List payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedList(FrozenList<@Nullable Object> data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| FrozenList<@Nullable Object> | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1BoxedMap -public record Return1BoxedMap
          -implements [Return1Boxed](#return1boxed) - -record that stores validated Map payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return1BoxedMap([ReturnMap](#returnmap) data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| [ReturnMap](#returnmap) | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return1 -public static class Return1
          -extends JsonSchema - -A schema class that validates payloads - -## Description -Model for testing reserved words - -### Field Summary -| Modifier and Type | Field and Description | -| ----------------- | ---------------------- | -| Map> | properties = Map.ofEntries(
              new PropertyEntry("return", [Return2.class](#return2)))
          )
          | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| String | validate(String arg, SchemaConfiguration configuration) | -| Void | validate(Void arg, SchemaConfiguration configuration) | -| int | validate(int arg, SchemaConfiguration configuration) | -| long | validate(long arg, SchemaConfiguration configuration) | -| float | validate(float arg, SchemaConfiguration configuration) | -| double | validate(double arg, SchemaConfiguration configuration) | -| Number | validate(Number arg, SchemaConfiguration configuration) | -| boolean | validate(boolean arg, SchemaConfiguration configuration) | -| [ReturnMap](#returnmap) | validate([Map<?, ?>](#returnmapbuilder1) arg, SchemaConfiguration configuration) | -| FrozenList<@Nullable Object> | validate(List arg, SchemaConfiguration configuration) | -| [Return1BoxedString](#return1boxedstring) | validateAndBox(String arg, SchemaConfiguration configuration) | -| [Return1BoxedVoid](#return1boxedvoid) | validateAndBox(Void arg, SchemaConfiguration configuration) | -| [Return1BoxedNumber](#return1boxednumber) | validateAndBox(Number arg, SchemaConfiguration configuration) | -| [Return1BoxedBoolean](#return1boxedboolean) | validateAndBox(boolean arg, SchemaConfiguration configuration) | -| [Return1BoxedMap](#return1boxedmap) | validateAndBox([Map<?, ?>](#returnmapbuilder1) arg, SchemaConfiguration configuration) | -| [Return1BoxedList](#return1boxedlist) | validateAndBox(List arg, SchemaConfiguration configuration) | -| [Return1Boxed](#return1boxed) | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) | -| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) | - -## ReturnMapBuilder1 -public class ReturnMapBuilder1
          -builder for `Map` - -A class that builds the Map input type - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| ReturnMapBuilder1()
          Creates a builder that contains an empty map | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Map | build()
          Returns map input that should be used with Schema.validate | -| [ReturnMapBuilder1](#returnmapbuilder1) | return(int value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | return(float value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, Void value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, boolean value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, String value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, int value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, float value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, long value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, double value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, List value) | -| [ReturnMapBuilder1](#returnmapbuilder1) | additionalProperty(String key, Map value) | - -## ReturnMap -public static class ReturnMap
          -extends FrozenMap - -A class to store validated Map payloads - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| static [ReturnMap](#returnmap) | of([Map](#returnmapbuilder1) arg, SchemaConfiguration configuration) | -| Number | return()
          [optional] value must be a 32 bit integer | -| @Nullable Object | getAdditionalProperty(String name)
          provides type safety for additional properties | - -## Return2Boxed -public sealed interface Return2Boxed
          -permits
          -[Return2BoxedNumber](#return2boxednumber) - -sealed interface that stores validated payloads using boxed classes - -## Return2BoxedNumber -public record Return2BoxedNumber
          -implements [Return2Boxed](#return2boxed) - -record that stores validated Number payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| Return2BoxedNumber(Number data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| Number | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## Return2 -public static class Return2
          -extends Int32JsonSchema.Int32JsonSchema1 - -A schema class that validates payloads - -## Description -this is a reserved python keyword - -| Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/docs/components/schemas/String.md b/samples/client/petstore/java/docs/components/schemas/String.md deleted file mode 100644 index 454448d675e..00000000000 --- a/samples/client/petstore/java/docs/components/schemas/String.md +++ /dev/null @@ -1,52 +0,0 @@ -# String -org.openapijsonschematools.client.components.schemas.String.java -public class String
          - -A class that contains necessary nested -- schema classes (which validate payloads), extends JsonSchema -- sealed interfaces which store validated payloads, java version of a sum type -- boxed classes which store validated payloads, sealed permits class implementations - -## Nested Class Summary -| Modifier and Type | Class and Description | -| ----------------- | ---------------------- | -| sealed interface | [String.String1Boxed](#string1boxed)
          sealed interface for validated payloads | -| record | [String.String1BoxedString](#string1boxedstring)
          boxed class to store validated String payloads | -| static class | [String.String1](#string1)
          schema class | - -## String1Boxed -public sealed interface String1Boxed
          -permits
          -[String1BoxedString](#string1boxedstring) - -sealed interface that stores validated payloads using boxed classes - -## String1BoxedString -public record String1BoxedString
          -implements [String1Boxed](#string1boxed) - -record that stores validated String payloads, sealed permits implementation - -### Constructor Summary -| Constructor and Description | -| --------------------------- | -| String1BoxedString(String data)
          Creates an instance, private visibility | - -### Method Summary -| Modifier and Type | Method and Description | -| ----------------- | ---------------------- | -| String | data()
          validated payload | -| @Nullable Object | getData()
          validated payload | - -## String1 -public static class String1
          -extends StringJsonSchema.StringJsonSchema1 - -A schema class that validates payloads - -| Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1 | -| ------------------------------------------------------------------ | -| validate | -| validateAndBox | - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java deleted file mode 100644 index f0ffa015ebf..00000000000 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/ApiResponse.java +++ /dev/null @@ -1,289 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.Int32JsonSchema; -import org.openapijsonschematools.client.schemas.StringJsonSchema; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; - -public class ApiResponse { - // nest classes so all schemas and input/output classes can be public - - - public static class Code extends Int32JsonSchema.Int32JsonSchema1 { - private static @Nullable Code instance = null; - public static Code getInstance() { - if (instance == null) { - instance = new Code(); - } - return instance; - } - } - - - public static class Type extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Type instance = null; - public static Type getInstance() { - if (instance == null) { - instance = new Type(); - } - return instance; - } - } - - - public static class Message extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable Message instance = null; - public static Message getInstance() { - if (instance == null) { - instance = new Message(); - } - return instance; - } - } - - - public static class ApiResponseMap extends FrozenMap<@Nullable Object> { - protected ApiResponseMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "code", - "type", - "message" - ); - public static ApiResponseMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return ApiResponse1.getInstance().validate(arg, configuration); - } - - public Number code() throws UnsetPropertyException { - String key = "code"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for code"); - } - return (Number) value; - } - - public String type() throws UnsetPropertyException { - String key = "type"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for type"); - } - return (String) value; - } - - public String message() throws UnsetPropertyException { - String key = "message"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof String)) { - throw new RuntimeException("Invalid value stored for message"); - } - return (String) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForCode { - Map getInstance(); - T getBuilderAfterCode(Map instance); - - default T code(int value) { - var instance = getInstance(); - instance.put("code", value); - return getBuilderAfterCode(instance); - } - - default T code(float value) { - var instance = getInstance(); - instance.put("code", value); - return getBuilderAfterCode(instance); - } - } - - public interface SetterForType { - Map getInstance(); - T getBuilderAfterType(Map instance); - - default T type(String value) { - var instance = getInstance(); - instance.put("type", value); - return getBuilderAfterType(instance); - } - } - - public interface SetterForMessage { - Map getInstance(); - T getBuilderAfterMessage(Map instance); - - default T message(String value) { - var instance = getInstance(); - instance.put("message", value); - return getBuilderAfterMessage(instance); - } - } - - public static class ApiResponseMapBuilder extends UnsetAddPropsSetter implements GenericBuilder>, SetterForCode, SetterForType, SetterForMessage { - private final Map instance; - private static final Set knownKeys = Set.of( - "code", - "type", - "message" - ); - public Set getKnownKeys() { - return knownKeys; - } - public ApiResponseMapBuilder() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public ApiResponseMapBuilder getBuilderAfterCode(Map instance) { - return this; - } - public ApiResponseMapBuilder getBuilderAfterType(Map instance) { - return this; - } - public ApiResponseMapBuilder getBuilderAfterMessage(Map instance) { - return this; - } - public ApiResponseMapBuilder getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface ApiResponse1Boxed permits ApiResponse1BoxedMap { - @Nullable Object getData(); - } - - public record ApiResponse1BoxedMap(ApiResponseMap data) implements ApiResponse1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class ApiResponse1 extends JsonSchema implements MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - */ - private static @Nullable ApiResponse1 instance = null; - - protected ApiResponse1() { - super(new JsonSchemaInfo() - .type(Set.of(Map.class)) - .properties(Map.ofEntries( - new PropertyEntry("code", Code.class), - new PropertyEntry("type", Type.class), - new PropertyEntry("message", Message.class) - )) - ); - } - - public static ApiResponse1 getInstance() { - if (instance == null) { - instance = new ApiResponse1(); - } - return instance; - } - - public ApiResponseMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new ApiResponseMap(castProperties); - } - - public ApiResponseMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public ApiResponse1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new ApiResponse1BoxedMap(validate(arg, configuration)); - } - @Override - public ApiResponse1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } - -} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java deleted file mode 100644 index ae055a342a8..00000000000 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Boolean.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.schemas.BooleanJsonSchema; - -public class Boolean extends BooleanJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Boolean1 extends BooleanJsonSchema.BooleanJsonSchema1 { - private static @Nullable Boolean1 instance = null; - public static Boolean1 getInstance() { - if (instance == null) { - instance = new Boolean1(); - } - return instance; - } - } - -} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java deleted file mode 100644 index cc684fd4aa0..00000000000 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Number.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.schemas.NumberJsonSchema; - -public class Number extends NumberJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class Number1 extends NumberJsonSchema.NumberJsonSchema1 { - private static @Nullable Number1 instance = null; - public static Number1 getInstance() { - if (instance == null) { - instance = new Number1(); - } - return instance; - } - } - -} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java deleted file mode 100644 index 9b1bf6cfc5c..00000000000 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/Return.java +++ /dev/null @@ -1,417 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; -import java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.InvalidAdditionalPropertyException; -import org.openapijsonschematools.client.exceptions.UnsetPropertyException; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.GenericBuilder; -import org.openapijsonschematools.client.schemas.Int32JsonSchema; -import org.openapijsonschematools.client.schemas.UnsetAddPropsSetter; -import org.openapijsonschematools.client.schemas.validation.BooleanSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.FrozenList; -import org.openapijsonschematools.client.schemas.validation.FrozenMap; -import org.openapijsonschematools.client.schemas.validation.JsonSchema; -import org.openapijsonschematools.client.schemas.validation.JsonSchemaInfo; -import org.openapijsonschematools.client.schemas.validation.ListSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.MapSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NullSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.NumberSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.PathToSchemasMap; -import org.openapijsonschematools.client.schemas.validation.PropertyEntry; -import org.openapijsonschematools.client.schemas.validation.StringSchemaValidator; -import org.openapijsonschematools.client.schemas.validation.ValidationMetadata; - -public class Return { - // nest classes so all schemas and input/output classes can be public - - - public static class Return2 extends Int32JsonSchema.Int32JsonSchema1 { - private static @Nullable Return2 instance = null; - public static Return2 getInstance() { - if (instance == null) { - instance = new Return2(); - } - return instance; - } - } - - - public static class ReturnMap extends FrozenMap<@Nullable Object> { - protected ReturnMap(FrozenMap<@Nullable Object> m) { - super(m); - } - public static final Set requiredKeys = Set.of(); - public static final Set optionalKeys = Set.of( - "return" - ); - public static ReturnMap of(Map arg, SchemaConfiguration configuration) throws ValidationException { - return Return1.getInstance().validate(arg, configuration); - } - - public Number return() throws UnsetPropertyException { - String key = "return"; - throwIfKeyNotPresent(key); - @Nullable Object value = get(key); - if (!(value instanceof Number)) { - throw new RuntimeException("Invalid value stored for return"); - } - return (Number) value; - } - - public @Nullable Object getAdditionalProperty(String name) throws UnsetPropertyException, InvalidAdditionalPropertyException { - throwIfKeyKnown(name, requiredKeys, optionalKeys); - throwIfKeyNotPresent(name); - return get(name); - } - } - - public interface SetterForReturn2 { - Map getInstance(); - T getBuilderAfterReturn2(Map instance); - - default T return(int value) { - var instance = getInstance(); - instance.put("return", value); - return getBuilderAfterReturn2(instance); - } - - default T return(float value) { - var instance = getInstance(); - instance.put("return", value); - return getBuilderAfterReturn2(instance); - } - } - - public static class ReturnMapBuilder1 extends UnsetAddPropsSetter implements GenericBuilder>, SetterForReturn2 { - private final Map instance; - private static final Set knownKeys = Set.of( - "return" - ); - public Set getKnownKeys() { - return knownKeys; - } - public ReturnMapBuilder1() { - this.instance = new LinkedHashMap<>(); - } - public Map build() { - return instance; - } - public Map getInstance() { - return instance; - } - public ReturnMapBuilder1 getBuilderAfterReturn2(Map instance) { - return this; - } - public ReturnMapBuilder1 getBuilderAfterAdditionalProperty(Map instance) { - return this; - } - } - - - public sealed interface Return1Boxed permits Return1BoxedVoid, Return1BoxedBoolean, Return1BoxedNumber, Return1BoxedString, Return1BoxedList, Return1BoxedMap { - @Nullable Object getData(); - } - - public record Return1BoxedVoid(Void data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Return1BoxedBoolean(boolean data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Return1BoxedNumber(Number data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Return1BoxedString(String data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Return1BoxedList(FrozenList<@Nullable Object> data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - public record Return1BoxedMap(ReturnMap data) implements Return1Boxed { - @Override - public @Nullable Object getData() { - return data; - } - } - - - public static class Return1 extends JsonSchema implements NullSchemaValidator, BooleanSchemaValidator, NumberSchemaValidator, StringSchemaValidator, ListSchemaValidator, Return1BoxedList>, MapSchemaValidator { - /* - NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Model for testing reserved words - */ - private static @Nullable Return1 instance = null; - - protected Return1() { - super(new JsonSchemaInfo() - .properties(Map.ofEntries( - new PropertyEntry("return", Return2.class) - )) - ); - } - - public static Return1 getInstance() { - if (instance == null) { - instance = new Return1(); - } - return instance; - } - - @Override - public Void validate(Void arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Void castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public boolean validate(boolean arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - boolean castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - @Override - public Number validate(Number arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Number castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public int validate(int arg, SchemaConfiguration configuration) throws ValidationException { - return (int) validate((Number) arg, configuration); - } - - public long validate(long arg, SchemaConfiguration configuration) throws ValidationException { - return (long) validate((Number) arg, configuration); - } - - public float validate(float arg, SchemaConfiguration configuration) throws ValidationException { - return (float) validate((Number) arg, configuration); - } - - public double validate(double arg, SchemaConfiguration configuration) throws ValidationException { - return (double) validate((Number) arg, configuration); - } - - @Override - public String validate(String arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - String castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - getPathToSchemas(this, castArg, validationMetadata, pathSet); - return castArg; - } - - public String validate(LocalDate arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(ZonedDateTime arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - public String validate(UUID arg, SchemaConfiguration configuration) throws ValidationException { - return validate(arg.toString(), configuration); - } - - @Override - public FrozenList<@Nullable Object> getNewInstance(List arg, List pathToItem, PathToSchemasMap pathToSchemas) { - List<@Nullable Object> items = new ArrayList<>(); - int i = 0; - for (Object item: arg) { - List itemPathToItem = new ArrayList<>(pathToItem); - itemPathToItem.add(i); - LinkedHashMap, Void> schemas = pathToSchemas.get(itemPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema itemSchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object itemInstance = itemSchema.getNewInstance(item, itemPathToItem, pathToSchemas); - items.add(itemInstance); - i += 1; - } - FrozenList<@Nullable Object> newInstanceItems = new FrozenList<>(items); - return newInstanceItems; - } - - public FrozenList<@Nullable Object> validate(List arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0"); - List castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, new PathToSchemasMap(), new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public ReturnMap getNewInstance(Map arg, List pathToItem, PathToSchemasMap pathToSchemas) { - LinkedHashMap properties = new LinkedHashMap<>(); - for(Map.Entry entry: arg.entrySet()) { - @Nullable Object entryKey = entry.getKey(); - if (!(entryKey instanceof String)) { - throw new RuntimeException("Invalid non-string key value"); - } - String propertyName = (String) entryKey; - List propertyPathToItem = new ArrayList<>(pathToItem); - propertyPathToItem.add(propertyName); - Object value = entry.getValue(); - LinkedHashMap, Void> schemas = pathToSchemas.get(propertyPathToItem); - if (schemas == null) { - throw new RuntimeException("Validation result is invalid, schemas must exist for a pathToItem"); - } - JsonSchema propertySchema = schemas.entrySet().iterator().next().getKey(); - @Nullable Object propertyInstance = propertySchema.getNewInstance(value, propertyPathToItem, pathToSchemas); - properties.put(propertyName, propertyInstance); - } - FrozenMap<@Nullable Object> castProperties = new FrozenMap<>(properties); - return new ReturnMap(castProperties); - } - - public ReturnMap validate(Map arg, SchemaConfiguration configuration) throws ValidationException { - Set> pathSet = new HashSet<>(); - List pathToItem = List.of("args[0]"); - Map castArg = castToAllowedTypes(arg, pathToItem, pathSet); - SchemaConfiguration usedConfiguration = Objects.requireNonNullElseGet(configuration, () -> new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build())); - PathToSchemasMap validatedPathToSchemas = new PathToSchemasMap(); - ValidationMetadata validationMetadata = new ValidationMetadata(pathToItem, usedConfiguration, validatedPathToSchemas, new LinkedHashSet<>()); - PathToSchemasMap pathToSchemasMap = getPathToSchemas(this, castArg, validationMetadata, pathSet); - return getNewInstance(castArg, validationMetadata.pathToItem(), pathToSchemasMap); - } - - @Override - public @Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - return validate((Void) null, configuration); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return validate(boolArg, configuration); - } else if (arg instanceof Number) { - return validate((Number) arg, configuration); - } else if (arg instanceof String) { - return validate((String) arg, configuration); - } else if (arg instanceof List) { - return validate((List) arg, configuration); - } else if (arg instanceof Map) { - return validate((Map) arg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - @Override - public @Nullable Object getNewInstance(@Nullable Object arg, List pathToItem, PathToSchemasMap pathToSchemas) { - if (arg == null) { - return getNewInstance((Void) null, pathToItem, pathToSchemas); - } else if (arg instanceof Boolean) { - boolean boolArg = (Boolean) arg; - return getNewInstance(boolArg, pathToItem, pathToSchemas); - } else if (arg instanceof Number) { - return getNewInstance((Number) arg, pathToItem, pathToSchemas); - } else if (arg instanceof String) { - return getNewInstance((String) arg, pathToItem, pathToSchemas); - } else if (arg instanceof List) { - return getNewInstance((List) arg, pathToItem, pathToSchemas); - } else if (arg instanceof Map) { - return getNewInstance((Map) arg, pathToItem, pathToSchemas); - } - throw new RuntimeException("Invalid input type="+getClass(arg)+". It can't be instantiated by this schema"); - } - @Override - public Return1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedVoid(validate(arg, configuration)); - } - @Override - public Return1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedBoolean(validate(arg, configuration)); - } - @Override - public Return1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedNumber(validate(arg, configuration)); - } - @Override - public Return1BoxedString validateAndBox(String arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedString(validate(arg, configuration)); - } - @Override - public Return1BoxedList validateAndBox(List arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedList(validate(arg, configuration)); - } - @Override - public Return1BoxedMap validateAndBox(Map arg, SchemaConfiguration configuration) throws ValidationException { - return new Return1BoxedMap(validate(arg, configuration)); - } - @Override - public Return1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) throws ValidationException { - if (arg == null) { - Void castArg = (Void) arg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof Boolean booleanArg) { - boolean castArg = booleanArg; - return validateAndBox(castArg, configuration); - } else if (arg instanceof String castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Number castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof List castArg) { - return validateAndBox(castArg, configuration); - } else if (arg instanceof Map castArg) { - return validateAndBox(castArg, configuration); - } - throw new ValidationException("Invalid input type="+getClass(arg)+". It can't be validated by this schema"); - } - } -} diff --git a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java b/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java deleted file mode 100644 index 6bbe281bfe5..00000000000 --- a/samples/client/petstore/java/src/main/java/org/openapijsonschematools/client/components/schemas/String.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.openapijsonschematools.client.schemas.StringJsonSchema; - -public class String extends StringJsonSchema { - // nest classes so all schemas and input/output classes can be public - - - public static class String1 extends StringJsonSchema.StringJsonSchema1 { - private static @Nullable String1 instance = null; - public static String1 getInstance() { - if (instance == null) { - instance = new String1(); - } - return instance; - } - } - -} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java deleted file mode 100644 index 44817a6fa76..00000000000 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ApiResponseTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ApiResponseTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); -} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java deleted file mode 100644 index 3aee7fc2264..00000000000 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/BooleanTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class BooleanTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); -} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java deleted file mode 100644 index 0932f510463..00000000000 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/NumberTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class NumberTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); -} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java deleted file mode 100644 index c163e0a4f54..00000000000 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/ReturnTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class ReturnTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); -} diff --git a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java b/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java deleted file mode 100644 index 7ef1533e8cb..00000000000 --- a/samples/client/petstore/java/src/test/java/org/openapijsonschematools/client/components/schemas/StringTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapijsonschematools.client.components.schemas; - -import org.junit.Assert; -import org.junit.Test; -import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags; -import org.openapijsonschematools.client.configurations.SchemaConfiguration; -import org.openapijsonschematools.client.exceptions.ValidationException; -import org.openapijsonschematools.client.schemas.validation.MapUtils; -import org.checkerframework.checker.nullness.qual.Nullable; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.AbstractMap; - -public class StringTest { - static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().format().build()); -} diff --git a/samples/client/petstore/python/docs/components/schema/return.md b/samples/client/petstore/python/docs/components/schema/return.md deleted file mode 100644 index b860d3e64f3..00000000000 --- a/samples/client/petstore/python/docs/components/schema/return.md +++ /dev/null @@ -1,46 +0,0 @@ -# Return -petstore_api.components.schema.return -``` -type: schemas.Schema -``` - -## Description -Model for testing reserved words - -## validate method -Input Type | Return Type | Notes ------------- | ------------- | ------------- -[ReturnDictInput](#returndictinput), [ReturnDict](#returndict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [ReturnDict](#returndict), str, float, int, bool, None, tuple, bytes, io.FileIO | - -## ReturnDictInput -``` -type: typing.Mapping[str, schemas.INPUT_TYPES_ALL] -``` -Key | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return** | int | this is a reserved python keyword | [optional] value must be a 32 bit integer -**any_string_name** | dict, schemas.immutabledict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.FileIO | any string name can be used but the value must be the correct type | [optional] - -## ReturnDict -``` -base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES] - -``` -### __new__ method -Keyword Argument | Type | Description | Notes ----------------- | ---- | ----------- | ----- -**return** | int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit integer -**kwargs** | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO | any string name can be used but the value must be the correct type Model for testing reserved words | [optional] typed value is accessed with the get_additional_property_ method - -### properties -Property | Type | Description | Notes --------- | ---- | ----------- | ----- -**return** | int, schemas.Unset | this is a reserved python keyword | [optional] value must be a 32 bit integer - -### methods -Method | Input Type | Return Type | Notes ------- | ---------- | ----------- | ------ -from_dict_ | [ReturnDictInput](#returndictinput), [ReturnDict](#returndict), str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader | [ReturnDict](#returndict), str, float, int, bool, None, tuple, bytes, io.FileIO | a constructor -get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str, bool, None, bytes, schemas.FileIO, schemas.Unset | provides type safety for additional properties - -[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md) diff --git a/samples/client/petstore/python/src/petstore_api/components/schema/return.py b/samples/client/petstore/python/src/petstore_api/components/schema/return.py deleted file mode 100644 index f88ba0894b0..00000000000 --- a/samples/client/petstore/python/src/petstore_api/components/schema/return.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -from __future__ import annotations -from petstore_api.shared_imports.schema_imports import * # pyright: ignore [reportWildcardImportFromLibrary] - -Return2: typing_extensions.TypeAlias = schemas.Int32Schema -Properties = typing.TypedDict( - 'Properties', - { - "return": typing.Type[Return2], - } -) - - -class ReturnDict(schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]): - - __required_keys__: typing.FrozenSet[str] = frozenset({ - }) - __optional_keys__: typing.FrozenSet[str] = frozenset({ - "return", - }) - - def __new__( - cls, - *, - return: typing.Union[ - int, - schemas.Unset - ] = schemas.unset, - configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None, - **kwargs: schemas.INPUT_TYPES_ALL, - ): - arg_: typing.Dict[str, typing.Any] = {} - for key_, val in ( - ("return", return), - ): - if isinstance(val, schemas.Unset): - continue - arg_[key_] = val - arg_.update(kwargs) - used_arg_ = typing.cast(ReturnDictInput, arg_) - return Return.validate(used_arg_, configuration=configuration_) - - @staticmethod - def from_dict_( - arg: typing.Union[ - ReturnDictInput, - ReturnDict - ], - configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None - ) -> ReturnDict: - return Return.validate(arg, configuration=configuration) - - @property - def return(self) -> typing.Union[int, schemas.Unset]: - val = self.get("return", schemas.unset) - if isinstance(val, schemas.Unset): - return val - return typing.cast( - int, - val - ) - - def get_additional_property_(self, name: str) -> typing.Union[schemas.OUTPUT_BASE_TYPES, schemas.Unset]: - schemas.raise_if_key_known(name, self.__required_keys__, self.__optional_keys__) - return self.get(name, schemas.unset) -ReturnDictInput = typing.Mapping[str, schemas.INPUT_TYPES_ALL] - - -@dataclasses.dataclass(frozen=True) -class Return( - schemas.AnyTypeSchema[ReturnDict, typing.Tuple[schemas.OUTPUT_BASE_TYPES, ...]], -): - """NOTE: This class is auto generated by OpenAPI JSON Schema Generator. - Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator - - Do not edit the class manually. - - Model for testing reserved words - """ - # any type - properties: Properties = dataclasses.field(default_factory=lambda: schemas.typed_dict_to_instance(Properties)) # type: ignore - type_to_output_cls: typing.Mapping[ - typing.Type, - typing.Type - ] = dataclasses.field( - default_factory=lambda: { - schemas.immutabledict: ReturnDict, - } - ) - diff --git a/samples/client/petstore/python/test/components/schema/test_return.py b/samples/client/petstore/python/test/components/schema/test_return.py deleted file mode 100644 index 026a31fff55..00000000000 --- a/samples/client/petstore/python/test/components/schema/test_return.py +++ /dev/null @@ -1,25 +0,0 @@ -# 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. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator -""" - -import unittest - -import openapi_client -from openapi_client.components.schema.return import Return -from openapi_client.configurations import schema_configuration - - -class TestReturn(unittest.TestCase): - """Return unit test stubs""" - configuration = schema_configuration.SchemaConfiguration( - disabled_json_schema_keywords={'format'} - ) - - -if __name__ == '__main__': - unittest.main() From aaf1b82c9eac21a5643f29aa969c61afd5c83fb3 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 19 Apr 2024 16:10:17 -0700 Subject: [PATCH 43/44] Fixes java tests, adjusts where logging is done for deprecated additionalProperties --- .../codegen/clicommands/Generate.java | 19 ----------- .../codegen/config/CodegenConfigurator.java | 32 +++++++++++++++++++ .../codegen/config/DynamicSettings.java | 13 -------- .../codegen/config/GeneratorSettings.java | 4 +++ 4 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java index c581055677d..f4274134479 100644 --- a/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java +++ b/src/main/java/org/openapijsonschematools/codegen/clicommands/Generate.java @@ -357,25 +357,6 @@ public void execute() { CodegenConfiguratorUtils.applyAdditionalPropertiesKvpList(additionalProperties, configurator); - if (!isNotEmpty(packageName) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("packageName"))) { - // if packageName is passed as an additional property warn them - LOGGER.warn("Deprecated command line arg: packageName should be passed in using --package-name from now on"); - packageName = (String) configurator.getAdditionalProperties().get("packageName"); - configurator.setPackageName(packageName); - } - if (!isNotEmpty(artifactId) && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("artifactId"))) { - // if packageName is passed as an additional property warn them - LOGGER.warn("Deprecated --additional-properties command line arg: artifactId should be passed in using --artifact-id from now on"); - artifactId = (String) configurator.getAdditionalProperties().get("artifactId"); - configurator.setArtifactId(artifactId); - } - if (hideGenerationTimestamp == null && (configurator.getAdditionalProperties() != null && configurator.getAdditionalProperties().containsKey("hideGenerationTimestamp"))) { - // if packageName is passed as an additional property warn them - LOGGER.warn("Deprecated --additional-properties command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); - hideGenerationTimestamp = (Boolean) configurator.getAdditionalProperties().get("hideGenerationTimestamp"); - configurator.setHideGenerationTimestamp(hideGenerationTimestamp); - } - try { final ClientOptInput clientOptInput = configurator.toClientOptInput(); diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 0af84a27579..441076b0650 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -68,6 +68,7 @@ public class CodegenConfigurator { private String auth; private List userDefinedTemplates = new ArrayList<>(); + private boolean fromFile = false; public CodegenConfigurator() { @@ -104,6 +105,7 @@ public static CodegenConfigurator fromFile(String configFile, Module... modules) configurator.userDefinedTemplates.addAll(userDefinedTemplateSettings); } + configurator.fromFile = true; return configurator; } return null; @@ -376,6 +378,36 @@ public Context toContext() { Validate.notEmpty(generatorName, "generator name must be specified"); Validate.notEmpty(inputSpec, "input spec must be specified"); + if (generatorSettingsBuilder.additionalProperties() != null && generatorSettingsBuilder.additionalProperties().containsKey("packageName")) { + // if packageName is passed as an additional property warn them + if (fromFile) { + LOGGER.warn("Deprecated additionalProperties arg: packageName should be passed in at the root level of the config file from now on"); + } else { + LOGGER.warn("Deprecated --additional-properties command line arg: packageName should be passed in using --package-name from now on"); + } + String packageName = (String) generatorSettingsBuilder.additionalProperties().get("packageName"); + generatorSettingsBuilder.withPackageName(packageName); + } + if (generatorSettingsBuilder.additionalProperties() != null && generatorSettingsBuilder.additionalProperties().containsKey("artifactId")) { + // if artifactId is passed as an additional property warn them + if (fromFile) { + LOGGER.warn("Deprecated additionalProperties arg: artifactId should be passed in at the root level of the config file from now on"); + } else { + LOGGER.warn("Deprecated --additional-properties command line arg: artifactId should be passed in using --artifact-id from now on"); + } + String artifactId = (String) generatorSettingsBuilder.additionalProperties().get("artifactId"); + generatorSettingsBuilder.withArtifactId(artifactId); + } + if (generatorSettingsBuilder.additionalProperties() != null && generatorSettingsBuilder.additionalProperties().containsKey("hideGenerationTimestamp")) { + // if hideGenerationTimestamp is passed as an additional property warn them + if (fromFile) { + LOGGER.warn("Deprecated additionalProperties arg: hideGenerationTimestamp should be passed in at the root level of the config file from now on"); + } else { + LOGGER.warn("Deprecated --additional-properties command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); + } + Boolean hideGenerationTimestamp = (Boolean) generatorSettingsBuilder.additionalProperties().get("hideGenerationTimestamp"); + workflowSettingsBuilder.withHideGenerationTimestamp(hideGenerationTimestamp); + } GeneratorSettings generatorSettings = generatorSettingsBuilder.build(); if (!isEmpty(templatingEngineName)) { workflowSettingsBuilder.withTemplatingEngineName(templatingEngineName); diff --git a/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java index 1d9a516c73d..1e8eff66498 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/DynamicSettings.java @@ -74,14 +74,6 @@ public GeneratorSettings getGeneratorSettings() { for (Map.Entry entry : dynamicProperties.entrySet()) { builder.withAdditionalProperty(entry.getKey(), entry.getValue()); } - if (generatorSettings.getArtifactId() == null && generatorSettings.getAdditionalProperties().containsKey("artifactId")) { - LOGGER.warn("Deprecated additionalProperties arg: artifactId should be passed in at the root level of the config file from now on"); - builder.withArtifactId((String) generatorSettings.getAdditionalProperties().get("artifactId")); - } - if (generatorSettings.getPackageName() == null && generatorSettings.getAdditionalProperties().containsKey("packageName")) { - LOGGER.warn("Deprecated additionalProperties arg: packageName should be passed in at the root level of the config file from now on"); - builder.withPackageName((String) generatorSettings.getAdditionalProperties().get("packageName")); - } return builder.build(); } @@ -93,11 +85,6 @@ public GeneratorSettings getGeneratorSettings() { public WorkflowSettings getWorkflowSettings() { excludeSettingsFromDynamicProperties(); WorkflowSettings.Builder builder = WorkflowSettings.newBuilder(workflowSettings); - if (generatorSettings.getAdditionalProperties().containsKey("hideGenerationTimestamp")) { - LOGGER.warn("Deprecated additionalProperties arg: hideGenerationTimestamp should be passed in at the root level of the config file from now on"); - Boolean hideGenerationTimestamp = Boolean.valueOf((String) generatorSettings.getAdditionalProperties().get("hideGenerationTimestamp")); - builder.withHideGenerationTimestamp(hideGenerationTimestamp); - } return builder.build(); } diff --git a/src/main/java/org/openapijsonschematools/codegen/config/GeneratorSettings.java b/src/main/java/org/openapijsonschematools/codegen/config/GeneratorSettings.java index 48c6909a50b..cd2557cdc09 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/GeneratorSettings.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/GeneratorSettings.java @@ -383,6 +383,10 @@ public static final class Builder { private String releaseNote; private String httpUserAgent; + public Map additionalProperties() { + return additionalProperties; + } + /** * Instantiates a new Builder. */ From b3eaeb22be2a1b50ce2e77d7c29552e8842f53c6 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 19 Apr 2024 16:19:36 -0700 Subject: [PATCH 44/44] Fixes hideGenerationTimestamp conversion --- .../codegen/config/CodegenConfigurator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java index 441076b0650..7579588fd71 100644 --- a/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java +++ b/src/main/java/org/openapijsonschematools/codegen/config/CodegenConfigurator.java @@ -405,7 +405,13 @@ public Context toContext() { } else { LOGGER.warn("Deprecated --additional-properties command line arg: hideGenerationTimestamp should be passed in using --hide-generation-timestamp from now on"); } - Boolean hideGenerationTimestamp = (Boolean) generatorSettingsBuilder.additionalProperties().get("hideGenerationTimestamp"); + Object value = generatorSettingsBuilder.additionalProperties().get("hideGenerationTimestamp"); + Boolean hideGenerationTimestamp = null; + if (value instanceof String) { + hideGenerationTimestamp = Boolean.valueOf((String) value); + } else if (value instanceof Boolean) { + hideGenerationTimestamp = (Boolean) value; + } workflowSettingsBuilder.withHideGenerationTimestamp(hideGenerationTimestamp); } GeneratorSettings generatorSettings = generatorSettingsBuilder.build();